PageSourceSearch

https://edia.app/static/js/index-Km6PO3P5.js

js edia.app collected 2026-09-24 11:49:59 UTC 8,533 bytes, 2 lines download raw bytes

1import{b as g,r as b,j as t,d as c,e3 as v,E as y,F as N,S as k,H as $,a9 as p}from"./index-D9ib8j_u.js";import{u as f}from"./index-Dl9uMAbC.js";import{P as h}from"./PublicNav-Bl0QneKr.js";import{g as S}from"./bluebonnet-Cv4uQ1yl.js";import{a as P}from"./apiHooks-DiwywtOq.js";import{d as j}from"./problems-Ms_HJndC.js";import{ProblemPreviewBody as C}from"./Preview-DUtdUYgx.js";import"./curriculum-_NDZww4O.js";import"./standards-D97JtNAe.js";import"./Markup-D0q3gtKs.js";import"./sortable.esm-DtnSo5Jb.js";import"./index-qoe7yWvp.js";import"./ProblemExplanation-7BPBsY8U.js";import"./ai-DvseSiLQ.js";async function B(s){const w=s.map(i=>{const[o,n,l,r]=i.split(":");return r!==void 0?null:{subject:o,topic:n,lesson:l}}).filter(i=>!!i),a=s.map(i=>{const[o,n,l,r]=i.split(":");return r===void 0?null:{subject:o,topic:n,lesson:l,index:r}}).filter(i=>!!i);return w.length===0&&a.length===0?[]:j(w,a)}function E({subjects:s,problem:w}){const{isMobile:a}=g(),i=w.id,o=v(s,i),[n,l]=b.useState(w);if(!o)return null;async function r(){const x=await j([],[{...i,seed:void 0}]);l(x[0])}return t.jsxs("div",{className:c("tw:flex tw:items-start",a?"tw:flex-col-reverse tw:gap-12":"tw:gap-32"),children:[t.jsx(C,{problem:n,preview:!1}),t.jsxs("div",{className:c("tw:shrink-0",a?"tw:max-w-full":"tw:max-w-[220px]"),children:[t.jsx("div",{className:"tw:text-sm tw:font-semibold",children:o.name}),t.jsxs("button",{className:"bwrap tw:flex tw:items-center tw:gap-6 tw:mt-6 tw:text-grey-45 tw:cursor-pointer tw:text-sm",onClick:r,children:[t.jsx("img",{src:"/refreshIconGrey16.svg",alt:"refresh"})," Generate new example"]})]})]})}function M({standard:s,subjects:w}){const{isMobile:a}=g(),[i,o]=b.useState(!1),{data:n}=f(i?["bbStandardProblems",s.id]:null,()=>B(s.contentArray)),l=s.contentArray.length>0;return t.jsxs("div",{className:c("tw:border tw:border-grey-90 tw:rounded-lg tw:bg-surface-card",a?"tw:p-16":"tw:px-24 tw:py-20"),children:[t.jsxs("div",{className:c("tw:flex tw:gap-16 tw:mb-8",a?"tw:flex-col tw:items-stretch":"tw:justify-between tw:items-start"),children:[t.jsxs("div",{children:[t.jsx("div",{className:"tw:text-lg tw:font-bold tw:text-black",children:s.id}),s.title&&t.jsx("div",{className:"tw:text-sm tw:text-grey-45 tw:mt-2",children:s.title})]}),t.jsx("button",{className:c("bwrap tw:shrink-0 tw:px-14 tw:py-8 tw:rounded-md tw:border tw:bg-surface-card tw:text-sm tw:font-medium tw:cursor-pointer",l?"tw:border-grey-85 tw:text-black hover:tw:border-blue-600 hover:tw:text-blue-600":"tw:border-grey-85 tw:text-grey-60 tw:cursor-not-allowed"),onClick:()=>o(r=>!r),disabled:!l,title:l?"":"No aligned content yet",children:l?i?"Hide problems":`Show ${s.contentArray.length} aligned problem${s.contentArray.length===1?"":"s"}`:"No aligned problems"})]}),s.desc?t.jsx("p",{className:"tw:text-reg tw:text-grey-25 tw:m-0",children:s.desc}):t.jsx("p",{className:"tw:text-reg tw:text-grey-60 tw:italic tw:m-0",children:"Standard description not yet available."}),i&&l&&t.jsx("div",{className:"tw:mt-20 tw:pt-20 tw:border-t tw:border-grey-95 tw:flex tw:flex-col tw:gap-24",children:n?n.map(r=>t.jsx(E,{problem:r,subjects:w},JSON.stringify(r.id))):t.jsx("div",{className:"tw:text-reg tw:text-grey-45",children:"Loading problems…"})})]})}function D(){const{isMobile:s}=g(),w=y(),a=N(),i=P(),{data:o}=f(["getBluebonnetCurriculum"],S),n=b.useMemo(()=>{if(!o)return null;const e=o.grades.find(d=>d.id===a.grade)??o.grades[0];if(!e)return null;const m=e.modules.find(d=>d.id===a.module)??e.modules[0];if(!m)return{grade:e,module:null,topic:null};const u=m.topics.find(d=>d.id===a.topic)??m.topics[0];return{grade:e,module:m,topic:u}},[o,a.grade,a.module,a.topic]);if(b.useEffect(()=>{if(!n||!n.module||!n.topic)return;const e=`/bluebonnet/math/${n.grade.id}/${n.module.id}/${n.topic.id}`,m=`/bluebonnet/math/${a.grade??""}/${a.module??""}/${a.topic??""}`;e!==m&&w(e,{replace:!0})},[n,a.grade,a.module,a.topic,w]),!o||!i||!n||!n.topic)return t.jsxs("div",{className:"tw:flex tw:flex-col tw:min-h-screen tw:bg-surface-card",children:[t.jsx(h,{}),t.jsx(k,{})]});const{grade:l,module:r,topic:x}=n;return t.jsxs("div",{className:"tw:flex tw:flex-col tw:min-h-screen tw:bg-surface-card",children:[t.jsxs($,{children:[t.jsx("title",{children:`Edia | Bluebonnet ${l.name}`}),t.jsx("meta",{name:"description",content:`Edia content aligned to the Texas Bluebonnet Learning math curriculum: ${l.name}, ${(r==null?void 0:r.name)??""}.`})]}),t.jsx(h,{}),t.jsxs("div",{className:c("tw:border-b tw:border-grey-90 tw:bg-gradient-to-b tw:from-blue-100 tw:to-surface-card",s?"tw:px-20 tw:pt-32 tw:pb-16":"tw:px-64 tw:pt-56 tw:pb-24"),children:[t.jsx("div",{className:"tw:text-sm tw:font-semibold tw:tracking-widest tw:uppercase tw:text-blue-600 tw:mb-8",children:"Texas Bluebonnet Learning"}),t.jsx("h1",{className:c("tw:font-bold tw:m-0 tw:mb-12",s?"tw:text-h3":"tw:text-h2"),children:"Math Curriculum Alignment"}),t.jsx("p",{className:"tw:text-reg tw:text-grey-30 tw:max-w-[680px] tw:m-0 tw:mb-28",children:"Browse Edia content aligned to the Texas Bluebonnet Learning math curriculum by grade, module, and topic."}),t.jsx("div",{className:"tw:flex tw:flex-wrap tw:gap-8",role:"tablist",children:o.grades.map(e=>t.jsx(p,{to:`/bluebonnet/math/${e.id}`,className:c("tw:px-16 tw:py-8 tw:rounded-full tw:border tw:text-reg tw:font-medium tw:no-underline tw:transition-colors",e.id===l.id?"tw:bg-black tw:border-black tw:text-white":"tw:bg-surface-card tw:border-grey-85 tw:text-black hover:tw:border-blue-600 hover:tw:text-blue-600"),children:e.name},e.id))})]}),t.jsxs("div",{className:c("tw:flex-1 tw:flex tw:items-stretch",s?"tw:flex-col":"tw:flex-row"),children:[!s&&r&&t.jsx("aside",{className:"tw:w-[320px] tw:shrink-0 tw:border-r tw:border-grey-90 tw:px-16 tw:py-24 tw:max-h-[calc(100vh-64px)] tw:sticky tw:top-64 tw:overflow-y-auto",children:l.modules.map(e=>{var u;const m=e.id===r.id;return t.jsxs("div",{className:"tw:mb-6",children:[t.jsx(p,{to:`/bluebonnet/math/${l.id}/${e.id}/${((u=e.topics[0])==null?void 0:u.id)??""}`,className:c("tw:block tw:px-12 tw:py-10 tw:rounded-md tw:no-underline tw:text-reg",m?"tw:bg-grey-95 tw:text-black tw:font-semibold":"tw:text-grey-25 tw:font-medium hover:tw:bg-grey-95"),children:e.name}),m&&t.jsx("div",{className:"tw:mx-8 tw:mt-4 tw:mb-12 tw:pl-12 tw:border-l-2 tw:border-grey-90 tw:flex tw:flex-col tw:gap-2",children:e.topics.map(d=>t.jsx(p,{to:`/bluebonnet/math/${l.id}/${e.id}/${d.id}`,className:c("tw:px-10 tw:py-6 tw:rounded-sm tw:text-sm tw:no-underline",d.id===x.id?"tw:bg-blue-100 tw:text-blue-600 tw:font-semibold":"tw:text-grey-30 hover:tw:bg-grey-96 hover:tw:text-black"),children:d.name},d.id))})]},e.id)})}
1),t.jsxs("main",{className:c("tw:flex-1 tw:max-w-[960px]",s?"tw:p-20":"tw:px-64 tw:pt-32 tw:pb-64"),children:[s&&r&&t.jsxs("div",{className:"tw:flex tw:flex-col tw:gap-12 tw:mb-24",children:[t.jsxs("label",{className:"tw:flex tw:flex-col tw:gap-4 tw:text-sm tw:font-semibold tw:uppercase tw:tracking-widest tw:text-grey-30",children:[t.jsx("span",{children:"Module"}),t.jsx("select",{value:r.id,onChange:e=>w(`/bluebonnet/math/${l.id}/${e.target.value}`),className:"tw:px-12 tw:py-10 tw:rounded-md tw:border tw:border-grey-85 tw:text-reg tw:font-normal tw:normal-case tw:tracking-normal tw:text-black tw:bg-surface-card",children:l.modules.map(e=>t.jsx("option",{value:e.id,children:e.name},e.id))})]}),t.jsxs("label",{className:"tw:flex tw:flex-col tw:gap-4 tw:text-sm tw:font-semibold tw:uppercase tw:tracking-widest tw:text-grey-30",children:[t.jsx("span",{children:"Topic"}),t.jsx("select",{value:x.id,onChange:e=>w(`/bluebonnet/math/${l.id}/${r.id}/${e.target.value}`),className:"tw:px-12 tw:py-10 tw:rounded-md tw:border tw:border-grey-85 tw:text-reg tw:font-normal tw:normal-case tw:tracking-normal tw:text-black tw:bg-surface-card",children:r.topics.map(e=>t.jsx("option",{value:e.id,children:e.name},e.id))})]})]}),t.jsxs("div",{className:"tw:mb-28",children:[t.jsxs("div",{className:"tw:text-sm tw:text-grey-45 tw:mb-8",children:[l.name,t.jsx("span",{className:"tw:mx-6 tw:text-grey-60",children:"›"}),(r==null?void 0:r.name)??""]}),t.jsx("h2",{className:"tw:text-h3 tw:font-bold tw:m-0 tw:mb-8",children:x.name}),t.jsxs("div",{className:"tw:text-sm tw:text-grey-45",children:[x.standardIds.length," TEKS standard",x.standardIds.length===1?"":"s"," aligned"]})]}),t.jsx("div",{className:"tw:flex tw:flex-col tw:gap-16",children:x.standardIds.map(e=>t.jsx(M,{standard:o.standards[e],subjects:i},e))})]})]})]})}export{D as default};
2//# sourceMappingURL=index-Km6PO3P5.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.