@mavea/mavea 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/.vite/manifest.json +298 -298
  3. package/dist/assets/{AnnotationLayer-qV6CIUZv.js → AnnotationLayer-8JABh1Dm.js} +0 -0
  4. package/dist/assets/{AppCommandPalette-BHaYBZ5e.js → AppCommandPalette-CgDUWU08.js} +1 -1
  5. package/dist/assets/{CheckLogRail-DkHIHL0E.js → CheckLogRail-DO7sbZwC.js} +1 -1
  6. package/dist/assets/{ConversationVideoStudio-C1sd4k53.js → ConversationVideoStudio-tpqQQnOs.js} +1 -1
  7. package/dist/assets/{CourseLessonReader-YCcNKEW7.js → CourseLessonReader-PFJn-4tj.js} +2 -2
  8. package/dist/assets/{CoursesApp-Dz6xjf4V.js → CoursesApp-5pnHYJR8.js} +1 -1
  9. package/dist/assets/{DashPresent-5SRScC2i.js → DashPresent-B6MP1i_4.js} +1 -1
  10. package/dist/assets/{DashboardDetail-DOfm8UCQ.js → DashboardDetail-DYFghZ4p.js} +1 -1
  11. package/dist/assets/{DashboardLoopGate-Cf0y_HQ7.js → DashboardLoopGate-C0blM1w9.js} +2 -2
  12. package/dist/assets/DashboardLoopRuntime-C9R-z9-o.js +1 -0
  13. package/dist/assets/{DashboardsApp-_gbfdbX6.js → DashboardsApp-Dh_jh1dF.js} +2 -2
  14. package/dist/assets/{DeepZoomApp-BOLEl-kQ.js → DeepZoomApp-UEPtylG7.js} +1 -1
  15. package/dist/assets/{DelegatePanel-CHEB-OZl.js → DelegatePanel-DKWsRY9I.js} +1 -1
  16. package/dist/assets/{DemoGallery-DBqnu8TR.js → DemoGallery-CkuqAXje.js} +1 -1
  17. package/dist/assets/{DropSelect-DjbdVfIR.js → DropSelect-QcBm3N4D.js} +1 -1
  18. package/dist/assets/{ExportModal-CLobMv1F.js → ExportModal-Ya0VBbxa.js} +1 -1
  19. package/dist/assets/{ExtractionPreview-QZ2VHmsb.js → ExtractionPreview-BFrmqKDo.js} +1 -1
  20. package/dist/assets/{FeatureUseNotice-Dc8joBGM.js → FeatureUseNotice-Dc3GNBvy.js} +1 -1
  21. package/dist/assets/{FlagshipCommandPalette-DnWuBjYI.js → FlagshipCommandPalette-B1yHwI6V.js} +1 -1
  22. package/dist/assets/{FlagshipShowcase-3qQDOK6g.js → FlagshipShowcase-BHAlRDAE.js} +1 -1
  23. package/dist/assets/{FlashcardsApp-BQGM-Tr1.js → FlashcardsApp-DteNeHpz.js} +1 -1
  24. package/dist/assets/{GalleryApp-BWQ-J450.js → GalleryApp-DziLKFJZ.js} +1 -1
  25. package/dist/assets/{HonestByDesign-57LDf-gm.js → HonestByDesign-DZltb3Ss.js} +1 -1
  26. package/dist/assets/{HowItWorks-DMfPX3GK.js → HowItWorks-D-hgfN6a.js} +1 -1
  27. package/dist/assets/{LegalApp-CcO5Qq6R.js → LegalApp-ChzcKiY0.js} +1 -1
  28. package/dist/assets/{LegalMarkdownDocument-Be_fQbZ_.js → LegalMarkdownDocument-j6UHhPnp.js} +1 -1
  29. package/dist/assets/{LegalPageShell-B-HY1WG7.js → LegalPageShell-Wcsviye1.js} +1 -1
  30. package/dist/assets/{LibraryOverlay-BilW6q_z.js → LibraryOverlay-YHBrdVKo.js} +1 -1
  31. package/dist/assets/{LiveApp-DH3OxJFV.js → LiveApp-D6vkyhZb.js} +3 -3
  32. package/dist/assets/{LiveSettings-CuVMy7rZ.js → LiveSettings-C9cKOrSb.js} +1 -1
  33. package/dist/assets/{PinToDashboard-Cz5UJCmq.js → PinToDashboard-BCiWaSg8.js} +1 -1
  34. package/dist/assets/{PlanReview-CmUxzNqL.js → PlanReview-BIERfK1t.js} +1 -1
  35. package/dist/assets/{PresentationDeck-B_EI33Pp.js → PresentationDeck-BW_7qecK.js} +1 -1
  36. package/dist/assets/{PrismApp-DtLsPiQF.js → PrismApp-BY71jJvW.js} +2 -2
  37. package/dist/assets/{PrismBriefingPlayer-DzdtnFj4.js → PrismBriefingPlayer-DLAPs6eZ.js} +2 -2
  38. package/dist/assets/{PrismOverlay-D1cDZamt.js → PrismOverlay-DJDGPGxo.js} +3 -3
  39. package/dist/assets/{PrismWorkbench-BEIp4MiL.js → PrismWorkbench-DHLvpguj.js} +1 -1
  40. package/dist/assets/{PrivacyApp-B4DT2RUz.js → PrivacyApp-uMjq2z14.js} +1 -1
  41. package/dist/assets/{ReplayCard-Dx46HCBT.js → ReplayCard-F7U3LYAg.js} +2 -2
  42. package/dist/assets/{ReplayOverlay-CnJAxf0u.js → ReplayOverlay-BTldvkU7.js} +1 -1
  43. package/dist/assets/{RippleApp-D5j2VCt2.js → RippleApp-DZw8op-E.js} +2 -2
  44. package/dist/assets/{RippleOverlay-zcXAHPuJ.js → RippleOverlay-D7ItTvS-.js} +2 -2
  45. package/dist/assets/{SeeDontRead-Dqfzha0V.js → SeeDontRead-DmmtWAzn.js} +1 -1
  46. package/dist/assets/{ShareModal-DWxlrJSz.js → ShareModal-9jSn52Mw.js} +2 -2
  47. package/dist/assets/{ShipCourse-BavQppkt.js → ShipCourse-Up9gRR07.js} +1 -1
  48. package/dist/assets/{SignatureLoop-L8W2h62w.js → SignatureLoop-Cq790dMw.js} +1 -1
  49. package/dist/assets/{SynthesisApp-C2O6pFeM.js → SynthesisApp-4ZPLZgmJ.js} +2 -2
  50. package/dist/assets/{SynthesisOverlay-DLvwiSMv.js → SynthesisOverlay-iesJ0hEt.js} +1 -1
  51. package/dist/assets/{TermsApp-CxY1yorm.js → TermsApp-DL2hFKsv.js} +1 -1
  52. package/dist/assets/{TopicCanvas-LMI0zC7R.js → TopicCanvas-DozfZFto.js} +2 -2
  53. package/dist/assets/{TourPrism-CI-iJZil.js → TourPrism-kInUOv-M.js} +1 -1
  54. package/dist/assets/{TrackerTile-oz6IoG8m.js → TrackerTile-BryDo0sm.js} +2 -2
  55. package/dist/assets/{TwoSurfaces-Rnf-_WgY.js → TwoSurfaces-Cmj95ofx.js} +1 -1
  56. package/dist/assets/{WorldOverlay-BaQNNClA.js → WorldOverlay-yhxq328s.js} +1 -1
  57. package/dist/assets/{WowFeatures-C4efSbNV.js → WowFeatures-DDICbxl_.js} +1 -1
  58. package/dist/assets/{ZoomDeck-CBrr0yfy.js → ZoomDeck-CKOjYS9z.js} +1 -1
  59. package/dist/assets/canvas-vqIFVmtP.js +1 -0
  60. package/dist/assets/{capture-D8uPIcfj.js → capture-9OrAc1p2.js} +1 -1
  61. package/dist/assets/{confirmAdd-DzMO9jKV.js → confirmAdd-DkmbWaSk.js} +1 -1
  62. package/dist/assets/{dashboardEvents-DKl5rrTD.js → dashboardEvents-D-XVj666.js} +1 -1
  63. package/dist/assets/{generateBeats-DZHkvFvh.js → generateBeats-DtptFLlG.js} +1 -1
  64. package/dist/assets/{index-DmKgC_TJ.css → index-DrzNHwlO.css} +1 -1
  65. package/dist/assets/{index-Dk0QapqQ.js → index-zIa6h_8b.js} +3 -3
  66. package/dist/assets/{kokoro-P_fkcX-A.js → kokoro-B3oG_8sd.js} +1 -1
  67. package/dist/assets/{loader-DKJEcbPm.js → loader-DCA6Njbf.js} +2 -2
  68. package/dist/assets/{notes-B0-EE0FK.js → notes-B6eX5XWk.js} +1 -1
  69. package/dist/assets/{perfProbe-B9zJpjo9.js → perfProbe-CE7hsUEo.js} +1 -1
  70. package/dist/assets/{pin-CZAIlpXt.js → pin-BZuh1acO.js} +1 -1
  71. package/dist/assets/{portal-Dogggsub.js → portal-k_BMgWND.js} +1 -1
  72. package/dist/assets/{prewarm-B4ELBOxf.js → prewarm-uKxmzjjd.js} +1 -1
  73. package/dist/assets/{quietHours-CeBje_uU.js → quietHours-DI1ayIIq.js} +1 -1
  74. package/dist/assets/{registry-GeAC3ZD7.js → registry-1wlTAh5b.js} +1 -1
  75. package/dist/assets/{registry-CqhpLHM7.js → registry-B2QzCuWH.js} +1 -1
  76. package/dist/assets/{registry-CD1s3eQ-.js → registry-DtV2UjBx.js} +1 -1
  77. package/dist/assets/{registry-6MOD-I7p.js → registry-Dwbh-GWu.js} +1 -1
  78. package/dist/assets/{relate-BYdM5eiV.js → relate-UW-sUlJH.js} +1 -1
  79. package/dist/assets/{replay-TYXO0Brm.js → replay-B5TkHPri.js} +1 -1
  80. package/dist/assets/{useDashboardLoop-DDqCFJKY.js → useDashboardLoop-BoVNM-pT.js} +1 -1
  81. package/dist/assets/{useStudy-GwNcQWtv.js → useStudy-5CsF_L-s.js} +1 -1
  82. package/dist/assets/{walkSync-CPsd-xu7.js → walkSync-CT8kmbzY.js} +1 -1
  83. package/dist/index.html +2 -2
  84. package/package.json +1 -1
  85. package/dist/assets/DashboardLoopRuntime-CnN5VayH.js +0 -1
  86. package/dist/assets/canvas-Bsx3eSaS.js +0 -1
