@a-company/paradigm 6.6.2 → 6.6.6
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.
- package/dist/{accept-orchestration-TIXUQQGR.js → accept-orchestration-JHDCVHB2.js} +1 -1
- package/dist/add-V6XR7DU5.js +12 -0
- package/dist/{aggregate-A5S5MTCC.js → aggregate-KZICPVT3.js} +1 -1
- package/dist/arch-loader-G3AAM4E2.js +2 -0
- package/dist/{beacon-QVUD3MGP.js → beacon-52EWNZPK.js} +1 -1
- package/dist/{chunk-AXQBUD3Q.js → chunk-3OXR6F65.js} +49 -49
- package/dist/chunk-4GC35IFF.js +2 -0
- package/dist/chunk-EKNLG73M.js +6 -0
- package/dist/{chunk-Y4P4SGZV.js → chunk-MBSY57RN.js} +1 -1
- package/dist/{chunk-IOVHF4SR.js → chunk-MU5YWTNE.js} +1 -1
- package/dist/chunk-PMKZMCTS.js +111 -0
- package/dist/{chunk-4PSD5R7N.js → chunk-QDP4G53M.js} +1 -1
- package/dist/{chunk-ARLB6YYW.js → chunk-RGSFU2YW.js} +1 -1
- package/dist/{chunk-TOYQ2QCB.js → chunk-S3UVQ5RV.js} +1 -1
- package/dist/chunk-TMDPDIWA.js +3 -0
- package/dist/{chunk-2AU5L333.js → chunk-XKNJSPB5.js} +1 -1
- package/dist/{commands-ANRJNG2W.js → commands-4ENQMHFO.js} +1 -1
- package/dist/{constellation-NWLXYATA.js → constellation-RHZAEFV7.js} +1 -1
- package/dist/{diff-75MABOSL.js → diff-ANKTFDRA.js} +1 -1
- package/dist/dist-RXYJK7AZ.js +2 -0
- package/dist/dist-TNE4GFT7.js +2 -0
- package/dist/index.js +6 -6
- package/dist/{init-V4KSEKPK.js → init-F4MSKZIW.js} +1 -1
- package/dist/{integrity-ROO3G43N.js → integrity-7TKX3DZ4.js} +1 -1
- package/dist/list-NC3QGT75.js +12 -0
- package/dist/mcp.js +3 -3
- package/dist/{orchestrate-K4KBTBYK.js → orchestrate-UG5QXNAU.js} +1 -1
- package/dist/{probe-5HAXULAD.js → probe-27ARJKRO.js} +1 -1
- package/dist/quiz-TNV6APBM.js +10 -0
- package/dist/reindex-PTIQ2UGY.js +2 -0
- package/dist/review-BRO2UP4M.js +11 -0
- package/dist/{ripple-FNZI47SH.js → ripple-KCVDS3WE.js} +1 -1
- package/dist/sentinel.js +1 -1
- package/dist/serve-2PKJP65E.js +12 -0
- package/dist/server-4SYOUF6D.js +7 -0
- package/dist/{setup-ZSEC72BS.js → setup-5V2AGLQ6.js} +1 -1
- package/dist/{shift-QY3EXVF4.js → shift-TNA2E5O7.js} +2 -2
- package/dist/show-N5LGB5B2.js +7 -0
- package/dist/{snapshot-3IYB67D4.js → snapshot-YMX5QRBM.js} +1 -1
- package/dist/{status-DB3KNLW3.js → status-3GJXI4IK.js} +1 -1
- package/dist/status-ENAI35NL.js +6 -0
- package/dist/{summary-WLI3NF4G.js → summary-RPU2BS3Q.js} +1 -1
- package/dist/{team-2LGZQRP4.js → team-PEGP6F7S.js} +1 -1
- package/dist/{tools-W5WRPSJF.js → tools-PUSDXUYE.js} +1 -1
- package/dist/university-ui/assets/{index-BIQeax_b.js → index-DrtbBC21.js} +2 -2
- package/dist/university-ui/assets/{index-BIQeax_b.js.map → index-DrtbBC21.js.map} +1 -1
- package/dist/university-ui/index.html +1 -1
- package/dist/validate-IQG7DBFC.js +9 -0
- package/dist/{workspace-VMSPYIBV.js → workspace-6POCBPDY.js} +1 -1
- package/package.json +2 -1
- package/dist/add-CBDFTWST.js +0 -12
- package/dist/arch-loader-T3TARMSO.js +0 -2
- package/dist/chunk-5NAF6CKU.js +0 -111
- package/dist/chunk-ERO4MJSH.js +0 -6
- package/dist/chunk-LWAIVOSF.js +0 -2
- package/dist/chunk-P344HV6Z.js +0 -2
- package/dist/chunk-SU5F5D4I.js +0 -3
- package/dist/dist-JZZJLVMR.js +0 -2
- package/dist/dist-OG6MM4VY.js +0 -2
- package/dist/list-AXKTBXKJ.js +0 -12
- package/dist/quiz-G56CUN45.js +0 -10
- package/dist/reindex-2YTQP2EO.js +0 -2
- package/dist/review-VMSX2PKI.js +0 -11
- package/dist/serve-TJQ5BNKR.js +0 -12
- package/dist/server-QOCW5RU6.js +0 -7
- package/dist/show-MTPEQFXK.js +0 -7
- package/dist/status-REA6HUXE.js +0 -6
- package/dist/validate-742XMB42.js +0 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {a as a$5,d as d$3,b as b$2,e as e$1,f}from'./chunk-Z72SDTBJ.js';import {b}from'./chunk-
|
|
2
|
+
import {a as a$5,d as d$3,b as b$2,e as e$1,f}from'./chunk-Z72SDTBJ.js';import {b}from'./chunk-XKNJSPB5.js';import'./chunk-MU5YWTNE.js';import'./chunk-TYWB5IQJ.js';import'./chunk-AMLD7IYC.js';import'./chunk-FYDRENK7.js';import'./chunk-HXGYVS2N.js';import {d as d$2}from'./chunk-TQOT2LBO.js';import'./chunk-Y4XFVDZC.js';import {a as a$7}from'./chunk-5RFISGUW.js';import {d as d$1}from'./chunk-S3UVQ5RV.js';import {a as a$4,b as b$1}from'./chunk-GE3GQALR.js';import {a as a$8}from'./chunk-XQLO5URP.js';import'./chunk-EKZDFEJW.js';import {a as a$2}from'./chunk-QDP4G53M.js';import {b as b$3}from'./chunk-MBSY57RN.js';import'./chunk-4TXOVRWD.js';import'./chunk-VCKKJDLP.js';import'./chunk-WR6D3SC6.js';import {a as a$3}from'./chunk-UIKLE3WD.js';import {a as a$6}from'./chunk-UZ5H7K6Q.js';import'./chunk-LPBCQM5Y.js';import'./chunk-4GC35IFF.js';import'./chunk-JIXHEBGK.js';import'./chunk-ZJQY5PPP.js';import'./chunk-YNDPSWOE.js';import'./chunk-VIG5LSGZ.js';import {a as a$1}from'./chunk-LKAT7IAK.js';import'./chunk-5TAVYPOV.js';import*as a from'fs';import*as ne from'os';import*as d from'path';import e from'chalk';import Se from'ora';import*as h from'js-yaml';import*as C from'fs/promises';var ae=[{path:".paradigm/config.yaml",defaultContent:['version: "2.0"','project: ""','description: ""','initialized: ""'].join(`
|
|
3
3
|
`)+`
|
|
4
4
|
`},{path:".paradigm/agents.yaml",defaultContent:['version: "1.0"',"agents: []"].join(`
|
|
5
5
|
`)+`
|
|
@@ -57,4 +57,4 @@ workspace: "${u}"
|
|
|
57
57
|
workspace: "${j}"
|
|
58
58
|
`;a.writeFileSync(t,re,"utf8"),console.log(e.green(` \u2713 Found workspace: ${e.cyan(j)} (added to config.yaml)`));break}let y=d.dirname(p);if(y===p)break;p=y;}}}catch(s){a$1.operation("shift").debug("Workspace auto-detect failed",{error:s.message});}}if(!d$2(n)||o.force){console.log(e.cyan(" Step 2/6: Initializing team configuration..."));try{await b(n,{force:o.force,json:!1,configureModels:o.configureModels||!1,noConfigureModels:!o.configureModels}),console.log(e.green(` \u2713 Team configuration initialized
|
|
59
59
|
`));}catch(t){console.log(e.yellow(` \u26A0 Team init warning: ${t.message}
|
|
60
|
-
`));}}else i.succeed(e.gray("Step 2/6: Team already configured (use --force to reinit)"));if(o.force){let t=d.join(n,".paradigm",".compliance-nomination-skipped");if(a.existsSync(t))try{a.unlinkSync(t);}catch{}}let S=d.join(n,".paradigm","roster.yaml");if(!a.existsSync(S)||o.force)try{let t=a$4(n),s=b$1[t]||b$1.generic,c={version:"1.0",project:l,type:t,active:s.sort()};a.writeFileSync(S,h.dump(c,{lineWidth:-1,noRefs:!0}),"utf8"),console.log(e.green(` \u2713 Agent roster set: ${e.cyan(s.length)} agents for ${e.cyan(t)}`));}catch(t){a$1.operation("shift").debug("Roster setup failed",{error:t.message});}else try{let s=h.load(a.readFileSync(S,"utf8"))?.active?.length??0;console.log(e.gray(` \u2713 Agent roster exists (${s} agents active)`));}catch{console.log(e.gray(" \u2713 Agent roster exists"));}await be(n,S,o);{let t=d.join(n,".paradigm","adoptions.yaml"),s=a.existsSync(t);try{let c=a$4(n),p=s?await a$5(n):null,u=p&&Object.keys(p.agents).length>0;if(!u&&a.existsSync(S))p=await d$3(n),await b$2(n,p),a$1.operation("shift").debug("Migrated roster to adoptions",{count:Object.keys(p.agents).length});else if(!u){p=e$1(c);let g=a.existsSync(S)?h.load(a.readFileSync(S,"utf8")):{active:[]},y=new Date().toISOString();for(let j of g.active||[])p.agents[j]={adopted:y,source:oe.has(j)?"core":"ecosystem",defaultsAccepted:!0};Object.keys(p.agents).length>0&&await b$2(n,p);}if(p&&Object.keys(p.agents).length>0){let g=ke(p),y=f(g,c);console.log(y),console.log(e.green(` \u2713 ${Object.keys(p.agents).length} agents adopted`));}if(p&&p.agents.compliance){let g=d.join(n,".paradigm","authority.yaml");if(!a.existsSync(g))try{let{writeArchetypeDefaults:y}=await import('./authority-GCMPX7RW.js');await y(n,"archetype-default"),a$1.operation("shift").debug("Wrote archetype-default authority.yaml",{source:"default-adoption"});}catch(y){a$1.operation("shift").debug("Authority defaults write failed",{error:y.message});}}}catch(c){a$1.operation("shift").debug("Adoption ceremony failed",{error:c.message});}}{let t=d.join(r,"config.yaml");if(a.existsSync(t))try{let s=a.readFileSync(t,"utf8"),c=h.load(s);if(!c["model-resolution"]||o.force){let{ModelDiscovery:p}=await import('./model-discovery-HMB3YI4L.js'),g=new p(n).detectEnvironment(),y;g==="claude-code"?y={"tier-1":"opus","tier-2":"sonnet","tier-3":"haiku"}:g==="cursor"?y={"tier-1":"sonnet","tier-2":"sonnet","tier-3":"haiku"}:y={"tier-1":"sonnet","tier-2":"sonnet","tier-3":"sonnet"},c["model-resolution"]=y,a.writeFileSync(t,h.dump(c,{lineWidth:-1,noRefs:!0}),"utf8"),console.log(e.green(` \u2713 Model tiers configured for ${e.cyan(g)}: tier-1=${y["tier-1"]}, tier-2=${y["tier-2"]}, tier-3=${y["tier-3"]}`));}}catch(s){a$1.operation("shift").debug("Model tier config failed",{error:s.message});}}try{let{ensureEnforcementDefaults:t}=await import('./enforcement-VRE3WZOI.js');t(n)&&(console.log(e.green(` \u2713 Enforcement config initialized (${e.cyan("none")} preset)`)),console.log(e.dim(" Enforcement: none \u2014 symbol tracking available when you're ready. Rune will guide you.")));}catch(t){a$1.operation("shift").debug("Enforcement config setup failed",{error:t.message});}{i.start("Ensuring core files...");try{let{created:t,existed:s}=await Q(n);i.succeed(e.green(`Core files ensured: ${e.cyan(String(t.length))} created, ${e.cyan(String(s.length))} already existed`));}catch(t){i.warn(e.yellow(`Guaranteed files warning: ${t.message}`));}}if(o.quick)i.succeed(e.gray("Step 3/6: Skipped scan (--quick mode)"));else {i.start("Step 3/6: Scanning and indexing symbols...");try{await b$3(n,{quiet:!0}),i.succeed(e.green("Symbols indexed"));}catch(t){i.warn(e.yellow(`Scan warning: ${t.message}`));}}{let t=d.join(r,"config.yaml");if(a.existsSync(t))try{if(h.load(a.readFileSync(t,"utf8")).workspace){i.start("Step 3b/6: Reindexing workspace members...");try{let{workspaceReindexCommand:c}=await import('./workspace-
|
|
60
|
+
`));}}else i.succeed(e.gray("Step 2/6: Team already configured (use --force to reinit)"));if(o.force){let t=d.join(n,".paradigm",".compliance-nomination-skipped");if(a.existsSync(t))try{a.unlinkSync(t);}catch{}}let S=d.join(n,".paradigm","roster.yaml");if(!a.existsSync(S)||o.force)try{let t=a$4(n),s=b$1[t]||b$1.generic,c={version:"1.0",project:l,type:t,active:s.sort()};a.writeFileSync(S,h.dump(c,{lineWidth:-1,noRefs:!0}),"utf8"),console.log(e.green(` \u2713 Agent roster set: ${e.cyan(s.length)} agents for ${e.cyan(t)}`));}catch(t){a$1.operation("shift").debug("Roster setup failed",{error:t.message});}else try{let s=h.load(a.readFileSync(S,"utf8"))?.active?.length??0;console.log(e.gray(` \u2713 Agent roster exists (${s} agents active)`));}catch{console.log(e.gray(" \u2713 Agent roster exists"));}await be(n,S,o);{let t=d.join(n,".paradigm","adoptions.yaml"),s=a.existsSync(t);try{let c=a$4(n),p=s?await a$5(n):null,u=p&&Object.keys(p.agents).length>0;if(!u&&a.existsSync(S))p=await d$3(n),await b$2(n,p),a$1.operation("shift").debug("Migrated roster to adoptions",{count:Object.keys(p.agents).length});else if(!u){p=e$1(c);let g=a.existsSync(S)?h.load(a.readFileSync(S,"utf8")):{active:[]},y=new Date().toISOString();for(let j of g.active||[])p.agents[j]={adopted:y,source:oe.has(j)?"core":"ecosystem",defaultsAccepted:!0};Object.keys(p.agents).length>0&&await b$2(n,p);}if(p&&Object.keys(p.agents).length>0){let g=ke(p),y=f(g,c);console.log(y),console.log(e.green(` \u2713 ${Object.keys(p.agents).length} agents adopted`));}if(p&&p.agents.compliance){let g=d.join(n,".paradigm","authority.yaml");if(!a.existsSync(g))try{let{writeArchetypeDefaults:y}=await import('./authority-GCMPX7RW.js');await y(n,"archetype-default"),a$1.operation("shift").debug("Wrote archetype-default authority.yaml",{source:"default-adoption"});}catch(y){a$1.operation("shift").debug("Authority defaults write failed",{error:y.message});}}}catch(c){a$1.operation("shift").debug("Adoption ceremony failed",{error:c.message});}}{let t=d.join(r,"config.yaml");if(a.existsSync(t))try{let s=a.readFileSync(t,"utf8"),c=h.load(s);if(!c["model-resolution"]||o.force){let{ModelDiscovery:p}=await import('./model-discovery-HMB3YI4L.js'),g=new p(n).detectEnvironment(),y;g==="claude-code"?y={"tier-1":"opus","tier-2":"sonnet","tier-3":"haiku"}:g==="cursor"?y={"tier-1":"sonnet","tier-2":"sonnet","tier-3":"haiku"}:y={"tier-1":"sonnet","tier-2":"sonnet","tier-3":"sonnet"},c["model-resolution"]=y,a.writeFileSync(t,h.dump(c,{lineWidth:-1,noRefs:!0}),"utf8"),console.log(e.green(` \u2713 Model tiers configured for ${e.cyan(g)}: tier-1=${y["tier-1"]}, tier-2=${y["tier-2"]}, tier-3=${y["tier-3"]}`));}}catch(s){a$1.operation("shift").debug("Model tier config failed",{error:s.message});}}try{let{ensureEnforcementDefaults:t}=await import('./enforcement-VRE3WZOI.js');t(n)&&(console.log(e.green(` \u2713 Enforcement config initialized (${e.cyan("none")} preset)`)),console.log(e.dim(" Enforcement: none \u2014 symbol tracking available when you're ready. Rune will guide you.")));}catch(t){a$1.operation("shift").debug("Enforcement config setup failed",{error:t.message});}{i.start("Ensuring core files...");try{let{created:t,existed:s}=await Q(n);i.succeed(e.green(`Core files ensured: ${e.cyan(String(t.length))} created, ${e.cyan(String(s.length))} already existed`));}catch(t){i.warn(e.yellow(`Guaranteed files warning: ${t.message}`));}}if(o.quick)i.succeed(e.gray("Step 3/6: Skipped scan (--quick mode)"));else {i.start("Step 3/6: Scanning and indexing symbols...");try{await b$3(n,{quiet:!0}),i.succeed(e.green("Symbols indexed"));}catch(t){i.warn(e.yellow(`Scan warning: ${t.message}`));}}{let t=d.join(r,"config.yaml");if(a.existsSync(t))try{if(h.load(a.readFileSync(t,"utf8")).workspace){i.start("Step 3b/6: Reindexing workspace members...");try{let{workspaceReindexCommand:c}=await import('./workspace-6POCBPDY.js');await c({quiet:!0}),i.succeed(e.green("Workspace members reindexed"));}catch(c){i.warn(e.yellow(`Workspace reindex: ${c.message}`));}}}catch(s){a$1.operation("shift").debug("Workspace config read failed",{error:s.message});}}let v=d.join(n,"portal.yaml");a.existsSync(v)||a.writeFileSync(v,h.dump({version:"1.0.0",gates:{},routes:{}},{lineWidth:-1,noRefs:true}),"utf8");let E=d.join(n,".paradigm","lore");a.existsSync(E)||a.mkdirSync(E,{recursive:true});let R=d.join(n,".paradigm","university");for(let t of ["content/notes","content/policies","content/quizzes","content/paths","diplomas"]){let s=d.join(R,t);a.existsSync(s)||a.mkdirSync(s,{recursive:true});}let N=d.join(R,"config.yaml");if(!a.existsSync(N)){let t="Project";try{let c=d.join(n,".paradigm","config.yaml");if(a.existsSync(c)){let p=h.load(a.readFileSync(c,"utf8"));p.project&&typeof p.project=="string"&&(t=p.project);}}catch{}let s={branding:{name:`${t} University`,tagline:`Learn the ${t} codebase`,institution:t},theme:{primary:"#6366f1",secondary:"#8b5cf6",accent:"#f59e0b",background:"#0f172a",surface:"#1e293b",text:"#f8fafc",textMuted:"#94a3b8",success:"#22c55e",error:"#ef4444",font:"Inter, system-ui, sans-serif"},content:{categories:[],defaultDifficulty:"beginner",requireApproval:false},diplomas:{includeGlobalPLSAT:true}};a.writeFileSync(N,h.dump(s,{lineWidth:-1,noRefs:true}),"utf8");}i.start("Step 4/6: Syncing IDE configurations...");try{let t=o.ide?[o.ide]:["claude","cursor","copilot","windsurf","agents"],s=[];for(let c of t)try{await a$6(c,{quiet:!0,force:!0}),s.push(c);}catch{}s.length>0?i.succeed(e.green(`IDE configs synced: ${s.join(", ")}`)):i.warn(e.yellow("No IDE configs to sync"));}catch(t){i.warn(e.yellow(`Sync warning: ${t.message}`));}i.start("Step 5/6: Installing hooks...");try{await a$7({force:o.force}),i.succeed(e.green("Hooks installed (git + Claude Code + Cursor)"));}catch(t){i.warn(e.yellow(`Hooks warning: ${t.message}`));}if(o.verify){i.start("Step 6/6: Running health checks...");try{await a$8({quiet:!0})?i.succeed(e.green("All health checks passed")):i.warn(e.yellow("Some health checks need attention"));}catch(t){i.warn(e.yellow(`Doctor warning: ${t.message}`));}}else i.succeed(e.gray("Step 6/6: Skipped verify (use --verify to check health)"));console.log(""),console.log(e.blue("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510")),console.log(e.blue("\u2502")+e.white.bold(" \u2728 Paradigm shift complete! ")+e.blue("\u2502")),console.log(e.blue("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518")),console.log(""),console.log(e.white(" Created/Updated:")),console.log(e.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));let O=[{path:".paradigm/config.yaml",desc:"Project configuration"},{path:".paradigm/navigator.yaml",desc:"Symbol navigation map"},{path:".paradigm/agents.yaml",desc:"Team agent configuration"},{path:".paradigm/adoptions.yaml",desc:"Agent adoption records"},{path:".purpose",desc:"Root feature definitions"},{path:".paradigm/lore/",desc:"Project lore timeline",isDir:true},{path:"portal.yaml",desc:"Authorization gates"},{path:".paradigm/roster.yaml",desc:"Agent roster for this project"},{path:"CLAUDE.md",desc:"Claude Code AI instructions"},{path:"AGENTS.md",desc:"Universal AI agent instructions"},{path:".cursor/rules/",desc:"Cursor AI instructions",isDir:true},{path:".claude/hooks/",desc:"Claude Code enforcement hooks",isDir:true,optional:true},{path:".cursor/hooks/",desc:"Cursor enforcement hooks",isDir:true,optional:true}],W=d.join(r,"config.yaml");if(a.existsSync(W))try{let t=h.load(a.readFileSync(W,"utf8"));if(typeof t.workspace=="string"){let s=d.resolve(n,t.workspace),c=d.relative(n,s);O.push({path:c,desc:"Multi-project workspace",optional:!0});}}catch(t){a$1.operation("shift").debug("Summary config read failed",{error:t.message});}for(let t of O){let s=d.join(n,t.path);a.existsSync(s)?console.log(e.green(" \u2713 ")+e.white(t.path.padEnd(28))+e.gray(t.desc)):t.optional||console.log(e.yellow(" \u25CB ")+e.gray(t.path.padEnd(28))+e.gray(`(${t.desc})`));}try{let t=await Z(n),s=ee(t);s&&console.log(s);}catch(t){a$1.operation("shift").debug("Recommendations engine failed",{error:t.message}),console.log(""),console.log(e.white(" Next steps:")),console.log(e.gray(" "+"\u2500".repeat(49))),console.log(e.white(" 1. ")+e.gray("Edit ")+e.cyan(".purpose")+e.gray(" to define your features")),console.log(e.white(" 2. ")+e.gray("Run ")+e.cyan("paradigm shift --verify")+e.gray(" to check health")),console.log("");}try{let{captureSnapshot:t,seedMetricsConsent:s}=await import('./metrics-UESGUHTA.js');s(n),t(n);}catch(t){a$1.operation("shift").debug("metrics snapshot failed",{error:t.message});}m.success("Paradigm shift complete",{project:l});}export{be as runComplianceNominationStep,Le as shiftCommand};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {k,l,b,c,d}from'./chunk-EKNLG73M.js';import'./chunk-5TAVYPOV.js';import o from'chalk';function O(l){let s=l.indexOf(":");return s===-1?{entryId:l}:{packId:l.slice(0,s),entryId:l.slice(s+1)}}async function I(l$1,s){let i=process.cwd(),{packId:p,entryId:a}=O(l$1),g={...s};p&&(g.pack=p);let u=k(i,g),f=l(g)?u.subPackRoot??u.packRoot:void 0,e=b(i,a,f);if(e){if(s.json){console.log(JSON.stringify({...e.frontmatter,body:e.body},null,2));return}console.log(o.blue(`
|
|
3
|
+
${e.frontmatter.title}`)),console.log(o.gray(` ${e.frontmatter.type} \xB7 ${e.frontmatter.difficulty} \xB7 ${e.frontmatter.author}`)),e.frontmatter.tags.length>0&&console.log(o.gray(` Tags: ${e.frontmatter.tags.join(", ")}`)),e.frontmatter.symbols.length>0&&console.log(o.gray(` Symbols: ${e.frontmatter.symbols.join(", ")}`)),console.log(),console.log(e.body),console.log();return}let n=c(i,a,f);if(n){if(s.json){console.log(JSON.stringify(n,null,2));return}console.log(o.blue(`
|
|
4
|
+
${n.title}`)),console.log(o.gray(` quiz \xB7 ${n.difficulty} \xB7 ${n.questions.length} questions \xB7 pass: ${n.passThreshold*100}%`)),n.description&&console.log(o.gray(` ${n.description}`)),console.log();for(let t of n.questions){console.log(` ${o.cyan(t.id)}: ${t.question}`);for(let[c,d]of Object.entries(t.choices)){let k=c===t.correct?o.green("*"):" ";console.log(` ${k} ${c}: ${d}`);}t.explanation&&console.log(o.gray(` \u2192 ${t.explanation}`)),console.log();}return}let r=d(i,a,f);if(r){if(s.json){console.log(JSON.stringify(r,null,2));return}console.log(o.blue(`
|
|
5
|
+
${r.title}`)),console.log(o.gray(` learning path \xB7 ${r.steps.length} steps \xB7 ${r.ordered?"ordered":"unordered"}`)),r.description&&console.log(o.gray(` ${r.description}`)),console.log();for(let t=0;t<r.steps.length;t++){let c=r.steps[t],d=c.required?o.red("required"):o.gray("optional");console.log(` ${t+1}. ${o.cyan(c.content)} (${d})`),c.note&&console.log(o.gray(` ${c.note}`));}console.log();return}console.error(o.red(`
|
|
6
|
+
Content "${l$1}" not found
|
|
7
|
+
`)),process.exit(1);}export{I as universityShowCommand};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {c,k,f as f$1}from'./chunk-
|
|
2
|
+
import {c,k,f as f$1}from'./chunk-4GC35IFF.js';import'./chunk-JIXHEBGK.js';import'./chunk-ZJQY5PPP.js';import'./chunk-5TAVYPOV.js';import*as n from'fs';import*as f from'path';import o from'chalk';import y from'ora';async function w(t,r){let m=process.cwd(),i=f.join(m,".premise");console.log(o.blue(`
|
|
3
3
|
\u{1F4F8} Creating Snapshot...
|
|
4
4
|
`));let e=y("Loading .premise file...").start();try{n.existsSync(i)||(e.fail(".premise file not found"),console.log(o.yellow(`
|
|
5
5
|
Run "paradigm init" first to create a .premise file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {m,o as o$1,B}from'./chunk-
|
|
2
|
+
import {m,o as o$1,B}from'./chunk-4GC35IFF.js';import {e}from'./chunk-JIXHEBGK.js';import {e as e$1}from'./chunk-ZJQY5PPP.js';import {a as a$1}from'./chunk-LKAT7IAK.js';import'./chunk-5TAVYPOV.js';import*as l from'fs';import*as a from'path';import o from'chalk';import G from'ora';async function D(){let t=process.cwd();console.log(o.blue(`
|
|
3
3
|
\u{1F4CA} Paradigm Status
|
|
4
4
|
`)),console.log(o.gray("\u2500".repeat(40)));let i=a$1.command("status").start("Getting project status"),r=G("Scanning project...").start(),p=l.existsSync(a.join(t,".premise")),m$1=l.existsSync(a.join(t,".purpose")),f=l.existsSync(a.join(t,"portal.yaml"));r.stop(),console.log(o.white(`
|
|
5
5
|
Configuration Files`)),console.log(o.gray("\u2500".repeat(40))),console.log(` .premise: ${p?o.green("\u2713 Found"):o.yellow("\u25CB Not found")}`),console.log(` .purpose: ${m$1?o.green("\u2713 Found"):o.yellow("\u25CB Not found")}`),console.log(` portal.yaml: ${f?o.green("\u2713 Found"):o.yellow("\u25CB Not found")}`),r.start("Counting files...");let u=await e(t),y=await e$1(t);if(r.stop(),console.log(o.white(`
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {k,l,n,a,e}from'./chunk-EKNLG73M.js';import'./chunk-5TAVYPOV.js';import t from'chalk';async function C(d){let g=process.cwd(),n$1=k(g,d),f=l(d)?n$1.subPackRoot??n$1.packRoot:void 0,c=f?n(f):a(g);if(!c||c.totalContent===0){console.log(t.yellow(`
|
|
3
|
+
No university content found.`)),console.log(t.gray(` Create content with: paradigm university add note --title "My Note"
|
|
4
|
+
`));return}let s=e(g),a$1={},l$1={},i={};for(let o of c.entries){a$1[o.type]=(a$1[o.type]||0)+1,o.difficulty&&(i[o.difficulty]=(i[o.difficulty]||0)+1);for(let e of o.tags)l$1[e]=(l$1[e]||0)+1;}if(d.json){console.log(JSON.stringify({pack:n$1.subPackId??n$1.packId,totalContent:c.totalContent,typeCounts:a$1,difficultyCounts:i,tagCounts:l$1,diplomaCount:s.length},null,2));return}console.log(t.blue(`
|
|
5
|
+
University Status \u2014 pack: ${n$1.subPackId??n$1.packId}
|
|
6
|
+
`)),console.log(t.white(` Total content: ${c.totalContent}`));for(let[o,e]of Object.entries(a$1).sort())console.log(` ${t.cyan(o)}: ${e}`);if(Object.keys(i).length>0){console.log(),console.log(t.white(" By difficulty:"));for(let[o,e]of Object.entries(i)){let r=o==="advanced"?t.red:o==="intermediate"?t.yellow:t.green;console.log(` ${r(o)}: ${e}`);}}if(Object.keys(l$1).length>0){console.log(),console.log(t.white(" Top tags:"));let o=Object.entries(l$1).sort((e,r)=>r[1]-e[1]).slice(0,8);for(let[e,r]of o)console.log(` ${t.gray(e)}: ${r}`);}if(console.log(),console.log(t.white(` Diplomas earned: ${s.length}`)),s.length>0){for(let o of s.slice(0,5)){let e=o.passed?t.green("PASS"):t.red("FAIL");console.log(` ${e} ${o.source} \u2014 ${o.student} (${o.percentage}%) ${t.gray(o.earnedAt.slice(0,10))}`);}s.length>5&&console.log(t.gray(` ... and ${s.length-5} more`));}console.log();}export{C as universityStatusCommand};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {m}from'./chunk-
|
|
2
|
+
import {m}from'./chunk-4GC35IFF.js';import'./chunk-JIXHEBGK.js';import'./chunk-ZJQY5PPP.js';import {c as c$1,a}from'./chunk-YNDPSWOE.js';import'./chunk-VIG5LSGZ.js';import'./chunk-5TAVYPOV.js';import*as n from'fs';import*as c from'path';import o from'chalk';import S from'ora';async function F(){let p=process.cwd(),x=c.basename(p),l=S();console.log(o.blue(`
|
|
3
3
|
\u{1F4CA} Paradigm Summary
|
|
4
4
|
`));let r=c.join(p,".paradigm");(!n.existsSync(r)||!n.statSync(r).isDirectory())&&(console.log(o.red("\u274C No .paradigm/ directory found.")),console.log(o.gray(" Run `paradigm init` first.\n")),process.exit(1)),l.start("Aggregating symbols...");let m$1;try{m$1=await m(p),l.succeed(`Found ${m$1.symbols.length} symbols`);}catch(e){l.fail(o.red("Failed to aggregate symbols")),console.error(o.gray(e.message)),process.exit(1);}let u={components:{count:0,examples:[]},flows:{count:0,examples:[]},gates:{count:0,examples:[]},signals:{count:0,examples:[]},aspects:{count:0,examples:[]}};for(let e of m$1.symbols){let t=e.type,i=t==="component"?"components":t==="flow"?"flows":t==="gate"?"gates":t==="signal"?"signals":t==="aspect"?"aspects":null;i&&u[i]&&(u[i].count++,u[i].examples.length<3&&u[i].examples.push(e.symbol));}let a$1=[];n.existsSync(c.join(r,"config.yaml"))?a$1.push({check:"Config",status:"ok"}):a$1.push({check:"Config",status:"missing"});let k=["logger.md","probe.md","symbols.md"].every(e=>n.existsSync(c.join(r,"specs",e)));a$1.push({check:"Specs",status:k?"ok":"warn"});let j=n.existsSync(c.join(r,"docs"));a$1.push({check:"Docs",status:j?"ok":"warn"});let g=c$1(p);if(g.detected){let e=a(g.detected);e&&n.existsSync(c.join(p,e.outputPath))?a$1.push({check:`IDE (${g.detected})`,status:"ok"}):a$1.push({check:`IDE (${g.detected})`,status:"warn"});}let w=n.existsSync(c.join(r,"scan-index.json"))||n.existsSync(c.join(p,".paradigm-scan-index.json"));a$1.push({check:"Scan index",status:w?"ok":"missing"});let s=[];s.push(`# Project: ${x}`),s.push(""),s.push(`**Generated:** ${new Date().toISOString()}`),s.push("**Paradigm Version:** 0.2.0"),s.push(""),s.push("## Symbol Counts"),s.push(""),s.push("| Type | Count | Examples |"),s.push("|------|-------|----------|");for(let[e,t]of Object.entries(u))if(t.count>0){let i=t.examples.join(", ");s.push(`| ${e} | ${t.count} | ${i} |`);}s.push(""),s.push("## Source Files"),s.push(""),s.push(`- Purpose files: ${m$1.purposeFiles.length}`),s.push(`- Gate files: ${m$1.portalFiles.length}`),s.push(""),s.push("## Health Status"),s.push("");for(let e of a$1){let t=e.status==="ok"?"\u2713":e.status==="warn"?"\u26A0":"\u25CB";s.push(`- ${t} ${e.check}`);}s.push(""),s.push("---"),s.push("*Generated by `paradigm summary`*");let h=c.join(r,"project.md");l.start("Writing project.md...");try{n.writeFileSync(h,s.join(`
|
|
5
5
|
`),"utf8"),l.succeed(o.green("project.md generated"));}catch(e){l.fail(o.red("Failed to write project.md")),console.error(o.gray(e.message)),process.exit(1);}console.log(o.gray(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export{e as teamAcceptCommand,f as teamCheckCommand,d as teamHandoffCommand,g as teamHistoryCommand,b as teamInitCommand,a as teamModelsCommand,h as teamResetCommand,c as teamStatusCommand}from'./chunk-
|
|
2
|
+
export{e as teamAcceptCommand,f as teamCheckCommand,d as teamHandoffCommand,g as teamHistoryCommand,b as teamInitCommand,a as teamModelsCommand,h as teamResetCommand,c as teamStatusCommand}from'./chunk-XKNJSPB5.js';import'./chunk-MU5YWTNE.js';import'./chunk-TYWB5IQJ.js';import'./chunk-AMLD7IYC.js';import'./chunk-FYDRENK7.js';import'./chunk-HXGYVS2N.js';import'./chunk-TQOT2LBO.js';import'./chunk-Y4XFVDZC.js';import'./chunk-EKZDFEJW.js';import'./chunk-LPBCQM5Y.js';import'./chunk-4GC35IFF.js';import'./chunk-JIXHEBGK.js';import'./chunk-ZJQY5PPP.js';import'./chunk-5TAVYPOV.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export{h as registerTools}from'./chunk-
|
|
2
|
+
export{h as registerTools}from'./chunk-3OXR6F65.js';import'./chunk-PMKZMCTS.js';import'./chunk-4UJ4NIEQ.js';import'./chunk-4N56FRNE.js';import'./chunk-Q527BPUF.js';import'./chunk-KLBH26PA.js';import'./chunk-RGSFU2YW.js';import'./chunk-TMDPDIWA.js';import'./chunk-JNSJVCTU.js';import'./chunk-XROULIQN.js';import'./chunk-ZUAUFZRJ.js';import'./chunk-3KVVC4WV.js';import'./chunk-M4UMM6DC.js';import'./chunk-GRZQIKST.js';import'./chunk-KAFQA7HV.js';import'./chunk-6QXBXZF6.js';import'./chunk-EK4ZRIFJ.js';import'./chunk-LAYBUKMB.js';import'./chunk-DVZWCXB6.js';import'./chunk-QGZRM6ZB.js';import'./chunk-K7X3Z3GL.js';import'./chunk-5TAVYPOV.js';
|
|
@@ -83,5 +83,5 @@ Error generating stack: `+i.message+`
|
|
|
83
83
|
*/var Dl=S,hm=pm;function mm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vm=typeof Object.is=="function"?Object.is:mm,gm=hm.useSyncExternalStore,ym=Dl.useRef,xm=Dl.useEffect,wm=Dl.useMemo,Sm=Dl.useDebugValue;xf.useSyncExternalStoreWithSelector=function(e,t,n,r,l){var i=ym(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=wm(function(){function u(y){if(!c){if(c=!0,m=y,y=r(y),l!==void 0&&o.hasValue){var x=o.value;if(l(x,y))return p=x}return p=y}if(x=p,vm(m,y))return x;var w=r(y);return l!==void 0&&l(x,w)?(m=y,x):(m=y,p=w)}var c=!1,m,p,v=n===void 0?null:n;return[function(){return u(t())},v===null?void 0:function(){return u(v())}]},[t,n,r,l]);var s=gm(e,i[0],i[1]);return xm(function(){o.hasValue=!0,o.value=s},[s]),Sm(s),s};yf.exports=xf;var km=yf.exports;const Cm=Qu(km),kf={},{useDebugValue:jm}=xo,{useSyncExternalStoreWithSelector:Em}=Cm;let Mu=!1;const Nm=e=>e;function Pm(e,t=Nm,n){(kf?"production":void 0)!=="production"&&n&&!Mu&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Mu=!0);const r=Em(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return jm(r),r}const Du=e=>{(kf?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?rm(e):e,n=(r,l)=>Pm(t,r,l);return Object.assign(n,t),n},Al=e=>e?Du(e):Du,_m={mode:"paradigm",branding:{name:"Paradigm University",tagline:"Lux in Codice",logo:null,institution:null,favicon:null,tabs:["campus","courses","plsat","library","certificates"],startCourse:null},theme:null,version:"6.4.0",hasProjectLibrary:!1,sections:[]},Ut=Al(e=>({config:null,isLoaded:!1,loadPackConfig:async()=>{try{const t=await fetch("/api/pack-config");if(!t.ok)throw new Error("Failed to load pack config");const n=await t.json();e({config:n,isLoaded:!0})}catch{e({config:_m,isLoaded:!0})}}}));function yl({size:e=36,className:t}){const n=Ut(l=>l.config),r=n==null?void 0:n.branding.logo;return r?a.jsx("img",{src:r,alt:(n==null?void 0:n.branding.name)??"Logo",style:{width:e,height:e,objectFit:"contain"},className:t}):a.jsx(po,{size:e,className:t})}const Au="paradigm-university-theme",Lm={campus:{label:"Campus",path:"/"},courses:{label:"Courses",path:"/courses"},plsat:{label:"PLSAT",path:"/plsat"},library:{label:"Library",path:"/reference"},certificates:{label:"Certificates",path:"/certificate"}};function Tm(e,t){return e==="campus"?t==="/":e==="courses"?t.startsWith("/course")||t==="/courses":e==="plsat"?t.startsWith("/plsat"):e==="library"?t.startsWith("/reference"):e==="certificates"?t.startsWith("/certificate"):!1}function zm({version:e}){const t=pr(),n=Ut(c=>c.config),[r,l]=S.useState(()=>{try{return localStorage.getItem(Au)==="dark"}catch{return!1}});S.useEffect(()=>{document.documentElement.setAttribute("data-theme",r?"dark":"light");try{localStorage.setItem(Au,r?"dark":"light")}catch{}},[r]);const i=(n==null?void 0:n.branding.name)??"Paradigm University",o=(n==null?void 0:n.branding.tagline)??"Lux in Codice",s=(n==null?void 0:n.version)??e,u=(n==null?void 0:n.branding.tabs)??["campus","courses","plsat","library","certificates"];return a.jsxs("header",{className:"header",children:[a.jsx("div",{className:"header-left",children:a.jsxs(se,{to:"/",className:"header-brand",children:[a.jsx(yl,{size:36}),a.jsx("h1",{children:i}),a.jsx("span",{className:"subtitle",children:o})]})}),a.jsx("nav",{className:"header-nav",children:u.map(c=>{const m=Lm[c];return m?a.jsx(se,{to:m.path,className:Tm(c,t.pathname)?"active":"",children:m.label},c):null})}),a.jsxs("div",{className:"header-right",children:[a.jsxs("span",{className:"version-badge",children:["v",s]}),a.jsx("button",{className:"theme-toggle",onClick:()=>l(c=>!c),"aria-label":r?"Switch to light mode":"Switch to dark mode",title:r?"Switch to light mode":"Switch to dark mode",children:r?"☀":"☾"})]})]})}const hr=Al((e,t)=>({courses:[],courseCache:{},isLoading:!1,error:null,loadCourses:async()=>{e({isLoading:!0,error:null});try{const n=await fetch("/api/courses");if(!n.ok)throw new Error("Failed to load courses");const r=await n.json();e({courses:r.courses,isLoading:!1})}catch(n){e({error:n.message,isLoading:!1})}},loadCourse:async n=>{const r=t().courseCache[n];if(r)return r;try{const l=await fetch(`/api/courses/${n}`);if(!l.ok)return null;const i=await l.json();return e(o=>({courseCache:{...o.courseCache,[n]:i}})),i}catch{return null}}})),Rm=(e,t)=>e.filter(n=>n.section===t),Cf="paradigm-university-progress";function Im(){try{const e=localStorage.getItem(Cf);return e?JSON.parse(e):{}}catch{return{}}}function mi(e){try{localStorage.setItem(Cf,JSON.stringify(e))}catch{}}const mr=Al((e,t)=>({progress:Im(),completeLesson:(n,r)=>{e(l=>{const i=l.progress[n]||{courseId:n,completedLessons:[],quizResults:{}};if(i.completedLessons.includes(r))return l;const o={...l.progress,[n]:{...i,completedLessons:[...i.completedLessons,r]}};return mi(o),{progress:o}})},recordQuiz:n=>{e(r=>{const l=r.progress[n.courseId]||{courseId:n.courseId,completedLessons:[],quizResults:{}},i={...r.progress,[n.courseId]:{...l,quizResults:{...l.quizResults,[n.lessonId]:n}}};return mi(i),{progress:i}})},getCourseProgress:n=>t().progress[n]||{courseId:n,completedLessons:[],quizResults:{}},isLessonCompleted:(n,r)=>{const l=t().progress[n];return l?l.completedLessons.includes(r):!1},getCoursePercentage:(n,r)=>{if(r===0)return 0;const l=t().progress[n];return l?Math.round(l.completedLessons.length/r*100):0},resetProgress:()=>{mi({}),e({progress:{}})}})),jf="paradigm-university-plsat";function Om(){try{const e=localStorage.getItem(jf);return e?JSON.parse(e):{certificates:[],studentName:""}}catch{return{certificates:[],studentName:""}}}function Fu(e){try{localStorage.setItem(jf,JSON.stringify(e))}catch{}}const ps=Al((e,t)=>{const n=Om();return{certificates:n.certificates,studentName:n.studentName,setStudentName:r=>{e({studentName:r});const l=t();Fu({certificates:l.certificates,studentName:r})},addCertificate:r=>{e(l=>{const i=[...l.certificates,r];return Fu({certificates:i,studentName:l.studentName}),{certificates:i}})},getLatestCertificate:()=>{const r=t().certificates;return r.length===0?null:r.reduce((l,i)=>new Date(i.date)>new Date(l.date)?i:l)},getCertificateForVersion:r=>t().certificates.find(l=>l.plsatVersion===r&&l.passed)||null,hasPassed:()=>t().certificates.some(r=>r.passed)}});function hs({percentage:e,size:t=48,strokeWidth:n=4}){const r=(t-n)/2,l=2*Math.PI*r,i=l-e/100*l;return a.jsxs("div",{className:"progress-ring",style:{width:t,height:t},children:[a.jsxs("svg",{width:t,height:t,children:[a.jsx("circle",{className:"ring-bg",cx:t/2,cy:t/2,r,fill:"none",strokeWidth:n}),a.jsx("circle",{className:"ring-fill",cx:t/2,cy:t/2,r,fill:"none",strokeWidth:n,strokeLinecap:"round",strokeDasharray:l,strokeDashoffset:i})]}),a.jsxs("span",{className:"ring-label",children:[e,"%"]})]})}function Mm(){const{courses:e,isLoading:t,loadCourses:n}=hr(),r=mr(p=>p.getCoursePercentage),l=ps(p=>p.hasPassed),i=Ut(p=>p.config);if(S.useEffect(()=>{n()},[n]),t)return a.jsx("div",{className:"loading",children:"Opening the campus gates..."});const o=(i==null?void 0:i.branding.name)??"Paradigm University",s=(i==null?void 0:i.branding.tagline)??"Lux in Codice",u=(i==null?void 0:i.branding.tabs)??["campus","courses","plsat","library","certificates"],c=i!=null&&i.branding.startCourse?`/course/${i.branding.startCourse}`:"/courses",m=!i||i.mode==="paradigm";return a.jsxs("div",{className:"home",children:[a.jsxs("div",{className:"home-hero",children:[a.jsx(yl,{size:140}),a.jsx("h1",{children:o}),a.jsx("p",{className:"motto",children:m?`Universitas Paradigmatica — ${s}`:s}),m&&a.jsx("p",{className:"description",children:"Master the Paradigm framework through structured courses, hands-on quizzes, and the legendary PLSAT certification exam."})]}),a.jsx("div",{className:"gold-divider"}),a.jsxs("section",{className:"course-catalog",children:[a.jsx("h2",{children:"Course Catalog"}),e.map(p=>{const v=r(p.id,p.lessonCount);return a.jsxs(se,{to:`/course/${p.id}`,className:"course-card",children:[a.jsxs("div",{className:"course-card-header",children:[a.jsx("div",{className:"course-card-title",children:a.jsx("h3",{children:p.title})}),a.jsx(hs,{percentage:v})]}),a.jsx("p",{className:"course-description",children:p.description}),a.jsx("div",{className:"course-topics",children:p.lessons.map(y=>a.jsx("span",{className:"course-topic-tag",children:y.title},y.id))}),a.jsxs("div",{className:"course-meta",children:[a.jsxs("span",{children:[p.lessonCount," lessons"]}),a.jsx("span",{className:"course-meta-cta",children:"Start course →"})]})]},p.id)})]}),a.jsx("div",{className:"gold-divider"}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-lg",children:"Quick Links"}),a.jsxs("div",{className:"quick-links",children:[u.includes("plsat")&&a.jsx(se,{to:"/plsat",className:"quick-link",children:l()?"Retake the PLSAT":"Take the PLSAT"}),u.includes("library")&&a.jsx(se,{to:"/reference",className:"quick-link",children:"Reference Library"}),u.includes("certificates")&&a.jsx(se,{to:"/certificate",className:"quick-link",children:"View Certificates"}),u.includes("courses")&&a.jsx(se,{to:c,className:"quick-link",children:"Start Learning"})]})]})]})}function Dm({sections:e,activeId:t,onSelect:n}){var l;if(e.length<=1&&((l=e[0])==null?void 0:l.default)===!0)return null;const r=[...e].sort((i,o)=>i.order-o.order);return a.jsx("nav",{className:"section-nav","aria-label":"Course sections",children:r.map(i=>{const o=i.id===t;return a.jsxs("button",{type:"button",className:`section-nav-tab${o?" active":""}`,onClick:()=>n(i.id),"aria-current":o?"page":void 0,children:[a.jsx("span",{className:"section-nav-name",children:i.name}),i.description?a.jsx("span",{className:"section-nav-description",children:i.description}):null]},i.id)})})}const $u=new Set;function Am(e){$u.has(e)||($u.add(e),console.warn(`[university] section style "${e}" not yet implemented; rendering as track`))}function Uu({courses:e}){const t=mr(n=>n.getCoursePercentage);return a.jsx("section",{className:"course-catalog",children:e.map(n=>{const r=t(n.id,n.lessonCount);return a.jsxs(se,{to:`/course/${n.id}`,className:"course-card",children:[a.jsx("h3",{children:n.title}),a.jsx("p",{className:"course-description",children:n.description}),a.jsxs("div",{className:"course-meta",children:[a.jsxs("span",{children:[n.lessonCount," lessons"]}),a.jsx(hs,{percentage:r})]})]},n.id)})})}function Fm(){const e=Ut(u=>{var c;return((c=u.config)==null?void 0:c.sections)??[]}),t=hr(u=>u.courses),n=S.useMemo(()=>[...e].sort((u,c)=>u.order-c.order),[e]),r=S.useMemo(()=>{var c;const u=n.find(m=>m.default===!0);return(u==null?void 0:u.id)??((c=n[0])==null?void 0:c.id)??""},[n]),[l,i]=S.useState(r),o=n.find(u=>u.id===l)??n[0];if(!o)return a.jsx(Uu,{courses:t});const s=Rm(t,o.id);return o.style!=="track"&&Am(o.style),a.jsxs("div",{className:"section-view",children:[a.jsx(Dm,{sections:n,activeId:o.id,onSelect:i}),a.jsx(Uu,{courses:s})]})}function $m({courses:e}){const t=mr(n=>n.getCoursePercentage);return a.jsxs("section",{className:"course-catalog",children:[a.jsx("h2",{children:"Course Catalog"}),e.map(n=>{const r=t(n.id,n.lessonCount);return a.jsxs(se,{to:`/course/${n.id}`,className:"course-card",children:[a.jsx("h3",{children:n.title}),a.jsx("p",{className:"course-description",children:n.description}),a.jsxs("div",{className:"course-meta",children:[a.jsxs("span",{children:[n.lessonCount," lessons"]}),a.jsx(hs,{percentage:r})]})]},n.id)})]})}function Um(){const{courses:e,isLoading:t,loadCourses:n}=hr(),r=Ut(i=>{var o;return((o=i.config)==null?void 0:o.sections)??[]});if(S.useEffect(()=>{n()},[n]),t)return a.jsx("div",{className:"loading",children:"Loading courses..."});const l=r.length>1;return a.jsx("div",{className:"home",children:l?a.jsx(Fm,{}):a.jsx($m,{courses:e})})}function Bu(e){return e.replace(/`([^`]+)`/g,"<code>$1</code>").replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/\*([^*]+)\*/g,"<em>$1</em>")}function Bm(e){const t=e.trim().split(`
|
|
84
84
|
`);if(t.length<2)return e;const n=o=>o.split("|").map(s=>s.trim()).filter(s=>s.length>0),r=n(t[0]),l=t.slice(2).map(n);let i="<table><thead><tr>";for(const o of r)i+=`<th>${Bu(o)}</th>`;i+="</tr></thead><tbody>";for(const o of l){i+="<tr>";for(const s of o)i+=`<td>${Bu(s)}</td>`;i+="</tr>"}return i+="</tbody></table>",i}function Wt(e){const t=[];let n=e.replace(/```(\w*)\n([\s\S]*?)```/g,(r,l,i)=>{const o=t.length;return t.push(`<pre><code>${i}</code></pre>`),`\0BLOCK${o}\0`});return n=n.replace(/((?:^\|.+\|\n?)+)/gm,r=>{const l=r.trim().split(`
|
|
85
85
|
`);if(l.length>=3&&/^[\s-:|]+$/.test(l[1])){const i=t.length;return t.push(Bm(r)),`\0BLOCK${i}\0`}return r}),n=n.replace(/`([^`]+)`/g,"<code>$1</code>").replace(/^#### (.+)$/gm,"<h4>$1</h4>").replace(/^### (.+)$/gm,"<h3>$1</h3>").replace(/^## (.+)$/gm,"<h2>$1</h2>").replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/\*([^*]+)\*/g,"<em>$1</em>").replace(/^> (.+)$/gm,"<blockquote>$1</blockquote>").replace(/^\d+\.\s+(.+)$/gm,"<oli>$1</oli>").replace(/((?:<oli>.*<\/oli>\n?)+)/g,r=>"<ol>"+r.replace(/<\/?oli>/g,l=>l.replace("oli","li"))+"</ol>").replace(/^- (.+)$/gm,"<li>$1</li>").replace(/((?:<li>.*<\/li>\n?)+)/g,"<ul>$1</ul>").replace(/^(?!<(?:h[1-6]|ul|ol|li|p|blockquote|pre|table|thead|tbody|tr|td|th|\x00)).+$/gm,"<p>$&</p>").replace(/\n{2,}/g,`
|
|
86
|
-
`),n=n.replace(/\x00BLOCK(\d+)\x00/g,(r,l)=>t[Number(l)]),n}function Wu(){var h,f;const{courseId:e,lessonId:t}=pf(),n=df(),r=hr(d=>d.loadCourse),[l,i]=S.useState(null),[o,s]=S.useState(null),[u,c]=S.useState(!0),{isLessonCompleted:m,completeLesson:p}=mr();if(S.useEffect(()=>{e&&(c(!0),r(e).then(d=>{if(i(d),d&&d.lessons.length>0){const g=t?d.lessons.find(C=>C.id===t):null;g?s(g):(s(d.lessons[0]),n(`/course/${e}/${d.lessons[0].id}`,{replace:!0}))}c(!1)}))},[e,t,r,n]),u)return a.jsx("div",{className:"loading",children:"Opening the textbook..."});if(!l)return a.jsxs("div",{className:"empty-state",children:[a.jsx("h3",{children:"Course not found"}),a.jsx("p",{children:"The requested course does not exist."}),a.jsx(se,{to:"/",className:"btn btn-primary mt-lg",children:"Return to Campus"})]});const v=o?l.lessons.findIndex(d=>d.id===o.id):0,y=()=>{o&&e&&p(e,o.id)},x=(d,g=!1)=>{s(d),n(`/course/${e}/${d.id}`),g&&window.scrollTo(0,0)},w=()=>{v<l.lessons.length-1&&x(l.lessons[v+1],!0)},P=()=>{v>0&&x(l.lessons[v-1],!0)};return a.jsxs("div",{className:"course-layout",children:[a.jsxs("aside",{className:"course-sidebar",children:[a.jsx("h2",{children:l.title}),a.jsx("nav",{className:"lesson-nav",children:l.lessons.map(d=>{const g=e?m(e,d.id):!1,C=(o==null?void 0:o.id)===d.id;let k="lesson-nav-item";return C&&(k+=" active"),g&&!C&&(k+=" completed"),a.jsx("button",{className:k,onClick:()=>x(d),children:d.title},d.id)})})]}),a.jsx("div",{className:"course-content",children:o&&a.jsxs(a.Fragment,{children:[a.jsx("h1",{children:o.title}),(((h=o.keyConcepts)==null?void 0:h.length)??0)>0&&a.jsx("div",{className:"key-concepts",children:o.keyConcepts.map(d=>a.jsx("span",{className:"concept-tag",children:d},d))}),a.jsx("div",{className:"lesson-content",dangerouslySetInnerHTML:{__html:Wt(o.content)}}),a.jsxs("div",{className:"lesson-actions",children:[a.jsx("div",{children:v>0&&a.jsx("button",{className:"btn btn-secondary",onClick:P,children:"Previous"})}),a.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[e&&!m(e,o.id)&&a.jsx("button",{className:"btn btn-secondary",onClick:y,children:"Mark Complete"}),(((f=o.quiz)==null?void 0:f.length)??0)>0&&e&&a.jsx(se,{to:`/course/${e}/quiz/${o.id}`,className:"btn btn-gold",children:"Take Quiz"}),v<l.lessons.length-1&&a.jsx("button",{className:"btn btn-primary",onClick:w,children:"Next Lesson"})]})]})]})})]})}function ho({number:e,question:t,scenario:n,choices:r,correct:l,explanation:i,selectedAnswer:o,onSelect:s,showResult:u,onAnswered:c,splitLayout:m}){const[p,v]=S.useState(null),[y,x]=S.useState(!1),w=s!==void 0,P=w?o||null:p,h=w?u:y,f=E=>{h&&!w||(w?s==null||s(E):(v(E),x(!0),c==null||c(E)))},d=P===l,g=Object.keys(r).sort(),C=a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"question-number",children:["Question ",e]}),n&&a.jsx("div",{className:"scenario",dangerouslySetInnerHTML:{__html:Wt(n)}}),a.jsx("div",{className:"question-text",dangerouslySetInnerHTML:{__html:Wt(t)}})]}),k=a.jsx("div",{className:"choices",children:g.map(E=>{let N="choice-btn";return P===E&&(N+=" selected"),h&&E===l&&(N+=" correct"),h&&P===E&&E!==l&&(N+=" incorrect"),a.jsxs("button",{className:N,onClick:()=>f(E),disabled:h&&!w,children:[a.jsxs("span",{className:"choice-letter",children:[E,"."]}),a.jsx("span",{dangerouslySetInnerHTML:{__html:Wt(r[E])}})]},E)})});return m?a.jsxs("div",{className:"question-card",children:[a.jsxs("div",{className:"question-split-layout",children:[a.jsx("div",{className:"question-content",children:C}),a.jsx("div",{className:"answer-choices",children:k})]}),h&&a.jsxs("div",{className:`explanation ${d?"":"wrong"}`,children:[a.jsx("strong",{children:d?"Correct!":`Incorrect. The answer is ${l}.`}),a.jsx("br",{}),a.jsx("span",{dangerouslySetInnerHTML:{__html:Wt(i)}})]})]}):a.jsxs("div",{className:"question-card",children:[C,k,h&&a.jsxs("div",{className:`explanation ${d?"":"wrong"}`,children:[a.jsx("strong",{children:d?"Correct!":`Incorrect. The answer is ${l}.`}),a.jsx("br",{}),a.jsx("span",{dangerouslySetInnerHTML:{__html:Wt(i)}})]})]})}function Wm(){const{courseId:e,lessonId:t}=pf(),n=hr(g=>g.loadCourse),{recordQuiz:r,completeLesson:l,getCourseProgress:i}=mr(),[o,s]=S.useState(null),[u,c]=S.useState(null),[m,p]=S.useState(!0),[v,y]=S.useState(!1),[x,w]=S.useState(0),P=e&&t?i(e).quizResults[t]:void 0;S.useEffect(()=>{e&&(p(!0),n(e).then(g=>{if(g&&t){const C=g.lessons.findIndex(k=>k.id===t);s(C>=0?g.lessons[C]:null),C>=0&&C<g.lessons.length-1&&c(g.lessons[C+1].id)}p(!1)}))},[e,t,n]);const[h,f]=S.useState({}),d=(g,C)=>{if(f(k=>({...k,[g]:C})),o){const k={...h,[g]:C};if(Object.keys(k).length===o.quiz.length){const E=o.quiz.filter(N=>k[N.id]===N.correct).length;if(w(E),y(!0),e&&t){const N={courseId:e,lessonId:t,score:E,total:o.quiz.length,answers:k,date:new Date().toISOString()};r(N),l(e,t)}}}};return m?a.jsx("div",{className:"loading",children:"Preparing your examination..."}):!o||o.quiz.length===0?a.jsxs("div",{className:"empty-state",children:[a.jsx("h3",{children:"No quiz available"}),a.jsx("p",{children:"This lesson does not have a quiz."}),a.jsx(se,{to:`/course/${e}`,className:"btn btn-primary mt-lg",children:"Back to Course"})]}):a.jsxs("div",{className:"quiz-container",children:[a.jsxs("div",{className:"quiz-header",children:[a.jsxs("h1",{children:[o.title," — Quiz"]}),a.jsx("p",{className:"quiz-progress",children:v?`Score: ${x}/${o.quiz.length} (${Math.round(x/o.quiz.length*100)}%)`:`${Object.keys(h).length}/${o.quiz.length} answered`}),P&&!v&&a.jsxs("p",{className:"text-muted mt-sm",children:["Previous best: ",P.score,"/",P.total]})]}),o.quiz.map((g,C)=>a.jsx(ho,{number:C+1,question:g.question,choices:g.choices,correct:g.correct,explanation:g.explanation,onAnswered:k=>d(g.id,k)},g.id)),v&&a.jsxs("div",{className:"text-center mt-xl",children:[a.jsx("p",{className:"mb-lg",style:{fontSize:"1.25rem",fontFamily:"var(--font-serif)"},children:x===o.quiz.length?"Perfect score! Exemplary scholarship.":x>=o.quiz.length*.8?"Well done, scholar. You have demonstrated understanding.":"Review the material and try again. Persistence is the path to mastery."}),u?a.jsx(se,{to:`/course/${e}/${u}`,className:"btn btn-primary",children:"Next Lesson"}):a.jsx(se,{to:`/course/${e}`,className:"btn btn-primary",children:"Return to Course"})]})]})}function Vm({totalSeconds:e,onTimeUp:t,running:n}){const[r,l]=S.useState(e),i=S.useCallback(()=>{t()},[t]);S.useEffect(()=>{if(!n)return;const m=setInterval(()=>{l(p=>p<=1?(clearInterval(m),i(),0):p-1)},1e3);return()=>clearInterval(m)},[n,i]);const o=Math.floor(r/60),s=r%60,u=r/e*100;let c="timer-display";return u<20?c+=" critical":u<40&&(c+=" warning"),a.jsxs("span",{className:c,children:[String(o).padStart(2,"0"),":",String(s).padStart(2,"0")]})}function Vu({text:e}){const t=e.split(/(```[\s\S]*?```)/g);return a.jsx("div",{className:"passage-block",children:a.jsx("div",{className:"passage-content",children:t.map((n,r)=>{if(n.startsWith("```")){const l=n.match(/^```(\w*)\n?([\s\S]*?)```$/),i=l?l[2]:n.slice(3,-3);return a.jsx("pre",{children:a.jsx("code",{children:i})},r)}return n.split(/\n\n+/).map((l,i)=>a.jsx("p",{children:l},`${r}-${i}`))})})})}function Hu(e,t,n){if(!t)return null;const r=e[n];return r.passageId?t[r.passageId]??null:null}function Hm(){const[e,t]=S.useState(null),[n,r]=S.useState("intro"),[l,i]=S.useState({}),[o,s]=S.useState(0),[u,c]=S.useState(!0),[m,p]=S.useState(null),{studentName:v,setStudentName:y,addCertificate:x}=ps(),[w,P]=S.useState(v);S.useEffect(()=>{async function k(){var E,N;try{const ee=(N=(E=(await(await fetch("/api/plsat")).json()).versions)==null?void 0:E[0])==null?void 0:N.version;if(!ee)return;const be=await fetch(`/api/plsat/${ee}`);if(!be.ok)return;t(await be.json())}catch{}finally{c(!1)}}k()},[]);const h=S.useCallback(()=>{if(!e)return;const k=e.questions.filter(ee=>l[ee.id]===ee.correct).length,E=e.questions.length,N=Math.round(k/E*100),M=N>=e.passThreshold*100,z={name:w||"Anonymous Scholar",score:k,total:E,percentage:N,passed:M,plsatVersion:e.version,frameworkVersion:e.frameworkVersion,date:new Date().toISOString()};p(z),x(z),w&&y(w),r("results")},[e,l,w,x,y]),f=S.useCallback(()=>{h()},[h]),d=()=>{h()},g=()=>{i({}),s(0),r("exam")},C=S.useMemo(()=>!e||n!=="exam"?null:Hu(e.questions,e.passages,o),[e,n,o]);if(u)return a.jsx("div",{className:"loading",children:"The examination board is convening..."});if(!e)return a.jsxs("div",{className:"empty-state",children:[a.jsx("h3",{children:"PLSAT Unavailable"}),a.jsx("p",{children:"Could not load the examination. Please try again."})]});if(n==="intro")return a.jsxs("div",{className:"plsat-container",children:[a.jsxs("div",{className:"plsat-intro",children:[a.jsx(po,{size:100}),a.jsx("h1",{children:"The PLSAT"}),a.jsx("p",{className:"plsat-subtitle",children:"Paradigm Licensure Standardized Assessment Test"}),a.jsxs("p",{className:"text-muted",children:["Version ",e.version]})]}),a.jsxs("div",{className:"plsat-rules",children:[a.jsx("h3",{children:"Examination Rules"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsxs("strong",{children:[e.questions.length," questions"]})," covering all aspects of the Paradigm framework"]}),a.jsxs("li",{children:[a.jsxs("strong",{children:[Math.floor(e.timeLimit/60)," minutes"]})," to complete the examination"]}),a.jsxs("li",{children:[a.jsxs("strong",{children:[e.passThreshold*100,"%"]})," required to pass and receive certification"]}),a.jsx("li",{children:"All questions are multiple choice (A through E)"}),a.jsx("li",{children:"Some questions reference a shared passage — read it carefully"}),a.jsx("li",{children:"You may navigate between questions freely"}),a.jsx("li",{children:"There is no penalty for guessing — answer every question"}),a.jsx("li",{children:"Your certificate will display the PLSAT version for posterity"})]})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"mb-lg",children:a.jsx("input",{type:"text",className:"name-input",placeholder:"Enter your name, scholar",value:w,onChange:k=>P(k.target.value)})}),a.jsx("button",{className:"btn btn-primary btn-lg",onClick:g,children:"Begin Examination"})]})]});if(n==="exam"){const k=e.questions[o],E=Object.keys(l).length;return a.jsxs("div",{className:"plsat-container",children:[a.jsxs("div",{className:"plsat-timer",children:[a.jsx(Vm,{totalSeconds:e.timeLimit,onTimeUp:f,running:!0}),a.jsxs("span",{className:"plsat-progress-text",children:["Question ",o+1," of ",e.questions.length," | ",E," answered"]})]}),a.jsxs("div",{style:{marginTop:"var(--space-lg)"},children:[C&&a.jsx(Vu,{text:C}),a.jsx(ho,{number:o+1,question:k.question,scenario:k.scenario,choices:k.choices,correct:k.correct,explanation:k.explanation,selectedAnswer:l[k.id],onSelect:N=>i(M=>({...M,[k.id]:N})),showResult:!1,splitLayout:!0})]}),a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"var(--space-lg)"},children:[a.jsx("button",{className:"btn btn-secondary",disabled:o===0,onClick:()=>s(N=>N-1),children:"Previous"}),a.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[E===e.questions.length&&a.jsx("button",{className:"btn btn-gold",onClick:d,children:"Submit Examination"}),a.jsx("button",{className:"btn btn-primary",disabled:o===e.questions.length-1,onClick:()=>s(N=>N+1),children:"Next"})]})]}),a.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",marginTop:"var(--space-xl)",justifyContent:"center"},children:e.questions.map((N,M)=>a.jsx("button",{onClick:()=>s(M),style:{width:28,height:28,borderRadius:"50%",border:M===o?"2px solid var(--burgundy)":"1px solid var(--parchment-dark)",background:l[N.id]?"var(--gold-bg)":"var(--cream)",color:"var(--ink)",fontSize:"0.6875rem",cursor:"pointer",fontWeight:M===o?600:400},children:M+1},N.id))})]})}return n==="results"&&m?a.jsx("div",{className:"plsat-container",children:a.jsxs("div",{className:"plsat-results",children:[a.jsx(po,{size:80}),a.jsxs("div",{className:`score-display ${m.passed?"passed":"failed"}`,children:[m.percentage,"%"]}),a.jsx("p",{className:"verdict",children:m.passed?"Congratulations! You have passed the PLSAT.":"The examination board regrets to inform you that you did not pass."}),a.jsxs("p",{className:"text-muted mb-lg",children:["Score: ",m.score,"/",m.total," | PLSAT v",m.plsatVersion," | ",new Date(m.date).toLocaleDateString()]}),a.jsxs("div",{style:{display:"flex",gap:"1rem",justifyContent:"center"},children:[m.passed&&a.jsx(se,{to:"/certificate",className:"btn btn-gold btn-lg",children:"View Certificate"}),a.jsx("button",{className:"btn btn-secondary",onClick:()=>r("review"),children:"Review Answers"}),a.jsx("button",{className:"btn btn-primary",onClick:()=>r("intro"),children:m.passed?"Retake":"Try Again"})]})]})}):n==="review"?a.jsxs("div",{className:"plsat-container",children:[a.jsxs("div",{className:"quiz-header",children:[a.jsx("h1",{children:"PLSAT Review"}),a.jsx("p",{className:"quiz-progress",children:m?`Score: ${m.score}/${m.total} (${m.percentage}%)`:""})]}),e.questions.map((k,E)=>{const N=Hu(e.questions,e.passages,E);return a.jsxs("div",{children:[N&&a.jsx(Vu,{text:N}),a.jsx(ho,{number:E+1,question:k.question,scenario:k.scenario,choices:k.choices,correct:k.correct,explanation:k.explanation,selectedAnswer:l[k.id],onSelect:()=>{},showResult:!0,splitLayout:!0})]},k.id)}),a.jsx("div",{className:"text-center mt-xl",children:a.jsx("button",{className:"btn btn-primary",onClick:()=>r("results"),children:"Back to Results"})})]}):null}function Qm(){const[e,t]=S.useState(null),[n,r]=S.useState(!0),[l,i]=S.useState(null);return S.useEffect(()=>{fetch("/api/reference").then(async o=>{if(!o.ok){const u=await o.json().catch(()=>({}));i(typeof u.error=="string"?u.error:"Could not load reference data."),r(!1);return}const s=await o.json();t(s),r(!1)}).catch(()=>{i("Could not load reference data."),r(!1)})},[]),n?a.jsx("div",{className:"loading",children:"Opening the reference library..."}):e?a.jsxs("div",{className:"reference-container",children:[a.jsx("h1",{className:"mb-lg",children:"Reference Library"}),e.sections.map(o=>a.jsxs("section",{className:"reference-section",children:[a.jsx("h2",{children:o.title}),a.jsx("div",{className:"reference-grid",children:o.cards.map(s=>a.jsxs("div",{className:"ref-card",children:[s.symbol&&a.jsx("div",{className:"ref-symbol",children:s.symbol}),a.jsx("h4",{children:s.name}),a.jsx("p",{children:s.description}),s.examples&&s.examples.length>0&&a.jsx("div",{className:"ref-examples",children:s.examples.map(u=>a.jsx("span",{className:"ref-example",children:u},u))}),s.logger&&a.jsx("p",{style:{marginTop:"0.5rem"},children:a.jsx("code",{children:s.logger})}),s.when&&a.jsx("p",{className:"text-muted",style:{fontSize:"0.8125rem",marginTop:"0.25rem"},children:a.jsx("em",{children:s.when})}),s.command&&a.jsx("p",{style:{marginTop:"0.5rem"},children:a.jsx("code",{children:s.command})}),s.steps&&s.steps.length>0&&a.jsx("ol",{style:{fontSize:"0.875rem",paddingLeft:"1.25rem",marginTop:"0.5rem"},children:s.steps.map((u,c)=>a.jsx("li",{style:{marginBottom:"0.25rem"},children:u},c))})]},s.id))})]},o.id))]}):a.jsxs("div",{className:"empty-state",children:[a.jsx("h3",{children:"Reference library unavailable"}),a.jsx("p",{children:l??"Could not load reference data."})]})}function Km(){const{certificates:e}=ps(),t=Ut(u=>u.config),n=(t==null?void 0:t.branding.name)??"Paradigm University",r=(t==null?void 0:t.branding.tagline)??"Lux in Codice",i=!t||t.mode==="paradigm"?`Universitas Paradigmatica — ${r}`:r,o=e.filter(u=>u.passed),s=o.length>0?o.reduce((u,c)=>new Date(c.date)>new Date(u.date)?c:u):null;return s?a.jsxs("div",{className:"certificate-container",children:[a.jsx("div",{className:"no-print text-center mb-lg",children:a.jsx("button",{className:"btn btn-gold",onClick:()=>window.print(),children:"Print Certificate"})}),a.jsxs("div",{className:"certificate",children:[a.jsx(yl,{size:100,className:"cert-seal"}),a.jsx("h1",{children:n}),a.jsx("p",{className:"cert-title",children:i}),a.jsx("div",{className:"gold-divider"}),a.jsx("p",{style:{fontSize:"0.875rem",color:"var(--ink-muted)",marginTop:"var(--space-lg)"},children:"This is to certify that"}),a.jsx("div",{className:"cert-name",children:s.name}),a.jsxs("p",{className:"cert-body",children:["has successfully completed the",a.jsx("br",{}),a.jsx("strong",{children:"Paradigm Licensure Standardized Assessment Test"}),a.jsx("br",{}),"and is hereby recognized as a certified Paradigm practitioner."]}),a.jsxs("p",{className:"cert-score",children:["Score: ",s.score,"/",s.total," (",s.percentage,"%)"]}),a.jsx("div",{className:"gold-divider"}),a.jsxs("dl",{className:"cert-meta",children:[a.jsxs("div",{children:[a.jsx("dt",{children:"PLSAT Version"}),a.jsxs("dd",{children:["v",s.plsatVersion]})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Framework Version"}),a.jsxs("dd",{children:["v",s.frameworkVersion]})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Date Issued"}),a.jsx("dd",{children:new Date(s.date).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})})]})]})]}),e.length>1&&a.jsxs("div",{className:"no-print mt-xl",children:[a.jsx("h3",{className:"mb-md",children:"All Attempts"}),[...e].reverse().map((u,c)=>a.jsx("div",{className:"ref-card",style:{marginBottom:"0.5rem"},children:a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[a.jsxs("span",{children:["PLSAT v",u.plsatVersion," — ",u.score,"/",u.total," (",u.percentage,"%)",u.passed?" ✓":""]}),a.jsx("span",{className:"text-muted",children:new Date(u.date).toLocaleDateString()})]})},c))]})]}):a.jsxs("div",{className:"certificate-container",children:[a.jsxs("div",{className:"empty-state",children:[a.jsx(yl,{size:80}),a.jsx("h3",{className:"mt-lg",children:"No Certificates Yet"}),a.jsx("p",{children:"Pass the PLSAT examination to earn your certification."}),a.jsx(se,{to:"/plsat",className:"btn btn-primary mt-lg",children:"Take the PLSAT"})]}),e.length>0&&a.jsxs("div",{className:"mt-xl",children:[a.jsx("h3",{className:"mb-md",children:"Previous Attempts"}),e.map((u,c)=>a.jsx("div",{className:"ref-card",style:{marginBottom:"0.5rem"},children:a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[a.jsxs("span",{children:["PLSAT v",u.plsatVersion," — ",u.score,"/",u.total," (",u.percentage,"%)"]}),a.jsx("span",{className:"text-muted",children:new Date(u.date).toLocaleDateString()})]})},c))]})]})}function Ym(){const{loadPackConfig:e,config:t}=Ut();return S.useEffect(()=>{e()},[e]),S.useEffect(()=>{if(t&&(document.title=t.branding.name,t.branding.favicon)){const n=document.querySelector('link[rel~="icon"]');n&&(n.href=t.branding.favicon)}},[t]),a.jsxs("div",{className:"app",children:[a.jsx(zm,{version:"6.5.0"}),a.jsx("main",{className:"main-content",children:a.jsxs(Qh,{children:[a.jsx(We,{path:"/",element:a.jsx(Mm,{})}),a.jsx(We,{path:"/courses",element:a.jsx(Um,{})}),a.jsx(We,{path:"/course/:courseId",element:a.jsx(Wu,{})}),a.jsx(We,{path:"/course/:courseId/:lessonId",element:a.jsx(Wu,{})}),a.jsx(We,{path:"/course/:courseId/quiz/:lessonId",element:a.jsx(Wm,{})}),a.jsx(We,{path:"/plsat",element:a.jsx(Hm,{})}),a.jsx(We,{path:"/reference",element:a.jsx(Qm,{})}),a.jsx(We,{path:"/certificate",element:a.jsx(Km,{})})]})})]})}vi.createRoot(document.getElementById("root")).render(a.jsx(xo.StrictMode,{children:a.jsx(Zh,{children:a.jsx(Ym,{})})}));
|
|
87
|
-
//# sourceMappingURL=index-
|
|
86
|
+
`),n=n.replace(/\x00BLOCK(\d+)\x00/g,(r,l)=>t[Number(l)]),n}function Wu(){var h,f;const{courseId:e,lessonId:t}=pf(),n=df(),r=hr(d=>d.loadCourse),[l,i]=S.useState(null),[o,s]=S.useState(null),[u,c]=S.useState(!0),{isLessonCompleted:m,completeLesson:p}=mr();if(S.useEffect(()=>{e&&(c(!0),r(e).then(d=>{if(i(d),d&&d.lessons.length>0){const g=t?d.lessons.find(C=>C.id===t):null;g?s(g):(s(d.lessons[0]),n(`/course/${e}/${d.lessons[0].id}`,{replace:!0}))}c(!1)}))},[e,t,r,n]),u)return a.jsx("div",{className:"loading",children:"Opening the textbook..."});if(!l)return a.jsxs("div",{className:"empty-state",children:[a.jsx("h3",{children:"Course not found"}),a.jsx("p",{children:"The requested course does not exist."}),a.jsx(se,{to:"/",className:"btn btn-primary mt-lg",children:"Return to Campus"})]});const v=o?l.lessons.findIndex(d=>d.id===o.id):0,y=()=>{o&&e&&p(e,o.id)},x=(d,g=!1)=>{s(d),n(`/course/${e}/${d.id}`),g&&window.scrollTo(0,0)},w=()=>{v<l.lessons.length-1&&x(l.lessons[v+1],!0)},P=()=>{v>0&&x(l.lessons[v-1],!0)};return a.jsxs("div",{className:"course-layout",children:[a.jsxs("aside",{className:"course-sidebar",children:[a.jsx("h2",{children:l.title}),a.jsx("nav",{className:"lesson-nav",children:l.lessons.map(d=>{const g=e?m(e,d.id):!1,C=(o==null?void 0:o.id)===d.id;let k="lesson-nav-item";return C&&(k+=" active"),g&&!C&&(k+=" completed"),a.jsx("button",{className:k,onClick:()=>x(d),children:d.title},d.id)})})]}),a.jsx("div",{className:"course-content",children:o&&a.jsxs(a.Fragment,{children:[a.jsx("h1",{children:o.title}),(((h=o.keyConcepts)==null?void 0:h.length)??0)>0&&a.jsx("div",{className:"key-concepts",children:o.keyConcepts.map(d=>a.jsx("span",{className:"concept-tag",children:d},d))}),a.jsx("div",{className:"lesson-content",dangerouslySetInnerHTML:{__html:Wt(o.content)}}),a.jsxs("div",{className:"lesson-actions",children:[a.jsx("div",{children:v>0&&a.jsx("button",{className:"btn btn-secondary",onClick:P,children:"Previous"})}),a.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[e&&!m(e,o.id)&&a.jsx("button",{className:"btn btn-secondary",onClick:y,children:"Mark Complete"}),(((f=o.quiz)==null?void 0:f.length)??0)>0&&e&&a.jsx(se,{to:`/course/${e}/quiz/${o.id}`,className:"btn btn-gold",children:"Take Quiz"}),v<l.lessons.length-1&&a.jsx("button",{className:"btn btn-primary",onClick:w,children:"Next Lesson"})]})]})]})})]})}function ho({number:e,question:t,scenario:n,choices:r,correct:l,explanation:i,selectedAnswer:o,onSelect:s,showResult:u,onAnswered:c,splitLayout:m}){const[p,v]=S.useState(null),[y,x]=S.useState(!1),w=s!==void 0,P=w?o||null:p,h=w?u:y,f=E=>{h&&!w||(w?s==null||s(E):(v(E),x(!0),c==null||c(E)))},d=P===l,g=Object.keys(r).sort(),C=a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"question-number",children:["Question ",e]}),n&&a.jsx("div",{className:"scenario",dangerouslySetInnerHTML:{__html:Wt(n)}}),a.jsx("div",{className:"question-text",dangerouslySetInnerHTML:{__html:Wt(t)}})]}),k=a.jsx("div",{className:"choices",children:g.map(E=>{let N="choice-btn";return P===E&&(N+=" selected"),h&&E===l&&(N+=" correct"),h&&P===E&&E!==l&&(N+=" incorrect"),a.jsxs("button",{className:N,onClick:()=>f(E),disabled:h&&!w,children:[a.jsxs("span",{className:"choice-letter",children:[E,"."]}),a.jsx("span",{dangerouslySetInnerHTML:{__html:Wt(r[E])}})]},E)})});return m?a.jsxs("div",{className:"question-card",children:[a.jsxs("div",{className:"question-split-layout",children:[a.jsx("div",{className:"question-content",children:C}),a.jsx("div",{className:"answer-choices",children:k})]}),h&&a.jsxs("div",{className:`explanation ${d?"":"wrong"}`,children:[a.jsx("strong",{children:d?"Correct!":`Incorrect. The answer is ${l}.`}),a.jsx("br",{}),a.jsx("span",{dangerouslySetInnerHTML:{__html:Wt(i)}})]})]}):a.jsxs("div",{className:"question-card",children:[C,k,h&&a.jsxs("div",{className:`explanation ${d?"":"wrong"}`,children:[a.jsx("strong",{children:d?"Correct!":`Incorrect. The answer is ${l}.`}),a.jsx("br",{}),a.jsx("span",{dangerouslySetInnerHTML:{__html:Wt(i)}})]})]})}function Wm(){const{courseId:e,lessonId:t}=pf(),n=hr(g=>g.loadCourse),{recordQuiz:r,completeLesson:l,getCourseProgress:i}=mr(),[o,s]=S.useState(null),[u,c]=S.useState(null),[m,p]=S.useState(!0),[v,y]=S.useState(!1),[x,w]=S.useState(0),P=e&&t?i(e).quizResults[t]:void 0;S.useEffect(()=>{e&&(p(!0),n(e).then(g=>{if(g&&t){const C=g.lessons.findIndex(k=>k.id===t);s(C>=0?g.lessons[C]:null),C>=0&&C<g.lessons.length-1&&c(g.lessons[C+1].id)}p(!1)}))},[e,t,n]);const[h,f]=S.useState({}),d=(g,C)=>{if(f(k=>({...k,[g]:C})),o){const k={...h,[g]:C};if(Object.keys(k).length===o.quiz.length){const E=o.quiz.filter(N=>k[N.id]===N.correct).length;if(w(E),y(!0),e&&t){const N={courseId:e,lessonId:t,score:E,total:o.quiz.length,answers:k,date:new Date().toISOString()};r(N),l(e,t)}}}};return m?a.jsx("div",{className:"loading",children:"Preparing your examination..."}):!o||o.quiz.length===0?a.jsxs("div",{className:"empty-state",children:[a.jsx("h3",{children:"No quiz available"}),a.jsx("p",{children:"This lesson does not have a quiz."}),a.jsx(se,{to:`/course/${e}`,className:"btn btn-primary mt-lg",children:"Back to Course"})]}):a.jsxs("div",{className:"quiz-container",children:[a.jsxs("div",{className:"quiz-header",children:[a.jsxs("h1",{children:[o.title," — Quiz"]}),a.jsx("p",{className:"quiz-progress",children:v?`Score: ${x}/${o.quiz.length} (${Math.round(x/o.quiz.length*100)}%)`:`${Object.keys(h).length}/${o.quiz.length} answered`}),P&&!v&&a.jsxs("p",{className:"text-muted mt-sm",children:["Previous best: ",P.score,"/",P.total]})]}),o.quiz.map((g,C)=>a.jsx(ho,{number:C+1,question:g.question,choices:g.choices,correct:g.correct,explanation:g.explanation,onAnswered:k=>d(g.id,k)},g.id)),v&&a.jsxs("div",{className:"text-center mt-xl",children:[a.jsx("p",{className:"mb-lg",style:{fontSize:"1.25rem",fontFamily:"var(--font-serif)"},children:x===o.quiz.length?"Perfect score! Exemplary scholarship.":x>=o.quiz.length*.8?"Well done, scholar. You have demonstrated understanding.":"Review the material and try again. Persistence is the path to mastery."}),u?a.jsx(se,{to:`/course/${e}/${u}`,className:"btn btn-primary",children:"Next Lesson"}):a.jsx(se,{to:`/course/${e}`,className:"btn btn-primary",children:"Return to Course"})]})]})}function Vm({totalSeconds:e,onTimeUp:t,running:n}){const[r,l]=S.useState(e),i=S.useCallback(()=>{t()},[t]);S.useEffect(()=>{if(!n)return;const m=setInterval(()=>{l(p=>p<=1?(clearInterval(m),i(),0):p-1)},1e3);return()=>clearInterval(m)},[n,i]);const o=Math.floor(r/60),s=r%60,u=r/e*100;let c="timer-display";return u<20?c+=" critical":u<40&&(c+=" warning"),a.jsxs("span",{className:c,children:[String(o).padStart(2,"0"),":",String(s).padStart(2,"0")]})}function Vu({text:e}){const t=e.split(/(```[\s\S]*?```)/g);return a.jsx("div",{className:"passage-block",children:a.jsx("div",{className:"passage-content",children:t.map((n,r)=>{if(n.startsWith("```")){const l=n.match(/^```(\w*)\n?([\s\S]*?)```$/),i=l?l[2]:n.slice(3,-3);return a.jsx("pre",{children:a.jsx("code",{children:i})},r)}return n.split(/\n\n+/).map((l,i)=>a.jsx("p",{children:l},`${r}-${i}`))})})})}function Hu(e,t,n){if(!t)return null;const r=e[n];return r.passageId?t[r.passageId]??null:null}function Hm(){const[e,t]=S.useState(null),[n,r]=S.useState("intro"),[l,i]=S.useState({}),[o,s]=S.useState(0),[u,c]=S.useState(!0),[m,p]=S.useState(null),{studentName:v,setStudentName:y,addCertificate:x}=ps(),[w,P]=S.useState(v);S.useEffect(()=>{async function k(){var E,N;try{const ee=(N=(E=(await(await fetch("/api/plsat")).json()).versions)==null?void 0:E[0])==null?void 0:N.version;if(!ee)return;const be=await fetch(`/api/plsat/${ee}`);if(!be.ok)return;t(await be.json())}catch{}finally{c(!1)}}k()},[]);const h=S.useCallback(()=>{if(!e)return;const k=e.questions.filter(ee=>l[ee.id]===ee.correct).length,E=e.questions.length,N=Math.round(k/E*100),M=N>=e.passThreshold*100,z={name:w||"Anonymous Scholar",score:k,total:E,percentage:N,passed:M,plsatVersion:e.version,frameworkVersion:e.frameworkVersion,date:new Date().toISOString()};p(z),x(z),w&&y(w),r("results")},[e,l,w,x,y]),f=S.useCallback(()=>{h()},[h]),d=()=>{h()},g=()=>{i({}),s(0),r("exam")},C=S.useMemo(()=>!e||n!=="exam"?null:Hu(e.questions,e.passages,o),[e,n,o]);if(u)return a.jsx("div",{className:"loading",children:"The examination board is convening..."});if(!e)return a.jsxs("div",{className:"empty-state",children:[a.jsx("h3",{children:"PLSAT Unavailable"}),a.jsx("p",{children:"Could not load the examination. Please try again."})]});if(n==="intro")return a.jsxs("div",{className:"plsat-container",children:[a.jsxs("div",{className:"plsat-intro",children:[a.jsx(po,{size:100}),a.jsx("h1",{children:"The PLSAT"}),a.jsx("p",{className:"plsat-subtitle",children:"Paradigm Licensure Standardized Assessment Test"}),a.jsxs("p",{className:"text-muted",children:["Version ",e.version]})]}),a.jsxs("div",{className:"plsat-rules",children:[a.jsx("h3",{children:"Examination Rules"}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsxs("strong",{children:[e.questions.length," questions"]})," covering all aspects of the Paradigm framework"]}),a.jsxs("li",{children:[a.jsxs("strong",{children:[Math.floor(e.timeLimit/60)," minutes"]})," to complete the examination"]}),a.jsxs("li",{children:[a.jsxs("strong",{children:[e.passThreshold*100,"%"]})," required to pass and receive certification"]}),a.jsx("li",{children:"All questions are multiple choice (A through E)"}),a.jsx("li",{children:"Some questions reference a shared passage — read it carefully"}),a.jsx("li",{children:"You may navigate between questions freely"}),a.jsx("li",{children:"There is no penalty for guessing — answer every question"}),a.jsx("li",{children:"Your certificate will display the PLSAT version for posterity"})]})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"mb-lg",children:a.jsx("input",{type:"text",className:"name-input",placeholder:"Enter your name, scholar",value:w,onChange:k=>P(k.target.value)})}),a.jsx("button",{className:"btn btn-primary btn-lg",onClick:g,children:"Begin Examination"})]})]});if(n==="exam"){const k=e.questions[o],E=Object.keys(l).length;return a.jsxs("div",{className:"plsat-container",children:[a.jsxs("div",{className:"plsat-timer",children:[a.jsx(Vm,{totalSeconds:e.timeLimit,onTimeUp:f,running:!0}),a.jsxs("span",{className:"plsat-progress-text",children:["Question ",o+1," of ",e.questions.length," | ",E," answered"]})]}),a.jsxs("div",{style:{marginTop:"var(--space-lg)"},children:[C&&a.jsx(Vu,{text:C}),a.jsx(ho,{number:o+1,question:k.question,scenario:k.scenario,choices:k.choices,correct:k.correct,explanation:k.explanation,selectedAnswer:l[k.id],onSelect:N=>i(M=>({...M,[k.id]:N})),showResult:!1,splitLayout:!0})]}),a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"var(--space-lg)"},children:[a.jsx("button",{className:"btn btn-secondary",disabled:o===0,onClick:()=>s(N=>N-1),children:"Previous"}),a.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[E===e.questions.length&&a.jsx("button",{className:"btn btn-gold",onClick:d,children:"Submit Examination"}),a.jsx("button",{className:"btn btn-primary",disabled:o===e.questions.length-1,onClick:()=>s(N=>N+1),children:"Next"})]})]}),a.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",marginTop:"var(--space-xl)",justifyContent:"center"},children:e.questions.map((N,M)=>a.jsx("button",{onClick:()=>s(M),style:{width:28,height:28,borderRadius:"50%",border:M===o?"2px solid var(--burgundy)":"1px solid var(--parchment-dark)",background:l[N.id]?"var(--gold-bg)":"var(--cream)",color:"var(--ink)",fontSize:"0.6875rem",cursor:"pointer",fontWeight:M===o?600:400},children:M+1},N.id))})]})}return n==="results"&&m?a.jsx("div",{className:"plsat-container",children:a.jsxs("div",{className:"plsat-results",children:[a.jsx(po,{size:80}),a.jsxs("div",{className:`score-display ${m.passed?"passed":"failed"}`,children:[m.percentage,"%"]}),a.jsx("p",{className:"verdict",children:m.passed?"Congratulations! You have passed the PLSAT.":"The examination board regrets to inform you that you did not pass."}),a.jsxs("p",{className:"text-muted mb-lg",children:["Score: ",m.score,"/",m.total," | PLSAT v",m.plsatVersion," | ",new Date(m.date).toLocaleDateString()]}),a.jsxs("div",{style:{display:"flex",gap:"1rem",justifyContent:"center"},children:[m.passed&&a.jsx(se,{to:"/certificate",className:"btn btn-gold btn-lg",children:"View Certificate"}),a.jsx("button",{className:"btn btn-secondary",onClick:()=>r("review"),children:"Review Answers"}),a.jsx("button",{className:"btn btn-primary",onClick:()=>r("intro"),children:m.passed?"Retake":"Try Again"})]})]})}):n==="review"?a.jsxs("div",{className:"plsat-container",children:[a.jsxs("div",{className:"quiz-header",children:[a.jsx("h1",{children:"PLSAT Review"}),a.jsx("p",{className:"quiz-progress",children:m?`Score: ${m.score}/${m.total} (${m.percentage}%)`:""})]}),e.questions.map((k,E)=>{const N=Hu(e.questions,e.passages,E);return a.jsxs("div",{children:[N&&a.jsx(Vu,{text:N}),a.jsx(ho,{number:E+1,question:k.question,scenario:k.scenario,choices:k.choices,correct:k.correct,explanation:k.explanation,selectedAnswer:l[k.id],onSelect:()=>{},showResult:!0,splitLayout:!0})]},k.id)}),a.jsx("div",{className:"text-center mt-xl",children:a.jsx("button",{className:"btn btn-primary",onClick:()=>r("results"),children:"Back to Results"})})]}):null}function Qm(){const[e,t]=S.useState(null),[n,r]=S.useState(!0),[l,i]=S.useState(null);return S.useEffect(()=>{fetch("/api/reference").then(async o=>{if(!o.ok){const u=await o.json().catch(()=>({}));i(typeof u.error=="string"?u.error:"Could not load reference data."),r(!1);return}const s=await o.json();t(s),r(!1)}).catch(()=>{i("Could not load reference data."),r(!1)})},[]),n?a.jsx("div",{className:"loading",children:"Opening the reference library..."}):e?a.jsxs("div",{className:"reference-container",children:[a.jsx("h1",{className:"mb-lg",children:"Reference Library"}),e.sections.map(o=>a.jsxs("section",{className:"reference-section",children:[a.jsx("h2",{children:o.title}),a.jsx("div",{className:"reference-grid",children:o.cards.map(s=>a.jsxs("div",{className:"ref-card",children:[s.symbol&&a.jsx("div",{className:"ref-symbol",children:s.symbol}),a.jsx("h4",{children:s.name}),a.jsx("p",{children:s.description}),s.examples&&s.examples.length>0&&a.jsx("div",{className:"ref-examples",children:s.examples.map(u=>a.jsx("span",{className:"ref-example",children:u},u))}),s.logger&&a.jsx("p",{style:{marginTop:"0.5rem"},children:a.jsx("code",{children:s.logger})}),s.when&&a.jsx("p",{className:"text-muted",style:{fontSize:"0.8125rem",marginTop:"0.25rem"},children:a.jsx("em",{children:s.when})}),s.command&&a.jsx("p",{style:{marginTop:"0.5rem"},children:a.jsx("code",{children:s.command})}),s.steps&&s.steps.length>0&&a.jsx("ol",{style:{fontSize:"0.875rem",paddingLeft:"1.25rem",marginTop:"0.5rem"},children:s.steps.map((u,c)=>a.jsx("li",{style:{marginBottom:"0.25rem"},children:u},c))})]},s.id))})]},o.id))]}):a.jsxs("div",{className:"empty-state",children:[a.jsx("h3",{children:"Reference library unavailable"}),a.jsx("p",{children:l??"Could not load reference data."})]})}function Km(){const{certificates:e}=ps(),t=Ut(u=>u.config),n=(t==null?void 0:t.branding.name)??"Paradigm University",r=(t==null?void 0:t.branding.tagline)??"Lux in Codice",i=!t||t.mode==="paradigm"?`Universitas Paradigmatica — ${r}`:r,o=e.filter(u=>u.passed),s=o.length>0?o.reduce((u,c)=>new Date(c.date)>new Date(u.date)?c:u):null;return s?a.jsxs("div",{className:"certificate-container",children:[a.jsx("div",{className:"no-print text-center mb-lg",children:a.jsx("button",{className:"btn btn-gold",onClick:()=>window.print(),children:"Print Certificate"})}),a.jsxs("div",{className:"certificate",children:[a.jsx(yl,{size:100,className:"cert-seal"}),a.jsx("h1",{children:n}),a.jsx("p",{className:"cert-title",children:i}),a.jsx("div",{className:"gold-divider"}),a.jsx("p",{style:{fontSize:"0.875rem",color:"var(--ink-muted)",marginTop:"var(--space-lg)"},children:"This is to certify that"}),a.jsx("div",{className:"cert-name",children:s.name}),a.jsxs("p",{className:"cert-body",children:["has successfully completed the",a.jsx("br",{}),a.jsx("strong",{children:"Paradigm Licensure Standardized Assessment Test"}),a.jsx("br",{}),"and is hereby recognized as a certified Paradigm practitioner."]}),a.jsxs("p",{className:"cert-score",children:["Score: ",s.score,"/",s.total," (",s.percentage,"%)"]}),a.jsx("div",{className:"gold-divider"}),a.jsxs("dl",{className:"cert-meta",children:[a.jsxs("div",{children:[a.jsx("dt",{children:"PLSAT Version"}),a.jsxs("dd",{children:["v",s.plsatVersion]})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Framework Version"}),a.jsxs("dd",{children:["v",s.frameworkVersion]})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"Date Issued"}),a.jsx("dd",{children:new Date(s.date).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})})]})]})]}),e.length>1&&a.jsxs("div",{className:"no-print mt-xl",children:[a.jsx("h3",{className:"mb-md",children:"All Attempts"}),[...e].reverse().map((u,c)=>a.jsx("div",{className:"ref-card",style:{marginBottom:"0.5rem"},children:a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[a.jsxs("span",{children:["PLSAT v",u.plsatVersion," — ",u.score,"/",u.total," (",u.percentage,"%)",u.passed?" ✓":""]}),a.jsx("span",{className:"text-muted",children:new Date(u.date).toLocaleDateString()})]})},c))]})]}):a.jsxs("div",{className:"certificate-container",children:[a.jsxs("div",{className:"empty-state",children:[a.jsx(yl,{size:80}),a.jsx("h3",{className:"mt-lg",children:"No Certificates Yet"}),a.jsx("p",{children:"Pass the PLSAT examination to earn your certification."}),a.jsx(se,{to:"/plsat",className:"btn btn-primary mt-lg",children:"Take the PLSAT"})]}),e.length>0&&a.jsxs("div",{className:"mt-xl",children:[a.jsx("h3",{className:"mb-md",children:"Previous Attempts"}),e.map((u,c)=>a.jsx("div",{className:"ref-card",style:{marginBottom:"0.5rem"},children:a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[a.jsxs("span",{children:["PLSAT v",u.plsatVersion," — ",u.score,"/",u.total," (",u.percentage,"%)"]}),a.jsx("span",{className:"text-muted",children:new Date(u.date).toLocaleDateString()})]})},c))]})]})}function Ym(){const{loadPackConfig:e,config:t}=Ut();return S.useEffect(()=>{e()},[e]),S.useEffect(()=>{if(t&&(document.title=t.branding.name,t.branding.favicon)){const n=document.querySelector('link[rel~="icon"]');n&&(n.href=t.branding.favicon)}},[t]),a.jsxs("div",{className:"app",children:[a.jsx(zm,{version:"6.5.1"}),a.jsx("main",{className:"main-content",children:a.jsxs(Qh,{children:[a.jsx(We,{path:"/",element:a.jsx(Mm,{})}),a.jsx(We,{path:"/courses",element:a.jsx(Um,{})}),a.jsx(We,{path:"/course/:courseId",element:a.jsx(Wu,{})}),a.jsx(We,{path:"/course/:courseId/:lessonId",element:a.jsx(Wu,{})}),a.jsx(We,{path:"/course/:courseId/quiz/:lessonId",element:a.jsx(Wm,{})}),a.jsx(We,{path:"/plsat",element:a.jsx(Hm,{})}),a.jsx(We,{path:"/reference",element:a.jsx(Qm,{})}),a.jsx(We,{path:"/certificate",element:a.jsx(Km,{})})]})})]})}vi.createRoot(document.getElementById("root")).render(a.jsx(xo.StrictMode,{children:a.jsx(Zh,{children:a.jsx(Ym,{})})}));
|
|
87
|
+
//# sourceMappingURL=index-DrtbBC21.js.map
|