PageSourceSearch

https://mycurriculummate.com.au/static/js/9888.107b0185.chunk.js

js mycurriculummate.com.au collected 2026-10-02 00:43:43 UTC 24,371 bytes, 3 lines download raw bytes

1/*! For license information please see 9888.107b0185.chunk.js.LICENSE.txt */
2"use strict";(globalThis.webpackChunkfrontend=globalThis.webpackChunkfrontend||[]).push([[9888],{25440(e,s,a){a.d(s,{A:()=>r});var t=a(49367),l=a(70579);const r=()=>(0,l.jsx)(t.mg,{children:(0,l.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})},91140(e,s,a){a.d(s,{BT:()=>d,Wu:()=>c,ZB:()=>o,Zp:()=>n,aR:()=>i,wL:()=>u});var t=a(65043),l=a(99766),r=a(70579);const n=t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)("div",{ref:s,className:(0,l.cn)("rounded-xl border bg-card text-card-foreground shadow",a),...t})});n.displayName="Card";const i=t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)("div",{ref:s,className:(0,l.cn)("flex flex-col space-y-1.5 p-6",a),...t})});i.displayName="CardHeader";const o=t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)("div",{ref:s,className:(0,l.cn)("font-semibold leading-none tracking-tight",a),...t})});o.displayName="CardTitle";const d=t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)("div",{ref:s,className:(0,l.cn)("text-sm text-muted-foreground",a),...t})});d.displayName="CardDescription";const c=t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)("div",{ref:s,className:(0,l.cn)("p-6 pt-0",a),...t})});c.displayName="CardContent";const u=t.forwardRef((e,s)=>{let{className:a,...t}=e;return(0,r.jsx)("div",{ref:s,className:(0,l.cn)("flex items-center p-6 pt-0",a),...t})});u.displayName="CardFooter"},89888(e,s,a){a.r(s),a.d(s,{default:()=>T});var t=a(65043),l=a(25440),r=a(45621),n=a(73824),i=a(4980),o=a(56328),d=a(13390),c=a(91140),u=a(42441),m=a(5949),x=a(46258),h=a(72629),p=a(35327),f=a(28646),g=a(70067),j=a(22024),v=a(50797),b=a(9855),y=a(76245),N=a(56898),w=a(33005),A=a(7104),C=a(78384),k=a(42489),_=a(38326),S=a(9493),$=a(65598),R=a(36210),E=a(13416),M=a(70579);const P=["Too expensive","Didn't use it enough","Missing a feature I needed","Technical issues","Just needed it for one thing","Other"],z=e=>{let{label:s,selected:a,onClick:t}=e;return(0,M.jsxs)("button",{type:"button",onClick:t,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-medium border transition-all "+(a?"bg-primary text-primary-foreground border-primary":"bg-background text-muted-foreground border-border hover:border-primary/50"),children:[a&&(0,M.jsx)(R.A,{className:"w-3 h-3"}),s]})},L=e=>{let{open:s,onDone:a}=e;const[l,r]=(0,t.useState)(null),[o,c]=(0,t.useState)(""),[u,m]=(0,t.useState)(!1),x=(0,t.useRef)(a);x.current=a;const h=(0,t.useRef)(!1),p=()=>{var e;h.current||(h.current=!0,null===(e=x.current)||void 0===e||e.call(x))};(0,t.useEffect)(()=>{if(!s)return;h.current=!1;const e=setTimeout(p,15e3);return()=>clearTimeout(e)},[s]);const f=async function(){if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&l){m(!0);try{await i.A.post(`${n.nC}/feedback`,{feedback_type:"cancel_survey",feature:"subscription",page_url:window.location.href,negative_reasons:[l],comment:o||null})}catch{}finally{m(!1),p()}}else p()};return(0,M.jsx)($.lG,{open:s,onOpenChange:e=>!e&&p(),children:(0,M.jsxs)($.Cf,{className:"sm:max-w-md","data-testid":"cancel-reason-survey",children:[(0,M.jsxs)($.c7,{children:[(0,M.jsx)($.L3,{children:"Sorry to see you go"}),(0,M.jsx)($.rr,{children:"Mind telling us why you cancelled? It helps us improve."})]}),(0,M.jsxs)("div",{className:"space-y-4 py-2",children:[(0,M.jsx)("div",{className:"flex flex-wrap gap-2",children:P.map(e=>(0,M.jsx)(z,{label:e,selected:l===e,onClick:()=>r(e)},e))}),l&&(0,M.jsx)(E.T,{placeholder:"Anything else? (optional)",value:o,onChange:e=>c(e.target.value),className:"min-h-[70px] text-sm animate-in slide-in-from-top duration-200","data-testid":"cancel-survey-comment"}),(0,M.jsxs)("div",{className:"flex gap-3",children:[(0,M.jsx)(d.$,{variant:"outline",onClick:()=>f(!0),className:"flex-1",disabled:u,children:"Skip"}),(0,M.jsx)(d.$,{onClick:()=>f(!1),className:"flex-1",disabled:u||!l,children:u?"Sending\u2026":"Submit"})]})]})]})})},T=()=>{var e,s,a,R;const{user:E,logout:P,checkAuth:z}
2=(0,n.As)(),T=(0,r.Zp)(),[F,Z]=(0,t.useState)(null),[D,B]=(0,t.useState)({totalPlans:0,aiPlans:0}),[W,U]=(0,t.useState)(!0),[O,I]=(0,t.useState)(!1),[Y,G]=(0,t.useState)(!1),[q,H]=(0,t.useState)(!1),[J,K]=(0,t.useState)(!1),[V,Q]=(0,t.useState)(!1),[X,ee]=(0,t.useState)(!1),[se,ae]=(0,t.useState)(null),[te,le]=(0,t.useState)(!1),[re,ne]=(0,t.useState)({position:"center",size:"medium"}),[ie,oe]=(0,t.useState)(!1),de=(0,t.useRef)(null),[ce,ue]=(0,t.useState)(!1),[me,xe]=(0,t.useState)(null),[he,pe]=(0,t.useState)({enabled:!1,required:!1});(0,t.useEffect)(()=>{fe(),ge(),je(),ve()},[]);const fe=async()=>{try{const[e,s]=await Promise.all([i.A.get(`${n.nC}/subscription`),i.A.get(`${n.nC}/plans`)]);Z(e.data),B({totalPlans:s.data.length,aiPlans:s.data.filter(e=>e.ai_generated).length})}catch(e){console.error("Error fetching data:",e)}finally{U(!1)}},ge=async()=>{try{const e=await i.A.get(`${n.nC}/profile/logo`);e.data.has_logo&&(ae({data:e.data.logo_data,mime_type:e.data.mime_type}),e.data.settings&&ne(e.data.settings))}catch(e){console.error("Error fetching logo:",e)}},je=async()=>{try{const e=await i.A.get(`${n.nC}/data-export/summary`);xe(e.data)}catch(e){console.error("Error fetching data summary:",e)}},ve=async()=>{try{const e=await i.A.get(`${n.nC}/auth/2fa/status`);pe(e.data)}catch(e){console.error("Error fetching 2FA status:",e)}},be=async e=>{oe(!0);try{await i.A.put(`${n.nC}/profile/logo/settings`,e),ne(e),o.oR.success("Logo settings saved")}catch(s){o.oR.error("Failed to save logo settings")}finally{oe(!1)}},ye=e=>{let{label:s,used:a,limit:t}=e;const l=-1===t,r=l?100:Math.min(a/t*100,100),n=l?"\u221e":t;return(0,M.jsxs)("div",{className:"py-2",children:[(0,M.jsxs)("div",{className:"flex justify-between items-center mb-1 text-sm",children:[(0,M.jsx)("span",{className:"text-muted-foreground",children:s}),(0,M.jsxs)("span",{className:"font-semibold",children:[a," / ",n]})]}),(0,M.jsx)("div",{className:"h-2 w-full bg-muted rounded-full overflow-hidden",children:(0,M.jsx)("div",{className:"h-full transition-all duration-500 "+(r>=100&&!l?"bg-destructive":"bg-primary"),style:{width:`${l?5:r}%`}})})]})};return W?(0,M.jsx)(x.A,{children:(0,M.jsx)("div",{className:"flex items-center justify-center h-96",children:(0,M.jsx)("div",{className:"spinner w-12 h-12"})})}):(0,M.jsx)(x.A,{children:(0,M.jsxs)("div",{className:"max-w-3xl mx-auto","data-testid":"profile-page",children:[(0,M.jsx)(l.A,{}),(0,M.jsx)("h1",{className:"text-3xl font-bold text-foreground mb-8",children:"Profile Settings"}),(0,M.jsx)(c.Zp,{className:"border-border/50 mb-6","data-testid":"profile-card",children:(0,M.jsx)(c.Wu,{className:"p-8",children:(0,M.jsxs)("div",{className:"flex flex-col md:flex-row items-center md:items-start gap-6",children:[(0,M.jsxs)(u.eu,{className:"w-24 h-24 border-4 border-primary/20",children:[(0,M.jsx)(u.BK,{src:null===E||void 0===E?void 0:E.picture,alt:null===E||void 0===E?void 0:E.name}),(0,M.jsx)(u.q5,{className:"text-2xl bg-primary/10 text-primary",children:(null===E||void 0===E||null===(e=E.name)||void 0===e?void 0:e.charAt(0))||"U"})]}),(0,M.jsxs)("div",{className:"flex-1 text-center md:text-left",children:[(0,M.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center gap-2 mb-2",children:[(0,M.jsx)("h2",{className:"text-2xl font-bold text-foreground",children:null===E||void 0===E?void 0:E.name}),null!==E&&void 0!==E&&E.stripe_trial_ends_at&&new Date(E.stripe_trial_ends_at)>new Date?(0,M.jsxs)(m.E,{className:"bg-orange-400 text-white capitalize",children:[(0,M.jsx)(h.A,{className:"w-3 h-3 mr-1"}),"Trial"]}
2):(0,M.jsxs)(m.E,{className:`${(e=>{switch(e){case"schools":return"bg-accent text-accent-foreground";case"pro":return"bg-secondary text-secondary-foreground";default:return"bg-muted text-muted-foreground"}})(null===F||void 0===F?void 0:F.tier)} capitalize`,children:[(0,M.jsx)(h.A,{className:"w-3 h-3 mr-1"}),null===F||void 0===F?void 0:F.tier]})]}),(0,M.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 text-muted-foreground",children:[(0,M.jsxs)("div",{className:"flex items-center gap-2 justify-center md:justify-start",children:[(0,M.jsx)(p.A,{className:"w-4 h-4"}),(0,M.jsx)("span",{children:null===E||void 0===E?void 0:E.email})]}),(0,M.jsxs)("div",{className:"flex items-center gap-2 justify-center md:justify-start",children:[(0,M.jsx)(f.A,{className:"w-4 h-4"}),(0,M.jsxs)("span",{children:["Member since ",new Date(null===E||void 0===E?void 0:E.created_at).toLocaleDateString()]})]})]})]})]})})}),(0,M.jsxs)(c.Zp,{className:"border-border/50 mb-6","data-testid":"logo-upload-card",children:[(0,M.jsxs)(c.aR,{children:[(0,M.jsxs)(c.ZB,{className:"flex items-center gap-2",children:[(0,M.jsx)(g.A,{className:"w-5 h-5"}),"Custom Logo"]}),(0,M.jsx)(c.BT,{children:"Upload your school or organisation logo to appear on all exported lesson and unit plans."})]}),(0,M.jsx)(c.Wu,{children:(0,M.jsxs)("div",{className:"flex flex-col md:flex-row items-center gap-6",children:[(0,M.jsx)("div",{className:"w-40 h-24 border-2 border-dashed border-border rounded-lg flex items-center justify-center bg-muted/30 overflow-hidden",children:se?(0,M.jsx)("img",{src:`data:${se.mime_type};base64,${se.data}`,alt:"School Logo",className:"max-w-full max-h-full object-contain",loading:"lazy"}):(0,M.jsxs)("div",{className:"text-center text-muted-foreground",children:[(0,M.jsx)(g.A,{className:"w-8 h-8 mx-auto mb-1 opacity-50"}),(0,M.jsx)("span",{className:"text-xs",children:"No logo"})]})}),(0,M.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,M.jsx)("input",{ref:de,type:"file",accept:"image/png,image/jpeg,image/jpg,image/webp",onChange:async e=>{var s;const a=null===(s=e.target.files)||void 0===s?void 0:s[0];if(!a)return;if(!["image/png","image/jpeg","image/jpg","image/webp"].includes(a.type))return void o.oR.error("Please upload a PNG, JPEG, or WebP image");if(a.size>2097152)return void o.oR.error("File too large. Maximum size is 2MB");le(!0);const t=new FormData;t.append("file",a);try{await i.A.post(`${n.nC}/profile/logo`,t,{headers:{"Content-Type":"multipart/form-data"}}),o.oR.success("Logo uploaded successfully!"),ge()}catch(d){var l,r;o.oR.error((null===(l=d.response)||void 0===l||null===(r=l.data)||void 0===r?void 0:r.detail)||"Failed to upload logo")}finally{le(!1),de.current&&(de.current.value="")}},className:"hidden",id:"logo-upload","data-testid":"logo-upload-input"}),(0,M.jsxs)(d.$,{variant:"outline",onClick:()=>{var e;return null===(e=de.current)||void 0===e?void 0:e.click()},disabled:te,"data-testid":"upload-logo-btn",children:[te?(0,M.jsx)(j.A,{className:"w-4 h-4 mr-2 animate-spin"}):(0,M.jsx)(v.A,{className:"w-4 h-4 mr-2"}),se?"Change Logo":"Upload Logo"]}),se&&(0,M.jsxs)(d.$,{variant:"ghost",size:"sm",onClick:async()=>{le(!0);try{await i.A.delete(`${n.nC}/profile/logo`),ae(null),o.oR.success("Logo removed")}catch(e){o.oR.error("Failed to remove logo")}finally{le(!1)}},disabled:te,className:"text-destructive hover:text-destructive hover:bg-destructive/10","data-testid":"delete-logo-btn",children:[(0,M.jsx)(b.A,{className:"w-4 h-4 mr-2"}),"Remove Logo"]}),(0,M.jsx)("p",{className:"text-xs text-muted-foreground",children:"PNG, JPEG, or WebP. Max 2MB."})]}),se&&(0,M.jsxs)("div",{className:"flex flex-col gap-3 border-l border-border pl-6 ml-2",children:[(0,M.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Export Settings"}),(0,M.jsxs)("div",{className:"space-y-1",children:[(0,M.jsx)("label",{className:"text-xs text-muted-foreground",children:"Position"}),(0,M.jsx)("div",{className:"flex gap-1",children:["left","center","right"].map(e=>(0,M.jsx)(d.$,{variant:re.position===e?"default":"outline",size:"sm",onClick:()=>be({...re,position:e}),disabled:ie,className:"capitalize text-xs px-3",children:e},e))})]}),(0,M.jsxs)("div",{className:"space-y-1",children:[(0,M.jsx)("label",{className:"text-xs text-muted-foreground",children:"Size"}),(0,M.jsx)("div",{className:"flex gap-1",children:["small","medium","large"].map(e=>(0,M.jsx)(d.$,{variant:re.size===e?"default":"outline",size:"sm",onClick:()=>be({...re,size:e}),disabled:ie,className:"capitalize text-xs px-3",children:e},e))})]})]})]})})]}),(0,M.jsxs)(c.Zp,{className:"border-border/50 mb-6","data-testid":"usage-stats-card",children:[(0,M.jsx)(c.aR,{children:(0,M.jsx)(c.ZB,{children:"Monthly Usage"})}),(0,M.jsxs)(c.Wu,{className:"space-y-4",children:[(0,M.jsx)(ye,{label:"AI Lesson Plans",used:null===F||void 0===F?void 0:F.lesson_plans_used,limit:null===F||void 0===F?void 0:F.lesson_plans_limit}),(0,M.jsx)(ye,{label:"AI Unit Plans",used:null===F||void 0===F?void 0:F.unit_plans_used,limit:null===F||void 0===F?void 0:F.unit_plans_limit}),(0,M.jsx)(ye,{label:"AI Worksheets",used:null===F||void 0===F?void 0:F.worksheets_used,limit:null===F||void 0===F?void 0:F.worksheets_limit}),(0,M.jsx)(ye,{label:"Misc AI Generations (Chat/Regen)",used:null===F||void 0===F?void 0:F.ai_generations_used,limit:null===F||void 0===F?void 0:F.ai_generations_limit}),(0,M.jsx)(ye,{label:"Storage (MB)",used:null===F||void 0===F?void 0:F.storage_used_mb,limit:null===F||void 0===F?void 0:F.storage_limit_mb})]})]}),(0,M.jsxs)(c.Zp,{className:"border-border/50 mb-6","data-testid":"subscription-manage-card",children:[(0,M.jsx)(c.aR,{children:(0,M.jsx)(c.ZB,{children:"Subscription Management"})}),(0,M.jsxs)(c.Wu,{children:[(0,M.jsxs)("div",{className:"flex justify-between items-center py-3 border-b border-border mb-4",children:[(0,M.jsx)("span",{className:"text-muted-foreground",children:"Status"}),(0,M.jsx)(m.E,{variant:"cancelled"===(null===E||void 0===E?void 0:E.subscription_status)?"destructive":"outline",children:(null===E||void 0===E?void 0:E.subscription_status)||"active"})]}),(0,M.jsxs)("div",{className:"flex gap-3",children:["free"===(null!==(s=null===F||void 0===F?void 0:F.tier)&&void 0!==s?s:null===E||void 0===E?void 0:E.subscription_tier)&&(0,M.jsxs)("div",{className:"w-full flex flex-col gap-3",children:[(0,M.jsxs)(d.$,{onClick:()=>T("/subscription"),className:"flex-1 bg-primary text-primary-foreground hover:bg-primary/90 rounded-full","data-testid":"upgrade-plan-btn",children:[(0,M.jsx)(h.A,{className:"w-4 h-4 mr-2"}),"Upgrade Plan"]}),(0,M.jsx)("div",{className:"flex justify-end",children:(0,M.jsxs)($.lG,{open:X,onOpenChange:ee,children:[(0,M.jsx)($.zM,{asChild:!0,children:(0,M.jsxs)(d.$,{variant:"ghost",size:"sm",className:"text-destructive hover:bg-destructive/10","data-testid":"close-account-btn",children:[(0,M.jsx)(y.A,{className:"w-4 h-4 mr-2"}),"Close Account"]})}),(0,M.jsxs)($.Cf,{children:[(0,M.jsxs)($.c7,{children:[(0,M.jsx)($.L3,{children:"Close Your Account?"}),(0,M.jsxs)($.rr,{children:["Closing your account will permanently remove all your lessons, unit plans, and resources. Your email address will be retained to prevent re-registration on a free trial.",(0,M.jsx)("br",{}),(0,M.jsx)("br",{}),(0,M.jsx)("strong",{children:"This cannot be undone."})]})]}),(0,M.jsxs)($.Es,{children:[(0,M.jsx)(d.$,{variant:"outline",onClick:()=>ee(!1),children:"Keep Account"}),(0,M.jsxs)(d.$,{variant:"destructive",onClick:async()=>{Q(!0);try{await i.A.post(`${n.nC}
2/subscription/close`),o.oR.success("Your account has been closed."),ee(!1),await P(),T("/")}catch(e){o.oR.error("Failed to close account. Please try again.")}finally{Q(!1)}},disabled:V,"data-testid":"confirm-close-btn",children:[V?(0,M.jsx)(j.A,{className:"w-4 h-4 animate-spin mr-2"}):null,"Close My Account"]})]})]})]})})]}),"pro"===(null!==(a=null===F||void 0===F?void 0:F.tier)&&void 0!==a?a:null===E||void 0===E?void 0:E.subscription_tier)&&(0,M.jsxs)("div",{className:"w-full flex flex-col gap-3",children:[(0,M.jsxs)(d.$,{onClick:()=>T("/subscription"),className:"w-full bg-primary text-primary-foreground hover:bg-primary/90 rounded-full","data-testid":"manage-subscription-btn",children:[(0,M.jsx)(h.A,{className:"w-4 h-4 mr-2"}),"Manage Subscription"]}),(0,M.jsxs)(d.$,{onClick:async()=>{K(!0);try{const{data:e}=await i.A.post(`${n.nC}/payments/create-billing-portal-session`);window.location.href=e.url}catch(e){o.oR.error("Couldn't open billing history. Please contact support."),K(!1)}},variant:"outline",className:"w-full rounded-full",disabled:J,"data-testid":"billing-portal-btn",children:[J?(0,M.jsx)(j.A,{className:"w-4 h-4 animate-spin mr-2"}):(0,M.jsx)(N.A,{className:"w-4 h-4 mr-2"}),"Billing History & Receipts"]}),(0,M.jsxs)("div",{className:"flex justify-between items-center",children:[(0,M.jsx)("p",{className:"text-sm text-muted-foreground",children:"Cancel your Pro plan and close your account."}),(0,M.jsxs)($.lG,{open:Y,onOpenChange:G,children:[(0,M.jsx)($.zM,{asChild:!0,children:(0,M.jsxs)(d.$,{variant:"outline",className:"text-destructive hover:bg-destructive/10 border-destructive/20 shrink-0","data-testid":"cancel-subscription-btn",children:[(0,M.jsx)(y.A,{className:"w-4 h-4 mr-2"}),"Cancel Subscription"]})}),(0,M.jsxs)($.Cf,{children:[(0,M.jsxs)($.c7,{children:[(0,M.jsx)($.L3,{children:"Cancel Your Pro Subscription?"}),(0,M.jsxs)($.rr,{children:["Cancelling will immediately close your account and permanently remove all your lessons, unit plans, and resources. You will be signed out.",(0,M.jsx)("br",{}),(0,M.jsx)("br",{}),(0,M.jsx)("strong",{children:"This cannot be undone."})]})]}),(0,M.jsxs)($.Es,{children:[(0,M.jsx)(d.$,{variant:"outline",onClick:()=>G(!1),children:"Keep Subscription"}),(0,M.jsxs)(d.$,{variant:"destructive",onClick:async()=>{I(!0);try{await i.A.put(`${n.nC}/subscription`,{tier:"free"}),o.oR.success("Your subscription has been cancelled and your account has been closed."),G(!1),H(!0)}catch(e){o.oR.error("Failed to cancel subscription. Please try again.")}finally{I(!1)}},disabled:O,"data-testid":"confirm-cancel-btn",children:[O?(0,M.jsx)(j.A,{className:"w-4 h-4 animate-spin mr-2"}):null,"Cancel and Close Account"]})]})]})]}),(0,M.jsx)(L,{open:q,onDone:async()=>{H(!1),await P(),T("/")}})]})]}),"schools"===(null!==(R=null===F||void 0===F?void 0:F.tier)&&void 0!==R?R:null===E||void 0===E?void 0:E.subscription_tier)&&(0,M.jsx)("div",{className:"w-full",children:(0,M.jsxs)("p",{className:"text-sm text-muted-foreground",children:["To cancel your Schools subscription, please"," ",(0,M.jsx)("a",{href:"mailto:[email protected]?subject=Schools%20Subscription%20Cancellation",className:"text-primary underline underline-offset-2",children:"contact support"}),". Our team will assist you within one business day."]})})]})]})]}),(0,M.jsx)(c.Zp,{className:"border-border/50 mb-6","data-testid":"data-export-card",children:(0,M.jsx)(c.Wu,{className:"p-6",children:(0,M.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,M.jsxs)("div",{className:"flex-1",children:[(0,M.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,M.jsx)(w.A,{className:"w-5 h-5 text-primary"}),(0,M.jsx)("h3",{className:"font-semibold text-foreground",children:"Export Your Data"})]}),(0,M.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:"Download all your personal data including lesson plans, unit plans, slideshows, worksheets, and more."}),me&&(0,M.jsxs)("div",{className:"flex flex-wrap gap-2 text-xs",children:[me.lesson_plans>0&&(0,M.jsxs)(m.E,{variant:"outline",children:[me.lesson_plans," Lesson Plans"]}),me.unit_plans>0&&(0,M.jsxs)(m.E,{variant:"outline",children:[me.unit_plans," Unit Plans"]}),me.slideshows>0&&(0,M.jsxs)(m.E,{variant:"outline",children:[me.slideshows," Slideshows"]}),me.worksheets>0&&(0,M.jsxs)(m.E,{variant:"outline",children:[me.worksheets," Worksheets"]}),me.images>0&&(0,M.jsxs)(m.E,{variant:"outline",children:[me.images," Images"]}),0===me.total_items&&(0,M.jsx)("span",{className:"text-muted-foreground",children:"No data to export yet"})]})]}),(0,M.jsxs)(d.$,{variant:"outline",onClick:async()=>{ue(!0);try{const e=await i.A.get(`${n.nC}/data-export`,{responseType:"blob"}),s=window.URL.createObjectURL(new Blob([e.data])),a=document.createElement("a");a.href=s,a.setAttribute("download",`mycurriculummate_data_export_${(new Date).toISOString().split("T")[0]}.zip`),document.body.appendChild(a),a.click(),a.remove(),window.URL.revokeObjectURL(s),o.oR.success("Your data has been exported successfully!")}catch(e){o.oR.error("Failed to export data. Please try again.")}finally{ue(!1)}},disabled:ce||me&&0===me.total_items,className:"rounded-full","data-testid":"export-data-btn",children:[ce?(0,M.jsx)(j.A,{className:"w-4 h-4 mr-2 animate-spin"}):(0,M.jsx)(A.A,{className:"w-4 h-4 mr-2"}),ce?"Exporting...":"Download ZIP"]})]})})}),(0,M.jsx)(c.Zp,{className:"mb-6 border-border/50","data-testid":"security-2fa-card",children:(0,M.jsx)(c.Wu,{className:"p-6",children:(0,M.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,M.jsxs)("div",{className:"flex-1",children:[(0,M.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[he.enabled?(0,M.jsx)(C.A,{className:"w-5 h-5 text-emerald-600"}):(0,M.jsx)(k.A,{className:"w-5 h-5 text-muted-foreground"}),(0,M.jsx)("h3",{className:"font-semibold text-foreground",children:"Two-Factor Authentication"}),he.enabled?(0,M.jsx)(m.E,{className:"bg-emerald-100 text-emerald-700 border-emerald-200",children:"Enabled"}):(0,M.jsx)(m.E,{variant:"outline",className:"text-muted-foreground",children:"Not Enabled"})]}),(0,M.jsx)("p",{className:"text-sm text-muted-foreground",children:he.enabled?"Your account is protected with two-factor authentication.":"Add an extra layer of security to your account with 2FA."})]}),(0,M.jsxs)(d.$,{variant:he.enabled?"outline":"default",onClick:()=>T("/security/2fa"),className:he.enabled?"rounded-full":"rounded-full bg-primary","data-testid":"2fa-setup-btn",children:[he.enabled?"Manage 2FA":"Enable 2FA",(0,M.jsx)(_.A,{className:"w-4 h-4 ml-1"})]})]})})}),(0,M.jsx)(c.Zp,{className:"border-destructive/30","data-testid":"logout-card",children:(0,M.jsx)(c.Wu,{className:"p-6",children:(0,M.jsxs)("div",{className:"flex items-center justify-between",children:[(0,M.jsxs)("div",{children:[(0,M.jsx)("h3",{className:"font-semibold text-foreground",children:"Sign Out"}),(0,M.jsx)("p",{className:"text-sm text-muted-foreground",children:"Sign out of your My Curriculum Mate account"})]}),(0,M.jsxs)(d.$,{variant:"outline",onClick:async()=>{await P(),T("/")},className:"text-destructive border-destructive/30 hover:bg-destructive/10 rounded-full","data-testid":"logout-btn",children:[(0,M.jsx)(S.A,{className:"w-4 h-4 mr-2"}),"Sign Out"]})]})})})]})})}},76245(e,s,a){a.d(s,{A:()=>t});const t=(0,a(77784).A)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},72629(e,s,a){a.d(s,{A:()=>t});const t=(0,a(77784).A)("crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]])},33005(e,s,a){a.d(s,{A:()=>t});const t=(0,a(77784).A)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},7104(e,s,a){a.d(s,{A:()=>t});const t=(0,a(77784).A)("download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},22024(e,s,a){a.d(s,{A:()=>t});const t=(0,a(77784).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},35327(e,s,a){a.d(s,{A:()=>t});const t=(0,a(77784).A)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]])},42489(e,s,a){a.d(s,{A:()=>t});const t=(0,a(77784).A)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
2y:"oel41y"}]])},50797(e,s,a){a.d(s,{A:()=>t});const t=(0,a(77784).A)("upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]])}}]);
3//# sourceMappingURL=9888.107b0185.chunk.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.