elanous 0.2.24 → 0.2.25
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/apps/pwa/out/404/index.html +1 -1
- package/apps/pwa/out/404.html +1 -1
- package/apps/pwa/out/_next/static/chunks/1027.a0f04663d24c2779.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1038.676007ae505822e7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1113.a37eadf7f740d955.js +1 -0
- package/apps/pwa/out/_next/static/chunks/112-fa7c526c20ce1405.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1144.5fa1fa1d48dbcd12.js +36 -0
- package/apps/pwa/out/_next/static/chunks/1146.80d15ea7c6e6ee95.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1157.f08bf2b70915e176.js +148 -0
- package/apps/pwa/out/_next/static/chunks/119b405e.8fdd0e44d1ff37aa.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1296.04560d98e73fbf51.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1314-f604ba013ec535b0.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1454-37fd16f479f5554a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1464.f3209af0d8ae4ff2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{8532.a86e99acf9b761cb.js → 1516.83dd2c1b86b4e507.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/{89849432.9eaa2f4c9c010965.js → 16e57f67.3ea19e893461e611.js} +3 -3
- package/apps/pwa/out/_next/static/chunks/1729-d73dd25e564679d4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{1505.5826671109111e75.js → 1743.563d3168e95825ef.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/1843.5924c24295243261.js +27 -0
- package/apps/pwa/out/_next/static/chunks/1987.e28149724b92918b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2066-5ca18ffa5a4be68b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2240.d10a66695155fd93.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2391.e2cbc98d4abbb41a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2528.3868070ef1be69f9.js +24 -0
- package/apps/pwa/out/_next/static/chunks/2566-734cb83bbd405886.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2697.76ca2ac3efef6f3b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/275.0e6bad414729bfa0.js +32 -0
- package/apps/pwa/out/_next/static/chunks/2803-33bdae771855a8d1.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2846.d6a433b8663819a5.js +309 -0
- package/apps/pwa/out/_next/static/chunks/3143.257997a5f1ed79df.js +34 -0
- package/apps/pwa/out/_next/static/chunks/{5967-c0a80f8ffe5d4050.js → 3259-86f3be56e43eaf6a.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/3280-e177c33bfbdcfb0a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3294-2b6a6d45a46a6c1c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3309.364573ceedbdfd5f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3522.758840fc5e7fe630.js +287 -0
- package/apps/pwa/out/_next/static/chunks/3525-a7c989c1a661e880.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3694.b1a66387756458c0.js +1 -0
- package/apps/pwa/out/_next/static/chunks/370.124f9e678a76fc01.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3797-9643105335e660fe.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{5578.ac963634373b28c6.js → 4084.15ecaf4240bd9e77.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/4089-b3382b8843114eee.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{8438.ee7f0df3b3f6fcb4.js → 4204.a409ab6250c0f6a8.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/4293.928a8d573c16aab7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4402.f9238a3b18a7bd43.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4490-9b090b0f9427f902.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4548.13502d0ca3b4f862.js +8 -0
- package/apps/pwa/out/_next/static/chunks/4565-67e4c620597965c8.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{7905.b230b9d06cb4ad5d.js → 4593.10f5b9bd702d4a6c.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/4599-548bc96cda44a5a7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4625.206574e33a9e7ae8.js +104 -0
- package/apps/pwa/out/_next/static/chunks/4862-392c9a71f0d8dfb4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5054.2906d1b02542edc5.js +149 -0
- package/apps/pwa/out/_next/static/chunks/{8569.b853a8daa8f31d12.js → 5081.a240b63fad28663a.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/5102-c822bbbee5a022a4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5194-8c93f2e7e4b6f717.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5305-bacd7eca0b9a5848.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5311.9071ee3f44fd7ff5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5369.9f34353442daa421.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{2528.0af5c0e1fad88df6.js → 5408.377c8c543635b81f.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/{9502-32c5dc22e8f120f5.js → 5492-e05e26a033ba80d2.js} +3 -3
- package/apps/pwa/out/_next/static/chunks/5785-ea8d2c633b6688e3.js +1 -0
- package/apps/pwa/out/_next/static/chunks/589-49d730cb8138b397.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5904-264a6412ae3c9028.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5980.728531d5c566535c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/599-a914cc0468f56143.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6011.f525002e21bef0ac.js +23 -0
- package/apps/pwa/out/_next/static/chunks/6132.4381ab93683f1acf.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6149.2e698635e454d8f6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{5974.360f8441eb0ac1ec.js → 6196.34d6b229079e9e28.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/6356-0afafc4230cf9767.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6406.64756073f7df35b8.js +77 -0
- package/apps/pwa/out/_next/static/chunks/6479-16e62aedafa0e310.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6599.b5246b46a2453329.js +64 -0
- package/apps/pwa/out/_next/static/chunks/{ce383d63.d2ede338788ed18e.js → 65ebff95.081daeff622d238e.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/6610.5c26eec011565acb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/666.37d18474edc1c552.js +2 -0
- package/apps/pwa/out/_next/static/chunks/6904.a0b5b1ed4f2d2c20.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{83cfc5c8.349535543c1548b6.js → 6def8a8e.c81f9ca41028eccf.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/7247-1f4aba94aba50d9f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7274-e71a7c5b7760cd02.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7290.1fcaeef3adb5d0d4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7477-2c64e42760f82f33.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{2721.bc9a8f36bd85c07a.js → 7483.ba01c6c209b81bba.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/7505-47002b76ff1aef6c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7600-11884ca4da68e5d9.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7607.40d8bb3689697ccb.js +62 -0
- package/apps/pwa/out/_next/static/chunks/{6702.ebbd165d5e4a4a14.js → 7752.5cbdd0b433c54af9.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/7763.f51fcc19ca1414ec.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7785.846140c859b1adf6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7807-a0fdac6393e0bf36.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7837-20a63b4b7e9342b1.js +1 -0
- package/apps/pwa/out/_next/static/chunks/800.7815414cf280545d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{8925-2abfb48af477fb7f.js → 8085-1e5fce59500a2cc2.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/8100.415f2105faa63e97.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8290.701aa42ed13aa767.js +226 -0
- package/apps/pwa/out/_next/static/chunks/{b4e12462-5fab4a813a63dadd.js → 83a80514-b897b64df43ce108.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/8444.d9c74214a3145a43.js +93 -0
- package/apps/pwa/out/_next/static/chunks/8569.98c915534928c7f9.js +24 -0
- package/apps/pwa/out/_next/static/chunks/{8264.00e434fbd02e9311.js → 8578.dff22d988cc2b106.js} +3 -3
- package/apps/pwa/out/_next/static/chunks/8591.b1c7f876e5ec7cfb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8715-f63756021d3ab989.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8879.776c2ec7732aa114.js +115 -0
- package/apps/pwa/out/_next/static/chunks/8881.ddca15b3c82c490c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8946.5da5c87f32a2e1a8.js +41 -0
- package/apps/pwa/out/_next/static/chunks/9117.080b9b75be90e14d.js +74 -0
- package/apps/pwa/out/_next/static/chunks/9167.f3ecb28f367d6e69.js +94 -0
- package/apps/pwa/out/_next/static/chunks/9224.66095370ee28c93b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9238-0682b013c83d6449.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{7518.49161e8f5814abdb.js → 9311.24c8f5ea793253dd.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/{9976.8f28864317639fe6.js → 94.4cfed21c0b781a06.js} +3 -3
- package/apps/pwa/out/_next/static/chunks/9449.d3ed795da4befb1c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/949.1e7d45ccb71580aa.js +90 -0
- package/apps/pwa/out/_next/static/chunks/9638-d268329f2c6f4f8d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{0e3acd34.d42b2ef87fdf4234.js → 973cbf1b.3bbcf2b41548eca7.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/9842-d6644eb53d3dc6bf.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9863.94ca3263e760696e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{6571-926ddf024a6ad5df.js → 9917-9e26abc5f7772735.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/9938.b23e4d4dfa0114cd.js +79 -0
- package/apps/pwa/out/_next/static/chunks/{740.90b31555290236a9.js → 9974.e77b4ff4884557b3.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/{4c5e95ce.83e9b16add6fcd8c.js → ab4d57c2.e90bc2cb31949045.js} +7 -7
- package/apps/pwa/out/_next/static/chunks/app/_not-found/page-d9babd8795f396a5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/approvals/page-9360b1285b2a346e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/autopilot/page-f08f6529d09ffae1.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/board/page-f000d54d258f9ef6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/botlab/{page-24282bf9f90031a5.js → page-b12149c51f7d04b1.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/bots/page-22f674e7e4c2c9d5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ceo/page-8888733e40cea6d1.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/chat/page-9717ec6964b92276.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/consult/page-44eaad486bc98a45.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/control/page-97fa6cf3d34c7eb9.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/decisions/page-305cd294e754906e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-dea4b795741126fd.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/editor/page-35e05d7450461a67.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/exec/page-45889e7070d11126.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/field/page-16a2e893f83ae4d0.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/healthz/route-d9babd8795f396a5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/inside/page-b2638013c0bf7dfd.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/intake/page-56888bc744e08dac.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/layout-c44f93a41167536f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/live/page-952c6ceec6d9de38.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/live-run/page-6d0202af568f4c63.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/loops/page-1b810474507f3702.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/market/page-74366ae2693a7d95.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-4fb6fc34e20c07b7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/morning/page-e9502921f4f01b1f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/not-found-b6169ea2f09cf287.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/observatory/page-6a14333d1b1b3967.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-8c91a9a66c9ec90a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ops/release/{page-1d809a87139dd024.js → page-4e634c5b98fd4e93.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-ed3070d637850548.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/outputs/{page-b92caddb5c715f30.js → page-b9cc8a10bc6078b4.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/page-3d3fc73dd187ed52.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/reflection/page-128458c8d86fbb5f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/scheduler/page-9c04dac0831c2bbb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/sessions/page-cf0c2b0183991d09.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-04de9ca6d52a3893.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/settings/page-62527677bbc2fdc4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/done/page-9a2e09c4a311764c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/layout-d9babd8795f396a5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/page-bfeb35d69e8b24bb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/share/page-89cb33bced824e4a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/showroom/page-b008aff96be56654.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/tasks/page-814394dcbae789b1.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/term/page-6a87325c87f09dd2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/today/page-6445ac4cbb8dd869.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/trace/page-852170303c6cd755.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/vault/page-087ceeb975ef272b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-97c7361cc2a19319.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workflows/page-20162174b77f96cf.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workspace/page-8c6901833f897496.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-05a4b2c9b91034aa.js +1 -0
- package/apps/pwa/out/_next/static/chunks/dcf24383-2f82e35f2d827393.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{53746282.1be36038d1abd949.js → e117f801.e92bf10242653497.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/e87d89b9.2e71c0ae475d28a1.js +122 -0
- package/apps/pwa/out/_next/static/chunks/{0673cc54.8e2ef1c23e49e190.js → f4dfbfc0.a69fb12f854882aa.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/framework-bf135b997155e90e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/main-5571537543bea91c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/main-app-25c51c7df7f3a442.js +1 -0
- package/apps/pwa/out/_next/static/chunks/pages/_app-e3b2c1f5d82abd65.js +1 -0
- package/apps/pwa/out/_next/static/chunks/pages/_error-083f2e23e9bc3641.js +1 -0
- package/apps/pwa/out/_next/static/chunks/webpack-e94d22b7a028217b.js +1 -0
- package/apps/pwa/out/_next/static/{Q-7iofoxOEv1WX18S35of → dRS6lEhSRRBr1abbzp7fJ}/_buildManifest.js +1 -1
- package/apps/pwa/out/approvals/index.html +1 -1
- package/apps/pwa/out/approvals/index.txt +22 -22
- package/apps/pwa/out/autopilot/index.html +1 -1
- package/apps/pwa/out/autopilot/index.txt +22 -22
- package/apps/pwa/out/board/index.html +1 -1
- package/apps/pwa/out/board/index.txt +22 -22
- package/apps/pwa/out/botlab/index.html +1 -1
- package/apps/pwa/out/botlab/index.txt +21 -21
- package/apps/pwa/out/bots/index.html +1 -1
- package/apps/pwa/out/bots/index.txt +21 -21
- package/apps/pwa/out/ceo/index.html +1 -1
- package/apps/pwa/out/ceo/index.txt +22 -22
- package/apps/pwa/out/chat/index.html +1 -1
- package/apps/pwa/out/chat/index.txt +21 -21
- package/apps/pwa/out/consult/index.html +1 -1
- package/apps/pwa/out/consult/index.txt +22 -22
- package/apps/pwa/out/control/index.html +1 -1
- package/apps/pwa/out/control/index.txt +22 -22
- package/apps/pwa/out/decisions/index.html +1 -1
- package/apps/pwa/out/decisions/index.txt +21 -21
- package/apps/pwa/out/design-check/index.html +1 -1
- package/apps/pwa/out/design-check/index.txt +22 -22
- package/apps/pwa/out/editor/index.html +1 -1
- package/apps/pwa/out/editor/index.txt +22 -22
- package/apps/pwa/out/exec/index.html +1 -1
- package/apps/pwa/out/exec/index.txt +22 -22
- package/apps/pwa/out/field/index.html +1 -1
- package/apps/pwa/out/field/index.txt +22 -22
- package/apps/pwa/out/healthz +1 -1
- package/apps/pwa/out/index.html +1 -1
- package/apps/pwa/out/index.txt +21 -21
- package/apps/pwa/out/inside/index.html +1 -1
- package/apps/pwa/out/inside/index.txt +21 -21
- package/apps/pwa/out/intake/index.html +1 -1
- package/apps/pwa/out/intake/index.txt +22 -22
- package/apps/pwa/out/live/index.html +1 -1
- package/apps/pwa/out/live/index.txt +22 -22
- package/apps/pwa/out/live-run/index.html +1 -1
- package/apps/pwa/out/live-run/index.txt +22 -22
- package/apps/pwa/out/loops/index.html +1 -1
- package/apps/pwa/out/loops/index.txt +21 -21
- package/apps/pwa/out/market/index.html +1 -1
- package/apps/pwa/out/market/index.txt +21 -21
- package/apps/pwa/out/missions/placeholder/index.html +1 -1
- package/apps/pwa/out/missions/placeholder/index.txt +21 -21
- package/apps/pwa/out/morning/index.html +1 -1
- package/apps/pwa/out/morning/index.txt +22 -22
- package/apps/pwa/out/observatory/index.html +1 -1
- package/apps/pwa/out/observatory/index.txt +22 -22
- package/apps/pwa/out/ops/checklist/index.html +1 -1
- package/apps/pwa/out/ops/checklist/index.txt +21 -21
- package/apps/pwa/out/ops/release/index.html +1 -1
- package/apps/pwa/out/ops/release/index.txt +21 -21
- package/apps/pwa/out/ops/seats/index.html +1 -1
- package/apps/pwa/out/ops/seats/index.txt +21 -21
- package/apps/pwa/out/outputs/index.html +1 -1
- package/apps/pwa/out/outputs/index.txt +21 -21
- package/apps/pwa/out/reflection/index.html +1 -1
- package/apps/pwa/out/reflection/index.txt +22 -22
- package/apps/pwa/out/scheduler/index.html +1 -1
- package/apps/pwa/out/scheduler/index.txt +22 -22
- package/apps/pwa/out/sessions/index.html +1 -1
- package/apps/pwa/out/sessions/index.txt +21 -21
- package/apps/pwa/out/settings/devices/index.html +1 -1
- package/apps/pwa/out/settings/devices/index.txt +22 -22
- package/apps/pwa/out/settings/index.html +1 -1
- package/apps/pwa/out/settings/index.txt +22 -22
- package/apps/pwa/out/setup/done/index.html +1 -1
- package/apps/pwa/out/setup/done/index.txt +22 -22
- package/apps/pwa/out/setup/index.html +1 -1
- package/apps/pwa/out/setup/index.txt +22 -22
- package/apps/pwa/out/share/index.html +1 -1
- package/apps/pwa/out/share/index.txt +22 -22
- package/apps/pwa/out/showroom/index.html +1 -1
- package/apps/pwa/out/showroom/index.txt +21 -21
- package/apps/pwa/out/tasks/index.html +1 -1
- package/apps/pwa/out/tasks/index.txt +22 -22
- package/apps/pwa/out/term/index.html +1 -1
- package/apps/pwa/out/term/index.txt +22 -22
- package/apps/pwa/out/today/index.html +1 -1
- package/apps/pwa/out/today/index.txt +22 -22
- package/apps/pwa/out/trace/index.html +1 -1
- package/apps/pwa/out/trace/index.txt +22 -22
- package/apps/pwa/out/vault/index.html +1 -1
- package/apps/pwa/out/vault/index.txt +22 -22
- package/apps/pwa/out/workflows/chat-ui/index.html +1 -1
- package/apps/pwa/out/workflows/chat-ui/index.txt +22 -22
- package/apps/pwa/out/workflows/index.html +1 -1
- package/apps/pwa/out/workflows/index.txt +22 -22
- package/apps/pwa/out/workspace/index.html +1 -1
- package/apps/pwa/out/workspace/index.txt +22 -22
- package/apps/pwa/out/worktrees/index.html +1 -1
- package/apps/pwa/out/worktrees/index.txt +22 -22
- package/graphs/release/release-loop.yaml +5 -5
- package/graphs/steward/recipes.yaml +4 -0
- package/graphs/steward/steward.yaml +10 -1
- package/package.json +1 -1
- package/scripts/bench-report.ts +46 -1
- package/scripts/ci-typecheck-changed.ts +7 -5
- package/scripts/release-loop/auto-approve-node.ts +6 -0
- package/scripts/release-loop/gate-closure.ts +286 -0
- package/scripts/release-loop/gate-node.ts +73 -13
- package/scripts/release-loop/gate-partial.ts +34 -6
- package/scripts/release-loop/ops-upgrade-node.ts +63 -42
- package/scripts/release-loop/publish-node.ts +6 -0
- package/scripts/release-loop/resume-release.ts +37 -10
- package/scripts/release-loop/resume.ts +69 -4
- package/scripts/tsc-baseline-cache.ts +28 -3
- package/scripts/usage-rollup.ts +27 -13
- package/scripts/ux-sim.ts +30 -1
- package/skills/youtube-master/scripts/main.ts +4 -1
- package/skills/youtube-master/src/obsidian.ts +9 -0
- package/src/agent-substrate/acp-implementer.ts +14 -7
- package/src/agent-substrate/pr-reviewer.ts +30 -10
- package/src/agent-substrate/self-review-cli.ts +126 -10
- package/src/budget/cost-tier-advisor.ts +91 -0
- package/src/budget/shadow-arms.ts +77 -0
- package/src/budget/types.ts +5 -3
- package/src/budget/unified-usage.ts +172 -8
- package/src/cli/doctor-cli.ts +21 -0
- package/src/cli/friendly-errors.ts +113 -0
- package/src/cli/intake-cli.ts +3 -1
- package/src/cli/memory-cli.ts +182 -0
- package/src/cli/model-watch-cli.ts +4 -1
- package/src/cli/pr-land-pod-shadow.ts +54 -0
- package/src/cli/release-cli.ts +9 -7
- package/src/cli/release-run-if-ready.ts +11 -0
- package/src/cli/resource-cli.ts +48 -0
- package/src/cli/retro-cli.ts +12 -3
- package/src/cli/seat-requests-cli.ts +25 -0
- package/src/cli/tasks-cli.ts +31 -7
- package/src/cli/usage-cli.ts +3 -1
- package/src/compact/verify-probe.ts +23 -3
- package/src/context-card/index.ts +50 -0
- package/src/control/control-status.ts +30 -1
- package/src/dashboard/slash-runtime/dashboard-handlers.ts +4 -138
- package/src/dashboard/slash-runtime/shell-slash.ts +145 -0
- package/src/debug/log-diet.ts +16 -4
- package/src/domains/morning-essential.ts +18 -3
- package/src/domains/release-tool.ts +4 -0
- package/src/execution-loop/launch-gate.ts +158 -2
- package/src/fleet/host-doctor.ts +375 -0
- package/src/goals/judge.ts +20 -6
- package/src/graph-runner/runner.ts +9 -5
- package/src/graph-wizard/archetypes.ts +14 -8
- package/src/graph-wizard/generate.ts +77 -1
- package/src/grok.ts +13 -7
- package/src/harness/harness-cli-command.ts +56 -47
- package/src/harness/harness-stop.ts +82 -12
- package/src/index.ts +17 -175
- package/src/intake-plane/collect-github.ts +7 -2
- package/src/intake-plane/lens.ts +46 -4
- package/src/intake-plane/requirement-funnel.ts +53 -1
- package/src/intelligence-map/catalog-feed.ts +119 -0
- package/src/intelligence-map/model-watch-intake.ts +40 -0
- package/src/intelligence-map/model-watch-mission.ts +14 -1
- package/src/llm/open-weight-discipline.ts +21 -0
- package/src/llm.ts +4 -8
- package/src/maturity/feature-maturity.ts +1 -1
- package/src/nexus/api/http-server.ts +22 -0
- package/src/oauth/codex-account-rotation.ts +4 -1
- package/src/oauth/codex-account-store.ts +20 -7
- package/src/oauth/codex-quota-policy.ts +33 -4
- package/src/preview/terminal.ts +15 -5
- package/src/project/project-store.ts +20 -0
- package/src/release-loop/auto-start.ts +7 -5
- package/src/release-loop/checklist.ts +11 -1
- package/src/release-loop/gate-shards.ts +4 -0
- package/src/release-loop/light-rc.ts +84 -13
- package/src/release-loop/merged-pr-checklist.ts +35 -5
- package/src/release-loop/rehearsal.ts +1 -1
- package/src/seat-loop/duty-ledger.ts +64 -0
- package/src/self-dev/decompose.ts +37 -3
- package/src/self-dev/dev-pipeline.ts +32 -7
- package/src/self-dev/draft-residue.ts +16 -6
- package/src/self-dev/draft-sweep.ts +52 -4
- package/src/self-dev/fabric-decompose-adapter.ts +9 -2
- package/src/self-dev/run-supervisor.ts +37 -7
- package/src/self-implement/gate-cli.ts +29 -10
- package/src/self-implement/gate-remote.ts +4 -1
- package/src/self-implement/goal-author.ts +12 -2
- package/src/self-implement/goal-new-paths.ts +42 -0
- package/src/self-implement/host-regate.ts +124 -30
- package/src/self-implement/importer-test-index.ts +3 -1
- package/src/self-implement/l8-merge-queue.ts +80 -2
- package/src/self-implement/merge-train.ts +19 -0
- package/src/self-implement/off-diff-evidence.ts +40 -1
- package/src/self-implement/orchestrator.ts +88 -19
- package/src/self-implement/premise-review.ts +159 -0
- package/src/self-implement/regate-detail.ts +79 -0
- package/src/self-implement/review-deferred-to-host.ts +21 -0
- package/src/self-implement/rework-budget-judgment.ts +23 -3
- package/src/self-implement/running-runs.ts +2 -2
- package/src/self-implement/scope-adjacency.ts +23 -0
- package/src/self-implement/seams.ts +42 -7
- package/src/skills/tools/agent.ts +16 -1
- package/src/skills/tools/persistent-grounding.ts +11 -1
- package/src/skills/tools/shell.ts +33 -1
- package/src/steward/rejudge-tick.ts +142 -0
- package/src/task-agent/board.ts +92 -3
- package/src/task-agent/card-evidence.ts +88 -1
- package/src/task-agent/cover.ts +65 -0
- package/src/task-agent/parent-host.ts +27 -3
- package/src/task-agent/rejudge-on-head.ts +151 -7
- package/src/task-agent/review-result-capture.ts +3 -1
- package/src/task-agent/shadow.ts +12 -0
- package/src/task-agent/task-hand.ts +4 -1
- package/src/task-orchestrator/surfaces/pod-command-job.ts +14 -0
- package/src/task-orchestrator/surfaces/pod-host-acp-review.ts +122 -0
- package/src/task-orchestrator/surfaces/pod-manifest-test-normalize.ts +23 -0
- package/src/task-orchestrator/surfaces/pod-pool.ts +53 -0
- package/src/task-orchestrator/surfaces/self-implement-pod.ts +235 -28
- package/src/user-config.ts +18 -4
- package/src/ux-sim/fault-cred-expiry.ts +100 -0
- package/src/ux-sim/fault-pod-death.ts +74 -0
- package/src/ux-sim/fault-pool-cap.ts +81 -0
- package/src/version/packed-revision.json +1 -1
- package/src/webclone/qa-table.ts +22 -0
- package/apps/pwa/out/_next/static/chunks/0a09e062-34f747a17d8d8c2e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1168.a0fb3d9db76c00bd.js +0 -77
- package/apps/pwa/out/_next/static/chunks/1325-dc3f3c21eb181cb4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1357.a843c41d2cd7ec31.js +0 -34
- package/apps/pwa/out/_next/static/chunks/1430.53f49882b17607c2.js +0 -24
- package/apps/pwa/out/_next/static/chunks/1459-be6509b3419d8a9f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/153.0a4e3cd516930491.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1572.7bc291352e241a45.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1593-d07ad068c120dfb0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1608.b7c900baa56cab32.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1615-4d8156febaac4b35.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1646.e03f0fbc26bc72f6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1669-da843ed73aa301f5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/176.13ba0659e3e96fd4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1990.9c60f495ef33c070.js +0 -36
- package/apps/pwa/out/_next/static/chunks/2042e469.f86158dd5c1e51a1.js +0 -122
- package/apps/pwa/out/_next/static/chunks/2543-28ec6aeb80a5e1e1.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2561.43c99d6ee914ee6a.js +0 -62
- package/apps/pwa/out/_next/static/chunks/2638.b39ab2f674caa1a5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/272-0eed0fb0aab716b6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2778.67e0c1d484189ccf.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2841.10ff309f6a3168af.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2886-9639f97d523d752a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2978.57fb87ce21cc5a85.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3664.15f968c39d15bd28.js +0 -149
- package/apps/pwa/out/_next/static/chunks/3786-935eb3fcde90e496.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3813.df4a01ae89c6f63f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3961-aaae04ed1d32622f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3992.f79c70480e8c4077.js +0 -309
- package/apps/pwa/out/_next/static/chunks/40-413e8641de9ed1e5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4054-521f11a503daed64.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4315.e7356f34c7d8ec79.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4489-bf629de6f04f7681.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4540.557733cc88c6a82b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/462.0275b4338c5b6337.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4658-7ed9266098a787e4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4945-0f4046cfc3228ea3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5105-18b4165c5d3a86b0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5205-6992210fe31f45f4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5287-72898b126d722457.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5313.1697309c532b9856.js +0 -2
- package/apps/pwa/out/_next/static/chunks/5474.991b90688c3cb321.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5544-871146192d095594.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5935.d5e8ca3e096772e8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6006.84e8b418a7a0db97.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6013-1267ba7454d6764b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6038-1e0f7ee1086da4cf.js +0 -1
- package/apps/pwa/out/_next/static/chunks/617.709dd0019fe99796.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6261.fb9bf94947094636.js +0 -74
- package/apps/pwa/out/_next/static/chunks/6411.1966866fae31ffa9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6481-b829d99aa8d158f5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6541.2b7daa043100d0fa.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6597.2d7a6d77ab485b27.js +0 -64
- package/apps/pwa/out/_next/static/chunks/67.5dd2dc543c2fa3de.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6777-312496b0d774719b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/681.0116f7036cfb4e8d.js +0 -32
- package/apps/pwa/out/_next/static/chunks/6871.30b2bf23b3126e36.js +0 -24
- package/apps/pwa/out/_next/static/chunks/6882.737d366d54e29d83.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7035.54c2c535164b1c9b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7086-8bfa7e8f796a03d9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7126.5e5599f251726b67.js +0 -93
- package/apps/pwa/out/_next/static/chunks/7203-47ff0740a293e284.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7268.017f49dafb5f0ff3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7355.5d65a87e9567ae08.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7392.4018c2a62177f296.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7471.3a3d1be50559cfb8.js +0 -148
- package/apps/pwa/out/_next/static/chunks/7500.73489a345cef2201.js +0 -226
- package/apps/pwa/out/_next/static/chunks/7565.c2f72a15c1ed0396.js +0 -27
- package/apps/pwa/out/_next/static/chunks/7651.6d1c984d3d8587a4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7713.7ab863ed59b2d661.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7793.d7cd2026767ddd54.js +0 -115
- package/apps/pwa/out/_next/static/chunks/7837.c7c267e5dceadb11.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7891.09266382daf70d1c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7990-cbf6a01bcbdcb7e6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8119-819c549e0c197786.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8186-74ea19a3700d04a8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8267-e7b3262b735ae106.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8386.86518e55b75f7cf5.js +0 -8
- package/apps/pwa/out/_next/static/chunks/8437.ba6eeeb29590042f.js +0 -23
- package/apps/pwa/out/_next/static/chunks/8469-1500be57e582296f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8483-7164cecdaf178ca6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8722-4c940f02c496ad36.js +0 -1
- package/apps/pwa/out/_next/static/chunks/887-41d0dcf5af48c628.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9039.da86361496797522.js +0 -90
- package/apps/pwa/out/_next/static/chunks/905.d5745a25884754d4.js +0 -94
- package/apps/pwa/out/_next/static/chunks/9089-d909f3d4478b0628.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9096.dc5c7a267f83790c.js +0 -41
- package/apps/pwa/out/_next/static/chunks/93.a567257b6bdb7fe4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9320.419acb9665b46597.js +0 -287
- package/apps/pwa/out/_next/static/chunks/9356.b8ceda6634612ff8.js +0 -79
- package/apps/pwa/out/_next/static/chunks/94.e9e1043b35cd3eed.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9400-7498ea90b2e6ee8f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9930-58644af9c813d6e1.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9932.367cf4725fedd6e2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9935.1628b904cdc8ce0e.js +0 -104
- package/apps/pwa/out/_next/static/chunks/app/_not-found/page-a2aa8709d193ee0d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/approvals/page-3b9fc39362473ae7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/autopilot/page-f2b62c19ca68fef8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/board/page-d7602d489edf5f37.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/bots/page-8b7c5ab6b5bc8d64.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ceo/page-4eb84d454f8c3415.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/chat/page-b2e494bdad57fcb5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/consult/page-c0ab229673a8b0eb.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/control/page-3e2b45f3c36dbac4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/decisions/page-c22aa511b28743ad.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-26345242e4049f55.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/editor/page-bf88c0f558d8ef54.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/exec/page-52fec523e5b5d3ad.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/field/page-67723dfdcde92b31.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/healthz/route-a2aa8709d193ee0d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/inside/page-22725e2570f1126b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/intake/page-1891335950d68b70.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/layout-3267af1ebdc73cf5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/live/page-c314b75c11234998.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/live-run/page-9f9c85415f61782b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/loops/page-c1d4276059085587.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/market/page-833aab587f26ad4c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-8526c17ae38e6a50.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/morning/page-f998637a8402115c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/not-found-b7bb53828b17b335.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/observatory/page-1b1850de0257e46d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-6f23159fedb41f67.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-da9e570234d481fd.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/page-8ce3a38e210b810a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/reflection/page-57ffeeb6019440fd.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/scheduler/page-abbb417bf514630b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/sessions/page-2c2b3f29cec1efa4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-9369279f72fc7b51.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/page-64861f14039499c3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/done/page-ddc4c93efd8ab94b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/layout-a2aa8709d193ee0d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/page-901a1391b81053bc.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/share/page-68d9bbaac9841a58.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/showroom/page-b5c0c996f329371e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/tasks/page-89881ccbcf728978.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/term/page-0e87a803b3d7165e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/today/page-58d4e5cb30ef4871.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/trace/page-02ce4c3b5f39e4d2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/vault/page-e620d1bb8eadcec2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-acf868c64d77f950.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/page-54fa605fa6dba457.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workspace/page-bc79f0833533fa84.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-d5c4398eea03d8f3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/cd39fa05.fac4545f42a3ef70.js +0 -1
- package/apps/pwa/out/_next/static/chunks/framework-b2763b10dc6b3836.js +0 -1
- package/apps/pwa/out/_next/static/chunks/main-app-27893e93b0ec193d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/main-f280047194e1daf8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/pages/_app-e90eff2d0b70564c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/pages/_error-70f2d654b3435d34.js +0 -1
- package/apps/pwa/out/_next/static/chunks/webpack-4794f053bd5e4230.js +0 -1
- /package/apps/pwa/out/_next/static/{Q-7iofoxOEv1WX18S35of → dRS6lEhSRRBr1abbzp7fJ}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3797],{2929:(e,t,n)=>{n.d(t,{h:()=>o,t:()=>l});var r=n(49954),a=n(8801),s=n(76153);function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{client:t}=(0,a.Q)(),n=(0,s.hG)(t),l=()=>n.list(),o=(0,r.useSyncExternalStore)(e=>n.subscribe(e),l,l);return(0,r.useEffect)(()=>{if(e.activePoll)return n.enterActive()},[n,e.activePoll]),o}function o(){let{client:e}=(0,a.Q)(),t=(0,s.hG)(e),n=l({activePoll:!0}),[,o]=(0,r.useState)(0);return(0,r.useEffect)(()=>{t.forceRefresh().then(()=>o(e=>e+1))},[t]),n}},5428:(e,t,n)=>{n.d(t,{g:()=>a,x:()=>r});let r={idle:"bg-slate-400",connecting:"bg-amber-500",listening:"bg-emerald-500",processing:"bg-sky-500",speaking:"bg-fuchsia-500",error:"bg-rose-600"},a={idle:"음성 대기",connecting:"연결 중…",listening:"듣는 중",processing:"생각 중",speaking:"말하는 중",error:"음성 오류"}},13844:(e,t,n)=>{n.d(t,{D:()=>d});var r=n(77194),a=n(49954),s=n(19298),l=n(8801),o=n(35083),i=n(35857);function c(e){return!Number.isFinite(e)||e<0?"$0.00":"$".concat(e.toFixed(2))}function d(){let{client:e,config:t}=(0,l.Q)(),[n,d]=(0,a.useState)(null),[u,m]=(0,a.useState)(!1),p=!!t.baseUrl,f=(0,a.useCallback)(async()=>{if(p)try{let t=await e.voiceCost();d(t),m(!1)}catch(e){m(!0),(0,i.cY)("chat.voice.cost-pill.error",{reason:e instanceof Error?e.message:String(e)})}},[e,p]);if((0,a.useEffect)(()=>{if(!p)return;f();let e=setInterval(()=>void f(),6e4);return()=>clearInterval(e)},[p,f]),!p)return null;if(u&&!n)return(0,r.jsxs)("div",{className:"inline-flex items-center gap-1 rounded-md border border-border bg-muted/40 px-2 py-1 text-[11px] text-muted-foreground",title:"voice cost — daemon /v1/voice/cost 응답 없음","data-elanous-pill":"voice-cost",children:[(0,r.jsx)(s.A,{className:"h-3 w-3","aria-hidden":!0}),(0,r.jsx)("span",{children:"—"})]});if(!n)return(0,r.jsxs)("div",{className:"inline-flex items-center gap-1 rounded-md border border-border bg-muted/40 px-2 py-1 text-[11px] text-muted-foreground","data-elanous-pill":"voice-cost",children:[(0,r.jsx)(s.A,{className:"h-3 w-3","aria-hidden":!0}),(0,r.jsx)("span",{children:"…"})]});let x=n.totalUsd>0;return(0,r.jsxs)("div",{className:(0,o.cn)("inline-flex items-center gap-1 rounded-md border px-2 py-1 text-[11px]",x?"border-emerald-500/30 bg-emerald-500/5 text-emerald-700 dark:text-emerald-400":"border-border bg-muted/40 text-muted-foreground"),title:"voice cost ".concat(n.monthYYYYMM," \xb7 STT ").concat(c(n.sttUsd)," \xb7 TTS ").concat(c(n.ttsUsd)),"data-elanous-pill":"voice-cost",children:[(0,r.jsx)(s.A,{className:"h-3 w-3","aria-hidden":!0}),(0,r.jsx)("span",{children:c(n.totalUsd)}),(0,r.jsx)("span",{className:"text-muted-foreground",children:"/mo"})]})}},14526:(e,t,n)=>{n.d(t,{vG:()=>s});var r=n(77194),a=n(49954);function s(e){let{children:t}=e;return!function(){let[e,t]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{"public"===new URLSearchParams(window.location.search).get("capture")&&t(!0)},[]),e}()?(0,r.jsx)(r.Fragment,{children:t}):null}},26537:(e,t,n)=>{n.d(t,{D:()=>eg});var r=n(77194),a=n(49954),s=n(94111),l=n(73137);let o=[n(21666).A];var i=n(38470);let c={"coo-admin":"운영 할 일","release-schedule":"판 일정","release-checklist":"판별 칸"};function d(e){let{card:t}=e,[n,s]=(0,a.useState)(!1),l=t.items.map((e,t)=>({item:e,index:t})).sort((e,t)=>{var n,r;return(null!=(n=e.item.daysLeft)?n:1/0)-(null!=(r=t.item.daysLeft)?r:1/0)||e.index-t.index}),o=n?l:l.slice(0,12);return(0,r.jsxs)("section",{className:"rounded-lg border border-border bg-card p-3 text-card-foreground","data-elanous-card-kind":t.kind,children:[(0,r.jsxs)("h3",{className:"mb-2 text-sm font-semibold",children:[c[t.kind]," ",(0,r.jsxs)("span",{className:"font-normal text-muted-foreground",children:["\xb7 ",t.items.length]})]}),0===t.items.length&&(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"항목이 없습니다"}),(0,r.jsx)("ul",{className:"space-y-2",children:o.map(e=>{var t;let{item:n,index:a}=e,s=n.url?function(e){let t=e.trim();if(!t.includes("\\")){if(/^https?:\/\//i.test(t))try{let e=new URL(t);return"http:"===e.protocol||"https:"===e.protocol?t:void 0}catch(e){return}return/^\/(?!\/)/.test(t)?t:void 0}}(n.url):void 0,l=function(e){if(null!==e)return e<0?{label:"".concat(-e,"일 지남"),tone:"overdue"}:0===e?{label:"오늘",tone:"soon"}:{label:"D-".concat(e),tone:e<=3?"soon":void 0}}(n.daysLeft);return(0,r.jsxs)("li",{className:"rounded border border-border/60 px-2 py-1.5 text-sm","data-elanous-card-item":a,children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-baseline gap-2",children:[l&&(0,r.jsx)("span",{"data-due-status":l.tone,className:"overdue"===l.tone?"font-semibold text-red-600 dark:text-red-400":"soon"===l.tone?"font-semibold text-orange-600 dark:text-orange-400":"text-muted-foreground",children:l.label}),s?(0,r.jsx)("a",{className:"font-medium text-primary underline underline-offset-2",href:s,target:"_blank",rel:"noopener noreferrer",children:n.title}):(0,r.jsx)("span",{className:"font-medium",children:n.title})]}),(0,r.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[n.state,n.owner,null!=(t=n.due)?t:void 0].filter(Boolean).join(" \xb7 ")})]},a)})}),t.items.length>12&&!n&&(0,r.jsxs)("button",{type:"button",className:"mt-2 text-xs font-medium text-primary underline underline-offset-2",onClick:()=>s(!0),children:[t.items.length-12,"개 더 보기"]})]})}function u(e){let{sources:t}=e;return(null==t?void 0:t.length)?(0,r.jsx)("ul",{"aria-label":"출처",className:"mt-1 space-y-0.5 rounded border border-border/60 bg-muted/20 px-2 py-1 text-xs text-muted-foreground",children:t.map((e,t)=>(0,r.jsxs)("li",{title:e.source,className:"break-words",children:[e.label,null!==e.ago?" \xb7 ".concat(e.ago):""]},"".concat(e.source,"-").concat(t)))}):null}var m=n(8801),p=n(89853),f=n(17522);function x(e){var t;let{acceptanceId:n}=e,{client:s}=(0,m.Q)(),[l,o]=(0,a.useState)(null),[i,c]=(0,a.useState)(null);(0,a.useEffect)(()=>{let e;o(null),c(null);let t=!0,r=Date.now(),a=async()=>{if(!(!t||Date.now()-r>=36e5)){try{let e=await (0,f.PM)(s,n);if(!t||(o(e),c(null),(0,p.rr)(e.phase)))return}catch(n){if(!t)return;let e=n instanceof Error?n.message:String(n);if("harness ask not found"===e||/^HTTP 404\b/.test(e))return void c("접수 기록을 못 찾았습니다(데몬 재시작이면 사라질 수 있음)");c("상태 확인 실패 — ".concat(e.split(/\r?\n/,1)[0].slice(0,200)))}t&&Date.now()-r<36e5&&(e=setTimeout(()=>void a(),5e3))}};return a(),()=>{t=!1,e&&clearTimeout(e)}},[s,n]);let d="number"==typeof(null==l?void 0:l.elapsedSeconds)&&Number.isFinite(l.elapsedSeconds)?Math.max(0,Math.floor(l.elapsedSeconds)):0,u="string"==typeof(null==l?void 0:l.goalFile)?l.goalFile.split(/[\\/]/).pop():void 0;return(0,r.jsxs)("section",{"aria-label":"하니스 진행",className:"rounded-md border border-border bg-card px-3 py-2 text-xs not-italic text-card-foreground",children:[(0,r.jsx)("span",{className:"font-medium",children:(0,p.SK)(null!=(t=null==l?void 0:l.phase)?t:"accepted")}),(null==l?void 0:l.runId)&&(0,r.jsxs)("span",{className:"ml-2 font-mono",children:["런 ",l.runId.slice(0,8)]}),u&&(0,r.jsx)("span",{className:"ml-2 break-all",children:u}),(0,r.jsxs)("span",{className:"ml-2 text-muted-foreground",children:["경과 ",d>=60?"".concat(Math.floor(d/60),"분"):"".concat(d,"초")]}),i&&(0,r.jsx)("p",{role:"status",className:"mt-1 text-destructive",children:i})]})}var h=n(35083),g=n(17083),b=n(96844),v=n(40678),j=n(47829),y=n(35857);function w(e){let{block:t}=e,{msg:n,done:a,metrics:s}=t,l=[];if(s){let e=function(e){let t=Math.max(0,Math.round(e/1e3));return t<60?"".concat(t,"s"):t<3600?"".concat(Math.floor(t/60),"m ").concat(t%60,"s"):"".concat(Math.floor(t/3600),"h ").concat(Math.floor(t%3600/60),"m")}(s.elapsedMs);e&&s.elapsedMs>0&&l.push(e);let t=function(e){if(e<=0)return"";let t=e/1e3;return t>=1?"".concat(t.toFixed(1),"k tokens"):"".concat(e," tokens")}(s.tokenCount);t&&l.push(t)}let o=l.length?" (".concat(l.join(" \xb7 "),")"):"";return(0,r.jsxs)("div",{"data-elanous-block-kind":"agent_thinking","data-elanous-block-id":t.blockId,"data-elanous-done":a?"true":"false",className:(0,h.cn)("inline-flex items-center gap-1.5 rounded-full border bg-muted/30 px-2 py-0.5 text-[11px] font-mono",a?"border-border text-muted-foreground":"border-border/60 text-foreground"),children:[(0,r.jsx)("span",{"aria-hidden":"true",className:(0,h.cn)("inline-block h-1.5 w-1.5 rounded-full",a?"bg-emerald-500":"bg-amber-400 motion-safe:animate-pulse")}),(0,r.jsxs)("span",{children:[a?"✓ ":"",n,a?"":"…",(0,r.jsx)("span",{className:"text-muted-foreground",children:o})]})]})}let k={running:"●",queued:"◌",done:"✓",error:"✗"},N={running:"border-amber-400/50 text-amber-300",queued:"border-border text-muted-foreground",done:"border-emerald-500/40 text-emerald-300",error:"border-destructive/50 text-destructive"};function S(e){let{block:t}=e,n=k[t.status],a=N[t.status];return(0,r.jsxs)("div",{"data-elanous-block-kind":"agent_status","data-elanous-block-id":t.blockId,"data-monad-agent-id":t.agentId,"data-elanous-status":t.status,className:(0,h.cn)("inline-flex items-center gap-1.5 rounded border bg-muted/20 px-2 py-0.5 text-[11px] font-mono",a),children:[(0,r.jsx)("span",{"aria-hidden":"true",className:(0,h.cn)("running"===t.status?"motion-safe:animate-pulse":void 0),children:n}),(0,r.jsx)("span",{className:"font-semibold",children:t.agentId}),(0,r.jsx)("span",{className:"uppercase tracking-wide text-[10px] text-muted-foreground",children:t.status}),t.lastEvent&&(0,r.jsxs)("span",{className:"ml-1 truncate text-muted-foreground",children:["\xb7 ",t.lastEvent]})]})}let I={pending:"○","in-progress":"◐",done:"●",skipped:"⊘"},C={pending:"text-muted-foreground","in-progress":"text-amber-300",done:"text-emerald-400",skipped:"text-muted-foreground/60 line-through"};function D(e){let{block:t}=e;return(0,r.jsxs)("div",{"data-elanous-block-kind":"agent_plan","data-elanous-block-id":t.blockId,"data-elanous-plan-ref":t.ref,className:"rounded border border-border bg-muted/20 px-2 py-1.5 text-xs font-mono",children:[(0,r.jsxs)("div",{className:"mb-1 flex items-center justify-between text-[10px] uppercase tracking-wide text-muted-foreground",children:[(0,r.jsxs)("span",{children:["Plan \xb7 ",t.ref]}),"number"==typeof t.activeIndex&&t.steps.length>0&&(0,r.jsxs)("span",{children:[t.activeIndex+1,"/",t.steps.length]})]}),(0,r.jsx)("ol",{className:"m-0 list-none space-y-0.5 p-0",children:t.steps.map((e,n)=>{let a=n===t.activeIndex;return(0,r.jsxs)("li",{"data-elanous-step-index":n,"data-elanous-step-status":e.status,className:(0,h.cn)("flex items-start gap-2 leading-snug",C[e.status],a&&"done"!==e.status?"font-semibold motion-safe:animate-pulse":void 0),children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"select-none",children:I[e.status]}),(0,r.jsx)("span",{className:"flex-1 whitespace-pre-wrap",children:e.text})]},n)})})]})}let E={add:"bg-emerald-500/10 text-emerald-300",del:"bg-rose-500/10 text-rose-300",ctx:"text-muted-foreground"},L={add:"+",del:"-",ctx:" "};function R(e){let{block:t}=e,[n,s]=(0,a.useState)(!1),{adds:l,dels:o}=function(e){let t=0,n=0;for(let r of e.hunks)for(let e of r.lines)"add"===e.kind?t+=1:"del"===e.kind&&(n+=1);return{adds:t,dels:n}}(t),i=t.hunks.length;return(0,r.jsxs)("div",{"data-elanous-block-kind":"tool_diff","data-elanous-block-id":t.blockId,"data-elanous-file-path":t.filePath,className:"rounded border border-border bg-muted/20 px-2 py-1 text-xs font-mono",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>s(!n),"aria-expanded":n,className:"flex w-full items-center gap-2 text-left",children:[(0,r.jsx)("span",{"aria-hidden":"true",children:"⌥"}),(0,r.jsx)("span",{className:"font-semibold truncate",children:t.filePath}),t.language&&(0,r.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:["\xb7",t.language]}),(0,r.jsxs)("span",{className:"ml-auto flex items-center gap-1.5 text-[10px]",children:[l>0&&(0,r.jsxs)("span",{className:"text-emerald-300",children:["+",l]}),o>0&&(0,r.jsxs)("span",{className:"text-rose-300",children:["-",o]}),(0,r.jsxs)("span",{className:"text-muted-foreground",children:[i," hunk",1===i?"":"s"]}),(0,r.jsx)("span",{"aria-hidden":"true",className:"text-muted-foreground",children:n?"▾":"▸"})]})]}),n&&(0,r.jsx)("div",{className:"mt-1 overflow-x-auto rounded bg-background/40",children:t.hunks.map((e,t)=>(0,r.jsxs)("div",{"data-elanous-hunk-index":t,className:"border-t border-border/40 first:border-t-0",children:[(0,r.jsxs)("div",{className:"px-2 py-0.5 text-[10px] text-muted-foreground bg-muted/30",children:["@@ -",e.oldStart,",",e.oldLines," +",e.newStart,",",e.newLines," @@"]}),(0,r.jsx)("pre",{className:"m-0 whitespace-pre p-0 text-[11px] leading-tight",children:e.lines.map((e,t)=>(0,r.jsxs)("div",{"data-elanous-line-kind":e.kind,className:(0,h.cn)("flex items-baseline px-2 py-px",E[e.kind]),children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"w-3 shrink-0 select-none",children:L[e.kind]}),(0,r.jsx)("span",{className:"flex-1",children:e.text})]},t))})]},t))})]})}function A(e){var t,n,a,s;let{hit:l}=e;return(0,r.jsx)("li",{"data-elanous-search-hit-file":l.filePath,"data-elanous-search-hit-line":l.line,className:"rounded px-2 py-1 hover:bg-muted/30",children:(0,r.jsxs)("a",{href:function(e){var t;let n=null!=(t=e.column)?t:1;return"vscode://file/".concat(e.filePath,":").concat(e.line,":").concat(n)}(l),className:"block",target:"_blank",rel:"noopener",children:[(0,r.jsxs)("div",{className:"flex items-baseline gap-2 text-[11px]",children:[(0,r.jsx)("span",{className:"font-semibold truncate",children:l.filePath}),(0,r.jsxs)("span",{className:"text-muted-foreground",children:[":",l.line]}),void 0!==l.column&&(0,r.jsxs)("span",{className:"text-muted-foreground",children:[":",l.column]})]}),(null!=(a=null==(t=l.contextBefore)?void 0:t.length)?a:0)>0&&(0,r.jsx)("pre",{className:"m-0 mt-0.5 whitespace-pre-wrap break-words text-[10px] text-muted-foreground/70",children:l.contextBefore.join("\n")}),(0,r.jsx)("pre",{className:"m-0 whitespace-pre-wrap break-words text-[10px] text-foreground",children:l.snippet}),(null!=(s=null==(n=l.contextAfter)?void 0:n.length)?s:0)>0&&(0,r.jsx)("pre",{className:"m-0 whitespace-pre-wrap break-words text-[10px] text-muted-foreground/70",children:l.contextAfter.join("\n")})]})})}function T(e){let{block:t}=e,[n,s]=(0,a.useState)(!1),l=t.hits.length,o=n?t.hits:t.hits.slice(0,5),i=l-o.length;return(0,r.jsxs)("div",{"data-elanous-block-kind":"tool_search_hits","data-elanous-block-id":t.blockId,"data-elanous-search-query":t.query,"data-elanous-accum-count":t.accumCount,className:(0,h.cn)("rounded border border-border bg-muted/20 px-2 py-1 text-xs font-mono"),children:[(0,r.jsxs)("div",{className:"flex items-baseline gap-2 mb-1",children:[(0,r.jsx)("span",{"aria-hidden":"true",children:"\uD83D\uDD0E"}),(0,r.jsx)("span",{className:"font-semibold",children:t.query}),(0,r.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:[t.accumCount," hit",1===t.accumCount?"":"s"]}),t.truncated&&(0,r.jsx)("span",{className:"text-[10px] text-amber-300",children:"truncated"})]}),0===l?(0,r.jsx)("div",{className:"text-[10px] text-muted-foreground italic",children:"(no hits yet)"}):(0,r.jsx)("ul",{className:"m-0 list-none space-y-0.5 p-0",children:o.map((e,t)=>(0,r.jsx)(A,{hit:e},"".concat(e.filePath,":").concat(e.line,":").concat(t)))}),i>0&&(0,r.jsxs)("button",{type:"button",onClick:()=>s(!0),className:"mt-1 w-full rounded bg-muted/40 px-2 py-0.5 text-[10px] text-muted-foreground hover:bg-muted/60",children:["+ ",i," more"]}),n&&l>5&&(0,r.jsx)("button",{type:"button",onClick:()=>s(!1),className:"mt-1 w-full rounded bg-muted/40 px-2 py-0.5 text-[10px] text-muted-foreground hover:bg-muted/60",children:"collapse"})]})}let M={stdout:"text-foreground",stderr:"text-rose-300",http:"text-amber-300",generic:"text-muted-foreground"},U={stdout:"▌",stderr:"▌",http:"↹",generic:"\xb7"};function O(e){var t;let{block:n}=e,[s,l]=(0,a.useState)(!1),o=n.lines.length,i=0===o?"":n.lines[o-1],c=void 0===n.exitCode?"":0===n.exitCode?"text-emerald-300":"text-rose-300";return(0,r.jsxs)("div",{"data-elanous-block-kind":"tool_progress","data-elanous-block-id":n.blockId,"data-elanous-stream":n.stream,"data-elanous-done":n.done?"true":"false",className:"rounded border border-border bg-muted/20 px-2 py-1 text-xs font-mono",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>l(!s),"aria-expanded":s,className:"flex w-full items-center gap-2 text-left",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:(0,h.cn)(M[n.stream],!n.done&&"motion-safe:animate-pulse"),children:U[n.stream]}),(0,r.jsx)("span",{className:"uppercase tracking-wide text-[10px] text-muted-foreground",children:n.stream}),!s&&i&&(0,r.jsx)("span",{className:(0,h.cn)("flex-1 truncate",M[n.stream]),children:i}),(0,r.jsxs)("span",{className:"ml-auto flex items-center gap-1.5 text-[10px] text-muted-foreground",children:[(0,r.jsxs)("span",{children:[o," line",1===o?"":"s"]}),void 0!==n.bytesSoFar&&(0,r.jsxs)("span",{children:["\xb7 ",(t=n.bytesSoFar)<1024?"".concat(t,"B"):t<1048576?"".concat((t/1024).toFixed(1),"KB"):"".concat((t/1048576).toFixed(1),"MB")]}),void 0!==n.exitCode&&(0,r.jsxs)("span",{className:c,children:["\xb7 exit ",n.exitCode]}),n.done&&!n.exitCode&&(0,r.jsx)("span",{className:"text-emerald-300",children:"\xb7 ✓"}),(0,r.jsx)("span",{"aria-hidden":"true",children:s?"▾":"▸"})]})]}),s&&(0,r.jsx)("pre",{className:(0,h.cn)("m-0 mt-1 max-h-64 overflow-auto rounded bg-background/40 p-1.5 text-[11px] leading-tight whitespace-pre",M[n.stream]),children:0===n.lines.length?"(no output yet)":n.lines.join("\n")})]})}function P(e){var t;let{group:n}=e,a=function(e){if(0===e.samples.length)return"";if(1===e.samples.length)return"M0,".concat(9," L").concat(80,",").concat(9);let t=e.max-e.min||1,n=e.samples.map((n,r)=>{let a=r/(e.samples.length-1)*80,s=(n.value-e.min)/t;return"".concat(a.toFixed(1),",").concat((18-18*s).toFixed(1))});return"M".concat(n[0]," L").concat(n.slice(1).join(" L"))}(n);return(0,r.jsxs)("div",{"data-elanous-perf-metric":n.metric,"data-elanous-perf-latest":n.latest,className:"flex items-center gap-2 text-[10px] font-mono",children:[(0,r.jsx)("span",{className:"text-muted-foreground truncate min-w-[120px]",children:n.metric}),(0,r.jsx)("svg",{width:80,height:18,viewBox:"0 0 ".concat(80," ").concat(18),className:"shrink-0","aria-label":"".concat(n.metric," sparkline"),children:(0,r.jsx)("path",{d:a,fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinejoin:"round",strokeLinecap:"round",className:"text-amber-400"})}),(0,r.jsx)("span",{className:"text-foreground tabular-nums",children:(t=n.latest)>=1e3?(t/1e3).toFixed(1)+"k":t>=10?t.toFixed(0):t.toFixed(1)}),n.unit&&(0,r.jsx)("span",{className:"text-muted-foreground",children:n.unit})]})}function _(e){let{block:t}=e,n=(0,a.useMemo)(()=>(function(e){let t=new Map;for(let n of e){let e=t.get(n.metric);e?e.push(n):t.set(n.metric,[n])}let n=[];for(let[e,r]of t.entries()){let t=1/0,a=-1/0;for(let e of r)e.value<t&&(t=e.value),e.value>a&&(a=e.value);let s=r[r.length-1].value,l={metric:e,samples:r,latest:s,min:t,max:a},o=r[r.length-1].unit;void 0!==o&&(l.unit=o),n.push(l)}return n.sort((e,t)=>t.samples.length-e.samples.length),n})(t.samples),[t.samples]);return 0===n.length?(0,r.jsx)("div",{"data-elanous-block-kind":"perf_session","data-elanous-block-id":t.blockId,className:"rounded border border-border bg-muted/20 px-2 py-1 text-[10px] text-muted-foreground italic",children:"(no perf samples yet)"}):(0,r.jsx)("div",{"data-elanous-block-kind":"perf_session","data-elanous-block-id":t.blockId,"data-elanous-perf-metric-count":n.length,className:(0,h.cn)("rounded border border-border bg-muted/20 px-2 py-1","flex flex-col gap-0.5"),children:n.map(e=>(0,r.jsx)(P,{group:e},e.metric))})}let F="'none'";function z(e){let t=function(e){if(!e)return[];let t=new Set;for(let n of e)if("string"==typeof n)try{let e=new URL(n);if("http:"!==e.protocol&&"https:"!==e.protocol||e.username||e.password||"/"!==e.pathname||e.search||e.hash)continue;t.add(e.origin)}catch(e){}return[...t]}(e);return t.length>0?t.join(" "):F}let Y="ui/notifications/tool-result",q=(e,t,n)=>"".concat(e,":").concat(t,":").concat(typeof n,":").concat(String(n));function H(e,t,n){return{jsonrpc:"2.0",id:e,error:{code:t,message:n}}}function J(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function $(e){return{frames:{...e.frames},pending:{...e.pending},pushes:[...e.pushes],unmatched:[...e.unmatched],nextGeneration:e.nextGeneration}}function K(e){return{jsonrpc:"2.0",method:Y,params:{content:[],_meta:{"elanous/resultOmittedReason":e}}}}function B(e){let{message:t,omitted:n,bytes:r}=function(e){if(!(J(e)&&(!("content"in e)||Array.isArray(e.content))))return{message:K("not_a_tool_result"),omitted:"not_a_tool_result",bytes:-1};let t={jsonrpc:"2.0",method:Y,params:e};try{structuredClone(t);let e=new TextEncoder().encode(JSON.stringify(t)).byteLength;if(e<=65536)return{message:t,bytes:e};return{message:K("too_large"),omitted:"too_large",bytes:e}}catch(e){return{message:K("unserializable"),omitted:"unserializable",bytes:-1}}}(e.result);return{kind:"notify",frameId:e.frameId,message:t,bytes:r,...n?{omitted:n}:{}}}function V(e,t){for(let[n,r]of(delete e.frames[t],Object.entries(e.pending)))r.frameId===t&&delete e.pending[n];e.pushes=e.pushes.filter(e=>e.frameId!==t)}function W(e){return{frames:{},pending:{},pushes:[],unmatched:[],nextGeneration:e.nextGeneration}}function Q(e,t,n,r,a){let s=q(t,n,r),l=e.frames[t];if(!e.pending[s]||!l||l.generation!==n)return{state:e,actions:[]};let o=$(e);return delete o.pending[s],{state:o,actions:[{kind:"respond",frameId:t,message:"result"in a?{jsonrpc:"2.0",id:r,result:a.result}:{jsonrpc:"2.0",id:r,error:{code:-32603,message:"Daemon tool call failed",data:a.error}}}]}}let G=new WeakMap;function Z(e){let{html:t,connectDomains:n,resourceDomains:s,server:l,tool:o,toolCallId:i,toolResult:c}=e,d=function(){let{connectDomains:e,resourceDomains:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=z(e),r=z(t);return["default-src ".concat(F),"connect-src ".concat(n),"img-src ".concat(r),"media-src ".concat(r),"style-src ".concat(r),"font-src ".concat(r),"script-src 'unsafe-inline' ".concat(r),"base-uri ".concat(F),"form-action ".concat(F),"navigate-to ".concat(F)].join("; ")}({connectDomains:n,resourceDomains:s}),u='<meta http-equiv="Content-Security-Policy" content="'.concat(d,'">').concat(t),p=(0,a.useRef)(null),f=(0,a.useId)(),x=(0,a.useContext)(m.C),[h,g]=(0,a.useState)(!1),[b,v]=(0,a.useState)(null),j=(0,a.useCallback)(()=>{var e,t;g(!0),v(null!=(t=null==(e=p.current)?void 0:e.contentWindow)?t:null)},[]);return(0,a.useEffect)(()=>{if(b&&x)return function(e,t){let n=e.register({frameId:t.frameId,source:t.source,server:t.server,...void 0!==t.tool?{tool:t.tool}:{},...void 0!==t.toolCallId?{toolCallId:t.toolCallId}:{}}),r=void 0!==t.toolResult&&void 0!==t.tool;return(0,y.cY)("mcp-app.bridge.attach",{frameId:t.frameId,server:t.server,hasTool:void 0!==t.tool,hasToolCallId:void 0!==t.toolCallId,hasToolResult:void 0!==t.toolResult,published:r,...r?{}:{skipped:void 0===t.tool?"no-tool":"no-tool-result"}}),r&&e.publish({server:t.server,tool:t.tool,...void 0!==t.toolCallId?{toolCallId:t.toolCallId}:{},result:t.toolResult}),n}(function(e,t){let n=G.get(e);if(n)return n;let r=function(e,t){let n={frames:{},pending:{},pushes:[],unmatched:[],nextGeneration:1},r=(e,t)=>{var r;let a=null==(r=n.frames[e])?void 0:r.source;if("function"!=typeof(null==a?void 0:a.postMessage))return"no-target";try{return a.postMessage(t,"*"),"posted"}catch(e){return"threw"}},a=e=>{for(let s of e){if("observe"===s.kind&&(0,y.cY)("mcp-app.bridge.discard",{reason:s.reason,...s.method?{method:s.method}:{}}),"notify"===s.kind){let e=r(s.frameId,s.message);(0,y.cY)("mcp-app.bridge.push",{frameId:s.frameId,post:e,bytes:s.bytes,maxBytes:65536,...s.omitted?{omitted:s.omitted}:{}})}"respond"===s.kind&&r(s.frameId,s.message),"daemon-tool-call"===s.kind&&t.callWidgetTool({server:s.server,tool:s.tool,arguments:s.arguments}).then(e=>{let t=Q(n,s.frameId,s.generation,s.id,{result:e});n=t.state,a(t.actions)},e=>{let t=Q(n,s.frameId,s.generation,s.id,{error:String(e)});n=t.state,a(t.actions)})}},s=e=>{let t=function(e,t,n){let r=Object.values(e.frames).find(e=>e.source===t);if(!r)return{state:e,actions:[{kind:"observe",reason:"untrusted-source"}]};if(!J(n)||"2.0"!==n.jsonrpc||"string"!=typeof n.method)return{state:e,actions:[{kind:"observe",reason:"malformed-message"}]};if("notifications/initialized"===n.method||"ui/notifications/initialized"===n.method){var a;if(r.ready)return{state:e,actions:[]};let t=$(e);t.frames[r.frameId]={...r,ready:!0};let n=t.pushes.filter(e=>e.frameId===r.frameId&&e.generation===r.generation);return t.pushes=t.pushes.filter(e=>e.frameId!==r.frameId||e.generation!==r.generation),{state:t,actions:n.map(B)}}if(!("string"==typeof(a=n.id)||"number"==typeof a&&Number.isFinite(a)))return{state:e,actions:[]};if("ui/initialize"===n.method)return{state:e,actions:[{kind:"respond",frameId:r.frameId,message:{jsonrpc:"2.0",id:n.id,result:{protocolVersion:"2025-11-21",hostInfo:{name:"elanous",version:"1"},hostCapabilities:{serverTools:{}},hostContext:{}}}}]};if("ui/open-link"===n.method||"tools/call"!==n.method)return{state:e,actions:[{kind:"observe",reason:"unknown-method",method:n.method},{kind:"respond",frameId:r.frameId,message:H(n.id,-32601,"Method not found")}]};if(!J(n.params)||"string"!=typeof n.params.name)return{state:e,actions:[{kind:"respond",frameId:r.frameId,message:H(n.id,-32602,"Invalid params")}]};let s=q(r.frameId,r.generation,n.id);if(e.pending[s])return{state:e,actions:[{kind:"respond",frameId:r.frameId,message:H(n.id,-32600,"Duplicate request id")}]};let l=$(e);return l.pending[s]={frameId:r.frameId,id:n.id,generation:r.generation},{state:l,actions:[{kind:"daemon-tool-call",frameId:r.frameId,id:n.id,generation:r.generation,server:r.server,tool:n.params.name,arguments:n.params.arguments}]}}(n,e.source,e.data);n=t.state,a(t.actions)};return e.addEventListener("message",s),{register(e){var t;let r=function(e,t){let n=$(e);for(let[e,r]of Object.entries(n.frames))(e===t.frameId||r.source===t.source)&&V(n,e);let r=n.nextGeneration++;n.frames[t.frameId]={...t,generation:r,ready:!1};let a=n.unmatched.filter(e=>e.server===t.server&&e.tool===t.tool&&void 0!==e.toolCallId&&e.toolCallId===t.toolCallId);for(let e of(n.unmatched=n.unmatched.filter(e=>!a.includes(e)),a))n.pushes.push({...e,frameId:t.frameId,generation:r});return{state:n,actions:[]}}(n,e);n=r.state,a(r.actions);let s=null==(t=n.frames[e.frameId])?void 0:t.generation;return()=>{void 0!==s&&(n=function(e,t,n){let r=e.frames[t];if(!r||void 0!==n&&r.generation!==n)return{state:e,actions:[]};let a=$(e);return V(a,t),{state:a,actions:[]}}(n,e.frameId,s).state)}},publish(e){let t=function(e,t){let n=e,r=[],a=!1;for(let s of Object.values(e.frames)){if(s.server!==t.server||s.tool!==t.tool||(void 0!==t.toolCallId||void 0!==s.toolCallId)&&t.toolCallId!==s.toolCallId)continue;a=!0;let e=function(e,t){let n=e.frames[t.frameId];if(!n||n.generation!==t.generation)return{state:e,actions:[]};if(n.ready)return{state:e,actions:[B(t)]};let r=$(e);return r.pushes.push(t),{state:r,actions:[]}}(n,{...t,frameId:s.frameId,generation:s.generation});n=e.state,r.push(...e.actions)}if(!a&&void 0!==t.toolCallId){let e=$(n);e.unmatched=[...e.unmatched,t],n=e}return{state:n,actions:r}}(n,e);n=t.state,a(t.actions)},disposeConversation(){n=W(n)},close(){e.removeEventListener("message",s),n=W(n)}}}(t,{async callWidgetTool(t){let{tool:n,arguments:r}=t;return e.fetchJson("/v1/mcp/widgets/call",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({toolName:n,args:null!=r?r:{}})})}});return G.set(e,r),r}(x.client,window),{frameId:f,source:b,server:null!=l?l:"",...void 0!==o?{tool:o}:{},...void 0!==i?{toolCallId:i}:{},...void 0!==c?{toolResult:c}:{}})},[b,x,f,l,o,i,c]),(0,r.jsx)("iframe",{ref:p,"data-elanous-mcp-app-frame":"true","data-elanous-mcp-server":null!=l?l:"",sandbox:"allow-scripts",srcDoc:u,title:"MCP App",onLoad:j,className:"mt-2 w-full rounded border border-border bg-background transition-[height] ".concat(h?"h-96":"h-10")})}function X(e,t){let n=e.headers.get(t);if(null!==n)return n.split(",").map(e=>e.trim()).filter(e=>e.length>0)}async function ee(e,t){if(!t.server||!t.uri)return null;try{let n=await e.fetchResponse(function(e,t){let n=new URLSearchParams({server:e,uri:t});return"".concat("/v1/mcp/resources","?").concat(n.toString())}(t.server,t.uri),t.signal?{signal:t.signal}:void 0);if(!n.ok)return null;let r=await n.text();if(0===r.length)return null;let a=X(n,"x-elanous-mcp-app-connect-domains"),s=X(n,"x-elanous-mcp-app-resource-domains");return{html:r,...a?{connectDomains:a}:{},...s?{resourceDomains:s}:{}}}catch(e){return null}}let et=["__","."];function en(e){var t,n,s,l,o,i;let{block:c}=e,d=function(e){for(let t of et){let n=e.indexOf(t);if(n>0)return e.slice(0,n)}return""}(c.toolName),u=(0,a.useContext)(m.C),[p,f]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(c.html||!u||!d||!c.screenUrl)return;let e=new AbortController,t=!0,n=Date.now();return(0,y.cY)("mcp-app.body.fetch",{server:d,uri:c.screenUrl,reason:"not-embedded"}),ee(u.client,{server:d,uri:c.screenUrl,signal:e.signal}).then(e=>{var r,a,s,l,o;t&&((0,y.cY)("mcp-app.body.fetched",{server:d,elapsedMs:Date.now()-n,ok:null!==e,bytes:null!=(s=null==e?void 0:e.html.length)?s:0,connectDomains:null!=(l=null==e||null==(r=e.connectDomains)?void 0:r.length)?l:null,resourceDomains:null!=(o=null==e||null==(a=e.resourceDomains)?void 0:a.length)?o:null}),f(e))}).catch(e=>{t&&(0,y.cY)("mcp-app.body.fetched",{server:d,elapsedMs:Date.now()-n,ok:!1,threw:!0,reason:e instanceof Error?e.message.slice(0,200):String(e).slice(0,200)})}),()=>{t=!1,e.abort()}},[c.html,c.screenUrl,u,d]);let x=null!=(n=null!=(t=c.html)?t:null==p?void 0:p.html)?n:void 0,{connectDomains:h,resourceDomains:g}={...(null!=(s=c.connectDomains)?s:null==p?void 0:p.connectDomains)?{connectDomains:null!=(l=c.connectDomains)?l:null==p?void 0:p.connectDomains}:{},...(null!=(o=c.resourceDomains)?o:null==p?void 0:p.resourceDomains)?{resourceDomains:null!=(i=c.resourceDomains)?i:null==p?void 0:p.resourceDomains}:{}};return(0,r.jsxs)("section",{"data-elanous-block-kind":"mcp_app","data-elanous-tool-id":c.toolId,"data-elanous-tool-name":c.toolName,className:"rounded border border-border bg-muted/40 px-3 py-2 text-sm",children:[(0,r.jsx)("div",{className:"font-medium",children:c.toolName}),(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:c.toolId}),(0,r.jsx)("div",{className:"mt-1 break-all font-mono text-xs",children:c.screenUrl}),x&&(0,r.jsx)(Z,{html:x,connectDomains:h,resourceDomains:g,server:d,tool:c.toolName,toolCallId:c.toolId,toolResult:c.toolResult}),c.fallbackText&&(0,r.jsx)("p",{className:"mt-2 whitespace-pre-wrap text-sm",children:c.fallbackText})]})}let er={pre:function(e){let{children:t}=e,n=(0,a.useMemo)(()=>(function e(t){if(null==t||"boolean"==typeof t)return"";if("string"==typeof t||"number"==typeof t)return String(t);if(Array.isArray(t))return t.map(e).join("");if("object"==typeof t&&"props"in t){let n=t.props;return e(null==n?void 0:n.children)}return""})(t),[t]),s=(0,a.useMemo)(()=>(function e(t){if(null==t||"object"!=typeof t)return null;if(Array.isArray(t)){for(let n of t){let t=e(n);if(t)return t}return null}let n=t.props;if((null==n?void 0:n.className)&&"string"==typeof n.className){var r;let e=/language-([\w+-]+)/.exec(n.className);if(e)return null!=(r=e[1])?r:null}return(null==n?void 0:n.children)?e(n.children):null})(t),[t]),l=(0,a.useMemo)(()=>"string"==typeof n&&0!==n.length&&(n.length>800||n.split("\n").length>12),[n]),[o,i]=(0,a.useState)(!l),[c,d]=(0,a.useState)(!1);if(!l)return(0,r.jsx)("pre",{children:t});let u=function(e){let t=e.split("\n");return t.length<=8?e:t.slice(0,8).join("\n")+"\n…"}(n),m=n.split("\n").length,p=async()=>{try{var e;await (null==(e=navigator.clipboard)?void 0:e.writeText(n)),d(!0),(0,y.cY)("pwa.code-block.copy",{lang:s,lineCount:m}),setTimeout(()=>d(!1),1500)}catch(e){(0,y.cY)("pwa.code-block.copy-error",{reason:String(e)})}};return(0,r.jsxs)("div",{className:"my-2 overflow-hidden rounded-md border border-border bg-muted/40","data-testid":"collapsible-code-block",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b border-border bg-muted/60 px-2 py-1 text-[11px] text-muted-foreground",children:[(0,r.jsxs)("span",{className:"font-mono",children:[null!=s?s:"code"," \xb7 ",m," lines \xb7 ",n.length," chars"]}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>{p()},"aria-label":"copy code",className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 hover:bg-muted hover:text-foreground",children:[c?(0,r.jsx)(g.A,{className:"h-3 w-3"}):(0,r.jsx)(b.A,{className:"h-3 w-3"}),c?"copied":"copy"]}),(0,r.jsxs)("button",{type:"button",onClick:()=>i(e=>!e),"aria-label":o?"collapse code":"expand code",className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 hover:bg-muted hover:text-foreground",children:[o?(0,r.jsx)(v.A,{className:"h-3 w-3"}):(0,r.jsx)(j.A,{className:"h-3 w-3"}),o?"collapse":"show all"]})]})]}),(0,r.jsx)("pre",{className:"!my-0 overflow-x-auto !rounded-none !bg-transparent !p-2 !text-[13px]",children:o?t:u})]})}};function ea(e){let{text:t,showCards:n}=e;if(!n)return(0,r.jsx)(es,{text:t});let a=(0,i.g)(t);return(0,r.jsxs)(r.Fragment,{children:[a.text.trim()&&(0,r.jsx)(es,{text:a.text}),a.cards.map((e,t)=>(0,r.jsx)(d,{card:e},t))]})}function es(e){let{text:t}=e;return(0,r.jsx)("div",{className:"prose prose-sm max-w-none break-words [&_pre]:bg-muted [&_pre]:p-2 [&_pre]:rounded [&_code]:font-mono [&_code]:text-xs [&_p]:my-1 [&_table]:text-xs",children:(0,r.jsx)(l.oz,{remarkPlugins:o,components:er,children:t})})}function el(e){let{block:t,children:n,mobileSimple:s=!1}=e,[l,o]=(0,a.useState)(!1),i="running"===t.status?"⋯":"done"===t.status?"✓":"✗",c="running"===t.status?"text-muted-foreground border-border":"error"===t.status?"text-destructive border-destructive/40":"text-foreground border-border",d=s||!!t.args&&Object.keys(t.args).length>0||!!n,u=[t.startedAt,t.endedAt].filter(e=>"number"==typeof e).map(e=>new Date(e).toLocaleTimeString()).join(" → ");return(0,r.jsxs)("div",{"data-elanous-block-kind":"tool_use","data-elanous-tool-name":t.name,"data-elanous-tool-status":t.status,className:(0,h.cn)("rounded border bg-muted/40 px-2 py-1 text-xs font-mono",s&&"min-w-0",c),children:[(0,r.jsxs)("button",{type:"button",onClick:d?()=>o(!l):void 0,className:(0,h.cn)("flex w-full items-center gap-2 text-left",s&&"min-w-0 overflow-hidden whitespace-nowrap",d?"cursor-pointer":"cursor-default"),"aria-expanded":d?l:void 0,children:[(0,r.jsx)("span",{"aria-hidden":"true",children:i}),(0,r.jsx)("span",{className:"font-semibold",children:t.name}),t.summary&&(0,r.jsx)("span",{className:"ml-1 truncate text-muted-foreground",children:t.summary}),u&&(0,r.jsx)("span",{className:"ml-auto text-muted-foreground",children:u}),d&&(0,r.jsx)("span",{className:"ml-auto text-muted-foreground","aria-hidden":"true",children:l?"▾":"▸"})]}),l&&d&&(s?(0,r.jsxs)("div",{children:[!!t.args&&Object.keys(t.args).length>0&&(0,r.jsx)("pre",{className:"mt-1 overflow-x-auto rounded bg-background/60 p-1.5 text-[10px] leading-tight",children:JSON.stringify(t.args,null,2)}),n]}):(0,r.jsx)("pre",{className:"mt-1 overflow-x-auto rounded bg-background/60 p-1.5 text-[10px] leading-tight",children:JSON.stringify(t.args,null,2)}))]})}function eo(e){let{blocks:t,showCards:n,mobileSimple:a=!1}=e;return(0,r.jsx)("div",{className:"flex flex-col gap-2",children:t.map((e,t)=>{var s,l;return"harness_ask"===e.kind?(0,r.jsx)(x,{acceptanceId:e.acceptanceId},"".concat(e.acceptanceId,"-").concat(t)):"text"===e.kind?(0,r.jsx)(ea,{text:e.text,showCards:n},t):"image"===e.kind?(0,r.jsx)("img",{src:e.src,alt:null!=(s=e.alt)?s:"inline image (".concat(e.mediaType,")"),className:"max-w-full rounded border border-border","data-elanous-block-kind":"image","data-elanous-media-type":e.mediaType},t):"tool_use"===e.kind?(0,r.jsxs)("div",{children:[(0,r.jsx)(el,{block:e,mobileSimple:a,...a&&(null==(l=e.sources)?void 0:l.length)?{children:(0,r.jsx)(u,{sources:e.sources})}:{}}),!a&&(0,r.jsx)(u,{sources:e.sources})]},"".concat(e.id,"-").concat(t)):"mcp_app"===e.kind?(0,r.jsx)(en,{block:e},"".concat(e.toolId,"-").concat(t)):"agent_thinking"===e.kind?(0,r.jsx)(w,{block:e},"thinking-".concat(e.blockId)):"agent_status"===e.kind?(0,r.jsx)(S,{block:e},"status-".concat(e.blockId)):"agent_plan"===e.kind?(0,r.jsx)(D,{block:e},"plan-".concat(e.blockId)):"tool_diff"===e.kind?(0,r.jsx)(R,{block:e},"diff-".concat(e.blockId)):"tool_search_hits"===e.kind?(0,r.jsx)(T,{block:e},"search-".concat(e.blockId)):"tool_progress"===e.kind?(0,r.jsx)(O,{block:e},"progress-".concat(e.blockId)):"perf_session"===e.kind?(0,r.jsx)(_,{block:e},"perf-".concat(e.blockId)):null})})}function ei(e){var t,n,a,s,l;let{message:o,mobileSimple:i=!1}=e,c="user"===o.role,d="meta"===o.role,u="system"===o.role,m=new Date(o.timestamp).toLocaleTimeString();if(d)return(0,r.jsxs)("div",{className:"px-2 py-1 text-[11px] text-muted-foreground italic",children:[(0,r.jsx)("pre",{className:"whitespace-pre-wrap font-mono text-[11px]",children:o.text}),(null==(a=o.blocks)?void 0:a.some(e=>"harness_ask"===e.kind))&&(0,r.jsx)(eo,{blocks:o.blocks,showCards:!1,mobileSimple:i})]});if(u){let e="error"===(null!=(l=null==(s=o.meta)?void 0:s.systemLevel)?l:"note");return(0,r.jsx)("div",{className:"px-3 py-2",children:(0,r.jsxs)("div",{className:(0,h.cn)("rounded-md border px-3 py-2 text-xs font-mono",e?"border-rose-500/60 bg-rose-500/10 text-rose-300":"border-border/60 bg-muted/40 text-muted-foreground italic"),children:[(0,r.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,r.jsx)("span",{className:(0,h.cn)("shrink-0 text-[10px] font-semibold uppercase tracking-wide",e?"text-rose-400":"text-muted-foreground/70"),children:e?"⚠ Error":"Note"}),(0,r.jsx)("pre",{className:"flex-1 whitespace-pre-wrap break-all",children:o.text})]}),(0,r.jsx)("div",{className:"mt-1 text-[10px] text-muted-foreground/80",children:m})]})})}let p=Array.isArray(o.blocks)&&o.blocks.length>0;return(0,r.jsx)("div",{className:(0,h.cn)("flex gap-3 px-4 py-3",c?"justify-end":"justify-start"),children:(0,r.jsxs)("div",{className:(0,h.cn)("max-w-[85%] rounded-lg px-3 py-2 text-sm shadow-sm",c?"bg-primary text-primary-foreground":"bg-card text-card-foreground border border-border"),children:[p?(0,r.jsx)(eo,{blocks:o.blocks,showCards:!c,mobileSimple:i}):(0,r.jsx)(ea,{text:o.text,showCards:!c}),(0,r.jsxs)("div",{className:"mt-1 flex items-center gap-2 text-[10px] text-muted-foreground",children:[(0,r.jsx)("span",{children:m}),o.terminalId&&(0,r.jsx)("span",{title:"이 메시지가 나눈 터미널",className:"rounded border border-border/60 bg-muted/60 px-1 font-mono text-[9px] leading-4",children:o.terminalId}),(null==(t=o.meta)?void 0:t.provider)&&(0,r.jsxs)("span",{title:"답한 LLM",children:["\xb7 ",o.meta.provider,o.meta.model?" \xb7 ".concat(o.meta.model):""]}),(null==(n=o.meta)?void 0:n.stopReason)&&(0,r.jsxs)("span",{children:["\xb7 ",o.meta.stopReason]})]})]})})}var ec=n(53920),ed=n(65449);function eu(){let{client:e}=(0,m.Q)(),[t,n]=(0,a.useState)({client:e,item:null,busy:!1}),s=(0,a.useRef)(!1),l=(0,a.useRef)(e);l.current=e;let o=(0,a.useRef)(0),i=(0,a.useRef)(!1),c=t.client===e?t:null,d=(0,a.useCallback)(async()=>{if(!s.current||l.current!==e||"undefined"!=typeof document&&document.hidden)return;let t=++o.current;try{let r=await (0,ec.qK)(e);s.current&&l.current===e&&t===o.current&&n(t=>{var n;return t.client===e?{...t,item:null!=(n=r[0])?n:null}:t})}catch(r){s.current&&l.current===e&&t===o.current&&n(t=>t.client===e?{...t,item:null}:t)}},[e]);(0,a.useEffect)(()=>{s.current=!0,i.current=!1,n({client:e,item:null,busy:!1}),d();let t=globalThis.setInterval(()=>{d()},3e4),r=()=>{document.hidden||d()};return"undefined"!=typeof document&&document.addEventListener("visibilitychange",r),()=>{s.current=!1,i.current=!1,o.current++,globalThis.clearInterval(t),"undefined"!=typeof document&&document.removeEventListener("visibilitychange",r)}},[e,d]);let u=async t=>{if(!(null==c?void 0:c.item)||i.current)return;i.current=!0;let r=c.item.id;n(t=>t.client===e?{...t,busy:!0}:t);try{await (0,ec.LD)(e,r,t.id),s.current&&l.current===e&&(n(t=>{var n;return t.client===e&&(null==(n=t.item)?void 0:n.id)===r?{...t,item:null,busy:!1}:t}),await d())}catch(t){s.current&&l.current===e&&n(t=>t.client===e?{...t,busy:!1}:t)}finally{i.current=!1}};return(null==c?void 0:c.item)?(0,r.jsx)("div",{className:"px-4 py-3","data-chat-pending-decision":"",children:(0,r.jsx)(ed.l,{decision:c.item,onChoose:e=>{u(e)},busy:c.busy})}):null}function em(e){return ep(e)>240}function ep(e){return Math.max(0,e.scrollHeight-e.clientHeight-e.scrollTop)}function ef(e){var t;return null!=(t=null==e?void 0:e.querySelector('[data-slot="scroll-area-viewport"],[data-radix-scroll-area-viewport]'))?t:null}let ex=["wheel","touchmove","pointerdown","keydown"];var eh=n(73658);function eg(e){let{messages:t,pending:n,tabId:l,mobileSimple:o=!1}=e,i=(0,a.useRef)(null),c=(0,a.useRef)(null),d=(0,eh.o1)("chatScroll",l);(0,a.useEffect)(()=>{let e=ef(c.current);if(!e)return;let t=(0,eh.N2)(d);"number"==typeof t&&t>0&&(e.scrollTop=t)},[d]),(0,a.useEffect)(()=>{let e=ef(c.current);if(!e)return;let t=null,n=()=>{t&&clearTimeout(t),t=setTimeout(()=>{(0,eh.Os)(d,e.scrollTop)},250)};return e.addEventListener("scroll",n,{passive:!0}),()=>{e.removeEventListener("scroll",n),t&&clearTimeout(t)}},[d]);let[u,m]=(0,a.useState)(!1),p=(0,a.useRef)({stuck:!0}),f=(0,a.useRef)(!1),x=(0,a.useRef)(t.length);(0,a.useEffect)(()=>{let e=t[t.length-1];t.length>x.current&&(null==e?void 0:e.role)==="user"&&(f.current=!0),x.current=t.length},[t]),(0,a.useEffect)(()=>{var e,t;let n=ef(c.current),r=null==(e=i.current)?void 0:e.parentElement;if(!n||!r)return;let a=!1,s=e=>{var t;!a&&(m(em({scrollTop:n.scrollTop,scrollHeight:n.scrollHeight,clientHeight:n.clientHeight})),t=p.current,(f.current||t.stuck)&&(f.current=!1,n.scrollTo({top:n.scrollHeight,behavior:e?"auto":"smooth"})))};s(!1);let l=()=>({scrollTop:n.scrollTop,scrollHeight:n.scrollHeight,clientHeight:n.clientHeight}),o=null,d=()=>{let e=l();p.current=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:96;return{stuck:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:96;return ep(e)<=t}(t,n)}}(p.current,e),m(em(e))},u=()=>{m(em(l()))},x=e=>{var t;if("keydown"!==e.type||"PageUp"===(t=e.key)||"PageDown"===t||"Home"===t||"End"===t||"ArrowUp"===t||"ArrowDown"===t||" "===t||"Spacebar"===t){if("pointerdown"===e.type){a=!0,n.scrollTo({top:n.scrollTop,behavior:"auto"});return}"function"==typeof requestAnimationFrame?(null!==o&&cancelAnimationFrame(o),o=requestAnimationFrame(()=>{o=null,d()})):d()}},h=()=>{a&&(a=!1,d())};n.addEventListener("scroll",u,{passive:!0});let g=null!=(t=c.current)?t:n;for(let e of ex)g.addEventListener(e,x,{passive:!0});let b=window;null==b||b.addEventListener("pointerup",h,{passive:!0}),null==b||b.addEventListener("pointercancel",h,{passive:!0});let v=()=>{for(let e of(null!==o&&"function"==typeof cancelAnimationFrame&&(cancelAnimationFrame(o),o=null),n.removeEventListener("scroll",u),ex))g.removeEventListener(e,x);null==b||b.removeEventListener("pointerup",h),null==b||b.removeEventListener("pointercancel",h)};if("undefined"==typeof ResizeObserver)return v;let j=new ResizeObserver(()=>{s(!0)});return j.observe(r),()=>{j.disconnect(),v()}},[t.length,n]);let h=(0,a.useCallback)(()=>{let e=ef(c.current);p.current={stuck:!0},null==e||e.scrollTo({top:e.scrollHeight,behavior:"smooth"})},[]);return 0!==t.length||n?(0,r.jsxs)("div",{ref:c,className:"relative flex-1 min-h-0",children:[(0,r.jsx)(s.F,{className:"h-full",children:(0,r.jsxs)("div",{className:"flex flex-col gap-1 pt-2 ".concat("pb-24"),children:[t.map(e=>(0,r.jsx)(ei,{message:e,mobileSimple:o},e.id)),!o&&(0,r.jsx)(eu,{}),n&&(0,r.jsx)("div",{className:"flex justify-start px-4 py-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-sm text-muted-foreground",children:[(0,r.jsx)("span",{className:"h-1.5 w-1.5 animate-pulse rounded-full bg-primary"}),"thinking…"]})}),(0,r.jsx)("div",{ref:i})]})}),u&&(0,r.jsx)("button",{type:"button",onClick:h,"data-elanous-jump-to-bottom":"true",className:"absolute bottom-3 left-1/2 -translate-x-1/2 rounded-full border border-border bg-card/95 px-3 py-1.5 text-xs shadow-lg backdrop-blur transition-colors hover:bg-accent",children:"맨 아래로 ↓"})]}):(0,r.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 p-8 text-center text-sm text-muted-foreground",children:[(0,r.jsx)("p",{children:"무엇이든 말을 걸어 보세요."}),(0,r.jsxs)("p",{className:"text-xs",children:[(0,r.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono",children:":help"})," 를 치면 명령 목록이 나옵니다."]}),!o&&(0,r.jsx)(eu,{})]})}},29461:(e,t,n)=>{n.d(t,{hn:()=>s,qv:()=>l,sg:()=>o});let r="elanous.ocr.prefs",a={defaultUseLlmVision:!1,defaultPreferHandwriting:!1};function s(){if("undefined"==typeof localStorage)return{...a};try{let e=localStorage.getItem(r);if(!e)return{...a};let t=JSON.parse(e);return{defaultUseLlmVision:"boolean"==typeof t.defaultUseLlmVision?t.defaultUseLlmVision:a.defaultUseLlmVision,defaultPreferHandwriting:"boolean"==typeof t.defaultPreferHandwriting?t.defaultPreferHandwriting:a.defaultPreferHandwriting}}catch(e){return{...a}}}function l(e){if("undefined"==typeof localStorage)return{...a,...e};let t={...s(),...e};try{localStorage.setItem(r,JSON.stringify(t))}catch(e){}return t}function o(){if("undefined"==typeof localStorage)return{...a};try{localStorage.removeItem(r)}catch(e){}return{...a}}},31219:(e,t,n)=>{n.d(t,{V:()=>P});var r=n(77194),a=n(49954),s=n(58927),l=n(26603),o=n(19298),i=n(82190),c=n(42457),d=n(46479),u=n(44092),m=n(53971),p=n(51116),f=n(35083),x=n(98860),h=n(43615),g=n(1429),b=n(2701),v=n(61332),j=n(8801),y=n(35857),w=n(29461);function k(e){let{open:t,image:n,filename:s="photo.jpg",onClose:l}=e,{config:o}=(0,j.Q)(),[i,c]=(0,a.useState)("idle"),[m,p]=(0,a.useState)(""),[f,x]=(0,a.useState)("minimal"),[h,g]=(0,a.useState)("minimal"),k=(0,w.hn)(),[N,S]=(0,a.useState)(k.defaultUseLlmVision),[I,C]=(0,a.useState)(k.defaultPreferHandwriting),[D,E]=(0,a.useState)(""),[L,R]=(0,a.useState)(""),[A,T]=(0,a.useState)("");async function M(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:I;if(!n)return;if(!o.baseUrl){R("Daemon URL 미설정 — Settings 에서 입력"),c("error");return}c("ocr"),R("");let a=new FormData;a.append("image",n,s),a.append("polishMode",e);let l=[];t&&l.push("context-aware","diagrams"),r&&l.push("handwriting"),l.length>0&&a.append("strengths",l.join(",")),(0,y.cY)("notes.ocr.start",{polishMode:e,vision:t,handwriting:r,filename:s,size:n.size});try{let t=await fetch("".concat(o.baseUrl,"/v1/notes/from-image"),{method:"POST",body:a,...o.token?{headers:{authorization:"Bearer ".concat(o.token)}}:{}});if(!t.ok){let e=await t.text().catch(()=>"");R("OCR 실패 (HTTP ".concat(t.status,") ").concat(e.slice(0,160))),c("error"),(0,y.cY)("notes.ocr.error",{status:t.status,detail:e.slice(0,200)});return}let n=await t.json(),r=n.usedLlmPolish?n.polishMode:"minimal";if(0===n.markdown.trim().length){R(n.usedLlmPolish?"이미지에서 텍스트를 추출하지 못했습니다. 다른 사진으로 다시 시도해주세요.":"이미지에서 텍스트를 추출하지 못했습니다. 다른 사진을 사용하거나 polishMode를 'enrich'로 바꾸어 LLM polish를 시도해주세요."),x(n.polishMode),g(r),E(n.provider),c("error"),(0,y.cY)("notes.ocr.empty",{provider:n.provider,requested:e,applied:r,usedLlmPolish:n.usedLlmPolish});return}p(n.markdown),T(n.markdown),E(n.provider),x(n.polishMode),g(r),c("review"),(0,y.cY)("notes.ocr.ok",{provider:n.provider,requested:e,applied:r,usedLlmPolish:n.usedLlmPolish,chars:n.markdown.length})}catch(e){R("OCR 실패: ".concat(String(e instanceof Error?e.message:e))),c("error"),(0,y.cY)("notes.ocr.exception",{reason:String(e)})}}async function U(){if(!o.baseUrl){R("Daemon URL 미설정"),c("error");return}let e=m!==A;c("saving"),(0,y.cY)("notes.save.start",{provider:D,selectedPolishMode:f,appliedPolishMode:h,edited:e,chars:m.length}),e&&O("edit");try{let e=await fetch("".concat(o.baseUrl,"/v1/notes/save"),{method:"POST",headers:{"content-type":"application/json",...o.token?{authorization:"Bearer ".concat(o.token)}:{}},body:JSON.stringify({markdown:m,sourceProvider:D,polishMode:h})});if(!e.ok){let t=await e.text().catch(()=>"");R("저장 실패 (HTTP ".concat(e.status,") ").concat(t.slice(0,160))),c("error"),(0,y.cY)("notes.save.error",{status:e.status,detail:t.slice(0,200)});return}let t=await e.json();c("saved"),d.oR.success("\uD83D\uDCDD 저장됨 — ".concat(t.vaultLabel," \xb7 ").concat(t.knowledgeId)),(0,y.cY)("notes.save.ok",{knowledgeId:t.knowledgeId,vaultLabel:t.vaultLabel}),setTimeout(l,400)}catch(e){R("저장 실패: ".concat(String(e instanceof Error?e.message:e))),c("error"),(0,y.cY)("notes.save.exception",{reason:String(e)})}}function O(e){o.baseUrl&&fetch("".concat(o.baseUrl,"/v1/metrics/notes-event"),{method:"POST",headers:{"content-type":"application/json",...o.token?{authorization:"Bearer ".concat(o.token)}:{}},body:JSON.stringify({type:e,polishMode:f})}).catch(()=>{})}function P(){let e=m!==A;(0,y.cY)("notes.cancel",{phase:i,edited:e,chars:m.length}),O("cancel"),e&&"review"===i&&O("discard"),l()}return(0,a.useEffect)(()=>{if(!t){c("idle"),p(""),T(""),E(""),R(""),x("minimal"),g("minimal");let e=(0,w.hn)();S(e.defaultUseLlmVision),C(e.defaultPreferHandwriting)}},[t]),(0,a.useEffect)(()=>{t&&n&&"idle"===i&&M(f)},[t,n]),(0,r.jsx)(v.lG,{open:t,onOpenChange:e=>{e||P()},children:(0,r.jsxs)(v.Cf,{className:"sm:max-w-lg",children:[(0,r.jsxs)(v.c7,{children:[(0,r.jsx)(v.L3,{children:"사진 → 마크다운 노트"}),(0,r.jsx)(v.rr,{children:"OCR 로 추출한 본문을 검토 + 편집 후 저장합니다."})]}),"ocr"===i&&(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 py-12 text-muted-foreground",children:[(0,r.jsx)(b.A,{className:"h-4 w-4 animate-spin"}),(0,r.jsx)("span",{children:"OCR 인식 중…"})]}),"saving"===i&&(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 py-12 text-muted-foreground",children:[(0,r.jsx)(b.A,{className:"h-4 w-4 animate-spin"}),(0,r.jsx)("span",{children:"저장 중…"})]}),"saved"===i&&(0,r.jsx)("div",{className:"flex items-center justify-center py-12 text-emerald-600",children:"✓ 저장 완료"}),"error"===i&&(0,r.jsxs)("div",{className:"space-y-3 py-4",children:[(0,r.jsx)("div",{className:"rounded-md bg-destructive/10 p-3 text-sm text-destructive",children:L}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)(u.$,{variant:"ghost",onClick:P,children:"닫기"}),n&&(0,r.jsx)(u.$,{onClick:()=>M(f),children:"다시 시도"})]})]}),"review"===i&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[(0,r.jsxs)("span",{children:["provider: ",(0,r.jsx)("code",{children:D||"?"})]}),(0,r.jsx)("span",{children:"\xb7"}),(0,r.jsxs)("label",{className:"flex items-center gap-1",children:["polish:",(0,r.jsxs)("select",{value:f,onChange:e=>{let t=e.target.value;x(t),t!==h&&M(t)},className:"rounded border border-input bg-background px-1 py-0.5","aria-label":"polish mode",children:[(0,r.jsx)("option",{value:"minimal",children:"minimal (raw)"}),(0,r.jsx)("option",{value:"enrich",children:"enrich (polished)"})]})]}),(0,r.jsx)("span",{children:"\xb7"}),(0,r.jsxs)("label",{className:"flex items-center gap-1",title:"LLM 비전 우선시 — 더 정확하지만 느림 + 비쌈",children:[(0,r.jsx)("input",{type:"checkbox",checked:N,onChange:e=>{let t=e.target.checked;S(t),M(f,t,I)},"aria-label":"prefer LLM vision"}),"LLM 비전"]}),(0,r.jsx)("span",{children:"\xb7"}),(0,r.jsxs)("label",{className:"flex items-center gap-1",title:"손글씨 우선시 — handwriting strength 추가 (registry 점수 boost)",children:[(0,r.jsx)("input",{type:"checkbox",checked:I,onChange:e=>{let t=e.target.checked;C(t),M(f,N,t)},"aria-label":"prefer handwriting"}),"손글씨"]}),(0,r.jsx)("span",{children:"\xb7"}),(0,r.jsxs)("span",{"data-testid":"notes-applied-polish",children:["applied: ",(0,r.jsx)("code",{children:h}),"enrich"===f&&"minimal"===h&&(0,r.jsx)("span",{className:"ml-1 text-amber-600",children:"(LLM polish 비활성)"})]}),(0,r.jsx)(u.$,{type:"button",variant:"ghost",size:"sm",className:"ml-auto text-xs",onClick:()=>M(f),"aria-label":"re-run OCR",children:"Re-OCR"})]}),(0,r.jsx)("textarea",{value:m,onChange:e=>p(e.target.value),rows:12,placeholder:"markdown 본문…","aria-label":"markdown editor",className:"w-full resize-y rounded-md border border-input bg-background px-3 py-2 font-mono text-xs shadow-xs focus:outline-none focus:ring-2 focus:ring-ring"})]}),(0,r.jsxs)(v.Es,{children:[(0,r.jsx)(u.$,{variant:"outline",onClick:P,children:"취소"}),(0,r.jsx)(u.$,{onClick:()=>void U(),disabled:0===m.trim().length,children:"저장"})]})]})]})})}function N(){let e=(0,a.useRef)(null),[t,n]=(0,a.useState)(!1),[s,l]=(0,a.useState)(null),[o,i]=(0,a.useState)("photo.jpg");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>{var t;return null==(t=e.current)?void 0:t.click()},"aria-label":"save photo as note",title:"사진 → 마크다운 노트로 저장",className:"rounded p-1.5 text-muted-foreground hover:bg-accent hover:text-foreground",children:(0,r.jsx)(g.A,{className:"h-3.5 w-3.5"})}),(0,r.jsx)("input",{ref:e,type:"file",accept:"image/*",capture:"environment",className:"hidden",onChange:function(e){var t;let r=null==(t=e.target.files)?void 0:t[0];e.target.value="",r&&(l(r),i(r.name),n(!0))}}),(0,r.jsx)(k,{open:t,image:s,filename:o,onClose:function(){n(!1),l(null)}})]})}var S=n(63875),I=n(73658);function C(){var e,t,n;let{client:s}=(0,j.Q)(),[l,o]=(0,a.useState)([]),[i,c]=(0,a.useState)(""),[u,m]=(0,a.useState)(!1),p=(0,a.useCallback)(async()=>{try{var e,t;let n=await s.fetchJson("/v1/setup/llm-providers");o(null!=(e=n.providers)?e:[]),c(null!=(t=n.activeProvider)?t:"")}catch(e){}},[s]);(0,a.useEffect)(()=>{p()},[p]);let f=l.filter(e=>"apiKey"===e.flow&&e.hasSavedKey||"auto"===e.flow),x=(0,a.useCallback)(async()=>{if(u||0===f.length)return;let e=f.findIndex(e=>e.provider===i),t=f[(e+1)%f.length];if(t.provider!==i||1!==f.length){m(!0);try{let e=await s.fetchJson("/v1/setup/llm-provider",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({provider:t.provider})});if(e&&e.error)d.oR.error("provider 전환 실패: ".concat(e.error));else{var n,r;c(null!=(r=null==e||null==(n=e.active)?void 0:n.provider)?r:t.provider)}}catch(e){d.oR.error("provider 전환 실패: ".concat(e instanceof Error?e.message:e))}finally{m(!1)}}},[u,f,i,s]);if(0===f.length)return null;let h=null!=(n=null!=(t=null==(e=l.find(e=>e.provider===i))?void 0:e.label)?t:i)?n:f[0].label;return(0,r.jsx)("button",{type:"button",onClick:()=>void x(),disabled:u||f.length<2,className:"rounded-full border border-border bg-card px-2 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:text-foreground disabled:opacity-60",title:f.length<2?"LLM provider: ".concat(h):"클릭하면 다음 provider 로 순환 (현재 ".concat(h,")"),children:h})}var D=n(69475),E=n(49638);function L(e){let{seats:t,selected:n,onSelect:a,disabled:s}=e;return 0===t.length?null:(0,r.jsx)("div",{className:"mb-2 flex flex-wrap items-center gap-1.5","aria-label":"요청할 자리",children:t.map(e=>(0,r.jsx)("button",{type:"button",disabled:s,"aria-pressed":n===e.id,onClick:()=>a(n===e.id?null:e.id),className:(0,f.cn)("rounded-full border px-2.5 py-1 text-xs transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",n===e.id?"border-accent bg-accent/15 font-semibold text-foreground":"border-border text-muted-foreground hover:bg-muted",s&&"opacity-60"),children:e.title},e.id))})}let R=[],A="elanous.seat-ask.client",T=null;function M(e){return/^\s*CTO\s*에게\s*물어봐(?:\s*[::]\s*|\s+)\S/i.test(e)}let U="elanous.pwa.chat.promptHistory.v1";function O(e,t){let n=e.lastIndexOf(t);if(n<0)return null;let r=e.slice(n+1);if(/[\s]/.test(r))return null;if(n>0){let t=e[n-1];if(!/\s/.test(t))return null}return r}function P(e){let{onSubmit:t,disabled:n,attachments:g=R,onAttached:b,onRemoveAttachment:v,tabId:w,voice:k,onListFiles:P,onListSkills:_,prefill:F}=e,{client:z,config:Y}=(0,j.Q)(),[q,H]=(0,a.useState)([]),[J,$]=(0,a.useState)(null),[K,B]=(0,a.useState)([]),[V,W]=(0,a.useState)([]),Q=(0,a.useRef)(null);Q.current||(Q.current=function(){let e=null;try{e=window.sessionStorage.getItem(A)}catch(e){}try{var t,n;null!=e||(e=null!=(n=null==(t=/(?:^|; )elanous\.seat-ask\.client=([a-f0-9-]{36})(?:;|$)/i.exec(document.cookie))?void 0:t[1])?n:null)}catch(e){}null!=e||(e=null!=T?T:crypto.randomUUID()),T=e;try{window.sessionStorage.setItem(A,e)}catch(e){}try{document.cookie="".concat(A,"=").concat(e,"; Path=/; SameSite=Lax; Max-Age=2592000")}catch(e){}return e}()),(0,a.useEffect)(()=>{if("function"!=typeof(null==z?void 0:z.listSeatAskAnswers))return()=>{};let e=!0;if(!Q.current)return()=>{e=!1};let t=!1;try{var n;let e=JSON.parse(null!=(n=window.sessionStorage.getItem("elanous.seat-ask.messages"))?n:"[]");e.length&&W(t=>[...t.filter(t=>{let{id:n}=t;return!e.some(e=>e.id===n)}),...e])}catch(e){}let r=async()=>{if(!t){t=!0;try{let{items:t}=await z.listSeatAskAnswers(Q.current);if(!e||!t.length)return;let r=t.map(e=>{let{id:t,text:n}=e;return{id:t,text:n}});W(e=>[...e,...r.filter(t=>{let{id:n}=t;return!e.some(e=>e.id===n)})]);try{var n;let a=JSON.parse(null!=(n=window.sessionStorage.getItem("elanous.seat-ask.messages"))?n:"[]"),s=[...a,...r.filter(e=>{let{id:t}=e;return!a.some(e=>e.id===t)})];window.sessionStorage.setItem("elanous.seat-ask.messages",JSON.stringify(s)),e&&await z.acknowledgeSeatAskAnswers(Q.current,t.map(e=>{let{id:t}=e;return t}))}catch(e){}}catch(e){}finally{t=!1}}},a=setInterval(r,1e4);return r(),()=>{e=!1,clearInterval(a)}},[z]);let[G,Z]=(0,a.useState)(""),[X,ee]=(0,a.useState)(!1),et=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=!0;return"function"!=typeof(null==z?void 0:z.listSeatRequests)?()=>{e=!1}:(z.listSeatRequests().then(t=>{e&&H(t.seats)}).catch(()=>{}),()=>{e=!1})},[z]);let en=(0,I.o1)("chatInput",w),[er,ea]=(0,a.useState)(()=>{let e=(0,I.N2)(en);return"string"==typeof e?e:""}),[es,el]=(0,a.useState)(()=>(function(){try{let e=window.localStorage.getItem(U);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t.filter(e=>"string"==typeof e)}catch(e){return[]}})()),[eo,ei]=(0,a.useState)(-1),ec=(0,a.useRef)(""),ed=!er.startsWith("/")||/\s/.test(er)?null:er.slice(1),eu=null!==ed?function(e){let t=e.trim().toLowerCase();return 0===t.length?m.bK:m.bK.filter(e=>e.name.toLowerCase().startsWith(t))}(ed):[],[em,ep]=(0,a.useState)(0);(0,a.useEffect)(()=>{ep(0)},[ed]);let ef=P?O(er,"@"):null,[ex,eh]=(0,a.useState)([]),[eg,eb]=(0,a.useState)(""),[ev,ej]=(0,a.useState)(0);(0,a.useEffect)(()=>{if(null===ef||!P)return;ej(0);let e=setTimeout(()=>{P(ef).then(e=>{eh(e.entries),eb(e.cwd)}).catch(()=>{})},200);return()=>clearTimeout(e)},[ef,P]),(0,a.useEffect)(()=>{null===ef&&(eh([]),eb(""),ej(0))},[ef]);let[ey,ew]=(0,a.useState)(!1),[ek,eN]=(0,a.useState)(0),eS=(0,a.useRef)(""),eI=ey?0===er.trim().length?es:es.filter(e=>e.toLowerCase().includes(er.trim().toLowerCase())):[],eC=()=>{ea(eS.current),ew(!1),eN(0),eS.current=""},eD=_?O(er,"$"):null,[eE,eL]=(0,a.useState)([]),[eR,eA]=(0,a.useState)(0),[eT,eM]=(0,a.useState)(D.kv);(0,a.useEffect)(()=>(eM((0,D.Vm)()),(0,D.$L)(eM)),[]);let{prediction:eU,predict:eO,clear:eP}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{baseUrl:t,token:n,enabled:r=!0,debounceMs:s=300}=e,[l,o]=(0,a.useState)(null),[i,c]=(0,a.useState)(!1),[d,u]=(0,a.useState)(null),m=(0,a.useRef)(null),p=(0,a.useRef)(null),f=(0,a.useCallback)(()=>{m.current&&(clearTimeout(m.current),m.current=null),p.current&&(p.current.abort(),p.current=null)},[]),x=(0,a.useCallback)(()=>{f(),o(null),u(null)},[f]),h=(0,a.useCallback)(function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(f(),!r||!t||0===e.trim().length&&0===a.length)return void o(null);m.current=setTimeout(async()=>{m.current=null;let r=new AbortController;p.current=r,c(!0);try{let s="".concat(t,"/v1/llm/route/predict"),l={"Content-Type":"application/json"};n&&n.length>0&&(l.Authorization="Bearer ".concat(n));let i=await fetch(s,{method:"POST",headers:l,body:JSON.stringify({text:e,attachments:a.map(e=>({kind:e}))}),signal:r.signal});if(r.signal.aborted)return;if(!i.ok)return void u("http-".concat(i.status));let c=await i.json();o(c),u(null)}catch(e){if(r.signal.aborted)return;u(e instanceof Error?e.message:String(e))}finally{p.current===r&&(p.current=null),c(!1)}},s)},[t,n,r,s,f]);return(0,a.useEffect)(()=>()=>f(),[f]),{prediction:l,inflight:i,error:d,predict:h,clear:x}}({baseUrl:Y.baseUrl,token:Y.token,enabled:eT.autoRouting});(0,a.useEffect)(()=>{if(!eT.autoRouting)return void eP();eO(er,g.map(e=>{var t;return(null==(t=e.mediaType)?void 0:t.startsWith("image/"))?"image":"document"}))},[er,eT.autoRouting,g,eO,eP]),(0,a.useEffect)(()=>{if(null===eD||!_)return;eA(0);let e=setTimeout(()=>{_(eD).then(e=>{eL(e.entries)}).catch(()=>{})},200);return()=>clearTimeout(e)},[eD,_]),(0,a.useEffect)(()=>{null===eD&&(eL([]),eA(0))},[eD]),(0,a.useEffect)(()=>{let e=(0,p.ht)();e&&(ea(e),d.oR.success("\uD83D\uDCE5 공유 받음 — 검토 후 보내세요"))},[]),(0,a.useEffect)(()=>{F&&(ea(F.text),(0,p.ht)())},[F]);let e_=(0,a.useRef)(null);(0,a.useEffect)(()=>(e_.current&&clearTimeout(e_.current),e_.current=setTimeout(()=>{0===er.length?(0,I.yd)(en):(0,I.Os)(en,er)},300),()=>{e_.current&&clearTimeout(e_.current)}),[er,en]);let eF=async e=>{ee(!0),Z("");try{if(M(e.text)){let t=await z.submitSeatAsk(e.text,Q.current);W(e=>[...e,{id:crypto.randomUUID(),text:t.reply}]),ea(""),(0,I.yd)(en);return}let t=await z.submitSeatRequest({seat:e.seat,text:e.text,...e.attachments.length?{attachments:e.attachments}:{}},e.key);for(let n of((0,y.cY)("pwa.seat-request.sent",{seat:t.seat,attachments:e.attachments.length}),B(e=>[...e,t]),et.current=null,e.attachments))null==v||v(n.id);ea(""),(0,I.yd)(en)}catch(t){et.current=e,t instanceof E.J_&&"unknown-seat"===t.code?(H(t.seats),J&&!t.seats.some(e=>e.id===J)&&($(null),et.current=null),Z("그 자리를 찾지 못했습니다 — ".concat(t.seats.map(e=>e.title).join(", ")))):t instanceof E.J_&&"attachments-unsupported"===t.code?Z("이 자리는 첨부를 받지 않습니다"):t instanceof E.J_&&"unknown-attachment"===t.code?Z("첨부가 만료됐습니다 — 다시 올려 주세요"):Z("접수하지 못했습니다 — 잠시 뒤 다시")}finally{ee(!1)}},ez=()=>eY(er),eY=e=>{if(n||X)return;let r=e.trim();if(M(r))return g.length?void Z("질문에는 첨부를 넣을 수 없습니다"):void eF({seat:"TC",text:r,attachments:[],key:crypto.randomUUID()});let a=/^@\S+\s+[\s\S]*\S$/.test(e.trimEnd());if((a||J)&&g.length>4)return void Z("자리 요청 첨부는 4개까지");if(J&&!r&&g.length)return void Z("자리 요청 내용을 입력해 주세요");if((a||J)&&r){let e=a?{text:r,attachments:[...g],key:crypto.randomUUID()}:{seat:J,text:r,attachments:[...g],key:crypto.randomUUID()},t=et.current;eF(t&&t.seat===e.seat&&t.text===e.text&&t.attachments.length===e.attachments.length&&t.attachments.every((t,n)=>{var r;return t.id===(null==(r=e.attachments[n])?void 0:r.id)})?t:e);return}(r||0!==g.length)&&(r.length>0&&(el(e=>{if(e[0]===r)return e;let t=[r,...e].slice(0,50);try{window.localStorage.setItem(U,JSON.stringify(t))}catch(e){}return t}),ei(-1),ec.current=""),t(r),ea(""),(0,I.yd)(en))},eq=e=>{let t=er.lastIndexOf("@");if(t<0)return;let n=er.slice(0,t),r=e.isDir?"".concat(e.relPath,"/"):e.relPath;ea("".concat(n,"@").concat(r).concat(e.isDir?"":" "))},eH=e=>{let t=er.lastIndexOf("$");if(t<0)return;let n=er.slice(0,t).trim();ea("/run-skill ".concat(e.name," ").concat(n?"".concat(n," "):""))},eJ=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eu[Math.min(Math.max(em,0),eu.length-1)];e&&ea(":".concat(e.name," "))};(0,a.useEffect)(()=>{!(eo<0)&&es[eo]&&er!==es[eo]&&(ei(-1),ec.current="")},[er]);let e$=(0,m.FM)(er);return(0,r.jsxs)("div",{className:"border-t border-border bg-background p-3",children:[K.map(e=>{var t,n;return(0,r.jsxs)("div",{role:"status",className:"mb-2 rounded-md border border-border bg-card px-3 py-2 text-sm",children:["\uD83D\uDCE8 ",null!=(n=null==(t=q.find(t=>t.id===e.seat))?void 0:t.title)?n:e.seat," 접수 ",e.receiptId," \xb7 방금 \xb7 받음",e.attachments?" \xb7 첨부 ".concat(e.attachments):"",e.channel?" \xb7 채널 ".concat(e.channel):""]},e.receiptId)}),V.map(e=>(0,r.jsx)("p",{role:"status",className:"mb-2 rounded-md border border-border px-3 py-2 text-sm",children:e.text},e.id)),G&&(0,r.jsx)("p",{role:"alert",className:"mb-2 text-sm text-destructive",children:G}),(0,r.jsx)(L,{seats:q,selected:J,onSelect:e=>{$(e),Z("")},disabled:n||X}),ey&&(0,r.jsxs)("div",{className:"mb-2 overflow-hidden rounded-md border border-border bg-card shadow-md",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-3 py-1.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:[(0,r.jsx)("span",{children:"\uD83D\uDD0E reverse-i-search"}),(0,r.jsxs)("span",{className:"text-xs font-semibold",children:[eI.length," match",1===eI.length?"":"es"]})]}),0===eI.length?(0,r.jsx)("div",{className:"px-3 py-2 text-xs text-muted-foreground",children:0===er.length?"history 가 비어 있음":"일치 없음 — '".concat(er,"'")}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("ul",{className:"divide-y divide-border",children:eI.slice(0,8).map((e,t)=>{let n=t===ek;return(0,r.jsx)("li",{role:"button",tabIndex:-1,onMouseDown:n=>{n.preventDefault(),eN(t),requestAnimationFrame(()=>{ew(!1),eS.current="",ea(e)})},className:(0,f.cn)("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm",n?"bg-accent/15 font-semibold":"hover:bg-accent/8"),children:(0,r.jsx)("span",{className:"line-clamp-2",children:e})},"".concat(e,"-").concat(t))})}),eI.length>8&&(0,r.jsxs)("div",{className:"px-3 py-1 text-[10px] text-muted-foreground",children:["+ ",eI.length-8," more (refine query)"]})]})]}),null!==ef&&ex.length>0&&(0,r.jsxs)("div",{className:"mb-2 overflow-hidden rounded-md border border-border bg-card shadow-md",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-3 py-1.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:[(0,r.jsxs)("span",{title:eg,children:["\uD83D\uDCC1 ",eg.length>48?"…"+eg.slice(-45):eg]}),(0,r.jsx)("span",{className:"text-xs font-semibold",children:ex.length})]}),(0,r.jsx)("ul",{className:"divide-y divide-border",children:ex.slice(0,12).map((e,t)=>{let n=t===ev;return(0,r.jsxs)("li",{role:"button",tabIndex:-1,onMouseDown:n=>{n.preventDefault(),ej(t),requestAnimationFrame(()=>eq(e))},className:(0,f.cn)("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm",n?"bg-accent/15":"hover:bg-accent/8"),children:[(0,r.jsx)("span",{className:"text-xs",children:e.isDir?"\uD83D\uDCC2":"\uD83D\uDCC4"}),(0,r.jsxs)("span",{className:(0,f.cn)("font-mono",n?"font-semibold":"font-normal"),children:[e.name,e.isDir?"/":""]}),e.isDir&&(0,r.jsx)("span",{className:"ml-auto text-[10px] uppercase text-muted-foreground",children:"dir"})]},e.relPath)})}),ex.length>12&&(0,r.jsxs)("div",{className:"px-3 py-1 text-[10px] text-muted-foreground",children:["+ ",ex.length-12," more (refine query)"]})]}),null!==eD&&eE.length>0&&(0,r.jsxs)("div",{className:"mb-2 overflow-hidden rounded-md border border-border bg-card shadow-md",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-3 py-1.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:[(0,r.jsx)("span",{children:"✨ skills"}),(0,r.jsx)("span",{className:"text-xs font-semibold",children:eE.length})]}),(0,r.jsx)("ul",{className:"divide-y divide-border",children:eE.map((e,t)=>{let n=t===eR;return(0,r.jsxs)("li",{role:"button",tabIndex:-1,onMouseDown:n=>{n.preventDefault(),eA(t),requestAnimationFrame(()=>eH(e))},className:(0,f.cn)("flex cursor-pointer flex-col gap-0.5 px-3 py-1.5",n?"bg-accent/15":"hover:bg-accent/8"),children:[(0,r.jsx)("span",{className:(0,f.cn)("font-mono text-sm",n?"font-semibold":"font-normal"),children:e.name}),e.description.length>0&&(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:e.description})]},e.name)})})]}),null!==ed&&(0,r.jsxs)("div",{className:"mb-2 overflow-hidden rounded-md border border-border bg-card shadow-md",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-3 py-1.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:[(0,r.jsx)("span",{children:"slash commands"}),(0,r.jsx)("span",{className:"text-xs font-semibold",children:eu.length})]}),0===eu.length?(0,r.jsx)("div",{className:"px-3 py-2 text-xs text-muted-foreground",children:"일치하는 명령 없음"}):(0,r.jsx)("ul",{className:"divide-y divide-border",children:eu.map((e,t)=>{let n=t===em;return(0,r.jsxs)("li",{role:"button",tabIndex:-1,onMouseDown:n=>{n.preventDefault(),ep(t),eJ(e)},className:(0,f.cn)("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm",n?"bg-accent/15":"hover:bg-accent/8"),children:[(0,r.jsxs)("span",{className:(0,f.cn)("font-mono",n?"font-semibold text-foreground":"text-foreground/86"),children:[":",e.name]}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:e.description})]},e.name)})})]}),g.length>0&&(0,r.jsx)("ul",{className:"mb-2 flex flex-wrap gap-1.5",children:g.map(e=>{var t,n;let a="string"==typeof e.mediaType&&e.mediaType.startsWith("image/");return(0,r.jsxs)("li",{className:"inline-flex items-center gap-1.5 rounded-md border border-border bg-card px-1.5 py-0.5 text-[11px]",title:null!=(t=e.path)?t:e.filename,children:[a?(0,r.jsx)("img",{src:function(e,t,n){if(!e)return"";let r=e.includes("?")?"&":"?",a=n?"".concat(r,"auth=").concat(encodeURIComponent(n)):"";return"".concat(null!=t?t:"").concat(e).concat(a)}(e.downloadUrl,Y.baseUrl,Y.token),alt:e.filename,className:"h-6 w-6 rounded-sm object-cover",loading:"lazy"}):(0,r.jsx)(s.A,{className:"h-3 w-3 text-muted-foreground","aria-hidden":!0}),(0,r.jsx)("span",{className:"max-w-[160px] truncate font-mono",children:e.filename}),(0,r.jsx)("span",{className:"text-muted-foreground",children:(n=e.size)<1024?"".concat(n," B"):n<1048576?"".concat((n/1024).toFixed(1)," kB"):"".concat((n/1024/1024).toFixed(1)," MB")}),v&&(0,r.jsx)("button",{type:"button",onClick:()=>v(e.id),"aria-label":"remove ".concat(e.filename),className:"rounded text-muted-foreground hover:text-rose-500",children:(0,r.jsx)(l.A,{className:"h-3 w-3"})})]},e.id)})}),(0,r.jsxs)("div",{className:"relative flex flex-wrap items-end gap-2 sm:flex-nowrap",children:[(0,r.jsxs)("div",{className:"flex shrink-0 basis-full items-center gap-0.5 pb-1 sm:basis-auto","data-elanous-composer-tools":!0,children:[(0,r.jsx)(x.T,{onAttached:b?e=>b([e]):void 0}),(0,r.jsx)(h.u,{onAttached:b}),(0,r.jsx)(N,{}),(0,r.jsx)(S.z,{}),(0,r.jsx)(C,{}),eT.autoRouting&&eU&&(0,r.jsx)("span",{className:"text-xs text-muted-foreground",title:"입력 의도 분류 \xb7 ACP 송신 경로는 변경하지 않습니다",children:eU.mission})]}),(0,r.jsx)("textarea",{value:er,onChange:e=>ea(e.target.value),onKeyDown:e=>{if(e.ctrlKey&&("r"===e.key||"R"===e.key)){e.preventDefault(),ey||(eS.current=er,ew(!0),eN(0),ea(""));return}if(ey){if("Enter"===e.key&&!e.shiftKey){e.preventDefault(),(()=>{if(0===eI.length)return eC();let e=Math.min(Math.max(ek,0),eI.length-1),t=eI[e];ew(!1),eN(0),eS.current="",ea(t)})();return}if("ArrowUp"===e.key){e.preventDefault(),eN(e=>Math.max(0,e-1));return}if("ArrowDown"===e.key){e.preventDefault(),eN(e=>Math.min(eI.length-1,e+1));return}if("Escape"===e.key){e.preventDefault(),eC();return}}if("Tab"===e.key&&!e.shiftKey&&(()=>{if(null!==ef&&ex.length>0){let e=Math.min(Math.max(ev,0),ex.length-1),t=ex[e],n=er.lastIndexOf("@");if(n<0)return!1;let r=er.slice(0,n),a=t.isDir?"".concat(t.name,"/"):t.name;return ea("".concat(r,"@").concat(a)),!0}if(null!==eD&&eE.length>0){let e=Math.min(Math.max(eR,0),eE.length-1),t=eE[e],n=er.lastIndexOf("$");if(n<0)return!1;let r=er.slice(0,n);return ea("".concat(r,"$").concat(t.name)),!0}if(null!==ed&&eu.length>0){let e=Math.min(Math.max(em,0),eu.length-1);return eJ(eu[e]),!0}return!1})())return void e.preventDefault();if(null!==ef&&ex.length>0){if("Enter"===e.key&&!e.shiftKey){e.preventDefault(),(()=>{if(0===ex.length)return;let e=Math.min(Math.max(ev,0),ex.length-1);eq(ex[e])})();return}if("ArrowUp"===e.key){e.preventDefault(),ej(e=>Math.max(0,e-1));return}if("ArrowDown"===e.key){e.preventDefault(),ej(e=>Math.min(ex.length-1,e+1));return}if("Escape"===e.key){e.preventDefault();let t=er.lastIndexOf("@");t>=0&&ea(er.slice(0,t));return}}if(null!==eD&&eE.length>0){if("Enter"===e.key&&!e.shiftKey){e.preventDefault(),(()=>{if(0===eE.length)return;let e=Math.min(Math.max(eR,0),eE.length-1);eH(eE[e])})();return}if("ArrowUp"===e.key){e.preventDefault(),eA(e=>Math.max(0,e-1));return}if("ArrowDown"===e.key){e.preventDefault(),eA(e=>Math.min(eE.length-1,e+1));return}if("Escape"===e.key){e.preventDefault();let t=er.lastIndexOf("$");t>=0&&ea(er.slice(0,t));return}}if(null!==ed&&eu.length>0){if("Enter"===e.key&&!e.shiftKey){e.preventDefault();let t=function(e,t,n){let r=t.find(t=>t.name.toLowerCase()===e.trim().toLowerCase());if(r)return{kind:"run",line:":".concat(r.name)};let a=t[Math.min(Math.max(n,0),t.length-1)];return a?{kind:"complete",value:":".concat(a.name," ")}:null}(ed,eu,em);(null==t?void 0:t.kind)==="run"?eY(t.line):t&&ea(t.value);return}if("ArrowUp"===e.key){e.preventDefault(),ep(e=>Math.max(0,e-1));return}if("ArrowDown"===e.key){e.preventDefault(),ep(e=>Math.min(eu.length-1,e+1));return}if("Escape"===e.key){e.preventDefault(),ea("");return}}if("Enter"===e.key&&!e.shiftKey){e.preventDefault(),ez();return}if("ArrowUp"===e.key){(()=>{if(0===es.length||er.includes("\n"))return!1;-1===eo&&(ec.current=er);let e=Math.min(eo+1,es.length-1);return e===eo||(ei(e),ea(es[e]),!0)})()&&e.preventDefault();return}if("ArrowDown"===e.key){(()=>{if(eo<0||er.includes("\n"))return!1;if(0===eo)return ei(-1),ea(ec.current),!0;let e=eo-1;return ei(e),ea(es[e]),!0})()&&e.preventDefault();return}},placeholder:"메시지 \xb7 :help 명령 목록",rows:2,disabled:n||X,className:(0,f.cn)("min-h-[44px] max-h-[180px] min-w-0 flex-1 resize-y rounded-md border border-input bg-background px-3 py-2 text-sm shadow-xs focus:outline-none focus:ring-2 focus:ring-ring",e$&&"border-accent text-accent-foreground bg-accent/10",n&&"opacity-60")}),k&&(0,r.jsx)("button",{type:"button",onClick:k.onToggle,disabled:k.disabled,title:k.disabled?"daemon URL 미설정":k.phaseLabel,"data-elanous-action":"chat-voice-toggle-inline",className:(0,f.cn)("inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md border transition-colors",k.active?"border-rose-500/40 bg-rose-500/10 text-rose-600 hover:bg-rose-500/20":"border-input bg-background text-foreground hover:bg-muted",k.disabled&&"cursor-not-allowed opacity-50"),children:(0,r.jsxs)("span",{className:"relative inline-flex",children:[k.active?(0,r.jsx)(o.A,{className:"h-4 w-4"}):(0,r.jsx)(i.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{"aria-hidden":!0,className:(0,f.cn)("absolute -right-0.5 -top-0.5 h-1.5 w-1.5 rounded-full",k.dotColor,("listening"===k.phase||"speaking"===k.phase)&&"animate-pulse")})]})}),(0,r.jsx)(u.$,{onClick:ez,disabled:n||X||!er.trim()&&0===g.length,size:"sm",children:(0,r.jsx)(c.A,{className:"h-4 w-4"})})]}),e$&&(0,r.jsx)("p",{className:"mt-1 text-[11px] text-muted-foreground",children:"meta command — handled locally, not sent to LLM"})]})}},45105:(e,t,n)=>{n.d(t,{Qh:()=>y,lW:()=>v,o:()=>j});var r=n(77194),a=n(49954),s=n(8801),l=n(19631),o=n(2929),i=n(87714),c=n(47829),d=n(56403),u=n(73866),m=n(89463),p=n(17083),f=n(96844),x=n(55844),h=n(35857),g=n(45337);let b={cli:"cli",pwa:"pwa",tg:"tg",dc:"dc"};async function v(e){if(!e||"undefined"==typeof navigator||!navigator.clipboard)return!1;try{return await navigator.clipboard.writeText(e),!0}catch(e){return!1}}function j(e){return e?e.length<=8?e:"".concat(e.slice(0,8),"…"):"—"}function y(){var e,t,n,j,y;let w=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},k=(0,s.Q)(),N=(0,o.t)(),[S,I]=(0,a.useState)(!1),[C,D]=(0,a.useState)(!1),[E,L]=(0,a.useState)(!1),R=(0,a.useRef)(null),A=(0,a.useRef)(null),T=(0,a.useRef)(null),M=null!=(e=w.sessionId)?e:k.sessionId,U=N.find(e=>e.id===M);(0,a.useEffect)(()=>()=>{R.current&&clearTimeout(R.current),A.current&&clearTimeout(A.current)},[]),(0,a.useEffect)(()=>{if(!C)return;let e=e=>{T.current&&!T.current.contains(e.target)&&D(!1)},t=e=>{"Escape"===e.key&&D(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[C]);let O=async()=>{if(!M)return;let e=await v(M);(0,h.cY)("webterm.session-pill.copy",{sessionId:M,ok:e,source:"dropdown"}),e&&(L(!0),A.current&&clearTimeout(A.current),A.current=setTimeout(()=>L(!1),1200))},P=S?"한 번 더 누르면 새 대화가 시작됩니다 — 지금 대화는 그대로 저장되고 대화 목록에 남습니다":"새 대화 시작 (두 번 클릭) — 빈 대화에서 새로 시작합니다",_=null!=(t=null==U?void 0:U.lastMsgPreview)?t:null;return(0,r.jsxs)("div",{ref:T,className:"relative flex items-center",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-border bg-card px-2 py-1 text-[11px]",children:[(0,r.jsx)("span",{className:"text-muted-foreground font-mono",children:"대화:"}),(0,r.jsx)(g.S,{sessionId:M,source:"pill"}),(null==U?void 0:U.origin)&&(0,r.jsx)("span",{className:"ml-1 rounded bg-muted px-1 py-0.5 font-mono text-[9px] uppercase text-muted-foreground",children:null!=(n=b[U.origin])?n:U.origin}),_&&(0,r.jsx)("span",{className:"ml-1 max-w-[180px] truncate border-l border-border pl-2 text-muted-foreground",title:_,children:_}),(0,r.jsxs)("span",{className:"ml-1 flex items-center gap-1 border-l border-border pl-1.5",children:[(0,r.jsx)("button",{type:"button",onClick:()=>{if(!S){I(!0),(0,h.cY)("webterm.session-pill.fork-armed",{sessionId:M}),R.current&&clearTimeout(R.current),R.current=setTimeout(()=>{I(!1),(0,h.cY)("webterm.session-pill.fork-disarmed-timeout",{sessionId:M})},4e3);return}R.current&&(clearTimeout(R.current),R.current=null),I(!1);let e=(0,l.Zr)();(0,h.cY)("webterm.session-pill.fork-confirmed",{previous:M,next:e}),k.setSessionId(e)},className:S?"rounded p-0.5 bg-destructive text-destructive-foreground hover:bg-destructive/90":"rounded p-0.5 hover:bg-secondary",title:P,"aria-label":P,children:(0,r.jsx)(i.A,{className:"h-3 w-3"})}),S?(0,r.jsx)("span",{className:"text-[10px] text-destructive","aria-live":"polite",children:"새 대화?"}):null,(0,r.jsx)("button",{type:"button",onClick:()=>D(e=>!e),"aria-label":"대화 메뉴",className:"rounded p-0.5 hover:bg-secondary",title:"대화 메뉴",children:(0,r.jsx)(c.A,{className:"h-3 w-3"})})]})]}),C&&(0,r.jsxs)("div",{role:"menu",className:"absolute left-0 top-7 z-50 w-72 rounded-md border border-border bg-popover py-1 text-xs shadow-md",children:[(0,r.jsxs)("button",{type:"button",role:"menuitem",onClick:()=>{let e=(0,l.Zr)();(0,h.cY)("webterm.session-pill.new-chat",{previous:M,next:e,source:"menu"}),k.setSessionId(e),D(!1)},className:"flex w-full items-start gap-2 px-3 py-1.5 text-left hover:bg-secondary",children:[(0,r.jsx)(d.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,r.jsxs)("span",{children:["새 대화 시작",(0,r.jsx)("span",{className:"block text-[10px] text-muted-foreground",children:"빈 대화에서 새로 시작합니다 \xb7 지금 대화는 대화 목록에 남습니다"})]})]}),w.onAttachRequest&&(0,r.jsxs)("button",{type:"button",role:"menuitem",onClick:()=>{w.onAttachRequest(),D(!1)},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-secondary",children:[(0,r.jsx)(u.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),"다른 대화로 전환"]}),(0,r.jsxs)("div",{className:"px-3 py-1.5 text-muted-foreground",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)(m.A,{className:"h-3 w-3 shrink-0"}),(0,r.jsx)("span",{className:"text-[10px] uppercase tracking-wide",children:"대화 ID"})]}),(0,r.jsxs)("div",{className:"mt-1 flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"flex-1 select-all break-all font-mono text-[11px] text-foreground",title:M||"",children:M||"(미설정)"}),(0,r.jsx)("button",{type:"button",onClick:()=>void O(),disabled:!M,className:"shrink-0 rounded p-1 hover:bg-secondary disabled:cursor-not-allowed disabled:opacity-50",title:E?"복사됨":"대화 ID 전체 복사","aria-label":"대화 ID 복사","data-elanous-action":"session-id-copy-dropdown",children:E?(0,r.jsx)(p.A,{className:"h-3 w-3 text-emerald-500"}):(0,r.jsx)(f.A,{className:"h-3 w-3"})})]}),(0,r.jsxs)("div",{className:"mt-1 text-[10px]",children:[null!=(j=null==U?void 0:U.msgCount)?j:0," 메시지",(null==U?void 0:U.origin)&&" \xb7 ".concat(null!=(y=b[U.origin])?y:U.origin)]})]}),w.onForgetRequest&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"my-1 border-t border-border"}),(0,r.jsxs)("button",{type:"button",role:"menuitem",onClick:()=>{w.onForgetRequest(),D(!1)},className:"flex w-full items-center gap-2 px-3 py-1.5 text-rose-500 hover:bg-rose-500/10",children:[(0,r.jsx)(x.A,{className:"h-3.5 w-3.5"}),"이 대화 지우기"]})]})]})]})}},45337:(e,t,n)=>{n.d(t,{S:()=>d});var r=n(77194),a=n(49954),s=n(17083),l=n(96844),o=n(35083),i=n(45105),c=n(35857);function d(e){let{sessionId:t,source:n="inline",variant:d="default",className:u,showCopyIcon:m=!0}=e,[p,f]=(0,a.useState)(!1),x=(0,a.useRef)(null);(0,a.useEffect)(()=>()=>{x.current&&clearTimeout(x.current)},[]);let h=async()=>{if(!t)return;let e=await (0,i.lW)(t);(0,c.cY)("webterm.session-id-chip.copy",{sessionId:t,ok:e,source:n}),e&&(f(!0),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>f(!1),1200))},g=(0,i.o)(t),b=!t,v=t?"대화 ID 전체 (".concat(t.length,"자): ").concat(t,"\n\xb7 누르면 자동으로 복사됩니다 — 앞 8자만 표시합니다 (… 표시는 생략됨)\n\xb7 새 대화를 시작하면 다른 ID가 발급됩니다"):"대화가 선택되지 않았습니다";return(0,r.jsxs)("span",{role:"button",tabIndex:b?-1:0,"aria-disabled":b,onClick:b?void 0:e=>{e.stopPropagation(),h()},onKeyDown:b?void 0:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),e.stopPropagation(),h())},title:v,"aria-label":t?"대화 ID ".concat(t," 복사"):"대화가 선택되지 않았습니다","data-elanous-session-id":null!=t?t:"","data-elanous-action":"session-id-copy",className:(0,o.cn)("inline-flex items-center gap-1 rounded font-mono transition-colors select-none focus:outline-none focus:ring-1 focus:ring-ring","default"===d?"px-1 py-0.5 hover:bg-secondary":"opacity-70 hover:opacity-100 hover:bg-muted/40 px-0.5",p&&"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",b&&"cursor-not-allowed opacity-40",!b&&"cursor-copy",u),children:[(0,r.jsx)("span",{children:g}),m&&(p?(0,r.jsx)(s.A,{className:"h-3 w-3","aria-hidden":!0}):(0,r.jsx)(l.A,{className:"h-3 w-3 opacity-60","aria-hidden":!0}))]})}},51116:(e,t,n)=>{n.d(t,{ht:()=>s,vn:()=>a});let r="elanous.pwa.sharePrefill";function a(e){try{window.sessionStorage.setItem(r,e)}catch(e){}}function s(){try{var e;let t=null!=(e=window.sessionStorage.getItem(r))?e:"";return window.sessionStorage.removeItem(r),t}catch(e){return""}}},53841:(e,t,n)=>{n.d(t,{K:()=>i,u:()=>a});var r=n(49954);let a=932,s="elanous.pwa.wideView",l="elanous:wide-view";function o(){try{return"1"===window.localStorage.getItem(s)}catch(e){return!1}}function i(){let[e,t]=(0,r.useState)(null),[n,i]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{t(window.innerWidth),i(o());let e=()=>t(window.innerWidth),n=e=>{let t=e.detail;i("boolean"==typeof t?t:o())};return window.addEventListener("resize",e),window.addEventListener(l,n),window.addEventListener("storage",n),()=>{window.removeEventListener("resize",e),window.removeEventListener(l,n),window.removeEventListener("storage",n)}},[]),{compact:null!==e&&e<=a&&!n,setWide:(0,r.useCallback)(e=>{i(e);try{e?window.localStorage.setItem(s,"1"):window.localStorage.removeItem(s)}catch(e){}window.dispatchEvent(new CustomEvent(l,{detail:e}))},[])}}},53920:(e,t,n)=>{async function r(e){let t=await e.fetchResponse("/v1/ops-board/notices");if(!t.ok)throw Error("notices list failed: ".concat(t.status));return(await t.json()).notices}async function a(e,t,n){let r=await e.fetchResponse("/v1/ops-board/notices",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({noticeId:t,body:n})});if(!r.ok)throw Error("notice reply failed: ".concat(r.status));return(await r.json()).reply}async function s(e){let t=await e.fetchResponse("/v1/decisions?status=open");if(!t.ok)throw Error("decisions list failed: ".concat(t.status));return(await t.json()).decisions}async function l(e,t,n,r){let a=await e.fetchResponse("/v1/decisions/".concat(encodeURIComponent(t),"/decide"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({choice:n,...void 0===r?{}:{note:r}})});if(!a.ok)throw Error("decision failed: ".concat(a.status));return a.json()}n.d(t,{LD:()=>l,aj:()=>a,kh:()=>r,qK:()=>s})},60814:(e,t,n)=>{n.d(t,{rm:()=>o});var r=n(77194),a=n(49954),s=n(8801),l=n(44328);function o(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{loadStatus:n=l.gh,pollMs:o=6e4,initialStatus:i}=t,{config:c}=(0,s.Q)(),[d,u]=(0,a.useState)(void 0===i?void 0:i);if((0,a.useEffect)(()=>{let e=!1,t=async()=>{if(!c.baseUrl){e||u(null);return}let t=await n({baseUrl:c.baseUrl,...c.token?{token:c.token}:{}});e||u(t)};if(t(),o<=0)return()=>{e=!0};let r=setInterval(()=>{t()},o);return()=>{e=!0,clearInterval(r)}},[c.baseUrl,c.token,n,o]),void 0===d)return null;if(null===d)return(0,r.jsx)("div",{className:"rounded-md border border-border bg-muted/40 px-2 py-1 text-[11px] text-muted-foreground",title:"예산 상태를 읽지 못했습니다","data-elanous-pill":"budget","data-budget-status":"unread",children:"budget —"});let m="warning"===(e=d.status)||"cap-exceeded"===e;return(0,r.jsx)("div",{className:m?"rounded-md border border-amber-500/50 bg-amber-500/10 px-2 py-1 text-[11px] font-medium text-amber-700 dark:text-amber-300":"rounded-md border border-border bg-muted/40 px-2 py-1 text-[11px] text-muted-foreground",title:"".concat(d.monthYYYYMM," \xb7 ").concat(d.status),"data-elanous-pill":"budget","data-budget-status":d.status,"data-budget-emphasis":m?"true":"false",children:function(e){let t="이번 달 ".concat(function(e){let t=Number.isFinite(e)?e:0;return"$".concat(t.toFixed(2))}(e.monthSoFarUsd));return null!=e.percent&&Number.isFinite(e.percent)?"".concat(t," \xb7 ").concat(e.percent,"%"):t}(d)})}},61332:(e,t,n)=>{n.d(t,{Cf:()=>g,Es:()=>v,L3:()=>j,c7:()=>b,lG:()=>f,rr:()=>y});var r=n(77194);n(49954);var a=n(44169),s=n(81694),l=n(67150),o=n(3213),i=n(35600),c=n(34428),d=n(41356),u=n(35083),m=n(44092),p=n(26603);function f(e){let{...t}=e;return(0,r.jsx)(a.D,{"data-slot":"dialog",...t})}function x(e){let{...t}=e;return(0,r.jsx)(s.Z,{"data-slot":"dialog-portal",...t})}function h(e){let{className:t,...n}=e;return(0,r.jsx)(l.X,{"data-slot":"dialog-overlay",className:(0,u.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",t),...n})}function g(e){let{className:t,children:n,showCloseButton:a=!0,...s}=e;return(0,r.jsxs)(x,{children:[(0,r.jsx)(h,{}),(0,r.jsxs)(o.h,{"data-slot":"dialog-content",className:(0,u.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...s,children:[n,a&&(0,r.jsxs)(i.H,{"data-slot":"dialog-close",render:(0,r.jsx)(m.$,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[(0,r.jsx)(p.A,{}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function b(e){let{className:t,...n}=e;return(0,r.jsx)("div",{"data-slot":"dialog-header",className:(0,u.cn)("flex flex-col gap-2",t),...n})}function v(e){let{className:t,showCloseButton:n=!1,children:a,...s}=e;return(0,r.jsxs)("div",{"data-slot":"dialog-footer",className:(0,u.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",t),...s,children:[a,n&&(0,r.jsx)(i.H,{render:(0,r.jsx)(m.$,{variant:"outline"}),children:"Close"})]})}function j(e){let{className:t,...n}=e;return(0,r.jsx)(c.L,{"data-slot":"dialog-title",className:(0,u.cn)("font-heading text-base leading-none font-medium",t),...n})}function y(e){let{className:t,...n}=e;return(0,r.jsx)(d.r,{"data-slot":"dialog-description",className:(0,u.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",t),...n})}},65449:(e,t,n)=>{n.d(t,{l:()=>s});var r=n(77194),a=n(49954);function s(e){let[t,n]=(0,a.useState)("");if("onChoose"in e){let{decision:t,onChoose:n,busy:a}=e;return(0,r.jsxs)("article",{className:"rounded border border-border bg-card p-3","data-decision-card":t.id,children:[(0,r.jsx)("h3",{className:"text-sm font-semibold",children:t.title}),(0,r.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm text-muted-foreground",children:t.situation}),(0,r.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:t.options.map(e=>(0,r.jsxs)("button",{type:"button",disabled:a,onClick:()=>n(e),className:"rounded-md border border-border px-2 py-1 text-sm hover:bg-muted disabled:opacity-50",children:[e.label,"option"in t.recommendation&&t.recommendation.option===e.id&&(0,r.jsx)("span",{className:"ml-1 text-primary",children:"추천"})]},e.id))})]})}let{decision:s,onDecide:l,decidingChoice:o}=e,i=s.resolution.status,c="decided"===s.resolution.status?s.resolution.chosen:null;return(0,r.jsxs)("article",{className:"rounded border border-zinc-200 bg-white p-3",children:[(0,r.jsxs)("header",{className:"flex items-baseline justify-between gap-2",children:[(0,r.jsx)("p",{className:"text-sm font-medium",children:s.question}),(0,r.jsx)("time",{className:"shrink-0 text-xs opacity-60",dateTime:new Date(s.ts).toISOString(),children:new Date(s.ts).toLocaleString()})]}),(0,r.jsx)("ul",{className:"mt-2 flex flex-col gap-2",children:s.opinions.map((e,t)=>(0,r.jsxs)("li",{className:"rounded bg-zinc-50 p-2 text-xs",children:[(0,r.jsxs)("div",{className:"font-medium",children:[e.role,e.modelId?(0,r.jsxs)("span",{className:"opacity-60",children:[" \xb7 ",e.modelId]}):null]}),(0,r.jsx)("pre",{className:"mt-1 whitespace-pre-wrap text-xs leading-snug",children:e.text})]},"".concat(e.role,"-").concat(t)))}),(0,r.jsxs)("footer",{className:"mt-3 flex items-center justify-between gap-2",children:[(0,r.jsxs)("span",{className:"text-xs opacity-70",children:["resolution:"," ","decided"===i?(0,r.jsxs)("span",{className:"font-medium text-emerald-700",children:["decided → ",c]}):(0,r.jsx)("span",{className:"text-amber-700",children:"open"})]}),l&&"open"===i&&(0,r.jsxs)("form",{className:"flex items-center gap-1",onSubmit:e=>{e.preventDefault(),t.trim()&&l(t.trim())},children:[(0,r.jsx)("input",{className:"w-32 rounded border border-zinc-300 px-2 py-0.5 text-xs",placeholder:"chosen…",value:t,onChange:e=>n(e.target.value),disabled:null!==o}),(0,r.jsx)("button",{type:"submit",className:"rounded bg-emerald-700 px-2 py-0.5 text-xs text-white disabled:opacity-50",disabled:!t.trim()||null!==o,children:o===t?"…":"apply"})]})]})]})}},69475:(e,t,n)=>{n.d(t,{$L:()=>i,Kz:()=>o,Vm:()=>l,kv:()=>s});let r="elanous.pwa.chat.autoRouting",a="elanous-chat-routing-changed",s={autoRouting:!1};function l(){return{autoRouting:function(e,t){try{let n=window.localStorage.getItem(e);if("1"===n)return!0;if("0"===n)return!1;return t}catch(e){return t}}(r,s.autoRouting)}}function o(e){try{window.localStorage.setItem(r,e?"1":"0")}catch(e){}window.dispatchEvent(new CustomEvent(a))}function i(e){let t=()=>e(l()),n=t=>{t.key===r&&e(l())};return window.addEventListener(a,t),window.addEventListener("storage",n),()=>{window.removeEventListener(a,t),window.removeEventListener("storage",n)}}},73658:(e,t,n)=>{function r(e,t){return"".concat("elanous.pwa.snapshot.").concat(e,".").concat(t&&t.length>0?t:"singleton")}function a(){try{return window.localStorage}catch(e){return null}}function s(e){let t=a();if(!t)return null;try{let n=t.getItem(e);if(null===n)return null;return JSON.parse(n)}catch(n){try{t.removeItem(e)}catch(e){}return null}}function l(e,t){let n,r=a();if(r){try{n=JSON.stringify(t)}catch(e){return}if(!(n.length>262144))try{r.setItem(e,n)}catch(e){}}}function o(e){let t=a();if(t)try{t.removeItem(e)}catch(e){}}n.d(t,{N2:()=>s,Os:()=>l,o1:()=>r,yd:()=>o})},75231:(e,t,n)=>{n.d(t,{$:()=>l});var r=n(49954);let a=/[.!?。!?]+\s*/g;function s(){return void 0!==window.speechSynthesis}function l(e){var t;let[n,l]=(0,r.useState)(!1);(0,r.useEffect)(()=>{l(s())},[]);let[,o]=(0,r.useState)({}),i=(0,r.useRef)(""),c=(0,r.useRef)(e.enabled);c.current=e.enabled;let d=null!=(t=e.maxBufferChars)?t:80,u=(0,r.useRef)(e.language);u.current=e.language,(0,r.useEffect)(()=>{var e,t;if(!n)return;let r=()=>o({});return window.speechSynthesis.getVoices(),null==(e=(t=window.speechSynthesis).addEventListener)||e.call(t,"voiceschanged",r),()=>{var e,t;null==(e=(t=window.speechSynthesis).removeEventListener)||e.call(t,"voiceschanged",r)}},[n]),(0,r.useEffect)(()=>{n&&(e.enabled||(window.speechSynthesis.cancel(),i.current=""))},[e.enabled,n]);let m=(0,r.useCallback)(e=>{if(!n||!c.current)return;let t=e.trim();if(!t)return;let r=new SpeechSynthesisUtterance(t),a=function(e){var t;if(!s()||!e)return null;let n=window.speechSynthesis.getVoices();if(0===n.length)return null;let r=e.toLowerCase(),a=n.find(e=>e.lang.toLowerCase()===r);if(a)return a;let l=r.split("-")[0];return null!=(t=n.find(e=>e.lang.toLowerCase().startsWith(l)))?t:null}(u.current);a&&(r.voice=a),u.current&&(r.lang=u.current),window.speechSynthesis.speak(r)},[n]),p=(0,r.useCallback)(e=>{if(!e||!c.current)return;i.current+=e;let{sentences:t,remainder:n}=function(e){let t,n=[],r=0;for(a.lastIndex=0;null!==(t=a.exec(e));){let a=t.index+t[0].length,s=e.slice(r,a).trim();s&&n.push(s),r=a}return{sentences:n,remainder:e.slice(r)}}(i.current);for(let e of(i.current=n,t))m(e);if(i.current.length>=d){let e=i.current;i.current="",m(e)}},[d,m]);return{pushText:p,flush:(0,r.useCallback)(()=>{let e=i.current.trim();i.current="",e&&m(e)},[m]),cancel:(0,r.useCallback)(()=>{n&&(window.speechSynthesis.cancel(),i.current="")},[n]),supported:n}}},94111:(e,t,n)=>{n.d(t,{F:()=>d});var r=n(77194);n(49954);var a=n(86629),s=n(4441),l=n(22629),o=n(73545),i=n(72573),c=n(35083);function d(e){let{className:t,children:n,...o}=e;return(0,r.jsxs)(a.V,{"data-slot":"scroll-area",className:(0,c.cn)("relative",t),...o,children:[(0,r.jsx)(s.B,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:n}),(0,r.jsx)(u,{}),(0,r.jsx)(l.I,{})]})}function u(e){let{className:t,orientation:n="vertical",...a}=e;return(0,r.jsx)(o.V,{"data-slot":"scroll-area-scrollbar","data-orientation":n,orientation:n,className:(0,c.cn)("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",t),...a,children:(0,r.jsx)(i.l,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}},98860:(e,t,n)=>{n.d(t,{T:()=>u});var r=n(77194),a=n(49954),s=n(2701),l=n(91710),o=n(8801),i=n(46479),c=n(35857),d=n(46503);function u(e){let{onAttached:t}=e,{config:n}=(0,o.Q)(),[u,m]=(0,a.useState)(!1),p=(0,a.useRef)(null),f=async e=>{var r;let a=null==(r=e.target.files)?void 0:r[0];if(e.target.value="",a){if(!n.baseUrl)return void i.oR.error("Daemon URL 미설정 — Settings 에서 입력");m(!0),(0,c.cY)("webterm.attach.pick",{filename:a.name,size:a.size,type:a.type});try{let e=await (0,d.v)({baseUrl:n.baseUrl,...n.token?{token:n.token}:{},file:a,filename:a.name});if(!e.ok){(0,c.cY)("webterm.attach.error",{status:e.status,detail:e.reason.slice(0,200)}),i.oR.error("업로드 실패 (".concat(e.status,")"));return}let{meta:r}=e;(0,c.cY)("webterm.attach.ok",{id:r.id,size:r.size}),i.oR.success("\uD83D\uDCCE ".concat(r.filename," (").concat((r.size/1024).toFixed(1)," kB)")),null==t||t(r)}catch(e){(0,c.cY)("webterm.attach.exception",{reason:String(e)}),i.oR.error("업로드 실패: ".concat(String(e instanceof Error?e.message:e)))}finally{m(!1)}}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>{var e;return null==(e=p.current)?void 0:e.click()},disabled:u,"aria-label":"attach photo",title:"attach photo (camera or file)",className:"rounded p-1.5 text-muted-foreground hover:bg-accent hover:text-foreground disabled:opacity-50",children:u?(0,r.jsx)(s.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,r.jsx)(l.A,{className:"h-3.5 w-3.5"})}),(0,r.jsx)("input",{ref:p,type:"file",accept:"image/*",capture:"environment",className:"hidden",onChange:f})]})}}}]);
|
package/apps/pwa/out/_next/static/chunks/{5578.ac963634373b28c6.js → 4084.15ecaf4240bd9e77.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5578],{5578:(t,e,s)=>{s.d(e,{diagram:()=>tc});var i=s(13087),r=s(57412),a=s(98726);s(323);var n=s(73340);s(10293),s(71776),s(50994),s(3364),s(52663),s(65084),s(24136);var o=s(85049),l=s(4625),c=s(1591),h=s(9145),d=s(14543),u=s(8136),p=s(16740),y=function(){var t=(0,d.K)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,2],s=[1,3],i=[1,4],r=[2,4],a=[1,9],n=[1,11],o=[1,16],l=[1,17],c=[1,18],h=[1,19],u=[1,33],p=[1,20],y=[1,21],g=[1,22],f=[1,23],m=[1,24],S=[1,26],k=[1,27],b=[1,28],T=[1,29],_=[1,30],E=[1,31],x=[1,32],D=[1,35],$=[1,36],C=[1,37],v=[1,38],w=[1,34],I=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],L=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],A=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],R={trace:(0,d.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,d.K)(function(t,e,s,i,r,a,n){var o=a.length-1;switch(r){case 3:return i.setRootDoc(a[o]),a[o];case 4:this.$=[];break;case 5:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 6:case 7:case 12:this.$=a[o];break;case 8:this.$="nl";break;case 13:let l=a[o-1];l.description=i.trimColon(a[o]),this.$=l;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:let c=i.trimColon(a[o]);this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:c};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var h=a[o],d=a[o-2].trim();if(a[o].match(":")){var u=a[o].split(":");h=u[0],d=[d,u[1]]}this.$={stmt:"state",id:h,type:"default",description:d};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 29:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:a[o-3],url:a[o-2],tooltip:a[o-1]};break;case 33:this.$={stmt:"click",id:a[o-3],url:a[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 36:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 37:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,22:h,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:D,52:$,53:C,54:v,57:w},t(I,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:o,17:l,19:c,22:h,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:D,52:$,53:C,54:v,57:w},t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,10]),t(I,[2,11]),t(I,[2,12],{14:[1,40],15:[1,41]}),t(I,[2,16]),{18:[1,42]},t(I,[2,18],{20:[1,43]}),{23:[1,44]},t(I,[2,22]),t(I,[2,23]),t(I,[2,24]),t(I,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(I,[2,28]),{34:[1,49]},{36:[1,50]},t(I,[2,31]),{13:51,24:u,57:w},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(L,[2,44],{58:[1,56]}),t(L,[2,45],{58:[1,57]}),t(I,[2,38]),t(I,[2,39]),t(I,[2,40]),t(I,[2,41]),t(I,[2,6]),t(I,[2,13]),{13:58,24:u,57:w},t(I,[2,17]),t(A,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(I,[2,29]),t(I,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(I,[2,14],{14:[1,71]}),{4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,21:[1,72],22:h,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:D,52:$,53:C,54:v,57:w},t(I,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(I,[2,34]),t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(L,[2,46]),t(L,[2,47]),t(I,[2,15]),t(I,[2,19]),t(A,r,{7:78}),t(I,[2,26]),t(I,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,21:[1,81],22:h,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:D,52:$,53:C,54:v,57:w},t(I,[2,32]),t(I,[2,33]),t(I,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:(0,d.K)(function(t,e){if(e.recoverable)this.trace(t);else{var s=Error(t);throw s.hash=e,s}},"parseError"),parse:(0,d.K)(function(t){var e=this,s=[0],i=[],r=[null],a=[],n=this.table,o="",l=0,c=0,h=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y[g]=this.yy[g]);p.setInput(t,y),y.lexer=p,y.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var m=p.options&&p.options.ranges;function S(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.parseError?this.parseError=y.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,d.K)(function(t){s.length=s.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),(0,d.K)(S,"lex");for(var k,b,T,_,E,x,D,$,C,v={};;){if(T=s[s.length-1],this.defaultActions[T]?_=this.defaultActions[T]:(null==k&&(k=S()),_=n[T]&&n[T][k]),void 0===_||!_.length||!_[0]){var w="";for(x in C=[],n[T])this.terminals_[x]&&x>2&&C.push("'"+this.terminals_[x]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw Error("Parse Error: multiple actions possible at state: "+T+", token: "+k);switch(_[0]){case 1:s.push(k),r.push(p.yytext),a.push(p.yylloc),s.push(_[1]),k=null,b?(k=b,b=null):(c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc,h>0&&h--);break;case 2:if(D=this.productions_[_[1]][1],v.$=r[r.length-D],v._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},m&&(v._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(v,[o,c,l,y,_[1],r,a].concat(u))))return E;D&&(s=s.slice(0,-1*D*2),r=r.slice(0,-1*D),a=a.slice(0,-1*D)),s.push(this.productions_[_[1]][0]),r.push(v.$),a.push(v._$),$=n[s[s.length-2]][s[s.length-1]],s.push($);break;case 3:return!0}}return!0},"parse")};function N(){this.yy={}}return R.lexer={EOF:1,parseError:(0,d.K)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,d.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,d.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,d.K)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,d.K)(function(){return this._more=!0,this},"more"),reject:(0,d.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,d.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,d.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,d.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,d.K)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,d.K)(function(t,e){var s,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack)for(var a in r)this[a]=r[a];return!1},"test_match"),next:(0,d.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,s,i,r=this._currentRules(),a=0;a<r.length;a++)if((s=this._input.match(this.rules[r[a]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,r[a])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,d.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,d.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,d.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,d.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,d.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,d.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,d.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,d.K)(function(t,e,s,i){function r(){let s=e.yytext.indexOf("%%");if(0===s)return!1;if(s>0){let i=e.yytext.slice(0,s),r=e.yytext.slice(s);r&&t.lexer.unput(r),e.yytext=i}return!0}switch((0,d.K)(r,"processId"),s){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 43:return 51;case 5:case 44:return 52;case 6:case 45:return 53;case 7:case 46:return 54;case 8:case 78:return 5;case 9:case 10:case 11:case 12:case 57:case 63:break;case 13:case 33:return this.pushState("SCALE"),17;case 14:case 34:return 18;case 15:case 21:case 35:case 50:case 54:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 36:this.pushState("STATE");break;case 37:case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:case 65:if(!r())return;return this.popState(),"ID";case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+e.yytext.trim()+'"');case 53:return 19;case 55:return this.popState(),this.pushState("struct"),20;case 56:return this.popState(),21;case 58:return this.begin("NOTE"),29;case 59:return this.popState(),this.pushState("NOTE_ID"),59;case 60:return this.popState(),this.pushState("NOTE_ID"),60;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:return"NOTE_TEXT";case 66:if(!r())return;return this.popState(),this.pushState("NOTE_TEXT"),24;case 67:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 68:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 69:case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!r())return;return 24;case 74:return e.yytext=e.yytext.trim(),14;case 75:return 15;case 76:return 28;case 77:return 58;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}},(0,d.K)(N,"Parser"),N.prototype=R,R.Parser=N,new N}();y.parser=y;var g="TB",f="state",m="root",S="relation",k="default",b="divider",T="fill:none",_="fill: #333",E="markdown",x="normal",D="rect",$="rectWithTitle",C="divider",v="roundedWithTitle",w="statediagram",I=`${w}-state`,L="transition",A=`${L} note-edge`,R=`${w}-note`,N=`${w}-cluster`,O=`${w}-cluster-alt`,K="parent",B="note",Y="----",F=`${Y}${B}`,P=`${Y}${K}`,G=new Map,W=0,j=0,M=new Map,z=(0,d.K)((t,e,s,i)=>{if(t===C&&s?.id!==void 0&&M.has(s.id)){let t=M.get(s.id);return M.set(e,t),t}let r=j++,a=i?void 0:r;return M.set(e,a),a},"colorSlotFor");function U(t="",e=0,s="",i=Y){let r=null!==s&&s.length>0?`${i}${s}`:"";return`state-${t}${r}-${e}`}(0,d.K)(U,"stateDomId");var H=(0,d.K)((t,e,s,i,r,a,n,o)=>{h.R.trace("items",e),e.forEach(e=>{switch(e.stmt){case f:case k:Q(t,e,s,i,r,a,n,o);break;case S:{Q(t,e.state1,s,i,r,a,n,o),Q(t,e.state2,s,i,r,a,n,o);let l="neo"===n,h={id:"edge"+W,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:l?"arrow_barb_neo":"arrow_barb",style:T,labelStyle:"",label:c.Y2.sanitizeText(e.description??"",(0,c.D7)()),arrowheadStyle:_,labelpos:"c",labelType:E,thickness:x,classes:L,look:n};r.push(h),W++}}})},"setupDoc"),X=(0,d.K)((t,e=g)=>{let s=e;if(t.doc)for(let e of t.doc)"dir"===e.stmt&&(s=e.value);return s},"getDir");function V(t,e,s){if(!e.id||"</join></fork>"===e.id||"</choice>"===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{let i=s.get(t);i&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...i.styles])}));let i=t.find(t=>t.id===e.id);i?Object.assign(i,e):t.push(e)}function J(t){return t?.classes?.join(" ")??""}function q(t){return t?.styles??[]}(0,d.K)(V,"insertOrUpdateNode"),(0,d.K)(J,"getClassesFromDbInfo"),(0,d.K)(q,"getStylesFromDbInfo");var Q=(0,d.K)((t,e,s,i,r,a,n,o)=>{let l=e.id,d=s.get(l),u=J(d),p=q(d),y=(0,c.D7)(),g=""!==u.trim()||p.length>0;if(h.R.info("dataFetcher parsedItem",e,d,p),"root"!==l){let s=D;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==k&&(s=e.type),G.get(l)||G.set(l,{id:l,shape:s,description:c.Y2.sanitizeText(l,y),cssClasses:`${u} ${I}`,cssStyles:p});let d=G.get(l);e.description&&(Array.isArray(d.description)?(d.shape=$,d.description.push(e.description)):d.description?.length&&d.description.length>0?(d.shape=$,d.description===l?d.description=[e.description]:d.description=[d.description,e.description]):(d.shape=D,d.description=e.description),d.description=c.Y2.sanitizeTextOrArray(d.description,y)),d.description?.length===1&&d.shape===$&&("group"===d.type?d.shape=v:d.shape=D),!d.type&&e.doc&&(h.R.info("Setting cluster for XCX",l,X(e)),d.type="group",d.isGroup=!0,d.dir=X(e),d.shape=e.type===b?C:v,d.colorIndex=z(d.shape,l,t,g),d.cssClasses=`${d.cssClasses} ${N} ${a?O:""}`);let f={labelStyle:"",shape:d.shape,label:d.description,cssClasses:d.cssClasses,cssCompiledStyles:[],cssStyles:d.cssStyles,id:l,dir:d.dir,domId:U(l,W),type:d.type,isGroup:"group"===d.type,colorIndex:d.colorIndex,padding:8,rx:10,ry:10,look:n,labelType:"markdown"};if(f.shape===C&&(f.label=""),t&&"root"!==t.id&&(h.R.trace("Setting node ",l," to be child of its parent ",t.id),f.parentId=t.id),f.centerLabel=!0,e.note){let t={labelStyle:"",shape:"note",label:e.note.text,labelType:"markdown",cssClasses:R,cssStyles:[],cssCompiledStyles:[],id:l+F+"-"+W,domId:U(l,W,B),type:"node",isGroup:!1,padding:y.flowchart?.padding,look:n,position:e.note.position},s=l+P,a={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:d.cssClasses,cssStyles:[],id:l+P,domId:U(l,W,K),type:"group",isGroup:!0,padding:16,look:n,position:e.note.position};W++,a.id=s,t.parentId=s,V(i,a,o),V(i,t,o),V(i,f,o);let c=l,h=t.id;"left of"===e.note.position&&(c=t.id,h=l),r.push({id:c+"-"+h,start:c,end:h,arrowhead:"none",arrowTypeEnd:"",style:T,labelStyle:"",classes:A,pattern:"dashed",arrowheadStyle:_,labelpos:"c",labelType:E,thickness:x,look:n})}else V(i,f,o)}e.doc&&(h.R.trace("Adding nodes children "),H(e,e.doc,s,i,r,!a,n,o))},"dataFetcher"),Z=(0,d.K)(()=>{G.clear(),W=0,j=0,M.clear()},"reset"),tt=(0,d.K)((t,e=g)=>{if(!t.doc)return e;let s=e;for(let e of t.doc)"dir"===e.stmt&&(s=e.value);return s},"getDir"),te=(0,d.K)(function(t,e){return e.db.getClasses()},"getClasses"),ts=(0,d.K)(async function(t,e,s,n){h.R.info("REF0:"),h.R.info("Drawing state diagram (v2)",e);let{securityLevel:o,state:d,layout:u}=(0,c.D7)();n.db.extract(n.db.getRootDocV2());let p=n.db.getData(),y=(0,i.A)(e,o);p.type=n.type,p.layoutAlgorithm=(0,a.q7)(u),p.nodeSpacing=d?.nodeSpacing||50,p.rankSpacing=d?.rankSpacing||50,"neo"===(0,c.D7)().look?p.markers=["barbNeo"]:p.markers=["barb"],p.diagramId=e,await (0,a.XX)(p,y);try{("function"==typeof n.db.getLinks?n.db.getLinks():new Map).forEach((t,e)=>{let s,i="string"==typeof e?e:"string"==typeof e?.id?e.id:"",r=p.nodes.find(t=>t.id===i);if(!i)return void h.R.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e));let a=y.node()?.querySelectorAll("g.node, g.rough-node");if(a?.forEach(t=>{let e=t.textContent?.trim();(t.id===r?.domId||e===i)&&(s=t)}),!s)return void h.R.warn("⚠️ Could not find node matching text:",i);let n=s.parentNode;if(!n)return void h.R.warn("⚠️ Node has no parent, cannot wrap:",i);let o=document.createElementNS("http://www.w3.org/2000/svg","a"),l=t.url.replace(/^"+|"+$/g,"");if(o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),o.setAttribute("target","_blank"),t.tooltip){let e=t.tooltip.replace(/^"+|"+$/g,"");o.setAttribute("title",e),s.setAttribute("title",e)}n.replaceChild(o,s),o.appendChild(s),h.R.info("\uD83D\uDD17 Wrapped node in <a> tag for:",i,t.url)})}catch(t){h.R.error("❌ Error injecting clickable links:",t)}l._K.insertTitle(y,"statediagramTitleText",d?.titleTopMargin??25,n.db.getDiagramTitle()),(0,r.P)(y,8,w,d?.useMaxWidth??!0)},"draw"),ti={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},tr=(0,d.K)(()=>new Map,"newClassesList"),ta=(0,d.K)(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),tn=(0,d.K)(t=>JSON.parse(JSON.stringify(t)),"clone"),to=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=tr(),this.documents={root:ta()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=c.iN,this.setAccTitle=c.SV,this.getAccDescription=c.m7,this.setAccDescription=c.EI,this.setDiagramTitle=c.ke,this.getDiagramTitle=c.ab,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{(0,d.K)(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){for(let e of(this.clear(!0),Array.isArray(t)?t:t.doc))switch(e.stmt){case f:this.addState(e.id.trim(),e.type,e.doc,e.description,e.note);break;case S:this.addRelation(e.state1,e.state2,e.description);break;case"classDef":this.addStyleClass(e.id.trim(),e.classes);break;case"style":this.handleStyleDef(e);break;case"applyClass":this.setCssClass(e.id.trim(),e.styleClass);break;case"click":this.addLink(e.id,e.url,e.tooltip)}let e=this.getStates(),s=(0,c.D7)();for(let t of(Z(),Q(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,s.look,this.classes),this.nodes))if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&t.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${t.id}]`);t.label=t.label[0]}}handleStyleDef(t){let e=t.id.trim().split(","),s=t.styleClass.split(",");for(let t of e){let e=this.getState(t);if(!e){let s=t.trim();this.addState(s),e=this.getState(s)}e&&(e.styles=s.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){h.R.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,s){if(e.stmt===S){this.docTranslator(t,e.state1,!0),this.docTranslator(t,e.state2,!1);return}if(e.stmt===f&&(e.id===ti.START_NODE?(e.id=t.id+(s?"_start":"_end"),e.start=s):e.id=e.id.trim()),e.stmt!==m&&e.stmt!==f||!e.doc)return;let i=[],r=[];for(let t of e.doc)if(t.type===b){let e=tn(t);e.doc=tn(r),i.push(e),r=[]}else r.push(t);if(i.length>0&&r.length>0){let t={stmt:f,id:(0,l.$C)(),type:"divider",doc:tn(r)};i.push(tn(t)),e.doc=i}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:m,stmt:m},{id:m,stmt:m,doc:this.rootDoc},!0),{id:m,doc:this.rootDoc}}addState(t,e=k,s,i,r,a,n,o){let l=t?.trim();if(this.currentDocument.states.has(l)){let t=this.currentDocument.states.get(l);if(!t)throw Error(`State not found: ${l}`);t.doc||(t.doc=s),t.type||(t.type=e)}else h.R.info("Adding state ",l,i),this.currentDocument.states.set(l,{stmt:f,id:l,descriptions:[],type:e,doc:s,note:r,classes:[],styles:[],textStyles:[]});if(i&&(h.R.info("Setting state description",l,i),(Array.isArray(i)?i:[i]).forEach(t=>this.addDescription(l,t.trim()))),r){let t=this.currentDocument.states.get(l);if(!t)throw Error(`State not found: ${l}`);t.note=r,t.note.text=c.Y2.sanitizeText(t.note.text,(0,c.D7)())}a&&(h.R.info("Setting state classes",l,a),(Array.isArray(a)?a:[a]).forEach(t=>this.setCssClass(l,t.trim()))),n&&(h.R.info("Setting state styles",l,n),(Array.isArray(n)?n:[n]).forEach(t=>this.setStyle(l,t.trim()))),o&&(h.R.info("Setting state styles",l,n),(Array.isArray(o)?o:[o]).forEach(t=>this.setTextStyle(l,t.trim())))}clear(t){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:ta()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=tr(),t||(this.links=new Map,(0,c.IU)())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){h.R.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,s){this.links.set(t,{url:e,tooltip:s}),h.R.warn("Adding link",t,e,s)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===ti.START_NODE?(this.startEndCount++,`${ti.START_TYPE}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=k){return t===ti.START_NODE?ti.START_TYPE:e}endIdIfNeeded(t=""){return t===ti.END_NODE?(this.startEndCount++,`${ti.END_TYPE}${this.startEndCount}`):t}endTypeIfNeeded(t="",e=k){return t===ti.END_NODE?ti.END_TYPE:e}addRelationObjs(t,e,s=""){let i=this.startIdIfNeeded(t.id.trim()),r=this.startTypeIfNeeded(t.id.trim(),t.type),a=this.startIdIfNeeded(e.id.trim()),n=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(i,r,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(a,n,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:c.Y2.sanitizeText(s,(0,c.D7)())})}addRelation(t,e,s){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,s);else if("string"==typeof t&&"string"==typeof e){let i=this.startIdIfNeeded(t.trim()),r=this.startTypeIfNeeded(t),a=this.endIdIfNeeded(e.trim()),n=this.endTypeIfNeeded(e);this.addState(i,r),this.addState(a,n),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:s?c.Y2.sanitizeText(s,(0,c.D7)()):void 0})}}addDescription(t,e){let s=this.currentDocument.states.get(t),i=e.startsWith(":")?e.replace(":","").trim():e;s?.descriptions?.push(c.Y2.sanitizeText(i,(0,c.D7)()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let s=this.classes.get(t);e&&s&&e.split(ti.STYLECLASS_SEP).forEach(t=>{let e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(ti.COLOR_KEYWORD).exec(t)){let t=e.replace(ti.FILL_KEYWORD,ti.BG_FILL).replace(ti.COLOR_KEYWORD,ti.FILL_KEYWORD);s.textStyles.push(t)}s.styles.push(e)})}getClasses(){return this.classes}setupToolTips(t){let e=(0,n.Ck)();(0,u.Ltv)(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",t=>{let s=(0,u.Ltv)(t.currentTarget),i=s.attr("title");if(null===i)return;let r=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.style("left",window.scrollX+r.left+(r.right-r.left)/2+"px").style("top",window.scrollY+r.bottom+"px"),e.html(p.A.sanitize(i)),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0),(0,u.Ltv)(t.currentTarget).classed("hover",!1)})}setCssClass(t,e){t.split(",").forEach(t=>{let s=this.getState(t);if(!s){let e=t.trim();this.addState(e),s=this.getState(e)}s?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){let e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=(0,c.D7)();for(let e of this.nodes)e.wrappingWidth??=t.state?.wrappingWidth,e.isGroup||(e.minWidth??=t.state?.minNodeWidth);return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:tt(this.getRootDocV2())}}getConfig(){return(0,c.D7)().state}},tl=(0,d.K)(t=>{let{theme:e,bkgColorArray:s,borderColorArray:i}=t;if(!(0,o.P1)(e,i))return"";let r=(0,o.rq)(t.look),a=(0,o.Ic)(s),n="";for(let t=0;t<(0,o.Hu)(i);t++){let e=i[t],o=a?`fill: ${s[t%s.length]};`:"",l=`[data-look="${r}"][data-color-id="color-${t}"]`;n+=`
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4084],{1538:(t,e,s)=>{s.d(e,{CP:()=>d,Ck:()=>y,HT:()=>p,PB:()=>u,aC:()=>h,lC:()=>l,m:()=>c,tk:()=>o});var i=s(57541),r=s(13345),a=s(52475),n=s(57626),o=(0,r.K)((t,e)=>{let s=t.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),e.name&&s.attr("name",e.name),e.rx&&s.attr("rx",e.rx),e.ry&&s.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)s.attr(t,e.attrs[t]);return e.class&&s.attr("class",e.class),s},"drawRect"),l=(0,r.K)((t,e)=>{o(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),c=(0,r.K)((t,e)=>{let s=e.text.replace(i.H1," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),e.class&&r.attr("class",e.class);let a=r.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.text(s),r},"drawText"),h=(0,r.K)((t,e,s,i)=>{let r=t.append("image");r.attr("x",e),r.attr("y",s);let n=(0,a.J)(i);r.attr("xlink:href",n)},"drawImage"),d=(0,r.K)((t,e,s,i)=>{let r=t.append("use");r.attr("x",e),r.attr("y",s);let n=(0,a.J)(i);r.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),u=(0,r.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,r.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),y=(0,r.K)(()=>{let t=(0,n.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,n.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},61085:(t,e,s)=>{s.d(e,{A:()=>a});var i=s(13345),r=s(57626),a=(0,i.K)((t,e)=>{let s;return"sandbox"===e&&(s=(0,r.Ltv)("#i"+t)),("sandbox"===e?(0,r.Ltv)(s.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},74084:(t,e,s)=>{s.d(e,{diagram:()=>tc});var i=s(61085),r=s(95138),a=s(77044);s(15081);var n=s(1538);s(42527),s(70314),s(93464),s(54722),s(93189),s(14126),s(22174);var o=s(31183),l=s(86256),c=s(57541),h=s(17487),d=s(13345),u=s(57626),p=s(44758),y=function(){var t=(0,d.K)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,2],s=[1,3],i=[1,4],r=[2,4],a=[1,9],n=[1,11],o=[1,16],l=[1,17],c=[1,18],h=[1,19],u=[1,33],p=[1,20],y=[1,21],g=[1,22],f=[1,23],m=[1,24],S=[1,26],k=[1,27],b=[1,28],T=[1,29],_=[1,30],E=[1,31],x=[1,32],D=[1,35],$=[1,36],C=[1,37],v=[1,38],w=[1,34],I=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],L=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],A=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],R={trace:(0,d.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,d.K)(function(t,e,s,i,r,a,n){var o=a.length-1;switch(r){case 3:return i.setRootDoc(a[o]),a[o];case 4:this.$=[];break;case 5:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 6:case 7:case 12:this.$=a[o];break;case 8:this.$="nl";break;case 13:let l=a[o-1];l.description=i.trimColon(a[o]),this.$=l;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:let c=i.trimColon(a[o]);this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:c};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var h=a[o],d=a[o-2].trim();if(a[o].match(":")){var u=a[o].split(":");h=u[0],d=[d,u[1]]}this.$={stmt:"state",id:h,type:"default",description:d};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 29:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:a[o-3],url:a[o-2],tooltip:a[o-1]};break;case 33:this.$={stmt:"click",id:a[o-3],url:a[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 36:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 37:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,22:h,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:D,52:$,53:C,54:v,57:w},t(I,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:o,17:l,19:c,22:h,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:D,52:$,53:C,54:v,57:w},t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,10]),t(I,[2,11]),t(I,[2,12],{14:[1,40],15:[1,41]}),t(I,[2,16]),{18:[1,42]},t(I,[2,18],{20:[1,43]}),{23:[1,44]},t(I,[2,22]),t(I,[2,23]),t(I,[2,24]),t(I,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(I,[2,28]),{34:[1,49]},{36:[1,50]},t(I,[2,31]),{13:51,24:u,57:w},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(L,[2,44],{58:[1,56]}),t(L,[2,45],{58:[1,57]}),t(I,[2,38]),t(I,[2,39]),t(I,[2,40]),t(I,[2,41]),t(I,[2,6]),t(I,[2,13]),{13:58,24:u,57:w},t(I,[2,17]),t(A,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(I,[2,29]),t(I,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(I,[2,14],{14:[1,71]}),{4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,21:[1,72],22:h,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:D,52:$,53:C,54:v,57:w},t(I,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(I,[2,34]),t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(L,[2,46]),t(L,[2,47]),t(I,[2,15]),t(I,[2,19]),t(A,r,{7:78}),t(I,[2,26]),t(I,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,21:[1,81],22:h,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:D,52:$,53:C,54:v,57:w},t(I,[2,32]),t(I,[2,33]),t(I,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:(0,d.K)(function(t,e){if(e.recoverable)this.trace(t);else{var s=Error(t);throw s.hash=e,s}},"parseError"),parse:(0,d.K)(function(t){var e=this,s=[0],i=[],r=[null],a=[],n=this.table,o="",l=0,c=0,h=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y[g]=this.yy[g]);p.setInput(t,y),y.lexer=p,y.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var m=p.options&&p.options.ranges;function S(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.parseError?this.parseError=y.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,d.K)(function(t){s.length=s.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),(0,d.K)(S,"lex");for(var k,b,T,_,E,x,D,$,C,v={};;){if(T=s[s.length-1],this.defaultActions[T]?_=this.defaultActions[T]:(null==k&&(k=S()),_=n[T]&&n[T][k]),void 0===_||!_.length||!_[0]){var w="";for(x in C=[],n[T])this.terminals_[x]&&x>2&&C.push("'"+this.terminals_[x]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw Error("Parse Error: multiple actions possible at state: "+T+", token: "+k);switch(_[0]){case 1:s.push(k),r.push(p.yytext),a.push(p.yylloc),s.push(_[1]),k=null,b?(k=b,b=null):(c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc,h>0&&h--);break;case 2:if(D=this.productions_[_[1]][1],v.$=r[r.length-D],v._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},m&&(v._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(v,[o,c,l,y,_[1],r,a].concat(u))))return E;D&&(s=s.slice(0,-1*D*2),r=r.slice(0,-1*D),a=a.slice(0,-1*D)),s.push(this.productions_[_[1]][0]),r.push(v.$),a.push(v._$),$=n[s[s.length-2]][s[s.length-1]],s.push($);break;case 3:return!0}}return!0},"parse")};function N(){this.yy={}}return R.lexer={EOF:1,parseError:(0,d.K)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,d.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,d.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,d.K)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,d.K)(function(){return this._more=!0,this},"more"),reject:(0,d.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,d.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,d.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,d.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,d.K)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,d.K)(function(t,e){var s,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack)for(var a in r)this[a]=r[a];return!1},"test_match"),next:(0,d.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,s,i,r=this._currentRules(),a=0;a<r.length;a++)if((s=this._input.match(this.rules[r[a]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,r[a])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,d.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,d.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,d.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,d.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,d.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,d.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,d.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,d.K)(function(t,e,s,i){function r(){let s=e.yytext.indexOf("%%");if(0===s)return!1;if(s>0){let i=e.yytext.slice(0,s),r=e.yytext.slice(s);r&&t.lexer.unput(r),e.yytext=i}return!0}switch((0,d.K)(r,"processId"),s){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 43:return 51;case 5:case 44:return 52;case 6:case 45:return 53;case 7:case 46:return 54;case 8:case 78:return 5;case 9:case 10:case 11:case 12:case 57:case 63:break;case 13:case 33:return this.pushState("SCALE"),17;case 14:case 34:return 18;case 15:case 21:case 35:case 50:case 54:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 36:this.pushState("STATE");break;case 37:case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:case 65:if(!r())return;return this.popState(),"ID";case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+e.yytext.trim()+'"');case 53:return 19;case 55:return this.popState(),this.pushState("struct"),20;case 56:return this.popState(),21;case 58:return this.begin("NOTE"),29;case 59:return this.popState(),this.pushState("NOTE_ID"),59;case 60:return this.popState(),this.pushState("NOTE_ID"),60;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:return"NOTE_TEXT";case 66:if(!r())return;return this.popState(),this.pushState("NOTE_TEXT"),24;case 67:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 68:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 69:case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!r())return;return 24;case 74:return e.yytext=e.yytext.trim(),14;case 75:return 15;case 76:return 28;case 77:return 58;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}},(0,d.K)(N,"Parser"),N.prototype=R,R.Parser=N,new N}();y.parser=y;var g="TB",f="state",m="root",S="relation",k="default",b="divider",T="fill:none",_="fill: #333",E="markdown",x="normal",D="rect",$="rectWithTitle",C="divider",v="roundedWithTitle",w="statediagram",I=`${w}-state`,L="transition",A=`${L} note-edge`,R=`${w}-note`,N=`${w}-cluster`,O=`${w}-cluster-alt`,K="parent",B="note",Y="----",F=`${Y}${B}`,P=`${Y}${K}`,G=new Map,W=0,j=0,M=new Map,z=(0,d.K)((t,e,s,i)=>{if(t===C&&s?.id!==void 0&&M.has(s.id)){let t=M.get(s.id);return M.set(e,t),t}let r=j++,a=i?void 0:r;return M.set(e,a),a},"colorSlotFor");function U(t="",e=0,s="",i=Y){let r=null!==s&&s.length>0?`${i}${s}`:"";return`state-${t}${r}-${e}`}(0,d.K)(U,"stateDomId");var H=(0,d.K)((t,e,s,i,r,a,n,o)=>{h.R.trace("items",e),e.forEach(e=>{switch(e.stmt){case f:case k:Q(t,e,s,i,r,a,n,o);break;case S:{Q(t,e.state1,s,i,r,a,n,o),Q(t,e.state2,s,i,r,a,n,o);let l="neo"===n,h={id:"edge"+W,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:l?"arrow_barb_neo":"arrow_barb",style:T,labelStyle:"",label:c.Y2.sanitizeText(e.description??"",(0,c.D7)()),arrowheadStyle:_,labelpos:"c",labelType:E,thickness:x,classes:L,look:n};r.push(h),W++}}})},"setupDoc"),X=(0,d.K)((t,e=g)=>{let s=e;if(t.doc)for(let e of t.doc)"dir"===e.stmt&&(s=e.value);return s},"getDir");function V(t,e,s){if(!e.id||"</join></fork>"===e.id||"</choice>"===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{let i=s.get(t);i&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...i.styles])}));let i=t.find(t=>t.id===e.id);i?Object.assign(i,e):t.push(e)}function J(t){return t?.classes?.join(" ")??""}function q(t){return t?.styles??[]}(0,d.K)(V,"insertOrUpdateNode"),(0,d.K)(J,"getClassesFromDbInfo"),(0,d.K)(q,"getStylesFromDbInfo");var Q=(0,d.K)((t,e,s,i,r,a,n,o)=>{let l=e.id,d=s.get(l),u=J(d),p=q(d),y=(0,c.D7)(),g=""!==u.trim()||p.length>0;if(h.R.info("dataFetcher parsedItem",e,d,p),"root"!==l){let s=D;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==k&&(s=e.type),G.get(l)||G.set(l,{id:l,shape:s,description:c.Y2.sanitizeText(l,y),cssClasses:`${u} ${I}`,cssStyles:p});let d=G.get(l);e.description&&(Array.isArray(d.description)?(d.shape=$,d.description.push(e.description)):d.description?.length&&d.description.length>0?(d.shape=$,d.description===l?d.description=[e.description]:d.description=[d.description,e.description]):(d.shape=D,d.description=e.description),d.description=c.Y2.sanitizeTextOrArray(d.description,y)),d.description?.length===1&&d.shape===$&&("group"===d.type?d.shape=v:d.shape=D),!d.type&&e.doc&&(h.R.info("Setting cluster for XCX",l,X(e)),d.type="group",d.isGroup=!0,d.dir=X(e),d.shape=e.type===b?C:v,d.colorIndex=z(d.shape,l,t,g),d.cssClasses=`${d.cssClasses} ${N} ${a?O:""}`);let f={labelStyle:"",shape:d.shape,label:d.description,cssClasses:d.cssClasses,cssCompiledStyles:[],cssStyles:d.cssStyles,id:l,dir:d.dir,domId:U(l,W),type:d.type,isGroup:"group"===d.type,colorIndex:d.colorIndex,padding:8,rx:10,ry:10,look:n,labelType:"markdown"};if(f.shape===C&&(f.label=""),t&&"root"!==t.id&&(h.R.trace("Setting node ",l," to be child of its parent ",t.id),f.parentId=t.id),f.centerLabel=!0,e.note){let t={labelStyle:"",shape:"note",label:e.note.text,labelType:"markdown",cssClasses:R,cssStyles:[],cssCompiledStyles:[],id:l+F+"-"+W,domId:U(l,W,B),type:"node",isGroup:!1,padding:y.flowchart?.padding,look:n,position:e.note.position},s=l+P,a={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:d.cssClasses,cssStyles:[],id:l+P,domId:U(l,W,K),type:"group",isGroup:!0,padding:16,look:n,position:e.note.position};W++,a.id=s,t.parentId=s,V(i,a,o),V(i,t,o),V(i,f,o);let c=l,h=t.id;"left of"===e.note.position&&(c=t.id,h=l),r.push({id:c+"-"+h,start:c,end:h,arrowhead:"none",arrowTypeEnd:"",style:T,labelStyle:"",classes:A,pattern:"dashed",arrowheadStyle:_,labelpos:"c",labelType:E,thickness:x,look:n})}else V(i,f,o)}e.doc&&(h.R.trace("Adding nodes children "),H(e,e.doc,s,i,r,!a,n,o))},"dataFetcher"),Z=(0,d.K)(()=>{G.clear(),W=0,j=0,M.clear()},"reset"),tt=(0,d.K)((t,e=g)=>{if(!t.doc)return e;let s=e;for(let e of t.doc)"dir"===e.stmt&&(s=e.value);return s},"getDir"),te=(0,d.K)(function(t,e){return e.db.getClasses()},"getClasses"),ts=(0,d.K)(async function(t,e,s,n){h.R.info("REF0:"),h.R.info("Drawing state diagram (v2)",e);let{securityLevel:o,state:d,layout:u}=(0,c.D7)();n.db.extract(n.db.getRootDocV2());let p=n.db.getData(),y=(0,i.A)(e,o);p.type=n.type,p.layoutAlgorithm=(0,a.q7)(u),p.nodeSpacing=d?.nodeSpacing||50,p.rankSpacing=d?.rankSpacing||50,"neo"===(0,c.D7)().look?p.markers=["barbNeo"]:p.markers=["barb"],p.diagramId=e,await (0,a.XX)(p,y);try{("function"==typeof n.db.getLinks?n.db.getLinks():new Map).forEach((t,e)=>{let s,i="string"==typeof e?e:"string"==typeof e?.id?e.id:"",r=p.nodes.find(t=>t.id===i);if(!i)return void h.R.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e));let a=y.node()?.querySelectorAll("g.node, g.rough-node");if(a?.forEach(t=>{let e=t.textContent?.trim();(t.id===r?.domId||e===i)&&(s=t)}),!s)return void h.R.warn("⚠️ Could not find node matching text:",i);let n=s.parentNode;if(!n)return void h.R.warn("⚠️ Node has no parent, cannot wrap:",i);let o=document.createElementNS("http://www.w3.org/2000/svg","a"),l=t.url.replace(/^"+|"+$/g,"");if(o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),o.setAttribute("target","_blank"),t.tooltip){let e=t.tooltip.replace(/^"+|"+$/g,"");o.setAttribute("title",e),s.setAttribute("title",e)}n.replaceChild(o,s),o.appendChild(s),h.R.info("\uD83D\uDD17 Wrapped node in <a> tag for:",i,t.url)})}catch(t){h.R.error("❌ Error injecting clickable links:",t)}l._K.insertTitle(y,"statediagramTitleText",d?.titleTopMargin??25,n.db.getDiagramTitle()),(0,r.P)(y,8,w,d?.useMaxWidth??!0)},"draw"),ti={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},tr=(0,d.K)(()=>new Map,"newClassesList"),ta=(0,d.K)(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),tn=(0,d.K)(t=>JSON.parse(JSON.stringify(t)),"clone"),to=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=tr(),this.documents={root:ta()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=c.iN,this.setAccTitle=c.SV,this.getAccDescription=c.m7,this.setAccDescription=c.EI,this.setDiagramTitle=c.ke,this.getDiagramTitle=c.ab,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{(0,d.K)(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){for(let e of(this.clear(!0),Array.isArray(t)?t:t.doc))switch(e.stmt){case f:this.addState(e.id.trim(),e.type,e.doc,e.description,e.note);break;case S:this.addRelation(e.state1,e.state2,e.description);break;case"classDef":this.addStyleClass(e.id.trim(),e.classes);break;case"style":this.handleStyleDef(e);break;case"applyClass":this.setCssClass(e.id.trim(),e.styleClass);break;case"click":this.addLink(e.id,e.url,e.tooltip)}let e=this.getStates(),s=(0,c.D7)();for(let t of(Z(),Q(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,s.look,this.classes),this.nodes))if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&t.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${t.id}]`);t.label=t.label[0]}}handleStyleDef(t){let e=t.id.trim().split(","),s=t.styleClass.split(",");for(let t of e){let e=this.getState(t);if(!e){let s=t.trim();this.addState(s),e=this.getState(s)}e&&(e.styles=s.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){h.R.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,s){if(e.stmt===S){this.docTranslator(t,e.state1,!0),this.docTranslator(t,e.state2,!1);return}if(e.stmt===f&&(e.id===ti.START_NODE?(e.id=t.id+(s?"_start":"_end"),e.start=s):e.id=e.id.trim()),e.stmt!==m&&e.stmt!==f||!e.doc)return;let i=[],r=[];for(let t of e.doc)if(t.type===b){let e=tn(t);e.doc=tn(r),i.push(e),r=[]}else r.push(t);if(i.length>0&&r.length>0){let t={stmt:f,id:(0,l.$C)(),type:"divider",doc:tn(r)};i.push(tn(t)),e.doc=i}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:m,stmt:m},{id:m,stmt:m,doc:this.rootDoc},!0),{id:m,doc:this.rootDoc}}addState(t,e=k,s,i,r,a,n,o){let l=t?.trim();if(this.currentDocument.states.has(l)){let t=this.currentDocument.states.get(l);if(!t)throw Error(`State not found: ${l}`);t.doc||(t.doc=s),t.type||(t.type=e)}else h.R.info("Adding state ",l,i),this.currentDocument.states.set(l,{stmt:f,id:l,descriptions:[],type:e,doc:s,note:r,classes:[],styles:[],textStyles:[]});if(i&&(h.R.info("Setting state description",l,i),(Array.isArray(i)?i:[i]).forEach(t=>this.addDescription(l,t.trim()))),r){let t=this.currentDocument.states.get(l);if(!t)throw Error(`State not found: ${l}`);t.note=r,t.note.text=c.Y2.sanitizeText(t.note.text,(0,c.D7)())}a&&(h.R.info("Setting state classes",l,a),(Array.isArray(a)?a:[a]).forEach(t=>this.setCssClass(l,t.trim()))),n&&(h.R.info("Setting state styles",l,n),(Array.isArray(n)?n:[n]).forEach(t=>this.setStyle(l,t.trim()))),o&&(h.R.info("Setting state styles",l,n),(Array.isArray(o)?o:[o]).forEach(t=>this.setTextStyle(l,t.trim())))}clear(t){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:ta()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=tr(),t||(this.links=new Map,(0,c.IU)())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){h.R.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,s){this.links.set(t,{url:e,tooltip:s}),h.R.warn("Adding link",t,e,s)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===ti.START_NODE?(this.startEndCount++,`${ti.START_TYPE}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=k){return t===ti.START_NODE?ti.START_TYPE:e}endIdIfNeeded(t=""){return t===ti.END_NODE?(this.startEndCount++,`${ti.END_TYPE}${this.startEndCount}`):t}endTypeIfNeeded(t="",e=k){return t===ti.END_NODE?ti.END_TYPE:e}addRelationObjs(t,e,s=""){let i=this.startIdIfNeeded(t.id.trim()),r=this.startTypeIfNeeded(t.id.trim(),t.type),a=this.startIdIfNeeded(e.id.trim()),n=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(i,r,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(a,n,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:c.Y2.sanitizeText(s,(0,c.D7)())})}addRelation(t,e,s){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,s);else if("string"==typeof t&&"string"==typeof e){let i=this.startIdIfNeeded(t.trim()),r=this.startTypeIfNeeded(t),a=this.endIdIfNeeded(e.trim()),n=this.endTypeIfNeeded(e);this.addState(i,r),this.addState(a,n),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:s?c.Y2.sanitizeText(s,(0,c.D7)()):void 0})}}addDescription(t,e){let s=this.currentDocument.states.get(t),i=e.startsWith(":")?e.replace(":","").trim():e;s?.descriptions?.push(c.Y2.sanitizeText(i,(0,c.D7)()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let s=this.classes.get(t);e&&s&&e.split(ti.STYLECLASS_SEP).forEach(t=>{let e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(ti.COLOR_KEYWORD).exec(t)){let t=e.replace(ti.FILL_KEYWORD,ti.BG_FILL).replace(ti.COLOR_KEYWORD,ti.FILL_KEYWORD);s.textStyles.push(t)}s.styles.push(e)})}getClasses(){return this.classes}setupToolTips(t){let e=(0,n.Ck)();(0,u.Ltv)(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",t=>{let s=(0,u.Ltv)(t.currentTarget),i=s.attr("title");if(null===i)return;let r=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.style("left",window.scrollX+r.left+(r.right-r.left)/2+"px").style("top",window.scrollY+r.bottom+"px"),e.html(p.A.sanitize(i)),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0),(0,u.Ltv)(t.currentTarget).classed("hover",!1)})}setCssClass(t,e){t.split(",").forEach(t=>{let s=this.getState(t);if(!s){let e=t.trim();this.addState(e),s=this.getState(e)}s?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){let e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=(0,c.D7)();for(let e of this.nodes)e.wrappingWidth??=t.state?.wrappingWidth,e.isGroup||(e.minWidth??=t.state?.minNodeWidth);return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:tt(this.getRootDocV2())}}getConfig(){return(0,c.D7)().state}},tl=(0,d.K)(t=>{let{theme:e,bkgColorArray:s,borderColorArray:i}=t;if(!(0,o.P1)(e,i))return"";let r=(0,o.rq)(t.look),a=(0,o.Ic)(s),n="";for(let t=0;t<(0,o.Hu)(i);t++){let e=i[t],o=a?`fill: ${s[t%s.length]};`:"",l=`[data-look="${r}"][data-color-id="color-${t}"]`;n+=`
|
|
2
2
|
|
|
3
3
|
/* The title strip: \`rect.outer\` spans the whole composite and \`rect.inner\` covers
|
|
4
4
|
the body, so what stays visible of \`outer\` is the band behind the label. */
|
|
@@ -283,4 +283,4 @@ g.stateGroup line {
|
|
|
283
283
|
ry: ${t.radius}px;
|
|
284
284
|
filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"}
|
|
285
285
|
}
|
|
286
|
-
`,"getStyles"),init:(0,d.K)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}},
|
|
286
|
+
`,"getStyles"),init:(0,d.K)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}},95138:(t,e,s)=>{s.d(e,{P:()=>n});var i=s(57541),r=s(17487),a=s(13345),n=(0,a.K)((t,e,s,a)=>{t.attr("class",s);let{width:n,height:c,x:h,y:d}=o(t,e);(0,i.a$)(t,c,n,a);let u=l(h,d,n,c,e);t.attr("viewBox",u),r.R.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),o=(0,a.K)((t,e)=>{let s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),l=(0,a.K)((t,e,s,i,r)=>`${t-r} ${e-r} ${s} ${i}`,"createViewBox")}}]);
|