unspaghettit 0.14.2 → 0.16.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/build/client/_app/immutable/assets/0.DEmtldqZ.css +1 -0
- package/build/client/_app/immutable/assets/0.DEmtldqZ.css.br +0 -0
- package/build/client/_app/immutable/assets/0.DEmtldqZ.css.gz +0 -0
- package/build/client/_app/immutable/chunks/AIVrTpgC.js +1 -0
- package/build/client/_app/immutable/chunks/AIVrTpgC.js.br +0 -0
- package/build/client/_app/immutable/chunks/AIVrTpgC.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{okshMw-Z.js → BLVBP6IJ.js} +1 -1
- package/build/client/_app/immutable/chunks/BLVBP6IJ.js.br +0 -0
- package/build/client/_app/immutable/chunks/{okshMw-Z.js.gz → BLVBP6IJ.js.gz} +0 -0
- package/build/client/_app/immutable/chunks/BiDFtKe6.js +1 -0
- package/build/client/_app/immutable/chunks/BiDFtKe6.js.br +2 -0
- package/build/client/_app/immutable/chunks/BiDFtKe6.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{veFR6afQ.js → BsWjvGRT.js} +1 -1
- package/build/client/_app/immutable/chunks/BsWjvGRT.js.br +0 -0
- package/build/client/_app/immutable/chunks/BsWjvGRT.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CgSXJuIO.js → ClSw9AyG.js} +1 -1
- package/build/client/_app/immutable/chunks/ClSw9AyG.js.br +0 -0
- package/build/client/_app/immutable/chunks/ClSw9AyG.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CfF5WnjG2.js → DFmNW1Fq2.js} +1 -1
- package/build/client/_app/immutable/chunks/DFmNW1Fq2.js.br +0 -0
- package/build/client/_app/immutable/chunks/DFmNW1Fq2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{n7xluuKn.js → DNgDuvXX.js} +1 -1
- package/build/client/_app/immutable/chunks/DNgDuvXX.js.br +0 -0
- package/build/client/_app/immutable/chunks/DNgDuvXX.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{B2Xk3BoK2.js → wLz3964S2.js} +1 -1
- package/build/client/_app/immutable/chunks/wLz3964S2.js.br +0 -0
- package/build/client/_app/immutable/chunks/wLz3964S2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CGRZ0hx_2.js → zN8Uu1W22.js} +1 -1
- package/build/client/_app/immutable/chunks/zN8Uu1W22.js.br +0 -0
- package/build/client/_app/immutable/chunks/zN8Uu1W22.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.BFt6jt7s.js → app.Db53CzCE.js} +2 -2
- package/build/client/_app/immutable/entry/app.Db53CzCE.js.br +0 -0
- package/build/client/_app/immutable/entry/app.Db53CzCE.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.BmrW1pNm.js +1 -0
- package/build/client/_app/immutable/entry/start.BmrW1pNm.js.br +0 -0
- package/build/client/_app/immutable/entry/start.BmrW1pNm.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{0.CL54SQAN.js → 0.D-_MLMOF.js} +1 -1
- package/build/client/_app/immutable/nodes/0.D-_MLMOF.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.D-_MLMOF.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.Bfj3GUlf.js → 1.DhZ7EShx.js} +1 -1
- package/build/client/_app/immutable/nodes/1.DhZ7EShx.js.br +1 -0
- package/build/client/_app/immutable/nodes/1.DhZ7EShx.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.cfn9LqaA.js +1 -0
- package/build/client/_app/immutable/nodes/11.cfn9LqaA.js.br +1 -0
- package/build/client/_app/immutable/nodes/11.cfn9LqaA.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{12.Bsl85JMW.js → 12.CphZytWm.js} +1 -1
- package/build/client/_app/immutable/nodes/12.CphZytWm.js.br +0 -0
- package/build/client/_app/immutable/nodes/12.CphZytWm.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{13.YHll7CoO.js → 13.9ZGjlvBD.js} +1 -1
- package/build/client/_app/immutable/nodes/13.9ZGjlvBD.js.br +0 -0
- package/build/client/_app/immutable/nodes/13.9ZGjlvBD.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{14.CQSsZ3ai.js → 14.C4gZLBpf.js} +1 -1
- package/build/client/_app/immutable/nodes/14.C4gZLBpf.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.C4gZLBpf.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{15.r9nu5e6r.js → 15.DY0lYZJv.js} +1 -1
- package/build/client/_app/immutable/nodes/15.DY0lYZJv.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.DY0lYZJv.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{16.CGQwGPQ8.js → 16.xbZ24Wub.js} +1 -1
- package/build/client/_app/immutable/nodes/16.xbZ24Wub.js.br +0 -0
- package/build/client/_app/immutable/nodes/16.xbZ24Wub.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.DL36BNkY.js +1 -0
- package/build/client/_app/immutable/nodes/2.DL36BNkY.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.DL36BNkY.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{3.C7CEAqcZ.js → 3.CB1xVSCX.js} +1 -1
- package/build/client/_app/immutable/nodes/3.CB1xVSCX.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.CB1xVSCX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{4.CTSBwe7u.js → 4.B7Ucym6O.js} +1 -1
- package/build/client/_app/immutable/nodes/4.B7Ucym6O.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.B7Ucym6O.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{5.DGbTT4pH.js → 5.BPd6M8hN.js} +1 -1
- package/build/client/_app/immutable/nodes/5.BPd6M8hN.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.BPd6M8hN.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{6.Dh0pqqO3.js → 6.CFU9YhB5.js} +1 -1
- package/build/client/_app/immutable/nodes/6.CFU9YhB5.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.CFU9YhB5.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{7.ByfneCW8.js → 7.D7glifWT.js} +1 -1
- package/build/client/_app/immutable/nodes/7.D7glifWT.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.D7glifWT.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{8.MF74_Gv4.js → 8.WoYHvkli.js} +1 -1
- package/build/client/_app/immutable/nodes/8.WoYHvkli.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.WoYHvkli.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{9.1oJXRmSq.js → 9.B1--QwJ9.js} +1 -1
- package/build/client/_app/immutable/nodes/9.B1--QwJ9.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.B1--QwJ9.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/handler.js +4 -4
- package/build/index.js +4 -4
- package/build/server/chunks/chunks/{internal.js-DQ9iXFTC.js → internal.js-GvCPm1x0.js} +2 -2
- package/build/server/chunks/chunks/{snapshotRepository.js-Db6K98JR.js → snapshotRepository.js-dTGx6jNf.js} +34 -36
- package/build/server/chunks/chunks/{sync.js-D4ZbBg8C.js → sync.js-rZb_07tw.js} +2 -2
- package/build/server/chunks/chunks/{syncAwareRepositories.js-ChnSsFZT.js → syncAwareRepositories.js-C5FevMFp.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/domains/_id_/{_server.ts.js-C3CaUrVk.js → _server.ts.js-CraLkmu2.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/domains/{_server.ts.js-BTQXiAbq.js → _server.ts.js-CStcnhXC.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/projects/_id_/{_server.ts.js-DtbInSv-.js → _server.ts.js-Dy0Y3fNB.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/projects/_id_/bundle/{_server.ts.js-4CNkTmjn.js → _server.ts.js-Dx3Rd9Zy.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/projects/_id_/sources/{_server.ts.js-uWPXlRLP.js → _server.ts.js-Dgg5DjFx.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/projects/_id_/sources/_sourceId_/{_server.ts.js-JAE7Rx6l.js → _server.ts.js-PaMls5Qt.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/projects/{_server.ts.js-CoIxSopJ.js → _server.ts.js-C1QghGn-.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/projects/import/{_server.ts.js-mZwgc0jL.js → _server.ts.js-TdYizfxY.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/search-index/{_server.ts.js-DNqn9FmX.js → _server.ts.js-sSsrbjvr.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/snapshots/_id_/{_server.ts.js-BOSsw9rn.js → _server.ts.js-ByCr1ov6.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/snapshots/_id_/implementation-status/{_server.ts.js-CMsDyE-N.js → _server.ts.js-Cl7aTArO.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/snapshots/_id_/provenance/{_server.ts.js-BCTwVWwI.js → _server.ts.js-BM4n3Bi-.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/snapshots/_id_/verify/{_server.ts.js-DcNVz9Go.js → _server.ts.js-lJ2p7u_n.js} +17 -11
- package/build/server/chunks/entries/endpoints/api/snapshots/{_server.ts.js-BChC84zw.js → _server.ts.js-0n53J5Xz.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/sync/reload/{_server.ts.js-BzAhcx0J.js → _server.ts.js-5oA9TpAA.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/system/hub-directory/{_server.ts.js-DlgmR6in.js → _server.ts.js-DCiumLwY.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/tag-palette/{_server.ts.js-DX4FSwsB.js → _server.ts.js-C1GQSarF.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/tag-palette/rename/{_server.ts.js-DdDpR8Zs.js → _server.ts.js-B4Gu6Ayc.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/update-status/{_server.ts.js-DpMvhNZ9.js → _server.ts.js-VHpVsH7e.js} +2 -2
- package/build/server/chunks/{handler-DFQpvHDc.js → handler-sLR6EIdK.js} +3 -3
- package/build/server/chunks/{index.js-GMxaF6ji.js → index.js-B-nFhSuu.js} +2 -2
- package/build/server/chunks/{manifest.js-DGpEjTN6.js → manifest.js-CnuEqnnO.js} +37 -37
- package/build/server/chunks/nodes/{0.js-DD3J2EIp.js → 0.js-DSJpsejC.js} +3 -3
- package/build/server/chunks/nodes/1.js-Be5xYmbq.js +7 -0
- package/build/server/chunks/nodes/{11.js-BtxWMAMt.js → 11.js-59qSeDy-.js} +2 -2
- package/build/server/chunks/nodes/{12.js-dxY2l7r5.js → 12.js-D_2yx6-U.js} +2 -2
- package/build/server/chunks/nodes/{13.js-4ZSIOq68.js → 13.js-CsQOvHq9.js} +2 -2
- package/build/server/chunks/nodes/{14.js-ClDn7cIE.js → 14.js-B-KwyBCP.js} +2 -2
- package/build/server/chunks/nodes/{15.js-DyjLHhBr.js → 15.js-_R1E07z7.js} +2 -2
- package/build/server/chunks/nodes/{16.js-ChXnJ4tr.js → 16.js-DTzZ5yXh.js} +2 -2
- package/build/server/chunks/nodes/{2.js-Cj3hnjdr.js → 2.js-CCWrojqo.js} +2 -2
- package/build/server/chunks/nodes/{3.js-Crsqd1U2.js → 3.js-D82Yk_Yj.js} +2 -2
- package/build/server/chunks/nodes/{4.js-9EXPGbSn.js → 4.js-NFD9Xokg.js} +2 -2
- package/build/server/chunks/nodes/{5.js-Dn8iEQ-8.js → 5.js-BFJmCgmj.js} +2 -2
- package/build/server/chunks/nodes/{6.js-Bg5bNhCm.js → 6.js-CGiymVZi.js} +2 -2
- package/build/server/chunks/nodes/{7.js-3a-BkMqi.js → 7.js-ZH6BSKiJ.js} +2 -2
- package/build/server/chunks/nodes/{8.js-BpwFyCJ5.js → 8.js-DMwXVvC5.js} +2 -2
- package/build/server/chunks/nodes/{9.js-5H6GMAyx.js → 9.js-DKj11aXV.js} +2 -2
- package/cli/dashboard-server.ts +10 -0
- package/cli/session-guard.ts +112 -0
- package/mcp-server/resources/operations.ts +4 -2
- package/mcp-server/tools/_index-source.ts +87 -0
- package/mcp-server/tools/batch-ops/surfaceActionOps.ts +3 -1
- package/mcp-server/tools/behavioralIndex.ts +17 -30
- package/mcp-server/tools/implementationStatus.ts +28 -24
- package/mcp-server/tools/provenance.ts +28 -12
- package/mcp-server/tools/surface.ts +20 -6
- package/mcp-server/tools/verification.ts +36 -9
- package/package.json +2 -5
- package/src/features/behavior-model/application/ports/FeatureRepository.ts +9 -33
- package/src/features/behavior-model/domain/services/featureSummary.ts +35 -2
- package/src/features/behavior-model/domain/services/transforms/surfaceTransforms.ts +1 -1
- package/src/features/maturity/domain/ConfidenceMatrix.ts +5 -2
- package/src/features/projects/application/use-cases/ImportProjectBundle.ts +1 -1
- package/src/features/verification/infrastructure/persistence/FileBehavioralIndexReader.ts +25 -15
- package/src/features/verification/infrastructure/persistence/StaticBehavioralIndexReader.ts +11 -0
- package/src/shared/domain/pathSegment.ts +37 -0
- package/src/shared/infrastructure/persistence/snapshotLayout.ts +10 -25
- package/build/client/_app/immutable/assets/0.fLkOk5CB.css +0 -1
- package/build/client/_app/immutable/assets/0.fLkOk5CB.css.br +0 -0
- package/build/client/_app/immutable/assets/0.fLkOk5CB.css.gz +0 -0
- package/build/client/_app/immutable/chunks/B2Xk3BoK2.js.br +0 -0
- package/build/client/_app/immutable/chunks/B2Xk3BoK2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BrWeFyMA.js +0 -1
- package/build/client/_app/immutable/chunks/BrWeFyMA.js.br +0 -2
- package/build/client/_app/immutable/chunks/BrWeFyMA.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CCRkIitA.js +0 -1
- package/build/client/_app/immutable/chunks/CCRkIitA.js.br +0 -0
- package/build/client/_app/immutable/chunks/CCRkIitA.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CGRZ0hx_2.js.br +0 -0
- package/build/client/_app/immutable/chunks/CGRZ0hx_2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CfF5WnjG2.js.br +0 -0
- package/build/client/_app/immutable/chunks/CfF5WnjG2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CgSXJuIO.js.br +0 -2
- package/build/client/_app/immutable/chunks/CgSXJuIO.js.gz +0 -0
- package/build/client/_app/immutable/chunks/n7xluuKn.js.br +0 -0
- package/build/client/_app/immutable/chunks/n7xluuKn.js.gz +0 -0
- package/build/client/_app/immutable/chunks/okshMw-Z.js.br +0 -0
- package/build/client/_app/immutable/chunks/veFR6afQ.js.br +0 -0
- package/build/client/_app/immutable/chunks/veFR6afQ.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.BFt6jt7s.js.br +0 -0
- package/build/client/_app/immutable/entry/app.BFt6jt7s.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.CVKspSut.js +0 -1
- package/build/client/_app/immutable/entry/start.CVKspSut.js.br +0 -0
- package/build/client/_app/immutable/entry/start.CVKspSut.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.CL54SQAN.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.CL54SQAN.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.Bfj3GUlf.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.Bfj3GUlf.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.CzNmZJ45.js +0 -1
- package/build/client/_app/immutable/nodes/11.CzNmZJ45.js.br +0 -1
- package/build/client/_app/immutable/nodes/11.CzNmZJ45.js.gz +0 -0
- package/build/client/_app/immutable/nodes/12.Bsl85JMW.js.br +0 -0
- package/build/client/_app/immutable/nodes/12.Bsl85JMW.js.gz +0 -0
- package/build/client/_app/immutable/nodes/13.YHll7CoO.js.br +0 -0
- package/build/client/_app/immutable/nodes/13.YHll7CoO.js.gz +0 -0
- package/build/client/_app/immutable/nodes/14.CQSsZ3ai.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.CQSsZ3ai.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.r9nu5e6r.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.r9nu5e6r.js.gz +0 -0
- package/build/client/_app/immutable/nodes/16.CGQwGPQ8.js.br +0 -0
- package/build/client/_app/immutable/nodes/16.CGQwGPQ8.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.Cq90ETQV.js +0 -1
- package/build/client/_app/immutable/nodes/2.Cq90ETQV.js.br +0 -1
- package/build/client/_app/immutable/nodes/2.Cq90ETQV.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.C7CEAqcZ.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.C7CEAqcZ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.CTSBwe7u.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.CTSBwe7u.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.DGbTT4pH.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.DGbTT4pH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.Dh0pqqO3.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.Dh0pqqO3.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.ByfneCW8.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.ByfneCW8.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.MF74_Gv4.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.MF74_Gv4.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.1oJXRmSq.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.1oJXRmSq.js.gz +0 -0
- package/build/server/chunks/nodes/1.js-CruL1RMv.js +0 -7
- package/src/features/behavior-model/domain/entities/index.ts +0 -9
- package/src/features/behavior-model/domain/services/ResourceDeducer.ts +0 -64
- package/src/features/behavior-model/presentation/components/ActionStatsStrip.svelte +0 -40
- package/src/features/behavior-model/presentation/components/FeatureHealthStrip.svelte +0 -125
- package/src/features/behavior-model/presentation/components/StatePathInput.svelte +0 -45
- package/src/features/tag-palette/presentation/components/TagPillBar.svelte +0 -101
- package/src/lib/server/sync/publish.ts +0 -35
- package/src/shared/domain/Result.ts +0 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CNJFf1c0.js","./kNaey6uv.js","./Cog4lB7j2.js","./D3R1Zijl.js","./CYsLq4VE.js","./DsF7k-Jl.js","./CU1VY_X6.js","./DMee4NNa.js","./CKRxRU-N.js","./C8hxcZ_T2.js","./BXpANlNW2.js","./Dt-pE0Tn.js","./BWPyau1x.js","./BifhSqXX.js","./CWiCMZki2.js","./BMAHwzjW2.js","./CQEhpTR82.js","./ZE_M8k_X2.js","./CSKSodPl2.js","./CzLHFS1n2.js","./Cxo3sx0V.js","./D8TtvFq5.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{$ as e,A as t,B as n,D as r,F as i,I as a,K as o,L as s,M as c,N as l,O as u,P as d,Q as f,R as p,V as m,X as h,Z as g,_,a as v,d as y,dt as b,et as x,g as S,gt as C,ht as w,it as T,j as E,k as D,l as O,n as k,nt as A,q as j,r as M,s as N,tt as P,u as F,ut as I,v as ee,vt as L,y as R,yt as z,z as B}from"./CYsLq4VE.js";import{r as V}from"./CCRkIitA.js";import{t as H}from"./kNaey6uv.js";import"./xihTtKlq.js";import"./BrWeFyMA.js";import{Ct as U,O as te,Tt as ne,k as re}from"./PGh5ehlS.js";var W=[`contains`,`reads`,`writes`,`emits`,`transitions`,`asserts`,`uses`,`handles`],ie=[`feature`,`surface`,`action`,`state`,`event`,`parameter`,`rule`,`effect`,`invariant`,`scenario`,`persona`,`resource`,`entity`,`valueSet`],ae=e=>{switch(e.type){case`set_state`:return`set ${e.path}`;case`show_message`:return e.tone?`${e.tone} message`:`message`;case`emit_event`:return`emit ${e.event}`;case`block_action`:return`block`;case`allow_action`:return`allow`;case`transition_surface`:return`transition`;case`append_to_list`:return`append ${e.path}`;case`remove_from_list`:return`remove ${e.path}`;case`update_list_item`:return`update ${e.path}`;case`advance_time`:return`advance time`;case`invoke_operation`:return`invoke ${e.operation}`}},G=e=>{let t=new Set;for(let n of U(e))ne(n.left)||t.add(String(n.left));return[...t]},oe=(e,t)=>{let n=new Map,r=new Map,i=e=>{n.has(e.id)||n.set(e.id,e)},a=e=>{if(!n.has(e.from)||!n.has(e.to))return;let t=`${e.from}->${e.to}:${e.kind}:${e.label??``}`;r.has(t)||r.set(t,{...e,id:t})},o=(e,t,n)=>{i({id:`feature:${e.id}:state:${t}`,type:`state`,label:t,detail:n,layer:3})},s=(e,t)=>`feature:${e.id}:surface:${t}`,c=(e,t)=>`feature:${e.id}:action:${t}`,l=(e,t)=>`feature:${e.id}:state:${t}`,u=(e,t)=>`feature:${e.id}:valueSet:${t}`,d=(e,t,n,r)=>{let c=`feature:${e.id}:effect:${n.id}`;i({id:c,type:`effect`,label:ae(n),detail:n.description??n.type,layer:5}),a({from:t,to:c,kind:r});for(let t of te(n))o(e,String(t)),a({from:c,to:l(e,t),kind:`writes`});if(n.type===`emit_event`){let e=`event:${n.event}`;i({id:e,type:`event`,label:String(n.event),layer:3}),a({from:c,to:e,kind:`emits`})}else n.type===`transition_surface`&&a({from:c,to:s(e,n.target),kind:`transitions`})},f=t?`project:${t.id}`:null;t&&f&&i({id:f,type:`feature`,label:t.name,detail:t.description??`Project`,layer:0});for(let n of e){let e=`feature:${n.id}`;i({id:e,type:`feature`,label:n.name,detail:n.description,layer:+!!t,href:`/features/${n.id}`}),f&&a({from:f,to:e,kind:`contains`});for(let r of n.personas){let o=`feature:${n.id}:persona:${r.id}`;i({id:o,type:`persona`,label:r.name,detail:r.description,layer:t?2:1}),a({from:e,to:o,kind:`contains`})}for(let r of n.resources){let n=`resource:${r.id}`;i({id:n,type:`resource`,label:r.name,detail:r.description??r.kind,layer:t?2:1}),a({from:e,to:n,kind:`contains`})}for(let r of n.entities){let n=`entity:${r.id}`;i({id:n,type:`entity`,label:r.namespace,detail:r.description,layer:t?2:1}),a({from:e,to:n,kind:`contains`}),r.resourceId&&a({from:n,to:`resource:${r.resourceId}`,kind:`uses`})}for(let r of n.valueSets??[]){let o=u(n,r.id);i({id:o,type:`valueSet`,label:r.name,detail:`${r.values.length} values`,layer:t?2:1}),a({from:e,to:o,kind:`contains`})}for(let t of n.events??[]){let n=`event:${t.name}`;i({id:n,type:`event`,label:String(t.name),detail:t.description,layer:3}),a({from:e,to:n,kind:`contains`})}for(let t of n.featureInvariants??[]){let r=`feature:${n.id}:invariant:${t.id}`;i({id:r,type:`invariant`,label:t.name,detail:t.description??t.message,layer:6}),a({from:e,to:r,kind:`contains`});for(let e of G(t.condition))o(n,e),a({from:r,to:l(n,e),kind:`reads`})}for(let t of n.reachabilityGoals??[]){let r=`feature:${n.id}:goal:${t.id}`;i({id:r,type:`goal`,label:t.name,detail:t.description??t.message??t.kind,layer:6}),a({from:e,to:r,kind:`contains`});for(let e of G(t.condition))o(n,e),a({from:r,to:l(n,e),kind:`reads`})}for(let r of n.surfaces){let f=s(n,r.id);i({id:f,type:`surface`,label:r.name,detail:r.description??r.type,layer:t?2:1,href:`/features/${n.id}?surface=${r.id}`}),a({from:e,to:f,kind:`contains`}),r.parentSurfaceId&&a({from:s(n,r.parentSurfaceId),to:f,kind:`contains`});for(let e of r.stateDefinitions)o(n,String(e.path),e.description??e.type),a({from:f,to:l(n,e.path),kind:`contains`}),e.valueSetId&&a({from:l(n,e.path),to:u(n,e.valueSetId),kind:`uses`});for(let e of r.transitions){let t=`feature:${n.id}:transition:${e.id}`;i({id:t,type:`effect`,label:e.label??`transition`,detail:e.description,layer:6}),a({from:f,to:t,kind:`contains`}),a({from:t,to:s(n,e.target),kind:`transitions`})}for(let e of r.rules){let t=`feature:${n.id}:rule:${e.id}`;i({id:t,type:`rule`,label:e.category,detail:e.description,layer:6}),a({from:f,to:t,kind:`contains`});for(let r of G(e.condition))o(n,r),a({from:t,to:l(n,r),kind:`reads`});d(n,t,e.effect,`writes`)}for(let e of r.invariants){let t=`feature:${n.id}:invariant:${e.id}`;i({id:t,type:`invariant`,label:e.name,detail:e.description??e.message,layer:6}),a({from:f,to:t,kind:`contains`});for(let r of G(e.condition))o(n,r),a({from:t,to:l(n,r),kind:`reads`})}for(let e of r.actions){let p=c(n,e.id);if(i({id:p,type:`action`,label:e.name,detail:e.intent,layer:t?3:2,href:`/features/${n.id}?surface=${r.id}&panel=actions`}),a({from:f,to:p,kind:`contains`}),e.triggeredByEvent){let t=`event:${e.triggeredByEvent}`;i({id:t,type:`event`,label:String(e.triggeredByEvent),layer:3}),a({from:t,to:p,kind:`handles`})}for(let t of e.requiredStates)o(n,String(t)),a({from:l(n,t),to:p,kind:`reads`});for(let r of e.parameters){let e=`feature:${n.id}:parameter:${r.id}`;i({id:e,type:`parameter`,label:r.name,detail:r.description??r.type,layer:t?5:4}),a({from:p,to:e,kind:`contains`}),r.bindToStatePath&&(o(n,String(r.bindToStatePath)),a({from:e,to:l(n,r.bindToStatePath),kind:`writes`})),r.resourceId&&a({from:e,to:`resource:${r.resourceId}`,kind:`uses`}),r.valueSetId&&a({from:e,to:u(n,r.valueSetId),kind:`uses`})}for(let t of e.rules){let e=`feature:${n.id}:rule:${t.id}`;i({id:e,type:`rule`,label:t.category,detail:t.description,layer:6}),a({from:p,to:e,kind:`contains`});for(let r of G(t.condition))o(n,r),a({from:e,to:l(n,r),kind:`reads`});d(n,e,t.effect,`writes`)}for(let t of e.invariants){let e=`feature:${n.id}:invariant:${t.id}`;i({id:e,type:`invariant`,label:t.name,detail:t.description??t.message,layer:6}),a({from:p,to:e,kind:`contains`});for(let r of G(t.condition))o(n,r),a({from:e,to:l(n,r),kind:`reads`})}for(let t of e.effects)d(n,p,t,`contains`);for(let t of e.onBlockedEffects??[])d(n,p,t,`contains`);for(let t of e.emittedEvents){let e=`event:${t}`;i({id:e,type:`event`,label:String(t),layer:3}),a({from:p,to:e,kind:`emits`})}for(let t of e.transitions){let e=`feature:${n.id}:transition:${t.id}`;i({id:e,type:`effect`,label:t.label??`transition`,detail:t.description,layer:6}),a({from:p,to:e,kind:`contains`}),a({from:e,to:s(n,t.target),kind:`transitions`})}for(let t of e.scenarios??[]){let e=`feature:${n.id}:scenario:${t.id}`;i({id:e,type:`scenario`,label:t.name,detail:t.description??t.expectedStatus,layer:6}),a({from:p,to:e,kind:`asserts`}),t.personaId&&a({from:e,to:`feature:${n.id}:persona:${t.personaId}`,kind:`uses`});for(let r of t.stateOverrides)o(n,String(r.path)),a({from:e,to:l(n,r.path),kind:`writes`});for(let r of t.expectedAssertions??[])o(n,String(r.path)),a({from:e,to:l(n,r.path),kind:`asserts`});t.expectedTransition&&a({from:e,to:s(n,t.expectedTransition),kind:`transitions`})}}}}return{nodes:[...n.values()],edges:[...r.values()]}},se=e=>{let t=new Map;for(let n of e.nodes)t.set(n.id,0);for(let n of e.edges)t.set(n.from,(t.get(n.from)??0)+1),t.set(n.to,(t.get(n.to)??0)+1);let n=e.nodes.map(e=>({...e,degree:t.get(e.id)??0}));return{nodes:n,edges:e.edges,nodeById:new Map(n.map(e=>[e.id,e]))}},ce=(e,t)=>{let n=t.search.trim().toLowerCase(),r=new Set;if(n){for(let t of e.nodes)`${t.label} ${t.type} ${t.detail??``}`.toLowerCase().includes(n)&&r.add(t.id);for(let t of e.edges)(r.has(t.from)||r.has(t.to))&&(r.add(t.from),r.add(t.to))}let i=e=>!n||r.has(e),a=e.edges.filter(e=>t.enabledKinds[e.kind]&&i(e.from)&&i(e.to)),o=new Set;for(let e of a)o.add(e.from),o.add(e.to);let s=e.nodes.filter(e=>i(e.id)&&(!n||o.has(e.id)||r.has(e.id)));return{nodes:s,edges:a,nodeById:new Map(s.map(e=>[e.id,e]))}},le={feature:{label:`Feature`,fill:`#0f172a`,stroke:`#020617`},surface:{label:`Surface`,fill:`#0e7490`,stroke:`#155e75`},action:{label:`Action`,fill:`#2563eb`,stroke:`#1d4ed8`},state:{label:`State`,fill:`#7c3aed`,stroke:`#6d28d9`},event:{label:`Event`,fill:`#db2777`,stroke:`#be185d`},parameter:{label:`Parameter`,fill:`#0891b2`,stroke:`#0e7490`},rule:{label:`Rule`,fill:`#ea580c`,stroke:`#c2410c`},effect:{label:`Effect`,fill:`#16a34a`,stroke:`#15803d`},invariant:{label:`Invariant`,fill:`#ca8a04`,stroke:`#a16207`},goal:{label:`Liveness goal`,fill:`#65a30d`,stroke:`#4d7c0f`},scenario:{label:`Scenario`,fill:`#475569`,stroke:`#334155`},persona:{label:`Persona`,fill:`#0f766e`,stroke:`#115e59`},resource:{label:`Resource`,fill:`#4f46e5`,stroke:`#4338ca`},entity:{label:`Entity`,fill:`#9333ea`,stroke:`#7e22ce`},valueSet:{label:`Value set`,fill:`#64748b`,stroke:`#475569`}},K={contains:{label:`Contains`,color:`#94a3b8`},reads:{label:`Reads`,color:`#7c3aed`},writes:{label:`Writes`,color:`#16a34a`},emits:{label:`Emits`,color:`#db2777`},transitions:{label:`Transitions`,color:`#0891b2`},asserts:{label:`Asserts`,color:`#ca8a04`},uses:{label:`Uses`,color:`#475569`},handles:{label:`Handles`,color:`#2563eb`}},ue=new Set([`writes`,`emits`,`transitions`]),q=.14,de=.035,fe=e=>Math.max(13,Math.min(38,13+Math.sqrt(e)*6)),J=(e,t)=>{let n=e.replace(`#`,``);return n.length===6?`rgba(${Number.parseInt(n.slice(0,2),16)},${Number.parseInt(n.slice(2,4),16)},${Number.parseInt(n.slice(4,6),16)},${t})`:e},pe=e=>{let t=e.replace(`#`,``);if(t.length!==6)return`#000000`;let n=e=>{let t=Number.parseInt(e,16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4},r=n(t.slice(0,2)),i=n(t.slice(2,4)),a=n(t.slice(4,6)),o=.2126*r+.7152*i+.0722*a;return(o+.05)/.05>=1.05/(o+.05)?`#000000`:`#ffffff`},Y=e=>e>700?220:e>300?280:180,X=e=>e>700?2600:e>300?3200:2400,me=class{runtime;container;callbacks;network=null;nodes=null;edges=null;signature=``;currentInput=null;highlightFrame=null;highlighted={nodes:new Set,edges:new Set};selectionEventsSuppressed=!1;stabilizeTimeout=null;settle=()=>this.freezePhysics();constructor(e,t,n={}){this.runtime=e,this.container=t,this.callbacks=n}render(e){this.currentInput=e;let t=this.signatureFor(e);if(!this.network){this.createNetwork(e,t);return}if(t===this.signature){this.select(e.selectedId,e.selectedEdgeId,!1);return}this.signature=t,this.clearHighlight(),this.nodes?.clear(),this.edges?.clear(),this.nodes?.add(this.toNodes(e)),this.edges?.add(this.toEdges(e)),this.startStabilization(e.graph.nodes.length),this.select(e.selectedId,e.selectedEdgeId,!1)}relayout(e){this.network&&(this.clearHighlight(),this.startStabilization(e))}fit(){this.network?.fit({animation:{duration:220,easingFunction:`easeInOutQuad`}})}zoomBy(e){if(!this.network)return;let t=Math.max(.04,Math.min(5,this.network.getScale()*e));this.network.moveTo({scale:t,animation:{duration:120,easingFunction:`easeInOutQuad`}})}focus(e){this.network?.focus(e,{scale:1.08,animation:{duration:260,easingFunction:`easeInOutQuad`}})}select(e,t=null,n=!0){if(this.network){this.selectionEventsSuppressed=!0;try{this.network.setSelection({nodes:e?[e]:[],edges:!e&&t?[t]:[]},{highlightEdges:!1})}finally{this.selectionEventsSuppressed=!1}if(e){this.highlightNodeNeighborhood(e,n);return}if(t){this.highlightEdgeNeighborhood(t,n);return}this.clearHighlight()}}destroy(){this.clearPendingWork(),this.network?.destroy(),this.network=null,this.nodes=null,this.edges=null}createNetwork(e,t){let n=new this.runtime.DataSet(this.toNodes(e)),r=new this.runtime.DataSet(this.toEdges(e));this.nodes=n,this.edges=r;let i=new this.runtime.Network(this.container,{nodes:n,edges:r},this.options(e.graph.nodes.length));this.network=i,this.signature=t,i.on(`stabilizationProgress`,e=>{if(!e?.total)return;let t=Math.min(100,Math.round(e.iterations/e.total*100));this.callbacks.onStabilizationProgress?.(t),t>=100&&setTimeout(()=>this.freezePhysics(),0)}),i.on(`selectNode`,e=>{if(this.selectionEventsSuppressed)return;let t=e?.nodes?.find(e=>typeof e==`string`)??null;this.callbacks.onSelectedNodeChange?.(t),this.callbacks.onSelectedEdgeChange?.(null),t&&this.highlightNodeNeighborhood(t,!0)}),i.on(`selectEdge`,e=>{if(this.selectionEventsSuppressed)return;let t=e?.edges?.find(e=>typeof e==`string`)??null;this.callbacks.onSelectedNodeChange?.(null),this.callbacks.onSelectedEdgeChange?.(t),t&&this.highlightEdgeNeighborhood(t,!0)}),i.on(`doubleClick`,e=>{let t=e?.nodes?.find(e=>typeof e==`string`)??null;t&&this.callbacks.onNodeActivate?.(t)}),i.on(`deselectNode`,()=>{this.selectionEventsSuppressed||this.network?.getSelection().edges.length||(this.callbacks.onSelectedNodeChange?.(null),this.clearHighlight())}),i.on(`deselectEdge`,()=>{this.selectionEventsSuppressed||this.network?.getSelection().nodes.length||(this.callbacks.onSelectedEdgeChange?.(null),this.clearHighlight())}),this.startStabilization(e.graph.nodes.length)}startStabilization(e){this.network&&(this.clearStabilizationTimeout(),this.callbacks.onSettledChange?.(!1),this.callbacks.onStabilizationProgress?.(0),this.network.off(`stabilized`,this.settle),this.network.once(`stabilized`,this.settle),this.network.setOptions(this.options(e)),this.network.stabilize(Y(e)),this.stabilizeTimeout=setTimeout(()=>this.freezePhysics(),X(e)))}freezePhysics(){this.network&&(this.clearStabilizationTimeout(),this.network.off(`stabilized`,this.settle),this.network.storePositions(),this.network.stopSimulation(),this.network.setOptions({physics:!1}),this.callbacks.onStabilizationProgress?.(100),this.callbacks.onSettledChange?.(!0))}options(e){return{autoResize:!0,interaction:{hover:!1,tooltipDelay:1e6,dragNodes:!0,dragView:!0,zoomView:!0,multiselect:!1,navigationButtons:!1,keyboard:!1,hideEdgesOnDrag:!0,hideEdgesOnZoom:!0},layout:{improvedLayout:e<350},physics:{enabled:!0,solver:`forceAtlas2Based`,stabilization:{enabled:!0,iterations:Y(e),updateInterval:40,fit:!0},forceAtlas2Based:{gravitationalConstant:e>500?-34:-48,centralGravity:.014,springLength:e>500?95:120,springConstant:.055,damping:.74,avoidOverlap:e>500?.25:.45},adaptiveTimestep:!0,minVelocity:2.2,maxVelocity:28},nodes:{chosen:!0,scaling:{min:13,max:42},shapeProperties:{borderRadius:4}},edges:{chosen:!1,selectionWidth:1}}}toNodes(e){return e.graph.nodes.map(t=>this.nodeFor(t,e,t.id===e.selectedId?`selected`:`base`))}nodeFor(e,t,n){let r=t.labelsVisible||t.graph.nodes.length<90,i=t.nodeTheme[e.type],a=n===`dimmed`,o=n===`selected`,s=n===`highlighted`||o,c=!a&&(r||e.degree>5||e.type===`feature`||s),l=e.type!==`feature`&&c;return{id:e.id,label:c?e.label:``,title:`${i.label}: ${e.label}${e.detail?`\n${e.detail}`:``}`,value:Math.max(1,e.degree),size:fe(e.degree),shape:e.type===`feature`||!c?`dot`:`box`,color:{background:a?J(i.fill,q):i.fill,border:a?J(i.stroke,.2):o?`#020617`:i.stroke,highlight:{background:i.fill,border:`#020617`},hover:{background:i.fill,border:i.stroke}},borderWidth:o?5:s?3.5:1.5,font:{color:l?pe(i.fill):`#0f172a`,size:o?16:s?13:12,face:`Inter, ui-sans-serif, system-ui, sans-serif`,strokeWidth:l||a?0:4,strokeColor:`rgba(255,255,255,0.92)`},margin:l?{top:6,right:10,bottom:6,left:10}:void 0,widthConstraint:l?{maximum:220}:void 0,shadow:!a&&(s||e.type===`feature`||e.degree>8)}}toEdges(e){return e.graph.edges.map(t=>this.edgeFor(t,e.edgeTheme,`base`))}edgeFor(e,t,n){let r=ue.has(e.kind),i=n===`selected`?.96:n===`highlighted`?.82:n===`dimmed`?de:r?.42:.18;return{id:e.id,from:e.from,to:e.to,title:e.label??t[e.kind].label,color:{color:t[e.kind].color,opacity:i},width:n===`selected`?3:n===`highlighted`?2.2:r?1.5:.7,dashes:e.kind===`contains`,arrows:{to:{enabled:e.kind!==`contains`,scaleFactor:.45}},smooth:!1}}highlightNodeNeighborhood(e,t){!this.network||!this.nodes||!this.edges||(this.highlightFrame!==null&&cancelAnimationFrame(this.highlightFrame),this.highlightFrame=requestAnimationFrame(()=>{let n=this.currentInput;if(!this.network||!this.nodes||!this.edges||!n)return;let r=new Set([e,...this.network.getConnectedNodes(e).filter(e=>typeof e==`string`||typeof e==`number`)]),i=new Set(this.network.getConnectedEdges(e));this.applyFocusMask({selectedNodeId:e,highlightedNodes:r,highlightedEdges:i}),t&&this.fitNeighborhood(r),this.highlighted={nodes:r,edges:i},this.highlightFrame=null}))}highlightEdgeNeighborhood(e,t){!this.network||!this.nodes||!this.edges||(this.highlightFrame!==null&&cancelAnimationFrame(this.highlightFrame),this.highlightFrame=requestAnimationFrame(()=>{let n=this.currentInput;if(!this.network||!this.nodes||!this.edges||!n)return;let r=n.graph.edges.find(t=>t.id===e);if(!r)return;let i=new Set([r.from,r.to]),a=new Set([e]);for(let e of[r.from,r.to]){for(let t of this.network.getConnectedNodes(e))(typeof t==`string`||typeof t==`number`)&&i.add(t);for(let t of this.network.getConnectedEdges(e))a.add(t)}this.applyFocusMask({selectedEdgeId:e,highlightedNodes:i,highlightedEdges:a}),t&&this.fitNeighborhood(i),this.highlighted={nodes:i,edges:a},this.highlightFrame=null}))}applyFocusMask({selectedNodeId:e,selectedEdgeId:t,highlightedNodes:n,highlightedEdges:r}){if(!this.nodes||!this.edges)return;let i=this.currentInput;i&&(this.nodes.update(i.graph.nodes.map(t=>{let r=t.id===e?`selected`:n.has(t.id)?`highlighted`:`dimmed`;return this.nodeFor(t,i,r)})),this.edges.update(i.graph.edges.map(e=>{let n=e.id===t?`selected`:r.has(e.id)?`highlighted`:`dimmed`;return this.edgeFor(e,i.edgeTheme,n)})))}fitNeighborhood(e){!this.network||e.size===0||this.network.fit({nodes:[...e],minZoomLevel:.24,maxZoomLevel:1.18,animation:{duration:320,easingFunction:`easeInOutQuad`}})}clearHighlight(){this.clearPendingHighlight(),this.restoreHighlightBase(),this.highlighted={nodes:new Set,edges:new Set}}restoreHighlightBase(){if(!this.nodes||!this.edges)return;let e=this.currentInput;e&&(this.nodes.update(e.graph.nodes.map(t=>this.nodeFor(t,e,t.id===e.selectedId?`selected`:`base`))),this.edges.update(e.graph.edges.map(t=>this.edgeFor(t,e.edgeTheme,`base`))))}clearPendingWork(){this.clearPendingHighlight(),this.clearStabilizationTimeout()}clearPendingHighlight(){this.highlightFrame!==null&&(cancelAnimationFrame(this.highlightFrame),this.highlightFrame=null)}clearStabilizationTimeout(){this.stabilizeTimeout&&=(clearTimeout(this.stabilizeTimeout),null)}signatureFor(e){return`${e.graph.nodes.map(e=>e.id).join(`|`)}::${e.graph.edges.map(e=>e.id).join(`|`)}::labels=${e.labelsVisible}`}},he=a(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4 shrink-0 text-brand-600" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg>`),ge=i(`<button type="button" role="menuitemcheckbox" class="flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-left text-sm transition hover:bg-slate-50"><span class="h-2.5 w-2.5 shrink-0 rounded-full"></span> <span> </span> <!></button>`),_e=i(`<div role="menu" class="absolute right-0 top-11 z-20 w-64 overflow-hidden rounded-xl border border-slate-200 bg-white p-2 shadow-xl shadow-slate-950/10"><div class="flex items-center justify-between px-2 pb-1 pt-1"><span class="text-[10px] font-semibold uppercase tracking-wide text-slate-400">Connections</span> <div class="flex gap-1"><button type="button" class="rounded px-1.5 py-0.5 text-[11px] font-medium text-brand-700 hover:bg-brand-50">All</button> <button type="button" class="rounded px-1.5 py-0.5 text-[11px] font-medium text-slate-500 hover:bg-slate-100">None</button></div></div> <!> <div class="my-1 h-px bg-slate-100"></div> <button type="button" role="menuitemcheckbox" class="flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-left text-sm transition hover:bg-slate-50"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4 shrink-0 text-slate-400" aria-hidden="true"><path d="M20.59 13.41 13.42 20.6a2 2 0 0 1-2.83 0L3 13V4h9z"></path><path d="M7.5 7.5h.01"></path></svg> <span>Labels</span> <!></button> <div class="my-1 h-px bg-slate-100"></div> <div class="flex gap-1.5 px-1 pb-1 pt-0.5"><button type="button" class="flex-1 rounded-md border border-slate-200 px-2 py-1.5 text-xs font-medium text-slate-700 transition hover:bg-slate-50">Re-layout</button> <button type="button" class="flex-1 rounded-md border border-slate-200 px-2 py-1.5 text-xs font-medium text-slate-700 transition hover:bg-slate-50">Reset</button></div></div>`),ve=i(`<div class="pointer-events-none absolute left-3 top-3 z-10 w-56 rounded-md border border-slate-200 bg-white/90 p-3 text-xs text-slate-600 shadow-sm backdrop-blur"><div class="flex justify-between font-medium text-slate-800"><span>Stabilizing layout</span> <span> </span></div> <div class="mt-2 h-1.5 overflow-hidden rounded-full bg-slate-200"><div class="h-full rounded-full bg-brand-500 transition-all"></div></div></div>`),ye=i(`<span class="inline-flex items-center gap-1 rounded-full border border-slate-200 bg-white px-2 py-1 text-xs text-slate-700"><span class="h-2 w-2 rounded-full"></span> </span>`),be=i(`<button type="button" class="w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-left hover:border-brand-300 hover:bg-brand-50"><span class="block truncate text-sm font-medium text-slate-900"> </span> <span class="text-xs text-slate-500"> </span></button>`),xe=i(`<p class="mt-2 text-sm leading-6 text-slate-600"> </p>`),Se=i(`<a class="mt-3 inline-flex text-sm font-medium text-brand-700 hover:underline">Open in editor</a>`),Ce=i(`<p class="text-xs font-semibold uppercase tracking-wide text-slate-500"> </p> <h3 class="mt-1 text-base font-semibold text-slate-950"> </h3> <!> <p class="mt-2 text-xs text-slate-500"> </p> <!>`,1),we=i(`<p class="text-xs font-semibold uppercase tracking-wide text-slate-500"> </p> <h3 class="mt-1 text-base font-semibold text-slate-950"> </h3> <p class="mt-2 text-sm leading-6 text-slate-600"> </p> <p class="mt-2 text-xs text-slate-500">Click another node or edge to move the highlighted neighborhood.</p>`,1),Te=i(`<h3 class="text-sm font-semibold text-slate-950">Explore the Map</h3> <p class="mt-2 text-sm leading-6 text-slate-600">Click a node or edge to highlight its linked behavior. Double-click a node to jump
|
|
2
|
+
import{$ as e,A as t,B as n,D as r,F as i,I as a,K as o,L as s,M as c,N as l,O as u,P as d,Q as f,R as p,V as m,X as h,Z as g,_,a as v,d as y,dt as b,et as x,g as S,gt as C,ht as w,it as T,j as E,k as D,l as O,n as k,nt as A,q as j,r as M,s as N,tt as P,u as F,ut as I,v as ee,vt as L,y as R,yt as z,z as B}from"./CYsLq4VE.js";import{r as V}from"./AIVrTpgC.js";import{t as H}from"./kNaey6uv.js";import"./xihTtKlq.js";import"./BiDFtKe6.js";import{Ct as U,O as te,Tt as ne,k as re}from"./PGh5ehlS.js";var W=[`contains`,`reads`,`writes`,`emits`,`transitions`,`asserts`,`uses`,`handles`],ie=[`feature`,`surface`,`action`,`state`,`event`,`parameter`,`rule`,`effect`,`invariant`,`scenario`,`persona`,`resource`,`entity`,`valueSet`],ae=e=>{switch(e.type){case`set_state`:return`set ${e.path}`;case`show_message`:return e.tone?`${e.tone} message`:`message`;case`emit_event`:return`emit ${e.event}`;case`block_action`:return`block`;case`allow_action`:return`allow`;case`transition_surface`:return`transition`;case`append_to_list`:return`append ${e.path}`;case`remove_from_list`:return`remove ${e.path}`;case`update_list_item`:return`update ${e.path}`;case`advance_time`:return`advance time`;case`invoke_operation`:return`invoke ${e.operation}`}},G=e=>{let t=new Set;for(let n of U(e))ne(n.left)||t.add(String(n.left));return[...t]},oe=(e,t)=>{let n=new Map,r=new Map,i=e=>{n.has(e.id)||n.set(e.id,e)},a=e=>{if(!n.has(e.from)||!n.has(e.to))return;let t=`${e.from}->${e.to}:${e.kind}:${e.label??``}`;r.has(t)||r.set(t,{...e,id:t})},o=(e,t,n)=>{i({id:`feature:${e.id}:state:${t}`,type:`state`,label:t,detail:n,layer:3})},s=(e,t)=>`feature:${e.id}:surface:${t}`,c=(e,t)=>`feature:${e.id}:action:${t}`,l=(e,t)=>`feature:${e.id}:state:${t}`,u=(e,t)=>`feature:${e.id}:valueSet:${t}`,d=(e,t,n,r)=>{let c=`feature:${e.id}:effect:${n.id}`;i({id:c,type:`effect`,label:ae(n),detail:n.description??n.type,layer:5}),a({from:t,to:c,kind:r});for(let t of te(n))o(e,String(t)),a({from:c,to:l(e,t),kind:`writes`});if(n.type===`emit_event`){let e=`event:${n.event}`;i({id:e,type:`event`,label:String(n.event),layer:3}),a({from:c,to:e,kind:`emits`})}else n.type===`transition_surface`&&a({from:c,to:s(e,n.target),kind:`transitions`})},f=t?`project:${t.id}`:null;t&&f&&i({id:f,type:`feature`,label:t.name,detail:t.description??`Project`,layer:0});for(let n of e){let e=`feature:${n.id}`;i({id:e,type:`feature`,label:n.name,detail:n.description,layer:+!!t,href:`/features/${n.id}`}),f&&a({from:f,to:e,kind:`contains`});for(let r of n.personas){let o=`feature:${n.id}:persona:${r.id}`;i({id:o,type:`persona`,label:r.name,detail:r.description,layer:t?2:1}),a({from:e,to:o,kind:`contains`})}for(let r of n.resources){let n=`resource:${r.id}`;i({id:n,type:`resource`,label:r.name,detail:r.description??r.kind,layer:t?2:1}),a({from:e,to:n,kind:`contains`})}for(let r of n.entities){let n=`entity:${r.id}`;i({id:n,type:`entity`,label:r.namespace,detail:r.description,layer:t?2:1}),a({from:e,to:n,kind:`contains`}),r.resourceId&&a({from:n,to:`resource:${r.resourceId}`,kind:`uses`})}for(let r of n.valueSets??[]){let o=u(n,r.id);i({id:o,type:`valueSet`,label:r.name,detail:`${r.values.length} values`,layer:t?2:1}),a({from:e,to:o,kind:`contains`})}for(let t of n.events??[]){let n=`event:${t.name}`;i({id:n,type:`event`,label:String(t.name),detail:t.description,layer:3}),a({from:e,to:n,kind:`contains`})}for(let t of n.featureInvariants??[]){let r=`feature:${n.id}:invariant:${t.id}`;i({id:r,type:`invariant`,label:t.name,detail:t.description??t.message,layer:6}),a({from:e,to:r,kind:`contains`});for(let e of G(t.condition))o(n,e),a({from:r,to:l(n,e),kind:`reads`})}for(let t of n.reachabilityGoals??[]){let r=`feature:${n.id}:goal:${t.id}`;i({id:r,type:`goal`,label:t.name,detail:t.description??t.message??t.kind,layer:6}),a({from:e,to:r,kind:`contains`});for(let e of G(t.condition))o(n,e),a({from:r,to:l(n,e),kind:`reads`})}for(let r of n.surfaces){let f=s(n,r.id);i({id:f,type:`surface`,label:r.name,detail:r.description??r.type,layer:t?2:1,href:`/features/${n.id}?surface=${r.id}`}),a({from:e,to:f,kind:`contains`}),r.parentSurfaceId&&a({from:s(n,r.parentSurfaceId),to:f,kind:`contains`});for(let e of r.stateDefinitions)o(n,String(e.path),e.description??e.type),a({from:f,to:l(n,e.path),kind:`contains`}),e.valueSetId&&a({from:l(n,e.path),to:u(n,e.valueSetId),kind:`uses`});for(let e of r.transitions){let t=`feature:${n.id}:transition:${e.id}`;i({id:t,type:`effect`,label:e.label??`transition`,detail:e.description,layer:6}),a({from:f,to:t,kind:`contains`}),a({from:t,to:s(n,e.target),kind:`transitions`})}for(let e of r.rules){let t=`feature:${n.id}:rule:${e.id}`;i({id:t,type:`rule`,label:e.category,detail:e.description,layer:6}),a({from:f,to:t,kind:`contains`});for(let r of G(e.condition))o(n,r),a({from:t,to:l(n,r),kind:`reads`});d(n,t,e.effect,`writes`)}for(let e of r.invariants){let t=`feature:${n.id}:invariant:${e.id}`;i({id:t,type:`invariant`,label:e.name,detail:e.description??e.message,layer:6}),a({from:f,to:t,kind:`contains`});for(let r of G(e.condition))o(n,r),a({from:t,to:l(n,r),kind:`reads`})}for(let e of r.actions){let p=c(n,e.id);if(i({id:p,type:`action`,label:e.name,detail:e.intent,layer:t?3:2,href:`/features/${n.id}?surface=${r.id}&panel=actions`}),a({from:f,to:p,kind:`contains`}),e.triggeredByEvent){let t=`event:${e.triggeredByEvent}`;i({id:t,type:`event`,label:String(e.triggeredByEvent),layer:3}),a({from:t,to:p,kind:`handles`})}for(let t of e.requiredStates)o(n,String(t)),a({from:l(n,t),to:p,kind:`reads`});for(let r of e.parameters){let e=`feature:${n.id}:parameter:${r.id}`;i({id:e,type:`parameter`,label:r.name,detail:r.description??r.type,layer:t?5:4}),a({from:p,to:e,kind:`contains`}),r.bindToStatePath&&(o(n,String(r.bindToStatePath)),a({from:e,to:l(n,r.bindToStatePath),kind:`writes`})),r.resourceId&&a({from:e,to:`resource:${r.resourceId}`,kind:`uses`}),r.valueSetId&&a({from:e,to:u(n,r.valueSetId),kind:`uses`})}for(let t of e.rules){let e=`feature:${n.id}:rule:${t.id}`;i({id:e,type:`rule`,label:t.category,detail:t.description,layer:6}),a({from:p,to:e,kind:`contains`});for(let r of G(t.condition))o(n,r),a({from:e,to:l(n,r),kind:`reads`});d(n,e,t.effect,`writes`)}for(let t of e.invariants){let e=`feature:${n.id}:invariant:${t.id}`;i({id:e,type:`invariant`,label:t.name,detail:t.description??t.message,layer:6}),a({from:p,to:e,kind:`contains`});for(let r of G(t.condition))o(n,r),a({from:e,to:l(n,r),kind:`reads`})}for(let t of e.effects)d(n,p,t,`contains`);for(let t of e.onBlockedEffects??[])d(n,p,t,`contains`);for(let t of e.emittedEvents){let e=`event:${t}`;i({id:e,type:`event`,label:String(t),layer:3}),a({from:p,to:e,kind:`emits`})}for(let t of e.transitions){let e=`feature:${n.id}:transition:${t.id}`;i({id:e,type:`effect`,label:t.label??`transition`,detail:t.description,layer:6}),a({from:p,to:e,kind:`contains`}),a({from:e,to:s(n,t.target),kind:`transitions`})}for(let t of e.scenarios??[]){let e=`feature:${n.id}:scenario:${t.id}`;i({id:e,type:`scenario`,label:t.name,detail:t.description??t.expectedStatus,layer:6}),a({from:p,to:e,kind:`asserts`}),t.personaId&&a({from:e,to:`feature:${n.id}:persona:${t.personaId}`,kind:`uses`});for(let r of t.stateOverrides)o(n,String(r.path)),a({from:e,to:l(n,r.path),kind:`writes`});for(let r of t.expectedAssertions??[])o(n,String(r.path)),a({from:e,to:l(n,r.path),kind:`asserts`});t.expectedTransition&&a({from:e,to:s(n,t.expectedTransition),kind:`transitions`})}}}}return{nodes:[...n.values()],edges:[...r.values()]}},se=e=>{let t=new Map;for(let n of e.nodes)t.set(n.id,0);for(let n of e.edges)t.set(n.from,(t.get(n.from)??0)+1),t.set(n.to,(t.get(n.to)??0)+1);let n=e.nodes.map(e=>({...e,degree:t.get(e.id)??0}));return{nodes:n,edges:e.edges,nodeById:new Map(n.map(e=>[e.id,e]))}},ce=(e,t)=>{let n=t.search.trim().toLowerCase(),r=new Set;if(n){for(let t of e.nodes)`${t.label} ${t.type} ${t.detail??``}`.toLowerCase().includes(n)&&r.add(t.id);for(let t of e.edges)(r.has(t.from)||r.has(t.to))&&(r.add(t.from),r.add(t.to))}let i=e=>!n||r.has(e),a=e.edges.filter(e=>t.enabledKinds[e.kind]&&i(e.from)&&i(e.to)),o=new Set;for(let e of a)o.add(e.from),o.add(e.to);let s=e.nodes.filter(e=>i(e.id)&&(!n||o.has(e.id)||r.has(e.id)));return{nodes:s,edges:a,nodeById:new Map(s.map(e=>[e.id,e]))}},le={feature:{label:`Feature`,fill:`#0f172a`,stroke:`#020617`},surface:{label:`Surface`,fill:`#0e7490`,stroke:`#155e75`},action:{label:`Action`,fill:`#2563eb`,stroke:`#1d4ed8`},state:{label:`State`,fill:`#7c3aed`,stroke:`#6d28d9`},event:{label:`Event`,fill:`#db2777`,stroke:`#be185d`},parameter:{label:`Parameter`,fill:`#0891b2`,stroke:`#0e7490`},rule:{label:`Rule`,fill:`#ea580c`,stroke:`#c2410c`},effect:{label:`Effect`,fill:`#16a34a`,stroke:`#15803d`},invariant:{label:`Invariant`,fill:`#ca8a04`,stroke:`#a16207`},goal:{label:`Liveness goal`,fill:`#65a30d`,stroke:`#4d7c0f`},scenario:{label:`Scenario`,fill:`#475569`,stroke:`#334155`},persona:{label:`Persona`,fill:`#0f766e`,stroke:`#115e59`},resource:{label:`Resource`,fill:`#4f46e5`,stroke:`#4338ca`},entity:{label:`Entity`,fill:`#9333ea`,stroke:`#7e22ce`},valueSet:{label:`Value set`,fill:`#64748b`,stroke:`#475569`}},K={contains:{label:`Contains`,color:`#94a3b8`},reads:{label:`Reads`,color:`#7c3aed`},writes:{label:`Writes`,color:`#16a34a`},emits:{label:`Emits`,color:`#db2777`},transitions:{label:`Transitions`,color:`#0891b2`},asserts:{label:`Asserts`,color:`#ca8a04`},uses:{label:`Uses`,color:`#475569`},handles:{label:`Handles`,color:`#2563eb`}},ue=new Set([`writes`,`emits`,`transitions`]),q=.14,de=.035,fe=e=>Math.max(13,Math.min(38,13+Math.sqrt(e)*6)),J=(e,t)=>{let n=e.replace(`#`,``);return n.length===6?`rgba(${Number.parseInt(n.slice(0,2),16)},${Number.parseInt(n.slice(2,4),16)},${Number.parseInt(n.slice(4,6),16)},${t})`:e},pe=e=>{let t=e.replace(`#`,``);if(t.length!==6)return`#000000`;let n=e=>{let t=Number.parseInt(e,16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4},r=n(t.slice(0,2)),i=n(t.slice(2,4)),a=n(t.slice(4,6)),o=.2126*r+.7152*i+.0722*a;return(o+.05)/.05>=1.05/(o+.05)?`#000000`:`#ffffff`},Y=e=>e>700?220:e>300?280:180,X=e=>e>700?2600:e>300?3200:2400,me=class{runtime;container;callbacks;network=null;nodes=null;edges=null;signature=``;currentInput=null;highlightFrame=null;highlighted={nodes:new Set,edges:new Set};selectionEventsSuppressed=!1;stabilizeTimeout=null;settle=()=>this.freezePhysics();constructor(e,t,n={}){this.runtime=e,this.container=t,this.callbacks=n}render(e){this.currentInput=e;let t=this.signatureFor(e);if(!this.network){this.createNetwork(e,t);return}if(t===this.signature){this.select(e.selectedId,e.selectedEdgeId,!1);return}this.signature=t,this.clearHighlight(),this.nodes?.clear(),this.edges?.clear(),this.nodes?.add(this.toNodes(e)),this.edges?.add(this.toEdges(e)),this.startStabilization(e.graph.nodes.length),this.select(e.selectedId,e.selectedEdgeId,!1)}relayout(e){this.network&&(this.clearHighlight(),this.startStabilization(e))}fit(){this.network?.fit({animation:{duration:220,easingFunction:`easeInOutQuad`}})}zoomBy(e){if(!this.network)return;let t=Math.max(.04,Math.min(5,this.network.getScale()*e));this.network.moveTo({scale:t,animation:{duration:120,easingFunction:`easeInOutQuad`}})}focus(e){this.network?.focus(e,{scale:1.08,animation:{duration:260,easingFunction:`easeInOutQuad`}})}select(e,t=null,n=!0){if(this.network){this.selectionEventsSuppressed=!0;try{this.network.setSelection({nodes:e?[e]:[],edges:!e&&t?[t]:[]},{highlightEdges:!1})}finally{this.selectionEventsSuppressed=!1}if(e){this.highlightNodeNeighborhood(e,n);return}if(t){this.highlightEdgeNeighborhood(t,n);return}this.clearHighlight()}}destroy(){this.clearPendingWork(),this.network?.destroy(),this.network=null,this.nodes=null,this.edges=null}createNetwork(e,t){let n=new this.runtime.DataSet(this.toNodes(e)),r=new this.runtime.DataSet(this.toEdges(e));this.nodes=n,this.edges=r;let i=new this.runtime.Network(this.container,{nodes:n,edges:r},this.options(e.graph.nodes.length));this.network=i,this.signature=t,i.on(`stabilizationProgress`,e=>{if(!e?.total)return;let t=Math.min(100,Math.round(e.iterations/e.total*100));this.callbacks.onStabilizationProgress?.(t),t>=100&&setTimeout(()=>this.freezePhysics(),0)}),i.on(`selectNode`,e=>{if(this.selectionEventsSuppressed)return;let t=e?.nodes?.find(e=>typeof e==`string`)??null;this.callbacks.onSelectedNodeChange?.(t),this.callbacks.onSelectedEdgeChange?.(null),t&&this.highlightNodeNeighborhood(t,!0)}),i.on(`selectEdge`,e=>{if(this.selectionEventsSuppressed)return;let t=e?.edges?.find(e=>typeof e==`string`)??null;this.callbacks.onSelectedNodeChange?.(null),this.callbacks.onSelectedEdgeChange?.(t),t&&this.highlightEdgeNeighborhood(t,!0)}),i.on(`doubleClick`,e=>{let t=e?.nodes?.find(e=>typeof e==`string`)??null;t&&this.callbacks.onNodeActivate?.(t)}),i.on(`deselectNode`,()=>{this.selectionEventsSuppressed||this.network?.getSelection().edges.length||(this.callbacks.onSelectedNodeChange?.(null),this.clearHighlight())}),i.on(`deselectEdge`,()=>{this.selectionEventsSuppressed||this.network?.getSelection().nodes.length||(this.callbacks.onSelectedEdgeChange?.(null),this.clearHighlight())}),this.startStabilization(e.graph.nodes.length)}startStabilization(e){this.network&&(this.clearStabilizationTimeout(),this.callbacks.onSettledChange?.(!1),this.callbacks.onStabilizationProgress?.(0),this.network.off(`stabilized`,this.settle),this.network.once(`stabilized`,this.settle),this.network.setOptions(this.options(e)),this.network.stabilize(Y(e)),this.stabilizeTimeout=setTimeout(()=>this.freezePhysics(),X(e)))}freezePhysics(){this.network&&(this.clearStabilizationTimeout(),this.network.off(`stabilized`,this.settle),this.network.storePositions(),this.network.stopSimulation(),this.network.setOptions({physics:!1}),this.callbacks.onStabilizationProgress?.(100),this.callbacks.onSettledChange?.(!0))}options(e){return{autoResize:!0,interaction:{hover:!1,tooltipDelay:1e6,dragNodes:!0,dragView:!0,zoomView:!0,multiselect:!1,navigationButtons:!1,keyboard:!1,hideEdgesOnDrag:!0,hideEdgesOnZoom:!0},layout:{improvedLayout:e<350},physics:{enabled:!0,solver:`forceAtlas2Based`,stabilization:{enabled:!0,iterations:Y(e),updateInterval:40,fit:!0},forceAtlas2Based:{gravitationalConstant:e>500?-34:-48,centralGravity:.014,springLength:e>500?95:120,springConstant:.055,damping:.74,avoidOverlap:e>500?.25:.45},adaptiveTimestep:!0,minVelocity:2.2,maxVelocity:28},nodes:{chosen:!0,scaling:{min:13,max:42},shapeProperties:{borderRadius:4}},edges:{chosen:!1,selectionWidth:1}}}toNodes(e){return e.graph.nodes.map(t=>this.nodeFor(t,e,t.id===e.selectedId?`selected`:`base`))}nodeFor(e,t,n){let r=t.labelsVisible||t.graph.nodes.length<90,i=t.nodeTheme[e.type],a=n===`dimmed`,o=n===`selected`,s=n===`highlighted`||o,c=!a&&(r||e.degree>5||e.type===`feature`||s),l=e.type!==`feature`&&c;return{id:e.id,label:c?e.label:``,title:`${i.label}: ${e.label}${e.detail?`\n${e.detail}`:``}`,value:Math.max(1,e.degree),size:fe(e.degree),shape:e.type===`feature`||!c?`dot`:`box`,color:{background:a?J(i.fill,q):i.fill,border:a?J(i.stroke,.2):o?`#020617`:i.stroke,highlight:{background:i.fill,border:`#020617`},hover:{background:i.fill,border:i.stroke}},borderWidth:o?5:s?3.5:1.5,font:{color:l?pe(i.fill):`#0f172a`,size:o?16:s?13:12,face:`Inter, ui-sans-serif, system-ui, sans-serif`,strokeWidth:l||a?0:4,strokeColor:`rgba(255,255,255,0.92)`},margin:l?{top:6,right:10,bottom:6,left:10}:void 0,widthConstraint:l?{maximum:220}:void 0,shadow:!a&&(s||e.type===`feature`||e.degree>8)}}toEdges(e){return e.graph.edges.map(t=>this.edgeFor(t,e.edgeTheme,`base`))}edgeFor(e,t,n){let r=ue.has(e.kind),i=n===`selected`?.96:n===`highlighted`?.82:n===`dimmed`?de:r?.42:.18;return{id:e.id,from:e.from,to:e.to,title:e.label??t[e.kind].label,color:{color:t[e.kind].color,opacity:i},width:n===`selected`?3:n===`highlighted`?2.2:r?1.5:.7,dashes:e.kind===`contains`,arrows:{to:{enabled:e.kind!==`contains`,scaleFactor:.45}},smooth:!1}}highlightNodeNeighborhood(e,t){!this.network||!this.nodes||!this.edges||(this.highlightFrame!==null&&cancelAnimationFrame(this.highlightFrame),this.highlightFrame=requestAnimationFrame(()=>{let n=this.currentInput;if(!this.network||!this.nodes||!this.edges||!n)return;let r=new Set([e,...this.network.getConnectedNodes(e).filter(e=>typeof e==`string`||typeof e==`number`)]),i=new Set(this.network.getConnectedEdges(e));this.applyFocusMask({selectedNodeId:e,highlightedNodes:r,highlightedEdges:i}),t&&this.fitNeighborhood(r),this.highlighted={nodes:r,edges:i},this.highlightFrame=null}))}highlightEdgeNeighborhood(e,t){!this.network||!this.nodes||!this.edges||(this.highlightFrame!==null&&cancelAnimationFrame(this.highlightFrame),this.highlightFrame=requestAnimationFrame(()=>{let n=this.currentInput;if(!this.network||!this.nodes||!this.edges||!n)return;let r=n.graph.edges.find(t=>t.id===e);if(!r)return;let i=new Set([r.from,r.to]),a=new Set([e]);for(let e of[r.from,r.to]){for(let t of this.network.getConnectedNodes(e))(typeof t==`string`||typeof t==`number`)&&i.add(t);for(let t of this.network.getConnectedEdges(e))a.add(t)}this.applyFocusMask({selectedEdgeId:e,highlightedNodes:i,highlightedEdges:a}),t&&this.fitNeighborhood(i),this.highlighted={nodes:i,edges:a},this.highlightFrame=null}))}applyFocusMask({selectedNodeId:e,selectedEdgeId:t,highlightedNodes:n,highlightedEdges:r}){if(!this.nodes||!this.edges)return;let i=this.currentInput;i&&(this.nodes.update(i.graph.nodes.map(t=>{let r=t.id===e?`selected`:n.has(t.id)?`highlighted`:`dimmed`;return this.nodeFor(t,i,r)})),this.edges.update(i.graph.edges.map(e=>{let n=e.id===t?`selected`:r.has(e.id)?`highlighted`:`dimmed`;return this.edgeFor(e,i.edgeTheme,n)})))}fitNeighborhood(e){!this.network||e.size===0||this.network.fit({nodes:[...e],minZoomLevel:.24,maxZoomLevel:1.18,animation:{duration:320,easingFunction:`easeInOutQuad`}})}clearHighlight(){this.clearPendingHighlight(),this.restoreHighlightBase(),this.highlighted={nodes:new Set,edges:new Set}}restoreHighlightBase(){if(!this.nodes||!this.edges)return;let e=this.currentInput;e&&(this.nodes.update(e.graph.nodes.map(t=>this.nodeFor(t,e,t.id===e.selectedId?`selected`:`base`))),this.edges.update(e.graph.edges.map(t=>this.edgeFor(t,e.edgeTheme,`base`))))}clearPendingWork(){this.clearPendingHighlight(),this.clearStabilizationTimeout()}clearPendingHighlight(){this.highlightFrame!==null&&(cancelAnimationFrame(this.highlightFrame),this.highlightFrame=null)}clearStabilizationTimeout(){this.stabilizeTimeout&&=(clearTimeout(this.stabilizeTimeout),null)}signatureFor(e){return`${e.graph.nodes.map(e=>e.id).join(`|`)}::${e.graph.edges.map(e=>e.id).join(`|`)}::labels=${e.labelsVisible}`}},he=a(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4 shrink-0 text-brand-600" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg>`),ge=i(`<button type="button" role="menuitemcheckbox" class="flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-left text-sm transition hover:bg-slate-50"><span class="h-2.5 w-2.5 shrink-0 rounded-full"></span> <span> </span> <!></button>`),_e=i(`<div role="menu" class="absolute right-0 top-11 z-20 w-64 overflow-hidden rounded-xl border border-slate-200 bg-white p-2 shadow-xl shadow-slate-950/10"><div class="flex items-center justify-between px-2 pb-1 pt-1"><span class="text-[10px] font-semibold uppercase tracking-wide text-slate-400">Connections</span> <div class="flex gap-1"><button type="button" class="rounded px-1.5 py-0.5 text-[11px] font-medium text-brand-700 hover:bg-brand-50">All</button> <button type="button" class="rounded px-1.5 py-0.5 text-[11px] font-medium text-slate-500 hover:bg-slate-100">None</button></div></div> <!> <div class="my-1 h-px bg-slate-100"></div> <button type="button" role="menuitemcheckbox" class="flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-left text-sm transition hover:bg-slate-50"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4 shrink-0 text-slate-400" aria-hidden="true"><path d="M20.59 13.41 13.42 20.6a2 2 0 0 1-2.83 0L3 13V4h9z"></path><path d="M7.5 7.5h.01"></path></svg> <span>Labels</span> <!></button> <div class="my-1 h-px bg-slate-100"></div> <div class="flex gap-1.5 px-1 pb-1 pt-0.5"><button type="button" class="flex-1 rounded-md border border-slate-200 px-2 py-1.5 text-xs font-medium text-slate-700 transition hover:bg-slate-50">Re-layout</button> <button type="button" class="flex-1 rounded-md border border-slate-200 px-2 py-1.5 text-xs font-medium text-slate-700 transition hover:bg-slate-50">Reset</button></div></div>`),ve=i(`<div class="pointer-events-none absolute left-3 top-3 z-10 w-56 rounded-md border border-slate-200 bg-white/90 p-3 text-xs text-slate-600 shadow-sm backdrop-blur"><div class="flex justify-between font-medium text-slate-800"><span>Stabilizing layout</span> <span> </span></div> <div class="mt-2 h-1.5 overflow-hidden rounded-full bg-slate-200"><div class="h-full rounded-full bg-brand-500 transition-all"></div></div></div>`),ye=i(`<span class="inline-flex items-center gap-1 rounded-full border border-slate-200 bg-white px-2 py-1 text-xs text-slate-700"><span class="h-2 w-2 rounded-full"></span> </span>`),be=i(`<button type="button" class="w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-left hover:border-brand-300 hover:bg-brand-50"><span class="block truncate text-sm font-medium text-slate-900"> </span> <span class="text-xs text-slate-500"> </span></button>`),xe=i(`<p class="mt-2 text-sm leading-6 text-slate-600"> </p>`),Se=i(`<a class="mt-3 inline-flex text-sm font-medium text-brand-700 hover:underline">Open in editor</a>`),Ce=i(`<p class="text-xs font-semibold uppercase tracking-wide text-slate-500"> </p> <h3 class="mt-1 text-base font-semibold text-slate-950"> </h3> <!> <p class="mt-2 text-xs text-slate-500"> </p> <!>`,1),we=i(`<p class="text-xs font-semibold uppercase tracking-wide text-slate-500"> </p> <h3 class="mt-1 text-base font-semibold text-slate-950"> </h3> <p class="mt-2 text-sm leading-6 text-slate-600"> </p> <p class="mt-2 text-xs text-slate-500">Click another node or edge to move the highlighted neighborhood.</p>`,1),Te=i(`<h3 class="text-sm font-semibold text-slate-950">Explore the Map</h3> <p class="mt-2 text-sm leading-6 text-slate-600">Click a node or edge to highlight its linked behavior. Double-click a node to jump
|
|
3
3
|
straight to it in the editor.</p>`,1),Ee=i(`<section class="w-full lg:flex lg:min-h-0 lg:flex-1 lg:flex-col"><div class="select-none overflow-hidden rounded-lg border border-slate-200 bg-white shadow-sm shadow-slate-950/5 lg:flex lg:min-h-0 lg:flex-1 lg:flex-col"><div class="shrink-0 border-b border-slate-200 bg-slate-950 px-4 py-4 text-white"><a class="inline-flex items-center gap-1.5 text-sm font-medium text-slate-400 transition hover:text-white"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4" aria-hidden="true"><path d="M15 18l-6-6 6-6"></path></svg> </a> <div class="mt-3 min-w-0"><p class="text-xs font-semibold uppercase tracking-wide text-cyan-200">Behavior Graph</p> <h2 class="mt-1 truncate text-2xl font-semibold"> </h2> <p class="mt-1 max-w-3xl text-sm leading-6 text-slate-300"> </p></div></div> <div class="grid gap-0 lg:min-h-0 lg:flex-1 lg:grid-cols-[minmax(0,1fr)_320px]"><div class="min-w-0 border-b border-slate-200 lg:min-h-0 lg:border-b-0 lg:border-r"><div class="graph-canvas relative lg:h-full svelte-1wx4hks"><div class="h-[76vh] min-h-[32rem] w-full lg:h-full lg:min-h-0"></div> <div class="absolute right-3 top-3 z-10 flex items-start gap-2"><div class="relative"><label for="graph-search" class="sr-only">Search nodes</label> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" class="pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" aria-hidden="true"><circle cx="11" cy="11" r="7"></circle><path d="m20 20-3.5-3.5"></path></svg> <input id="graph-search" type="search" placeholder="Search nodes" class="h-9 w-44 select-text rounded-lg border border-slate-200 bg-white/95 pl-8 pr-3 text-sm shadow-sm outline-none backdrop-blur transition focus:border-brand-400 focus:ring-2 focus:ring-brand-500/15 sm:w-60"/></div> <div class="relative"><button type="button" aria-haspopup="menu"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4" aria-hidden="true"><path d="M3 5h18l-7 8v6l-4-2v-4z"></path></svg> <span class="hidden sm:inline">Filters</span> <span class="rounded-full bg-slate-100 px-1.5 text-[11px] font-semibold text-slate-600"> </span></button> <!></div></div> <div class="absolute bottom-3 right-3 z-10 flex flex-col overflow-hidden rounded-lg border border-slate-200 bg-white/95 shadow-sm backdrop-blur"><button type="button" aria-label="Zoom in" class="grid h-9 w-9 place-items-center text-lg font-semibold leading-none text-slate-700 transition hover:bg-slate-100">+</button> <div class="h-px bg-slate-200"></div> <button type="button" aria-label="Zoom out" class="grid h-9 w-9 place-items-center text-lg font-semibold leading-none text-slate-700 transition hover:bg-slate-100">−</button> <div class="h-px bg-slate-200"></div> <button type="button" aria-label="Fit graph to view" class="grid h-9 w-9 place-items-center text-slate-700 transition hover:bg-slate-100"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4" aria-hidden="true"><path d="M4 9V5a1 1 0 0 1 1-1h4"></path><path d="M20 9V5a1 1 0 0 0-1-1h-4"></path><path d="M4 15v4a1 1 0 0 0 1 1h4"></path><path d="M20 15v4a1 1 0 0 1-1 1h-4"></path></svg></button></div> <!></div></div> <aside class="space-y-4 p-4 lg:min-h-0 lg:overflow-y-auto"><div><h3 class="text-sm font-semibold text-slate-950">Graph Summary</h3> <div class="mt-3 grid grid-cols-2 gap-2 text-sm"><div class="rounded-md bg-slate-100 p-3"><div class="text-2xl font-semibold text-slate-950"> </div> <div class="text-xs text-slate-500">nodes</div></div> <div class="rounded-md bg-slate-100 p-3"><div class="text-2xl font-semibold text-slate-950"> </div> <div class="text-xs text-slate-500">edges</div></div></div></div> <div><h3 class="text-sm font-semibold text-slate-950">Node Types</h3> <div class="mt-2 flex flex-wrap gap-1.5"></div></div> <div><h3 class="text-sm font-semibold text-slate-950">Central Nodes</h3> <div class="mt-2 space-y-2"></div></div> <div class="rounded-md border border-slate-200 bg-slate-50 p-3"><!></div></aside></div></div></section>`);function Z(t,r){b(r,!0);let i=A(``),a=A(null),s=A(null),p=A(!1),_=A(!1),v=A(0),S=A(null),L=null,z=A(x({contains:!0,reads:!0,writes:!0,emits:!0,transitions:!0,asserts:!0,uses:!0,handles:!0})),U=A(!1),te=A(null),ne=W.length,re=T(()=>W.filter(e=>m(z)[e]).length),ae=e=>{P(z,Object.fromEntries(W.map(t=>[t,e])),!0)},G=e=>{m(U)&&m(te)&&!m(te).contains(e.target)&&P(U,!1)},ue=T(()=>r.features??(r.feature?[r.feature]:[])),q=T(()=>r.project?.name??r.feature?.name??`Behavior graph`),de=T(()=>r.project?`The whole project behavior map across ${m(ue).length} feature${m(ue).length===1?``:`s`} from the shared Unspa hub.`:`A connected map of the executable behavior model from the shared Unspa hub.`),fe=T(()=>r.project?`/projects/${r.project.id}`:r.feature?`/features/${r.feature.id}`:`/projects`),J=T(()=>r.project?`Back to project`:`Back to editor`),pe=T(()=>oe(m(ue),r.project)),Y=T(()=>se(m(pe))),X=T(()=>ce(m(Y),{search:m(i),enabledKinds:m(z)})),Z=T(()=>m(a)?m(Y).nodeById.get(m(a))??null:null),Q=T(()=>m(s)?m(X).edges.find(e=>e.id===m(s))??null:null),De=T(()=>m(Q)?m(Y).nodeById.get(m(Q).from)??null:null),Oe=T(()=>m(Q)?m(Y).nodeById.get(m(Q).to)??null:null),ke=T(()=>[...m(Y).nodes].sort((e,t)=>t.degree-e.degree).slice(0,6)),Ae=T(()=>{let e=new Map;for(let t of m(Y).nodes)e.set(t.type,(e.get(t.type)??0)+1);return e}),je=()=>{L?.render({graph:m(X),selectedId:m(a),selectedEdgeId:m(s),labelsVisible:m(p),nodeTheme:le,edgeTheme:K})},Me=e=>{P(z,{...m(z),[e]:!m(z)[e]},!0)},Ne=()=>{P(a,null),P(s,null),P(i,``),L?.fit()},Pe=e=>{P(a,e,!0),P(s,null),L?.select(e,null)};j(()=>{m(X).nodes,m(X).edges,m(p),m(a),m(s),je()}),M(()=>{let e=!1,t=()=>L?.fit();return(async()=>{let n=await H(()=>import(`./D5speDV82.js`),[],import.meta.url);e||!m(S)||(L=new me(n,m(S),{onSelectedNodeChange:e=>{P(a,e,!0)},onSelectedEdgeChange:e=>{P(s,e,!0)},onNodeActivate:e=>{let t=m(Y).nodeById.get(e);t?.href&&V(t.href)},onStabilizationProgress:e=>{P(v,e,!0)},onSettledChange:e=>{P(_,e,!0)}}),je(),window.addEventListener(`resize`,t))})(),()=>{e=!0,window.removeEventListener(`resize`,t)}}),k(()=>{L?.destroy(),L=null});var Fe=Ee();n(`mousedown`,h,G),n(`keydown`,h,e=>{e.key===`Escape`&&P(U,!1)});var Ie=g(Fe),Le=g(Ie),Re=g(Le),ze=e(g(Re));C(Re);var Be=e(Re,2),Ve=e(g(Be),2),He=g(Ve,!0);C(Ve);var Ue=e(Ve,2),We=g(Ue,!0);C(Ue),C(Be),C(Le);var $=e(Le,2),Ge=g($),Ke=g(Ge),qe=g(Ke);N(qe,e=>P(S,e),()=>m(S));var Je=e(qe,2),Ye=g(Je),Xe=e(g(Ye),4);F(Xe),C(Ye);var Ze=e(Ye,2),Qe=g(Ze),$e=e(g(Qe),4),et=g($e);C($e),C(Qe);var tt=e(Qe,2),nt=t=>{var n=_e(),r=g(n),i=e(g(r),2),a=g(i),s=e(a,2);C(i),C(r);var d=e(r,2);u(d,17,()=>W,D,(t,n)=>{let r=T(()=>m(z)[m(n)]);var i=ge(),a=g(i),s=e(a,2),u=g(s,!0);C(s);var d=e(s,2),f=e=>{l(e,he())};E(d,e=>{m(r)&&e(f)}),C(i),o(()=>{y(i,`aria-checked`,m(r)),ee(a,`background:${K[m(n)].color};opacity:${m(r)?1:.3}`),R(s,1,`flex-1 truncate ${m(r)?`text-slate-800`:`text-slate-400`}`),c(u,K[m(n)].label)}),B(`click`,i,()=>Me(m(n))),l(t,i)});var f=e(d,4),h=e(g(f),2),_=e(h,2),v=e=>{l(e,he())};E(_,e=>{m(p)&&e(v)}),C(f);var b=e(f,4),x=g(b),S=e(x,2);C(b),C(n),o(()=>{y(f,`aria-checked`,m(p)),R(h,1,`flex-1 ${m(p)?`text-slate-800`:`text-slate-600`}`)}),B(`click`,a,()=>ae(!0)),B(`click`,s,()=>ae(!1)),B(`click`,f,()=>P(p,!m(p))),B(`click`,x,()=>L?.relayout(m(X).nodes.length)),B(`click`,S,()=>{Ne(),P(U,!1)}),l(t,n)};E(tt,e=>{m(U)&&e(nt)}),C(Ze),N(Ze,e=>P(te,e),()=>m(te)),C(Je);var rt=e(Je,2),it=g(rt),at=e(it,4),ot=e(at,4);C(rt);var st=e(rt,2),ct=t=>{var n=ve(),r=g(n),i=e(g(r),2),a=g(i);C(i),C(r);var s=e(r,2),u=g(s);C(s),C(n),o(()=>{c(a,`${m(v)??``}%`),ee(u,`width:${m(v)}%`)}),l(t,n)};E(st,e=>{!m(_)&&m(v)<100&&e(ct)}),C(Ke),C(Ge);var lt=e(Ge,2),ut=g(lt),dt=e(g(ut),2),ft=g(dt),pt=g(ft),mt=g(pt,!0);C(pt),w(2),C(ft);var ht=e(ft,2),gt=g(ht),_t=g(gt,!0);C(gt),w(2),C(ht),C(dt),C(ut);var vt=e(ut,2),yt=e(g(vt),2);u(yt,21,()=>ie,D,(t,n)=>{var r=d(),i=f(r),a=t=>{var r=ye(),i=g(r),a=e(i);C(r),o(e=>{ee(i,`background:${le[m(n)].fill}`),c(a,` ${le[m(n)].label??``} ${e??``}`)},[()=>m(Ae).get(m(n))]),l(t,r)},s=T(()=>m(Ae).get(m(n)));E(i,e=>{m(s)&&e(a)}),l(t,r)}),C(yt),C(vt);var bt=e(vt,2),xt=e(g(bt),2);u(xt,21,()=>m(ke),D,(t,n)=>{var r=be(),i=g(r),a=g(i,!0);C(i);var s=e(i,2),u=g(s);C(s),C(r),o(()=>{c(a,m(n).label),c(u,`${le[m(n).type].label??``} / ${m(n).degree??``} links`)}),B(`click`,r,()=>Pe(m(n).id)),l(t,r)}),C(xt),C(bt);var St=e(bt,2),Ct=g(St),wt=t=>{var n=Ce(),r=f(n),i=g(r,!0);C(r);var a=e(r,2),s=g(a,!0);C(a);var u=e(a,2),d=e=>{var t=xe(),n=g(t,!0);C(t),o(()=>c(n,m(Z).detail)),l(e,t)};E(u,e=>{m(Z).detail&&e(d)});var p=e(u,2),h=g(p);C(p);var _=e(p,2),v=e=>{var t=Se();o(()=>y(t,`href`,m(Z).href)),l(e,t)};E(_,e=>{m(Z).href&&e(v)}),o(()=>{c(i,le[m(Z).type].label),c(s,m(Z).label),c(h,`${m(Z).degree??``} graph links`)}),l(t,n)},Tt=t=>{var n=we(),r=f(n),i=g(r,!0);C(r);var a=e(r,2),s=g(a,!0);C(a);var u=e(a,2),d=g(u);C(u),w(2),o(()=>{c(i,K[m(Q).kind].label),c(s,m(Q).label??`Behavior link`),c(d,`${m(De)?.label??m(Q).from??``} -> ${m(Oe)?.label??m(Q).to??``}`)}),l(t,n)},Et=e=>{var t=Te();w(2),l(e,t)};E(Ct,e=>{m(Z)?e(wt):m(Q)?e(Tt,1):e(Et,-1)}),C(St),C(lt),C($),C(Ie),C(Fe),o(()=>{y(Re,`href`,m(fe)),c(ze,` ${m(J)??``}`),c(He,m(q)),c(We,m(de)),y(qe,`aria-label`,`Interactive behavior graph for ${m(q)}`),y(Qe,`aria-expanded`,m(U)),R(Qe,1,`flex h-9 items-center gap-1.5 rounded-lg border bg-white/95 px-2.5 text-sm font-medium shadow-sm backdrop-blur transition ${m(U)?`border-brand-400 text-slate-900`:`border-slate-200 text-slate-700 hover:bg-white`}`),c(et,`${m(re)??``}/${ne??``}`),c(mt,m(Y).nodes.length),c(_t,m(Y).edges.length)}),O(Xe,()=>m(i),e=>P(i,e)),B(`click`,Qe,()=>P(U,!m(U))),B(`click`,it,()=>L?.zoomBy(1.38)),B(`click`,at,()=>L?.zoomBy(.72)),B(`click`,ot,()=>L?.fit()),l(t,Fe),I()}p([`click`]);var Q=e=>e.format===`statechart`?e.edges.length>0:e.nodes.length>0,De=({features:e})=>{let t=e.some(e=>e.surfaces.some(e=>e.transitions.length>0||e.actions.some(e=>e.transitions.length>0||[...e.effects,...e.onBlockedEffects??[]].some(e=>e.type===`transition_surface`)))),n=e.some(e=>e.entities.length>0);return{loaded:e.length>0,hasTransitions:t,hasEntities:n}},Oe=({features:e,project:t})=>{let n=oe(e,t);return{format:`graph`,title:t?.name??e[0]?.name??`Behavior graph`,nodes:n.nodes.map(e=>({id:e.id,label:e.label,kind:e.type})),edges:n.edges.map(e=>({from:e.from,to:e.to,label:e.kind}))}},ke=class{byFormat=new Map;constructor(e=[]){for(let t of e)this.register(t)}register(e){this.byFormat.set(e.format,e)}get(e){return this.byFormat.get(e)}has(e){return this.byFormat.has(e)}list(){return[...this.byFormat.values()]}},Ae={format:`er`,label:`ER diagram`,supportsText:!0,project({features:e,project:t}){let n=[],r=new Set;for(let t of e){let e=String(t.id);for(let i of t.entities){let t=`${e}::entity::${String(i.id)}`;r.has(t)||(r.add(t),n.push({id:t,label:i.namespace,kind:`entity`,fields:i.fields.map(e=>({name:e.name,type:String(e.type)}))}))}}return{format:`er`,title:t?.name??e[0]?.name??`ER diagram`,nodes:n,edges:[]}}},je=e=>`feature::${e}`,Me=(e,t)=>`${e}::surface::${t}`,Ne=(e,t)=>`${e}::action::${t}`,Pe={format:`flowchart`,label:`Flowchart`,supportsText:!0,project({features:e,project:t}){let n=[],r=[],i=new Set,a=e=>{i.has(e.id)||(i.add(e.id),n.push(e))};for(let t of e){let e=String(t.id),n=je(e);a({id:n,label:t.name,kind:`feature`});for(let i of t.surfaces){let t=Me(e,String(i.id));a({id:t,label:i.name,kind:`surface`}),r.push({from:n,to:t});for(let n of re(i.actions)){let i=Ne(e,String(n.id));a({id:i,label:n.name,kind:`action`}),r.push({from:t,to:i});for(let t of[...n.effects,...n.onBlockedEffects??[]])t.type===`transition_surface`&&r.push({from:i,to:Me(e,String(t.target)),label:`go to`})}}}let o=r.filter(e=>i.has(e.from)&&i.has(e.to));return{format:`flowchart`,title:t?.name??e[0]?.name??`Flowchart`,nodes:n,edges:o}}},Fe=(e,t)=>`${e}::surface::${t}`,Ie=(e,t)=>`${e}::action::${t}`,Le={format:`mindmap`,label:`Mindmap`,supportsText:!0,project({features:e,project:t}){let n=[],r=[],i=new Set,a=e=>{i.has(e.id)||(i.add(e.id),n.push(e))},o=t?.name??e[0]?.name??`Model`,s=t?`project::${String(t.id)}`:`feature::${String(e[0]?.id??`root`)}`;a({id:s,label:o,kind:`root`});for(let n of e){let e=String(n.id),i=s;if(t){let t=`feature::${e}`;a({id:t,label:n.name,kind:`feature`}),r.push({from:s,to:t}),i=t}for(let t of n.surfaces){let n=Fe(e,String(t.id));a({id:n,label:t.name,kind:`surface`}),r.push({from:i,to:n});for(let i of re(t.actions)){let t=Ie(e,String(i.id));a({id:t,label:i.name,kind:`action`}),r.push({from:n,to:t})}}}return{format:`mindmap`,title:o,nodes:n,edges:r}}},Re=(e,t)=>`${e}::action::${t}`,ze={format:`sequence`,label:`Sequence`,supportsText:!0,project({features:e,project:t}){let n=[],r=[],i=new Set,a=e=>{i.has(e.id)||(i.add(e.id),n.push(e))};for(let t of e){let e=String(t.id),n=new Map,i=[];for(let r of t.surfaces)for(let t of re(r.actions)){let r=Re(e,String(t.id));if(t.triggeredByEvent){let e=String(t.triggeredByEvent),i=n.get(e)??[];i.push({id:r,name:t.name}),n.set(e,i)}for(let e of t.emittedEvents)i.push({id:r,name:t.name,event:String(e)})}for(let e of i)for(let t of n.get(e.event)??[])a({id:e.id,label:e.name,kind:`action`}),a({id:t.id,label:t.name,kind:`action`}),r.push({from:e.id,to:t.id,label:e.event})}return{format:`sequence`,title:t?.name??e[0]?.name??`Sequence`,nodes:n,edges:r}}},Be=(e,t)=>`${e}::${t}`,Ve={format:`statechart`,label:`Statechart`,supportsText:!0,project({features:e,project:t}){let n=[],r=new Set;for(let t of e){let e=String(t.id);for(let i of t.surfaces){let t=Be(e,String(i.id));r.has(t)||(r.add(t),n.push({id:t,label:i.name,kind:i.type}))}}let i=[],a=(e,t,n,a)=>{let o=Be(e,t),s=Be(e,n);!r.has(o)||!r.has(s)||i.push({from:o,to:s,label:a})};for(let t of e){let e=String(t.id);for(let n of t.surfaces){let t=String(n.id);for(let r of n.transitions)a(e,t,String(r.target),r.label);for(let r of n.actions){for(let n of r.transitions)a(e,t,String(n.target),n.label??r.name);for(let n of[...r.effects,...r.onBlockedEffects??[]])n.type===`transition_surface`&&a(e,t,String(n.target),r.name)}}}return{format:`statechart`,title:t?.name??e[0]?.name??`Statechart`,nodes:n,edges:i}}},He=e=>e.replace(/[\r\n]+/g,` `).replace(/"/g,`\\"`).trim(),Ue=e=>e.fields?.length?`${e.label} (${e.fields.map(e=>e.name).join(`, `)})`:e.label,We={id:`dot`,label:`Graphviz DOT`,export(e){let t=new Map;e.nodes.forEach((e,n)=>t.set(e.id,`n${n}`));let n=[`digraph "${He(e.title)}" {`,` rankdir=LR;`];for(let r of e.nodes)n.push(` ${t.get(r.id)} [label="${He(Ue(r))}"];`);for(let r of e.edges){let e=t.get(r.from),i=t.get(r.to);if(!e||!i)continue;let a=r.label?` [label="${He(r.label)}"]`:``;n.push(` ${e} -> ${i}${a};`)}return n.push(`}`),n.join(`
|
|
4
4
|
`)}},$=e=>e.replace(/[\r\n]+/g,` `).replace(/["]/g,``).replace(/:/g,` `).trim(),Ge=e=>$(e).replace(/[()[\]{}]/g,` `).replace(/\s+/g,` `).trim(),Ke=(e,t)=>{let n=e.replace(/[^A-Za-z0-9_-]+/g,`_`).replace(/^_+|_+$/g,``);return/^[A-Za-z]/.test(n)?n:n?`x${n}`:t},qe=e=>{let t=new Map;return e.nodes.forEach((e,n)=>t.set(e.id,`s${n}`)),t},Je=e=>{let t=qe(e),n=[`stateDiagram-v2`];e.title&&n.push(` %% ${$(e.title)}`);for(let r of e.nodes)n.push(` state "${$(r.label)}" as ${t.get(r.id)}`);for(let r of e.edges){let e=t.get(r.from),i=t.get(r.to);!e||!i||n.push(r.label?` ${e} --> ${i} : ${$(r.label)}`:` ${e} --> ${i}`)}return n.join(`
|
|
5
5
|
`)},Ye=e=>{let t=qe(e),n=[`sequenceDiagram`,` autonumber`];for(let r of e.nodes)n.push(` participant ${t.get(r.id)} as ${$(r.label)}`);for(let r of e.edges){let e=t.get(r.from),i=t.get(r.to);!e||!i||n.push(` ${e}->>${i}: ${$(r.label??`event`)}`)}return n.join(`
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./CYsLq4VE.js";import{c as e,o as t}from"./
|
|
1
|
+
import"./CYsLq4VE.js";import{c as e,o as t}from"./AIVrTpgC.js";var n={get data(){return e.data},get error(){return e.error},get form(){return e.form},get params(){return e.params},get route(){return e.route},get state(){return e.state},get status(){return e.status},get url(){return e.url}};t.updated.check;var r=n;export{r as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as e,F as t,K as n,M as r,N as i,O as a,P as o,Q as s,R as c,V as l,Z as u,a as d,d as f,dt as p,gt as m,it as h,j as g,ut as _,vt as v,y,z as b}from"./CYsLq4VE.js";import"./xihTtKlq.js";import{t as x}from"./
|
|
1
|
+
import{$ as e,F as t,K as n,M as r,N as i,O as a,P as o,Q as s,R as c,V as l,Z as u,a as d,d as f,dt as p,gt as m,it as h,j as g,ut as _,vt as v,y,z as b}from"./CYsLq4VE.js";import"./xihTtKlq.js";import{t as x}from"./ClSw9AyG.js";import{$ as S,C,J as w}from"./PGh5ehlS.js";import{o as T,r as E}from"./Cuj9IeTJ.js";var D=e=>e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1),O=e=>{let t=e.split(`.`);return t.length<=1?e:t[t.length-1]},k=e=>{let t=new Map;for(let n of e.surfaces)for(let e of n.stateDefinitions){let r=e.path.split(`.`)[0]??e.path,i=t.get(r);i||(i={fields:new Map,surfaces:new Set},t.set(r,i)),i.fields.has(e.path)||i.fields.set(e.path,{name:O(e.path),path:e.path,type:e.type,source:`deduced`}),i.surfaces.add(n.name)}let n=new Map;for(let t of e.entities)n.set(t.namespace,t);let r=new Set([...t.keys(),...n.keys()]),i=[];for(let e of r){let r=n.get(e),a=t.get(e),o=new Map;if(a)for(let[e,t]of a.fields)o.set(e,t);if(r)for(let e of r.fields)e.path&&o.set(String(e.path),{id:e.id,name:e.name,path:e.path,type:e.type,source:`declared`,fields:e.fields,items:e.items});let s=Array.from(o.values()).sort((e,t)=>e.path.localeCompare(t.path));i.push({id:r?.id,name:D(C(e)),namespace:e,description:r?.description,resourceId:r?.resourceId,fields:s,isMaterialized:r!==void 0,usedBySurfaces:a?Array.from(a.surfaces).sort():[]})}return i.sort((e,t)=>e.namespace.localeCompare(t.namespace)),i},A=(e,t)=>e.fields.map(e=>({id:e.id??t(),name:e.name,path:e.path,type:e.type,fields:e.fields,items:e.items})),j=t(`<button type="button"><span class="truncate"> </span> <span> </span></button>`),M=t(`<p> </p>`),N=t(`<!> <!>`,1),P=t(`<aside><div class="border-b border-slate-200 px-4 py-4"><p class="text-[10px] font-semibold uppercase tracking-[0.16em] text-violet-600"> </p> <p class="mt-1 truncate text-sm font-semibold text-slate-900"> </p></div> <div class="px-2 pt-2"><a class="flex min-h-9 items-center gap-2 rounded-xl px-3 text-sm font-medium text-slate-500 transition hover:bg-slate-100 hover:text-slate-900"><svg viewBox="0 0 24 24" class="size-4 shrink-0" aria-hidden="true"><path d="M15 18l-6-6 6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg> <span class="truncate"> </span></a></div> <nav class="min-h-0 flex-1 space-y-0.5 overflow-y-auto px-2 py-2"></nav></aside>`);function F(t,o){p(o,!0);let c=(t,a=v)=>{let s=h(()=>o.activeId===a().id);var c=j(),d=u(c),p=u(d,!0);m(d);var g=e(d,2),_=u(g,!0);m(g),m(c),n(e=>{f(c,`aria-current`,l(s)?`page`:void 0),y(c,1,`flex min-h-9 w-full items-center justify-between gap-3 rounded-xl px-3 text-left text-[13px] font-medium transition-colors ${l(s)?`bg-violet-100 font-semibold text-violet-700`:`text-slate-600 hover:bg-slate-100 hover:text-slate-900`}`),r(p,a().label),y(g,1,`min-w-6 rounded-full px-1.5 py-0.5 text-center text-[10px] font-semibold tabular-nums ${l(s)?`bg-violet-200 text-violet-700`:`bg-slate-100 text-slate-500`}`),r(_,e)},[()=>o.count(a().id)??`–`]),b(`click`,c,()=>o.onSelect(a().id)),i(t,c)},d=h(()=>x.url.searchParams.get(`embed`)===`1`),S=h(()=>o.groups??[{label:``,items:o.items??[]}]);var C=P(),w=u(C),T=u(w),E=u(T,!0);m(T);var D=e(T,2),O=u(D,!0);m(D),m(w);var k=e(w,2),A=u(k),F=e(u(A),2),I=u(F,!0);m(F),m(A),m(k);var L=e(k,2);a(L,23,()=>l(S),(e,t)=>e.label+`-`+t,(t,o,d)=>{var f=N(),p=s(f),h=e=>{var t=M(),a=u(t,!0);m(t),n(()=>{y(t,1,`px-3 pb-1 text-[10px] font-semibold uppercase tracking-[0.14em] text-slate-400 ${l(d)===0?`pt-1`:`pt-3`}`),r(a,l(o).label)}),i(e,t)};g(p,e=>{l(o).label&&e(h)}),a(e(p,2),17,()=>l(o).items,e=>e.id,(e,t)=>{c(e,()=>l(t))}),i(t,f)}),m(L),m(C),n(()=>{y(C,1,`sticky z-20 m-4 flex w-60 shrink-0 flex-col self-start overflow-hidden rounded-2xl border border-slate-200 bg-white text-slate-700 shadow-[0_12px_28px_-10px_rgba(15,23,42,0.18)] ${l(d)?`top-4 max-h-[calc(100vh-2rem)]`:`top-20 max-h-[calc(100vh-7rem)]`}`),r(E,o.contextLabel),f(D,`title`,o.contextName),r(O,o.contextName),f(A,`href`,o.backHref),f(A,`title`,o.backLabel),r(I,o.backLabel),f(L,`aria-label`,`${o.contextLabel} sections`)}),i(t,C),_()}c([`click`]);var I=t(`<p class="rounded-lg border border-dashed border-hairline bg-white p-6 text-center text-sm text-slate-500"> </p>`),L=t(`<span class="rounded bg-slate-100 px-1.5 py-0.5 text-[10px] text-slate-600"> </span>`),R=t(`<p class="mt-0.5 max-w-2xl text-xs text-slate-500"> </p>`),z=t(`<p class="mt-0.5 text-xs text-amber-600">Type differs between surfaces. Consider aligning them.</p>`),B=t(`<tr class="border-t border-slate-100 align-top"><td class="px-3 py-2 text-xs text-slate-600"><a class="text-brand-700 hover:underline"> </a> <div> </div></td><td class="px-3 py-2 text-xs text-slate-600"><div> </div> <div class="mt-0.5 font-mono text-slate-500"> </div></td><td class="px-3 py-2 text-xs text-slate-600"> </td></tr>`),V=t(`<div class="overflow-hidden rounded-lg border border-hairline bg-white"><div class="border-b border-slate-100 bg-slate-50 px-3 py-2"><div class="flex flex-wrap items-center gap-2"><span class="font-mono font-medium text-slate-800"> </span> <!> <span class="rounded-full bg-brand-50 px-2 py-0.5 text-xs font-medium text-brand-700" title="Surfaces that define this state"> </span></div> <!> <!></div> <div class="overflow-x-auto"><table class="w-full text-sm"><thead class="text-left text-xs uppercase tracking-wide text-slate-400"><tr><th class="px-3 py-1.5 font-medium">Feature / surface</th><th class="px-3 py-1.5 font-medium">Type / default</th><th class="px-3 py-1.5 font-medium">Sharing</th></tr></thead><tbody></tbody></table></div></div>`),H=t(`<p class="mb-2 text-xs text-slate-500"> </p> <div class="space-y-3"></div>`,1);function U(t,c){p(c,!0);let v=d(c,`search`,3,``),y=h(()=>c.features.flatMap(e=>e.surfaces.flatMap(t=>t.stateDefinitions.map(n=>({feature:e,surface:t,definition:n}))))),b=h(()=>{let e=v().trim().toLowerCase();return e?l(y).filter(({feature:t,surface:n,definition:r})=>[t.name,n.name,String(r.path),r.type,r.description??``].some(t=>t.toLowerCase().includes(e))):l(y)}),x=h(()=>{let e=new Map;for(let t of l(b)){let n=String(t.definition.path),r=e.get(n);r||(r={key:n,path:n,type:t.definition.type,typesVary:!1,description:``,rows:[]},e.set(n,r)),t.definition.type!==r.type&&(r.typesVary=!0);let i=t.definition.description?.trim()??``;i&&!r.description&&(r.description=i),r.rows.push(t)}return[...e.values()].sort((e,t)=>e.path.localeCompare(t.path,void 0,{sensitivity:`base`}))});var S=o(),C=s(S),w=e=>{var t=I(),a=u(t,!0);m(t),n(()=>r(a,l(y).length===0?`No states defined.`:`No states match your search.`)),i(e,t)},D=t=>{var o=H(),c=s(o),d=u(c);m(c);var p=e(c,2);a(p,21,()=>l(x),e=>e.key,(t,o)=>{var s=V(),c=u(s),d=u(c),p=u(d),h=u(p,!0);m(p);var _=e(p,2),v=e=>{var t=L(),a=u(t,!0);m(t),n(()=>r(a,l(o).type)),i(e,t)};g(_,e=>{l(o).typesVary||e(v)});var y=e(_,2),b=u(y);m(y),m(d);var x=e(d,2),S=e=>{var t=R(),a=u(t,!0);m(t),n(()=>r(a,l(o).description)),i(e,t)};g(x,e=>{l(o).description&&e(S)});var C=e(x,2),w=e=>{i(e,z())};g(C,e=>{l(o).typesVary&&e(w)}),m(c);var D=e(c,2),O=u(D),k=e(u(O));a(k,21,()=>l(o).rows,e=>`${e.feature.id}:${e.surface.id}:${e.definition.id}`,(t,a)=>{var o=B(),s=u(o),c=u(s),d=u(c,!0);m(c);var p=e(c,2),h=u(p,!0);m(p),m(s);var g=e(s),_=u(g),v=u(_);m(_);var y=e(_,2),b=u(y,!0);m(y),m(g);var x=e(g),S=u(x);m(x),m(o),n((e,t)=>{f(c,`href`,e),r(d,l(a).feature.name),r(h,l(a).surface.name),r(v,`${l(a).definition.type??``}${l(a).definition.derived?` · derived`:``}`),r(b,t),r(S,`${l(a).definition.sharedWith?.length??0??``} other surface(s)`)},[()=>E(String(l(a).feature.id),{surface:String(l(a).surface.id),panel:`state`,focus:T(String(l(a).surface.id),`state`)}),()=>JSON.stringify(l(a).definition.defaultValue)]),i(t,o)}),m(k),m(O),m(D),m(s),n(()=>{r(h,l(o).path),r(b,`${l(o).rows.length??``}
|
|
2
2
|
${l(o).rows.length===1?`definition`:`definitions`}`)}),i(t,s)}),m(p),n(()=>r(d,`${l(x).length??``}
|
|
3
3
|
${l(x).length===1?`state`:`states`} across ${l(b).length??``}
|
|
4
4
|
${l(b).length===1?`definition`:`definitions`}`)),i(t,o)};g(C,e=>{l(x).length===0?e(w):e(D,-1)}),i(t,S),_()}var W=t(`<p class="rounded-lg border border-dashed border-hairline bg-white p-6 text-center text-sm text-slate-500"> </p>`),G=t(`<span class="rounded bg-slate-100 px-1.5 py-0.5 text-[10px] text-slate-600"> </span>`),K=t(`<p class="mt-0.5 text-xs text-amber-600">Category differs between surfaces.</p>`),q=t(`<tr class="border-t border-slate-100 align-top"><td class="px-3 py-2 text-xs text-slate-600"><a class="text-brand-700 hover:underline"> </a> <div> </div></td><td class="px-3 py-2 text-xs text-slate-600"> </td><td class="px-3 py-2 text-xs text-slate-600"> </td><td class="px-3 py-2 text-xs text-slate-600"> </td></tr>`),J=t(`<div class="overflow-hidden rounded-lg border border-hairline bg-white"><div class="border-b border-slate-100 bg-slate-50 px-3 py-2"><div class="flex flex-wrap items-center gap-2"><span class="font-medium text-slate-800"> </span> <!> <span class="rounded-full bg-brand-50 px-2 py-0.5 text-xs font-medium text-brand-700" title="Surfaces that define this rule"> </span></div> <!></div> <div class="overflow-x-auto"><table class="w-full text-sm"><thead class="text-left text-xs uppercase tracking-wide text-slate-400"><tr><th class="px-3 py-1.5 font-medium">Feature / surface</th><th class="px-3 py-1.5 font-medium">Category</th><th class="px-3 py-1.5 font-medium">Effect</th><th class="px-3 py-1.5 font-medium">When</th></tr></thead><tbody></tbody></table></div></div>`),Y=t(`<p class="mb-2 text-xs text-slate-500"> </p> <div class="space-y-3"></div>`,1);function X(t,c){p(c,!0);let v=d(c,`search`,3,``),y=e=>e.description?.trim()||`${w(e.category)} rule`,b=h(()=>c.features.flatMap(e=>e.surfaces.flatMap(t=>t.rules.map(n=>({feature:e,surface:t,rule:n}))))),x=h(()=>{let e=v().trim().toLowerCase();return e?l(b).filter(({feature:t,surface:n,rule:r})=>[t.name,n.name,r.description??``,w(r.category),S(r.effect.type)].some(t=>t.toLowerCase().includes(e))):l(b)}),C=h(()=>{let e=new Map;for(let t of l(x)){let n=y(t.rule),r=e.get(n);r||(r={key:n,name:n,category:t.rule.category,categoriesVary:!1,rows:[]},e.set(n,r)),t.rule.category!==r.category&&(r.categoriesVary=!0),r.rows.push(t)}for(let t of e.values())t.rows.sort((e,t)=>e.feature.name.localeCompare(t.feature.name,void 0,{sensitivity:`base`})||e.surface.name.localeCompare(t.surface.name,void 0,{sensitivity:`base`}));return[...e.values()].sort((e,t)=>e.name.localeCompare(t.name,void 0,{sensitivity:`base`}))});var D=o(),O=s(D),k=e=>{var t=W(),a=u(t,!0);m(t),n(()=>r(a,l(b).length===0?`No surface rules defined.`:`No surface rules match your search.`)),i(e,t)},A=t=>{var o=Y(),c=s(o),d=u(c);m(c);var p=e(c,2);a(p,21,()=>l(C),e=>e.key,(t,o)=>{var s=J(),c=u(s),d=u(c),p=u(d),h=u(p,!0);m(p);var _=e(p,2),v=e=>{var t=G(),a=u(t,!0);m(t),n(e=>r(a,e),[()=>w(l(o).category)]),i(e,t)};g(_,e=>{l(o).categoriesVary||e(v)});var y=e(_,2),b=u(y);m(y),m(d);var x=e(d,2),C=e=>{i(e,K())};g(x,e=>{l(o).categoriesVary&&e(C)}),m(c);var D=e(c,2),O=u(D),k=e(u(O));a(k,21,()=>l(o).rows,e=>`${e.feature.id}:${e.surface.id}:${e.rule.id}`,(t,a)=>{var o=q(),s=u(o),c=u(s),d=u(c,!0);m(c);var p=e(c,2),h=u(p,!0);m(p),m(s);var g=e(s),_=u(g,!0);m(g);var v=e(g),y=u(v,!0);m(v);var b=e(v),x=u(b,!0);m(b),m(o),n((e,t,n)=>{f(c,`href`,e),r(d,l(a).feature.name),r(h,l(a).surface.name),r(_,t),r(y,n),r(x,l(a).rule.condition?`Conditional`:`Always runs`)},[()=>E(String(l(a).feature.id),{surface:String(l(a).surface.id),panel:`rules`,focus:T(String(l(a).surface.id),`rules`)}),()=>w(l(a).rule.category),()=>S(l(a).rule.effect.type)]),i(t,o)}),m(k),m(O),m(D),m(s),n(()=>{r(h,l(o).name),r(b,`${l(o).rows.length??``}
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./
|
|
1
|
+
import{r as e}from"./AIVrTpgC.js";import"./BiDFtKe6.js";import{Ft as t,Lt as n,Tt as r}from"./PGh5ehlS.js";import{t as i}from"./niJ1Cp3-.js";import{t as a}from"./Dp-pCjOt.js";import{t as o}from"./CGWhvtMz.js";import{t as s}from"./BQ9GodWX.js";var c=e=>t=>typeof t?.name==`string`&&i(t.name,e),l=()=>{let e=a.feature;if(!e)return null;for(let t=e.surfaces.length-1;t>=0;t--){let n=e.surfaces[t];if(n&&n.actions.length!==0)return n.actions[n.actions.length-1]??null}return null},u=()=>{let e=l();return e?e.parameters.some(e=>i(e.name,`politely`)&&e.type===`boolean`):!1},d=()=>{let e=l();return e?e.rules.filter(e=>!e.condition||`kind`in e.condition?!1:r(e.condition.left)&&e.effect.type===`show_message`).length:0},f={id:`first-feature`,name:`Build your first feature, end to end`,summary:`Walks you from an empty app to a Feature with one Action you run in the simulator. About 3 minutes. Uses fixed names so the experience is the same for everyone.`,steps:[{id:`welcome`,title:`Welcome`,body:`We'll build a tiny Feature together and run it in the simulator. We'll use fixed names so the rest of the tutorial reads the same way for you as for anyone else. Click Next when you're ready.`,advance:{kind:`manual`}},{id:`new-project`,title:`Create a project`,body:`Click 'New project'. A Project groups Features that belong to the same product or codebase.`,target:`[data-tour="new-project-button"]`,route:{pathname:`/projects`,label:`Go to Projects`},advance:{kind:`click`,selector:`[data-tour="new-project-button"]`}},{id:`fill-project`,title:`Name the project`,body:`Type exactly 'Hello World' in the Name field, then click 'New project'. The description is pre-filled - keep it as-is or tweak if you want.`,target:`[data-tour="new-project-form"]`,focusSelector:`[data-tour="new-project-form"] input[type="text"]`,prefill:[{selector:`[data-tour="new-project-description"]`,value:`A first project to learn Unspaghettit.`}],requireExact:{formId:`new-project`,value:`Hello World`},advance:{kind:`event`,event:`project.created`,match:c(`Hello World`)}},{id:`new-feature`,title:`Create a feature`,body:`Inside your project, click 'New feature'. A Feature is one coherent slice of behavior. Keep it small.`,target:`[data-tour="new-feature-button"]`,advance:{kind:`click`,selector:`[data-tour="new-feature-button"]`}},{id:`fill-feature`,title:`Name the feature`,body:`Type 'Greeting' in the Name field, then click 'Create feature'. The description is pre-filled.`,target:`[data-tour="new-feature-form"]`,focusSelector:`[data-tour="new-feature-form"] input[type="text"]`,prefill:[{selector:`[data-tour="new-feature-description"]`,value:`User opens the app and is welcomed.`}],requireExact:{formId:`new-feature`,value:`Greeting`},advance:{kind:`event`,event:`feature.created`,match:c(`Greeting`)}},{id:`add-surface`,title:`Add a surface`,body:`Click 'Add surface'. A Surface is one context where actions happen (a screen, a terminal, a workflow).`,target:`[data-tour="add-surface-button"]`,advance:{kind:`click`,selector:`[data-tour="add-surface-button"]`}},{id:`chooser-create-new`,title:`Pick "Create new"`,body:`We're starting from scratch, so click the 'Create new' card.`,target:`[data-tour="chooser-create-new"]`,advance:{kind:`click`,selector:`[data-tour="chooser-create-new"]`}},{id:`fill-surface`,title:`Name the surface`,body:`Surface name: type exactly 'Welcome Screen'. Keep the type on Screen. Click 'Create surface' to submit.`,target:`[data-tour="blank-surface-form"]`,focusSelector:`[data-tour="blank-surface-form"] input[type="text"]`,requireExact:{formId:`blank-surface`,value:`Welcome Screen`},advance:{kind:`event`,event:`editor.surface.added`,match:c(`Welcome Screen`)}},{id:`add-action`,title:`Add an action`,body:`Type exactly 'Say Hello' in the action form, then click 'Add action' (or press Enter). An Action is something the user or system can do on this surface.`,target:`[data-tour="add-action-form"]`,focusSelector:`[data-tour="add-action-form"] input[type="text"]`,requireExact:{formId:`add-action`,value:`Say Hello`},advance:{kind:`event`,event:`editor.action.added`,match:c(`Say Hello`)}},{id:`add-parameter`,title:`Give the action a parameter`,body:`The Say Hello editor just opened. In the Parameters section, click '+ Parameter'. The name field will focus automatically. Then:
|
|
2
2
|
1. type 'politely' for the Name
|
|
3
3
|
2. change Type to 'boolean'
|
|
4
4
|
Next unlocks once a 'politely' boolean parameter exists on Say Hello.`,target:`[data-tour="action-parameters-section"]`,advance:{kind:`manual`},canAdvance:u},{id:`add-rule-not-polite`,title:`Rule 1: the casual hello`,body:`We want the action to say 'Hi.' only when politely is NO. Add the first rule:
|
|
Binary file
|
|
Binary file
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{$ as e,B as t,F as n,K as r,L as i,M as a,N as o,O as s,Q as c,R as l,U as u,V as d,X as f,Z as p,a as m,d as h,dt as g,gt as _,h as v,ht as y,it as b,j as x,l as S,m as C,n as w,nt as T,q as E,r as D,s as O,tt as k,u as A,ut as j,vt as M,y as N,z as P}from"./CYsLq4VE.js";import{r as F}from"./
|
|
1
|
+
import{$ as e,B as t,F as n,K as r,L as i,M as a,N as o,O as s,Q as c,R as l,U as u,V as d,X as f,Z as p,a as m,d as h,dt as g,gt as _,h as v,ht as y,it as b,j as x,l as S,m as C,n as w,nt as T,q as E,r as D,s as O,tt as k,u as A,ut as j,vt as M,y as N,z as P}from"./CYsLq4VE.js";import{r as F}from"./AIVrTpgC.js";import"./xihTtKlq.js";import"./BiDFtKe6.js";import{Bt as ee,Ft as I,I as te,It as ne,L as re,Rt as ie,V as L,t as R,z as ae}from"./PGh5ehlS.js";import{t as oe}from"./BcjkusYG.js";import{n as se}from"./niJ1Cp3-.js";import{n as ce,t as le}from"./DNgDuvXX.js";import{n as z,t as ue}from"./CGWhvtMz.js";import{t as de}from"./EZgceN_E.js";import{t as fe}from"./CT4vNU442.js";import{a as pe,c as B,i as me,l as he,n as ge,o as _e,r as ve,s as ye,t as be}from"./1qwcT7H12.js";import{t as V}from"./C0MTuC4u2.js";import{t as xe}from"./Txy2b5lN2.js";import{t as Se}from"./D9sGVI572.js";var Ce=n(`<p class="line-clamp-3 text-sm leading-6 text-slate-600"> </p>`),H=n(`<p class="text-sm leading-6 text-slate-500">No description yet. Add a note so collaborators know what belongs here.</p>`),U=n(`<span aria-hidden="true">⬇</span> Export .unspa`,1),we=n(`<!> <!>`,1),Te=n(`<article data-tour="project-card" class="group relative flex h-full min-h-52 flex-col justify-between overflow-hidden rounded-xl border border-cyan-100 bg-white p-5 shadow-sm shadow-cyan-950/5 transition duration-150 hover:-translate-y-0.5 hover:border-cyan-200 hover:bg-cyan-50/20 hover:shadow-md hover:shadow-cyan-950/10 focus-within:border-cyan-300"><div class="absolute inset-x-0 top-0 h-1 bg-linear-to-r from-brand-500 via-brand-mint to-violet-400"></div> <div class="space-y-3"><div class="flex items-start justify-between gap-3"><a class="block min-w-0 flex-1 after:absolute after:inset-0"><h3 class="truncate text-base font-semibold text-slate-950 group-hover:text-brand-800"> </h3></a> <span class="relative z-10 shrink-0 rounded-md border border-cyan-100 bg-cyan-50 px-2 py-0.5 text-xs font-medium text-brand-800" title="Features in project"> </span></div> <!></div> <div class="mt-5 flex items-end justify-between gap-3 border-t border-hairline pt-3 text-xs text-slate-500"><div class="min-w-0 flex-1 space-y-2"><div class="relative z-10"><!></div> <span class="block truncate"> </span></div> <div class="relative z-10 flex shrink-0 items-center gap-1"><!></div></div></article>`);function Ee(t,n){g(n,!0);let s=m(n,`tagTypeOptions`,19,()=>[]),l=m(n,`deleteLabel`,3,`Delete`);function u(){z.openProject(String(n.summary.id))}var d=Te(),f=e(p(d),2),v=p(f),b=p(v),S=p(b),C=p(S,!0);_(S),_(b);var w=e(b,2),T=p(w);_(w),_(v);var E=e(v,2),D=e=>{var t=Ce(),i=p(t,!0);_(t),r(()=>a(i,n.summary.description)),o(e,t)},O=e=>{o(e,H())};x(E,e=>{n.summary.description?e(D):e(O,-1)}),_(f);var k=e(f,2),A=p(k),N=p(A);fe(p(N),{get tags(){return n.summary.tags},get onAddTag(){return n.onAddTag},get onRemoveTag(){return n.onRemoveTag},get typeOptions(){return s()}}),_(N);var F=e(N,2),ee=p(F);_(F),_(A);var I=e(A,2);he(p(I),{placement:`up`,align:`right`,label:`Project actions`,children:(t,s=M)=>{var u=we(),d=c(u);B(d,{onclick:()=>{s()(),n.onExport()},children:(e,t)=>{var n=U();y(),o(e,n)},$$slots:{default:!0}}),B(e(d,2),{danger:!0,onclick:()=>{s()(),n.onDelete()},children:(e,t)=>{y();var n=i();r(()=>a(n,l())),o(e,n)},$$slots:{default:!0}}),o(t,u)},$$slots:{default:!0}}),_(I),_(k),_(d),r(e=>{h(b,`href`,`/projects/${n.summary.id}`),a(C,n.summary.name),a(T,`${n.summary.featureCount??``} feature${n.summary.featureCount===1?``:`s`}`),a(ee,`Updated ${e??``}`)},[()=>new Date(n.summary.updatedAt).toLocaleDateString()]),P(`click`,b,u),o(t,d),j()}l([`click`]);var W=n(`<form data-tour="new-project-form" class="grid gap-3 rounded-xl border border-cyan-100 bg-cyan-50/40 p-4 md:grid-cols-[1fr_1.6fr_auto] md:items-end"><div><label for="proj-name" class="mb-1.5 block text-xs font-medium text-slate-700">Project name</label> <input id="proj-name" type="text" placeholder="e.g. Acme Platform" class="h-10 w-full rounded-md border border-cyan-100 bg-white px-3 text-sm outline-none focus:border-brand-700 focus:ring-2 focus:ring-brand-100" required=""/></div> <div><label for="proj-desc" class="mb-1.5 block text-xs font-medium text-slate-700">Description</label> <input id="proj-desc" data-tour="new-project-description" type="text" placeholder="What product or initiative does this group?" class="h-10 w-full rounded-md border border-cyan-100 bg-white px-3 text-sm outline-none focus:border-brand-700 focus:ring-2 focus:ring-brand-100" required=""/></div> <button type="submit" class="h-10 rounded-md bg-brand-800 px-4 text-sm font-medium text-white hover:bg-brand-900 disabled:cursor-not-allowed disabled:opacity-50"> </button></form>`);function De(n,i){g(i,!0);let s=T(``),c=T(``),l=T(!1),f=T(null),m=b(()=>V(se.currentStep,`new-project`,d(s)));E(()=>{d(f)&&u().then(()=>d(f)?.focus())});async function v(e){if(e.preventDefault(),!d(l)&&d(s).trim().length!==0&&d(c).trim().length!==0){k(l,!0);try{await i.onSubmit(d(s).trim(),d(c).trim()),k(s,``),k(c,``)}finally{k(l,!1)}}}var y=W(),x=p(y),C=e(p(x),2);A(C),O(C,e=>k(f,e),()=>d(f)),_(x);var w=e(x,2),D=e(p(w),2);A(D),_(w);var M=e(w,2),N=p(M,!0);_(M),_(y),r(e=>{h(M,`title`,d(m).blocked?`Tutorial: name must be exactly "${d(m).requiredValue}"`:void 0),M.disabled=e,a(N,d(l)?`Creating...`:`New project`)},[()=>d(l)||d(s).trim().length===0||d(c).trim().length===0||d(m).blocked]),t(`submit`,y,v),S(C,()=>d(s),e=>k(s,e)),S(D,()=>d(c),e=>k(c,e)),o(n,y),j()}var Oe=`0.16.0`,ke=()=>`v${Oe}`,Ae=n(`<p data-testid="app-version">Unspaghettit <span class="font-medium tabular-nums"> </span></p>`);function je(t,n){g(n,!0);let i=m(n,`class`,3,``);var s=Ae(),c=e(p(s)),l=p(c,!0);_(c),_(s),r(e=>{N(s,1,`text-xs text-slate-400 select-text ${i()??``}`),h(s,`title`,`Unspaghettit 0.16.0`),a(l,e)},[()=>ke()]),o(t,s),j()}var Me=n(`<span aria-hidden="true">⬆</span> `,1),Ne=n(`<button type="button" class="h-8 rounded-md px-2 text-xs font-medium text-slate-500 hover:bg-slate-50 hover:text-slate-900">Clear</button>`),Pe=n(`<div class="rounded-lg border border-dashed border-hairline bg-white p-8 text-center text-sm text-slate-500">Loading projects...</div>`),Fe=n(`<div class="rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-700"> </div>`),Ie=n(`<div class="mx-auto max-w-md space-y-4 py-4"><div class="space-y-1.5"><p class="text-base font-semibold text-slate-900">Nothing modeled yet</p> <p class="text-sm leading-6 text-slate-600">A <strong>project</strong> holds the features of one product. A <strong>feature</strong> describes one slice of what that product does
|
|
2
2
|
(its screens, actions, state, and rules) precisely enough to simulate.</p></div> <div class="flex flex-wrap items-center justify-center gap-2"><button type="button" class="rounded-md bg-slate-900 px-4 py-2 text-sm font-medium text-white hover:bg-slate-800">Create first project</button> <button type="button" class="rounded-md border border-brand-300 bg-brand-50 px-4 py-2 text-sm font-medium text-brand-800 hover:bg-brand-100">Take the 3-minute tour</button> <button type="button" class="rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50 disabled:cursor-wait disabled:opacity-70"> </button></div></div>`),Le=n(`<div class="rounded-lg border border-dashed border-hairline bg-white p-8 text-center text-sm text-slate-500"><!></div>`),Re=n(`<li><!></li>`),ze=n(`<ul class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3"></ul>`),Be=n(`<div class="fixed inset-0 z-40 flex items-start justify-center bg-slate-950/30 px-4 py-24 backdrop-blur-sm" role="presentation"><div class="w-full max-w-3xl rounded-xl border border-hairline bg-white shadow-xl" role="dialog" aria-modal="true" aria-labelledby="new-project-title"><header class="flex items-start justify-between gap-4 border-b border-hairline px-5 py-4"><div><h2 id="new-project-title" class="text-base font-semibold text-slate-950">New project</h2> <p class="mt-1 text-sm text-slate-500">Create a project for related behavior models.</p></div> <button type="button" class="rounded-md px-2 py-1 text-sm text-slate-500 hover:bg-slate-100 hover:text-slate-900" aria-label="Close">x</button></header> <div class="p-5"><!></div></div></div>`),Ve=n(`<div class="mx-auto max-w-7xl px-4 py-8 sm:px-6"><header class="mb-6 border-b border-slate-200 pb-6"><div class="flex items-center justify-between gap-3"><p class="text-xs font-semibold uppercase tracking-wide text-brand-700">Home</p> <!> <input type="file" accept=".unspa,application/octet-stream,application/json" class="hidden"/></div> <div class="mt-2 max-w-3xl"><h1 class="text-4xl font-semibold tracking-tight text-slate-950">Projects</h1> <p class="mt-2 max-w-2xl text-sm leading-6 text-slate-600">One project per product or codebase. Each groups the features that describe what
|
|
3
3
|
that product does. Open one to model, simulate, and verify its behavior.</p></div> <div class="mt-6 flex flex-col gap-3 rounded-xl border border-slate-200 bg-white p-3 shadow-sm shadow-slate-950/5 lg:flex-row lg:items-center lg:justify-between"><div class="flex min-w-0 items-center rounded-lg border border-hairline bg-white p-1 lg:flex-1"><label for="project-search" class="sr-only">Search projects</label> <input id="project-search" type="search" placeholder="Search projects..." class="h-9 w-full min-w-0 rounded-md border-0 bg-transparent px-3 text-sm outline-none placeholder:text-slate-400"/> <!></div> <div class="flex flex-col gap-2 sm:flex-row sm:items-center"><!> <label class="flex h-10 items-center gap-2 rounded-lg border border-hairline bg-white px-3 text-sm text-slate-600"><span class="text-xs font-medium">Sort</span> <select class="bg-transparent text-sm font-medium text-slate-800 outline-none"><option>Updated</option><option>Name</option><option>Features</option></select></label> <button type="button" data-tour="new-project-button" class="inline-flex h-10 items-center justify-center gap-2 rounded-md bg-slate-900 px-4 text-sm font-medium text-white hover:bg-slate-800"><span class="text-base leading-none" aria-hidden="true">+</span> New project</button></div></div></header> <section aria-labelledby="projects-list-title"><div class="mb-3 flex flex-col gap-1 sm:flex-row sm:items-end sm:justify-between"><div><h2 id="projects-list-title" class="text-base font-semibold text-slate-950">Your projects</h2> <p class="text-sm text-slate-500">Open a project to inspect the features it groups.</p></div> <p class="text-xs text-slate-500"> </p></div> <!></section> <!></div> <!> <!>`,1);function G(n,l){g(l,!0);let u=null,m=T(`all`),h=T(!1),y=T(!1),S=T(`updated`),N=T(!1);async function fe(){if(!d(N)){k(N,!0);try{await le()}finally{k(N,!1)}}}D(()=>{z.refresh(),de.refresh(),u=oe(e=>{(e.kind===`project`||e.kind===`feature`)&&z.refreshSilent()})}),w(()=>{u?.(),u=null});function V(e){let t=[...e.tags??[]];return e.customTag?.trim()&&t.push({type:e.customTagType?.trim()||`Tag`,value:e.customTag.trim()}),t}async function Ce(e,t){await F(`/projects/${await z.create(e,t)}`)}let H=T(!1),U=T(null);function we(){d(H)||d(U)?.click()}async function Te(e){let t=e.target,n=t.files?.[0];if(t.value=``,n){k(H,!0);try{let e=await me(n),t=await ee({title:`Import .unspa file`,message:`Enter the passphrase used when "${n.name}" was exported. A wrong passphrase will not corrupt anything - the file just stays encrypted.`,inputLabel:`Passphrase`,password:!0,confirmLabel:`Import`,tone:`info`});if(t===null)return;let r=await ve(e,t);await z.refreshSilent(),await I({title:`Import complete`,message:`Restored project with ${r.featuresImported} feature(s) and ${r.statusesImported} implementation-status sidecar(s).`,tone:`success`}),await F(`/projects/${r.projectId}`)}catch(e){await I({title:`Import failed`,message:e instanceof pe?`That file is not a valid .unspa bundle: ${e.message}`:e instanceof ye?e.message:`Import failed: ${e.message}`,tone:`danger`})}finally{k(H,!1)}}}let W=T(!1);async function Oe(e,t){if(d(W))return;let n=await ee({title:`Export project`,message:`Encrypt "${t}" with a passphrase and download as a .unspa file. You'll need the same passphrase to import it back. Minimum 8 characters.`,inputLabel:`Passphrase`,placeholder:`At least 8 characters`,password:!0,confirmLabel:`Export`,tone:`info`,validate:e=>e.length<8?`Passphrase must be at least 8 characters.`:null});if(n!==null){k(W,!0);try{let{envelope:t,projectName:r}=await ge(e,n);be(t,r)}catch(e){await I({title:`Export failed`,message:e instanceof _e?e.message:`Export failed: ${e.message}`,tone:`danger`})}finally{k(W,!1)}}}async function ke(e){z.stagePendingDelete(e);let t=z.summaries.find(t=>String(t.id)===String(e))?.name??`this project`,n=await R(),r=((await n.useCases.getProject(e))?.featureIds??[]).map(String),i=[];if(r.length===0){if(!await ie({title:`Delete "${t}"?`,message:`This project has no linked features. Removing it cannot be undone.`,confirmLabel:`Delete project`,tone:`danger`})){z.clearPendingDelete();return}}else{let e=await Promise.all(r.map(async e=>({id:e,label:(await n.useCases.getFeatureCard(e))?.name??e,defaultChecked:!0}))),a=await ne({title:`Delete "${t}"?`,message:`This project links to ${r.length} feature${r.length===1?``:`s`}. Tick the ones you want to delete in the same batch. Anything left unchecked stays available as an unassigned feature.`,items:e,confirmLabel:`Delete project + selected`,cancelLabel:`Cancel`,tone:`danger`});if(!a.confirmed){z.clearPendingDelete();return}i=a.selectedIds}for(let e of i)await n.useCases.deleteFeature(e);await z.remove(e),i.length>0&&await ue.refreshSilent()}function Ae(e){e.key===`Escape`&&k(h,!1)}let G=b(()=>(z.search.trim().length===0?[...z.summaries]:z.summaries.filter(e=>{let t=z.search.toLowerCase();return e.name.toLowerCase().includes(t)||(e.description??``).toLowerCase().includes(t)})).filter(e=>He(e,d(m))).sort((e,t)=>d(S)===`name`?e.name.localeCompare(t.name):d(S)===`count`?t.featureCount-e.featureCount:new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()));function He(e,t){let n=V(e);if(t===`all`)return!0;if(t===`untagged`)return n.length===0;let r=L(t);return n.some(e=>L(e)===r)}let K=b(()=>{let e=[];for(let t of z.summaries)for(let n of V(t))e.push(n);return e});E(()=>{de.registerTypes(d(K).map(e=>e.type))});let Ue=b(()=>[...new Set(d(K).map(e=>re(e.type)))].sort((e,t)=>e.localeCompare(t)));function We(e){return z.summaries.filter(t=>He(t,e)).length}async function Ge(e,t,n){let r=await R(),i=await r.useCases.getProject(e);i&&(await r.useCases.saveProject({...i,tags:te(V(i),{type:t,value:n})}),await z.refreshSilent())}async function Ke(e,t,n){let r=await R(),i=await r.useCases.getProject(e);if(!i)return;let a=ae(V(i),{type:t,value:n});await r.useCases.saveProject({...i,tags:a,customTagType:void 0,customTag:void 0}),d(m)!==`all`&&d(m)!==`untagged`&&L(d(m))===L({type:t,value:n})&&k(m,`all`),await z.refreshSilent()}var qe=Ve();t(`keydown`,f,Ae);var q=c(qe),J=p(q),Y=p(J),Je=e(p(Y),2);he(Je,{align:`right`,placement:`down`,label:`Page actions`,children:(t,n=M)=>{B(t,{get disabled(){return d(H)},onclick:()=>{n()(),we()},children:(t,n)=>{var i=Me(),s=e(c(i));r(()=>a(s,` ${d(H)?`Importing...`:`Import .unspa`}`)),o(t,i)},$$slots:{default:!0}})},$$slots:{default:!0}});var Ye=e(Je,2);O(Ye,e=>k(U,e),()=>d(U)),_(Y);var Xe=e(Y,4),X=p(Xe),Z=e(p(X),2);A(Z);var Ze=e(Z,2),Qe=e=>{var t=Ne();P(`click`,t,()=>z.setSearch(``)),o(e,t)},$e=b(()=>z.search.trim().length>0);x(Ze,e=>{d($e)&&e(Qe)}),_(X);var et=e(X,2),tt=p(et);xe(tt,{get tags(){return d(K)},get value(){return d(m)},onChange:e=>k(m,e,!0),onManage:()=>k(y,!0),countLabel:We});var Q=e(tt,2),$=e(p(Q),2),nt=p($);nt.value=nt.__value=`updated`;var rt=e(nt);rt.value=rt.__value=`name`;var it=e(rt);it.value=it.__value=`count`,_($),_(Q);var at=e(Q,2);_(et),_(Xe),_(J);var ot=e(J,2),st=p(ot),ct=e(p(st),2),lt=p(ct);_(ct),_(st);var ut=e(st,2),dt=e=>{o(e,Pe())},ft=e=>{var t=Fe(),n=p(t,!0);_(t),r(()=>a(n,z.error)),o(e,t)},pt=t=>{var n=Le(),s=p(n),c=t=>{var n=Ie(),i=e(p(n),2),s=p(i),c=e(s,2),l=e(c,2),u=p(l,!0);_(l),_(i),_(n),r(()=>{l.disabled=d(N),a(u,d(N)?`Loading...`:`Explore the sample project`)}),P(`click`,s,()=>k(h,!0)),P(`click`,c,()=>se.start(ce)),P(`click`,l,fe),o(t,n)},l=e=>{o(e,i(`No projects match your search.`))};x(s,e=>{z.summaries.length===0?e(c):e(l,-1)}),_(n),o(t,n)},mt=e=>{var t=ze();s(t,21,()=>d(G),e=>e.id,(e,t)=>{var n=Re();Ee(p(n),{get summary(){return d(t)},get tagTypeOptions(){return d(Ue)},onAddTag:(e,n)=>Ge(d(t).id,e,n),onRemoveTag:(e,n)=>Ke(d(t).id,e,n),onExport:()=>Oe(d(t).id,d(t).name),onDelete:()=>ke(d(t).id)}),_(n),o(e,n)}),_(t),o(e,t)};x(ut,e=>{z.loading?e(dt):z.error?e(ft,1):d(G).length===0?e(pt,2):e(mt,-1)}),_(ot),je(e(ot,2),{class:`mt-8`}),_(q);var ht=e(q,2),gt=t=>{var n=Be(),r=p(n),i=p(r),a=e(p(i),2);_(i);var s=e(i,2);De(p(s),{onSubmit:Ce}),_(s),_(r),_(n),P(`click`,n,e=>{e.currentTarget===e.target&&k(h,!1)}),P(`click`,a,()=>k(h,!1)),o(t,n)};x(ht,e=>{d(h)&&e(gt)}),Se(e(ht,2),{get open(){return d(y)},get tags(){return d(K)},onClose:()=>k(y,!1),onRenamed:()=>z.refreshSilent()}),r(()=>{C(Z,z.search),a(lt,`${d(G).length??``} shown`)}),P(`change`,Ye,Te),P(`input`,Z,e=>z.setSearch(e.target.value)),v($,()=>d(S),e=>k(S,e)),P(`click`,at,()=>k(h,!0)),o(n,qe),j()}l([`change`,`input`,`click`]);export{G as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./CYsLq4VE.js";import{o as e}from"./
|
|
1
|
+
import"./CYsLq4VE.js";import{o as e}from"./AIVrTpgC.js";var t=()=>{let t=e;return{page:{subscribe:t.page.subscribe},navigating:{subscribe:t.navigating.subscribe},updated:t.updated}},n={subscribe(e){return t().page.subscribe(e)}};export{n as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.
|
|
2
|
-
import{$ as e,F as t,J as n,K as r,L as i,M as a,N as o,P as s,Q as c,T as l,U as u,V as d,Z as f,a as p,dt as m,gt as h,i as g,it as _,j as v,nt as y,q as b,r as x,s as S,tt as C,ut as w}from"../chunks/CYsLq4VE.js";import{t as T}from"../chunks/kNaey6uv.js";import"../chunks/xihTtKlq.js";var E={},D=t(`<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),O=t(`<!> <!>`,1);function k(t,g){m(g,!0);let T=p(g,`components`,23,()=>[]),E=p(g,`data_0`,3,null),k=p(g,`data_1`,3,null);n(()=>g.stores.page.set(g.page)),b(()=>{g.stores,g.page,g.constructors,T(),g.form,E(),k(),g.stores.page.notify()});let A=y(!1),j=y(!1),M=y(null);x(()=>{let e=g.stores.page.subscribe(()=>{d(A)&&(C(j,!0),u().then(()=>{C(M,document.title||`untitled page`,!0)}))});return C(A,!0),e});let N=_(()=>g.constructors[1]);var P=O(),F=c(P),I=e=>{let t=_(()=>g.constructors[0]);var n=s();l(c(n),()=>d(t),(e,t)=>{S(t(e,{get data(){return E()},get form(){return g.form},get params(){return g.page.params},children:(e,t)=>{var n=s();l(c(n),()=>d(N),(e,t)=>{S(t(e,{get data(){return k()},get form(){return g.form},get params(){return g.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),o(e,n)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),o(e,n)},L=e=>{let t=_(()=>g.constructors[0]);var n=s();l(c(n),()=>d(t),(e,t)=>{S(t(e,{get data(){return E()},get form(){return g.form},get params(){return g.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),o(e,n)};v(F,e=>{g.constructors[1]?e(I):e(L,-1)});var R=e(F,2),z=e=>{var t=D(),n=f(t),s=e=>{var t=i();r(()=>a(t,d(M))),o(e,t)};v(n,e=>{d(j)&&e(s)}),h(t),o(e,t)};v(R,e=>{d(A)&&e(z)}),o(t,P),w()}var A=g(k),j=[()=>T(()=>import(`../nodes/0.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.D-_MLMOF.js","../chunks/CYsLq4VE.js","../chunks/BLVBP6IJ.js","../chunks/PGh5ehlS.js","../chunks/DByLifec.js","../chunks/EZgceN_E.js","../chunks/BcjkusYG.js","../chunks/AIVrTpgC.js","../chunks/BuFlayix.js","../chunks/BiDFtKe6.js","../chunks/ClSw9AyG.js","../chunks/BGoS2INr.js","../chunks/BE7NaZk8.js","../chunks/xihTtKlq.js","../chunks/DkAKB9py.js","../chunks/dCZwRRKS.js","../chunks/Qgm526At.js","../chunks/Cuj9IeTJ.js","../chunks/CGWhvtMz.js","../chunks/Cl7Z3e6-.js","../chunks/DNgDuvXX.js","../chunks/BQ9GodWX.js","../chunks/Dp-pCjOt.js","../chunks/niJ1Cp3-.js","../chunks/BPm18m-Y.js","../chunks/DsJUUSRq.js","../assets/0.DEmtldqZ.css","../nodes/1.DhZ7EShx.js","../nodes/2.DL36BNkY.js","../chunks/wLz3964S2.js","../chunks/1qwcT7H12.js","../chunks/D9sGVI572.js","../chunks/CT4vNU442.js","../chunks/Txy2b5lN2.js","../chunks/C0MTuC4u2.js","../chunks/Cbsgl_qu2.js","../nodes/3.CB1xVSCX.js","../chunks/gaw8GWTo2.js","../assets/3.B3akUL9A.css","../nodes/4.B7Ucym6O.js","../chunks/CwFCbQnJ2.js","../chunks/DsJ5xE_P2.js","../nodes/5.BPd6M8hN.js","../chunks/zN8Uu1W22.js","../chunks/DFmNW1Fq2.js","../chunks/BnqPzDNe2.js","../chunks/DwB55Fk82.js","../chunks/sl-vu-JF2.js","../nodes/6.CFU9YhB5.js","../chunks/CzDWVOFj2.js","../chunks/3_GXBVV42.js","../nodes/7.D7glifWT.js","../chunks/BsWjvGRT.js","../chunks/kNaey6uv.js","../assets/fillViewportHeight.C52ts29_.css","../nodes/8.WoYHvkli.js","../nodes/9.B1--QwJ9.js","../nodes/10.Bgj5-w6g.js","../nodes/11.cfn9LqaA.js","../nodes/12.CphZytWm.js","../chunks/BLqvzp0B.js","../nodes/13.9ZGjlvBD.js","../nodes/14.C4gZLBpf.js","../nodes/15.DY0lYZJv.js","../nodes/16.xbZ24Wub.js","../assets/16.nv0I59TU.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$ as e,F as t,J as n,K as r,L as i,M as a,N as o,P as s,Q as c,T as l,U as u,V as d,Z as f,a as p,dt as m,gt as h,i as g,it as _,j as v,nt as y,q as b,r as x,s as S,tt as C,ut as w}from"../chunks/CYsLq4VE.js";import{t as T}from"../chunks/kNaey6uv.js";import"../chunks/xihTtKlq.js";var E={},D=t(`<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),O=t(`<!> <!>`,1);function k(t,g){m(g,!0);let T=p(g,`components`,23,()=>[]),E=p(g,`data_0`,3,null),k=p(g,`data_1`,3,null);n(()=>g.stores.page.set(g.page)),b(()=>{g.stores,g.page,g.constructors,T(),g.form,E(),k(),g.stores.page.notify()});let A=y(!1),j=y(!1),M=y(null);x(()=>{let e=g.stores.page.subscribe(()=>{d(A)&&(C(j,!0),u().then(()=>{C(M,document.title||`untitled page`,!0)}))});return C(A,!0),e});let N=_(()=>g.constructors[1]);var P=O(),F=c(P),I=e=>{let t=_(()=>g.constructors[0]);var n=s();l(c(n),()=>d(t),(e,t)=>{S(t(e,{get data(){return E()},get form(){return g.form},get params(){return g.page.params},children:(e,t)=>{var n=s();l(c(n),()=>d(N),(e,t)=>{S(t(e,{get data(){return k()},get form(){return g.form},get params(){return g.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),o(e,n)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),o(e,n)},L=e=>{let t=_(()=>g.constructors[0]);var n=s();l(c(n),()=>d(t),(e,t)=>{S(t(e,{get data(){return E()},get form(){return g.form},get params(){return g.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),o(e,n)};v(F,e=>{g.constructors[1]?e(I):e(L,-1)});var R=e(F,2),z=e=>{var t=D(),n=f(t),s=e=>{var t=i();r(()=>a(t,d(M))),o(e,t)};v(n,e=>{d(j)&&e(s)}),h(t),o(e,t)};v(R,e=>{d(A)&&e(z)}),o(t,P),w()}var A=g(k),j=[()=>T(()=>import(`../nodes/0.D-_MLMOF.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]),import.meta.url),()=>T(()=>import(`../nodes/1.DhZ7EShx.js`),__vite__mapDeps([27,1,10,7,8,13]),import.meta.url),()=>T(()=>import(`../nodes/2.DL36BNkY.js`),__vite__mapDeps([28,1,10,7,8,13,14,29,9,3,18,19,20,21,22,11,23,30,31,32,5,33,34,6,35,15]),import.meta.url),()=>T(()=>import(`../nodes/3.CB1xVSCX.js`),__vite__mapDeps([36,1,2,3,4,5,6,37,8,7,9,10,12,13,14,35,15,38]),import.meta.url),()=>T(()=>import(`../nodes/4.B7Ucym6O.js`),__vite__mapDeps([39,1,37,8,7,9,10,13,3,35,15,18,19,40,32,5,41,21,31,33]),import.meta.url),()=>T(()=>import(`../nodes/5.BPd6M8hN.js`),__vite__mapDeps([42,1,7,8,9,10,43,12,13,14,3,16,35,15,17,44,4,45,46,22,11,19,47,24,32,5,23,34,41]),import.meta.url),()=>T(()=>import(`../nodes/6.CFU9YhB5.js`),__vite__mapDeps([48,1,43,7,8,13,3,49,50,46,22,11,19,24]),import.meta.url),()=>T(()=>import(`../nodes/7.D7glifWT.js`),__vite__mapDeps([51,1,43,7,8,13,14,3,52,53,9,54,46,22,11,19,47,24]),import.meta.url),()=>T(()=>import(`../nodes/8.WoYHvkli.js`),__vite__mapDeps([55,1,43,7,8,13,3,22,11,19]),import.meta.url),()=>T(()=>import(`../nodes/9.B1--QwJ9.js`),__vite__mapDeps([56,1,43,7,8,13,3,46,22,11,19,24]),import.meta.url),()=>T(()=>import(`../nodes/10.Bgj5-w6g.js`),__vite__mapDeps([57,1,37,8,13,14]),import.meta.url),()=>T(()=>import(`../nodes/11.cfn9LqaA.js`),__vite__mapDeps([58,1,10,7,8,13,14,29,9,3,18,19,20,21,22,11,23,30,31,32,5,33,34,6,35,15]),import.meta.url),()=>T(()=>import(`../nodes/12.CphZytWm.js`),__vite__mapDeps([59,1,7,8,9,43,12,13,14,3,35,15,17,44,10,18,19,40,32,5,41,30,60,25,11,33,23,34,6]),import.meta.url),()=>T(()=>import(`../nodes/13.9ZGjlvBD.js`),__vite__mapDeps([61,1,43,7,8,13,3,35,15,49,50,60,25,11,19]),import.meta.url),()=>T(()=>import(`../nodes/14.C4gZLBpf.js`),__vite__mapDeps([62,1,43,7,8,13,3,35,15,52,53,9,54,60,25,11,19,6]),import.meta.url),()=>T(()=>import(`../nodes/15.DY0lYZJv.js`),__vite__mapDeps([63,1,10,7,8,13,3,35,15,45,18,19]),import.meta.url),()=>T(()=>import(`../nodes/16.xbZ24Wub.js`),__vite__mapDeps([64,1,10,7,8,13,35,15,20,9,3,18,19,21,22,11,23,65]),import.meta.url)],M=[],N={"/":[2],"/builder-mode":[3],"/features":[4],"/features/[id]":[5],"/features/[id]/digest":[6],"/features/[id]/graph":[7],"/features/[id]/provenance":[8],"/features/[id]/verify":[9],"/mcp":[10],"/projects":[11],"/projects/[id]":[12],"/projects/[id]/digest":[13],"/projects/[id]/graph":[14],"/projects/[id]/mcp":[15],"/tutorial":[16]},P={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},F=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.decode])),I=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.encode])),L=!1,R=(e,t)=>F[e](t),z=()=>T(()=>import(`../chunks/Bjy-W4x2.js`).then(e=>e.default),[],import.meta.url);export{R as decode,F as decoders,N as dictionary,I as encoders,z as get_error_template,L as hash,P as hooks,E as matchers,j as nodes,A as root,M as server_loads};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,u as t}from"../chunks/AIVrTpgC.js";export{t as load_css,e as start};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as e,A as t,B as n,E as r,F as i,I as a,K as o,L as s,M as c,N as l,O as u,P as d,Q as f,R as p,V as m,W as h,X as g,Z as _,a as v,b as y,d as b,dt as x,et as S,f as C,gt as w,ht as T,it as E,j as D,k as O,l as k,m as A,nt as j,o as M,q as N,r as P,rt as F,s as I,tt as L,u as ee,ut as R,v as z,vt as B,w as V,xt as te,y as H,z as U}from"../chunks/CYsLq4VE.js";import{n as W,r as ne}from"../chunks/CCRkIitA.js";import"../chunks/xihTtKlq.js";import"../chunks/BrWeFyMA.js";import{t as G}from"../chunks/CgSXJuIO.js";import{i as re,n as ie,r as ae,t as oe}from"../chunks/BE7NaZk8.js";import{$ as se,Bt as ce,C as le,H as ue,J as de,Pt as fe,Rt as pe,U as me,h as he,t as ge,ut as _e,zt as ve}from"../chunks/PGh5ehlS.js";import"../chunks/DkAKB9py.js";import{t as ye}from"../chunks/BcjkusYG.js";import{i as be,n as xe,o as Se,r as Ce,t as we}from"../chunks/okshMw-Z.js";import{n as K,r as Te}from"../chunks/niJ1Cp3-.js";import{i as q}from"../chunks/BGoS2INr.js";import{n as Ee,t as De}from"../chunks/n7xluuKn.js";import{n as Oe}from"../chunks/CGWhvtMz.js";import{t as ke}from"../chunks/DsJUUSRq.js";import{t as Ae}from"../chunks/BPm18m-Y.js";import{a as je,c as Me,i as Ne,n as Pe,o as Fe,r as J,t as Ie}from"../chunks/Cuj9IeTJ.js";import{t as Le}from"../chunks/dCZwRRKS.js";import{n as Re}from"../chunks/Qgm526At.js";var ze=te({prerender:()=>!1,ssr:()=>!1,trailingSlash:()=>Be}),Be=`never`,Ve=i(`<span class="mt-1 block text-xs leading-relaxed opacity-80"> </span>`),He=i(`<li class="flex"><button type="button"><span class="min-w-0 flex-1"><span class="block text-sm"> </span> <!></span> <span aria-hidden="true" class="shrink-0 text-base transition group-hover:translate-x-1">→</span></button></li>`),Ue=i(`<div class="px-7 pt-2 pb-5"><ul class="flex max-h-80 flex-col gap-3 overflow-y-auto"></ul></div>`),We=i(`<p class="mt-2 text-xs font-medium text-red-700"> </p>`),Ge=i(`<div class="px-7 pt-1 pb-4"><label class="block text-xs font-medium text-slate-700"> <input autocorrect="off" autocapitalize="off" spellcheck="false" class="mono mt-1 h-10 w-full rounded-md border border-slate-300 bg-white px-3 text-sm outline-none focus:border-brand-700 focus:ring-2 focus:ring-brand-100"/></label> <!></div>`),Ke=i(`<span class="mt-0.5 block text-xs text-slate-500"> </span>`),qe=i(`<li><label class="flex cursor-pointer items-start gap-3 rounded-md px-2 py-2 transition hover:bg-white"><input type="checkbox"/> <span class="min-w-0 flex-1"><span class="block text-sm font-medium text-slate-900"> </span> <!></span></label></li>`),Je=i(`<div class="border-t border-hairline px-6 py-3"><div class="mb-2 flex items-center justify-between"><span class="text-xs font-medium uppercase tracking-wide text-slate-500"> </span> <div class="flex gap-2 text-xs"><button type="button" class="font-medium text-slate-600 hover:text-slate-950">Select all</button> <span class="text-slate-300">·</span> <button type="button" class="font-medium text-slate-600 hover:text-slate-950">Select none</button></div></div> <ul class="max-h-72 space-y-1.5 overflow-y-auto rounded-lg border border-hairline bg-slate-50 p-2"></ul></div>`),Ye=i(`<button type="button"> </button>`),Xe=i(`<button type="button" class="rounded-md px-3 py-2 text-sm text-slate-600 transition hover:text-slate-950"> </button>`),Ze=i(`<button type="button" class="rounded-md border border-slate-300 bg-white px-4 py-2 text-sm text-slate-700 transition hover:bg-slate-100"> </button> <button type="button"> </button>`,1),Qe=i(`<div class="fixed inset-0 z-100 flex items-center justify-center px-4" role="presentation"><button type="button" aria-label="Dismiss" class="absolute inset-0 bg-slate-950/40 backdrop-blur-sm"></button> <div role="dialog" aria-modal="true" aria-labelledby="app-dialog-title" aria-describedby="app-dialog-message"><div class="flex gap-4 px-7 pt-7 pb-5"><div> </div> <div class="min-w-0 flex-1 pt-1"><h2 id="app-dialog-title" class="text-lg leading-tight text-slate-950"> </h2> <p id="app-dialog-message" class="mt-2 whitespace-pre-line text-sm leading-relaxed text-slate-600"> </p></div></div> <!> <div class="flex justify-end gap-2 border-t border-hairline bg-slate-50 px-7 py-3"><!></div></div></div>`);function $e(t,r){x(r,!0);let i=E(()=>ve.current),a=j(S(new Set)),s=j(``),p=j(null),h=j(null);N(()=>{m(i)?.kind===`checklist`?L(a,new Set(m(i).opts.items.filter(e=>e.defaultChecked).map(e=>e.id)),!0):L(a,new Set,!0),m(i)?.kind===`prompt`?(L(s,m(i).opts.defaultValue??``,!0),L(p,null),queueMicrotask(()=>m(h)?.focus())):(L(s,``),L(p,null))});function v(e){let t=new Set(m(a));t.has(e)?t.delete(e):t.add(e),L(a,t,!0)}function y(){m(i)?.kind===`checklist`&&L(a,new Set(m(i).opts.items.map(e=>e.id)),!0)}function O(){L(a,new Set,!0)}function A(){m(i)?.kind===`prompt`?ve.resolvePrompt(null):ve.resolveCurrent(!1)}function M(){if(m(i)?.kind===`checklist`)ve.resolveCurrent(!0,Array.from(m(a)));else if(m(i)?.kind===`prompt`){let e=m(s),t=m(i).opts.validate?m(i).opts.validate(e):null;if(t){L(p,t,!0);return}ve.resolvePrompt(e)}else ve.resolveCurrent(!0)}function P(e){m(i)&&(e.key===`Escape`?(e.preventDefault(),A()):e.key===`Enter`&&m(i).kind!==`checklist`&&(e.preventDefault(),M()))}let F={default:{icon:`?`,iconBg:`bg-slate-100`,iconColor:`text-slate-700`,confirmBtn:`bg-slate-900 hover:bg-slate-800 text-white`,check:`accent-slate-700`},danger:{icon:`!`,iconBg:`bg-rose-50`,iconColor:`text-rose-600`,confirmBtn:`bg-rose-600 hover:bg-rose-500 text-white`,check:`accent-rose-600`},info:{icon:`i`,iconBg:`bg-brand-50`,iconColor:`text-brand-700`,confirmBtn:`bg-brand-700 hover:bg-brand-600 text-white`,check:`accent-brand-700`},success:{icon:`✓`,iconBg:`bg-emerald-50`,iconColor:`text-emerald-600`,confirmBtn:`bg-emerald-600 hover:bg-emerald-500 text-white`,check:`accent-emerald-600`},warning:{icon:`!`,iconBg:`bg-amber-50`,iconColor:`text-amber-600`,confirmBtn:`bg-amber-600 hover:bg-amber-500 text-white`,check:`accent-amber-600`}},z=E(()=>m(i)?.opts.tone??(m(i)?.kind===`alert`?`info`:`default`)),B=E(()=>F[m(z)]);var te=d();n(`keydown`,g,P);var W=f(te),ne=t=>{var n=Qe(),r=_(n),d=e(r,2),g=_(d),x=_(g),S=_(x,!0);w(x);var E=e(x,2),j=_(E),N=_(j,!0);w(j);var P=e(j,2),F=_(P,!0);w(P),w(E),w(g);var R=e(g,2),z=t=>{var n=Ue(),r=_(n);u(r,21,()=>m(i).opts.options,e=>e.id,(t,n)=>{var r=He(),i=_(r),a=_(i),s=_(a),u=_(s,!0);w(s);var d=e(s,2),f=e=>{var t=Ve(),r=_(t,!0);w(t),o(()=>c(r,m(n).description)),l(e,t)};D(d,e=>{m(n).description&&e(f)}),w(a),T(2),w(i),w(r),o(()=>{H(i,1,`group flex w-full items-center justify-between gap-4 rounded-xl px-5 py-4 text-left shadow-sm shadow-slate-950/5 transition hover:shadow-md focus:ring-2 focus:ring-offset-2 focus:outline-none ${m(B).confirmBtn}`),c(u,m(n).label)}),U(`click`,i,()=>ve.resolveChoice(m(n).id)),l(t,r)}),w(r),w(n),l(t,n)},te=t=>{var n=Ge(),r=_(n),a=_(r),u=e(a);ee(u),I(u,e=>L(h,e),()=>m(h)),w(r);var d=e(r,2),f=e=>{var t=We(),n=_(t,!0);w(t),o(()=>c(n,m(p))),l(e,t)};D(d,e=>{m(p)&&e(f)}),w(n),o(()=>{c(a,`${m(i).opts.inputLabel??`Value`??``} `),b(u,`type`,m(i).opts.password?`password`:`text`),b(u,`autocomplete`,m(i).opts.password?`new-password`:`off`),b(u,`placeholder`,m(i).opts.placeholder??``)}),U(`input`,u,()=>L(p,null)),k(u,()=>m(s),e=>L(s,e)),l(t,n)},W=t=>{var n=Je(),r=_(n),s=_(r),d=_(s);w(s);var f=e(s,2),p=_(f),h=e(p,4);w(f),w(r);var g=e(r,2);u(g,21,()=>m(i).opts.items,e=>e.id,(t,n)=>{var r=qe(),i=_(r),s=_(i);ee(s);var u=e(s,2),d=_(u),f=_(d,!0);w(d);var p=e(d,2),h=e=>{var t=Ke(),r=_(t,!0);w(t),o(()=>c(r,m(n).description)),l(e,t)};D(p,e=>{m(n).description&&e(h)}),w(u),w(i),w(r),o(e=>{H(s,1,`mt-0.5 h-4 w-4 rounded ${m(B).check}`),C(s,e),c(f,m(n).label)},[()=>m(a).has(m(n).id)]),U(`change`,s,()=>v(m(n).id)),l(t,r)}),w(g),w(n),o(()=>c(d,`${m(a).size??``} of ${m(i).opts.items.length??``} selected`)),U(`click`,p,y),U(`click`,h,O),l(t,n)};D(R,e=>{m(i).kind===`choice`?e(z):m(i).kind===`prompt`?e(te,1):m(i).kind===`checklist`&&e(W,2)});var ne=e(R,2),G=_(ne),ae=e=>{var t=Ye(),n=_(t,!0);w(t),o(()=>{H(t,1,`rounded-md px-4 py-2 text-sm transition ${m(B).confirmBtn}`),c(n,m(i).opts.buttonLabel??`OK`)}),U(`click`,t,A),l(e,t)},se=e=>{var t=Xe(),n=_(t,!0);w(t),o(()=>c(n,m(i).opts.cancelLabel??`Close`)),U(`click`,t,A),l(e,t)},ce=t=>{var n=Ze(),r=f(n),a=_(r,!0);w(r);var s=e(r,2),u=_(s,!0);w(s),o(()=>{c(a,m(i).opts.cancelLabel??`Cancel`),H(s,1,`rounded-md px-4 py-2 text-sm transition focus:ring-2 focus:ring-offset-2 focus:outline-none ${m(B).confirmBtn}`),c(u,m(i).opts.confirmLabel??`Confirm`)}),U(`click`,r,A),U(`click`,s,M),l(t,n)};D(G,e=>{m(i).kind===`alert`?e(ae):m(i).kind===`choice`?e(se,1):e(ce,-1)}),w(ne),w(d),w(n),o(()=>{H(d,1,`relative w-full ${m(i).kind===`checklist`||m(i).kind===`choice`?`max-w-lg`:`max-w-md`} overflow-hidden rounded-2xl border border-hairline bg-white shadow-2xl shadow-slate-950/20`),H(x,1,`flex h-11 w-11 shrink-0 items-center justify-center rounded-full text-lg ${m(B).iconBg} ${m(B).iconColor}`),c(S,m(B).icon),c(N,m(i).opts.title),c(F,m(i).opts.message)}),U(`click`,r,A),V(3,d,()=>re,()=>({duration:140,start:.96,easing:oe})),V(3,n,()=>ie,()=>({duration:120,easing:oe})),l(t,n)};D(W,e=>{m(i)&&e(ne)}),l(t,te),R()}p([`click`,`input`,`change`]);var et=i(`<div class="untangler-sky svelte-dds6m1" aria-hidden="true"><div class="untangler svelte-dds6m1"><svg viewBox="0 0 240 110" role="img" class="svelte-dds6m1"><g class="tangle tangle-outline svelte-dds6m1"><path d="M5 55 C 32 12, 48 95, 72 32 S 116 80, 148 42 S 196 22, 232 62" class="svelte-dds6m1"></path><path d="M5 70 C 28 32, 52 95, 78 22 S 124 72, 156 44 S 200 30, 232 76" class="svelte-dds6m1"></path><path d="M5 40 C 36 82, 60 12, 92 70 S 118 30, 150 52 S 196 70, 230 30" class="svelte-dds6m1"></path><path d="M5 88 C 30 60, 48 100, 80 65 S 130 95, 165 70 S 210 88, 232 60" class="svelte-dds6m1"></path></g><g class="tangle tangle-fill svelte-dds6m1"><path d="M5 55 C 32 12, 48 95, 72 32 S 116 80, 148 42 S 196 22, 232 62" class="svelte-dds6m1"></path><path d="M5 70 C 28 32, 52 95, 78 22 S 124 72, 156 44 S 200 30, 232 76" class="svelte-dds6m1"></path><path d="M5 40 C 36 82, 60 12, 92 70 S 118 30, 150 52 S 196 70, 230 30" class="svelte-dds6m1"></path><path d="M5 88 C 30 60, 48 100, 80 65 S 130 95, 165 70 S 210 88, 232 60" class="svelte-dds6m1"></path></g><g class="clean clean-outline svelte-dds6m1"><line x1="5" y1="30" x2="232" y2="30" class="svelte-dds6m1"></line><line x1="5" y1="50" x2="232" y2="50" class="svelte-dds6m1"></line><line x1="5" y1="70" x2="232" y2="70" class="svelte-dds6m1"></line><line x1="5" y1="90" x2="232" y2="90" class="svelte-dds6m1"></line></g><g class="clean clean-fill svelte-dds6m1"><line x1="5" y1="30" x2="232" y2="30" class="svelte-dds6m1"></line><line x1="5" y1="50" x2="232" y2="50" class="svelte-dds6m1"></line><line x1="5" y1="70" x2="232" y2="70" class="svelte-dds6m1"></line><line x1="5" y1="90" x2="232" y2="90" class="svelte-dds6m1"></line></g><g class="glint svelte-dds6m1"><rect x="-18" y="18" width="14" height="78" rx="3" class="svelte-dds6m1"></rect></g></svg></div></div>`);function tt(e,t){x(t,!0);let r=[`arrowup`,`arrowup`,`arrowdown`,`arrowdown`,`arrowleft`,`arrowright`,`arrowleft`,`arrowright`,`b`,`a`],i=j(!1),a=``,o=0,s=null;function c(e){return e instanceof HTMLElement?e.isContentEditable?!0:!!e.closest(`input, textarea, select, [contenteditable='true']`):!1}function u(){L(i,!1),s&&clearTimeout(s),requestAnimationFrame(()=>{L(i,!0),s=setTimeout(()=>{L(i,!1)},5200)})}function p(e){return e===r[o]?(o+=1,o<r.length?!1:(o=0,!0)):(o=+(e===r[0]),!1)}function h(e){return e.length!==1||(a=(a+e).slice(-9),a!==`spaghetti`)?!1:(a=``,!0)}function _(e){if(c(e.target))return;let t=e.key.toLowerCase();(p(t)||h(t))&&u()}N(()=>()=>{s&&clearTimeout(s)});var v=d();n(`keydown`,g,_);var y=f(v),b=e=>{l(e,et())};D(y,e=>{m(i)&&e(b)}),l(e,v),R()}var nt=4,rt=1e4,it=e=>{if(e.op!==`delete`)switch(e.kind){case`feature`:return`/features/${e.id}`;case`project`:return`/projects/${e.id}`;case`implementation-status`:return`/features/${e.id}`}},at=800,Y=new class{#e=j(S([]));get toasts(){return m(this.#e)}set toasts(e){L(this.#e,e,!0)}nextId=1;subscribed=!1;unsubscribe=null;timers=new Map;recentKeys=new Map;deadlines=new Map;paused=new Map;start(){this.subscribed||(this.subscribed=!0,this.unsubscribe=ye(e=>this.handle(e)))}dismiss(e){this.clearTimers(e),this.toasts=this.toasts.filter(t=>t.id!==e)}clearTimers(e){let t=this.timers.get(e);t&&clearTimeout(t),this.timers.delete(e),this.deadlines.delete(e),this.paused.delete(e)}arm(e,t){let n=this.timers.get(e);n&&clearTimeout(n),this.deadlines.set(e,Date.now()+t),this.timers.set(e,setTimeout(()=>this.dismiss(e),t))}pause(e){let t=this.timers.get(e);if(t===void 0)return;clearTimeout(t),this.timers.delete(e);let n=Math.max(1e3,(this.deadlines.get(e)??Date.now())-Date.now());this.paused.set(e,n)}resume(e){if(!this.paused.has(e))return;let t=this.paused.get(e)??rt;this.paused.delete(e),this.arm(e,t)}reset(){for(let e of this.timers.values())clearTimeout(e);this.timers.clear(),this.deadlines.clear(),this.paused.clear(),this.toasts=[],this.recentKeys.clear(),this.unsubscribe&&this.unsubscribe(),this.unsubscribe=null,this.subscribed=!1}handle(e){let t=`${e.kind}:${e.id}:${e.op??`save`}`,n=Date.now(),r=this.recentKeys.get(t);if(r!==void 0&&n-r<at){this.recentKeys.set(t,n);return}this.recentKeys.set(t,n);let i=this.nextId++,a=[{id:i,kind:e.kind,entityId:e.id,name:e.name,projectName:e.projectName,op:e.op??`save`,changeOp:e.changeOp,changePath:e.changePath,previousName:e.previousName,actingFor:e.actingFor,...it(e)?{href:it(e)}:{}},...this.toasts].slice(0,nt),o=new Set(a.map(e=>e.id));for(let e of new Set([...this.timers.keys(),...this.paused.keys()]))o.has(e)||this.clearTimers(e);this.toasts=a,this.arm(i,rt)}},ot=i(`<span class="rounded bg-purple-100 px-1.5 py-0.5 text-[9px] text-purple-800"> </span>`),st=i(`<span class="shrink-0 text-slate-400" aria-hidden="true">›</span>`),ct=i(`<!> <span> </span>`,1),lt=i(`<div class="mt-0.5 truncate text-[11px] text-slate-500"> </div>`),ut=i(`<a class="rounded-md bg-white/70 px-2 py-1 text-xs font-medium text-slate-700 hover:bg-white hover:text-brand-800">View</a>`),dt=i(`<div><div class="min-w-0 flex-1"><div class="flex flex-wrap items-center gap-x-1.5 gap-y-0.5 text-[10px] font-semibold uppercase tracking-wide"><span class="text-slate-500"> </span> <!></div> <div class="mt-0.5 flex min-w-0 flex-wrap items-center gap-x-1 text-sm text-slate-900"></div> <!></div> <div class="flex shrink-0 items-center gap-1"><!> <button type="button" class="rounded-md px-1.5 py-1 text-xs text-slate-500 hover:bg-white/70 hover:text-slate-900" aria-label="Dismiss">×</button></div></div>`),ft=i(`<div class="pointer-events-none fixed top-20 right-4 z-50 flex w-full max-w-md flex-col gap-2" role="status" aria-live="polite"></div>`);function pt(t,r){x(r,!1),P(()=>{Y.start()});function i(e){switch(e){case`feature`:return`feature`;case`project`:return`project`;case`implementation-status`:return`status`}}function a(e){switch(e){case`feature`:return`border-cyan-200 bg-cyan-50`;case`project`:return`border-violet-200 bg-violet-50`;case`implementation-status`:return`border-emerald-200 bg-emerald-50`}}function s(e){if(e.op===`delete`)return`deleted`;switch(e.changeOp){case`added`:return`added`;case`removed`:return`removed`;case`renamed`:return`renamed`;case`edited`:return`edited`;case`queued`:return`queued`;case`unqueued`:return`unqueued`;case`created`:return`created`;case`deleted`:return`deleted`;default:return`saved`}}function p(e){let t=[];e.projectName&&t.push(e.projectName);let n=e.changePath?.[0],r=n!==void 0&&(e.name===n||!e.name);if(e.name&&!r&&t.push(e.name),e.changePath&&e.changePath.length>0)for(let n of e.changePath)t.push(n);else e.name&&t[t.length-1]!==e.name&&t.push(e.name);let i=[];for(let e of t)e!==`unknown`&&i[i.length-1]!==e&&i.push(e);return i.length===0&&i.push(e.entityId),i}function h(e){if(e.op!==`delete`)return Se(e.kind,e.entityId)??e.href}M();var g=d(),v=f(g),y=t=>{var r=ft();u(r,5,()=>Y.toasts,e=>e.id,(t,r)=>{let d=F(()=>p(m(r))),g=F(()=>h(m(r)));var v=dt(),y=_(v),x=_(y),S=_(x),C=_(S);w(S);var T=e(S,2),E=e=>{var t=ot(),n=_(t);w(t),o(()=>c(n,`for ${m(r).actingFor??``}`)),l(e,t)};D(T,e=>{m(r).actingFor&&e(E)}),w(x);var k=e(x,2);u(k,5,()=>m(d),O,(t,n,r)=>{var i=ct(),a=f(i),s=e=>{l(e,st())};D(a,e=>{r>0&&e(s)});var u=e(a,2),p=_(u,!0);w(u),o(()=>{H(u,1,`truncate ${r===m(d).length-1?`font-semibold`:`text-slate-600`}`),c(p,m(n))}),l(t,i)}),w(k);var A=e(k,2),j=e=>{var t=lt(),n=_(t);w(t),o(()=>c(n,`was “${m(r).previousName??``}”`)),l(e,t)};D(A,e=>{m(r).changeOp===`renamed`&&m(r).previousName&&e(j)}),w(y);var M=e(y,2),N=_(M),P=e=>{var t=ut();o(()=>b(t,`href`,m(g))),U(`click`,t,()=>Y.dismiss(m(r).id)),l(e,t)};D(N,e=>{m(g)&&e(P)});var I=e(N,2);w(M),w(v),o((e,t,n)=>{H(v,1,`pointer-events-auto flex items-start gap-3 rounded-lg border px-3 py-2 shadow-md shadow-slate-950/10 ${e??``}`),c(C,`MCP · ${t??``}
|
|
1
|
+
import{$ as e,A as t,B as n,E as r,F as i,I as a,K as o,L as s,M as c,N as l,O as u,P as d,Q as f,R as p,V as m,W as h,X as g,Z as _,a as v,b as y,d as b,dt as x,et as S,f as C,gt as w,ht as T,it as E,j as D,k as O,l as k,m as A,nt as j,o as M,q as N,r as P,rt as F,s as I,tt as L,u as ee,ut as R,v as z,vt as B,w as V,xt as te,y as H,z as U}from"../chunks/CYsLq4VE.js";import{n as W,r as ne}from"../chunks/AIVrTpgC.js";import"../chunks/xihTtKlq.js";import"../chunks/BiDFtKe6.js";import{t as G}from"../chunks/ClSw9AyG.js";import{i as re,n as ie,r as ae,t as oe}from"../chunks/BE7NaZk8.js";import{$ as se,Bt as ce,C as le,H as ue,J as de,Pt as fe,Rt as pe,U as me,h as he,t as ge,ut as _e,zt as ve}from"../chunks/PGh5ehlS.js";import"../chunks/DkAKB9py.js";import{t as ye}from"../chunks/BcjkusYG.js";import{i as be,n as xe,o as Se,r as Ce,t as we}from"../chunks/BLVBP6IJ.js";import{n as K,r as Te}from"../chunks/niJ1Cp3-.js";import{i as q}from"../chunks/BGoS2INr.js";import{n as Ee,t as De}from"../chunks/DNgDuvXX.js";import{n as Oe}from"../chunks/CGWhvtMz.js";import{t as ke}from"../chunks/DsJUUSRq.js";import{t as Ae}from"../chunks/BPm18m-Y.js";import{a as je,c as Me,i as Ne,n as Pe,o as Fe,r as J,t as Ie}from"../chunks/Cuj9IeTJ.js";import{t as Le}from"../chunks/dCZwRRKS.js";import{n as Re}from"../chunks/Qgm526At.js";var ze=te({prerender:()=>!1,ssr:()=>!1,trailingSlash:()=>Be}),Be=`never`,Ve=i(`<span class="mt-1 block text-xs leading-relaxed opacity-80"> </span>`),He=i(`<li class="flex"><button type="button"><span class="min-w-0 flex-1"><span class="block text-sm"> </span> <!></span> <span aria-hidden="true" class="shrink-0 text-base transition group-hover:translate-x-1">→</span></button></li>`),Ue=i(`<div class="px-7 pt-2 pb-5"><ul class="flex max-h-80 flex-col gap-3 overflow-y-auto"></ul></div>`),We=i(`<p class="mt-2 text-xs font-medium text-red-700"> </p>`),Ge=i(`<div class="px-7 pt-1 pb-4"><label class="block text-xs font-medium text-slate-700"> <input autocorrect="off" autocapitalize="off" spellcheck="false" class="mono mt-1 h-10 w-full rounded-md border border-slate-300 bg-white px-3 text-sm outline-none focus:border-brand-700 focus:ring-2 focus:ring-brand-100"/></label> <!></div>`),Ke=i(`<span class="mt-0.5 block text-xs text-slate-500"> </span>`),qe=i(`<li><label class="flex cursor-pointer items-start gap-3 rounded-md px-2 py-2 transition hover:bg-white"><input type="checkbox"/> <span class="min-w-0 flex-1"><span class="block text-sm font-medium text-slate-900"> </span> <!></span></label></li>`),Je=i(`<div class="border-t border-hairline px-6 py-3"><div class="mb-2 flex items-center justify-between"><span class="text-xs font-medium uppercase tracking-wide text-slate-500"> </span> <div class="flex gap-2 text-xs"><button type="button" class="font-medium text-slate-600 hover:text-slate-950">Select all</button> <span class="text-slate-300">·</span> <button type="button" class="font-medium text-slate-600 hover:text-slate-950">Select none</button></div></div> <ul class="max-h-72 space-y-1.5 overflow-y-auto rounded-lg border border-hairline bg-slate-50 p-2"></ul></div>`),Ye=i(`<button type="button"> </button>`),Xe=i(`<button type="button" class="rounded-md px-3 py-2 text-sm text-slate-600 transition hover:text-slate-950"> </button>`),Ze=i(`<button type="button" class="rounded-md border border-slate-300 bg-white px-4 py-2 text-sm text-slate-700 transition hover:bg-slate-100"> </button> <button type="button"> </button>`,1),Qe=i(`<div class="fixed inset-0 z-100 flex items-center justify-center px-4" role="presentation"><button type="button" aria-label="Dismiss" class="absolute inset-0 bg-slate-950/40 backdrop-blur-sm"></button> <div role="dialog" aria-modal="true" aria-labelledby="app-dialog-title" aria-describedby="app-dialog-message"><div class="flex gap-4 px-7 pt-7 pb-5"><div> </div> <div class="min-w-0 flex-1 pt-1"><h2 id="app-dialog-title" class="text-lg leading-tight text-slate-950"> </h2> <p id="app-dialog-message" class="mt-2 whitespace-pre-line text-sm leading-relaxed text-slate-600"> </p></div></div> <!> <div class="flex justify-end gap-2 border-t border-hairline bg-slate-50 px-7 py-3"><!></div></div></div>`);function $e(t,r){x(r,!0);let i=E(()=>ve.current),a=j(S(new Set)),s=j(``),p=j(null),h=j(null);N(()=>{m(i)?.kind===`checklist`?L(a,new Set(m(i).opts.items.filter(e=>e.defaultChecked).map(e=>e.id)),!0):L(a,new Set,!0),m(i)?.kind===`prompt`?(L(s,m(i).opts.defaultValue??``,!0),L(p,null),queueMicrotask(()=>m(h)?.focus())):(L(s,``),L(p,null))});function v(e){let t=new Set(m(a));t.has(e)?t.delete(e):t.add(e),L(a,t,!0)}function y(){m(i)?.kind===`checklist`&&L(a,new Set(m(i).opts.items.map(e=>e.id)),!0)}function O(){L(a,new Set,!0)}function A(){m(i)?.kind===`prompt`?ve.resolvePrompt(null):ve.resolveCurrent(!1)}function M(){if(m(i)?.kind===`checklist`)ve.resolveCurrent(!0,Array.from(m(a)));else if(m(i)?.kind===`prompt`){let e=m(s),t=m(i).opts.validate?m(i).opts.validate(e):null;if(t){L(p,t,!0);return}ve.resolvePrompt(e)}else ve.resolveCurrent(!0)}function P(e){m(i)&&(e.key===`Escape`?(e.preventDefault(),A()):e.key===`Enter`&&m(i).kind!==`checklist`&&(e.preventDefault(),M()))}let F={default:{icon:`?`,iconBg:`bg-slate-100`,iconColor:`text-slate-700`,confirmBtn:`bg-slate-900 hover:bg-slate-800 text-white`,check:`accent-slate-700`},danger:{icon:`!`,iconBg:`bg-rose-50`,iconColor:`text-rose-600`,confirmBtn:`bg-rose-600 hover:bg-rose-500 text-white`,check:`accent-rose-600`},info:{icon:`i`,iconBg:`bg-brand-50`,iconColor:`text-brand-700`,confirmBtn:`bg-brand-700 hover:bg-brand-600 text-white`,check:`accent-brand-700`},success:{icon:`✓`,iconBg:`bg-emerald-50`,iconColor:`text-emerald-600`,confirmBtn:`bg-emerald-600 hover:bg-emerald-500 text-white`,check:`accent-emerald-600`},warning:{icon:`!`,iconBg:`bg-amber-50`,iconColor:`text-amber-600`,confirmBtn:`bg-amber-600 hover:bg-amber-500 text-white`,check:`accent-amber-600`}},z=E(()=>m(i)?.opts.tone??(m(i)?.kind===`alert`?`info`:`default`)),B=E(()=>F[m(z)]);var te=d();n(`keydown`,g,P);var W=f(te),ne=t=>{var n=Qe(),r=_(n),d=e(r,2),g=_(d),x=_(g),S=_(x,!0);w(x);var E=e(x,2),j=_(E),N=_(j,!0);w(j);var P=e(j,2),F=_(P,!0);w(P),w(E),w(g);var R=e(g,2),z=t=>{var n=Ue(),r=_(n);u(r,21,()=>m(i).opts.options,e=>e.id,(t,n)=>{var r=He(),i=_(r),a=_(i),s=_(a),u=_(s,!0);w(s);var d=e(s,2),f=e=>{var t=Ve(),r=_(t,!0);w(t),o(()=>c(r,m(n).description)),l(e,t)};D(d,e=>{m(n).description&&e(f)}),w(a),T(2),w(i),w(r),o(()=>{H(i,1,`group flex w-full items-center justify-between gap-4 rounded-xl px-5 py-4 text-left shadow-sm shadow-slate-950/5 transition hover:shadow-md focus:ring-2 focus:ring-offset-2 focus:outline-none ${m(B).confirmBtn}`),c(u,m(n).label)}),U(`click`,i,()=>ve.resolveChoice(m(n).id)),l(t,r)}),w(r),w(n),l(t,n)},te=t=>{var n=Ge(),r=_(n),a=_(r),u=e(a);ee(u),I(u,e=>L(h,e),()=>m(h)),w(r);var d=e(r,2),f=e=>{var t=We(),n=_(t,!0);w(t),o(()=>c(n,m(p))),l(e,t)};D(d,e=>{m(p)&&e(f)}),w(n),o(()=>{c(a,`${m(i).opts.inputLabel??`Value`??``} `),b(u,`type`,m(i).opts.password?`password`:`text`),b(u,`autocomplete`,m(i).opts.password?`new-password`:`off`),b(u,`placeholder`,m(i).opts.placeholder??``)}),U(`input`,u,()=>L(p,null)),k(u,()=>m(s),e=>L(s,e)),l(t,n)},W=t=>{var n=Je(),r=_(n),s=_(r),d=_(s);w(s);var f=e(s,2),p=_(f),h=e(p,4);w(f),w(r);var g=e(r,2);u(g,21,()=>m(i).opts.items,e=>e.id,(t,n)=>{var r=qe(),i=_(r),s=_(i);ee(s);var u=e(s,2),d=_(u),f=_(d,!0);w(d);var p=e(d,2),h=e=>{var t=Ke(),r=_(t,!0);w(t),o(()=>c(r,m(n).description)),l(e,t)};D(p,e=>{m(n).description&&e(h)}),w(u),w(i),w(r),o(e=>{H(s,1,`mt-0.5 h-4 w-4 rounded ${m(B).check}`),C(s,e),c(f,m(n).label)},[()=>m(a).has(m(n).id)]),U(`change`,s,()=>v(m(n).id)),l(t,r)}),w(g),w(n),o(()=>c(d,`${m(a).size??``} of ${m(i).opts.items.length??``} selected`)),U(`click`,p,y),U(`click`,h,O),l(t,n)};D(R,e=>{m(i).kind===`choice`?e(z):m(i).kind===`prompt`?e(te,1):m(i).kind===`checklist`&&e(W,2)});var ne=e(R,2),G=_(ne),ae=e=>{var t=Ye(),n=_(t,!0);w(t),o(()=>{H(t,1,`rounded-md px-4 py-2 text-sm transition ${m(B).confirmBtn}`),c(n,m(i).opts.buttonLabel??`OK`)}),U(`click`,t,A),l(e,t)},se=e=>{var t=Xe(),n=_(t,!0);w(t),o(()=>c(n,m(i).opts.cancelLabel??`Close`)),U(`click`,t,A),l(e,t)},ce=t=>{var n=Ze(),r=f(n),a=_(r,!0);w(r);var s=e(r,2),u=_(s,!0);w(s),o(()=>{c(a,m(i).opts.cancelLabel??`Cancel`),H(s,1,`rounded-md px-4 py-2 text-sm transition focus:ring-2 focus:ring-offset-2 focus:outline-none ${m(B).confirmBtn}`),c(u,m(i).opts.confirmLabel??`Confirm`)}),U(`click`,r,A),U(`click`,s,M),l(t,n)};D(G,e=>{m(i).kind===`alert`?e(ae):m(i).kind===`choice`?e(se,1):e(ce,-1)}),w(ne),w(d),w(n),o(()=>{H(d,1,`relative w-full ${m(i).kind===`checklist`||m(i).kind===`choice`?`max-w-lg`:`max-w-md`} overflow-hidden rounded-2xl border border-hairline bg-white shadow-2xl shadow-slate-950/20`),H(x,1,`flex h-11 w-11 shrink-0 items-center justify-center rounded-full text-lg ${m(B).iconBg} ${m(B).iconColor}`),c(S,m(B).icon),c(N,m(i).opts.title),c(F,m(i).opts.message)}),U(`click`,r,A),V(3,d,()=>re,()=>({duration:140,start:.96,easing:oe})),V(3,n,()=>ie,()=>({duration:120,easing:oe})),l(t,n)};D(W,e=>{m(i)&&e(ne)}),l(t,te),R()}p([`click`,`input`,`change`]);var et=i(`<div class="untangler-sky svelte-dds6m1" aria-hidden="true"><div class="untangler svelte-dds6m1"><svg viewBox="0 0 240 110" role="img" class="svelte-dds6m1"><g class="tangle tangle-outline svelte-dds6m1"><path d="M5 55 C 32 12, 48 95, 72 32 S 116 80, 148 42 S 196 22, 232 62" class="svelte-dds6m1"></path><path d="M5 70 C 28 32, 52 95, 78 22 S 124 72, 156 44 S 200 30, 232 76" class="svelte-dds6m1"></path><path d="M5 40 C 36 82, 60 12, 92 70 S 118 30, 150 52 S 196 70, 230 30" class="svelte-dds6m1"></path><path d="M5 88 C 30 60, 48 100, 80 65 S 130 95, 165 70 S 210 88, 232 60" class="svelte-dds6m1"></path></g><g class="tangle tangle-fill svelte-dds6m1"><path d="M5 55 C 32 12, 48 95, 72 32 S 116 80, 148 42 S 196 22, 232 62" class="svelte-dds6m1"></path><path d="M5 70 C 28 32, 52 95, 78 22 S 124 72, 156 44 S 200 30, 232 76" class="svelte-dds6m1"></path><path d="M5 40 C 36 82, 60 12, 92 70 S 118 30, 150 52 S 196 70, 230 30" class="svelte-dds6m1"></path><path d="M5 88 C 30 60, 48 100, 80 65 S 130 95, 165 70 S 210 88, 232 60" class="svelte-dds6m1"></path></g><g class="clean clean-outline svelte-dds6m1"><line x1="5" y1="30" x2="232" y2="30" class="svelte-dds6m1"></line><line x1="5" y1="50" x2="232" y2="50" class="svelte-dds6m1"></line><line x1="5" y1="70" x2="232" y2="70" class="svelte-dds6m1"></line><line x1="5" y1="90" x2="232" y2="90" class="svelte-dds6m1"></line></g><g class="clean clean-fill svelte-dds6m1"><line x1="5" y1="30" x2="232" y2="30" class="svelte-dds6m1"></line><line x1="5" y1="50" x2="232" y2="50" class="svelte-dds6m1"></line><line x1="5" y1="70" x2="232" y2="70" class="svelte-dds6m1"></line><line x1="5" y1="90" x2="232" y2="90" class="svelte-dds6m1"></line></g><g class="glint svelte-dds6m1"><rect x="-18" y="18" width="14" height="78" rx="3" class="svelte-dds6m1"></rect></g></svg></div></div>`);function tt(e,t){x(t,!0);let r=[`arrowup`,`arrowup`,`arrowdown`,`arrowdown`,`arrowleft`,`arrowright`,`arrowleft`,`arrowright`,`b`,`a`],i=j(!1),a=``,o=0,s=null;function c(e){return e instanceof HTMLElement?e.isContentEditable?!0:!!e.closest(`input, textarea, select, [contenteditable='true']`):!1}function u(){L(i,!1),s&&clearTimeout(s),requestAnimationFrame(()=>{L(i,!0),s=setTimeout(()=>{L(i,!1)},5200)})}function p(e){return e===r[o]?(o+=1,o<r.length?!1:(o=0,!0)):(o=+(e===r[0]),!1)}function h(e){return e.length!==1||(a=(a+e).slice(-9),a!==`spaghetti`)?!1:(a=``,!0)}function _(e){if(c(e.target))return;let t=e.key.toLowerCase();(p(t)||h(t))&&u()}N(()=>()=>{s&&clearTimeout(s)});var v=d();n(`keydown`,g,_);var y=f(v),b=e=>{l(e,et())};D(y,e=>{m(i)&&e(b)}),l(e,v),R()}var nt=4,rt=1e4,it=e=>{if(e.op!==`delete`)switch(e.kind){case`feature`:return`/features/${e.id}`;case`project`:return`/projects/${e.id}`;case`implementation-status`:return`/features/${e.id}`}},at=800,Y=new class{#e=j(S([]));get toasts(){return m(this.#e)}set toasts(e){L(this.#e,e,!0)}nextId=1;subscribed=!1;unsubscribe=null;timers=new Map;recentKeys=new Map;deadlines=new Map;paused=new Map;start(){this.subscribed||(this.subscribed=!0,this.unsubscribe=ye(e=>this.handle(e)))}dismiss(e){this.clearTimers(e),this.toasts=this.toasts.filter(t=>t.id!==e)}clearTimers(e){let t=this.timers.get(e);t&&clearTimeout(t),this.timers.delete(e),this.deadlines.delete(e),this.paused.delete(e)}arm(e,t){let n=this.timers.get(e);n&&clearTimeout(n),this.deadlines.set(e,Date.now()+t),this.timers.set(e,setTimeout(()=>this.dismiss(e),t))}pause(e){let t=this.timers.get(e);if(t===void 0)return;clearTimeout(t),this.timers.delete(e);let n=Math.max(1e3,(this.deadlines.get(e)??Date.now())-Date.now());this.paused.set(e,n)}resume(e){if(!this.paused.has(e))return;let t=this.paused.get(e)??rt;this.paused.delete(e),this.arm(e,t)}reset(){for(let e of this.timers.values())clearTimeout(e);this.timers.clear(),this.deadlines.clear(),this.paused.clear(),this.toasts=[],this.recentKeys.clear(),this.unsubscribe&&this.unsubscribe(),this.unsubscribe=null,this.subscribed=!1}handle(e){let t=`${e.kind}:${e.id}:${e.op??`save`}`,n=Date.now(),r=this.recentKeys.get(t);if(r!==void 0&&n-r<at){this.recentKeys.set(t,n);return}this.recentKeys.set(t,n);let i=this.nextId++,a=[{id:i,kind:e.kind,entityId:e.id,name:e.name,projectName:e.projectName,op:e.op??`save`,changeOp:e.changeOp,changePath:e.changePath,previousName:e.previousName,actingFor:e.actingFor,...it(e)?{href:it(e)}:{}},...this.toasts].slice(0,nt),o=new Set(a.map(e=>e.id));for(let e of new Set([...this.timers.keys(),...this.paused.keys()]))o.has(e)||this.clearTimers(e);this.toasts=a,this.arm(i,rt)}},ot=i(`<span class="rounded bg-purple-100 px-1.5 py-0.5 text-[9px] text-purple-800"> </span>`),st=i(`<span class="shrink-0 text-slate-400" aria-hidden="true">›</span>`),ct=i(`<!> <span> </span>`,1),lt=i(`<div class="mt-0.5 truncate text-[11px] text-slate-500"> </div>`),ut=i(`<a class="rounded-md bg-white/70 px-2 py-1 text-xs font-medium text-slate-700 hover:bg-white hover:text-brand-800">View</a>`),dt=i(`<div><div class="min-w-0 flex-1"><div class="flex flex-wrap items-center gap-x-1.5 gap-y-0.5 text-[10px] font-semibold uppercase tracking-wide"><span class="text-slate-500"> </span> <!></div> <div class="mt-0.5 flex min-w-0 flex-wrap items-center gap-x-1 text-sm text-slate-900"></div> <!></div> <div class="flex shrink-0 items-center gap-1"><!> <button type="button" class="rounded-md px-1.5 py-1 text-xs text-slate-500 hover:bg-white/70 hover:text-slate-900" aria-label="Dismiss">×</button></div></div>`),ft=i(`<div class="pointer-events-none fixed top-20 right-4 z-50 flex w-full max-w-md flex-col gap-2" role="status" aria-live="polite"></div>`);function pt(t,r){x(r,!1),P(()=>{Y.start()});function i(e){switch(e){case`feature`:return`feature`;case`project`:return`project`;case`implementation-status`:return`status`}}function a(e){switch(e){case`feature`:return`border-cyan-200 bg-cyan-50`;case`project`:return`border-violet-200 bg-violet-50`;case`implementation-status`:return`border-emerald-200 bg-emerald-50`}}function s(e){if(e.op===`delete`)return`deleted`;switch(e.changeOp){case`added`:return`added`;case`removed`:return`removed`;case`renamed`:return`renamed`;case`edited`:return`edited`;case`queued`:return`queued`;case`unqueued`:return`unqueued`;case`created`:return`created`;case`deleted`:return`deleted`;default:return`saved`}}function p(e){let t=[];e.projectName&&t.push(e.projectName);let n=e.changePath?.[0],r=n!==void 0&&(e.name===n||!e.name);if(e.name&&!r&&t.push(e.name),e.changePath&&e.changePath.length>0)for(let n of e.changePath)t.push(n);else e.name&&t[t.length-1]!==e.name&&t.push(e.name);let i=[];for(let e of t)e!==`unknown`&&i[i.length-1]!==e&&i.push(e);return i.length===0&&i.push(e.entityId),i}function h(e){if(e.op!==`delete`)return Se(e.kind,e.entityId)??e.href}M();var g=d(),v=f(g),y=t=>{var r=ft();u(r,5,()=>Y.toasts,e=>e.id,(t,r)=>{let d=F(()=>p(m(r))),g=F(()=>h(m(r)));var v=dt(),y=_(v),x=_(y),S=_(x),C=_(S);w(S);var T=e(S,2),E=e=>{var t=ot(),n=_(t);w(t),o(()=>c(n,`for ${m(r).actingFor??``}`)),l(e,t)};D(T,e=>{m(r).actingFor&&e(E)}),w(x);var k=e(x,2);u(k,5,()=>m(d),O,(t,n,r)=>{var i=ct(),a=f(i),s=e=>{l(e,st())};D(a,e=>{r>0&&e(s)});var u=e(a,2),p=_(u,!0);w(u),o(()=>{H(u,1,`truncate ${r===m(d).length-1?`font-semibold`:`text-slate-600`}`),c(p,m(n))}),l(t,i)}),w(k);var A=e(k,2),j=e=>{var t=lt(),n=_(t);w(t),o(()=>c(n,`was “${m(r).previousName??``}”`)),l(e,t)};D(A,e=>{m(r).changeOp===`renamed`&&m(r).previousName&&e(j)}),w(y);var M=e(y,2),N=_(M),P=e=>{var t=ut();o(()=>b(t,`href`,m(g))),U(`click`,t,()=>Y.dismiss(m(r).id)),l(e,t)};D(N,e=>{m(g)&&e(P)});var I=e(N,2);w(M),w(v),o((e,t,n)=>{H(v,1,`pointer-events-auto flex items-start gap-3 rounded-lg border px-3 py-2 shadow-md shadow-slate-950/10 ${e??``}`),c(C,`MCP · ${t??``}
|
|
2
2
|
${n??``}`)},[()=>a(m(r).kind),()=>s(m(r)),()=>i(m(r).kind)]),n(`mouseenter`,v,()=>Y.pause(m(r).id)),n(`mouseleave`,v,()=>Y.resume(m(r).id)),U(`focusin`,v,()=>Y.pause(m(r).id)),U(`focusout`,v,()=>Y.resume(m(r).id)),U(`click`,I,()=>Y.dismiss(m(r).id)),V(1,v,()=>ae,()=>({x:24,duration:180,easing:oe})),V(2,v,()=>ie,()=>({duration:140})),l(t,v)}),w(r),l(t,r)};D(v,e=>{Y.toasts.length>0&&e(y)}),l(t,g),R()}p([`focusin`,`focusout`,`click`]);var mt=e=>{let t=j(null),n=j(null);if(!e)return{get element(){return m(t)},get rect(){return m(n)},dispose(){}};let r=null,i=e=>{L(n,e?e.getBoundingClientRect():null,!0)},a=()=>{let n=document.querySelector(e);n!==r&&(r=n,L(t,n,!0)),i(n)};a();let o=new MutationObserver(a);o.observe(document.body,{childList:!0,subtree:!0});let s=0,c=()=>{s||=requestAnimationFrame(()=>{s=0,r&&i(r)})},l=new ResizeObserver(c);r&&l.observe(r);let u=new MutationObserver(()=>{l.disconnect(),r&&l.observe(r)});u.observe(document.body,{childList:!0,subtree:!0});let d=()=>c(),f=()=>c();return window.addEventListener(`scroll`,d,!0),window.addEventListener(`resize`,f),{get element(){return m(t)},get rect(){return m(n)},dispose(){s&&cancelAnimationFrame(s),o.disconnect(),u.disconnect(),l.disconnect(),window.removeEventListener(`scroll`,d,!0),window.removeEventListener(`resize`,f)}}},ht=(e,t)=>{let n=e instanceof HTMLTextAreaElement?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`)?.set;r?r.call(e,t):e.value=t,e.dispatchEvent(new Event(`input`,{bubbles:!0})),e.dispatchEvent(new Event(`change`,{bubbles:!0}))},gt=e=>{let t=[];for(let n of e){let e=document.querySelector(n.selector);if(!e){t.push(n);continue}e.value.length===0&&ht(e,n.value)}return t},_t=e=>{let t=new WeakSet,n=()=>{e.matches(`:popover-open`)&&e.hidePopover(),e.showPopover()},r=new MutationObserver(r=>{if(!e.matches(`:popover-open`))return;let i=!1;for(let e of r){if(e.type!==`attributes`||e.attributeName!==`open`)continue;let n=e.target;n instanceof HTMLDialogElement&&(n.hasAttribute(`open`)?t.has(n)||(t.add(n),i=!0):t.delete(n))}i&&n()});return r.observe(document.body,{subtree:!0,attributes:!0,attributeFilter:[`open`]}),{dispose(){r.disconnect()}}},vt=i(`<div class="mt-3 rounded-md border border-amber-200 bg-amber-50 px-2.5 py-2 text-[11px] text-amber-900"><p class="mb-1.5 font-medium">First, head to the right page.</p> <button type="button" class="rounded-md bg-slate-900 px-2.5 py-1 text-[11px] font-medium text-white hover:bg-slate-800"> </button></div>`),yt=i(`<p class="mt-3 text-[10px] italic text-slate-500">Click the highlighted element to continue.</p>`),bt=i(`<p class="mt-3 text-[10px] italic text-slate-500">Do the action above to continue.</p>`),xt=i(`<p class="mt-3 text-[10px] italic text-amber-700">Finish the action above first, then click Next.</p>`),St=i(`<aside popover="manual" class="fixed z-1010 m-0 w-80 max-w-[calc(100vw-3rem)] rounded-xl border border-brand-200 bg-white p-4 shadow-2xl shadow-slate-950/20 transition-[top,left,bottom,right] duration-200" aria-label="Interactive tutorial"><header class="mb-2 flex items-start justify-between gap-3"><div class="min-w-0"><p class="text-[10px] font-semibold uppercase tracking-wide text-brand-700"> </p> <h3 class="mt-0.5 text-sm font-semibold text-slate-950"> </h3></div> <button type="button" class="rounded-md px-1.5 py-0.5 text-xs text-slate-400 hover:bg-slate-100 hover:text-slate-700" aria-label="Exit tutorial" title="Exit tutorial">x</button></header> <p class="whitespace-pre-line text-xs leading-5 text-slate-700"> </p> <!> <footer class="mt-3 flex items-center justify-between gap-2"><button type="button" class="rounded-md p-1 text-slate-500 hover:bg-slate-100 hover:text-slate-800 disabled:cursor-not-allowed disabled:opacity-30" aria-label="Previous step" title="Back">←</button> <button type="button" class="rounded-md border border-slate-300 bg-white px-2.5 py-1 text-[11px] font-medium text-slate-600 hover:bg-slate-50">Exit</button> <button type="button" class="rounded-md bg-brand-700 px-3 py-1 text-[11px] font-semibold text-white hover:bg-brand-800 disabled:cursor-not-allowed disabled:bg-slate-300"> </button></footer></aside>`);function Ct(t,n){x(n,!0);let r=j(null);N(()=>{n.panelEl?.(m(r))});let i=E(()=>n.stepNumber===1),a=E(()=>n.stepNumber===n.totalSteps),s=E(()=>{switch(n.placement.kind){case`bottom-right`:return`bottom: 1.5rem; right: 1.5rem; left: auto; top: auto;`;case`bottom-left`:return`bottom: 1.5rem; left: 1.5rem; right: auto; top: auto;`;case`absolute`:return`top: ${n.placement.top}px; left: ${n.placement.left}px; bottom: auto; right: auto;`}});var u=St(),d=_(u),f=_(d),p=_(f),h=_(p);w(p);var g=e(p,2),v=_(g,!0);w(g),w(f);var y=e(f,2);w(d);var S=e(d,2),C=_(S,!0);w(S);var T=e(S,2),O=t=>{var r=vt(),i=e(_(r),2),a=_(i);w(i),w(r),o(()=>c(a,`${n.step.route.label??``} →`)),U(`click`,i,function(...e){n.onGoToRoute?.apply(this,e)}),l(t,r)},k=e=>{l(e,yt())},A=e=>{l(e,bt())},M=e=>{l(e,xt())};D(T,e=>{!n.onCorrectRoute&&n.step.route?e(O):n.step.advance.kind===`click`?e(k,1):n.step.advance.kind===`event`?e(A,2):n.step.advance.kind===`manual`&&!n.nextEnabled&&e(M,3)});var P=e(T,2),F=_(P),ee=e(F,2),B=e(ee,2),V=_(B);w(B),w(P),w(u),I(u,e=>L(r,e),()=>m(r)),o(()=>{z(u,m(s)),c(h,`Tutorial · step ${n.stepNumber??``} of ${n.totalSteps??``}`),c(v,n.step.title),c(C,n.step.body),F.disabled=m(i),B.disabled=!n.nextEnabled,b(B,`title`,n.nextEnabled?m(a)?`Finish the tour`:`Next step`:`Finish the current action first`),c(V,`${m(a)?`Finish`:`Next`} →`)}),U(`click`,y,function(...e){n.onExit?.apply(this,e)}),U(`click`,F,function(...e){n.onPrev?.apply(this,e)}),U(`click`,ee,function(...e){n.onExit?.apply(this,e)}),U(`click`,B,function(...e){n.onNext?.apply(this,e)}),l(t,u),R()}p([`click`]);var wt=i(`<div class="pointer-events-none fixed z-20 rounded-lg ring-4 ring-brand-400 ring-offset-2 ring-offset-transparent" aria-hidden="true"></div>`),Tt=i(`<div class="pointer-events-none fixed inset-0 z-20 bg-slate-950/55" aria-hidden="true"></div> <button type="button" class="pointer-events-auto fixed left-1/2 top-20 z-1015 inline-flex -translate-x-1/2 items-center gap-2 rounded-full border border-brand-300 bg-white px-4 py-2 text-xs font-semibold text-brand-800 shadow-lg shadow-slate-950/30 animate-pulse hover:bg-brand-50" aria-label="Scroll up to see highlighted element"><span aria-hidden="true">↑</span> <span>Highlight is above — click to scroll up</span></button>`,1),Et=i(`<div class="pointer-events-none fixed inset-0 z-20 bg-slate-950/55" aria-hidden="true"></div> <button type="button" class="pointer-events-auto fixed left-1/2 bottom-24 z-1015 inline-flex -translate-x-1/2 items-center gap-2 rounded-full border border-brand-300 bg-white px-4 py-2 text-xs font-semibold text-brand-800 shadow-lg shadow-slate-950/30 animate-pulse hover:bg-brand-50" aria-label="Scroll down to see highlighted element"><span>Highlight is below — click to scroll down</span> <span aria-hidden="true">↓</span></button>`,1),Dt=i(`<div class="pointer-events-none fixed inset-0 z-20 bg-slate-950/55" aria-hidden="true"></div>`);function Ot(t,n){x(n,!0);let r=j(0);N(()=>{let e=()=>{L(r,window.innerHeight,!0)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)});let i=E(()=>n.rect?{top:n.rect.top-10,left:n.rect.left-10,width:n.rect.width+20,height:n.rect.height+20}:null),a=E(()=>!n.rect||m(r)===0?null:n.rect.bottom<64?`above`:n.rect.top>m(r)?`below`:`visible`);var s=d(),c=f(s),u=e=>{var t=wt();o(()=>z(t,`top: ${m(i).top??``}px; left: ${m(i).left??``}px; width: ${m(i).width??``}px; height: ${m(i).height??``}px; box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.55);`)),l(e,t)},p=t=>{var n=Tt();U(`click`,e(f(n),2),()=>window.scrollBy({top:-window.innerHeight*.7,behavior:`smooth`})),l(t,n)},h=t=>{var n=Et();U(`click`,e(f(n),2),()=>window.scrollBy({top:window.innerHeight*.7,behavior:`smooth`})),l(t,n)},g=e=>{l(e,Dt())};D(c,e=>{m(i)&&m(a)===`visible`?e(u):m(i)&&m(a)===`above`?e(p,1):m(i)&&m(a)===`below`?e(h,2):e(g,-1)}),l(t,s),R()}p([`click`]);var kt=i(`<!> <!>`,1);function At(t,n){x(n,!0);let r=E(()=>K.currentStep),i=E(()=>m(r)?.route?G.url?.pathname===m(r).route.pathname:!0),a=j(null);N(()=>{let e=mt(m(i)?m(r)?.target??null:null);return L(a,e,!0),()=>e.dispose()});let o=E(()=>m(a)?.rect??null),s=E(()=>{if(typeof window>`u`)return{kind:`bottom-right`};let e=m(r)?.panelPosition??`bottom-right`;if(e===`avoid-target`)return m(o)&&m(o).left+m(o).width/2>window.innerWidth/2?{kind:`bottom-left`}:{kind:`bottom-right`};if(e===`below-target`&&m(o)){let e=m(o).bottom+16;if(e+220>window.innerHeight-16)return{kind:`bottom-right`};let t=m(o).left+m(o).width/2-320/2;return{kind:`absolute`,top:e,left:Math.max(16,Math.min(t,window.innerWidth-320-16))}}return{kind:`bottom-right`}}),c=E(()=>!m(r)||m(r).advance.kind!==`manual`?!1:m(r).canAdvance?m(r).canAdvance():!0);N(()=>{let e=m(a)?.element;e&&e.scrollIntoView({behavior:`smooth`,block:`center`})}),N(()=>{let e=m(r);if(!e?.focusSelector||!m(i))return;let t=e.focusSelector,n=!1,a=0,o=()=>{if(n||a++>60)return;let e=document.querySelector(t);if(e){e.focus(),(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&e.select();return}requestAnimationFrame(o)};return requestAnimationFrame(o),()=>{n=!0}}),N(()=>{if(!m(r)?.lockScroll)return;let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}}),N(()=>{if(!m(r)?.target||K.stepIndex===0)return;let e=!1,t=null,n=!1,i=setInterval(()=>{n||(m(a)?.element==null?e&&!t&&(t=setTimeout(()=>K.previous(),500)):(e=!0,t&&=(clearTimeout(t),null)))},150);return()=>{n=!0,clearInterval(i),t&&clearTimeout(t)}}),N(()=>{let e=m(r);if(!e||e.advance.kind!==`click`)return;let t=e.advance.selector,n=e=>{let n=e.target;n instanceof Element&&n.closest(t)&&setTimeout(()=>K.next(),0)};return document.addEventListener(`click`,n,!0),()=>document.removeEventListener(`click`,n,!0)}),N(()=>{let e=m(r);if(!e?.prefill||e.prefill.length===0||!m(i))return;let t=[...e.prefill],n=0,a=!1,o=()=>{a||(t=gt(t),t.length>0&&(n=requestAnimationFrame(o)))};return o(),()=>{a=!0,n&&cancelAnimationFrame(n)}});let u=j(null);N(()=>{m(u)&&(m(r)&&!m(u).matches(`:popover-open`)&&m(u).showPopover(),!m(r)&&m(u).matches(`:popover-open`)&&m(u).hidePopover())}),N(()=>{if(!m(u))return;let e=_t(m(u));return()=>e.dispose()});function p(){m(r)?.route&&ne(m(r).route.pathname)}var h=d(),g=f(h),_=t=>{var n=kt(),a=f(n),d=e=>{Ot(e,{get rect(){return m(o)}})};D(a,e=>{m(i)&&e(d)});var h=e(a,2);{let e=E(()=>K.stepIndex+1);Ct(h,{get step(){return m(r)},get stepNumber(){return m(e)},get totalSteps(){return K.totalSteps},get onCorrectRoute(){return m(i)},get placement(){return m(s)},get nextEnabled(){return m(c)},panelEl:e=>L(u,e,!0),onGoToRoute:p,onPrev:()=>K.previous(),onNext:()=>K.next(),onExit:()=>K.cancel()})}l(t,n)};D(g,e=>{m(r)&&e(_)}),l(t,h),R()}var jt=i(`<div class="border-b border-brand-200/70 bg-brand-50/80"><div class="mx-auto flex max-w-7xl flex-col gap-2 px-4 py-2.5 sm:px-6 md:flex-row md:items-center md:gap-4"><p class="min-w-0 flex-1 text-sm leading-5 text-slate-700"><span class="font-semibold text-slate-900">New here?</span> Take the 3-minute interactive tour: build a tiny feature and run it in the simulator, right
|
|
3
3
|
in this app.</p> <div class="flex shrink-0 flex-wrap items-center gap-2"><button type="button" class="rounded-md bg-brand-700 px-3 py-1.5 text-xs font-semibold text-white shadow-sm shadow-slate-950/10 transition hover:bg-brand-800">Start the tour</button> <button type="button" class="rounded-md border border-brand-300 bg-white px-3 py-1.5 text-xs font-medium text-brand-800 transition hover:bg-brand-100 disabled:cursor-wait disabled:opacity-70"> </button> <a href="/tutorial" class="rounded-md px-2 py-1.5 text-xs font-medium text-brand-800 underline-offset-2 transition hover:underline">Read the guide</a> <button type="button" class="grid h-7 w-7 place-items-center rounded-md text-slate-500 transition hover:bg-brand-100 hover:text-slate-800" aria-label="Dismiss the getting-started banner" title="Don't show this again (the Help page keeps these shortcuts)"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4" aria-hidden="true"><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg></button></div></div></div>`);function Mt(t,n){x(n,!0);let r=E(()=>G.url.pathname.startsWith(`/tutorial`)||G.url.pathname.startsWith(`/builder-mode`)),i=E(()=>Te.showBanner&&!K.isActive&&!m(r)),a=j(!1);async function s(){if(!m(a)){L(a,!0);try{await De()}finally{L(a,!1)}}}var u=d(),p=f(u),h=t=>{var n=jt(),r=_(n),i=e(_(r),2),u=_(i),d=e(u,2),f=_(d,!0);w(d);var p=e(d,4);w(i),w(r),w(n),o(()=>{d.disabled=m(a),c(f,m(a)?`Loading...`:`Load sample project`)}),U(`click`,u,()=>K.start(Ee)),U(`click`,d,s),U(`click`,p,()=>Te.dismiss()),l(t,n)};D(p,e=>{m(i)&&e(h)}),l(t,u),R()}p([`click`]);var Nt=`unspa.globalQueue`,X=new class{#e=j(null);get projectId(){return m(this.#e)}set projectId(e){L(this.#e,e,!0)}#t=j(``);get projectName(){return m(this.#t)}set projectName(e){L(this.#t,e,!0)}#n=j(S([]));get views(){return m(this.#n)}set views(e){L(this.#n,e,!0)}#r=j(null);get error(){return m(this.#r)}set error(e){L(this.#r,e,!0)}#i=j(!1);get open(){return m(this.#i)}set open(e){L(this.#i,e,!0)}hydrated=!1;init(){if(!this.hydrated){this.hydrated=!0;try{let e=localStorage.getItem(Nt);if(!e)return;let t=JSON.parse(e);typeof t.projectId==`string`&&(this.projectId=t.projectId),typeof t.projectName==`string`&&(this.projectName=t.projectName),typeof t.open==`boolean`&&(this.open=t.open)}catch{}this.refresh()}}persist(){try{if(!this.projectId){localStorage.removeItem(Nt);return}let e={projectId:this.projectId,projectName:this.projectName,open:this.open};localStorage.setItem(Nt,JSON.stringify(e))}catch{}}setActiveProject(e,t){let n=this.projectId!==e;this.projectId=e,t&&(this.projectName=t),n&&this.persist()}setOpen(e){this.open=e,this.persist()}toggleOpen(){this.setOpen(!this.open)}async refresh(){let e=this.projectId;if(!e){this.views=[];return}try{let t=await ge();this.views=await t.useCases.listQueue(he(e)),this.error=null}catch(e){this.views=[],this.error=e.message}}async dequeue(e){await this.mutate((t,n)=>t.useCases.dequeueQueueItem(he(n),e))}async moveTo(e,t){await this.mutate((n,r)=>n.useCases.moveQueueItem(he(r),e,{kind:`to`,targetIndex:t}))}async mutate(e){let t=this.projectId;if(t){this.error=null;try{let n=await e(await ge(),t);this.syncLoadedStores(n),await this.refresh()}catch(e){this.error=e.message}}}syncLoadedStores(e){let t=String(e.id);ke.project&&String(ke.project.id)===t&&(ke.project=e),Ae.project&&String(Ae.project.id)===t&&(Ae.project=e)}},Pt=i(`<p class="mt-0.5 truncate text-xs text-slate-500"> </p>`),Ft=i(`<p class="mb-2 rounded-md border border-red-200 bg-red-50 px-3 py-2 text-xs text-red-700"> </p>`),It=i(`<div class="rounded-lg border border-dashed border-slate-300 bg-slate-50/60 p-5 text-center text-xs text-slate-500"><p class="font-medium text-slate-700">Nothing queued yet.</p> <p class="mt-1">Hover any Feature card, Surface, or Action and click <span class="font-semibold text-brand-700">+ queue</span> to plan what to implement next.</p></div>`),Lt=i(`<a class="font-medium text-slate-900 hover:text-brand-800 hover:underline"> </a> <span class="text-xs text-slate-500"> </span>`,1),Rt=i(`<a class="font-medium text-slate-900 hover:text-brand-800 hover:underline"> </a>`),zt=i(`<span class="block truncate text-xs text-slate-500"> </span>`),Bt=i(`<span class="shrink-0 rounded bg-amber-100 px-1.5 py-0.5 text-[10px] font-semibold text-amber-800" title="Target was deleted from the spec">orphan</span>`),Vt=i(`<li draggable="true"><span class="cursor-grab select-none text-slate-300 transition-colors group-hover:text-slate-500 active:cursor-grabbing" aria-hidden="true" title="Drag to reorder">⋮⋮</span> <span class="w-5 shrink-0 text-right text-[11px] tabular-nums text-slate-400"> </span> <span> </span> <div class="min-w-0 flex-1 truncate"><!> <!></div> <!> <div class="flex shrink-0 items-center gap-0.5 opacity-0 transition group-hover:opacity-100 group-focus-within:opacity-100"><button type="button" class="rounded px-1 text-xs text-slate-400 hover:bg-slate-100 hover:text-slate-700 disabled:cursor-not-allowed disabled:opacity-30" aria-label="Move up" title="Move up">↑</button> <button type="button" class="rounded px-1 text-xs text-slate-400 hover:bg-slate-100 hover:text-slate-700 disabled:cursor-not-allowed disabled:opacity-30" aria-label="Move down" title="Move down">↓</button> <button type="button" class="rounded px-1 text-xs text-slate-400 hover:bg-red-50 hover:text-red-600" aria-label="Remove from queue" title="Remove from queue">✕</button></div></li>`),Ht=i(`<ul class="space-y-1.5"></ul>`),Ut=i(`<section class="fixed bottom-5 right-5 z-40 flex max-h-[70vh] w-[min(92vw,380px)] flex-col overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-2xl shadow-slate-950/15 ring-1 ring-slate-950/5"><header class="flex shrink-0 items-start justify-between gap-3 border-b border-slate-200 bg-slate-50 px-4 py-3"><div class="min-w-0"><div class="flex items-center gap-2"><span class="text-brand-600" aria-hidden="true">▶</span> <h2 class="text-sm font-semibold text-slate-800">Implementation queue</h2> <span class="rounded-full bg-brand-600 px-2 py-0.5 text-xs font-bold tabular-nums text-white"> </span></div> <!></div> <button type="button" class="-mr-1 shrink-0 rounded-md p-1 text-slate-400 transition hover:bg-slate-200 hover:text-slate-700" aria-label="Minimize implementation queue" title="Minimize"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4" aria-hidden="true"><path d="M6 9l6 6 6-6"></path></svg></button></header> <div class="min-h-0 flex-1 overflow-y-auto p-3"><!> <!></div></section>`),Wt=i(`<button type="button" class="group fixed bottom-5 right-5 z-40 flex items-center gap-2 rounded-full border border-slate-200 bg-white py-2.5 pl-4 pr-3 text-sm font-semibold text-slate-800 shadow-xl shadow-slate-950/15 ring-1 ring-slate-950/5 transition hover:border-brand-400 hover:shadow-brand-500/15" aria-label="Open implementation queue" title="Implementation queue"><span class="text-brand-600 transition group-hover:translate-x-0.5" aria-hidden="true">▶</span> Queue <span class="rounded-full bg-brand-600 px-2 py-0.5 text-xs font-bold tabular-nums text-white"> </span></button>`);function Gt(t,r){x(r,!0);let i=typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,a=e=>i?0:e;X.init(),N(()=>{let e=ke.project??Ae.project;e?.implementationQueue,h(()=>{e&&X.setActiveProject(String(e.id),e.name),X.refresh()})}),P(()=>ye(e=>{X.projectId&&(e.kind===`project`||e.kind===`feature`)&&X.refresh()}));let s=j(null),p=j(null);function g(e,t){L(s,t,!0),e.dataTransfer&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,String(t)))}function v(e,t){m(s)!==null&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`),L(p,t,!0))}async function y(e,t){e.preventDefault();let n=m(s);L(s,null),L(p,null),n&&await X.moveTo(n,t)}function S(){L(s,null),L(p,null)}async function C(e,t){let n=X.views.findIndex(t=>t.item.id===e);n<0||await X.moveTo(e,n+t)}async function T(e){await X.dequeue(e)}var O=d(),k=f(O),A=t=>{var r=Ut(),i=_(r),d=_(i),h=_(d),x=e(_(h),4),O=_(x,!0);w(x),w(h);var k=e(h,2),A=e=>{var t=Pt(),n=_(t,!0);w(t),o(()=>{b(t,`title`,X.projectName),c(n,X.projectName)}),l(e,t)};D(k,e=>{X.projectName&&e(A)}),w(d);var j=e(d,2);w(i);var M=e(i,2),N=_(M),P=e=>{var t=Ft(),n=_(t,!0);w(t),o(()=>c(n,X.error)),l(e,t)};D(N,e=>{X.error&&e(P)});var F=e(N,2),I=e=>{l(e,It())},L=t=>{var r=Ht();u(r,23,()=>X.views,e=>e.item.id,(t,r,i)=>{let a=E(()=>m(r).item.id),u=E(()=>m(s)===m(a)),d=E(()=>m(p)===m(i)&&m(s)!==null&&m(s)!==m(a));var h=Vt(),x=e(_(h),2),O=_(x);w(x);var k=e(x,2),A=_(k,!0);w(k);var j=e(k,2),M=_(j),N=t=>{var n=Lt(),i=f(n),a=_(i,!0);w(i);var s=e(i,2),u=_(s);w(s),o(()=>{b(i,`href`,`/features/${m(r).item.featureId}`),c(a,m(r).actionName??`(unnamed action)`),c(u,`· ${m(r).featureName??``}`)}),l(t,n)},P=t=>{var n=Lt(),i=f(n),a=_(i,!0);w(i);var s=e(i,2),u=_(s);w(s),o(()=>{b(i,`href`,`/features/${m(r).item.featureId}`),c(a,m(r).surfaceName??`(unnamed surface)`),c(u,`· ${m(r).featureName??``}`)}),l(t,n)},F=e=>{var t=Rt(),n=_(t,!0);w(t),o(()=>{b(t,`href`,`/features/${m(r).item.featureId}`),c(n,m(r).featureName)}),l(e,t)};D(M,e=>{m(r).item.kind===`action`?e(N):m(r).item.kind===`surface`?e(P,1):e(F,-1)});var I=e(M,2),L=e=>{var t=zt(),n=_(t,!0);w(t),o(()=>c(n,m(r).item.note)),l(e,t)};D(I,e=>{m(r).item.note&&e(L)}),w(j);var ee=e(j,2),R=e=>{l(e,Bt())};D(ee,e=>{m(r).orphaned&&e(R)});var z=e(ee,2),B=_(z),V=e(B,2),te=e(V,2);w(z),w(h),o(()=>{H(h,1,`group flex items-center gap-2 rounded-md border bg-white px-2 py-1.5 text-sm transition
|
|
4
4
|
${m(r).orphaned?`border-amber-200 bg-amber-50/40`:`border-slate-200`}
|
|
Binary file
|
|
Binary file
|