PageSourceSearch

https://languagemate.io/build/root-SKQQM55I.js

js languagemate.io collected 2026-10-04 03:07:28 UTC 32,055 bytes, 6 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="de0b3bbd-c782-573a-b133-a5459ee074ad")}catch(e){}}();
3import{a as V2,b as L2}from"/build/_shared/chunk-RXBMJOWS.js";import{a as f2}from"/build/_shared/chunk-2ISYZHZI.js";import"/build/_shared/chunk-FKYY6I2C.js";import{a as X1}from"/build/_shared/chunk-AJ54JZAA.js";import{b as w2}from"/build/_shared/chunk-FBA4XYO3.js";import"/build/_shared/chunk-E67YK5XL.js";import{a as t1}from"/build/_shared/chunk-OGA6O5G5.js";import{a as x2}from"/build/_shared/chunk-OTLHZBUQ.js";import{b as Z}from"/build/_shared/chunk-MGNCPXE7.js";import{a as X}from"/build/_shared/chunk-JWLHHO2N.js";import{a as z2,c as e2,d as d2,e as n2,h as o2}from"/build/_shared/chunk-4B6ITDIS.js";import{a as g2,b as $}from"/build/_shared/chunk-JCMV536J.js";import{a as H2}from"/build/_shared/chunk-3AEOUPXP.js";import{e as m2,f as M2,g as p2,h as s2,i as u2}from"/build/_shared/chunk-7H5BSYIB.js";import"/build/_shared/chunk-RY4ISFJY.js";import"/build/_shared/chunk-XUPGYQHF.js";import"/build/_shared/chunk-4YU3T2A6.js";import{a as T1,b as D1,c as R1,e as E1,f as N1,g as W1}from"/build/_shared/chunk-A3OZH3YZ.js";import"/build/_shared/chunk-2PCTDG3E.js";import{b as I1}from"/build/_shared/chunk-EKJIH3WJ.js";import"/build/_shared/chunk-ITSAF77I.js";import"/build/_shared/chunk-64WF47YN.js";import{A as j1,Ad as Y,Bd as h2,Cd as a2,Dd as r2,Ed as i2,Fd as v2,Sc as t2,ha as J1,ia as f,ja as U,ka as Q1,qd as S,ud as c2,xd as l2,zd as K}from"/build/_shared/chunk-HJSRERLT.js";import{a as t3}from"/build/_shared/chunk-KPXHEVUT.js";import"/build/_shared/chunk-MP4QAOHH.js";import"/build/_shared/chunk-JYOFEI6J.js";import"/build/_shared/chunk-EBIP2EUA.js";import"/build/_shared/chunk-JFWTZSBS.js";import"/build/_shared/chunk-XOXVCT3Y.js";import"/build/_shared/chunk-B5OXN5BZ.js";import{B as K1,Z as q1,r as U1,z as _1}from"/build/_shared/chunk-KK4646WB.js";import"/build/_shared/chunk-PNLMA3B3.js";import{a as Q,k as Y1}from"/build/_shared/chunk-52UZA5IJ.js";import"/build/_shared/chunk-SIJ5VVKL.js";import{A as G1,Na as O1,Oa as J,Vb as F1,Za as y1,_a as k1,ba as b1,gb as P1,ia as S1,j as C1,sa as A1}from"/build/_shared/chunk-KJLCH6QE.js";import{a as x}from"/build/_shared/chunk-U5W3PAVV.js";import{b as Z1,d as $1,e as _}from"/build/_shared/chunk-7UVRC7Q4.js";import{a as I,b as v1,c as V1,d as w,e as T,i as w1,j as L1,m as d,o as D,p as R,q as z1,s as B1,u as E,v as e1,x as d1,y as H}from"/build/_shared/chunk-ST6U23C6.js";import{a as X2}from"/build/_shared/chunk-KTCJEOMT.js";import{c as j,e as o}from"/build/_shared/chunk-PELIJBCN.js";var T2=j((F4,F2)=>{F2.exports={}});var W2=j((N4,N2)=>{N2.exports={}});var U2=j((W4,I2)=>{I2.exports={}});var K2=j((I4,_2)=>{_2.exports={}});var B3=o(X2());var q2=o(I());var B2="/build/_assets/index-O54PQZIX.css";var G=o(I());var G2=o(V1());var g=o(H());function l3(){try{let t=window.navigator,c=window.screen,l={},r=t.userAgent;r.includes("Chrome")?l.browser="Chrome":r.includes("Safari")&&!r.includes("Chrome")?l.browser="Safari":r.includes("Firefox")?l.browser="Firefox":r.includes("Edge")?l.browser="Edge":l.browser="Unknown",r.includes("Windows")?l.os="Windows":r.includes("Mac")?l.os="macOS":r.includes("Linux")?l.os="Linux":r.includes("Android")?l.os="Android":r.includes("iOS")||r.includes("iPhone")||r.includes("iPad")?l.os="iOS":l.os="Unknown";let e=/iPhone|iPad|iPod|Android|webOS|BlackBerry|Windows Phone/i.test(r);return/iPad|Android/i.test(r)&&!/Mobile/i.test(r)?l.deviceType="Tablet":e?l.deviceType="Mobile":l.deviceType="Desktop",c&&(l.screenResolution=`${c.width}x${c.height}`,l.screenColorDepth=c.colorDepth,l.pixelRatio=window.devicePixelRatio||1),l.viewport=`${window.innerWidth}x${window.innerHeight}`,t.platform&&(l.platform=t.platform),l.touchSupport="ontouchstart"in window||t.maxTouchPoints>0,l.language=t.language||"Unknown",l.online=t.onLine,Object.entries(l).map(([u,M])=>`${u.replace(/([A-Z])/g," $1").replace(/^./,V=>V.toUpperCase())}: ${M}`).join(", ")}catch{return"Device info unavailable"}}function h3({open:t,onClose:c}){var u,M,B,V;
3let l=E(),[r,e]=(0,G.useState)(""),v=(u=f())==null?void 0:u.environment_variables,n=Q1();return(0,G.useEffect)(()=>{if(t){let p=l3();n!==null&&(p+=`, Inputs sent: ${n.inputsSent}, Review steps completed: ${n.reviewStepsCompleted}, LM review messages read: ${n.lmReviewMessagesRead}`),e(p)}},[t,n]),(0,G.useEffect)(()=>{let p=document.createElement("script");return p.src="https://challenges.cloudflare.com/turnstile/v0/api.js",p.async=!0,p.defer=!0,document.body.appendChild(p),()=>{document.body.contains(p)&&document.body.removeChild(p)}},[]),(0,G.useEffect)(()=>{var p;l.data&&(p=l.data)!=null&&p.success&&(alert("Thank you for your message! We will look into it as soon as possible."),c())},[l.data,c]),(0,g.jsx)(z2,{open:t,onOpenChange:c,children:(0,g.jsxs)(e2,{children:[(0,g.jsx)(d2,{className:"fixed inset-0 bg-slate-500 opacity-30"}),(0,g.jsxs)(n2,{className:"fixed left-[50%] top-[50%] z-50 flex w-[90vw] max-w-xl translate-x-[-50%] translate-y-[-50%] flex-col gap-8 rounded-lg bg-beige-500 px-6 py-10 max-h-[90vh] overflow-y-auto",children:[(0,g.jsxs)(l.Form,{className:"flex flex-col items-center justify-center gap-6",method:"POST",action:"/api/report",children:[(0,g.jsx)("input",{name:"url",type:"hidden",value:window.location.href}),(0,g.jsx)("input",{name:"deviceInfo",type:"hidden",value:r}),(0,g.jsx)($1,{children:"Need help?"}),(0,g.jsx)(J,{size:32,className:"text-forest-600"}),((M=l.data)==null?void 0:M.success)===!1&&(0,g.jsx)(Y1,{error:(V=(B=l.data)==null?void 0:B.message)!=null?V:"Something went wrong"}),(0,g.jsxs)("div",{className:"flex w-full flex-col items-start justify-center gap-4",children:[(0,g.jsxs)(_,{children:["Please watch our"," ",(0,g.jsx)(d,{to:"/tutorials",className:"underline",onClick:c,children:"tutorials"})," ","to get started with LanguageMate."]}),(0,g.jsx)(_,{children:"If you still need help, please describe your issue below and we will get back to you."}),(0,g.jsx)("textarea",{rows:4,name:"message",className:"w-full border-0 p-2 shadow",required:!0}),(0,g.jsx)("div",{className:"cf-turnstile","data-sitekey":v==null?void 0:v.CLOUDFLARE_TURNSTILE_SITE_KEY,"data-theme":"light"}),(0,g.jsx)(x,{type:"submit",children:"Submit"})]})]}),(0,g.jsx)(o2,{asChild:!0,className:"absolute right-2 top-2",children:(0,g.jsx)("button",{"aria-label":"Close",children:(0,g.jsx)(Z,{className:"fill-slate-400",size:"30"})})})]})]})})}var a3=()=>{let[t,c]=(0,G.useState)(!1),[l,r]=(0,G.useState)(!1),[e,v]=(0,G.useState)(!1),n=w().pathname;if((0,G.useEffect)(()=>{v(!0)},[]),(0,G.useEffect)(()=>{t||setTimeout(()=>{r(!0)},1e3)},[t]),t)return(0,g.jsx)(h3,{open:t,onClose:()=>c(!1)});if(!e)return null;let u=document.getElementById("report-bug");return n==="/"||n.includes("book-a-meeting")?null:u?G2.default.createPortal((0,g.jsx)(x,{variant:"transparent",padding:"py-2 lg:py-4",onClick:()=>c(!0),children:(0,g.jsxs)("div",{className:"flex gap-3",children:["Help ",(0,g.jsx)(J,{className:"text-copper-600"})]})}),u):(0,g.jsx)("button",{"aria-label":"Help",className:`fixed print:hidden ${l?"bottom-1 right-1":"bottom-2 right-2"} rounded-full bg-copper-400 p-1 text-forest-600 shadow transition-all duration-500`,onClick:()=>c(!0),children:(0,g.jsx)(J,{size:24})})};var b2=a3;var s=o(H()),r3="https://uk.linkedin.com/company/languagemate",i3=()=>{let t=w();return(t==null?void 0:t.pathname.includes("/scenarios"))||(t==null?void 0:t.pathname.includes("/lessons/"))?null:(0,s.jsx)("div",{className:"w-full bg-beige-600 p-4 print:hidden",children:(0,s.jsxs)("div",{className:"m-auto flex h-full w-full max-w-5xl flex-wrap items-start justify-between gap-4 gap-y-8 md:justify-center md:gap-8 lg:gap-12",children:[(0,s.jsxs)("div",{className:"flex min-w-36 flex-col gap-1",children:[(0,s.jsx)(d,{className:"font-semibold text-slate-900",to:"/contact",children:"Contact"}),(0,s.jsx)(d,{className:"text-slate-700",to:"/contact",children:"Contact Us"}),(0,s.jsx)("a",{className:"text-slate-700",href:g2,target:"_blank",rel:"noopener noreferrer",children:"Book a Meeting"}),(0,s.jsx)("a",{className:"text-slate-700",href:r3,target:"_blank",rel:"noopener noreferrer",children:"LinkedIn"})]}),(0,s.jsxs)("div",{className:"flex min-w-36 flex-col gap-1",children:[(0,s.jsx)(d,{className:"font-semibold text-slate-900",to:"/success-stories",children:"Success Stories"}),(0,s.jsx)(d,{className:"text-slate-700",to:"/success-stories",children:"Case Studies"}),(0,s.jsx)(d,{className:"text-slate-700",to:"/success-stories/distribution",children:"Distributor"}),(0,s.jsx)(d,{className:"text-slate-700",to:"/success-stories/higher-education",children:"Higher Education"}),(0,s.jsx)(d,{className:"text-slate-700",to:"/success-stories/department-for-education",children:"Department for Education"})]}),(0,s.jsxs)("div",{className:"flex min-w-36 flex-col gap-1",children:[(0,s.jsx)(d,{className:"font-semibold text-slate-900",to:"/faq-learning-design",children:"Pedagogy"}),(0,s.jsx)(d,{className:"text-slate-700",to:"/faq-learning-design",children:"Learning Design"})]}),(0,s.jsxs)("div",{className:"flex min-w-36 flex-col gap-1",children:[(0,s.jsx)(d,{className:"font-semibold text-slate-900",to:"/terms",children:"Legal"}),(0,s.jsx)(d,{className:"text-slate-700",to:"/terms",children:"Terms of Use"}),(0,s.jsx)(d,{className:"text-slate-700",to:"/privacy",children:"Privacy Policy"}),(0,s.jsx)(d,{className:"text-slate-700",to:"/faq-compliance",children:"Compliance and Data Processing"})]})]})})},c1=i3;var a1=o(I());function S2(t){return Q({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 96v64h448V96H32zm0 128v64h448v-64H32zm0 128v64h448v-64H32z"},child:[]}]})(t)}function n1(t){return Q({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 5.9a2.1 2.1 0 1 1 0 4.2 2.1 2.1 0 0 1 0-4.2m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"},child:[]}]})(t)}var L=o(I());var l1={ACTION:"_action",NOTIFICATION_ID:"notificationId"},o1={MARK_SEEN:"mark_seen",CLEAR_ALL:"clear_all"};var m=o(H());function h1(){var H1;let t=T(),c=E(),l=E(),r=E(),e=(H1=f())==null?void 0:H1.user,v=e!=null&&t2(e).length>
31,[n,u]=(0,L.useState)(!1),[M,B]=(0,L.useState)("unread"),[V,p]=(0,L.useState)([]),[P,W]=(0,L.useState)(!1),y=(0,L.useRef)({}),O=(0,L.useRef)(null),F=z=>{O.current=z,c.load(`/api/profile/notifications?limit=5&filter=${z}`)},Q2=z=>{u(z),z&&(y.current={},F(M))},u1=z=>{if(z===M)return;B(z);let C=y.current[z];if(C){p(C);return}F(z)};(0,L.useEffect)(()=>{c.load("/api/profile/notifications?limit=1&filter=unread")},[]),(0,L.useEffect)(()=>{if(!c.data)return;let z=c.data.notifications||[];W(Boolean(c.data.hasUnseen)),n&&O.current?(y.current[O.current]=z,O.current===M&&p(z)):p(z)},[c.data]),(0,L.useEffect)(()=>{var z;(z=l.data)!=null&&z.success&&(y.current={},F(M))},[l.data]);let Y2=z=>{var f1;z.seen||(p($2=>$2.map(i1=>i1.id===z.id?{...i1,seen:!0}:i1)),l.submit({[l1.ACTION]:o1.MARK_SEEN,[l1.NOTIFICATION_ID]:z.id},{method:"POST",action:"/api/profile/notifications"})),u(!1);let C=(f1=z.link)!=null?f1:z.scenarioId&&z.sessionId?`/scenarios/${z.scenarioId}/${z.sessionId}`:null;if(C){if(z.language&&z.language!==(e==null?void 0:e.target_language)){U1({fetcher:r,languageCode:z.language,redirectTo:C});return}t(C)}},Z2=()=>{P&&(p(z=>z.map(C=>({...C,seen:!0}))),W(!1),y.current={},l.submit({[l1.ACTION]:o1.CLEAR_ALL},{method:"POST",action:"/api/profile/notifications"}))},x1=(0,L.useMemo)(()=>[...V].sort((z,C)=>C.updatedAtMs-z.updatedAtMs),[V]);return(0,m.jsxs)(m2,{open:n,onOpenChange:Q2,children:[(0,m.jsx)(M2,{asChild:!0,children:(0,m.jsxs)("button",{className:"relative shrink-0","aria-label":"Notifications",type:"button",children:[(0,m.jsx)(C1,{size:30,className:"stroke-forest-600"}),P&&(0,m.jsx)("span",{className:"absolute right-0 top-0 h-2 w-2 rounded-full bg-copper-600"})]})}),(0,m.jsx)(p2,{children:(0,m.jsxs)(s2,{className:"z-50 w-[calc(100vw-2rem)] rounded-md border border-gray-200 bg-white p-2 shadow-lg sm:w-[360px]",sideOffset:5,align:"end",children:[(0,m.jsxs)("div",{className:"mb-2 flex gap-1 border-b pb-2",children:[(0,m.jsx)("button",{type:"button",className:`rounded px-3 py-1 ${M==="unread"?"bg-forest-100 font-semibold text-forest-700":"text-gray-500 hover:bg-gray-100"}`,onClick:()=>u1("unread"),children:"Unread"}),(0,m.jsx)("button",{type:"button",className:`rounded px-3 py-1 ${M==="all"?"bg-forest-100 font-semibold text-forest-700":"text-gray-500 hover:bg-gray-100"}`,onClick:()=>u1("all"),children:"All"})]}),c.state!=="idle"?(0,m.jsx)(x2,{}):x1.length===0?(0,m.jsx)("div",{className:"p-4 text-center text-gray-500",children:M==="unread"?"No unread notifications":"No notifications"}):(0,m.jsxs)(m.Fragment,{children:[x1.map(z=>(0,m.jsxs)(u2,{className:"flex cursor-pointer items-start gap-2 rounded-sm px-3 py-2 outline-none hover:bg-gray-100",onSelect:C=>{C.preventDefault(),Y2(z)},children:[!z.seen&&(0,m.jsx)("span",{className:"mt-1 h-2 w-2 shrink-0 rounded-full bg-copper-600"}),(0,m.jsxs)("div",{className:"flex-1",children:[(0,m.jsxs)("p",{className:"flex items-center gap-2",children:[v&&z.language?(0,m.jsx)(H2,{languageCode:z.language,renderAsStrings:!0}):null,z.title]}),z.updatedAtMs?(0,m.jsx)("p",{className:"text-gray-500",children:_1(z.updatedAtMs)}):null]})]},z.id)),P&&(0,m.jsx)("div",{className:"mt-2 border-t pt-2",children:(0,m.jsx)("button",{onClick:Z2,className:"w-full rounded px-3 py-1 text-gray-600 hover:bg-gray-100",type:"button",children:"Clear all"})})]})]})})]})}var A2=o(V1());var i=o(H());function g1(t,c){return t.startsWith("/scenarios/custom")?c.startsWith("/scenarios/custom"):t.startsWith("/admin")?c.startsWith("/admin"):t.startsWith("/super-admin")?c.startsWith("/super-admin"):t.includes(c)}var O2="copper",y2="copper-transparent";function q(t,c){return g1(t,c)?O2:y2}function m1({groupId:t}){var l;let c=(l=f())==null?void 0:l.user;return(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(v3,{groupId:t}),S(c)?(0,i.jsx)(n3,{}):(0,i.jsx)(i.Fragment,{})]})}function v3({groupId:t}){var v;let c=w().pathname,l=(v=f())==null?void 0:v.user,r=S(l),{role:e}=t1();return r&&e==="student"?null:(0,i.jsxs)("div",{className:"flex flex-row flex-wrap items-start justify-start gap-2 md:gap-4 lg:gap-6",children:[(0,i.jsx)(M3,{}),(0,i.jsx)(z3,{currentRoute:c,groupId:t}),(0,i.jsx)(e3,{}),(0,i.jsx)(o3,{}),(0,i.jsx)(g3,{}),(0,i.jsx)(m3,{})]})}function z3({currentRoute:t,groupId:c}){var v;let l=t.includes(`/groups/${c}`),r=(v=f())==null?void 0:v.user,e=S(r);return!c||!h2(r)?null:(0,i.jsx)(d,{className:"flex items-center justify-center gap-2",to:e?`/groups/${c}/classes/demo`:`/groups/${c}/classes`,children:(0,i.jsx)(x,{variant:l?O2:y2,padding:"SMALL",children:(0,i.jsxs)("div",{className:"flex items-center justify-center gap-1",children:[(0,i.jsx)("span",{className:l?"":"hidden md:block",children:(0,i.jsx)(P1,{})}),"My Group"]})})})}function e3(){var l;let t=(l=f())==null?void 0:l.user,c=w().pathname;return Y(t)||!a2(t)?null:(0,i.jsx)(d,{className:"flex items-center justify-center gap-2",to:"/scenarios",children:(0,i.jsx)(x,{variant:q(c,"/scenarios"),padding:"py-2 lg:py-4",children:(0,i.jsxs)("div",{className:"flex items-center justify-center gap-1",children:[(0,i.jsx)("span",{className:g1(c,"/scenarios")?"":"hidden md:block",children:(0,i.jsx)(O1,{})}
3),"Scenarios"]})})})}var d3=[{value:"admin",label:"Admin",navigateTo:"/admin"},{value:"teacher",label:"Teacher",navigateTo:"/scenarios"},{value:"student",label:"Student",navigateTo:"/scenarios"}];function n3(){let{role:t,setRole:c}=t1(),l=T();return(0,i.jsxs)("div",{className:"flex w-fit flex-col items-start gap-2",children:[(0,i.jsxs)("div",{className:"flex items-center gap-1 font-semibold",children:[(0,i.jsx)(F1,{className:"shrink-0",size:22}),"Viewing as:"]}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[d3.map(({value:e,label:v,navigateTo:n})=>(0,i.jsx)(j1,{label:`View as ${v}`,selected:t===e,onClick:()=>{(0,A2.flushSync)(()=>c(e)),l(n)},value:e,children:v},e)),(0,i.jsxs)("div",{className:"group relative",children:[(0,i.jsx)("button",{type:"button",className:"text-amber-600","aria-label":"Demo account information",children:(0,i.jsx)(A1,{size:18})}),(0,i.jsx)("div",{className:"absolute right-0 top-full z-10 mt-1 hidden w-64 max-w-[calc(100vw-2rem)] rounded border border-amber-300 bg-amber-50 p-3 text-sm text-amber-800 shadow-md group-focus-within:block group-hover:block sm:left-0 sm:right-auto sm:w-[32rem]",children:"As this is a demo account, we allow you to switch between an admin, student or teacher account. This is to help you explore the platform. On a real account, teachers have access to teacher accounts and students only have access to their own account. Admins have access to the admin dashboard."})]})]})]})}function o3(){let t=w().pathname,c=f(),l=c==null?void 0:c.user,r=c==null?void 0:c.classInfo;return r2(l,r)?(0,i.jsx)(d,{className:"flex items-center justify-center gap-2",to:"/scenarios/custom",children:(0,i.jsx)(x,{variant:q(t,"/scenarios/custom"),padding:"py-2 lg:py-4",children:(0,i.jsxs)("div",{className:"flex items-center justify-center gap-1",children:[(0,i.jsx)(k1,{className:"hidden shrink-0 md:block",size:18}),"Custom scenarios"]})})}):null}function g3(){var l;let t=w().pathname,c=(l=f())==null?void 0:l.user;return i2(c)?(0,i.jsx)(d,{className:"flex items-center justify-center gap-2",to:"/academy",children:(0,i.jsx)(x,{variant:q(t,"/academy"),padding:"py-2 lg:py-4",children:(0,i.jsxs)("div",{className:"flex items-center justify-center gap-1",children:[(0,i.jsx)(S1,{className:"hidden shrink-0 md:block",size:18}),"Academy"]})})}):null}function m3(){var l;let t=w().pathname,c=(l=f())==null?void 0:l.user;return v2(c)?(0,i.jsx)(d,{className:"flex items-center justify-center gap-2",to:"/trials/groups",children:(0,i.jsx)(x,{variant:q(t,"/trials/groups"),padding:"py-2 lg:py-4",children:(0,i.jsxs)("div",{className:"flex items-center justify-center gap-1",children:[(0,i.jsx)(b1,{className:"hidden shrink-0 md:block",size:18}),"Trials"]})})}):null}function M3(){var n;let t=w().pathname,c=(n=f())==null?void 0:n.user,l=S(c),{role:r}=t1(),v=(()=>l?r==="admin"?"/admin":null:K(c)?"/admin":c!=null&&c.isSuperAdmin?"/super-admin":null)();return v?(0,i.jsx)(d,{className:"flex items-center justify-center gap-2",to:v,children:(0,i.jsx)(x,{variant:q(t,v),padding:"py-2 lg:py-4",children:(0,i.jsxs)("div",{className:"flex items-center justify-center gap-1",children:[(0,i.jsx)("span",{className:g1(t,v)?"":"hidden md:block",children:(0,i.jsx)(y1,{})}),"Admin"]})})}):(0,i.jsx)(i.Fragment,{})}var k2=o(H());function M1(){let c=U().WARNING_BANNER_MESSAGE;return c?(0,k2.jsx)("div",{className:"w-full bg-yellow-300 text-center py-2 text-yellow-900 font-semibold shadow-md",children:c}):null}var h=o(H()),p3=({user:t})=>{var F;let c=Boolean(t),l=(F=f())==null?void 0:F.demoExpiresAt,{pathname:r}=w(),e=r.includes("placements"),v=!X1(t)&&!X.isNativePlatform()&&!e,[n,u]=(0,a1.useState)(!1),M=r.startsWith("/groups/"),B=r==="/schools",V=r==="/business",P=B||V||r==="/success-stories",W=(r==="/"||V||B)&&!X.isNativePlatform(),y=Boolean(t)&&!r.includes("/about")&&!M&&!P&&!W,O;return t&&"group_id"in t&&(O=t),(0,h.jsxs)("div",{className:`z-50 flex w-full flex-col print:hidden ${W?"sticky top-0 w-full":""}`,children:[(0,h.jsxs)("div",{className:"top-0 z-30 flex w-full items-center justify-between gap-4 bg-beige-600 px-4 py-2 shadow-md lg:py-5",children:[(0,h.jsx)(S2,{size:"25",className:"cursor-pointer fill-forest-600 lg:hidden",onClick:()=>u(!0)}),(0,h.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl items-center justify-between gap-2 lg:gap-4",children:[(0,h.jsx)(P2,{user:t}),(0,h.jsx)(u3,{isLoggedIn:c,setMenuOpen:u,showPremium:v,isBusiness:V,showLearnerControls:y})]})]}),(0,h.jsx)(M1,{}),l&&r!=="/onboarding"?(0,h.jsxs)("div",{className:"w-full border-b border-amber-300 bg-amber-50 px-4 py-2 text-center text-sm text-amber-800",children:["This is a demo account. It will expire on"," ",(0,h.jsx)("span",{className:"font-semibold",children:K1(l)}),". If you require an extension, please contact us."]}):null,n&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:"fixed top-0 z-50",children:(0,h.jsx)(x3,{showPremium:v,setMenuOpen:u,isLoggedIn:c,user:t,isBusiness:V})}),(0,h.jsx)("div",{className:"fixed top-0 z-40 h-screen w-screen bg-slate-800 bg-opacity-75"})]}),(l2(O)||Y(O))&&!P?(0,h.jsx)("div",{className:"mx-auto w-full max-w-5xl px-2 pt-4 lg:px-0",children:(0,h.jsx)(m1,{groupId:c2(O)})}):null]})},s3=()=>{let t=T(),{pathname:c}=w(),l=!q1(c);return(0,h.jsx)("button",{onClick:()=>t(-1),disabled:!l,className:`flex items-center justify-center rounded-full transition-colors hover:bg-slate-200 lg:hidden ${l?"":"cursor-not-allowed opacity-50"}`,"aria-label":"Go back",children:(0,h.jsx)(G1,{size:30,className:"text-forest-500"})})},u3=({isLoggedIn:t,setMenuOpen:c,showPremium:l,isBusiness:r,showLearnerControls:e})=>{var M;
3let v=(M=f())==null?void 0:M.user,n=v&&"group_id"in v,u=S(v);return(0,h.jsx)("div",{className:"flex items-center gap-3",children:t?(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)("div",{className:"flex items-center gap-2 lg:gap-3",children:[u&&(0,h.jsx)("div",{className:"hidden items-center gap-3 lg:flex",children:(0,h.jsx)(k,{to:"/success-stories",text:"Success Stories"})}),u&&(0,h.jsx)("div",{className:"hidden items-center gap-3 lg:flex",children:(0,h.jsx)(k,{to:"/schools",text:"For Schools"})}),u&&(0,h.jsx)("div",{className:"hidden items-center gap-3 lg:flex",children:(0,h.jsx)(k,{to:"/business",text:"For Business"})}),(0,h.jsx)("div",{className:"hidden items-center gap-3 lg:flex",children:(0,h.jsx)(k,{to:"/scenarios",text:"Scenarios"})}),l&&(0,h.jsx)($,{setMenuOpen:c}),e&&v?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(s3,{}),(0,h.jsx)("div",{className:"[&>button]:px-0",children:(0,h.jsx)(f2,{flagOnly:!0,padding:"py-2 lg:py-4",base:v.base_language,target:v.target_language})})]}):null,!K(v)&&!S(v)&&(0,h.jsx)(h1,{}),(0,h.jsx)(d,{to:"/profile",className:"shrink-0",onClick:()=>c(!1),children:(0,h.jsx)(n1,{size:30,className:"rounded-3xl border-2 border-forest-600 fill-forest-600"})})]})}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("div",{className:"hidden items-center gap-4 lg:flex",children:[(0,h.jsx)("div",{className:"hidden items-center gap-3 lg:flex",children:(0,h.jsx)(k,{to:"/success-stories",text:"Success Stories"})}),(0,h.jsx)("div",{className:"hidden items-center gap-3 lg:flex",children:(0,h.jsx)(k,{to:"/schools",text:"For Schools"})}),(0,h.jsx)("div",{className:"hidden items-center gap-3 lg:flex",children:(0,h.jsx)(k,{to:"/business",text:"For Business"})}),(0,h.jsx)(d,{to:"/login",children:(0,h.jsx)(x,{children:(0,h.jsx)("p",{className:"px-2",children:"Login"})})})]}),l&&(0,h.jsx)("div",{className:"w-fit",children:(0,h.jsx)($,{setMenuOpen:c,fullWidth:!0})})]})})},x3=({showPremium:t,setMenuOpen:c,isLoggedIn:l,user:r,isBusiness:e})=>{let v=(0,a1.useRef)(null);J1(v,()=>c(!1));let n=()=>c(!1),{pathname:u}=w(),M=S(r);return(0,h.jsxs)("div",{ref:v,className:`absolute left-0 top-0 h-screen w-1/3 min-w-[300px] bg-beige-600 ${X.isNativePlatform()?"top-8":""}`,children:[(0,h.jsxs)("div",{className:"relative flex h-20 w-full items-center justify-between border-b border-forest-400 px-4",children:[(0,h.jsx)(P2,{onClick:n,user:r}),(0,h.jsx)("button",{onClick:()=>c(!1),children:(0,h.jsx)(Z,{className:"fill-forest-400",size:"30"})})]}),(0,h.jsx)("div",{className:"mt-10 flex flex-col gap-4 px-4",children:l?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[!K(r)&&!S(r)&&(0,h.jsx)(h1,{}),(0,h.jsx)(d,{to:"/profile",className:"shrink-0",onClick:()=>c(!1),children:(0,h.jsx)(n1,{size:30,className:"rounded-3xl border-2 border-forest-600 fill-forest-600"})})]}),M&&(0,h.jsx)(N,{to:"/success-stories",text:"Success Stories",onClick:n}),M&&(0,h.jsx)(N,{to:"/schools",text:"For Schools",onClick:n}),M&&(0,h.jsx)(N,{to:"/business",text:"For Business",onClick:n}),t?(0,h.jsx)(V2,{setMenuOpen:c}):null]}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(N,{to:"/success-stories",text:"Success Stories",onClick:n}),(0,h.jsx)(N,{to:"/schools",text:"For Schools",onClick:n}),(0,h.jsx)(N,{to:"/business",text:"For Business",onClick:n}),(0,h.jsx)(d,{to:"/login",children:(0,h.jsx)(x,{onClick:n,children:(0,h.jsx)("p",{className:"px-2",children:"Login"})})}),t?(0,h.jsx)($,{setMenuOpen:c,fullWidth:!0}):null]})})]})},P2=({onClick:t,user:c})=>(0,h.jsx)(d,{onClick:t,to:c?"/scenarios":"/",className:"flex shrink-0 items-center justify-center gap-2 text-2xl font-bold text-slate-800",children:(0,h.jsx)("img",{src:"/logo-2.png",loading:"eager",className:"h-12 w-auto lg:h-16"})}),k=({to:t,text:c})=>(0,h.jsx)(d,{to:t,className:"rounded-md px-2 py-1 text-lg font-semibold text-forest-600 transition-all duration-200 ease-in-out hover:bg-forest-800 hover:bg-opacity-10",children:c}),N=({onClick:t,text:c,to:l})=>(0,h.jsx)(d,{onClick:t,to:l,className:"text-lg font-semibold text-forest-800",children:(0,h.jsx)(x,{variant:"transparent",children:(0,h.jsx)("span",{className:"px-5",children:c})})}),r1=p3;var s1=o(T2());var C3=o(t3());var A=o(H());function D2(){let{toasts:t}=I1();return(0,A.jsx)("div",{className:"print:hidden",children:(0,A.jsxs)(T1,{children:[t.map(function({id:c,title:l,description:r,action:e,...v}){return(0,A.jsxs)(R1,{...v,children:[(0,A.jsxs)("div",{className:"grid gap-1",children:[l?(0,A.jsx)(N1,{children:l}):null,r?(0,A.jsx)(W1,{children:r}):null]}),e,(0,A.jsx)(E1,{})]}
3,c)}),(0,A.jsx)(D1,{})]})})}var R2=o(I()),H3={api_host:"https://eu.i.posthog.com",autocapture:!1,capture_pageview:!1,capture_pageleave:!1,person_profiles:"identified_only",session_recording:{maskAllInputs:!0,maskTextSelector:"*",blockSelector:"img, video"}};function f3({env:t,apiKey:c,consentGiven:l}){return t!=="development"&&c.length>0&&l}function V3(t,c){if(t.__loaded){t.startSessionRecording();return}t.init(c,H3)}function w3(t){t.__loaded&&t.stopSessionRecording()}var L3=({env:t,apiKey:c,consentGiven:l})=>((0,R2.useEffect)(()=>{if(f3({env:t,apiKey:c,consentGiven:l}))return import("/build/_shared/module-3VUSUH3W.js").then(({default:r})=>{V3(r,c)}),()=>{import("/build/_shared/module-3VUSUH3W.js").then(({default:r})=>{w3(r)})}},[t,c,l]),null),E2=L3;var G3=o(W2());var j2=o(U2()),b3=o(K2());var b=o(H());function p1({onAccept:t,onReject:c}){return(0,b.jsx)("div",{className:"fixed bottom-0 left-0 right-0 z-50 bg-white p-4 shadow-lg print:hidden",children:(0,b.jsxs)("div",{className:"mx-auto flex max-w-6xl flex-col items-center justify-between gap-4 sm:flex-row",children:[(0,b.jsxs)("div",{className:"flex-1 text-sm text-gray-700",children:["We use cookies to analyse site usage."," ",(0,b.jsx)(d,{to:"/privacy",className:"text-forest-600 underline hover:text-forest-700",target:"_blank",rel:"noopener noreferrer",children:"Privacy Policy"})]}),(0,b.jsxs)("div",{className:"flex flex-shrink-0 items-center gap-3",children:[(0,b.jsx)("div",{className:"w-full sm:w-[140px]",children:(0,b.jsx)(x,{variant:"transparent",onClick:c,children:"Reject All"})}),(0,b.jsx)("div",{className:"w-full sm:w-[140px]",children:(0,b.jsx)(x,{variant:"green",onClick:t,children:"Accept All"})})]})]})})}var a=o(H());function S3(){return[{href:B2,rel:"stylesheet"},{rel:"icon",type:"image/png",sizes:"512x512",href:"/favicon.png"},{rel:"icon",type:"image/png",sizes:"48x48",href:"/favicon-48.png"}]}function J2(){let{user:t,node_env:c,buildId:l}=B1(),r=U(),{consent:e,setConsent:v,isLoading:n}=L2();(0,q2.useEffect)(()=>{typeof navigator!="undefined"&&"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(B=>{for(let V of B)V.unregister().then(p=>{p?console.log(`Service worker unregistered: ${V.scope}`):console.warn(`Failed to unregister service worker: ${V.scope}`)}).catch(p=>{console.error(`Error unregistering service worker ${V.scope}:`,p)})}).catch(B=>{console.error("Error getting service worker registrations:",B)})},[]);let u=()=>{v("accepted")},M=()=>{v("rejected")};return(0,a.jsxs)("html",{lang:"en",children:[(0,a.jsxs)("head",{children:[(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com"}),(0,a.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap",rel:"stylesheet"}),(0,a.jsx)("link",{rel:"manifest",href:"/manifest.json"}),(0,a.jsx)(E2,{env:c,apiKey:r.POSTHOG_KEY,consentGiven:e==="accepted"}),(0,a.jsx)("meta",{charSet:"utf-8"}),(0,a.jsx)("meta",{name:"viewport",content:"initial-scale=1, viewport-fit=cover"}),(0,a.jsx)("meta",{name:"apple-mobile-web-app-status-bar-style",content:"black-translucent"}),(0,a.jsx)(R,{}),(0,a.jsx)(D,{}),(0,a.jsx)("meta",{name:"build-id",content:l})]}),(0,a.jsxs)("body",{className:"bg-beige-500 print:[-webkit-print-color-adjust:exact] print:[print-color-adjust:exact]",children:[(0,a.jsxs)(w2,{env:r,children:[(0,a.jsxs)("div",{className:"flex min-h-screen flex-col",children:[(0,a.jsx)(r1,{user:t}),(0,a.jsxs)("div",{className:"flex-grow px-2",children:[(0,a.jsx)(L1,{}),(0,a.jsx)(b2,{}),(0,a.jsx)(D2,{})]}),(0,a.jsx)(c1,{})]}),!n&&e===null&&(0,a.jsx)(p1,{onAccept:u,onReject:M})]}),(0,a.jsx)(d1,{}),(0,a.jsx)(z1,{}),(0,a.jsx)(e1,{})]})]})}function A3(){let t=w1(),{user:c,buildId:l}=f()||{},r=U(),e;return v1(t)?e=t.statusText:t instanceof Error?e=t.message:typeof t=="string"?e=t:(console.error(t),e="Unknown error"),e.includes("No routes matched")&&s1.default.log(s1.default.events.API_ERROR,`ErrorBoundary: ${e}`),v1(t)&&t.status===404?(0,a.jsxs)("html",{lang:"en",children:[(0,a.jsxs)("head",{children:[(0,a.jsx)("link",{rel:"prec
3onnect",href:"https://fonts.googleapis.com"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com"}),(0,a.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap",rel:"stylesheet"}),(0,a.jsx)(R,{}),(0,a.jsx)(D,{})]}),(0,a.jsxs)("body",{className:"bg-slate-100",children:[(0,a.jsx)(r1,{user:c}),(0,a.jsx)("div",{className:"mx-auto max-w-lg text-center",children:(0,a.jsx)("h1",{className:"h-screen text-xl font-bold text-forest-600",children:"404 - this page does not exist"})}),(0,a.jsx)(c1,{}),(0,a.jsx)(R,{}),(0,a.jsx)(D,{}),(0,a.jsx)("meta",{name:"build-id",content:l})]})]}):(0,a.jsxs)("html",{lang:"en",children:[(0,a.jsxs)("head",{children:[(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com"}),(0,a.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com"}),(0,a.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap",rel:"stylesheet"}),(0,a.jsx)(R,{}),(0,a.jsx)(D,{})]}),(0,a.jsxs)("body",{className:"bg-beige-500",children:[(0,a.jsx)(r1,{user:void 0}),(0,a.jsxs)("div",{className:"mx-auto my-12 flex min-h-screen max-w-lg flex-col items-center gap-8 px-2 text-center",children:[(0,a.jsxs)("div",{className:"mx-auto max-w-lg text-center",children:[(0,a.jsx)(Z1,{variant:"copper",children:"Please try refreshing the page"}),(0,a.jsx)(_,{children:"Oh, it looks like something went wrong with your connection"})]}),(0,a.jsx)("div",{className:"flex items-center gap-2 whitespace-nowrap",children:(0,a.jsx)(x,{onClick:()=>location.reload(),children:"Refresh page"})}),(0,a.jsx)("img",{src:"https://firebasestorage.googleapis.com/v0/b/languagemate2.appspot.com/o/IMG_0059.PNG?alt=media&token=b0426f00-2cc3-471c-9a25-f27ad180d043",className:"mx-auto h-auto w-1/2 max-w-[300px] rounded-md shadow-md"})]}),(0,a.jsx)(c1,{}),(0,a.jsx)(d1,{}),(0,a.jsx)(z1,{}),(0,a.jsx)(e1,{}),(0,a.jsx)(R,{}),(0,a.jsx)(D,{}),(0,a.jsx)("meta",{name:"build-id",content:l})]})]})}export{A3 as ErrorBoundary,J2 as default,S3 as links};
4//# sourceMappingURL=/build/root-SKQQM55I.js.map
5
6//# debugId=de0b3bbd-c782-573a-b133-a5459ee074ad

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.