@a-company/paradigm 6.6.3 → 7.0.0
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-JHDCVHB2.js → accept-orchestration-YO2V2WYA.js} +1 -1
- package/dist/add-V6XR7DU5.js +12 -0
- package/dist/{agents-suggest-IKY6VD2R.js → agents-suggest-WZEGQT5E.js} +1 -1
- package/dist/ambient-7HBJHJL2.js +2 -0
- package/dist/{ambient-FNNFB4AP.js → ambient-OX7YJ4PJ.js} +1 -1
- package/dist/ambient-SST5CLEC.js +35 -0
- package/dist/captain-YUP3KVCA.js +2 -0
- package/dist/chunk-33ERV2MW.js +18 -0
- package/dist/chunk-3MZ4J2LF.js +2 -0
- package/dist/chunk-47YPID6H.js +142 -0
- package/dist/chunk-6AKNXD22.js +32 -0
- package/dist/chunk-6HVOZANP.js +4 -0
- package/dist/chunk-ACJWUOMA.js +3 -0
- package/dist/chunk-B5KLSBOZ.js +2 -0
- package/dist/chunk-DLMDHS2X.js +10 -0
- package/dist/chunk-EKNLG73M.js +6 -0
- package/dist/chunk-FRQRREJ6.js +29 -0
- package/dist/{chunk-5RFISGUW.js → chunk-G6DK3ND3.js} +250 -25
- package/dist/{chunk-XKNJSPB5.js → chunk-JCGCPAHF.js} +1 -1
- package/dist/chunk-K54L6CFR.js +25 -0
- package/dist/chunk-QBIQ2FYB.js +20 -0
- package/dist/chunk-QEQCPVF5.js +4 -0
- package/dist/chunk-ROU3F2HZ.js +6 -0
- package/dist/chunk-S4J337EQ.js +504 -0
- package/dist/chunk-V6MIKLMY.js +18 -0
- package/dist/chunk-WROJSWAO.js +93 -0
- package/dist/{chunk-TQOT2LBO.js → chunk-YXLGVOZO.js} +1 -1
- package/dist/chunk-ZSWXLFN7.js +12 -0
- package/dist/{compliance-J3VOV445.js → compliance-MLG4W6S4.js} +1 -1
- package/dist/{diff-ANKTFDRA.js → diff-MC6AXLKX.js} +1 -1
- package/dist/{docs-TSAAS4W3.js → docs-3YFNNZRV.js} +1 -1
- package/dist/doctor-CBZYYQQH.js +2 -0
- package/dist/{hooks-45WDP6QS.js → hooks-AXBWYJ5V.js} +1 -1
- package/dist/index.js +6 -6
- package/dist/list-NC3QGT75.js +12 -0
- package/dist/mcp.js +3 -3
- package/dist/{migrate-R64OQGSM.js → migrate-5M4KUQ2L.js} +1 -1
- package/dist/{nomination-engine-NCLTGMAK.js → nomination-engine-AQHU2KBU.js} +1 -1
- package/dist/notebook-loader-6DYFMNJ2.js +2 -0
- package/dist/orchestrate-GMYEBA5T.js +8 -0
- package/dist/orchestration-G5MAY6IA.js +2 -0
- package/dist/propose-block-ZEMEWJQF.js +2 -0
- package/dist/{providers-TBPOE4DI.js → providers-5EHD45C6.js} +1 -1
- package/dist/quiz-TNV6APBM.js +10 -0
- package/dist/reindex-XTRF23F7.js +2 -0
- package/dist/serve-2PKJP65E.js +12 -0
- package/dist/{serve-3FMUWW5K.js → serve-SMGWGJLM.js} +1 -1
- package/dist/server-4SYOUF6D.js +7 -0
- package/dist/session-tracker-BZ7FU4AT.js +2 -0
- package/dist/session-work-log-QXPAXY5K.js +2 -0
- package/dist/session-work-log-T2IE4Y4T.js +2 -0
- package/dist/{shift-TNA2E5O7.js → shift-JBCEDCGA.js} +2 -2
- package/dist/show-N5LGB5B2.js +7 -0
- package/dist/solo-OWR3MX74.js +3 -0
- package/dist/{spawn-KKDDR6UR.js → spawn-PHA2SVQ3.js} +1 -1
- package/dist/status-ENAI35NL.js +6 -0
- package/dist/task-loader-IGQQ6ZFL.js +2 -0
- package/dist/task-settlement-NW4XMJGJ.js +3 -0
- package/dist/{team-PEGP6F7S.js → team-J2YXPEGX.js} +1 -1
- package/dist/team-funnel-RAJ6EDG3.js +2 -0
- package/dist/tools-HNJ7D5IO.js +2 -0
- package/dist/university-content/notes/N-para-801-cid-becomes-real.md +60 -0
- package/dist/university-content/notes/N-para-801-falsifiable-self-improvement.md +66 -0
- package/dist/university-content/notes/N-para-801-honest-routing-and-the-method.md +57 -0
- package/dist/university-content/notes/N-para-801-orchestration-emits-dag.md +60 -0
- package/dist/university-content/notes/N-para-801-settlement-closes-the-loop.md +64 -0
- package/dist/university-content/notes/N-para-801-the-task-dag.md +93 -0
- package/dist/university-content/paths/LP-para-801.yaml +43 -0
- package/dist/university-content/quizzes/Q-para-801-cid-becomes-real.yaml +54 -0
- package/dist/university-content/quizzes/Q-para-801-falsifiable-self-improvement.yaml +54 -0
- package/dist/university-content/quizzes/Q-para-801-honest-routing-and-the-method.yaml +54 -0
- package/dist/university-content/quizzes/Q-para-801-orchestration-emits-dag.yaml +54 -0
- package/dist/university-content/quizzes/Q-para-801-settlement-closes-the-loop.yaml +54 -0
- package/dist/university-content/quizzes/Q-para-801-the-task-dag.yaml +54 -0
- package/dist/university-ui/assets/{index-BIQeax_b.js → index-B8hm_MdR.js} +2 -2
- package/dist/university-ui/assets/{index-BIQeax_b.js.map → index-B8hm_MdR.js.map} +1 -1
- package/dist/university-ui/index.html +1 -1
- package/dist/validate-IQG7DBFC.js +9 -0
- package/package.json +2 -1
- package/dist/add-CBDFTWST.js +0 -12
- package/dist/ambient-AI42BOM5.js +0 -35
- package/dist/chunk-4N56FRNE.js +0 -29
- package/dist/chunk-6QXBXZF6.js +0 -3
- package/dist/chunk-AMLD7IYC.js +0 -10
- package/dist/chunk-DVZWCXB6.js +0 -2
- package/dist/chunk-ERO4MJSH.js +0 -6
- package/dist/chunk-F6E3HW45.js +0 -14
- package/dist/chunk-FI66YM6G.js +0 -666
- package/dist/chunk-K7X3Z3GL.js +0 -4
- package/dist/chunk-LAYBUKMB.js +0 -14
- package/dist/chunk-MU5YWTNE.js +0 -24
- package/dist/chunk-P344HV6Z.js +0 -2
- package/dist/chunk-QALPEMCU.js +0 -111
- package/dist/chunk-XQLO5URP.js +0 -11
- package/dist/doctor-L5XZENCF.js +0 -2
- package/dist/list-AXKTBXKJ.js +0 -12
- package/dist/notebook-loader-3J2OFMS3.js +0 -2
- package/dist/orchestrate-UG5QXNAU.js +0 -8
- package/dist/quiz-G56CUN45.js +0 -10
- package/dist/reindex-F7BZCG4W.js +0 -2
- package/dist/serve-TJQ5BNKR.js +0 -12
- package/dist/server-QOCW5RU6.js +0 -7
- package/dist/session-tracker-HHNY6J4I.js +0 -2
- package/dist/session-work-log-MEJ33TYD.js +0 -2
- package/dist/session-work-log-ZVVJGO7X.js +0 -2
- package/dist/show-MTPEQFXK.js +0 -7
- package/dist/status-REA6HUXE.js +0 -6
- package/dist/task-loader-NZFDTUQ5.js +0 -2
- package/dist/tools-HQKF4Q3P.js +0 -2
- package/dist/validate-742XMB42.js +0 -9
- /package/dist/{chunk-HXGYVS2N.js → chunk-ECLUYHAR.js} +0 -0
- /package/dist/{platform-server-ANOALDPL.js → platform-server-WIBVYHIV.js} +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
id: Q-para-801-cid-becomes-real
|
|
2
|
+
title: 'PARA 801: Closing the Loop — Lesson 5: Cid the Captain Becomes Real'
|
|
3
|
+
description: 'Quiz for lesson: Cid the Captain Becomes Real'
|
|
4
|
+
author: paradigm
|
|
5
|
+
created: '2026-06-13'
|
|
6
|
+
updated: '2026-06-13'
|
|
7
|
+
tags:
|
|
8
|
+
- course
|
|
9
|
+
- para-801
|
|
10
|
+
symbols: []
|
|
11
|
+
difficulty: intermediate
|
|
12
|
+
passThreshold: 0.7
|
|
13
|
+
category: paradigm-core
|
|
14
|
+
questions:
|
|
15
|
+
- id: q1
|
|
16
|
+
question: What durable artifact does paradigm_captain_board give Cid, and what are its actions?
|
|
17
|
+
choices:
|
|
18
|
+
A: A read-only console log; no actions
|
|
19
|
+
B: The live run-DAG (epic tasks with stage children ordered by dependsOn, plus ripple-ranked unclaimed) with actions read | claim | advance — Cid's and only Cid's write path for claimant, live status, and runStatus
|
|
20
|
+
C: A portal.yaml editor; actions add-gate | remove-gate
|
|
21
|
+
D: 'A notebook of past learnings; action: promote'
|
|
22
|
+
E: A SQLite dashboard with no write path
|
|
23
|
+
correct: B
|
|
24
|
+
explanation: 'paradigm_captain_board gives Cid an owned read+write artifact. `read` assembles the live run-DAG — epics with stage children ordered by dependsOn, plus ripple-ranked unclaimed — exactly what the Conductor task-dashboard renders. `claim` and `advance` are Cid''s and only Cid''s write path for claimant, live status transitions, and run-record runStatus. The audit''s "the Captain owns nothing" finding is resolved by giving him a board to write.'
|
|
25
|
+
- id: q2
|
|
26
|
+
question: At session-open, what does Cid now do that constitutes a real per-session mutation (replacing the old anonymous task dump)?
|
|
27
|
+
choices:
|
|
28
|
+
A: Nothing — session-open is still a static dump
|
|
29
|
+
B: He runs the reaper, reads the board, ranks unclaimed by ripple-risk, and proposes claimants by *writing* claimant and advancing open→claimed; that write is the durable proof the Captain did something (human/peer claims override his proposals)
|
|
30
|
+
C: He deletes all open tasks
|
|
31
|
+
D: He emails the roster to the user
|
|
32
|
+
E: He rebuilds the SQLite index
|
|
33
|
+
correct: B
|
|
34
|
+
explanation: 'Session-open replaces the anonymous static task dump with a Cid-attributed board read: he runs the reaper, ranks unclaimed tasks by ripple-risk, surfaces the top few, and proposes claimants by writing `claimant` and advancing open→claimed. That write is the durable proof the Captain acted this session. Human or peer claims override an archetype proposal, and a failed board read falls back safely to the plain list.'
|
|
35
|
+
- id: q3
|
|
36
|
+
question: 'At session-close, the learning chain didn''t run. What does Cid do — and what does he deliberately NOT do?'
|
|
37
|
+
choices:
|
|
38
|
+
A: He hard-blocks the session with a guard block until the human fixes the loop
|
|
39
|
+
B: He self-heals by running postflight himself rather than blocking; if self-heal throws he proposes only an `advise` block — never `guard`, because a learning-loop gap must not deadlock a human (hard refuse is reserved for correctness gates like a missing .purpose)
|
|
40
|
+
C: He silently ignores it and writes .cid-briefed unconditionally as before
|
|
41
|
+
D: He benches Loid
|
|
42
|
+
E: He deletes the settlement records
|
|
43
|
+
correct: B
|
|
44
|
+
explanation: 'An early design had Cid refuse to finish the session if postflight hadn''t run — the adversarial review flagged this as a user-facing deadlock (blocking a human over a *learning* step inverts priorities). The fix: Cid reads the chainLive probe, self-heals by running postflight himself, and if self-heal itself throws he proposes only an `advise` block (severity advise, never guard). Hard refuse stays reserved for correctness gates, never learning-loop liveness.'
|
|
45
|
+
- id: q4
|
|
46
|
+
question: The Cid↔Loid boundary is summarized in terms of tense. Which mapping is correct?
|
|
47
|
+
choices:
|
|
48
|
+
A: Cid writes settledAt and notebooks; Loid writes live status and claimant
|
|
49
|
+
B: Cid writes the present tense (live status, claimant, DAG edges at emission, runStatus); Loid writes the past tense (settledAt and the learning stores); they never co-write a field
|
|
50
|
+
C: Both write status; neither writes settledAt
|
|
51
|
+
D: Cid and Loid both write settledAt for redundancy
|
|
52
|
+
E: Loid writes everything; Cid is read-only
|
|
53
|
+
correct: B
|
|
54
|
+
explanation: 'Tense is the mnemonic: Cid writes the present tense — live `status` transitions (up to but not including the work-completer''s done), `claimant`, DAG edges at emission, and run-record runStatus (what is happening now). Loid writes the past tense — `settledAt` and the learning stores (what we learned from what already happened). They never co-write a field, and the dependency points one way: status → settlement → learning.'
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
id: Q-para-801-falsifiable-self-improvement
|
|
2
|
+
title: 'PARA 801: Closing the Loop — Lesson 4: Falsifiable Self-Improvement'
|
|
3
|
+
description: 'Quiz for lesson: Falsifiable Self-Improvement'
|
|
4
|
+
author: paradigm
|
|
5
|
+
created: '2026-06-13'
|
|
6
|
+
updated: '2026-06-13'
|
|
7
|
+
tags:
|
|
8
|
+
- course
|
|
9
|
+
- para-801
|
|
10
|
+
symbols: []
|
|
11
|
+
difficulty: intermediate
|
|
12
|
+
passThreshold: 0.7
|
|
13
|
+
category: paradigm-core
|
|
14
|
+
questions:
|
|
15
|
+
- id: q1
|
|
16
|
+
question: Why was the JPS (journals-per-settlement) metric rejected as a measure of whether the learning loop is alive?
|
|
17
|
+
choices:
|
|
18
|
+
A: It was too expensive to compute over a trailing window
|
|
19
|
+
B: It was circular — a clean run that legitimately produced no insight ("silence is signal") and a severed chain both yield JPS = 0, so it could not distinguish healthy quiet from a dead pipe
|
|
20
|
+
C: It double-counted journal entries
|
|
21
|
+
D: It required SQLite
|
|
22
|
+
E: It only worked in the CLI world
|
|
23
|
+
correct: B
|
|
24
|
+
explanation: 'JPS measures the *volume of output*, which cannot tell you whether the *pipe* is alive. A clean settlement that had nothing new to promote and a settlement whose chain was severed both produce JPS = 0. The metric could not separate healthy silence from a corpse, so v7 replaced it with the chainLive probe that instruments the pipe instead of the output.'
|
|
25
|
+
- id: q2
|
|
26
|
+
question: How does the chainLive liveness probe make "self-improving" falsifiable?
|
|
27
|
+
choices:
|
|
28
|
+
A: It counts how many notebooks exist
|
|
29
|
+
B: Each settlement appends a settlement-liveness.jsonl record with per-stage ok|threw|skipped (written in a finally so a mid-chain throw still records which stage died) and chainLive=true only if every non-skipped stage ran; a doctor check alarms on chainLive=false, which a reviewer can trigger by commenting out a stage
|
|
30
|
+
C: It asks the user to self-report whether they felt the framework improved
|
|
31
|
+
D: It measures token spend per session
|
|
32
|
+
E: It is not falsifiable; it just logs activity
|
|
33
|
+
correct: B
|
|
34
|
+
explanation: 'Each settlement writes a record to .paradigm/events/settlement-liveness.jsonl with each stage marked ok|threw|skipped, written in a finally block so a mid-chain throw still records *which* stage died. chainLive is true only if every non-skipped stage returned ok. A paradigm doctor / paradigm:health check alarms on chainLive=false — and a reviewer can comment out runPostflightLearning, settle once, and watch the check flip red naming the dead stage. That deliberate-break-turns-red property is what makes the claim falsifiable.'
|
|
35
|
+
- id: q3
|
|
36
|
+
question: 'A settlement records `chainLive: true, journalsWritten: 0`. What does this mean?'
|
|
37
|
+
choices:
|
|
38
|
+
A: The chain is broken — zero journals means a dead pipe
|
|
39
|
+
B: The pipe ran end-to-end successfully and simply had nothing new to promote — a healthy clean subtree ("silence is signal"); this is distinguishable from chainLive=false, which is the broken case
|
|
40
|
+
C: The settlement never ran
|
|
41
|
+
D: The agent crashed mid-task
|
|
42
|
+
E: Postflight was skipped intentionally by the user
|
|
43
|
+
correct: B
|
|
44
|
+
explanation: 'chainLive=true means every non-skipped stage ran without throwing — the pipe is alive. journalsWritten=0 is diagnostic only: it means there was nothing new worth promoting this time (silence is signal). This is precisely the case JPS could not distinguish from a dead chain; the chainLive probe separates healthy quiet (chainLive=true, journals=0) from a severed chain (chainLive=false).'
|
|
45
|
+
- id: q4
|
|
46
|
+
question: 'The chainLive design generalizes into a pattern for honest self-checks. Which principle best captures it?'
|
|
47
|
+
choices:
|
|
48
|
+
A: Measure the volume of results; more output means a healthier system
|
|
49
|
+
B: Instrument the pipe (liveness of the mechanism, falsifiable) not the output (volume, not falsifiable); record per-stage in a finally; and make the red state reachable by a deliberate act
|
|
50
|
+
C: Trust the agent's self-assessment of its own improvement
|
|
51
|
+
D: Only check the loop on a fixed schedule, never per settlement
|
|
52
|
+
E: Replace all checks with a single boolean the user sets manually
|
|
53
|
+
correct: B
|
|
54
|
+
explanation: 'The generalizable pattern: (1) instrument the pipe, not the output — liveness of the mechanism is falsifiable, volume of results is not; (2) record per-stage in a finally so a mid-pipe failure still tells you where it died; (3) make the red state reachable by a deliberate act — if you cannot describe the exact change that turns the check red, the check is not really checking anything. A self-improving claim is only earned if you can prove it ISN''T improving when it breaks.'
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
id: Q-para-801-honest-routing-and-the-method
|
|
2
|
+
title: 'PARA 801: Closing the Loop — Lesson 6: Honest Routing & the Dogfood Method'
|
|
3
|
+
description: 'Quiz for lesson: Honest Routing & the Dogfood Method'
|
|
4
|
+
author: paradigm
|
|
5
|
+
created: '2026-06-13'
|
|
6
|
+
updated: '2026-06-13'
|
|
7
|
+
tags:
|
|
8
|
+
- course
|
|
9
|
+
- para-801
|
|
10
|
+
symbols: []
|
|
11
|
+
difficulty: intermediate
|
|
12
|
+
passThreshold: 0.7
|
|
13
|
+
category: paradigm-core
|
|
14
|
+
questions:
|
|
15
|
+
- id: q1
|
|
16
|
+
question: 'What was the "bugfix poison-pill" the v7 classifier rebuild removed?'
|
|
17
|
+
choices:
|
|
18
|
+
A: A bug that crashed orchestration on the word "fix"
|
|
19
|
+
B: An audit of a *broken* system used to route to [security, builder] — the word "broken" silently summoned a fixer; new audit/design/research families now map to read-only analyst rosters that never route to a fixer
|
|
20
|
+
C: A poisoned npm dependency
|
|
21
|
+
D: A SQL injection in the classifier
|
|
22
|
+
E: A hardcoded agent that always won
|
|
23
|
+
correct: B
|
|
24
|
+
explanation: 'The keyword classifier conflated *analyzing* a broken system with *fixing* it: an audit request containing "broken" routed to [security, builder], silently summoning an implementer. v7 rebuilt the classifier as confidence-scored with intent-verb anchoring, and new audit/design/research families map to read-only analyst rosters that never route to a fixer. Asking for analysis no longer triggers implementation.'
|
|
25
|
+
- id: q2
|
|
26
|
+
question: 'Besides fixing classification, what did v7 change about which agents auto-orchestration can reach?'
|
|
27
|
+
choices:
|
|
28
|
+
A: It removed all specialist agents to simplify routing
|
|
29
|
+
B: The trigger-based agent-matcher becomes the primary roster source, so previously-unroutable specialists (product/North, forge/Loid, researcher/Scout, dx/Helix) can now be assembled automatically — not only by a human naming them
|
|
30
|
+
C: It made every agent require manual selection
|
|
31
|
+
D: It limited orchestration to exactly three agents
|
|
32
|
+
E: Nothing — routability was already complete
|
|
33
|
+
correct: B
|
|
34
|
+
explanation: 'An audit finding was that the best agents were not routable by auto-orchestration. v7 makes the trigger-based agent-matcher the primary roster/suggestion source, so specialists like product (North), forge (Loid), researcher (Scout), and dx (Helix) can be assembled automatically. A team you cannot reach is a team you do not have.'
|
|
35
|
+
- id: q3
|
|
36
|
+
question: 'The v7 "dogfood method" had two stages. What were they, and what discipline anchored the first?'
|
|
37
|
+
choices:
|
|
38
|
+
A: Brainstorm then vote; anchored by consensus
|
|
39
|
+
B: A two-slice self-audit anchored by file-and-line evidence (not vibes), followed by an adversarial review that tried to break the design against the real code before it was built
|
|
40
|
+
C: Write code then test; anchored by coverage percentage
|
|
41
|
+
D: Survey users then ship; anchored by NPS
|
|
42
|
+
E: Design then document; anchored by word count
|
|
43
|
+
correct: B
|
|
44
|
+
explanation: 'Stage 1 was a two-slice self-audit (task system, then the orchestration engine) disciplined by file-and-line evidence — "the loop is broken" is a vibe; "task_done feeds nothing, here is the dead joint" is a finding. Stage 2 was an adversarial review whose job was to *break* the design against the real code before building it — treating even the team''s own spec as a hypothesis, not a fact.'
|
|
45
|
+
- id: q4
|
|
46
|
+
question: 'The adversarial review caught three keystone claims as false or circular. Which trio is correct?'
|
|
47
|
+
choices:
|
|
48
|
+
A: Missing tests, slow loader, and a typo in portal.yaml
|
|
49
|
+
B: The belief-delta gate ran on hardcoded confidence numbers; "both worlds flow through completeTask" was false (the CLI orchestrator emits no tasks); and the JPS metric was circular
|
|
50
|
+
C: The DAG used SQLite, the reaper never fired, and Cid hard-blocked sessions
|
|
51
|
+
D: The classifier was too slow, agents were unroutable, and notebooks were empty
|
|
52
|
+
E: There were no false claims; all three were confirmed correct
|
|
53
|
+
correct: B
|
|
54
|
+
explanation: 'The adversarial pass caught three keystone wiring claims false-or-circular against the real code: (1) the belief-delta gate ran on hardcoded branch-literal confidence numbers; (2) "both worlds flow through completeTask" was false — the CLI orchestrator emits no tasks, so scope was honestly narrowed to the MCP path; (3) JPS was circular — clean work and a dead chain both read zero. Each flipped a "ship it" into a "revise first." The generalizable lesson: a claim, even your own, is a hypothesis until something has tried to break it.'
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
id: Q-para-801-orchestration-emits-dag
|
|
2
|
+
title: 'PARA 801: Closing the Loop — Lesson 2: Orchestration Emits the DAG'
|
|
3
|
+
description: 'Quiz for lesson: Orchestration Emits the DAG'
|
|
4
|
+
author: paradigm
|
|
5
|
+
created: '2026-06-13'
|
|
6
|
+
updated: '2026-06-13'
|
|
7
|
+
tags:
|
|
8
|
+
- course
|
|
9
|
+
- para-801
|
|
10
|
+
symbols: []
|
|
11
|
+
difficulty: intermediate
|
|
12
|
+
passThreshold: 0.7
|
|
13
|
+
category: paradigm-core
|
|
14
|
+
questions:
|
|
15
|
+
- id: q1
|
|
16
|
+
question: Before v7, what happened to the handoff graph that orchestration computed for a multi-agent run?
|
|
17
|
+
choices:
|
|
18
|
+
A: It was persisted as tasks and tracked to completion
|
|
19
|
+
B: 'It was computed and then discarded — only a frozen `status: pending` blob was logged, which nothing ever advanced'
|
|
20
|
+
C: It was written to portal.yaml
|
|
21
|
+
D: It was emailed to the user for approval
|
|
22
|
+
E: It was stored as a SQLite graph
|
|
23
|
+
correct: B
|
|
24
|
+
explanation: 'The orchestration audit found the handoff graph computed (around `orchestration.ts:1780-1830`) and then dropped, with only a frozen `logOrchestration` `status: pending` blob recorded and never advanced. This was the orchestration-to-task disconnect v7 fixes — orchestration now emits the graph as real tasks via `emitTaskDag()`.'
|
|
25
|
+
- id: q2
|
|
26
|
+
question: What does `emitTaskDag()` persist, and in which orchestration mode?
|
|
27
|
+
choices:
|
|
28
|
+
A: One flat task per run, in every mode
|
|
29
|
+
B: One epic task (claimant orchestrator, external_ref orchestration) plus one child per stage-agent (parentTaskId, stage, dependsOn, archetype claimant) — in execute mode only
|
|
30
|
+
C: A child task per file edited, in plan mode
|
|
31
|
+
D: Nothing — it only logs to the console
|
|
32
|
+
E: A full SQLite snapshot in quick mode
|
|
33
|
+
correct: B
|
|
34
|
+
explanation: 'In `execute` mode only (plan and quick emit nothing), `emitTaskDag()` persists one epic task — the orchestration root with `claimant: orchestrator` and `external_ref: { kind: orchestration }` — plus one child task per stage-agent carrying parentTaskId, stage, dependsOn, and a `{ kind: archetype }` claimant. Emission degrades gracefully if a write fails; it never gates the work.'
|
|
35
|
+
- id: q3
|
|
36
|
+
question: In v7.0, how does a stage task's status flow back as the agent works, and what is the scope caveat?
|
|
37
|
+
choices:
|
|
38
|
+
A: A background daemon polls the filesystem; all execution paths are covered equally
|
|
39
|
+
B: Each spawned agent's prompt carries its taskId with instructions to flip in-progress/done via paradigm_task_update; v7.0 scopes loop-closure to the MCP path, with Symphony and CLI flow-back as fast-follows
|
|
40
|
+
C: The orchestrator marks everything done at the end regardless of agent output
|
|
41
|
+
D: Status never flows back; the DAG is write-once
|
|
42
|
+
E: Status flows back only through Git hooks
|
|
43
|
+
correct: B
|
|
44
|
+
explanation: 'v7 threads each agent''s taskId into its prompt with instructions to flip in-progress on start and done on finish via paradigm_task_update. v7.0 honestly scopes loop-closure to the dominant MCP (Claude-Code-agent) path; the Symphony/Cursor watcher and the standalone CLI orchestrate binary''s task-bridge are stated as fast-follows rather than claimed as covered.'
|
|
45
|
+
- id: q4
|
|
46
|
+
question: What did the typed `AgentRelay` contract replace, and what was deleted as a result?
|
|
47
|
+
choices:
|
|
48
|
+
A: It replaced portal.yaml; the gates were deleted
|
|
49
|
+
B: It replaced free-text prose handoffs between stages; the hand-rolled regex parsers (parseFilePlan / parseFilePlanFromResponse) were deleted, and planBuilderStages now consumes the typed filePlan field directly
|
|
50
|
+
C: It replaced the task loader; the YAML store was deleted
|
|
51
|
+
D: It replaced SQLite; the database was deleted
|
|
52
|
+
E: Nothing was deleted — AgentRelay is purely additive logging
|
|
53
|
+
correct: B
|
|
54
|
+
explanation: 'AgentRelay is a typed completion contract (artifacts, decisions, handoffTo, filePlan, blockedOn). It replaces the free-text prose handoff and lets v7 delete the brittle regex parsers that used to scrape structure out of that prose — planBuilderStages now reads the typed `filePlan` field directly. TaskPayload (assignment) and AgentRelay (completion) are the request/response halves, bound by `relay.taskId + status → updateTask`.'
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
id: Q-para-801-settlement-closes-the-loop
|
|
2
|
+
title: 'PARA 801: Closing the Loop — Lesson 3: Settlement Closes the Loop'
|
|
3
|
+
description: 'Quiz for lesson: Settlement Closes the Loop'
|
|
4
|
+
author: paradigm
|
|
5
|
+
created: '2026-06-13'
|
|
6
|
+
updated: '2026-06-13'
|
|
7
|
+
tags:
|
|
8
|
+
- course
|
|
9
|
+
- para-801
|
|
10
|
+
symbols: []
|
|
11
|
+
difficulty: intermediate
|
|
12
|
+
passThreshold: 0.7
|
|
13
|
+
category: paradigm-core
|
|
14
|
+
questions:
|
|
15
|
+
- id: q1
|
|
16
|
+
question: What is the settlement trigger in v7 — when does a parent task settle and run the learning chain?
|
|
17
|
+
choices:
|
|
18
|
+
A: As soon as the first child reaches `done`
|
|
19
|
+
B: When every sibling sharing the parentTaskId reaches a terminal state (all-siblings-terminal) — exactly once, idempotent via settledAt
|
|
20
|
+
C: On a fixed 30-minute timer regardless of child status
|
|
21
|
+
D: Only when the human manually calls settle
|
|
22
|
+
E: When the parent task itself is marked done by hand
|
|
23
|
+
correct: B
|
|
24
|
+
explanation: 'Settlement fires on all-siblings-terminal: when every task sharing a parentTaskId reaches a terminal state ({done, shelved, crashed} in v7.0), the parent settles exactly once, made idempotent by stamping settledAt. The original design fired only on `done`, which the adversarial review caught as re-creating the open-loop bug — one shelved or crashed sibling would leave the parent unsettled forever.'
|
|
25
|
+
- id: q2
|
|
26
|
+
question: Where is the settlement hook placed, and why there?
|
|
27
|
+
choices:
|
|
28
|
+
A: Only inside completeTask, so done is the only path that settles
|
|
29
|
+
B: Inside updateTask (the real chokepoint), gated on isTerminal(status) && parentTaskId — so completeTask, shelveTask, and any direct status set all fire it and none can drift
|
|
30
|
+
C: In a Git post-commit hook
|
|
31
|
+
D: In the orchestrator's plan mode
|
|
32
|
+
E: In the Stop hook only
|
|
33
|
+
correct: B
|
|
34
|
+
explanation: 'The hook lives inside updateTask — the real chokepoint — gated on isTerminal(status) && parentTaskId. Putting it at the chokepoint (rather than in completeTask alone) means completeTask, shelveTask, and direct status sets all settle, with no path able to drift. A reaper also crashes abandoned in-progress tasks stale past a window, and orphans (missing parent) self-settle with a warn.'
|
|
35
|
+
- id: q3
|
|
36
|
+
question: 'The v7 thesis is "Cid writes the present tense; Loid writes the past tense; they never co-write a field." Which field does settlement write, holding that boundary?'
|
|
37
|
+
choices:
|
|
38
|
+
A: Settlement writes `status` live-transitions
|
|
39
|
+
B: Settlement writes `claimant`
|
|
40
|
+
C: Settlement only ever writes settledAt (and crash markers) — never live status; Cid owns live status/claimant/edges, Loid owns settledAt and the learning stores
|
|
41
|
+
D: Settlement writes the DAG edges
|
|
42
|
+
E: Settlement co-writes status and settledAt together
|
|
43
|
+
correct: C
|
|
44
|
+
explanation: 'Settlement writes only settledAt and crash markers, never live status. This holds the load-bearing Cid↔Loid boundary: Cid (present tense) writes status live-transitions, claimant, and the DAG edges at emission; Loid (past tense) writes settledAt and the learning stores. The dependency points one way — status → settlement → learning — and settlement never calls back to change status.'
|
|
45
|
+
- id: q4
|
|
46
|
+
question: 'Why did v7.0 drop the original belief-delta promotion gate (confidence_after − confidence_before ≥ 0.15) in favor of keeping the absolute ≥ 0.8 gate with a *real* confidence_after?'
|
|
47
|
+
choices:
|
|
48
|
+
A: The delta gate was too slow to compute
|
|
49
|
+
B: Both confidence numbers were hardcoded branch literals, so a delta gate promotes on the difference of two constants (numerology); v7.0 keeps the absolute gate but makes confidence_after a real agent output, deferring the belief-delta honestly to v7.x
|
|
50
|
+
C: The team preferred round numbers
|
|
51
|
+
D: Belief-deltas are mathematically impossible
|
|
52
|
+
E: The absolute gate was removed entirely and replaced by manual approval
|
|
53
|
+
correct: B
|
|
54
|
+
explanation: 'The adversarial review proved both confidence_before and confidence_after were branch literals, so promoting on their difference is numerology. v7.0''s honest fix: keep the existing absolute ≥0.8 gate but make confidence_after real (agents emit an optional `confidence` that runPostflightLearning prefers, falling back to the literal only when absent). confidence_before stays, explicitly marked not-gated-on; the belief-delta gate is deferred to v7.x because a real pre-task prior needs unbuilt elicitation infrastructure.'
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
id: Q-para-801-the-task-dag
|
|
2
|
+
title: 'PARA 801: Closing the Loop — Lesson 1: The Spine'
|
|
3
|
+
description: 'Quiz for lesson: The Spine — A Claimant-Owned Task DAG'
|
|
4
|
+
author: paradigm
|
|
5
|
+
created: '2026-06-13'
|
|
6
|
+
updated: '2026-06-13'
|
|
7
|
+
tags:
|
|
8
|
+
- course
|
|
9
|
+
- para-801
|
|
10
|
+
symbols: []
|
|
11
|
+
difficulty: intermediate
|
|
12
|
+
passThreshold: 0.7
|
|
13
|
+
category: paradigm-core
|
|
14
|
+
questions:
|
|
15
|
+
- id: q1
|
|
16
|
+
question: 'In v7, a task''s owner is recorded as `claimant: { kind, ref }` rather than a flat `assignee: "builder"` string. Why is the typed claim the right design?'
|
|
17
|
+
choices:
|
|
18
|
+
A: It is shorter to serialize in YAML
|
|
19
|
+
B: A flat name throws away whether the owner is a role, a specific human, or a remote peer — the very distinction the learning loop needs (archetype-fit signal, churn-vs-handoff)
|
|
20
|
+
C: Tagged unions are required by the YAML loader
|
|
21
|
+
D: It lets two owners write the same field safely
|
|
22
|
+
E: It encrypts the owner's identity
|
|
23
|
+
correct: B
|
|
24
|
+
explanation: 'The claimant is a tagged union (`kind: archetype | human | peer`). That `kind` is load-bearing: archetype-fit analytics compare the predicted role-owner against the closing owner, and reassignment-churn detection must distinguish a healthy peer handoff (`kind: peer`) from under-specified-blurb churn. A flat name string cannot answer "is this a role, a human, or a peer?" — so it discards exactly the signal the loop is built to learn from.'
|
|
25
|
+
- id: q2
|
|
26
|
+
question: How are the DAG edges (parentTaskId / dependsOn / stage) stored in v7?
|
|
27
|
+
choices:
|
|
28
|
+
A: In a new SQLite database alongside the task store
|
|
29
|
+
B: In a separate central edges.yaml file that must be kept in sync
|
|
30
|
+
C: Edge-list-in-node — each task's own YAML carries its edges; the graph is reconstructed by loading the node set, with no separate edges file and no SQLite
|
|
31
|
+
D: Only in memory during an orchestration run
|
|
32
|
+
E: As Git commit metadata
|
|
33
|
+
correct: C
|
|
34
|
+
explanation: 'The DAG uses edge-list-in-node: every task''s YAML carries its own parentTaskId/dependsOn/stage, and the graph is rebuilt simply by loading the nodes. This needs no separate edges file and no SQLite, survives the existing date-partitioned loader with zero loader changes, and supports cross-date edges because each task id embeds its date.'
|
|
35
|
+
- id: q3
|
|
36
|
+
question: Which statement about v7.0's task status set and state machine is correct?
|
|
37
|
+
choices:
|
|
38
|
+
A: v7.0 ships all six states (open, claimed, in-progress, blocked, done, shelved) at launch
|
|
39
|
+
B: v7.0 ships four states (open, in-progress, done, shelved); claimed and blocked are deferred to a fast-follow because they are justified only by Symphony peer-claims
|
|
40
|
+
C: Any status can transition to any other status freely
|
|
41
|
+
D: '`done` can transition back to `in-progress`'
|
|
42
|
+
E: '`started_at` is stamped when the task is first created'
|
|
43
|
+
correct: B
|
|
44
|
+
explanation: 'v7.0 ships four states. `claimed` and `blocked` are deferred because they are only justified by Symphony peer-claims, which are themselves fast-follow. Transitions are enforced by a single `assertTransition` guard inside `updateTask` (done is terminal), and `started_at` is stamped on *entering* `in-progress`, not at creation.'
|
|
45
|
+
- id: q4
|
|
46
|
+
question: How does the v7 schema migration treat existing pre-v7 task YAML?
|
|
47
|
+
choices:
|
|
48
|
+
A: A mandatory bulk migration script must rewrite every file before v7 can load
|
|
49
|
+
B: Old files are rejected until manually upgraded
|
|
50
|
+
C: Every new field is optional, so old YAML loads unchanged; the orphan `session_link` is healed into `external_ref` by a read-side `normalizeTask` shim, and files migrate on their next write
|
|
51
|
+
D: Old tasks are silently deleted
|
|
52
|
+
E: Migration requires a database export and re-import
|
|
53
|
+
correct: C
|
|
54
|
+
explanation: 'The migration is additive and lazy-healing: every v7 field is optional so old YAML loads as-is, MCP enums widen non-breakingly, and the orphaned `session_link` is normalized into the typed `external_ref` by a read-side shim at the load chokepoint — files heal on their next write with no bulk step.'
|
|
@@ -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.2"}),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-B8hm_MdR.js.map
|