@@ -1 +1 @@
1
- import{t as e}from"./react-BZJXY1be.js";import{t}from"./compiler-runtime-qQQXpJgv.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{t as r}from"./DropSelect-DjbdVfIR.js";import{n as i}from"./store-D2IJF4SA.js";import{n as a}from"./parseDiff-D8uBQ9mQ.js";import{n as o,t as s}from"./courseStore-DfafnL-9.js";import{t as c}from"./links--u_phi0x.js";var l=e(),u=t(),d=`mavea.ripple.course.v2`,f=`mavea.ripple.course.v1`;function p(){try{let e=localStorage.getItem(f);if(!e)return{};let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return{};let n={};for(let[e,r]of Object.entries(t))Array.isArray(r)&&(n[e]={lessons:r.filter(e=>typeof e==`number`)});return Object.keys(n).length>0&&h(n),n}catch{return{}}}function m(){try{let e=localStorage.getItem(d);if(e===null)return p();let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:{}}catch{return{}}}function h(e){try{localStorage.setItem(d,JSON.stringify(e))}catch{}}function g(e){return new Set(m()[e]?.lessons??[])}function _(e,t,n){let r=m(),i=new Set(r[e]?.lessons??[]);return n?i.add(t):i.delete(t),r[e]={...r[e],lessons:[...i].sort((e,t)=>e-t)},h(r),i}function v(e){return m()[e]?.quiz}function y(e,t,n){let r=m();r[e]={lessons:r[e]?.lessons??[],quiz:{correct:t,total:n,passedAt:Date.now()}},h(r)}function b(e,t){return t>0&&e>=t-1}function x(e){return!!(!(e.lessonsTotal>0&&e.lessonsDone>=e.lessonsTotal)||e.hasQuiz&&!e.quizPassed)}var S=n();function C(e){let t=(0,u.c)(86),{course:n,lesson:r,altitude:i,fileUrl:a,loadLessonDetail:o,speak:s,onAskAboutLesson:c}=e,[d,f]=(0,l.useState)(r.detail??null),[p,m]=(0,l.useState)(`idle`),[h,g]=(0,l.useState)(null),_=(0,l.useRef)(!1),v=(0,l.useRef)(!0),y=(0,l.useRef)(null),b=(0,l.useRef)(0),x,C;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x=()=>()=>{v.current=!1,y.current!==null&&clearTimeout(y.current)},C=[],t[0]=x,t[1]=C):(x=t[0],C=t[1]),(0,l.useEffect)(x,C);let k;t[2]!==i||t[3]!==n||t[4]!==r||t[5]!==o?(k=e=>{if(!o)return;y.current!==null&&clearTimeout(y.current);let t=b.current+=1;m(`loading`),f(null);let a=s=>{o(n,r,e,i).then(e=>{!v.current||t!==b.current||(e?(f(e),m(`idle`)):s>0?y.current=setTimeout(()=>a(s-1),2e3):m(`error`))})};a(1)},t[2]=i,t[3]=n,t[4]=r,t[5]=o,t[6]=k):k=t[6];let A=k,j;t[7]!==r.detail||t[8]!==o||t[9]!==A?(j=()=>{if(r.detail){f(r.detail);return}!o||_.current||(_.current=!0,A(!1))},t[7]=r.detail,t[8]=o,t[9]=A,t[10]=j):j=t[10];let M;t[11]!==r||t[12]!==o||t[13]!==A?(M=[r,o,A],t[11]=r,t[12]=o,t[13]=A,t[14]=M):M=t[14],(0,l.useEffect)(j,M);let N;t[15]===d?.walkthrough?N=t[16]:(N=d?.walkthrough??[],t[15]=d?.walkthrough,t[16]=N);let P=N,F,I;t[17]!==s||t[18]!==h||t[19]!==P?(F=()=>{if(h===null||!s)return;let e=P[h];e&&s(`${e.focus?e.focus+`. `:``}${e.explain}`)},I=[h,P,s],t[17]=s,t[18]=h,t[19]=P,t[20]=F,t[21]=I):(F=t[20],I=t[21]),(0,l.useEffect)(F,I);let L=r.goal,R=r.explainFor?.[i]??r.goal,z;t[22]!==n||t[23]!==L||t[24]!==r.title||t[25]!==c?(z=c&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-lesson-ask`,onClick:()=>c(`In "${n.title}" — ${r.title}: ${L||`what should I understand here?`}`),children:`Ask about this lesson`}),t[22]=n,t[23]=L,t[24]=r.title,t[25]=c,t[26]=z):z=t[26];let B=z;if(d){let e,n,r;if(t[27]!==B||t[28]!==d.overview||t[29]!==L){let i=d.overview.split(/\n\n+/).filter(te);t[33]===L?e=t[34]:(e=L&&(0,S.jsx)(`p`,{className:`ripple-course-lede`,children:L}),t[33]=L,t[34]=e),n=B,r=i.length>0&&(0,S.jsx)(`div`,{className:`ripple-lesson-overview`,children:i.map(ee)}),t[27]=B,t[28]=d.overview,t[29]=L,t[30]=e,t[31]=n,t[32]=r}else e=t[30],n=t[31],r=t[32];let i;t[35]!==a||t[36]!==h||t[37]!==P?(i=P.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsxs)(`div`,{className:`ripple-lesson-spot-head`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Spotlight — walk the real code`}),(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>g(0),"aria-label":`Step through the code one part at a time`,children:[`▶ Step through (`,P.length,`)`]})]}),h===null?(0,S.jsx)(`ol`,{className:`ripple-walk`,children:P.map((e,t)=>(0,S.jsxs)(`li`,{className:`ripple-walk-step`,children:[(0,S.jsxs)(`div`,{className:`ripple-walk-where`,children:[(0,S.jsx)(`span`,{className:`ripple-walk-num`,"aria-hidden":`true`,children:t+1}),(0,S.jsx)(O,{file:e.file,focus:e.focus,url:a(e.file)})]}),e.code&&(0,S.jsx)(`pre`,{className:`ripple-walk-code`,children:(0,S.jsx)(`code`,{children:e.code})}),(0,S.jsx)(`p`,{className:`ripple-walk-explain`,children:e.explain})]},t))}):(0,S.jsx)(ne,{steps:P,index:h,fileUrl:a,onPrev:()=>g(D),onNext:()=>g(e=>e===null?null:Math.min(P.length-1,e+1)),onClose:()=>g(null)})]}),t[35]=a,t[36]=h,t[37]=P,t[38]=i):i=t[38];let s;t[39]===d.concepts?s=t[40]:(s=d.concepts.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Key concepts`}),(0,S.jsx)(`dl`,{className:`ripple-lesson-concepts`,children:d.concepts.map(E)})]}),t[39]=d.concepts,t[40]=s);let c;t[41]===d.pitfalls?c=t[42]:(c=d.pitfalls&&d.pitfalls.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-caution`,role:`note`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Watch out for`}),(0,S.jsx)(`ul`,{className:`ripple-lesson-pitfalls`,children:d.pitfalls.map(T)})]}),t[41]=d.pitfalls,t[42]=c);let l;t[43]===d.exercise?l=t[44]:(l=d.exercise&&(0,S.jsxs)(`section`,{className:`ripple-course-group ripple-lesson-exercise`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Try it`}),(0,S.jsx)(`p`,{className:`ripple-lesson-task`,children:d.exercise.task}),d.exercise.hint&&(0,S.jsxs)(`p`,{className:`ripple-lesson-hint`,children:[`Hint — `,d.exercise.hint]}),d.exercise.check&&(0,S.jsxs)(`p`,{className:`ripple-lesson-check`,children:[`How you’ll know it worked — `,d.exercise.check]})]}),t[43]=d.exercise,t[44]=l);let u;t[45]!==o||t[46]!==A?(u=o&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-lesson-regen`,onClick:()=>A(!0),title:`Rewrite this lesson from the latest code`,children:`↻ Rewrite this lesson`}),t[45]=o,t[46]=A,t[47]=u):u=t[47];let f;return t[48]!==e||t[49]!==n||t[50]!==r||t[51]!==i||t[52]!==s||t[53]!==c||t[54]!==l||t[55]!==u?(f=(0,S.jsxs)(S.Fragment,{children:[e,n,r,i,s,c,l,u]}),t[48]=e,t[49]=n,t[50]=r,t[51]=i,t[52]=s,t[53]=c,t[54]=l,t[55]=u,t[56]=f):f=t[56],f}if(p===`loading`){let e,n;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,S.jsx)(`span`,{className:`ripple-sharpening-dot`,"aria-hidden":`true`}),n=(0,S.jsx)(`div`,{className:`ripple-course-skeleton-title`,children:`Writing this lesson from the real code…`}),t[57]=e,t[58]=n):(e=t[57],n=t[58]);let i;t[59]===r.read?i=t[60]:(i=r.read.slice(0,3).join(`, `)||`the relevant files`,t[59]=r.read,t[60]=i);let a;return t[61]===i?a=t[62]:(a=(0,S.jsxs)(`div`,{className:`ripple-course-skeleton`,role:`status`,"aria-live":`polite`,children:[e,n,(0,S.jsxs)(`div`,{className:`ripple-course-skeleton-sub`,children:[`Reading `,i,` to teach it properly — with a walk through the actual code.`]})]}),t[61]=i,t[62]=a),a}if(p===`error`){let e;t[63]===L?e=t[64]:(e=L&&(0,S.jsx)(`p`,{className:`ripple-course-lede`,children:L}),t[63]=L,t[64]=e);let n;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,S.jsx)(`p`,{children:`Couldn’t write this lesson from the code just now.`}),t[65]=n):n=t[65];let r;t[66]===A?r=t[67]:(r=(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>A(!0),children:`Try again`}),t[66]=A,t[67]=r);let i;return t[68]!==e||t[69]!==r?(i=(0,S.jsxs)(`div`,{className:`ripple-course-empty`,children:[e,n,r]}),t[68]=e,t[69]=r,t[70]=i):i=t[70],i}let re;t[71]===R?re=t[72]:(re=(0,S.jsx)(`p`,{className:`ripple-course-explain`,children:R}),t[71]=R,t[72]=re);let ie;t[73]!==a||t[74]!==r.read?(ie=r.read.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Open and read`}),(0,S.jsx)(`div`,{className:`ripple-course-files`,children:r.read.map(e=>(0,S.jsx)(O,{file:e,url:a(e)},e))})]}),t[73]=a,t[74]=r.read,t[75]=ie):ie=t[75];let ae;t[76]===r.concepts?ae=t[77]:(ae=r.concepts.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Key concepts`}),(0,S.jsx)(`ul`,{className:`ripple-course-concepts`,children:r.concepts.map(w)})]}),t[76]=r.concepts,t[77]=ae);let V;t[78]===r.caution?V=t[79]:(V=r.caution&&(0,S.jsxs)(`section`,{className:`ripple-course-caution`,role:`note`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Be careful here — and why`}),(0,S.jsx)(`p`,{className:`ripple-course-caution-text`,children:r.caution})]}),t[78]=r.caution,t[79]=V);let oe;return t[80]!==B||t[81]!==re||t[82]!==ie||t[83]!==ae||t[84]!==V?(oe=(0,S.jsxs)(S.Fragment,{children:[re,B,ie,ae,V]}),t[80]=B,t[81]=re,t[82]=ie,t[83]=ae,t[84]=V,t[85]=oe):oe=t[85],oe}function w(e,t){return(0,S.jsx)(`li`,{children:e},t)}function T(e,t){return(0,S.jsx)(`li`,{children:e},t)}function E(e,t){return(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:e.term}),(0,S.jsx)(`dd`,{children:e.explain})]},t)}function D(e){return e===null?null:Math.max(0,e-1)}function ee(e,t){return(0,S.jsx)(`p`,{children:e},t)}function te(e){return e.trim().length>0}function O(e){let t=(0,u.c)(3),{file:n,focus:r,url:i}=e,a=r?`${n} · ${r}`:n,o;return t[0]!==a||t[1]!==i?(o=i?(0,S.jsxs)(`a`,{className:`ripple-course-file ripple-course-file-link`,href:i,target:`_blank`,rel:`noreferrer noopener`,children:[a,` ↗`]}):(0,S.jsx)(`code`,{className:`ripple-course-file`,children:a}),t[0]=a,t[1]=i,t[2]=o):o=t[2],o}function ne(e){let t=(0,u.c)(36),{steps:n,index:r,fileUrl:i,onPrev:a,onNext:o,onClose:s}=e,c=n[r],l=r+1,d;t[0]!==n.length||t[1]!==l?(d=(0,S.jsxs)(`span`,{className:`ripple-spotlight-count`,children:[l,` / `,n.length]}),t[0]=n.length,t[1]=l,t[2]=d):d=t[2];let f=c.file,p=c.focus,m;t[3]!==i||t[4]!==c.file?(m=i(c.file),t[3]=i,t[4]=c.file,t[5]=m):m=t[5];let h;t[6]!==c.file||t[7]!==c.focus||t[8]!==m?(h=(0,S.jsx)(O,{file:f,focus:p,url:m}),t[6]=c.file,t[7]=c.focus,t[8]=m,t[9]=h):h=t[9];let g;t[10]===s?g=t[11]:(g=(0,S.jsx)(`button`,{type:`button`,className:`ripple-spotlight-x`,onClick:s,"aria-label":`Exit spotlight`,children:`✕`}),t[10]=s,t[11]=g);let _;t[12]!==d||t[13]!==h||t[14]!==g?(_=(0,S.jsxs)(`div`,{className:`ripple-spotlight-bar`,children:[d,h,g]}),t[12]=d,t[13]=h,t[14]=g,t[15]=_):_=t[15];let v;t[16]===c.code?v=t[17]:(v=c.code&&(0,S.jsx)(`pre`,{className:`ripple-walk-code ripple-spotlight-code`,children:(0,S.jsx)(`code`,{children:c.code})}),t[16]=c.code,t[17]=v);let y;t[18]===c.explain?y=t[19]:(y=(0,S.jsx)(`p`,{className:`ripple-spotlight-explain`,children:c.explain}),t[18]=c.explain,t[19]=y);let b=r===0,x;t[20]!==a||t[21]!==b?(x=(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:a,disabled:b,children:`← Back`}),t[20]=a,t[21]=b,t[22]=x):x=t[22];let C;t[23]!==r||t[24]!==s||t[25]!==o||t[26]!==n.length?(C=r<n.length-1?(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:o,children:`Next →`}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:s,children:`Done ✓`}),t[23]=r,t[24]=s,t[25]=o,t[26]=n.length,t[27]=C):C=t[27];let w;t[28]!==x||t[29]!==C?(w=(0,S.jsxs)(`div`,{className:`ripple-spotlight-nav`,children:[x,C]}),t[28]=x,t[29]=C,t[30]=w):w=t[30];let T;return t[31]!==y||t[32]!==w||t[33]!==_||t[34]!==v?(T=(0,S.jsxs)(`div`,{className:`ripple-spotlight`,role:`group`,"aria-label":`Code spotlight`,children:[_,v,y,w]}),t[31]=y,t[32]=w,t[33]=_,t[34]=v,t[35]=T):T=t[35],T}function k(e){let t=(0,u.c)(56),{questions:n,onFinish:r,children:i}=e,[a,o]=(0,l.useState)(0),[s,c]=(0,l.useState)(`ask`),[d,f]=(0,l.useState)(null),[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(0),[_,v]=(0,l.useState)(!1),[y,x]=(0,l.useState)(null),C=n.length,w=n[Math.min(a,C-1)],T=!!(w.choices&&w.choices.length>=2&&w.correct!==void 0),E;t[0]===s?E=t[1]:(E=e=>{s!==`graded`&&(m(e),c(`graded`),e&&g(j))},t[0]=s,t[1]=E);let D=E,ee;t[2]!==D||t[3]!==s||t[4]!==w.correct?(ee=e=>{s!==`graded`&&(f(e),D(e===w.correct))},t[2]=D,t[3]=s,t[4]=w.correct,t[5]=ee):ee=t[5];let te=ee,O;t[6]===s?O=t[7]:(O=()=>{s===`ask`&&c(`revealed`)},t[6]=s,t[7]=O);let ne=O,k;t[8]!==h||t[9]!==a||t[10]!==r||t[11]!==C?(k=()=>{if(a+1>=C){let e={correct:h,total:C};x(e),v(!0),r?.(e);return}o(A),c(`ask`),f(null),m(!1)},t[8]=h,t[9]=a,t[10]=r,t[11]=C,t[12]=k):k=t[12];let M=k;if(_&&y){let e=y.total-y.correct,n=b(y.correct,y.total),r=n?`true`:void 0,a;t[13]!==y.correct||t[14]!==y.total?(a=(0,S.jsxs)(`div`,{className:`ripple-quiz-score-num`,children:[y.correct,`/`,y.total]}),t[13]=y.correct,t[14]=y.total,t[15]=a):a=t[15];let o=n?`You know this one — nice work.`:`Worth another pass — ${e} to revisit.`,s;t[16]===o?s=t[17]:(s=(0,S.jsx)(`p`,{className:`ripple-quiz-score-text`,children:o}),t[16]=o,t[17]=s);let c;t[18]!==r||t[19]!==a||t[20]!==s?(c=(0,S.jsxs)(`div`,{className:`ripple-quiz-score`,"data-passed":r,role:`status`,children:[a,s]}),t[18]=r,t[19]=a,t[20]=s,t[21]=c):c=t[21];let l;return t[22]!==i||t[23]!==c?(l=(0,S.jsxs)(`div`,{className:`ripple-quiz-done`,children:[c,i]}),t[22]=i,t[23]=c,t[24]=l):l=t[24],l}let N=`Question ${a+1} of ${C}`,P=a+1,F;t[25]!==P||t[26]!==C?(F=(0,S.jsxs)(`div`,{className:`ripple-quiz-progress`,children:[`Question `,P,` of `,C]}),t[25]=P,t[26]=C,t[27]=F):F=t[27];let I;t[28]===w.question?I=t[29]:(I=(0,S.jsx)(`p`,{className:`ripple-course-q`,children:w.question}),t[28]=w.question,t[29]=I);let L;t[30]!==D||t[31]!==T||t[32]!==s||t[33]!==te||t[34]!==d||t[35]!==w.answer||t[36]!==w.choices||t[37]!==w.correct||t[38]!==ne?(L=T?(0,S.jsx)(`ul`,{className:`ripple-quiz-choices`,children:w.choices.map((e,t)=>{let n=`idle`;return s===`graded`&&(t===w.correct?n=`correct`:t===d&&(n=`wrong`)),(0,S.jsx)(`li`,{children:(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-choice`,"data-state":n,onClick:()=>te(t),disabled:s===`graded`,"aria-pressed":d===t,children:e})},t)})}):(0,S.jsxs)(`div`,{className:`ripple-quiz-plain`,children:[s===`ask`&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:ne,children:`Show answer`}),s!==`ask`&&(0,S.jsx)(`p`,{className:`ripple-course-a`,children:w.answer}),s===`revealed`&&(0,S.jsxs)(`div`,{className:`ripple-quiz-selfgrade`,children:[(0,S.jsx)(`span`,{className:`ripple-quiz-selfgrade-prompt`,children:`Did you get it?`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-selfgrade-btn`,"data-answer":`yes`,onClick:()=>D(!0),children:`Yes, I had it`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-selfgrade-btn`,"data-answer":`no`,onClick:()=>D(!1),children:`Not quite`})]})]}),t[30]=D,t[31]=T,t[32]=s,t[33]=te,t[34]=d,t[35]=w.answer,t[36]=w.choices,t[37]=w.correct,t[38]=ne,t[39]=L):L=t[39];let R;t[40]!==s||t[41]!==w.explain||t[42]!==p?(R=s===`graded`&&(0,S.jsxs)(`div`,{className:`ripple-quiz-feedback`,"data-right":p?`true`:void 0,children:[(0,S.jsx)(`p`,{className:`ripple-quiz-feedback-label`,children:p?`Correct`:`Not quite`}),w.explain&&(0,S.jsx)(`p`,{className:`ripple-quiz-explain`,children:w.explain})]}),t[40]=s,t[41]=w.explain,t[42]=p,t[43]=R):R=t[43];let z;t[44]!==M||t[45]!==a||t[46]!==s||t[47]!==C?(z=s===`graded`&&(0,S.jsx)(`div`,{className:`ripple-quiz-actions`,children:(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:M,children:a+1>=C?`See your score →`:`Next question →`})}),t[44]=M,t[45]=a,t[46]=s,t[47]=C,t[48]=z):z=t[48];let B;return t[49]!==R||t[50]!==z||t[51]!==N||t[52]!==F||t[53]!==I||t[54]!==L?(B=(0,S.jsxs)(`div`,{className:`ripple-quiz`,role:`group`,"aria-label":N,children:[F,I,L,R,z]}),t[49]=R,t[50]=z,t[51]=N,t[52]=F,t[53]=I,t[54]=L,t[55]=B):B=t[55],B}function A(e){return e+1}function j(e){return e+1}var M=e=>e.slice(0,7),N={beginner:`Beginner`,intermediate:`Intermediate`,expert:`Expert`};function P({title:e,sub:t,preview:n=!1}){return(0,S.jsxs)(`div`,{className:`ripple-course-skeleton`+(n?` ripple-course-skeleton--preview`:``),role:`status`,"aria-live":`polite`,children:[(0,S.jsxs)(`div`,{className:`ripple-course-skeleton-head`,children:[(0,S.jsx)(`span`,{className:`ripple-sharpening-dot`,"aria-hidden":`true`}),(0,S.jsx)(`div`,{className:`ripple-course-skeleton-title`,children:e})]}),(0,S.jsx)(`div`,{className:`ripple-course-skeleton-sub`,children:t}),(0,S.jsx)(`div`,{className:`ripple-progress`,"aria-hidden":`true`}),n&&(0,S.jsx)(`div`,{className:`ripple-course-skeleton-lessons`,"aria-hidden":`true`,children:[0,1,2,3].map(e=>(0,S.jsxs)(`div`,{className:`ripple-skel-lesson`,children:[(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-step`}),(0,S.jsxs)(`span`,{className:`ripple-skel-lines`,children:[(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-line-title`}),(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-line-meta`})]})]},e))})]})}function F(e){let t=(0,u.c)(137),{model:n,altitude:d,building:f,onRegenerate:p,loadLessonDetail:m,loadCourseClosing:h,courseFocus:w,onCourseFocus:T,speak:E,commitSha:D,compareSinceBuilt:ee,openFullAnalysis:te,onAskAboutLesson:O}=e,ne;t[0]===n.courses?ne=t[1]:(ne=n.courses??[],t[0]=n.courses,t[1]=ne);let A=ne,j=n.pr.repo||``,F=n.pr.branch||`HEAD`,V=j?o(j):void 0,oe=!!(!n.provenance.example&&j&&D&&V?.commitSha&&V.commitSha!==D),[H,se]=(0,l.useState)(0),U=A[Math.min(H,Math.max(0,A.length-1))],W=U?`${j||`repo`}::${U.title}`:`repo`,ce;t[2]===W?ce=t[3]:(ce=()=>g(W),t[2]=W,t[3]=ce);let[G,le]=(0,l.useState)(ce),ue,de;t[4]===W?(ue=t[5],de=t[6]):(ue=()=>le(g(W)),de=[W],t[4]=W,t[5]=ue,t[6]=de),(0,l.useEffect)(ue,de);let fe;t[7]===W?fe=t[8]:(fe=(e,t)=>{le(new Set(_(W,e,t)))},t[7]=W,t[8]=fe);let pe=fe,[K,q]=(0,l.useState)(0),[me,he]=(0,l.useState)(!1),ge;t[9]===W?ge=t[10]:(ge=()=>v(W),t[9]=W,t[10]=ge);let[J,_e]=(0,l.useState)(ge),[ve,ye]=(0,l.useState)(0),[be,xe]=(0,l.useState)(!1),Se;t[11]!==H||t[12]!==A||t[13]!==W||t[14]!==q||t[15]!==xe?(Se=()=>{let e=g(W),t=(A[H]?.lessons??[]).findIndex((t,n)=>!e.has(n));q(t===-1?0:t),_e(v(W)),ye(0),xe(!1)},t[11]=H,t[12]=A,t[13]=W,t[14]=q,t[15]=xe,t[16]=Se):Se=t[16];let Ce;t[17]!==H||t[18]!==A||t[19]!==W?(Ce=[W,H,A],t[17]=H,t[18]=A,t[19]=W,t[20]=Ce):Ce=t[20],(0,l.useEffect)(Se,Ce);let we;t[21]===he?we=t[22]:(we=()=>he(!1),t[21]=he,t[22]=we);let Te;t[23]!==K||t[24]!==H?(Te=[K,H],t[23]=K,t[24]=H,t[25]=Te):Te=t[25],(0,l.useEffect)(we,Te);let[Ee,De]=(0,l.useState)(null),[Oe,ke]=(0,l.useState)(`idle`),[Ae,je]=(0,l.useState)(0),Me=(0,l.useRef)(null),Ne;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=()=>{De(null),ke(`idle`),Me.current=null},t[26]=Ne):Ne=t[26];let Pe;t[27]===H?Pe=t[28]:(Pe=[H],t[27]=H,t[28]=Pe),(0,l.useEffect)(Ne,Pe);let Fe,Ie;t[29]!==K||t[30]!==Ae||t[31]!==H||t[32]!==A||t[33]!==h?(Fe=()=>{let e=A[H];if(!e||!h||K<e.lessons.length||e.quiz?.length||e.capstone)return;let t=`${H}:${Ae}`;if(Me.current===t)return;Me.current=t;let n=!0;return ke(`loading`),h(e).then(e=>{n&&(e&&(e.quiz?.length||e.capstone)?(De(e),ke(`ready`)):ke(`error`))}),()=>{n=!1}},Ie=[A,H,K,h,Ae],t[29]=K,t[30]=Ae,t[31]=H,t[32]=A,t[33]=h,t[34]=Fe,t[35]=Ie):(Fe=t[34],Ie=t[35]),(0,l.useEffect)(Fe,Ie);let Le;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(Le=()=>je(ae),t[36]=Le):Le=t[36];let Re=Le,[Y,ze]=(0,l.useState)(null),[Be,Ve]=(0,l.useState)(``),[He,Ue]=(0,l.useState)(!1),[We,Ge]=(0,l.useState)(!1),[Ke,qe]=(0,l.useState)(``),Je;if(t[37]===Symbol.for(`react.memo_cache_sentinel`)?(Je=()=>{ze(null),Ve(``),Ue(!1),qe(``)},t[37]=Je):Je=t[37],(0,l.useEffect)(Je,[V?.commitSha,D]),A.length===0||!U){if(f){let e;return t[38]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,S.jsx)(P,{title:`Building your curriculum from the code…`,sub:`Reading the README, the areas, and the real files to write a leveled course you can climb without fear.`,preview:!0}),t[38]=e):e=t[38],e}let e;return t[39]===p?e=t[40]:(e=(0,S.jsx)(`div`,{className:`ripple-course-empty`,children:p?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`p`,{children:`Couldn’t build a course from this view yet.`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:p,children:`Try again`})]}):(0,S.jsx)(`p`,{children:`Connect a model in Settings to generate a course from this code.`})}),t[39]=p,t[40]=e),e}let X=U.lessons,Z=X[Math.min(K,X.length-1)],Ye=X.reduce(ie,0),Xe;t[41]!==G.size||t[42]!==X.length?(Xe=Math.round(G.size/X.length*100),t[41]=G.size,t[42]=X.length,t[43]=Xe):Xe=t[43];let Ze=Xe,Qe;t[44]!==Ee?.quiz||t[45]!==U.quiz?(Qe=U.quiz??Ee?.quiz??[],t[44]=Ee?.quiz,t[45]=U.quiz,t[46]=Qe):Qe=t[46];let Q=Qe,$=U.capstone??Ee?.capstone,$e=X.length>0&&(Q.length>0||!!$||!!h),et=$e&&K>=X.length,tt=K<X.length-1||$e,nt;t[47]===W?nt=t[48]:(nt=e=>{y(W,e.correct,e.total),_e(v(W))},t[47]=W,t[48]=nt);let rt=nt,it;t[49]!==U.title||t[50]!==Q||t[51]!==j?(it=()=>{let e=i(Q.map(re),{deck:`Ripple · ${j||`this repo`}`,tags:[U.title],source:{topic:U.title,ts:Date.now()},origin:`auto`});ye(e.length)},t[49]=U.title,t[50]=Q,t[51]=j,t[52]=it):it=t[52];let at=it,ot;t[53]!==ve||t[54]!==at?(ot=()=>ve>0?(0,S.jsxs)(`p`,{className:`ripple-quiz-flash-saved`,children:[`+`,ve,` card`,ve===1?``:`s`,` saved to your deck`]}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:at,children:`Keep these as flashcards`}),t[53]=ve,t[54]=at,t[55]=ot):ot=t[55];let st=ot,ct=oe&&Y?s(X,Y):new Set,lt=async()=>{if(Y)return Y;if(!ee||!V?.commitSha||!D)return null;Ge(!0),qe(``);let e=await ee(V.commitSha,D);if(Ge(!1),!e.ok||!e.diff)return qe(e.detail||`Couldn’t load what changed.`),null;let t=a(e.diff).files.map(B);return ze(t),Ve(e.diff),t},ut=()=>{if(He){Ue(!1);return}lt().then(e=>{e&&Ue(!0)})},dt=()=>{lt().then(e=>{if(!e)return;let t=s(X,e);t.size>0&&q(Math.min(...t))})},ft=()=>{!Be||!te||!V||!D||te(Be,`${j} ${M(V.commitSha)}...${M(D)}`,j)},pt;t[56]===j?pt=t[57]:(pt=e=>{let t=`${j||`repo`}::${e.title}`,n=v(t);return{lessonsDone:g(t).size,lessonsTotal:e.lessons.length,hasQuiz:(e.quiz?.length??0)>0,quizPassed:!!n&&b(n.correct,n.total)}},t[56]=j,t[57]=pt);let mt=pt,ht;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(ht=(0,S.jsx)(`span`,{className:`ripple-course-pill`,children:`Guided curriculum`}),t[58]=ht):ht=t[58];let gt;t[59]!==f||t[60]!==w||t[61]!==n.modules||t[62]!==T?(gt=T&&n.modules.length>1&&(0,S.jsxs)(`div`,{className:`ripple-course-focus`,title:`Build the course around one area — best on a large repo, where a whole-repo course only skims. Whole repo prioritises the highest-impact areas.`,children:[(0,S.jsx)(`span`,{className:`ripple-course-focus-label`,children:`Focus`}),(0,S.jsx)(r,{ariaLabel:`Course focus`,triggerClassName:`ripple-course-focus-select`,value:w??``,onChange:e=>T(e||void 0),disabled:f,options:[{value:``,label:`Whole repo`},...n.modules.slice(0,50).map(z)]})]}),t[59]=f,t[60]=w,t[61]=n.modules,t[62]=T,t[63]=gt):gt=t[63];let _t;t[64]!==f||t[65]!==p?(_t=p&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-regen`,onClick:p,disabled:f,title:`Rebuild the curriculum from the latest code`,children:f?`Rebuilding…`:`↻ Regenerate`}),t[64]=f,t[65]=p,t[66]=_t):_t=t[66];let vt;t[67]!==gt||t[68]!==_t?(vt=(0,S.jsxs)(`div`,{className:`ripple-course-head-top`,children:[ht,gt,_t]}),t[67]=gt,t[68]=_t,t[69]=vt):vt=t[69];let yt;t[70]!==H||t[71]!==A||t[72]!==mt||t[73]!==j?(yt=A.length>1&&(0,S.jsx)(`div`,{className:`ripple-course-tracks`,role:`tablist`,"aria-label":`Courses`,children:A.map((e,t)=>{let n=g(`${j||`repo`}::${e.title}`).size,r=n>=e.lessons.length,i=t>0?A[t-1]:void 0,a=!!i&&x(mt(i));return(0,S.jsxs)(`button`,{type:`button`,role:`tab`,className:`ripple-course-track`,"data-active":t===H?`true`:void 0,"data-locked":a?`true`:void 0,"aria-selected":t===H,onClick:()=>se(t),children:[(0,S.jsxs)(`span`,{className:`ripple-course-track-top`,children:[(0,S.jsx)(`span`,{className:`ripple-course-step`,"data-done":r?`true`:void 0,children:r?`✓`:t+1}),e.level?(0,S.jsx)(`span`,{className:`ripple-course-level`,"data-level":e.level,children:N[e.level]}):(0,S.jsxs)(`span`,{className:`ripple-course-track-meta`,children:[n,`/`,e.lessons.length]})]}),(0,S.jsx)(`span`,{className:`ripple-course-track-title`,children:e.title}),a&&(0,S.jsxs)(`span`,{className:`ripple-course-track-lock`,children:[(0,S.jsx)(`span`,{"aria-hidden":`true`,children:`🔒`}),` Usually after “`,i.title,`” —`,` `,(0,S.jsx)(`span`,{className:`ripple-course-track-skip`,children:`I already know this, skip ahead`})]})]},e.title)})}),t[70]=H,t[71]=A,t[72]=mt,t[73]=j,t[74]=yt):yt=t[74];let bt;t[75]===U.title?bt=t[76]:(bt=(0,S.jsx)(`h2`,{className:`ripple-course-title`,children:U.title}),t[75]=U.title,t[76]=bt);let xt;t[77]===U.subtitle?xt=t[78]:(xt=U.subtitle&&(0,S.jsx)(`p`,{className:`ripple-course-sub`,children:U.subtitle}),t[77]=U.subtitle,t[78]=xt);let St=Ye>0?` · ~${Ye} min`:``,Ct;t[79]!==G.size||t[80]!==X.length||t[81]!==St?(Ct=(0,S.jsxs)(`div`,{className:`ripple-course-meta`,children:[X.length,` lessons`,St,` · `,G.size,`/`,X.length,` done`]}),t[79]=G.size,t[80]=X.length,t[81]=St,t[82]=Ct):Ct=t[82];let wt=`${Ze}%`,Tt;t[83]===wt?Tt=t[84]:(Tt=(0,S.jsx)(`div`,{className:`ripple-course-bar`,"aria-hidden":`true`,children:(0,S.jsx)(`span`,{style:{width:wt}})}),t[83]=wt,t[84]=Tt);let Et;t[85]!==vt||t[86]!==yt||t[87]!==bt||t[88]!==xt||t[89]!==Ct||t[90]!==Tt?(Et=(0,S.jsxs)(`header`,{className:`ripple-course-head`,children:[vt,yt,bt,xt,Ct,Tt]}),t[85]=vt,t[86]=yt,t[87]=bt,t[88]=xt,t[89]=Ct,t[90]=Tt,t[91]=Et):Et=t[91];let Dt=oe&&V&&(0,S.jsxs)(`div`,{className:`ripple-course-stale`,role:`status`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`The code moved`}),(0,S.jsxs)(`p`,{className:`ripple-course-stale-text`,children:[`The code moved since this course was built (`,(0,S.jsx)(`code`,{children:M(V.commitSha)}),` →`,` `,(0,S.jsx)(`code`,{children:M(D)}),`).`]}),Ke&&(0,S.jsx)(`p`,{className:`ripple-course-stale-err`,children:Ke}),(0,S.jsxs)(`div`,{className:`ripple-course-stale-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:ut,disabled:We,children:We?`Loading…`:He?`Hide what changed`:`See what changed`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:dt,disabled:We,children:`Refresh stale lessons`}),p&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:p,disabled:f,children:`Rebuild course`})]}),He&&Y&&(0,S.jsxs)(`div`,{className:`ripple-course-changed-panel`,children:[(0,S.jsx)(`ul`,{children:Y.slice(0,20).map(R)}),Y.length>20&&(0,S.jsxs)(`p`,{className:`ripple-course-changed-more`,children:[`+`,Y.length-20,` more file`,Y.length-20==1?``:`s`]}),te&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:ft,children:`Open as a full analysis →`})]})]}),Ot=X.map((e,t)=>{let n=G.has(t),r=ct.has(t);return(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-item`,"data-active":t===K?`true`:void 0,"data-done":n?`true`:void 0,"data-stale":r?`true`:void 0,onClick:()=>q(t),children:[(0,S.jsx)(`span`,{className:`ripple-course-num`,"aria-hidden":`true`,children:n?`✓`:t+1}),(0,S.jsxs)(`span`,{className:`ripple-course-item-body`,children:[(0,S.jsxs)(`span`,{className:`ripple-course-item-title`,children:[e.title,r&&(0,S.jsx)(`span`,{className:`ripple-course-item-stale`,title:`Its files changed since this course was built`,children:`stale`})]}),e.minutes?(0,S.jsxs)(`span`,{className:`ripple-course-item-min`,children:[`~`,e.minutes,` min`]}):null]})]},t)}),kt;t[92]!==$e||t[93]!==$||t[94]!==X.length||t[95]!==et||t[96]!==Q.length||t[97]!==q?(kt=$e&&(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-item ripple-course-item-quiz`,"data-active":et?`true`:void 0,onClick:()=>q(X.length),children:[(0,S.jsx)(`span`,{className:`ripple-course-num`,"aria-hidden":`true`,children:`★`}),(0,S.jsxs)(`span`,{className:`ripple-course-item-body`,children:[(0,S.jsx)(`span`,{className:`ripple-course-item-title`,children:Q.length>0?`Quiz`:$?`Capstone`:`Wrap-up`}),(0,S.jsx)(`span`,{className:`ripple-course-item-min`,children:Q.length>0?`${Q.length} question${Q.length===1?``:`s`}`:$?`Closing project`:`Quiz & capstone`})]})]}),t[92]=$e,t[93]=$,t[94]=X.length,t[95]=et,t[96]=Q.length,t[97]=q,t[98]=kt):kt=t[98];let At;t[99]!==Ot||t[100]!==kt?(At=(0,S.jsxs)(`nav`,{className:`ripple-course-list`,"aria-label":`Lessons`,children:[Ot,kt]}),t[99]=Ot,t[100]=kt,t[101]=At):At=t[101];let jt;t[102]!==K||t[103]!==d||t[104]!==$||t[105]!==Oe||t[106]!==U||t[107]!==H||t[108]!==G||t[109]!==rt||t[110]!==st||t[111]!==tt||t[112]!==Z||t[113]!==X.length||t[114]!==m||t[115]!==pe||t[116]!==O||t[117]!==et||t[118]!==Q||t[119]!==J||t[120]!==F||t[121]!==j||t[122]!==be||t[123]!==Re||t[124]!==me||t[125]!==q||t[126]!==xe||t[127]!==he||t[128]!==E?(jt=(0,S.jsx)(`article`,{className:`ripple-course-lesson`,"aria-live":`polite`,children:et?(0,S.jsx)(S.Fragment,{children:Q.length===0&&!$&&Oe===`loading`?(0,S.jsx)(P,{title:`Writing the quiz & capstone for ${U.title}…`,sub:`A few end-of-week questions and a small hands-on project, grounded in what this week studied.`}):Q.length===0&&!$&&Oe===`error`?(0,S.jsxs)(`div`,{className:`ripple-course-empty`,children:[(0,S.jsx)(`p`,{children:`Couldn’t build the quiz & capstone for this course yet.`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:Re,children:`Try again`})]}):(0,S.jsxs)(S.Fragment,{children:[Q.length>0&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Course quiz`}),(0,S.jsx)(`h3`,{className:`ripple-course-lesson-title`,children:`Test yourself`}),(0,S.jsxs)(`p`,{className:`ripple-course-explain`,children:[`Answer these to be sure you really understood `,U.title,`.`]}),J&&!be?(0,S.jsxs)(`div`,{className:`ripple-quiz-done`,children:[(0,S.jsxs)(`div`,{className:`ripple-quiz-score`,"data-passed":b(J.correct,J.total)?`true`:void 0,role:`status`,children:[(0,S.jsxs)(`div`,{className:`ripple-quiz-score-num`,children:[J.correct,`/`,J.total]}),(0,S.jsx)(`p`,{className:`ripple-quiz-score-text`,children:b(J.correct,J.total)?`You know this one — nice work.`:`Worth another pass — ${J.total-J.correct} to revisit.`})]}),(0,S.jsx)(`div`,{className:`ripple-quiz-flashcards`,children:st()}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:()=>xe(!0),children:`Retake the quiz`})]}):(0,S.jsx)(k,{questions:Q,onFinish:e=>{rt(e),xe(!1)},children:(0,S.jsx)(`div`,{className:`ripple-quiz-flashcards`,children:st()})},`quiz:${H}`)]}),$&&(0,S.jsxs)(`section`,{className:`ripple-course-capstone`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Capstone`}),(0,S.jsx)(`h4`,{className:`ripple-course-capstone-title`,children:$.title}),(0,S.jsx)(`p`,{className:`ripple-course-capstone-brief`,children:$.brief}),$.steps.length>0&&(0,S.jsxs)(`div`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-course-capstone-label`,children:`Do this`}),(0,S.jsx)(`ol`,{className:`ripple-course-capstone-steps`,children:$.steps.map(L)})]}),$.acceptance.length>0&&(0,S.jsxs)(`div`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-course-capstone-label`,children:`You’ll know it worked when`}),(0,S.jsx)(`ul`,{className:`ripple-course-capstone-accept`,children:$.acceptance.map(I)})]})]})]})}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`ripple-eyebrow`,children:[`Lesson `,K+1,` of `,X.length,Z.minutes?` · ~${Z.minutes} min`:``]}),(0,S.jsx)(`h3`,{className:`ripple-course-lesson-title`,children:Z.title}),(0,S.jsx)(C,{course:U,lesson:Z,altitude:d,repo:j,gitRef:F,fileUrl:e=>c(j,F,e),loadLessonDetail:m,speak:E,onAskAboutLesson:O},`${H}:${K}:${d}`),Z.checkpoint&&(0,S.jsxs)(`section`,{className:`ripple-course-checkpoint`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Check yourself`}),(0,S.jsx)(`p`,{className:`ripple-course-q`,children:Z.checkpoint.question}),me?(0,S.jsx)(`p`,{className:`ripple-course-a`,children:Z.checkpoint.answer}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>he(!0),children:`Show answer`})]}),(0,S.jsxs)(`div`,{className:`ripple-course-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:()=>{let e=G.has(K);pe(K,!e),!e&&tt&&q(K+1)},children:G.has(K)?`Done ✓`:tt?`Mark done & next →`:`Mark done ✓`}),tt&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:()=>q(K+1),children:K===X.length-1?`Take the quiz →`:`Skip ahead`})]})]})}),t[102]=K,t[103]=d,t[104]=$,t[105]=Oe,t[106]=U,t[107]=H,t[108]=G,t[109]=rt,t[110]=st,t[111]=tt,t[112]=Z,t[113]=X.length,t[114]=m,t[115]=pe,t[116]=O,t[117]=et,t[118]=Q,t[119]=J,t[120]=F,t[121]=j,t[122]=be,t[123]=Re,t[124]=me,t[125]=q,t[126]=xe,t[127]=he,t[128]=E,t[129]=jt):jt=t[129];let Mt;t[130]!==At||t[131]!==jt?(Mt=(0,S.jsxs)(`div`,{className:`ripple-course-body`,children:[At,jt]}),t[130]=At,t[131]=jt,t[132]=Mt):Mt=t[132];let Nt;return t[133]!==Et||t[134]!==Dt||t[135]!==Mt?(Nt=(0,S.jsxs)(`div`,{className:`ripple-course`,children:[Et,Dt,Mt]}),t[133]=Et,t[134]=Dt,t[135]=Mt,t[136]=Nt):Nt=t[136],Nt}function I(e,t){return(0,S.jsx)(`li`,{children:e},t)}function L(e,t){return(0,S.jsx)(`li`,{children:e},t)}function R(e){return(0,S.jsx)(`li`,{children:e},e)}function z(e){return{value:e.name,label:e.name}}function B(e){return e.path}function re(e){return{front:e.question,back:e.answer}}function ie(e,t){return e+(t.minutes??0)}function ae(e){return e+1}export{F as ShipCourse};
1
+ import{t as e}from"./react-BZJXY1be.js";import{t}from"./compiler-runtime-qQQXpJgv.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{t as r}from"./DropSelect-QcBm3N4D.js";import{n as i}from"./store-D2IJF4SA.js";import{n as a}from"./parseDiff-D8uBQ9mQ.js";import{n as o,t as s}from"./courseStore-DfafnL-9.js";import{t as c}from"./links--u_phi0x.js";var l=e(),u=t(),d=`mavea.ripple.course.v2`,f=`mavea.ripple.course.v1`;function p(){try{let e=localStorage.getItem(f);if(!e)return{};let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return{};let n={};for(let[e,r]of Object.entries(t))Array.isArray(r)&&(n[e]={lessons:r.filter(e=>typeof e==`number`)});return Object.keys(n).length>0&&h(n),n}catch{return{}}}function m(){try{let e=localStorage.getItem(d);if(e===null)return p();let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:{}}catch{return{}}}function h(e){try{localStorage.setItem(d,JSON.stringify(e))}catch{}}function g(e){return new Set(m()[e]?.lessons??[])}function _(e,t,n){let r=m(),i=new Set(r[e]?.lessons??[]);return n?i.add(t):i.delete(t),r[e]={...r[e],lessons:[...i].sort((e,t)=>e-t)},h(r),i}function v(e){return m()[e]?.quiz}function y(e,t,n){let r=m();r[e]={lessons:r[e]?.lessons??[],quiz:{correct:t,total:n,passedAt:Date.now()}},h(r)}function b(e,t){return t>0&&e>=t-1}function x(e){return!!(!(e.lessonsTotal>0&&e.lessonsDone>=e.lessonsTotal)||e.hasQuiz&&!e.quizPassed)}var S=n();function C(e){let t=(0,u.c)(86),{course:n,lesson:r,altitude:i,fileUrl:a,loadLessonDetail:o,speak:s,onAskAboutLesson:c}=e,[d,f]=(0,l.useState)(r.detail??null),[p,m]=(0,l.useState)(`idle`),[h,g]=(0,l.useState)(null),_=(0,l.useRef)(!1),v=(0,l.useRef)(!0),y=(0,l.useRef)(null),b=(0,l.useRef)(0),x,C;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x=()=>()=>{v.current=!1,y.current!==null&&clearTimeout(y.current)},C=[],t[0]=x,t[1]=C):(x=t[0],C=t[1]),(0,l.useEffect)(x,C);let k;t[2]!==i||t[3]!==n||t[4]!==r||t[5]!==o?(k=e=>{if(!o)return;y.current!==null&&clearTimeout(y.current);let t=b.current+=1;m(`loading`),f(null);let a=s=>{o(n,r,e,i).then(e=>{!v.current||t!==b.current||(e?(f(e),m(`idle`)):s>0?y.current=setTimeout(()=>a(s-1),2e3):m(`error`))})};a(1)},t[2]=i,t[3]=n,t[4]=r,t[5]=o,t[6]=k):k=t[6];let A=k,j;t[7]!==r.detail||t[8]!==o||t[9]!==A?(j=()=>{if(r.detail){f(r.detail);return}!o||_.current||(_.current=!0,A(!1))},t[7]=r.detail,t[8]=o,t[9]=A,t[10]=j):j=t[10];let M;t[11]!==r||t[12]!==o||t[13]!==A?(M=[r,o,A],t[11]=r,t[12]=o,t[13]=A,t[14]=M):M=t[14],(0,l.useEffect)(j,M);let N;t[15]===d?.walkthrough?N=t[16]:(N=d?.walkthrough??[],t[15]=d?.walkthrough,t[16]=N);let P=N,F,I;t[17]!==s||t[18]!==h||t[19]!==P?(F=()=>{if(h===null||!s)return;let e=P[h];e&&s(`${e.focus?e.focus+`. `:``}${e.explain}`)},I=[h,P,s],t[17]=s,t[18]=h,t[19]=P,t[20]=F,t[21]=I):(F=t[20],I=t[21]),(0,l.useEffect)(F,I);let L=r.goal,R=r.explainFor?.[i]??r.goal,z;t[22]!==n||t[23]!==L||t[24]!==r.title||t[25]!==c?(z=c&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-lesson-ask`,onClick:()=>c(`In "${n.title}" — ${r.title}: ${L||`what should I understand here?`}`),children:`Ask about this lesson`}),t[22]=n,t[23]=L,t[24]=r.title,t[25]=c,t[26]=z):z=t[26];let B=z;if(d){let e,n,r;if(t[27]!==B||t[28]!==d.overview||t[29]!==L){let i=d.overview.split(/\n\n+/).filter(te);t[33]===L?e=t[34]:(e=L&&(0,S.jsx)(`p`,{className:`ripple-course-lede`,children:L}),t[33]=L,t[34]=e),n=B,r=i.length>0&&(0,S.jsx)(`div`,{className:`ripple-lesson-overview`,children:i.map(ee)}),t[27]=B,t[28]=d.overview,t[29]=L,t[30]=e,t[31]=n,t[32]=r}else e=t[30],n=t[31],r=t[32];let i;t[35]!==a||t[36]!==h||t[37]!==P?(i=P.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsxs)(`div`,{className:`ripple-lesson-spot-head`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Spotlight — walk the real code`}),(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>g(0),"aria-label":`Step through the code one part at a time`,children:[`▶ Step through (`,P.length,`)`]})]}),h===null?(0,S.jsx)(`ol`,{className:`ripple-walk`,children:P.map((e,t)=>(0,S.jsxs)(`li`,{className:`ripple-walk-step`,children:[(0,S.jsxs)(`div`,{className:`ripple-walk-where`,children:[(0,S.jsx)(`span`,{className:`ripple-walk-num`,"aria-hidden":`true`,children:t+1}),(0,S.jsx)(O,{file:e.file,focus:e.focus,url:a(e.file)})]}),e.code&&(0,S.jsx)(`pre`,{className:`ripple-walk-code`,children:(0,S.jsx)(`code`,{children:e.code})}),(0,S.jsx)(`p`,{className:`ripple-walk-explain`,children:e.explain})]},t))}):(0,S.jsx)(ne,{steps:P,index:h,fileUrl:a,onPrev:()=>g(D),onNext:()=>g(e=>e===null?null:Math.min(P.length-1,e+1)),onClose:()=>g(null)})]}),t[35]=a,t[36]=h,t[37]=P,t[38]=i):i=t[38];let s;t[39]===d.concepts?s=t[40]:(s=d.concepts.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Key concepts`}),(0,S.jsx)(`dl`,{className:`ripple-lesson-concepts`,children:d.concepts.map(E)})]}),t[39]=d.concepts,t[40]=s);let c;t[41]===d.pitfalls?c=t[42]:(c=d.pitfalls&&d.pitfalls.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-caution`,role:`note`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Watch out for`}),(0,S.jsx)(`ul`,{className:`ripple-lesson-pitfalls`,children:d.pitfalls.map(T)})]}),t[41]=d.pitfalls,t[42]=c);let l;t[43]===d.exercise?l=t[44]:(l=d.exercise&&(0,S.jsxs)(`section`,{className:`ripple-course-group ripple-lesson-exercise`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Try it`}),(0,S.jsx)(`p`,{className:`ripple-lesson-task`,children:d.exercise.task}),d.exercise.hint&&(0,S.jsxs)(`p`,{className:`ripple-lesson-hint`,children:[`Hint — `,d.exercise.hint]}),d.exercise.check&&(0,S.jsxs)(`p`,{className:`ripple-lesson-check`,children:[`How you’ll know it worked — `,d.exercise.check]})]}),t[43]=d.exercise,t[44]=l);let u;t[45]!==o||t[46]!==A?(u=o&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-lesson-regen`,onClick:()=>A(!0),title:`Rewrite this lesson from the latest code`,children:`↻ Rewrite this lesson`}),t[45]=o,t[46]=A,t[47]=u):u=t[47];let f;return t[48]!==e||t[49]!==n||t[50]!==r||t[51]!==i||t[52]!==s||t[53]!==c||t[54]!==l||t[55]!==u?(f=(0,S.jsxs)(S.Fragment,{children:[e,n,r,i,s,c,l,u]}),t[48]=e,t[49]=n,t[50]=r,t[51]=i,t[52]=s,t[53]=c,t[54]=l,t[55]=u,t[56]=f):f=t[56],f}if(p===`loading`){let e,n;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,S.jsx)(`span`,{className:`ripple-sharpening-dot`,"aria-hidden":`true`}),n=(0,S.jsx)(`div`,{className:`ripple-course-skeleton-title`,children:`Writing this lesson from the real code…`}),t[57]=e,t[58]=n):(e=t[57],n=t[58]);let i;t[59]===r.read?i=t[60]:(i=r.read.slice(0,3).join(`, `)||`the relevant files`,t[59]=r.read,t[60]=i);let a;return t[61]===i?a=t[62]:(a=(0,S.jsxs)(`div`,{className:`ripple-course-skeleton`,role:`status`,"aria-live":`polite`,children:[e,n,(0,S.jsxs)(`div`,{className:`ripple-course-skeleton-sub`,children:[`Reading `,i,` to teach it properly — with a walk through the actual code.`]})]}),t[61]=i,t[62]=a),a}if(p===`error`){let e;t[63]===L?e=t[64]:(e=L&&(0,S.jsx)(`p`,{className:`ripple-course-lede`,children:L}),t[63]=L,t[64]=e);let n;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,S.jsx)(`p`,{children:`Couldn’t write this lesson from the code just now.`}),t[65]=n):n=t[65];let r;t[66]===A?r=t[67]:(r=(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>A(!0),children:`Try again`}),t[66]=A,t[67]=r);let i;return t[68]!==e||t[69]!==r?(i=(0,S.jsxs)(`div`,{className:`ripple-course-empty`,children:[e,n,r]}),t[68]=e,t[69]=r,t[70]=i):i=t[70],i}let re;t[71]===R?re=t[72]:(re=(0,S.jsx)(`p`,{className:`ripple-course-explain`,children:R}),t[71]=R,t[72]=re);let ie;t[73]!==a||t[74]!==r.read?(ie=r.read.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Open and read`}),(0,S.jsx)(`div`,{className:`ripple-course-files`,children:r.read.map(e=>(0,S.jsx)(O,{file:e,url:a(e)},e))})]}),t[73]=a,t[74]=r.read,t[75]=ie):ie=t[75];let ae;t[76]===r.concepts?ae=t[77]:(ae=r.concepts.length>0&&(0,S.jsxs)(`section`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Key concepts`}),(0,S.jsx)(`ul`,{className:`ripple-course-concepts`,children:r.concepts.map(w)})]}),t[76]=r.concepts,t[77]=ae);let V;t[78]===r.caution?V=t[79]:(V=r.caution&&(0,S.jsxs)(`section`,{className:`ripple-course-caution`,role:`note`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Be careful here — and why`}),(0,S.jsx)(`p`,{className:`ripple-course-caution-text`,children:r.caution})]}),t[78]=r.caution,t[79]=V);let oe;return t[80]!==B||t[81]!==re||t[82]!==ie||t[83]!==ae||t[84]!==V?(oe=(0,S.jsxs)(S.Fragment,{children:[re,B,ie,ae,V]}),t[80]=B,t[81]=re,t[82]=ie,t[83]=ae,t[84]=V,t[85]=oe):oe=t[85],oe}function w(e,t){return(0,S.jsx)(`li`,{children:e},t)}function T(e,t){return(0,S.jsx)(`li`,{children:e},t)}function E(e,t){return(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`dt`,{children:e.term}),(0,S.jsx)(`dd`,{children:e.explain})]},t)}function D(e){return e===null?null:Math.max(0,e-1)}function ee(e,t){return(0,S.jsx)(`p`,{children:e},t)}function te(e){return e.trim().length>0}function O(e){let t=(0,u.c)(3),{file:n,focus:r,url:i}=e,a=r?`${n} · ${r}`:n,o;return t[0]!==a||t[1]!==i?(o=i?(0,S.jsxs)(`a`,{className:`ripple-course-file ripple-course-file-link`,href:i,target:`_blank`,rel:`noreferrer noopener`,children:[a,` ↗`]}):(0,S.jsx)(`code`,{className:`ripple-course-file`,children:a}),t[0]=a,t[1]=i,t[2]=o):o=t[2],o}function ne(e){let t=(0,u.c)(36),{steps:n,index:r,fileUrl:i,onPrev:a,onNext:o,onClose:s}=e,c=n[r],l=r+1,d;t[0]!==n.length||t[1]!==l?(d=(0,S.jsxs)(`span`,{className:`ripple-spotlight-count`,children:[l,` / `,n.length]}),t[0]=n.length,t[1]=l,t[2]=d):d=t[2];let f=c.file,p=c.focus,m;t[3]!==i||t[4]!==c.file?(m=i(c.file),t[3]=i,t[4]=c.file,t[5]=m):m=t[5];let h;t[6]!==c.file||t[7]!==c.focus||t[8]!==m?(h=(0,S.jsx)(O,{file:f,focus:p,url:m}),t[6]=c.file,t[7]=c.focus,t[8]=m,t[9]=h):h=t[9];let g;t[10]===s?g=t[11]:(g=(0,S.jsx)(`button`,{type:`button`,className:`ripple-spotlight-x`,onClick:s,"aria-label":`Exit spotlight`,children:`✕`}),t[10]=s,t[11]=g);let _;t[12]!==d||t[13]!==h||t[14]!==g?(_=(0,S.jsxs)(`div`,{className:`ripple-spotlight-bar`,children:[d,h,g]}),t[12]=d,t[13]=h,t[14]=g,t[15]=_):_=t[15];let v;t[16]===c.code?v=t[17]:(v=c.code&&(0,S.jsx)(`pre`,{className:`ripple-walk-code ripple-spotlight-code`,children:(0,S.jsx)(`code`,{children:c.code})}),t[16]=c.code,t[17]=v);let y;t[18]===c.explain?y=t[19]:(y=(0,S.jsx)(`p`,{className:`ripple-spotlight-explain`,children:c.explain}),t[18]=c.explain,t[19]=y);let b=r===0,x;t[20]!==a||t[21]!==b?(x=(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:a,disabled:b,children:`← Back`}),t[20]=a,t[21]=b,t[22]=x):x=t[22];let C;t[23]!==r||t[24]!==s||t[25]!==o||t[26]!==n.length?(C=r<n.length-1?(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:o,children:`Next →`}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:s,children:`Done ✓`}),t[23]=r,t[24]=s,t[25]=o,t[26]=n.length,t[27]=C):C=t[27];let w;t[28]!==x||t[29]!==C?(w=(0,S.jsxs)(`div`,{className:`ripple-spotlight-nav`,children:[x,C]}),t[28]=x,t[29]=C,t[30]=w):w=t[30];let T;return t[31]!==y||t[32]!==w||t[33]!==_||t[34]!==v?(T=(0,S.jsxs)(`div`,{className:`ripple-spotlight`,role:`group`,"aria-label":`Code spotlight`,children:[_,v,y,w]}),t[31]=y,t[32]=w,t[33]=_,t[34]=v,t[35]=T):T=t[35],T}function k(e){let t=(0,u.c)(56),{questions:n,onFinish:r,children:i}=e,[a,o]=(0,l.useState)(0),[s,c]=(0,l.useState)(`ask`),[d,f]=(0,l.useState)(null),[p,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(0),[_,v]=(0,l.useState)(!1),[y,x]=(0,l.useState)(null),C=n.length,w=n[Math.min(a,C-1)],T=!!(w.choices&&w.choices.length>=2&&w.correct!==void 0),E;t[0]===s?E=t[1]:(E=e=>{s!==`graded`&&(m(e),c(`graded`),e&&g(j))},t[0]=s,t[1]=E);let D=E,ee;t[2]!==D||t[3]!==s||t[4]!==w.correct?(ee=e=>{s!==`graded`&&(f(e),D(e===w.correct))},t[2]=D,t[3]=s,t[4]=w.correct,t[5]=ee):ee=t[5];let te=ee,O;t[6]===s?O=t[7]:(O=()=>{s===`ask`&&c(`revealed`)},t[6]=s,t[7]=O);let ne=O,k;t[8]!==h||t[9]!==a||t[10]!==r||t[11]!==C?(k=()=>{if(a+1>=C){let e={correct:h,total:C};x(e),v(!0),r?.(e);return}o(A),c(`ask`),f(null),m(!1)},t[8]=h,t[9]=a,t[10]=r,t[11]=C,t[12]=k):k=t[12];let M=k;if(_&&y){let e=y.total-y.correct,n=b(y.correct,y.total),r=n?`true`:void 0,a;t[13]!==y.correct||t[14]!==y.total?(a=(0,S.jsxs)(`div`,{className:`ripple-quiz-score-num`,children:[y.correct,`/`,y.total]}),t[13]=y.correct,t[14]=y.total,t[15]=a):a=t[15];let o=n?`You know this one — nice work.`:`Worth another pass — ${e} to revisit.`,s;t[16]===o?s=t[17]:(s=(0,S.jsx)(`p`,{className:`ripple-quiz-score-text`,children:o}),t[16]=o,t[17]=s);let c;t[18]!==r||t[19]!==a||t[20]!==s?(c=(0,S.jsxs)(`div`,{className:`ripple-quiz-score`,"data-passed":r,role:`status`,children:[a,s]}),t[18]=r,t[19]=a,t[20]=s,t[21]=c):c=t[21];let l;return t[22]!==i||t[23]!==c?(l=(0,S.jsxs)(`div`,{className:`ripple-quiz-done`,children:[c,i]}),t[22]=i,t[23]=c,t[24]=l):l=t[24],l}let N=`Question ${a+1} of ${C}`,P=a+1,F;t[25]!==P||t[26]!==C?(F=(0,S.jsxs)(`div`,{className:`ripple-quiz-progress`,children:[`Question `,P,` of `,C]}),t[25]=P,t[26]=C,t[27]=F):F=t[27];let I;t[28]===w.question?I=t[29]:(I=(0,S.jsx)(`p`,{className:`ripple-course-q`,children:w.question}),t[28]=w.question,t[29]=I);let L;t[30]!==D||t[31]!==T||t[32]!==s||t[33]!==te||t[34]!==d||t[35]!==w.answer||t[36]!==w.choices||t[37]!==w.correct||t[38]!==ne?(L=T?(0,S.jsx)(`ul`,{className:`ripple-quiz-choices`,children:w.choices.map((e,t)=>{let n=`idle`;return s===`graded`&&(t===w.correct?n=`correct`:t===d&&(n=`wrong`)),(0,S.jsx)(`li`,{children:(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-choice`,"data-state":n,onClick:()=>te(t),disabled:s===`graded`,"aria-pressed":d===t,children:e})},t)})}):(0,S.jsxs)(`div`,{className:`ripple-quiz-plain`,children:[s===`ask`&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:ne,children:`Show answer`}),s!==`ask`&&(0,S.jsx)(`p`,{className:`ripple-course-a`,children:w.answer}),s===`revealed`&&(0,S.jsxs)(`div`,{className:`ripple-quiz-selfgrade`,children:[(0,S.jsx)(`span`,{className:`ripple-quiz-selfgrade-prompt`,children:`Did you get it?`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-selfgrade-btn`,"data-answer":`yes`,onClick:()=>D(!0),children:`Yes, I had it`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-quiz-selfgrade-btn`,"data-answer":`no`,onClick:()=>D(!1),children:`Not quite`})]})]}),t[30]=D,t[31]=T,t[32]=s,t[33]=te,t[34]=d,t[35]=w.answer,t[36]=w.choices,t[37]=w.correct,t[38]=ne,t[39]=L):L=t[39];let R;t[40]!==s||t[41]!==w.explain||t[42]!==p?(R=s===`graded`&&(0,S.jsxs)(`div`,{className:`ripple-quiz-feedback`,"data-right":p?`true`:void 0,children:[(0,S.jsx)(`p`,{className:`ripple-quiz-feedback-label`,children:p?`Correct`:`Not quite`}),w.explain&&(0,S.jsx)(`p`,{className:`ripple-quiz-explain`,children:w.explain})]}),t[40]=s,t[41]=w.explain,t[42]=p,t[43]=R):R=t[43];let z;t[44]!==M||t[45]!==a||t[46]!==s||t[47]!==C?(z=s===`graded`&&(0,S.jsx)(`div`,{className:`ripple-quiz-actions`,children:(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:M,children:a+1>=C?`See your score →`:`Next question →`})}),t[44]=M,t[45]=a,t[46]=s,t[47]=C,t[48]=z):z=t[48];let B;return t[49]!==R||t[50]!==z||t[51]!==N||t[52]!==F||t[53]!==I||t[54]!==L?(B=(0,S.jsxs)(`div`,{className:`ripple-quiz`,role:`group`,"aria-label":N,children:[F,I,L,R,z]}),t[49]=R,t[50]=z,t[51]=N,t[52]=F,t[53]=I,t[54]=L,t[55]=B):B=t[55],B}function A(e){return e+1}function j(e){return e+1}var M=e=>e.slice(0,7),N={beginner:`Beginner`,intermediate:`Intermediate`,expert:`Expert`};function P({title:e,sub:t,preview:n=!1}){return(0,S.jsxs)(`div`,{className:`ripple-course-skeleton`+(n?` ripple-course-skeleton--preview`:``),role:`status`,"aria-live":`polite`,children:[(0,S.jsxs)(`div`,{className:`ripple-course-skeleton-head`,children:[(0,S.jsx)(`span`,{className:`ripple-sharpening-dot`,"aria-hidden":`true`}),(0,S.jsx)(`div`,{className:`ripple-course-skeleton-title`,children:e})]}),(0,S.jsx)(`div`,{className:`ripple-course-skeleton-sub`,children:t}),(0,S.jsx)(`div`,{className:`ripple-progress`,"aria-hidden":`true`}),n&&(0,S.jsx)(`div`,{className:`ripple-course-skeleton-lessons`,"aria-hidden":`true`,children:[0,1,2,3].map(e=>(0,S.jsxs)(`div`,{className:`ripple-skel-lesson`,children:[(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-step`}),(0,S.jsxs)(`span`,{className:`ripple-skel-lines`,children:[(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-line-title`}),(0,S.jsx)(`span`,{className:`ripple-skel-bar ripple-skel-line-meta`})]})]},e))})]})}function F(e){let t=(0,u.c)(137),{model:n,altitude:d,building:f,onRegenerate:p,loadLessonDetail:m,loadCourseClosing:h,courseFocus:w,onCourseFocus:T,speak:E,commitSha:D,compareSinceBuilt:ee,openFullAnalysis:te,onAskAboutLesson:O}=e,ne;t[0]===n.courses?ne=t[1]:(ne=n.courses??[],t[0]=n.courses,t[1]=ne);let A=ne,j=n.pr.repo||``,F=n.pr.branch||`HEAD`,V=j?o(j):void 0,oe=!!(!n.provenance.example&&j&&D&&V?.commitSha&&V.commitSha!==D),[H,se]=(0,l.useState)(0),U=A[Math.min(H,Math.max(0,A.length-1))],W=U?`${j||`repo`}::${U.title}`:`repo`,ce;t[2]===W?ce=t[3]:(ce=()=>g(W),t[2]=W,t[3]=ce);let[G,le]=(0,l.useState)(ce),ue,de;t[4]===W?(ue=t[5],de=t[6]):(ue=()=>le(g(W)),de=[W],t[4]=W,t[5]=ue,t[6]=de),(0,l.useEffect)(ue,de);let fe;t[7]===W?fe=t[8]:(fe=(e,t)=>{le(new Set(_(W,e,t)))},t[7]=W,t[8]=fe);let pe=fe,[K,q]=(0,l.useState)(0),[me,he]=(0,l.useState)(!1),ge;t[9]===W?ge=t[10]:(ge=()=>v(W),t[9]=W,t[10]=ge);let[J,_e]=(0,l.useState)(ge),[ve,ye]=(0,l.useState)(0),[be,xe]=(0,l.useState)(!1),Se;t[11]!==H||t[12]!==A||t[13]!==W||t[14]!==q||t[15]!==xe?(Se=()=>{let e=g(W),t=(A[H]?.lessons??[]).findIndex((t,n)=>!e.has(n));q(t===-1?0:t),_e(v(W)),ye(0),xe(!1)},t[11]=H,t[12]=A,t[13]=W,t[14]=q,t[15]=xe,t[16]=Se):Se=t[16];let Ce;t[17]!==H||t[18]!==A||t[19]!==W?(Ce=[W,H,A],t[17]=H,t[18]=A,t[19]=W,t[20]=Ce):Ce=t[20],(0,l.useEffect)(Se,Ce);let we;t[21]===he?we=t[22]:(we=()=>he(!1),t[21]=he,t[22]=we);let Te;t[23]!==K||t[24]!==H?(Te=[K,H],t[23]=K,t[24]=H,t[25]=Te):Te=t[25],(0,l.useEffect)(we,Te);let[Ee,De]=(0,l.useState)(null),[Oe,ke]=(0,l.useState)(`idle`),[Ae,je]=(0,l.useState)(0),Me=(0,l.useRef)(null),Ne;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=()=>{De(null),ke(`idle`),Me.current=null},t[26]=Ne):Ne=t[26];let Pe;t[27]===H?Pe=t[28]:(Pe=[H],t[27]=H,t[28]=Pe),(0,l.useEffect)(Ne,Pe);let Fe,Ie;t[29]!==K||t[30]!==Ae||t[31]!==H||t[32]!==A||t[33]!==h?(Fe=()=>{let e=A[H];if(!e||!h||K<e.lessons.length||e.quiz?.length||e.capstone)return;let t=`${H}:${Ae}`;if(Me.current===t)return;Me.current=t;let n=!0;return ke(`loading`),h(e).then(e=>{n&&(e&&(e.quiz?.length||e.capstone)?(De(e),ke(`ready`)):ke(`error`))}),()=>{n=!1}},Ie=[A,H,K,h,Ae],t[29]=K,t[30]=Ae,t[31]=H,t[32]=A,t[33]=h,t[34]=Fe,t[35]=Ie):(Fe=t[34],Ie=t[35]),(0,l.useEffect)(Fe,Ie);let Le;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(Le=()=>je(ae),t[36]=Le):Le=t[36];let Re=Le,[Y,ze]=(0,l.useState)(null),[Be,Ve]=(0,l.useState)(``),[He,Ue]=(0,l.useState)(!1),[We,Ge]=(0,l.useState)(!1),[Ke,qe]=(0,l.useState)(``),Je;if(t[37]===Symbol.for(`react.memo_cache_sentinel`)?(Je=()=>{ze(null),Ve(``),Ue(!1),qe(``)},t[37]=Je):Je=t[37],(0,l.useEffect)(Je,[V?.commitSha,D]),A.length===0||!U){if(f){let e;return t[38]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,S.jsx)(P,{title:`Building your curriculum from the code…`,sub:`Reading the README, the areas, and the real files to write a leveled course you can climb without fear.`,preview:!0}),t[38]=e):e=t[38],e}let e;return t[39]===p?e=t[40]:(e=(0,S.jsx)(`div`,{className:`ripple-course-empty`,children:p?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`p`,{children:`Couldn’t build a course from this view yet.`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:p,children:`Try again`})]}):(0,S.jsx)(`p`,{children:`Connect a model in Settings to generate a course from this code.`})}),t[39]=p,t[40]=e),e}let X=U.lessons,Z=X[Math.min(K,X.length-1)],Ye=X.reduce(ie,0),Xe;t[41]!==G.size||t[42]!==X.length?(Xe=Math.round(G.size/X.length*100),t[41]=G.size,t[42]=X.length,t[43]=Xe):Xe=t[43];let Ze=Xe,Qe;t[44]!==Ee?.quiz||t[45]!==U.quiz?(Qe=U.quiz??Ee?.quiz??[],t[44]=Ee?.quiz,t[45]=U.quiz,t[46]=Qe):Qe=t[46];let Q=Qe,$=U.capstone??Ee?.capstone,$e=X.length>0&&(Q.length>0||!!$||!!h),et=$e&&K>=X.length,tt=K<X.length-1||$e,nt;t[47]===W?nt=t[48]:(nt=e=>{y(W,e.correct,e.total),_e(v(W))},t[47]=W,t[48]=nt);let rt=nt,it;t[49]!==U.title||t[50]!==Q||t[51]!==j?(it=()=>{let e=i(Q.map(re),{deck:`Ripple · ${j||`this repo`}`,tags:[U.title],source:{topic:U.title,ts:Date.now()},origin:`auto`});ye(e.length)},t[49]=U.title,t[50]=Q,t[51]=j,t[52]=it):it=t[52];let at=it,ot;t[53]!==ve||t[54]!==at?(ot=()=>ve>0?(0,S.jsxs)(`p`,{className:`ripple-quiz-flash-saved`,children:[`+`,ve,` card`,ve===1?``:`s`,` saved to your deck`]}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:at,children:`Keep these as flashcards`}),t[53]=ve,t[54]=at,t[55]=ot):ot=t[55];let st=ot,ct=oe&&Y?s(X,Y):new Set,lt=async()=>{if(Y)return Y;if(!ee||!V?.commitSha||!D)return null;Ge(!0),qe(``);let e=await ee(V.commitSha,D);if(Ge(!1),!e.ok||!e.diff)return qe(e.detail||`Couldn’t load what changed.`),null;let t=a(e.diff).files.map(B);return ze(t),Ve(e.diff),t},ut=()=>{if(He){Ue(!1);return}lt().then(e=>{e&&Ue(!0)})},dt=()=>{lt().then(e=>{if(!e)return;let t=s(X,e);t.size>0&&q(Math.min(...t))})},ft=()=>{!Be||!te||!V||!D||te(Be,`${j} ${M(V.commitSha)}...${M(D)}`,j)},pt;t[56]===j?pt=t[57]:(pt=e=>{let t=`${j||`repo`}::${e.title}`,n=v(t);return{lessonsDone:g(t).size,lessonsTotal:e.lessons.length,hasQuiz:(e.quiz?.length??0)>0,quizPassed:!!n&&b(n.correct,n.total)}},t[56]=j,t[57]=pt);let mt=pt,ht;t[58]===Symbol.for(`react.memo_cache_sentinel`)?(ht=(0,S.jsx)(`span`,{className:`ripple-course-pill`,children:`Guided curriculum`}),t[58]=ht):ht=t[58];let gt;t[59]!==f||t[60]!==w||t[61]!==n.modules||t[62]!==T?(gt=T&&n.modules.length>1&&(0,S.jsxs)(`div`,{className:`ripple-course-focus`,title:`Build the course around one area — best on a large repo, where a whole-repo course only skims. Whole repo prioritises the highest-impact areas.`,children:[(0,S.jsx)(`span`,{className:`ripple-course-focus-label`,children:`Focus`}),(0,S.jsx)(r,{ariaLabel:`Course focus`,triggerClassName:`ripple-course-focus-select`,value:w??``,onChange:e=>T(e||void 0),disabled:f,options:[{value:``,label:`Whole repo`},...n.modules.slice(0,50).map(z)]})]}),t[59]=f,t[60]=w,t[61]=n.modules,t[62]=T,t[63]=gt):gt=t[63];let _t;t[64]!==f||t[65]!==p?(_t=p&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-regen`,onClick:p,disabled:f,title:`Rebuild the curriculum from the latest code`,children:f?`Rebuilding…`:`↻ Regenerate`}),t[64]=f,t[65]=p,t[66]=_t):_t=t[66];let vt;t[67]!==gt||t[68]!==_t?(vt=(0,S.jsxs)(`div`,{className:`ripple-course-head-top`,children:[ht,gt,_t]}),t[67]=gt,t[68]=_t,t[69]=vt):vt=t[69];let yt;t[70]!==H||t[71]!==A||t[72]!==mt||t[73]!==j?(yt=A.length>1&&(0,S.jsx)(`div`,{className:`ripple-course-tracks`,role:`tablist`,"aria-label":`Courses`,children:A.map((e,t)=>{let n=g(`${j||`repo`}::${e.title}`).size,r=n>=e.lessons.length,i=t>0?A[t-1]:void 0,a=!!i&&x(mt(i));return(0,S.jsxs)(`button`,{type:`button`,role:`tab`,className:`ripple-course-track`,"data-active":t===H?`true`:void 0,"data-locked":a?`true`:void 0,"aria-selected":t===H,onClick:()=>se(t),children:[(0,S.jsxs)(`span`,{className:`ripple-course-track-top`,children:[(0,S.jsx)(`span`,{className:`ripple-course-step`,"data-done":r?`true`:void 0,children:r?`✓`:t+1}),e.level?(0,S.jsx)(`span`,{className:`ripple-course-level`,"data-level":e.level,children:N[e.level]}):(0,S.jsxs)(`span`,{className:`ripple-course-track-meta`,children:[n,`/`,e.lessons.length]})]}),(0,S.jsx)(`span`,{className:`ripple-course-track-title`,children:e.title}),a&&(0,S.jsxs)(`span`,{className:`ripple-course-track-lock`,children:[(0,S.jsx)(`span`,{"aria-hidden":`true`,children:`🔒`}),` Usually after “`,i.title,`” —`,` `,(0,S.jsx)(`span`,{className:`ripple-course-track-skip`,children:`I already know this, skip ahead`})]})]},e.title)})}),t[70]=H,t[71]=A,t[72]=mt,t[73]=j,t[74]=yt):yt=t[74];let bt;t[75]===U.title?bt=t[76]:(bt=(0,S.jsx)(`h2`,{className:`ripple-course-title`,children:U.title}),t[75]=U.title,t[76]=bt);let xt;t[77]===U.subtitle?xt=t[78]:(xt=U.subtitle&&(0,S.jsx)(`p`,{className:`ripple-course-sub`,children:U.subtitle}),t[77]=U.subtitle,t[78]=xt);let St=Ye>0?` · ~${Ye} min`:``,Ct;t[79]!==G.size||t[80]!==X.length||t[81]!==St?(Ct=(0,S.jsxs)(`div`,{className:`ripple-course-meta`,children:[X.length,` lessons`,St,` · `,G.size,`/`,X.length,` done`]}),t[79]=G.size,t[80]=X.length,t[81]=St,t[82]=Ct):Ct=t[82];let wt=`${Ze}%`,Tt;t[83]===wt?Tt=t[84]:(Tt=(0,S.jsx)(`div`,{className:`ripple-course-bar`,"aria-hidden":`true`,children:(0,S.jsx)(`span`,{style:{width:wt}})}),t[83]=wt,t[84]=Tt);let Et;t[85]!==vt||t[86]!==yt||t[87]!==bt||t[88]!==xt||t[89]!==Ct||t[90]!==Tt?(Et=(0,S.jsxs)(`header`,{className:`ripple-course-head`,children:[vt,yt,bt,xt,Ct,Tt]}),t[85]=vt,t[86]=yt,t[87]=bt,t[88]=xt,t[89]=Ct,t[90]=Tt,t[91]=Et):Et=t[91];let Dt=oe&&V&&(0,S.jsxs)(`div`,{className:`ripple-course-stale`,role:`status`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`The code moved`}),(0,S.jsxs)(`p`,{className:`ripple-course-stale-text`,children:[`The code moved since this course was built (`,(0,S.jsx)(`code`,{children:M(V.commitSha)}),` →`,` `,(0,S.jsx)(`code`,{children:M(D)}),`).`]}),Ke&&(0,S.jsx)(`p`,{className:`ripple-course-stale-err`,children:Ke}),(0,S.jsxs)(`div`,{className:`ripple-course-stale-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:ut,disabled:We,children:We?`Loading…`:He?`Hide what changed`:`See what changed`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:dt,disabled:We,children:`Refresh stale lessons`}),p&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:p,disabled:f,children:`Rebuild course`})]}),He&&Y&&(0,S.jsxs)(`div`,{className:`ripple-course-changed-panel`,children:[(0,S.jsx)(`ul`,{children:Y.slice(0,20).map(R)}),Y.length>20&&(0,S.jsxs)(`p`,{className:`ripple-course-changed-more`,children:[`+`,Y.length-20,` more file`,Y.length-20==1?``:`s`]}),te&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-stale-btn`,onClick:ft,children:`Open as a full analysis →`})]})]}),Ot=X.map((e,t)=>{let n=G.has(t),r=ct.has(t);return(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-item`,"data-active":t===K?`true`:void 0,"data-done":n?`true`:void 0,"data-stale":r?`true`:void 0,onClick:()=>q(t),children:[(0,S.jsx)(`span`,{className:`ripple-course-num`,"aria-hidden":`true`,children:n?`✓`:t+1}),(0,S.jsxs)(`span`,{className:`ripple-course-item-body`,children:[(0,S.jsxs)(`span`,{className:`ripple-course-item-title`,children:[e.title,r&&(0,S.jsx)(`span`,{className:`ripple-course-item-stale`,title:`Its files changed since this course was built`,children:`stale`})]}),e.minutes?(0,S.jsxs)(`span`,{className:`ripple-course-item-min`,children:[`~`,e.minutes,` min`]}):null]})]},t)}),kt;t[92]!==$e||t[93]!==$||t[94]!==X.length||t[95]!==et||t[96]!==Q.length||t[97]!==q?(kt=$e&&(0,S.jsxs)(`button`,{type:`button`,className:`ripple-course-item ripple-course-item-quiz`,"data-active":et?`true`:void 0,onClick:()=>q(X.length),children:[(0,S.jsx)(`span`,{className:`ripple-course-num`,"aria-hidden":`true`,children:`★`}),(0,S.jsxs)(`span`,{className:`ripple-course-item-body`,children:[(0,S.jsx)(`span`,{className:`ripple-course-item-title`,children:Q.length>0?`Quiz`:$?`Capstone`:`Wrap-up`}),(0,S.jsx)(`span`,{className:`ripple-course-item-min`,children:Q.length>0?`${Q.length} question${Q.length===1?``:`s`}`:$?`Closing project`:`Quiz & capstone`})]})]}),t[92]=$e,t[93]=$,t[94]=X.length,t[95]=et,t[96]=Q.length,t[97]=q,t[98]=kt):kt=t[98];let At;t[99]!==Ot||t[100]!==kt?(At=(0,S.jsxs)(`nav`,{className:`ripple-course-list`,"aria-label":`Lessons`,children:[Ot,kt]}),t[99]=Ot,t[100]=kt,t[101]=At):At=t[101];let jt;t[102]!==K||t[103]!==d||t[104]!==$||t[105]!==Oe||t[106]!==U||t[107]!==H||t[108]!==G||t[109]!==rt||t[110]!==st||t[111]!==tt||t[112]!==Z||t[113]!==X.length||t[114]!==m||t[115]!==pe||t[116]!==O||t[117]!==et||t[118]!==Q||t[119]!==J||t[120]!==F||t[121]!==j||t[122]!==be||t[123]!==Re||t[124]!==me||t[125]!==q||t[126]!==xe||t[127]!==he||t[128]!==E?(jt=(0,S.jsx)(`article`,{className:`ripple-course-lesson`,"aria-live":`polite`,children:et?(0,S.jsx)(S.Fragment,{children:Q.length===0&&!$&&Oe===`loading`?(0,S.jsx)(P,{title:`Writing the quiz & capstone for ${U.title}…`,sub:`A few end-of-week questions and a small hands-on project, grounded in what this week studied.`}):Q.length===0&&!$&&Oe===`error`?(0,S.jsxs)(`div`,{className:`ripple-course-empty`,children:[(0,S.jsx)(`p`,{children:`Couldn’t build the quiz & capstone for this course yet.`}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:Re,children:`Try again`})]}):(0,S.jsxs)(S.Fragment,{children:[Q.length>0&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Course quiz`}),(0,S.jsx)(`h3`,{className:`ripple-course-lesson-title`,children:`Test yourself`}),(0,S.jsxs)(`p`,{className:`ripple-course-explain`,children:[`Answer these to be sure you really understood `,U.title,`.`]}),J&&!be?(0,S.jsxs)(`div`,{className:`ripple-quiz-done`,children:[(0,S.jsxs)(`div`,{className:`ripple-quiz-score`,"data-passed":b(J.correct,J.total)?`true`:void 0,role:`status`,children:[(0,S.jsxs)(`div`,{className:`ripple-quiz-score-num`,children:[J.correct,`/`,J.total]}),(0,S.jsx)(`p`,{className:`ripple-quiz-score-text`,children:b(J.correct,J.total)?`You know this one — nice work.`:`Worth another pass — ${J.total-J.correct} to revisit.`})]}),(0,S.jsx)(`div`,{className:`ripple-quiz-flashcards`,children:st()}),(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:()=>xe(!0),children:`Retake the quiz`})]}):(0,S.jsx)(k,{questions:Q,onFinish:e=>{rt(e),xe(!1)},children:(0,S.jsx)(`div`,{className:`ripple-quiz-flashcards`,children:st()})},`quiz:${H}`)]}),$&&(0,S.jsxs)(`section`,{className:`ripple-course-capstone`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Capstone`}),(0,S.jsx)(`h4`,{className:`ripple-course-capstone-title`,children:$.title}),(0,S.jsx)(`p`,{className:`ripple-course-capstone-brief`,children:$.brief}),$.steps.length>0&&(0,S.jsxs)(`div`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-course-capstone-label`,children:`Do this`}),(0,S.jsx)(`ol`,{className:`ripple-course-capstone-steps`,children:$.steps.map(L)})]}),$.acceptance.length>0&&(0,S.jsxs)(`div`,{className:`ripple-course-group`,children:[(0,S.jsx)(`div`,{className:`ripple-course-capstone-label`,children:`You’ll know it worked when`}),(0,S.jsx)(`ul`,{className:`ripple-course-capstone-accept`,children:$.acceptance.map(I)})]})]})]})}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`ripple-eyebrow`,children:[`Lesson `,K+1,` of `,X.length,Z.minutes?` · ~${Z.minutes} min`:``]}),(0,S.jsx)(`h3`,{className:`ripple-course-lesson-title`,children:Z.title}),(0,S.jsx)(C,{course:U,lesson:Z,altitude:d,repo:j,gitRef:F,fileUrl:e=>c(j,F,e),loadLessonDetail:m,speak:E,onAskAboutLesson:O},`${H}:${K}:${d}`),Z.checkpoint&&(0,S.jsxs)(`section`,{className:`ripple-course-checkpoint`,children:[(0,S.jsx)(`div`,{className:`ripple-eyebrow`,children:`Check yourself`}),(0,S.jsx)(`p`,{className:`ripple-course-q`,children:Z.checkpoint.question}),me?(0,S.jsx)(`p`,{className:`ripple-course-a`,children:Z.checkpoint.answer}):(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-reveal`,onClick:()=>he(!0),children:`Show answer`})]}),(0,S.jsxs)(`div`,{className:`ripple-course-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-done`,onClick:()=>{let e=G.has(K);pe(K,!e),!e&&tt&&q(K+1)},children:G.has(K)?`Done ✓`:tt?`Mark done & next →`:`Mark done ✓`}),tt&&(0,S.jsx)(`button`,{type:`button`,className:`ripple-course-skip`,onClick:()=>q(K+1),children:K===X.length-1?`Take the quiz →`:`Skip ahead`})]})]})}),t[102]=K,t[103]=d,t[104]=$,t[105]=Oe,t[106]=U,t[107]=H,t[108]=G,t[109]=rt,t[110]=st,t[111]=tt,t[112]=Z,t[113]=X.length,t[114]=m,t[115]=pe,t[116]=O,t[117]=et,t[118]=Q,t[119]=J,t[120]=F,t[121]=j,t[122]=be,t[123]=Re,t[124]=me,t[125]=q,t[126]=xe,t[127]=he,t[128]=E,t[129]=jt):jt=t[129];let Mt;t[130]!==At||t[131]!==jt?(Mt=(0,S.jsxs)(`div`,{className:`ripple-course-body`,children:[At,jt]}),t[130]=At,t[131]=jt,t[132]=Mt):Mt=t[132];let Nt;return t[133]!==Et||t[134]!==Dt||t[135]!==Mt?(Nt=(0,S.jsxs)(`div`,{className:`ripple-course`,children:[Et,Dt,Mt]}),t[133]=Et,t[134]=Dt,t[135]=Mt,t[136]=Nt):Nt=t[136],Nt}function I(e,t){return(0,S.jsx)(`li`,{children:e},t)}function L(e,t){return(0,S.jsx)(`li`,{children:e},t)}function R(e){return(0,S.jsx)(`li`,{children:e},e)}function z(e){return{value:e.name,label:e.name}}function B(e){return e.path}function re(e){return{front:e.question,back:e.answer}}function ie(e,t){return e+(t.minutes??0)}function ae(e){return e+1}export{F as ShipCourse};
@@ -1 +1 @@
1
- import{t as e}from"./compiler-runtime-qQQXpJgv.js";import{t}from"./jsx-runtime-DeHZSEgm.js";import{tt as n}from"./index-Dk0QapqQ.js";import{t as r}from"./Orb-D8lhTdmY.js";var i=e(),a=t(),o=[{title:`Chicago · 4-Day Architectu…`,time:`3:14`,snip:`help me plan a trip t…`,tone:`blue`},{title:`Chicago · 4-Day Culinary…`,time:`3:14`,snip:`what are the restaura…`,tone:`green`},{title:`Chicago · 4-Day Itinerary`,time:`3:14`,snip:`what other things sh…`,tone:`amber`,active:!0}],s=[{name:`Speakeasies`,tag:`Hidden & exclusive`,w:`48%`,tone:`presence`},{name:`Live music`,tag:`Blues & jazz`,w:`78%`,tone:`warning`},{name:`Cocktail bars`,tag:`Modern & craft`,w:`46%`,tone:`presence`}],c=[`Reservations are essential for popular speakeasies.`,`Check the music schedule for blues clubs in advance.`,`Use the “L” train or a rideshare; parking is difficult.`,`Dress codes vary; check the venue’s site before going.`],l=[{left:`62%`,top:`34%`,tone:`presence`,n:`2`},{left:`54%`,top:`66%`,tone:`warning`,n:`3`},{left:`60%`,top:`70%`,tone:`insight`,n:`1`,ring:!0}];function u(e){let t=[];for(let n=-48;n<=448;n+=24)t.push(e?`M${n},-48 V248`:`M-48,${n} H448`);return t.join(` `)}function d(){let e=(0,i.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(`rect`,{className:`fl-m-land`,width:`400`,height:`200`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,a.jsx)(`path`,{className:`fl-m-minor`,d:u(!0)}),e[1]=n):n=e[1];let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,a.jsxs)(`svg`,{className:`fl-map-art`,viewBox:`0 0 400 200`,preserveAspectRatio:`xMidYMid slice`,"aria-hidden":`true`,children:[t,(0,a.jsxs)(`g`,{className:`fl-m-streets`,transform:`rotate(-8 200 100)`,children:[n,(0,a.jsx)(`path`,{className:`fl-m-minor`,d:u(!1)}),(0,a.jsx)(`path`,{className:`fl-m-major`,d:`M88,-48 V248 M168,-48 V248 M248,-48 V248`}),(0,a.jsx)(`path`,{className:`fl-m-major`,d:`M-48,64 H448 M-48,128 H448`}),(0,a.jsx)(`path`,{className:`fl-m-major`,d:`M-10,214 L300,-14`})]}),(0,a.jsx)(`path`,{className:`fl-m-park`,d:`M196,132 C218,124 244,128 250,146 C255,162 236,176 214,174 C192,172 180,152 196,132 Z`}),(0,a.jsx)(`path`,{className:`fl-m-river`,d:`M284,36 C238,52 206,44 168,58 C136,70 104,62 70,76`}),(0,a.jsx)(`path`,{className:`fl-m-water`,d:`M285,0 C270,60 276,140 262,200 L400,200 L400,0 Z`}),(0,a.jsx)(`path`,{className:`fl-m-shore`,d:`M285,0 C270,60 276,140 262,200`}),(0,a.jsx)(`path`,{className:`fl-m-current`,d:`M310,52 C326,46 342,50 356,42`}),(0,a.jsx)(`path`,{className:`fl-m-current`,d:`M318,120 C336,114 350,120 366,110`})]}),e[2]=r):r=e[2],r}function f(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n,{eyebrow:`The signature move`,children:[`It listens. It speaks. `,(0,a.jsx)(`em`,{children:`Then it draws.`})]}),(0,a.jsxs)(`div`,{className:`fl-window`,children:[(0,a.jsxs)(`div`,{className:`fl-window-bar`,children:[(0,a.jsx)(`span`,{className:`fl-light r`}),(0,a.jsx)(`span`,{className:`fl-light y`}),(0,a.jsx)(`span`,{className:`fl-light g`}),(0,a.jsxs)(`div`,{className:`fl-window-title`,children:[(0,a.jsx)(r,{size:18,className:`fl-orb-inline`}),(0,a.jsx)(`span`,{className:`fl-window-topic`,children:`Chicago Nightlife: A Curated Guide`}),(0,a.jsx)(`span`,{className:`fl-live`,style:{color:`var(--text-muted)`},children:`Example`})]})]}),(0,a.jsxs)(`div`,{className:`fl-window-body`,children:[(0,a.jsxs)(`aside`,{className:`fl-rail`,children:[(0,a.jsxs)(`div`,{className:`fl-rail-head`,children:[(0,a.jsx)(`span`,{children:`This session`}),(0,a.jsx)(`span`,{className:`fl-rail-chip`,children:`Replay`})]}),o.map(e=>(0,a.jsxs)(`div`,{className:`fl-rail-row`+(e.active?` active`:``),children:[(0,a.jsx)(`div`,{className:`fl-rail-title tone-`+e.tone,children:e.title}),(0,a.jsxs)(`div`,{className:`fl-rail-snip`,children:[(0,a.jsx)(`span`,{className:`fl-rail-time`,children:e.time}),(0,a.jsx)(`span`,{className:`fl-rail-text`,children:e.snip})]})]},e.title))]}),(0,a.jsxs)(`div`,{className:`fl-canvas`,children:[(0,a.jsxs)(`div`,{className:`fl-finding`,children:[(0,a.jsxs)(`div`,{className:`fl-finding-kicker`,children:[(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:`M12 2l1.6 6.4L20 10l-6.4 1.6L12 18l-1.6-6.4L4 10l6.4-1.6z`})}),`Finding 1`]}),(0,a.jsx)(`div`,{className:`fl-finding-title`,children:`The Chicago after-dark vibe`}),(0,a.jsxs)(`p`,{className:`fl-finding-text`,children:[`Chicago’s nightlife thrives on variety. Whether you’re after a quiet, high-end cocktail lounge or a high-energy blues bar, there’s a district for it.`,(0,a.jsx)(`span`,{className:`fl-caret`})]}),(0,a.jsx)(`span`,{className:`fl-badge inferred`,children:`Inferred`})]}),(0,a.jsxs)(`div`,{className:`fl-fig`,children:[(0,a.jsx)(`div`,{className:`fl-fig-label`,children:`Fig. 1 — Nightlife hotspots`}),(0,a.jsxs)(`div`,{className:`fl-map`,children:[(0,a.jsx)(d,{}),(0,a.jsxs)(`div`,{className:`fl-map-zoom`,children:[(0,a.jsx)(`span`,{children:`+`}),(0,a.jsx)(`span`,{children:`−`})]}),l.map((e,t)=>(0,a.jsx)(`span`,{className:`fl-pin tone-`+e.tone+(e.ring?` ring`:``),style:{left:e.left,top:e.top,"--pin-i":String(t)},children:e.n},e.n)),(0,a.jsx)(`span`,{className:`fl-map-attr`,children:`Illustrated map`})]}),(0,a.jsx)(`div`,{className:`fl-fig-note`,children:`Illustrated example · 3 locations`})]}),(0,a.jsxs)(`div`,{className:`fl-cardrow`,children:[(0,a.jsxs)(`div`,{className:`fl-mini`,children:[(0,a.jsx)(`div`,{className:`fl-mini-label`,children:`▦ Nightlife categories`}),s.map((e,t)=>(0,a.jsxs)(`div`,{className:`fl-bar`,children:[(0,a.jsxs)(`div`,{className:`fl-bar-top`,children:[(0,a.jsx)(`span`,{className:`fl-bar-name`,children:e.name}),(0,a.jsx)(`span`,{className:`fl-bar-tag`,children:e.tag})]}),(0,a.jsx)(`div`,{className:`fl-bar-track`,children:(0,a.jsx)(`div`,{className:`fl-bar-fill tone-`+e.tone,style:{"--w":e.w,"--bar-i":String(t)}})})]},e.name))]}),(0,a.jsxs)(`div`,{className:`fl-mini`,children:[(0,a.jsx)(`div`,{className:`fl-mini-label`,children:`✦ Pro-tips for Chicago nights`}),c.map((e,t)=>(0,a.jsxs)(`div`,{className:`fl-tip`,style:{"--tip-i":String(t)},children:[(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{pathLength:1,d:`M20 6L9 17l-5-5`})}),(0,a.jsx)(`span`,{children:e})]},e))]})]}),(0,a.jsxs)(`div`,{className:`fl-dock`,children:[(0,a.jsx)(`span`,{className:`fl-dock-mic`,children:(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:`M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3zM5 11a7 7 0 0 0 14 0M12 18v3`})})}),(0,a.jsx)(`span`,{className:`fl-dock-text`,children:`Talk, or type — anything.`}),(0,a.jsxs)(`span`,{className:`fl-dock-mark`,children:[(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:`M3 21l3.2-.9L18 8.3l-2.3-2.3L4 17.6 3 21z M14.7 7l2.3 2.3`})}),`Highlight`]}),(0,a.jsx)(`span`,{className:`fl-dock-send`,children:(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:`M5 12h14M13 6l6 6-6 6`})})})]})]})]})]})]})}export{f as SignatureLoop};
1
+ import{t as e}from"./compiler-runtime-qQQXpJgv.js";import{t}from"./jsx-runtime-DeHZSEgm.js";import{tt as n}from"./index-zIa6h_8b.js";import{t as r}from"./Orb-D8lhTdmY.js";var i=e(),a=t(),o=[{title:`Chicago · 4-Day Architectu…`,time:`3:14`,snip:`help me plan a trip t…`,tone:`blue`},{title:`Chicago · 4-Day Culinary…`,time:`3:14`,snip:`what are the restaura…`,tone:`green`},{title:`Chicago · 4-Day Itinerary`,time:`3:14`,snip:`what other things sh…`,tone:`amber`,active:!0}],s=[{name:`Speakeasies`,tag:`Hidden & exclusive`,w:`48%`,tone:`presence`},{name:`Live music`,tag:`Blues & jazz`,w:`78%`,tone:`warning`},{name:`Cocktail bars`,tag:`Modern & craft`,w:`46%`,tone:`presence`}],c=[`Reservations are essential for popular speakeasies.`,`Check the music schedule for blues clubs in advance.`,`Use the “L” train or a rideshare; parking is difficult.`,`Dress codes vary; check the venue’s site before going.`],l=[{left:`62%`,top:`34%`,tone:`presence`,n:`2`},{left:`54%`,top:`66%`,tone:`warning`,n:`3`},{left:`60%`,top:`70%`,tone:`insight`,n:`1`,ring:!0}];function u(e){let t=[];for(let n=-48;n<=448;n+=24)t.push(e?`M${n},-48 V248`:`M-48,${n} H448`);return t.join(` `)}function d(){let e=(0,i.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(`rect`,{className:`fl-m-land`,width:`400`,height:`200`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,a.jsx)(`path`,{className:`fl-m-minor`,d:u(!0)}),e[1]=n):n=e[1];let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,a.jsxs)(`svg`,{className:`fl-map-art`,viewBox:`0 0 400 200`,preserveAspectRatio:`xMidYMid slice`,"aria-hidden":`true`,children:[t,(0,a.jsxs)(`g`,{className:`fl-m-streets`,transform:`rotate(-8 200 100)`,children:[n,(0,a.jsx)(`path`,{className:`fl-m-minor`,d:u(!1)}),(0,a.jsx)(`path`,{className:`fl-m-major`,d:`M88,-48 V248 M168,-48 V248 M248,-48 V248`}),(0,a.jsx)(`path`,{className:`fl-m-major`,d:`M-48,64 H448 M-48,128 H448`}),(0,a.jsx)(`path`,{className:`fl-m-major`,d:`M-10,214 L300,-14`})]}),(0,a.jsx)(`path`,{className:`fl-m-park`,d:`M196,132 C218,124 244,128 250,146 C255,162 236,176 214,174 C192,172 180,152 196,132 Z`}),(0,a.jsx)(`path`,{className:`fl-m-river`,d:`M284,36 C238,52 206,44 168,58 C136,70 104,62 70,76`}),(0,a.jsx)(`path`,{className:`fl-m-water`,d:`M285,0 C270,60 276,140 262,200 L400,200 L400,0 Z`}),(0,a.jsx)(`path`,{className:`fl-m-shore`,d:`M285,0 C270,60 276,140 262,200`}),(0,a.jsx)(`path`,{className:`fl-m-current`,d:`M310,52 C326,46 342,50 356,42`}),(0,a.jsx)(`path`,{className:`fl-m-current`,d:`M318,120 C336,114 350,120 366,110`})]}),e[2]=r):r=e[2],r}function f(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n,{eyebrow:`The signature move`,children:[`It listens. It speaks. `,(0,a.jsx)(`em`,{children:`Then it draws.`})]}),(0,a.jsxs)(`div`,{className:`fl-window`,children:[(0,a.jsxs)(`div`,{className:`fl-window-bar`,children:[(0,a.jsx)(`span`,{className:`fl-light r`}),(0,a.jsx)(`span`,{className:`fl-light y`}),(0,a.jsx)(`span`,{className:`fl-light g`}),(0,a.jsxs)(`div`,{className:`fl-window-title`,children:[(0,a.jsx)(r,{size:18,className:`fl-orb-inline`}),(0,a.jsx)(`span`,{className:`fl-window-topic`,children:`Chicago Nightlife: A Curated Guide`}),(0,a.jsx)(`span`,{className:`fl-live`,style:{color:`var(--text-muted)`},children:`Example`})]})]}),(0,a.jsxs)(`div`,{className:`fl-window-body`,children:[(0,a.jsxs)(`aside`,{className:`fl-rail`,children:[(0,a.jsxs)(`div`,{className:`fl-rail-head`,children:[(0,a.jsx)(`span`,{children:`This session`}),(0,a.jsx)(`span`,{className:`fl-rail-chip`,children:`Replay`})]}),o.map(e=>(0,a.jsxs)(`div`,{className:`fl-rail-row`+(e.active?` active`:``),children:[(0,a.jsx)(`div`,{className:`fl-rail-title tone-`+e.tone,children:e.title}),(0,a.jsxs)(`div`,{className:`fl-rail-snip`,children:[(0,a.jsx)(`span`,{className:`fl-rail-time`,children:e.time}),(0,a.jsx)(`span`,{className:`fl-rail-text`,children:e.snip})]})]},e.title))]}),(0,a.jsxs)(`div`,{className:`fl-canvas`,children:[(0,a.jsxs)(`div`,{className:`fl-finding`,children:[(0,a.jsxs)(`div`,{className:`fl-finding-kicker`,children:[(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:`M12 2l1.6 6.4L20 10l-6.4 1.6L12 18l-1.6-6.4L4 10l6.4-1.6z`})}),`Finding 1`]}),(0,a.jsx)(`div`,{className:`fl-finding-title`,children:`The Chicago after-dark vibe`}),(0,a.jsxs)(`p`,{className:`fl-finding-text`,children:[`Chicago’s nightlife thrives on variety. Whether you’re after a quiet, high-end cocktail lounge or a high-energy blues bar, there’s a district for it.`,(0,a.jsx)(`span`,{className:`fl-caret`})]}),(0,a.jsx)(`span`,{className:`fl-badge inferred`,children:`Inferred`})]}),(0,a.jsxs)(`div`,{className:`fl-fig`,children:[(0,a.jsx)(`div`,{className:`fl-fig-label`,children:`Fig. 1 — Nightlife hotspots`}),(0,a.jsxs)(`div`,{className:`fl-map`,children:[(0,a.jsx)(d,{}),(0,a.jsxs)(`div`,{className:`fl-map-zoom`,children:[(0,a.jsx)(`span`,{children:`+`}),(0,a.jsx)(`span`,{children:`−`})]}),l.map((e,t)=>(0,a.jsx)(`span`,{className:`fl-pin tone-`+e.tone+(e.ring?` ring`:``),style:{left:e.left,top:e.top,"--pin-i":String(t)},children:e.n},e.n)),(0,a.jsx)(`span`,{className:`fl-map-attr`,children:`Illustrated map`})]}),(0,a.jsx)(`div`,{className:`fl-fig-note`,children:`Illustrated example · 3 locations`})]}),(0,a.jsxs)(`div`,{className:`fl-cardrow`,children:[(0,a.jsxs)(`div`,{className:`fl-mini`,children:[(0,a.jsx)(`div`,{className:`fl-mini-label`,children:`▦ Nightlife categories`}),s.map((e,t)=>(0,a.jsxs)(`div`,{className:`fl-bar`,children:[(0,a.jsxs)(`div`,{className:`fl-bar-top`,children:[(0,a.jsx)(`span`,{className:`fl-bar-name`,children:e.name}),(0,a.jsx)(`span`,{className:`fl-bar-tag`,children:e.tag})]}),(0,a.jsx)(`div`,{className:`fl-bar-track`,children:(0,a.jsx)(`div`,{className:`fl-bar-fill tone-`+e.tone,style:{"--w":e.w,"--bar-i":String(t)}})})]},e.name))]}),(0,a.jsxs)(`div`,{className:`fl-mini`,children:[(0,a.jsx)(`div`,{className:`fl-mini-label`,children:`✦ Pro-tips for Chicago nights`}),c.map((e,t)=>(0,a.jsxs)(`div`,{className:`fl-tip`,style:{"--tip-i":String(t)},children:[(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{pathLength:1,d:`M20 6L9 17l-5-5`})}),(0,a.jsx)(`span`,{children:e})]},e))]})]}),(0,a.jsxs)(`div`,{className:`fl-dock`,children:[(0,a.jsx)(`span`,{className:`fl-dock-mic`,children:(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:`M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3zM5 11a7 7 0 0 0 14 0M12 18v3`})})}),(0,a.jsx)(`span`,{className:`fl-dock-text`,children:`Talk, or type — anything.`}),(0,a.jsxs)(`span`,{className:`fl-dock-mark`,children:[(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:`M3 21l3.2-.9L18 8.3l-2.3-2.3L4 17.6 3 21z M14.7 7l2.3 2.3`})}),`Highlight`]}),(0,a.jsx)(`span`,{className:`fl-dock-send`,children:(0,a.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,a.jsx)(`path`,{d:`M5 12h14M13 6l6 6-6 6`})})})]})]})]})]})]})}export{f as SignatureLoop};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PrismOverlay-D1cDZamt.js","assets/rolldown-runtime-DkW27tQK.js","assets/react-BZJXY1be.js","assets/compiler-runtime-qQQXpJgv.js","assets/jsx-runtime-DeHZSEgm.js","assets/preload-helper-CiWYd9n-.js","assets/cachedImport-DW0gP14h.js","assets/preloadableLazy-MIX1ApBW.js","assets/lazyRetry-D50B1UMY.js","assets/index-Dk0QapqQ.js","assets/useInView-CXTOAEV3.js","assets/coreIcons-DDTChE1H.js","assets/theme-7IrMJ70_.js","assets/index-DmKgC_TJ.css","assets/useFocusTrap-DBtkeyRy.js","assets/toast-BBNs2h3L.js","assets/sourceHost-BV3t2XDb.js","assets/penStrokes-DlHnO9xE.js","assets/gesture-Bouqjr3g.js","assets/attachments-BW-vki-E.js","assets/types-CaO6xOn5.js","assets/providers-BovElgRL.js","assets/http-Lar_UMKb.js","assets/blockTypes-DUDdP3pB.js","assets/info-CiqHR5cs.js","assets/verbatim-DBTj9sPD.js","assets/officeDoc-GU6Cssjf.js","assets/csv-DAqzYXUs.js","assets/pen-DNMslo3e.js","assets/streamParse-B-Gjwa9T.js","assets/citation-BsSvaaer.js","assets/search-ZN7v_P5B.js","assets/PrismOverlay-BTfAicBt.css","assets/SynthesisOverlay-DLvwiSMv.js"])))=>i.map(i=>d[i]);
2
- import{t as e}from"./react-BZJXY1be.js";import{t}from"./jsx-runtime-DeHZSEgm.js";import{n,t as r}from"./preload-helper-CiWYd9n-.js";import{n as i,t as a}from"./preloadableLazy-MIX1ApBW.js";import{n as o,t as s}from"./theme-7IrMJ70_.js";import{k as c}from"./index-Dk0QapqQ.js";import{n as l}from"./icons-gLFQTv74.js";import{t as u}from"./FeatureUseNotice-Dc8joBGM.js";import{t as d}from"./homeTarget-CsO8nY7z.js";import{n as f,p,r as m,s as h,u as g}from"./attachments-BW-vki-E.js";import{l as _,n as v}from"./useLiveConfig-Cpy0_E_-.js";import{l as y,s as b}from"./officeDoc-GU6Cssjf.js";/* empty css */var x=e(),S=/\.(pdf|docx|pptx|xlsx|csv|tsv|txt|text|md|markdown|json|jsonl|ndjson|ya?ml|toml|xml|log|tab|js|ts|jsx|tsx|py|rb|go|rs|java|c|h|cpp|cs|sh|sql|css|html?)$/i,C=/(^|\/)(\.git|node_modules|\.DS_Store|__pycache__|\.venv|dist|build|__MACOSX)(\/|$)/i;function w(e){return e.filter(e=>{let t=e.webkitRelativePath||e.name;return S.test(e.name)&&!C.test(t)})}async function T(e,t={}){let{max:n=200,onProgress:r}=t,i=w(e),a=i.slice(0,n),o=[];for(let e=0;e<a.length;e+=1){let t=await g(a[e]);t.ok&&t.attachment&&o.push(t.attachment),r?.(e+1,a.length)}return{sources:o,skipped:i.length-o.length}}var E={docx:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,pptx:`application/vnd.openxmlformats-officedocument.presentationml.presentation`,xlsx:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`};function D(e){let t=e.split(`.`).pop()?.toLowerCase()??``;return t===`pdf`?`application/pdf`:E[t]??``}async function O(e){let t;try{t=await y(e.data?b(e.data):await m(e))}catch{return[]}if(!t)return[];let n=[];for(let[e,r]of t){if(n.length>=200)break;if(e.endsWith(`/`)||r.length===0||C.test(e))continue;let t=e.split(`/`).pop()??e;if(!t||t.startsWith(`.`))continue;let i={name:t,mime:D(t),data:``,size:r.length,bytes:Uint8Array.from(r).buffer};p(i)&&n.push(i)}return n}function k(e){return e.mime===`application/zip`||e.mime===`application/x-zip-compressed`||/\.zip$/i.test(e.name)}var A=[[`Foci et al. 2024. In the treatment arm we observed 42% improvement at 12 weeks on the primary endpoint. No serious adverse events were reported over the study period.`],[`Maso et al. 2023. Across the full cohort there was no significant effect at 24 weeks on the relapse rate, a secondary endpoint.`],[`Nyra 2024. The trial recorded 38% improvement at 12 weeks in the treatment arm, with mild adverse events in 12% of patients. Adoption remains limited outside academic centers.`],[`Cost Review 2023. The analysis finds the annual treatment cost is $18,400 per patient at list price.`],[`Ledger 2022. After rebates, the intervention costs $9,200 per patient annually.`],[`Adoption Survey 2024. Among surveyed sites, 62% of clinics adopted the protocol within the first year.`]],j={sources:[{id:`s0`,fileName:`foci-2024.pdf`,kind:`pdf`,pageCount:1,label:`Foci et al. 2024`},{id:`s1`,fileName:`maso-2023.pdf`,kind:`pdf`,pageCount:1,label:`Maso et al. 2023`},{id:`s2`,fileName:`nyra-2024.pdf`,kind:`pdf`,pageCount:1,label:`Nyra 2024`},{id:`s3`,fileName:`cost-review-2023.pdf`,kind:`pdf`,pageCount:1,label:`Cost Review 2023`},{id:`s4`,fileName:`ledger-2022.pdf`,kind:`pdf`,pageCount:1,label:`Ledger 2022`},{id:`s5`,fileName:`adoption-survey-2024.pdf`,kind:`pdf`,pageCount:1,label:`Adoption Survey 2024`}],themes:[{id:`Efficacy`,name:`Efficacy`,sourceCount:3,claimCount:3},{id:`Safety`,name:`Safety`,sourceCount:2,claimCount:2},{id:`Cost`,name:`Cost`,sourceCount:2,claimCount:2},{id:`Adoption`,name:`Adoption`,sourceCount:2,claimCount:2}],claims:[{id:`s0c0`,quote:`42% improvement at 12 weeks on the primary endpoint`,page:1,kind:`stat`,title:`42% improvement at 12 weeks`,ask:`On which endpoint?`,role:`load-bearing`,region:`Efficacy`,source:0},{id:`s1c0`,quote:`no significant effect at 24 weeks on the relapse rate`,page:1,kind:`finding`,title:`No effect at 24 weeks`,ask:`Which endpoint?`,role:`load-bearing`,region:`Efficacy`,source:1},{id:`s2c0`,quote:`38% improvement at 12 weeks in the treatment arm`,page:1,kind:`stat`,title:`38% improvement at 12 weeks`,ask:`How measured?`,role:`supporting`,region:`Efficacy`,source:2},{id:`s0c1`,quote:`No serious adverse events were reported`,page:1,kind:`finding`,title:`No serious adverse events`,ask:`Over what period?`,role:`supporting`,region:`Safety`,source:0},{id:`s2c1`,quote:`mild adverse events in 12% of patients`,page:1,kind:`risk`,title:`Mild adverse events in 12%`,ask:`Which events?`,role:`supporting`,region:`Safety`,source:2},{id:`s3c0`,quote:`annual treatment cost is $18,400 per patient`,page:1,kind:`stat`,title:`Cost $18,400 per patient`,ask:`List or net price?`,role:`load-bearing`,region:`Cost`,source:3},{id:`s4c0`,quote:`the intervention costs $9,200 per patient annually`,page:1,kind:`stat`,title:`Cost $9,200 per patient`,ask:`Before or after rebates?`,role:`load-bearing`,region:`Cost`,source:4},{id:`s5c0`,quote:`62% of clinics adopted the protocol`,page:1,kind:`stat`,title:`62% of clinics adopted`,ask:`Over what window?`,role:`supporting`,region:`Adoption`,source:5},{id:`s2c2`,quote:`Adoption remains limited outside academic centers`,page:1,kind:`finding`,title:`Limited outside academia`,ask:`Why limited?`,role:`context`,region:`Adoption`,source:2}],threads:[{a:`s0c0`,b:`s1c0`,relation:`in-tension`,crossDoc:!0},{a:`s3c0`,b:`s4c0`,relation:`contradicts`,crossDoc:!0},{a:`s0c0`,b:`s2c0`,relation:`agrees`,crossDoc:!0}],contradictions:[{id:`x0`,theme:`Efficacy`,a:`s0c0`,b:`s1c0`,relation:`in-tension`,sharedQuantity:`drug efficacy`,comparable:!1,caveat:`timeframe`,label:`Two trials disagree on efficacy`,seedQuestion:`Are these comparable? "42% improvement at 12 weeks" (12week) vs "No effect at 24 weeks" (24week) — do they measure the same endpoint, population, and timeframe?`},{id:`x1`,theme:`Cost`,a:`s3c0`,b:`s4c0`,relation:`contradicts`,sharedQuantity:`annual treatment cost`,comparable:!0,matchPhrase:`per patient`,delta:{aValue:18400,bValue:9200,unit:`$`},label:`Sources disagree on annual treatment cost`,seedQuestion:`Are these comparable? "Cost $18,400 per patient" (unspecified scope) vs "Cost $9,200 per patient" (unspecified scope) — do they measure the same endpoint, population, and timeframe?`}],gaps:[{id:`g0`,theme:`Safety`,facet:{id:`f0`,label:`Pediatric population`,surfaceForms:[`pediatric`,`paediatric`,`children`,`under 18`]},sourcesScanned:6,coveredCount:0,kind:`absent`,searchedForms:[`pediatric`,`paediatric`,`children`,`under 18`],label:`No coverage — Pediatric population`},{id:`g1`,theme:`Efficacy`,facet:{id:`f1`,label:`Long-term outcomes`,surfaceForms:[`long-term`,`long term`,`follow-up`,`5-year`]},sourcesScanned:6,coveredCount:0,kind:`absent`,searchedForms:[`long-term`,`long term`,`follow-up`,`5-year`],label:`No coverage — Long-term outcomes`}],consensus:[{id:`c0`,theme:`Efficacy`,proposition:`The treatment improves the primary endpoint at 12 weeks.`,memberClaimIds:[`s0c0`,`s2c0`],sourceCount:2,corpusSize:6,band:{unit:`%`,min:38,max:42}}],counts:{contradictions:2,gaps:2,consensus:2},pageCount:6},M=t();n();var N=a(()=>r(()=>import(`./PrismOverlay-D1cDZamt.js`).then(e=>e.n).then(e=>({default:e.PrismOverlay})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]))),P=a(()=>r(()=>import(`./SynthesisOverlay-DLvwiSMv.js`).then(e=>({default:e.SynthesisOverlay})),__vite__mapDeps([33,2,1,3,4,19,21,22,23,24,25,0,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,26,27,28,29,30,31,32]))),F=N.Component,I=P.Component,L=Math.round(f/1048576);async function R(e){return{name:e.name,mime:e.type||`application/zip`,data:``,size:e.size,file:e}}function z(){let e=d();(0,x.useEffect)(()=>s(o()),[]);let[t,n]=(0,x.useState)([]),[r,a]=(0,x.useState)(null),[f,p]=(0,x.useState)(!1),[m,g]=(0,x.useState)(!1),[y,b]=(0,x.useState)(null),S=(0,x.useRef)(null),C=(0,x.useRef)(null);(0,x.useEffect)(()=>{let e=C.current;e&&(e.setAttribute(`webkitdirectory`,``),e.setAttribute(`directory`,``))},[]);let w=(0,x.useMemo)(()=>_(v()),[]),[E]=(0,x.useState)(()=>new URLSearchParams(window.location.hash.split(`?`)[1]??``).get(`demo`)===`1`),D=(0,x.useCallback)(async e=>{if(!e||e.length===0)return;P.preload().catch(()=>{}),g(!0),b(null);let r=Array.from(e),i=r.filter(e=>B(e)&&e.size<=41943040),a=r.filter(e=>B(e)&&e.size>41943040),o=r.filter(e=>!B(e));try{let e=[],r=await T(o);e.push(...r.sources);for(let t of i)try{e.push(...await O(await R(t)))}catch{}n(t=>{let n=new Set(t.map(V)),r=[...t,...e.filter(e=>!n.has(V(e)))];return r.length>200?r.slice(0,200):r}),a.length>0?b(`Archive is too large — up to ${L} MB per .zip.`):e.length===0?b(`No readable sources found. Add PDFs, docs, or text/data files.`):t.length+e.length>200&&b(`Capped at 200 sources.`)}catch{b(`Those files couldn't be read. Try PDFs, docs, or text/data files.`)}finally{g(!1),S.current&&(S.current.value=``),C.current&&(C.current.value=``)}},[t.length]),k=(0,x.useCallback)(e=>{n(t=>t.filter((t,n)=>n!==e))},[]),z=(0,x.useCallback)(e=>{e.preventDefault(),p(!1),D(e.dataTransfer.files)},[D]);return E?(0,M.jsx)(c,{label:`Synthesis world`,overlay:!0,children:(0,M.jsx)(I,{cfg:w,demo:{spec:j,corpus:A},onClose:()=>{window.location.hash=e.href}})}):r?(0,M.jsx)(c,{label:r.mode===`prism`?`Prism workbench`:`Synthesis world`,overlay:!0,children:r.mode===`prism`?(0,M.jsx)(F,{pdf:r.sources,cfg:w,onClose:()=>a(null)}):(0,M.jsx)(I,{sources:r.sources,cfg:w,onClose:()=>a(null)})}):(0,M.jsxs)(`div`,{className:`prism-app`,children:[(0,M.jsxs)(`header`,{className:`prism-app-header`,children:[(0,M.jsx)(`button`,{type:`button`,className:`prism-app-back`,onClick:()=>{window.location.hash=e.href},"aria-label":`Back to ${e.label}`,title:`Back to ${e.label}`,children:(0,M.jsx)(l.chevL,{})}),(0,M.jsx)(`span`,{className:`prism-app-brand`,children:`Synthesis`})]}),(0,M.jsxs)(`main`,{className:`prism-app-main`,children:[(0,M.jsxs)(`div`,{className:`prism-app-hero`,children:[(0,M.jsx)(`h1`,{className:`prism-app-title`,children:`Drop in 100 sources. Walk the one result.`}),(0,M.jsx)(`p`,{className:`prism-app-lede`,children:`Point Mavéa at a whole topic — a folder of papers, a data room, a quarter of notes — and it fuses them into one map: where they agree, where they fight, and where they’re silent.`}),(0,M.jsx)(u,{kind:`upload`})]}),(0,M.jsxs)(`div`,{className:`prism-dropzone${f?` prism-dropzone--over`:``}`,onDrop:z,onDragOver:e=>{e.preventDefault(),p(!0)},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||p(!1)},onClick:()=>S.current?.click(),role:`button`,tabIndex:0,"aria-label":`Add sources`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&S.current?.click()},...i(P.preload),children:[(0,M.jsx)(`input`,{ref:S,type:`file`,multiple:!0,className:`prism-dropzone-input`,onChange:e=>void D(e.target.files),"aria-hidden":`true`}),(0,M.jsx)(`input`,{ref:C,type:`file`,className:`prism-dropzone-input`,onChange:e=>void D(e.target.files),"aria-hidden":`true`}),(0,M.jsx)(l.upload,{}),(0,M.jsx)(`span`,{className:`prism-dropzone-label`,children:f?`Drop to add`:m?`Reading…`:`Drop a folder, a .zip, or files`}),(0,M.jsx)(`span`,{className:`prism-dropzone-hint`,children:`PDF · Word · Excel · PowerPoint · Text · CSV — or a whole folder / archive`}),(0,M.jsx)(`button`,{type:`button`,style:{marginTop:12,padding:`7px 16px`,whiteSpace:`nowrap`,borderRadius:`var(--r-full, 999px)`,border:`1px solid var(--line)`,background:`var(--surface-elevated)`,color:`var(--text-secondary)`,fontSize:13,cursor:`pointer`},onClick:e=>{e.stopPropagation(),C.current?.click()},children:`Choose a folder…`})]}),y&&(0,M.jsx)(`p`,{className:`prism-app-error`,role:`status`,children:y}),t.length>0&&(0,M.jsxs)(`div`,{className:`prism-staged`,children:[(0,M.jsx)(`p`,{className:`prism-staged-label`,children:t.length===1?`1 source ready`:`${t.length} sources ready`}),(0,M.jsx)(`ul`,{className:`prism-staged-list`,children:t.slice(0,60).map((e,t)=>(0,M.jsxs)(`li`,{className:`prism-staged-item`,children:[(0,M.jsx)(l.doc,{}),(0,M.jsx)(`span`,{className:`prism-staged-name`,children:h(e)}),(0,M.jsx)(`button`,{type:`button`,className:`prism-staged-remove`,onClick:e=>{e.stopPropagation(),k(t)},"aria-label":`Remove ${e.name}`,children:(0,M.jsx)(l.x,{})})]},`${V(e)}-${t}`))}),t.length>60&&(0,M.jsxs)(`p`,{className:`prism-staged-label`,children:[`+ `,t.length-60,` more`]}),(()=>{let e=e=>{(e===`prism`?N.preload():P.preload()).catch(()=>{}),a({sources:t,mode:e})},n=t.length;return n<=2?(0,M.jsxs)(`button`,{type:`button`,className:`prism-confirm-btn`,onClick:()=>e(`prism`),...i(N.preload),children:[n===1?`Open in Prism`:`Compare 2 documents`,(0,M.jsx)(l.chevR,{})]}):n===3?(0,M.jsxs)(`div`,{className:`prism-confirm-row`,children:[(0,M.jsx)(`button`,{type:`button`,className:`prism-confirm-btn prism-confirm-alt`,onClick:()=>e(`prism`),...i(N.preload),children:`Compare 3`}),(0,M.jsxs)(`button`,{type:`button`,className:`prism-confirm-btn`,onClick:()=>e(`synth`),...i(P.preload),children:[`Synthesize 3 sources`,(0,M.jsx)(l.chevR,{})]})]}):(0,M.jsxs)(`button`,{type:`button`,className:`prism-confirm-btn`,onClick:()=>e(`synth`),...i(P.preload),children:[`Synthesize `,n,` sources`,(0,M.jsx)(l.chevR,{})]})})()]})]})]})}function B(e){return k({name:e.name,mime:e.type,data:``,size:e.size})}function V(e){return`${e.name}:${e.size}`}export{z as SynthesisApp};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PrismOverlay-DJDGPGxo.js","assets/rolldown-runtime-DkW27tQK.js","assets/react-BZJXY1be.js","assets/compiler-runtime-qQQXpJgv.js","assets/jsx-runtime-DeHZSEgm.js","assets/preload-helper-CiWYd9n-.js","assets/cachedImport-DW0gP14h.js","assets/preloadableLazy-MIX1ApBW.js","assets/lazyRetry-D50B1UMY.js","assets/index-zIa6h_8b.js","assets/useInView-CXTOAEV3.js","assets/coreIcons-DDTChE1H.js","assets/theme-7IrMJ70_.js","assets/index-DrzNHwlO.css","assets/useFocusTrap-DBtkeyRy.js","assets/toast-BBNs2h3L.js","assets/sourceHost-BV3t2XDb.js","assets/penStrokes-DlHnO9xE.js","assets/gesture-Bouqjr3g.js","assets/attachments-BW-vki-E.js","assets/types-CaO6xOn5.js","assets/providers-BovElgRL.js","assets/http-Lar_UMKb.js","assets/blockTypes-DUDdP3pB.js","assets/info-CiqHR5cs.js","assets/verbatim-DBTj9sPD.js","assets/officeDoc-GU6Cssjf.js","assets/csv-DAqzYXUs.js","assets/pen-DNMslo3e.js","assets/streamParse-B-Gjwa9T.js","assets/citation-BsSvaaer.js","assets/search-ZN7v_P5B.js","assets/PrismOverlay-BTfAicBt.css","assets/SynthesisOverlay-iesJ0hEt.js"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./react-BZJXY1be.js";import{t}from"./jsx-runtime-DeHZSEgm.js";import{n,t as r}from"./preload-helper-CiWYd9n-.js";import{n as i,t as a}from"./preloadableLazy-MIX1ApBW.js";import{n as o,t as s}from"./theme-7IrMJ70_.js";import{k as c}from"./index-zIa6h_8b.js";import{n as l}from"./icons-gLFQTv74.js";import{t as u}from"./FeatureUseNotice-Dc3GNBvy.js";import{t as d}from"./homeTarget-CsO8nY7z.js";import{n as f,p,r as m,s as h,u as g}from"./attachments-BW-vki-E.js";import{l as _,n as v}from"./useLiveConfig-Cpy0_E_-.js";import{l as y,s as b}from"./officeDoc-GU6Cssjf.js";/* empty css */var x=e(),S=/\.(pdf|docx|pptx|xlsx|csv|tsv|txt|text|md|markdown|json|jsonl|ndjson|ya?ml|toml|xml|log|tab|js|ts|jsx|tsx|py|rb|go|rs|java|c|h|cpp|cs|sh|sql|css|html?)$/i,C=/(^|\/)(\.git|node_modules|\.DS_Store|__pycache__|\.venv|dist|build|__MACOSX)(\/|$)/i;function w(e){return e.filter(e=>{let t=e.webkitRelativePath||e.name;return S.test(e.name)&&!C.test(t)})}async function T(e,t={}){let{max:n=200,onProgress:r}=t,i=w(e),a=i.slice(0,n),o=[];for(let e=0;e<a.length;e+=1){let t=await g(a[e]);t.ok&&t.attachment&&o.push(t.attachment),r?.(e+1,a.length)}return{sources:o,skipped:i.length-o.length}}var E={docx:`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,pptx:`application/vnd.openxmlformats-officedocument.presentationml.presentation`,xlsx:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`};function D(e){let t=e.split(`.`).pop()?.toLowerCase()??``;return t===`pdf`?`application/pdf`:E[t]??``}async function O(e){let t;try{t=await y(e.data?b(e.data):await m(e))}catch{return[]}if(!t)return[];let n=[];for(let[e,r]of t){if(n.length>=200)break;if(e.endsWith(`/`)||r.length===0||C.test(e))continue;let t=e.split(`/`).pop()??e;if(!t||t.startsWith(`.`))continue;let i={name:t,mime:D(t),data:``,size:r.length,bytes:Uint8Array.from(r).buffer};p(i)&&n.push(i)}return n}function k(e){return e.mime===`application/zip`||e.mime===`application/x-zip-compressed`||/\.zip$/i.test(e.name)}var A=[[`Foci et al. 2024. In the treatment arm we observed 42% improvement at 12 weeks on the primary endpoint. No serious adverse events were reported over the study period.`],[`Maso et al. 2023. Across the full cohort there was no significant effect at 24 weeks on the relapse rate, a secondary endpoint.`],[`Nyra 2024. The trial recorded 38% improvement at 12 weeks in the treatment arm, with mild adverse events in 12% of patients. Adoption remains limited outside academic centers.`],[`Cost Review 2023. The analysis finds the annual treatment cost is $18,400 per patient at list price.`],[`Ledger 2022. After rebates, the intervention costs $9,200 per patient annually.`],[`Adoption Survey 2024. Among surveyed sites, 62% of clinics adopted the protocol within the first year.`]],j={sources:[{id:`s0`,fileName:`foci-2024.pdf`,kind:`pdf`,pageCount:1,label:`Foci et al. 2024`},{id:`s1`,fileName:`maso-2023.pdf`,kind:`pdf`,pageCount:1,label:`Maso et al. 2023`},{id:`s2`,fileName:`nyra-2024.pdf`,kind:`pdf`,pageCount:1,label:`Nyra 2024`},{id:`s3`,fileName:`cost-review-2023.pdf`,kind:`pdf`,pageCount:1,label:`Cost Review 2023`},{id:`s4`,fileName:`ledger-2022.pdf`,kind:`pdf`,pageCount:1,label:`Ledger 2022`},{id:`s5`,fileName:`adoption-survey-2024.pdf`,kind:`pdf`,pageCount:1,label:`Adoption Survey 2024`}],themes:[{id:`Efficacy`,name:`Efficacy`,sourceCount:3,claimCount:3},{id:`Safety`,name:`Safety`,sourceCount:2,claimCount:2},{id:`Cost`,name:`Cost`,sourceCount:2,claimCount:2},{id:`Adoption`,name:`Adoption`,sourceCount:2,claimCount:2}],claims:[{id:`s0c0`,quote:`42% improvement at 12 weeks on the primary endpoint`,page:1,kind:`stat`,title:`42% improvement at 12 weeks`,ask:`On which endpoint?`,role:`load-bearing`,region:`Efficacy`,source:0},{id:`s1c0`,quote:`no significant effect at 24 weeks on the relapse rate`,page:1,kind:`finding`,title:`No effect at 24 weeks`,ask:`Which endpoint?`,role:`load-bearing`,region:`Efficacy`,source:1},{id:`s2c0`,quote:`38% improvement at 12 weeks in the treatment arm`,page:1,kind:`stat`,title:`38% improvement at 12 weeks`,ask:`How measured?`,role:`supporting`,region:`Efficacy`,source:2},{id:`s0c1`,quote:`No serious adverse events were reported`,page:1,kind:`finding`,title:`No serious adverse events`,ask:`Over what period?`,role:`supporting`,region:`Safety`,source:0},{id:`s2c1`,quote:`mild adverse events in 12% of patients`,page:1,kind:`risk`,title:`Mild adverse events in 12%`,ask:`Which events?`,role:`supporting`,region:`Safety`,source:2},{id:`s3c0`,quote:`annual treatment cost is $18,400 per patient`,page:1,kind:`stat`,title:`Cost $18,400 per patient`,ask:`List or net price?`,role:`load-bearing`,region:`Cost`,source:3},{id:`s4c0`,quote:`the intervention costs $9,200 per patient annually`,page:1,kind:`stat`,title:`Cost $9,200 per patient`,ask:`Before or after rebates?`,role:`load-bearing`,region:`Cost`,source:4},{id:`s5c0`,quote:`62% of clinics adopted the protocol`,page:1,kind:`stat`,title:`62% of clinics adopted`,ask:`Over what window?`,role:`supporting`,region:`Adoption`,source:5},{id:`s2c2`,quote:`Adoption remains limited outside academic centers`,page:1,kind:`finding`,title:`Limited outside academia`,ask:`Why limited?`,role:`context`,region:`Adoption`,source:2}],threads:[{a:`s0c0`,b:`s1c0`,relation:`in-tension`,crossDoc:!0},{a:`s3c0`,b:`s4c0`,relation:`contradicts`,crossDoc:!0},{a:`s0c0`,b:`s2c0`,relation:`agrees`,crossDoc:!0}],contradictions:[{id:`x0`,theme:`Efficacy`,a:`s0c0`,b:`s1c0`,relation:`in-tension`,sharedQuantity:`drug efficacy`,comparable:!1,caveat:`timeframe`,label:`Two trials disagree on efficacy`,seedQuestion:`Are these comparable? "42% improvement at 12 weeks" (12week) vs "No effect at 24 weeks" (24week) — do they measure the same endpoint, population, and timeframe?`},{id:`x1`,theme:`Cost`,a:`s3c0`,b:`s4c0`,relation:`contradicts`,sharedQuantity:`annual treatment cost`,comparable:!0,matchPhrase:`per patient`,delta:{aValue:18400,bValue:9200,unit:`$`},label:`Sources disagree on annual treatment cost`,seedQuestion:`Are these comparable? "Cost $18,400 per patient" (unspecified scope) vs "Cost $9,200 per patient" (unspecified scope) — do they measure the same endpoint, population, and timeframe?`}],gaps:[{id:`g0`,theme:`Safety`,facet:{id:`f0`,label:`Pediatric population`,surfaceForms:[`pediatric`,`paediatric`,`children`,`under 18`]},sourcesScanned:6,coveredCount:0,kind:`absent`,searchedForms:[`pediatric`,`paediatric`,`children`,`under 18`],label:`No coverage — Pediatric population`},{id:`g1`,theme:`Efficacy`,facet:{id:`f1`,label:`Long-term outcomes`,surfaceForms:[`long-term`,`long term`,`follow-up`,`5-year`]},sourcesScanned:6,coveredCount:0,kind:`absent`,searchedForms:[`long-term`,`long term`,`follow-up`,`5-year`],label:`No coverage — Long-term outcomes`}],consensus:[{id:`c0`,theme:`Efficacy`,proposition:`The treatment improves the primary endpoint at 12 weeks.`,memberClaimIds:[`s0c0`,`s2c0`],sourceCount:2,corpusSize:6,band:{unit:`%`,min:38,max:42}}],counts:{contradictions:2,gaps:2,consensus:2},pageCount:6},M=t();n();var N=a(()=>r(()=>import(`./PrismOverlay-DJDGPGxo.js`).then(e=>e.n).then(e=>({default:e.PrismOverlay})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]))),P=a(()=>r(()=>import(`./SynthesisOverlay-iesJ0hEt.js`).then(e=>({default:e.SynthesisOverlay})),__vite__mapDeps([33,2,1,3,4,19,21,22,23,24,25,0,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,26,27,28,29,30,31,32]))),F=N.Component,I=P.Component,L=Math.round(f/1048576);async function R(e){return{name:e.name,mime:e.type||`application/zip`,data:``,size:e.size,file:e}}function z(){let e=d();(0,x.useEffect)(()=>s(o()),[]);let[t,n]=(0,x.useState)([]),[r,a]=(0,x.useState)(null),[f,p]=(0,x.useState)(!1),[m,g]=(0,x.useState)(!1),[y,b]=(0,x.useState)(null),S=(0,x.useRef)(null),C=(0,x.useRef)(null);(0,x.useEffect)(()=>{let e=C.current;e&&(e.setAttribute(`webkitdirectory`,``),e.setAttribute(`directory`,``))},[]);let w=(0,x.useMemo)(()=>_(v()),[]),[E]=(0,x.useState)(()=>new URLSearchParams(window.location.hash.split(`?`)[1]??``).get(`demo`)===`1`),D=(0,x.useCallback)(async e=>{if(!e||e.length===0)return;P.preload().catch(()=>{}),g(!0),b(null);let r=Array.from(e),i=r.filter(e=>B(e)&&e.size<=41943040),a=r.filter(e=>B(e)&&e.size>41943040),o=r.filter(e=>!B(e));try{let e=[],r=await T(o);e.push(...r.sources);for(let t of i)try{e.push(...await O(await R(t)))}catch{}n(t=>{let n=new Set(t.map(V)),r=[...t,...e.filter(e=>!n.has(V(e)))];return r.length>200?r.slice(0,200):r}),a.length>0?b(`Archive is too large — up to ${L} MB per .zip.`):e.length===0?b(`No readable sources found. Add PDFs, docs, or text/data files.`):t.length+e.length>200&&b(`Capped at 200 sources.`)}catch{b(`Those files couldn't be read. Try PDFs, docs, or text/data files.`)}finally{g(!1),S.current&&(S.current.value=``),C.current&&(C.current.value=``)}},[t.length]),k=(0,x.useCallback)(e=>{n(t=>t.filter((t,n)=>n!==e))},[]),z=(0,x.useCallback)(e=>{e.preventDefault(),p(!1),D(e.dataTransfer.files)},[D]);return E?(0,M.jsx)(c,{label:`Synthesis world`,overlay:!0,children:(0,M.jsx)(I,{cfg:w,demo:{spec:j,corpus:A},onClose:()=>{window.location.hash=e.href}})}):r?(0,M.jsx)(c,{label:r.mode===`prism`?`Prism workbench`:`Synthesis world`,overlay:!0,children:r.mode===`prism`?(0,M.jsx)(F,{pdf:r.sources,cfg:w,onClose:()=>a(null)}):(0,M.jsx)(I,{sources:r.sources,cfg:w,onClose:()=>a(null)})}):(0,M.jsxs)(`div`,{className:`prism-app`,children:[(0,M.jsxs)(`header`,{className:`prism-app-header`,children:[(0,M.jsx)(`button`,{type:`button`,className:`prism-app-back`,onClick:()=>{window.location.hash=e.href},"aria-label":`Back to ${e.label}`,title:`Back to ${e.label}`,children:(0,M.jsx)(l.chevL,{})}),(0,M.jsx)(`span`,{className:`prism-app-brand`,children:`Synthesis`})]}),(0,M.jsxs)(`main`,{className:`prism-app-main`,children:[(0,M.jsxs)(`div`,{className:`prism-app-hero`,children:[(0,M.jsx)(`h1`,{className:`prism-app-title`,children:`Drop in 100 sources. Walk the one result.`}),(0,M.jsx)(`p`,{className:`prism-app-lede`,children:`Point Mavéa at a whole topic — a folder of papers, a data room, a quarter of notes — and it fuses them into one map: where they agree, where they fight, and where they’re silent.`}),(0,M.jsx)(u,{kind:`upload`})]}),(0,M.jsxs)(`div`,{className:`prism-dropzone${f?` prism-dropzone--over`:``}`,onDrop:z,onDragOver:e=>{e.preventDefault(),p(!0)},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||p(!1)},onClick:()=>S.current?.click(),role:`button`,tabIndex:0,"aria-label":`Add sources`,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&S.current?.click()},...i(P.preload),children:[(0,M.jsx)(`input`,{ref:S,type:`file`,multiple:!0,className:`prism-dropzone-input`,onChange:e=>void D(e.target.files),"aria-hidden":`true`}),(0,M.jsx)(`input`,{ref:C,type:`file`,className:`prism-dropzone-input`,onChange:e=>void D(e.target.files),"aria-hidden":`true`}),(0,M.jsx)(l.upload,{}),(0,M.jsx)(`span`,{className:`prism-dropzone-label`,children:f?`Drop to add`:m?`Reading…`:`Drop a folder, a .zip, or files`}),(0,M.jsx)(`span`,{className:`prism-dropzone-hint`,children:`PDF · Word · Excel · PowerPoint · Text · CSV — or a whole folder / archive`}),(0,M.jsx)(`button`,{type:`button`,style:{marginTop:12,padding:`7px 16px`,whiteSpace:`nowrap`,borderRadius:`var(--r-full, 999px)`,border:`1px solid var(--line)`,background:`var(--surface-elevated)`,color:`var(--text-secondary)`,fontSize:13,cursor:`pointer`},onClick:e=>{e.stopPropagation(),C.current?.click()},children:`Choose a folder…`})]}),y&&(0,M.jsx)(`p`,{className:`prism-app-error`,role:`status`,children:y}),t.length>0&&(0,M.jsxs)(`div`,{className:`prism-staged`,children:[(0,M.jsx)(`p`,{className:`prism-staged-label`,children:t.length===1?`1 source ready`:`${t.length} sources ready`}),(0,M.jsx)(`ul`,{className:`prism-staged-list`,children:t.slice(0,60).map((e,t)=>(0,M.jsxs)(`li`,{className:`prism-staged-item`,children:[(0,M.jsx)(l.doc,{}),(0,M.jsx)(`span`,{className:`prism-staged-name`,children:h(e)}),(0,M.jsx)(`button`,{type:`button`,className:`prism-staged-remove`,onClick:e=>{e.stopPropagation(),k(t)},"aria-label":`Remove ${e.name}`,children:(0,M.jsx)(l.x,{})})]},`${V(e)}-${t}`))}),t.length>60&&(0,M.jsxs)(`p`,{className:`prism-staged-label`,children:[`+ `,t.length-60,` more`]}),(()=>{let e=e=>{(e===`prism`?N.preload():P.preload()).catch(()=>{}),a({sources:t,mode:e})},n=t.length;return n<=2?(0,M.jsxs)(`button`,{type:`button`,className:`prism-confirm-btn`,onClick:()=>e(`prism`),...i(N.preload),children:[n===1?`Open in Prism`:`Compare 2 documents`,(0,M.jsx)(l.chevR,{})]}):n===3?(0,M.jsxs)(`div`,{className:`prism-confirm-row`,children:[(0,M.jsx)(`button`,{type:`button`,className:`prism-confirm-btn prism-confirm-alt`,onClick:()=>e(`prism`),...i(N.preload),children:`Compare 3`}),(0,M.jsxs)(`button`,{type:`button`,className:`prism-confirm-btn`,onClick:()=>e(`synth`),...i(P.preload),children:[`Synthesize 3 sources`,(0,M.jsx)(l.chevR,{})]})]}):(0,M.jsxs)(`button`,{type:`button`,className:`prism-confirm-btn`,onClick:()=>e(`synth`),...i(P.preload),children:[`Synthesize `,n,` sources`,(0,M.jsx)(l.chevR,{})]})})()]})]})]})}function B(e){return k({name:e.name,mime:e.type,data:``,size:e.size})}function V(e){return`${e.name}:${e.size}`}export{z as SynthesisApp};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./react-BZJXY1be.js";import{t}from"./compiler-runtime-qQQXpJgv.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{h as r,v as i}from"./attachments-BW-vki-E.js";import{t as a}from"./providers-BovElgRL.js";import{i as o,n as s}from"./verbatim-DBTj9sPD.js";import{a as c,i as l,o as u,r as d,s as f,t as p}from"./PrismOverlay-D1cDZamt.js";import{f as m}from"./pen-DNMslo3e.js";var h=e(),g=t(),_=/[a-z0-9]{4,}/g;function v(e){return new Set(e.toLowerCase().match(_)??[])}function y(e,t){if(e.size===0||t.size===0)return 0;let n=0;for(let r of e)t.has(r)&&(n+=1);return n/(e.size+t.size-n)}function b(e,t=12){let n=new Map;for(let t of e.toLowerCase().match(_)??[])n.set(t,(n.get(t)??0)+1);return[...n.entries()].sort((e,t)=>t[1]-e[1]||(e[0]<t[0]?-1:1)).slice(0,t).map(([e])=>e)}function x(e,t=2){return e.replace(/\s+/g,` `).split(/(?<=[.!?])\s+/).map(e=>e.trim()).filter(Boolean).slice(0,t)}var S={thousand:1e3,k:1e3,million:1e6,m:1e6,billion:1e9,bn:1e9,b:1e9,trillion:0xe8d4a51000};function C(e){let t=e.toLowerCase();return t===`%`||t===`percent`||t===`pct`?`pct`:/^(week|wk|month|mo|year|yr|day)s?$/.test(t)?`time`:/^(mg|kg|µg|mcg|g|ml|l)$/.test(t)?`dose`:`count`}var w=/(\$|€|£|¥)?\s?(\d{1,3}(?:,\d{3})+|\d+)(?:\.(\d+))?\s?(thousand|million|billion|trillion|bn)?\s?(%|percent|pct|mg|kg|µg|mcg|ml|weeks?|wks?|months?|mos?|years?|yrs?|days?)?/gi;function T(e){let t=[];for(let n of e.matchAll(w)){let[e,r,i,a,o,s]=n;if(!i)continue;let c=Number(`${i.replace(/,/g,``)}${a?`.${a}`:``}`);if(!Number.isFinite(c))continue;o&&(c*=S[o.toLowerCase()]??1);let l=(r??s??``).trim(),u=r?`money`:s?C(s):`count`;t.push({value:c,unit:l,family:u,raw:e.trim()})}return t}function E(e,t){for(let n of T(e))if(!t||n.family===t)return n;return null}function D(e){let t=` ${e.toLowerCase()} `;return/\b(p[ae]diatric|children|child|adolescents?|infants?|neonat|under[\s-]?18|aged? \d{1,2})\b/.test(t)?`pediatric`:/\b(elderly|geriatric|older adults?|aged 65)\b/.test(t)?`elderly`:/\b(adults?|grown[\s-]?ups?)\b/.test(t)?`adult`:null}function O(e){let t=e.toLowerCase(),n=t.match(/\b(\d{1,3})\s?(week|wk|month|mo|year|yr|day)s?\b/);if(n)return`${n[1]}${n[2].replace(/s$/,``)}`;let r=t.match(/\bphase\s?([1-4]|i{1,3}|iv)\b/);if(r)return`phase${r[1]}`;let i=t.match(/\bby\s(20\d{2})\b/);return i?`by${i[1]}`:null}function k(e,t){let n=D(e),r=D(t);if(n&&r&&n!==r)return`population`;let i=O(e),a=O(t);return i&&a&&i!==a?`timeframe`:null}function ee(e){let t=e.slice(0,1200),n=t.match(/\b([A-Z][a-zà-ÿ]+)\s+et al\.?,?\s*(\d{4})/);if(n)return`${n[1]} et al. ${n[2]}`;let r=t.match(/\b([A-Z][a-zà-ÿ]+)\s*\(?(19|20)\d{2}\)?/);return r?`${r[1]} ${r[0].match(/\d{4}/)?.[0]??``}`.trim():``}function te(e,t={}){let{minOverlap:n=.12,topK:r=120,maxDocFraction:i=.35,crossSourceOnly:a=!0}=t,o=e.length;if(o<2)return[];let s=e.map(e=>v(e.text)),c=e.map(e=>e.source),l=new Map;s.forEach((e,t)=>{for(let n of e){let e=l.get(n);e?e.push(t):l.set(n,[t])}});let u=Math.max(6,Math.floor(o*i)),d=new Set,f=[];for(let t of l.values())if(!(t.length<2||t.length>u))for(let r=0;r<t.length;r+=1)for(let i=r+1;i<t.length;i+=1){let o=t[r],l=t[i];if(a&&c[o]===c[l])continue;let u=o<l?`${o}|${l}`:`${l}|${o}`;if(d.has(u))continue;d.add(u);let p=y(s[o],s[l]);if(p>=n){let t=e[o],n=e[l];f.push(t.id<n.id?{a:t.id,b:n.id,overlap:p}:{a:n.id,b:t.id,overlap:p})}}return f.sort((e,t)=>t.overlap-e.overlap||(e.a<t.a?-1:e.a>t.a?1:e.b<t.b?-1:1)),f.slice(0,r)}function A(e){let t=new Map,n=e=>{let n=e;for(;t.get(n)!==n;)n=t.get(n);let r=e;for(;t.get(r)!==n;){let e=t.get(r);t.set(r,n),r=e}return n},r=e=>{t.has(e)||t.set(e,e)};for(let{a:i,b:a}of e)r(i),r(a),t.set(n(i),n(a));let i=new Map;for(let e of t.keys()){let t=n(e),r=i.get(t);r?r.push(e):i.set(t,[e])}return[...i.values()].map(e=>e.slice().sort())}var j=[`pct`,`money`,`dose`,`count`];function M(e,t){let n=Math.max(1,Math.abs(e),Math.abs(t));return Math.abs(e-t)<=.005*n}function N(e,t){return t.some(t=>s(e,t))}function P(e,t,n,r,i){if(t.source===n.source)return null;let a=String(e.relation).toLowerCase();if(a!==`contradicts`&&a!==`in-tension`)return null;let o=k(t.quote,n.quote),s=(e.matchPhrase??``).trim(),c=s.length>0&&N(s,r)&&N(s,i),l,u=!1;for(let e of j){let r=E(t.quote,e),i=E(n.quote,e);if(r&&i){M(r.value,i.value)?u=!0:l={aValue:r.value,bValue:i.value,unit:r.unit||i.unit};break}}let d=!!e.comparable&&c&&!o&&!u,f=a===`contradicts`&&d?`contradicts`:`in-tension`,p;return o?p=o:!d&&!u&&a===`contradicts`&&(p=`scope`),{relation:f,comparable:d,...c?{matchPhrase:s}:{},...p?{caveat:p}:{},...l?{delta:l}:{}}}function F(e,t,n,r={}){let{minCorpus:i=3,minSurfaceForms:a=3,minCorpusForThin:o=10,thinFraction:s=.1}=r;return t<i||n<a?null:e<=0?`absent`:t>=o&&e<=Math.max(1,Math.ceil(t*s))?`thin`:null}function I(e,t){let n=new Set;for(let r of e){let e=t.get(r);e!==void 0&&n.add(e)}return n.size}function L(e,t=2){return e>=t}function R(e){if(e&&typeof e==`object`)return e;let t=String(e),n=t.indexOf(`{`);if(n<0)return null;let r=0,i=!1,a=!1;for(let e=n;e<t.length;e+=1){let o=t[e];if(i){a?a=!1:o===`\\`?a=!0:o===`"`&&(i=!1);continue}if(o===`"`)i=!0;else if(o===`{`)r+=1;else if(o===`}`&&(--r,r===0))try{return JSON.parse(t.slice(n,e+1))}catch{return null}}return null}function z(e){return typeof e==`string`?e:``}function B(e,t){if(!e)return[];let n=e[t];return Array.isArray(n)?n:[]}var V=`You compare pairs of grounded claims from different sources and return strict JSON only. You never invent a quote; a shared "matchPhrase" must be copied verbatim from the claims. When two claims measure different endpoints, populations, or timeframes you mark them "not-comparable".`;function ne(e){return`These are candidate claim pairs, each from two DIFFERENT sources in a large corpus. For each
1
+ import{t as e}from"./react-BZJXY1be.js";import{t}from"./compiler-runtime-qQQXpJgv.js";import{t as n}from"./jsx-runtime-DeHZSEgm.js";import{h as r,v as i}from"./attachments-BW-vki-E.js";import{t as a}from"./providers-BovElgRL.js";import{i as o,n as s}from"./verbatim-DBTj9sPD.js";import{a as c,i as l,o as u,r as d,s as f,t as p}from"./PrismOverlay-DJDGPGxo.js";import{f as m}from"./pen-DNMslo3e.js";var h=e(),g=t(),_=/[a-z0-9]{4,}/g;function v(e){return new Set(e.toLowerCase().match(_)??[])}function y(e,t){if(e.size===0||t.size===0)return 0;let n=0;for(let r of e)t.has(r)&&(n+=1);return n/(e.size+t.size-n)}function b(e,t=12){let n=new Map;for(let t of e.toLowerCase().match(_)??[])n.set(t,(n.get(t)??0)+1);return[...n.entries()].sort((e,t)=>t[1]-e[1]||(e[0]<t[0]?-1:1)).slice(0,t).map(([e])=>e)}function x(e,t=2){return e.replace(/\s+/g,` `).split(/(?<=[.!?])\s+/).map(e=>e.trim()).filter(Boolean).slice(0,t)}var S={thousand:1e3,k:1e3,million:1e6,m:1e6,billion:1e9,bn:1e9,b:1e9,trillion:0xe8d4a51000};function C(e){let t=e.toLowerCase();return t===`%`||t===`percent`||t===`pct`?`pct`:/^(week|wk|month|mo|year|yr|day)s?$/.test(t)?`time`:/^(mg|kg|µg|mcg|g|ml|l)$/.test(t)?`dose`:`count`}var w=/(\$|€|£|¥)?\s?(\d{1,3}(?:,\d{3})+|\d+)(?:\.(\d+))?\s?(thousand|million|billion|trillion|bn)?\s?(%|percent|pct|mg|kg|µg|mcg|ml|weeks?|wks?|months?|mos?|years?|yrs?|days?)?/gi;function T(e){let t=[];for(let n of e.matchAll(w)){let[e,r,i,a,o,s]=n;if(!i)continue;let c=Number(`${i.replace(/,/g,``)}${a?`.${a}`:``}`);if(!Number.isFinite(c))continue;o&&(c*=S[o.toLowerCase()]??1);let l=(r??s??``).trim(),u=r?`money`:s?C(s):`count`;t.push({value:c,unit:l,family:u,raw:e.trim()})}return t}function E(e,t){for(let n of T(e))if(!t||n.family===t)return n;return null}function D(e){let t=` ${e.toLowerCase()} `;return/\b(p[ae]diatric|children|child|adolescents?|infants?|neonat|under[\s-]?18|aged? \d{1,2})\b/.test(t)?`pediatric`:/\b(elderly|geriatric|older adults?|aged 65)\b/.test(t)?`elderly`:/\b(adults?|grown[\s-]?ups?)\b/.test(t)?`adult`:null}function O(e){let t=e.toLowerCase(),n=t.match(/\b(\d{1,3})\s?(week|wk|month|mo|year|yr|day)s?\b/);if(n)return`${n[1]}${n[2].replace(/s$/,``)}`;let r=t.match(/\bphase\s?([1-4]|i{1,3}|iv)\b/);if(r)return`phase${r[1]}`;let i=t.match(/\bby\s(20\d{2})\b/);return i?`by${i[1]}`:null}function k(e,t){let n=D(e),r=D(t);if(n&&r&&n!==r)return`population`;let i=O(e),a=O(t);return i&&a&&i!==a?`timeframe`:null}function ee(e){let t=e.slice(0,1200),n=t.match(/\b([A-Z][a-zà-ÿ]+)\s+et al\.?,?\s*(\d{4})/);if(n)return`${n[1]} et al. ${n[2]}`;let r=t.match(/\b([A-Z][a-zà-ÿ]+)\s*\(?(19|20)\d{2}\)?/);return r?`${r[1]} ${r[0].match(/\d{4}/)?.[0]??``}`.trim():``}function te(e,t={}){let{minOverlap:n=.12,topK:r=120,maxDocFraction:i=.35,crossSourceOnly:a=!0}=t,o=e.length;if(o<2)return[];let s=e.map(e=>v(e.text)),c=e.map(e=>e.source),l=new Map;s.forEach((e,t)=>{for(let n of e){let e=l.get(n);e?e.push(t):l.set(n,[t])}});let u=Math.max(6,Math.floor(o*i)),d=new Set,f=[];for(let t of l.values())if(!(t.length<2||t.length>u))for(let r=0;r<t.length;r+=1)for(let i=r+1;i<t.length;i+=1){let o=t[r],l=t[i];if(a&&c[o]===c[l])continue;let u=o<l?`${o}|${l}`:`${l}|${o}`;if(d.has(u))continue;d.add(u);let p=y(s[o],s[l]);if(p>=n){let t=e[o],n=e[l];f.push(t.id<n.id?{a:t.id,b:n.id,overlap:p}:{a:n.id,b:t.id,overlap:p})}}return f.sort((e,t)=>t.overlap-e.overlap||(e.a<t.a?-1:e.a>t.a?1:e.b<t.b?-1:1)),f.slice(0,r)}function A(e){let t=new Map,n=e=>{let n=e;for(;t.get(n)!==n;)n=t.get(n);let r=e;for(;t.get(r)!==n;){let e=t.get(r);t.set(r,n),r=e}return n},r=e=>{t.has(e)||t.set(e,e)};for(let{a:i,b:a}of e)r(i),r(a),t.set(n(i),n(a));let i=new Map;for(let e of t.keys()){let t=n(e),r=i.get(t);r?r.push(e):i.set(t,[e])}return[...i.values()].map(e=>e.slice().sort())}var j=[`pct`,`money`,`dose`,`count`];function M(e,t){let n=Math.max(1,Math.abs(e),Math.abs(t));return Math.abs(e-t)<=.005*n}function N(e,t){return t.some(t=>s(e,t))}function P(e,t,n,r,i){if(t.source===n.source)return null;let a=String(e.relation).toLowerCase();if(a!==`contradicts`&&a!==`in-tension`)return null;let o=k(t.quote,n.quote),s=(e.matchPhrase??``).trim(),c=s.length>0&&N(s,r)&&N(s,i),l,u=!1;for(let e of j){let r=E(t.quote,e),i=E(n.quote,e);if(r&&i){M(r.value,i.value)?u=!0:l={aValue:r.value,bValue:i.value,unit:r.unit||i.unit};break}}let d=!!e.comparable&&c&&!o&&!u,f=a===`contradicts`&&d?`contradicts`:`in-tension`,p;return o?p=o:!d&&!u&&a===`contradicts`&&(p=`scope`),{relation:f,comparable:d,...c?{matchPhrase:s}:{},...p?{caveat:p}:{},...l?{delta:l}:{}}}function F(e,t,n,r={}){let{minCorpus:i=3,minSurfaceForms:a=3,minCorpusForThin:o=10,thinFraction:s=.1}=r;return t<i||n<a?null:e<=0?`absent`:t>=o&&e<=Math.max(1,Math.ceil(t*s))?`thin`:null}function I(e,t){let n=new Set;for(let r of e){let e=t.get(r);e!==void 0&&n.add(e)}return n.size}function L(e,t=2){return e>=t}function R(e){if(e&&typeof e==`object`)return e;let t=String(e),n=t.indexOf(`{`);if(n<0)return null;let r=0,i=!1,a=!1;for(let e=n;e<t.length;e+=1){let o=t[e];if(i){a?a=!1:o===`\\`?a=!0:o===`"`&&(i=!1);continue}if(o===`"`)i=!0;else if(o===`{`)r+=1;else if(o===`}`&&(--r,r===0))try{return JSON.parse(t.slice(n,e+1))}catch{return null}}return null}function z(e){return typeof e==`string`?e:``}function B(e,t){if(!e)return[];let n=e[t];return Array.isArray(n)?n:[]}var V=`You compare pairs of grounded claims from different sources and return strict JSON only. You never invent a quote; a shared "matchPhrase" must be copied verbatim from the claims. When two claims measure different endpoints, populations, or timeframes you mark them "not-comparable".`;function ne(e){return`These are candidate claim pairs, each from two DIFFERENT sources in a large corpus. For each
2
2
  pair, decide how the two claims relate on the ONE quantity they share.
3
3
 
4
4
  Pairs:
@@ -1,4 +1,4 @@
1
- import{t as e}from"./compiler-runtime-qQQXpJgv.js";import{t}from"./jsx-runtime-DeHZSEgm.js";import{t as n}from"./LegalMarkdownDocument-Be_fQbZ_.js";var r=e(),i=`# Mavéa Terms of Use
1
+ import{t as e}from"./compiler-runtime-qQQXpJgv.js";import{t}from"./jsx-runtime-DeHZSEgm.js";import{t as n}from"./LegalMarkdownDocument-j6UHhPnp.js";var r=e(),i=`# Mavéa Terms of Use
2
2
 
3
3
  Effective: August 17, 2026
4
4