elanous 0.2.25 → 0.2.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/apps/pwa/out/404/index.html +1 -1
  2. package/apps/pwa/out/404.html +1 -1
  3. package/apps/pwa/out/_next/static/chunks/{1454-37fd16f479f5554a.js → 1454-a9c338f5bb556f42.js} +1 -1
  4. package/apps/pwa/out/_next/static/chunks/app/approvals/{page-9360b1285b2a346e.js → page-a1ce306364f08da9.js} +1 -1
  5. package/apps/pwa/out/_next/static/chunks/app/autopilot/page-07110da72c45e68f.js +1 -0
  6. package/apps/pwa/out/_next/static/chunks/app/board/page-d2d76d4a7eae91bd.js +1 -0
  7. package/apps/pwa/out/_next/static/chunks/app/botlab/page-30007380f2e2a3c1.js +1 -0
  8. package/apps/pwa/out/_next/static/chunks/app/bots/page-e5a9302c105725a3.js +1 -0
  9. package/apps/pwa/out/_next/static/chunks/app/ceo/page-b93c04b5311c97ec.js +1 -0
  10. package/apps/pwa/out/_next/static/chunks/app/chat/page-718a49e86bf25f9c.js +1 -0
  11. package/apps/pwa/out/_next/static/chunks/app/consult/{page-44eaad486bc98a45.js → page-20662900d6b4b455.js} +1 -1
  12. package/apps/pwa/out/_next/static/chunks/app/control/{page-97fa6cf3d34c7eb9.js → page-f707a509515ac50c.js} +1 -1
  13. package/apps/pwa/out/_next/static/chunks/app/decisions/{page-305cd294e754906e.js → page-6a16a48d1aa6e91f.js} +1 -1
  14. package/apps/pwa/out/_next/static/chunks/app/design-check/page-fcb06e305f515527.js +1 -0
  15. package/apps/pwa/out/_next/static/chunks/app/editor/page-6acf5ec4e6c6d1af.js +1 -0
  16. package/apps/pwa/out/_next/static/chunks/app/exec/{page-45889e7070d11126.js → page-39f82acf619cca23.js} +1 -1
  17. package/apps/pwa/out/_next/static/chunks/app/field/{page-16a2e893f83ae4d0.js → page-7c2c8f81b185f9c0.js} +1 -1
  18. package/apps/pwa/out/_next/static/chunks/app/inside/page-ae7aff07e32676bb.js +1 -0
  19. package/apps/pwa/out/_next/static/chunks/app/intake/{page-56888bc744e08dac.js → page-482c60c1bc540d0a.js} +1 -1
  20. package/apps/pwa/out/_next/static/chunks/app/layout-7cb996c1aa08b6f5.js +1 -0
  21. package/apps/pwa/out/_next/static/chunks/app/live/{page-952c6ceec6d9de38.js → page-623e08fe4477d606.js} +1 -1
  22. package/apps/pwa/out/_next/static/chunks/app/live-run/{page-6d0202af568f4c63.js → page-db460cd8aecb8490.js} +1 -1
  23. package/apps/pwa/out/_next/static/chunks/app/loops/page-ff27902d0b11ef4f.js +1 -0
  24. package/apps/pwa/out/_next/static/chunks/app/market/{page-74366ae2693a7d95.js → page-8397a5c6ca569bf4.js} +1 -1
  25. package/apps/pwa/out/_next/static/chunks/app/missions/[id]/{page-4fb6fc34e20c07b7.js → page-1917ea87ea71ab6b.js} +1 -1
  26. package/apps/pwa/out/_next/static/chunks/app/morning/{page-e9502921f4f01b1f.js → page-25a302273b054fd7.js} +1 -1
  27. package/apps/pwa/out/_next/static/chunks/app/{not-found-b6169ea2f09cf287.js → not-found-670510eda8b9443f.js} +1 -1
  28. package/apps/pwa/out/_next/static/chunks/app/observatory/page-d73c3f1e00d93986.js +1 -0
  29. package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-65caacf54389081e.js +1 -0
  30. package/apps/pwa/out/_next/static/chunks/app/ops/release/page-4bb7556e2e97a750.js +1 -0
  31. package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-77e04b4f8762c666.js +1 -0
  32. package/apps/pwa/out/_next/static/chunks/app/outputs/{page-b9cc8a10bc6078b4.js → page-15c0a4095baddfba.js} +1 -1
  33. package/apps/pwa/out/_next/static/chunks/app/{page-3d3fc73dd187ed52.js → page-4eb96fc7241c2456.js} +1 -1
  34. package/apps/pwa/out/_next/static/chunks/app/reflection/page-63e272a4cd3b6634.js +1 -0
  35. package/apps/pwa/out/_next/static/chunks/app/scheduler/{page-9c04dac0831c2bbb.js → page-0d64ff212dc55d03.js} +1 -1
  36. package/apps/pwa/out/_next/static/chunks/app/sessions/page-7f096248993fc2d4.js +1 -0
  37. package/apps/pwa/out/_next/static/chunks/app/settings/devices/{page-04de9ca6d52a3893.js → page-e47fc72049149a38.js} +1 -1
  38. package/apps/pwa/out/_next/static/chunks/app/settings/{page-62527677bbc2fdc4.js → page-f7d808e31e005895.js} +1 -1
  39. package/apps/pwa/out/_next/static/chunks/app/setup/done/{page-9a2e09c4a311764c.js → page-5c2b24b5496dad73.js} +1 -1
  40. package/apps/pwa/out/_next/static/chunks/app/setup/{page-bfeb35d69e8b24bb.js → page-76cdb531668b5191.js} +1 -1
  41. package/apps/pwa/out/_next/static/chunks/app/share/page-e2b63345bba1a11f.js +1 -0
  42. package/apps/pwa/out/_next/static/chunks/app/showroom/{page-b008aff96be56654.js → page-d376e0c83edc041a.js} +1 -1
  43. package/apps/pwa/out/_next/static/chunks/app/tasks/page-d6db55fe2c04d128.js +1 -0
  44. package/apps/pwa/out/_next/static/chunks/app/term/page-87b88f551f421d8b.js +1 -0
  45. package/apps/pwa/out/_next/static/chunks/app/today/{page-6445ac4cbb8dd869.js → page-dab163b338e3b966.js} +1 -1
  46. package/apps/pwa/out/_next/static/chunks/app/trace/{page-852170303c6cd755.js → page-08019efef111ed2e.js} +1 -1
  47. package/apps/pwa/out/_next/static/chunks/app/vault/page-0260ffc7eda50db1.js +1 -0
  48. package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/{page-97c7361cc2a19319.js → page-980ce6fe36ad95eb.js} +1 -1
  49. package/apps/pwa/out/_next/static/chunks/app/workflows/{page-20162174b77f96cf.js → page-99c4e6c7345a9156.js} +1 -1
  50. package/apps/pwa/out/_next/static/chunks/app/workspace/{page-8c6901833f897496.js → page-0ab42e0f05823013.js} +1 -1
  51. package/apps/pwa/out/_next/static/chunks/app/worktrees/page-ad9220422d20ba33.js +1 -0
  52. package/apps/pwa/out/approvals/index.html +1 -1
  53. package/apps/pwa/out/approvals/index.txt +13 -13
  54. package/apps/pwa/out/autopilot/index.html +1 -1
  55. package/apps/pwa/out/autopilot/index.txt +13 -13
  56. package/apps/pwa/out/board/index.html +1 -1
  57. package/apps/pwa/out/board/index.txt +13 -13
  58. package/apps/pwa/out/botlab/index.html +1 -1
  59. package/apps/pwa/out/botlab/index.txt +13 -13
  60. package/apps/pwa/out/bots/index.html +1 -1
  61. package/apps/pwa/out/bots/index.txt +13 -13
  62. package/apps/pwa/out/ceo/index.html +1 -1
  63. package/apps/pwa/out/ceo/index.txt +13 -13
  64. package/apps/pwa/out/chat/index.html +1 -1
  65. package/apps/pwa/out/chat/index.txt +13 -13
  66. package/apps/pwa/out/consult/index.html +1 -1
  67. package/apps/pwa/out/consult/index.txt +13 -13
  68. package/apps/pwa/out/control/index.html +1 -1
  69. package/apps/pwa/out/control/index.txt +13 -13
  70. package/apps/pwa/out/decisions/index.html +1 -1
  71. package/apps/pwa/out/decisions/index.txt +13 -13
  72. package/apps/pwa/out/design-check/index.html +1 -1
  73. package/apps/pwa/out/design-check/index.txt +13 -13
  74. package/apps/pwa/out/editor/index.html +1 -1
  75. package/apps/pwa/out/editor/index.txt +13 -13
  76. package/apps/pwa/out/exec/index.html +1 -1
  77. package/apps/pwa/out/exec/index.txt +13 -13
  78. package/apps/pwa/out/field/index.html +1 -1
  79. package/apps/pwa/out/field/index.txt +13 -13
  80. package/apps/pwa/out/healthz +1 -1
  81. package/apps/pwa/out/index.html +1 -1
  82. package/apps/pwa/out/index.txt +13 -13
  83. package/apps/pwa/out/inside/index.html +1 -1
  84. package/apps/pwa/out/inside/index.txt +13 -13
  85. package/apps/pwa/out/intake/index.html +1 -1
  86. package/apps/pwa/out/intake/index.txt +13 -13
  87. package/apps/pwa/out/live/index.html +1 -1
  88. package/apps/pwa/out/live/index.txt +13 -13
  89. package/apps/pwa/out/live-run/index.html +1 -1
  90. package/apps/pwa/out/live-run/index.txt +13 -13
  91. package/apps/pwa/out/loops/index.html +1 -1
  92. package/apps/pwa/out/loops/index.txt +13 -13
  93. package/apps/pwa/out/market/index.html +1 -1
  94. package/apps/pwa/out/market/index.txt +13 -13
  95. package/apps/pwa/out/missions/placeholder/index.html +1 -1
  96. package/apps/pwa/out/missions/placeholder/index.txt +13 -13
  97. package/apps/pwa/out/morning/index.html +1 -1
  98. package/apps/pwa/out/morning/index.txt +13 -13
  99. package/apps/pwa/out/observatory/index.html +1 -1
  100. package/apps/pwa/out/observatory/index.txt +13 -13
  101. package/apps/pwa/out/ops/checklist/index.html +1 -1
  102. package/apps/pwa/out/ops/checklist/index.txt +13 -13
  103. package/apps/pwa/out/ops/release/index.html +1 -1
  104. package/apps/pwa/out/ops/release/index.txt +13 -13
  105. package/apps/pwa/out/ops/seats/index.html +1 -1
  106. package/apps/pwa/out/ops/seats/index.txt +13 -13
  107. package/apps/pwa/out/outputs/index.html +1 -1
  108. package/apps/pwa/out/outputs/index.txt +13 -13
  109. package/apps/pwa/out/reflection/index.html +1 -1
  110. package/apps/pwa/out/reflection/index.txt +14 -14
  111. package/apps/pwa/out/scheduler/index.html +1 -1
  112. package/apps/pwa/out/scheduler/index.txt +13 -13
  113. package/apps/pwa/out/sessions/index.html +1 -1
  114. package/apps/pwa/out/sessions/index.txt +13 -13
  115. package/apps/pwa/out/settings/devices/index.html +1 -1
  116. package/apps/pwa/out/settings/devices/index.txt +13 -13
  117. package/apps/pwa/out/settings/index.html +1 -1
  118. package/apps/pwa/out/settings/index.txt +13 -13
  119. package/apps/pwa/out/setup/done/index.html +1 -1
  120. package/apps/pwa/out/setup/done/index.txt +13 -13
  121. package/apps/pwa/out/setup/index.html +1 -1
  122. package/apps/pwa/out/setup/index.txt +13 -13
  123. package/apps/pwa/out/share/index.html +1 -1
  124. package/apps/pwa/out/share/index.txt +13 -13
  125. package/apps/pwa/out/showroom/index.html +1 -1
  126. package/apps/pwa/out/showroom/index.txt +13 -13
  127. package/apps/pwa/out/tasks/index.html +1 -1
  128. package/apps/pwa/out/tasks/index.txt +13 -13
  129. package/apps/pwa/out/term/index.html +1 -1
  130. package/apps/pwa/out/term/index.txt +13 -13
  131. package/apps/pwa/out/today/index.html +1 -1
  132. package/apps/pwa/out/today/index.txt +13 -13
  133. package/apps/pwa/out/trace/index.html +1 -1
  134. package/apps/pwa/out/trace/index.txt +13 -13
  135. package/apps/pwa/out/vault/index.html +1 -1
  136. package/apps/pwa/out/vault/index.txt +13 -13
  137. package/apps/pwa/out/workflows/chat-ui/index.html +1 -1
  138. package/apps/pwa/out/workflows/chat-ui/index.txt +13 -13
  139. package/apps/pwa/out/workflows/index.html +1 -1
  140. package/apps/pwa/out/workflows/index.txt +13 -13
  141. package/apps/pwa/out/workspace/index.html +1 -1
  142. package/apps/pwa/out/workspace/index.txt +13 -13
  143. package/apps/pwa/out/worktrees/index.html +1 -1
  144. package/apps/pwa/out/worktrees/index.txt +13 -13
  145. package/package.json +1 -1
  146. package/scripts/ci-typecheck-changed.ts +81 -2
  147. package/scripts/coord-msg-bridge.ts +209 -0
  148. package/scripts/coord-post.sh +40 -7
  149. package/scripts/coord-requests-bridge.ts +10 -5
  150. package/scripts/expose-rubric-suggest.ts +1 -1
  151. package/scripts/measure-tsc-affected-roots.ts +10 -1
  152. package/scripts/release-loop/export-check-node.ts +8 -5
  153. package/scripts/release-loop/node-verdict.ts +7 -2
  154. package/src/agent/task-notification.ts +30 -1
  155. package/src/agent-substrate/review-observation.ts +9 -2
  156. package/src/agent-substrate/self-review-cli.ts +28 -6
  157. package/src/boot/daemon-tools/self-implement.ts +72 -4
  158. package/src/budget/llm-cost.ts +5 -1
  159. package/src/cli/control-cli.ts +29 -0
  160. package/src/cli/doctor-cli.ts +90 -8
  161. package/src/cli/msg-cli.ts +15 -5
  162. package/src/cli/pr-cli.ts +53 -0
  163. package/src/cli/pr-land-overlap-evidence.ts +18 -10
  164. package/src/cli/release-cli.ts +32 -5
  165. package/src/cli/seat-cli.ts +121 -0
  166. package/src/cli/self-utterances-cli.ts +140 -0
  167. package/src/cli/tasks-cli.ts +139 -9
  168. package/src/context-card/cell.ts +40 -0
  169. package/src/dashboard/boot-timing.ts +35 -0
  170. package/src/dashboard/index.ts +86 -24
  171. package/src/dashboard/input/chat-main-plain-turn-runtime.ts +26 -0
  172. package/src/dashboard/slash-runtime/dashboard-handlers.ts +6 -0
  173. package/src/debug/log.ts +1 -1
  174. package/src/domains/release-tool.ts +29 -12
  175. package/src/domains/surface-events.ts +16 -0
  176. package/src/elanous-config-dir.ts +2 -2
  177. package/src/fleet/host-doctor.ts +73 -2
  178. package/src/graph-runner/runner.ts +3 -1
  179. package/src/harness/harness-cli-command.ts +46 -4
  180. package/src/harness/harness-stop.ts +11 -7
  181. package/src/index.ts +35 -4
  182. package/src/instance/current.ts +2 -6
  183. package/src/instance/resolve.ts +5 -6
  184. package/src/llm/openai-sampling-fields.ts +89 -0
  185. package/src/llm/runtime-model-family.ts +61 -0
  186. package/src/llm/zai-coding-plan.ts +27 -1
  187. package/src/llm.ts +13 -89
  188. package/src/machines/machine-ledger.ts +31 -3
  189. package/src/maturity/cli-maturity.ts +13 -3
  190. package/src/msg/msg-store.ts +69 -7
  191. package/src/ops/overview-collect.ts +3 -2
  192. package/src/ops/overview-owner.ts +29 -0
  193. package/src/plugin-hooks/shell-hook.ts +17 -2
  194. package/src/plugin-missions/evaluator-runner.ts +18 -2
  195. package/src/plugins/install/plugin-install.ts +11 -1
  196. package/src/prompt-enhance/enhance.ts +11 -0
  197. package/src/release-loop/checklist.ts +41 -4
  198. package/src/release-loop/feature-store.ts +10 -9
  199. package/src/seat-loop/seat-loop.ts +5 -1
  200. package/src/self-dev/draft-sweep.ts +23 -14
  201. package/src/self-dev/orchestrate.ts +6 -2
  202. package/src/self-dev/run-supervisor.ts +35 -1
  203. package/src/self-implement/goal-author.ts +3 -27
  204. package/src/self-implement/goal-command-execution.ts +26 -0
  205. package/src/self-implement/orchestrator.ts +2 -1
  206. package/src/self-implement/pwa-import-graph.ts +194 -7
  207. package/src/self-implement/self-implement-runtime.ts +126 -21
  208. package/src/session/index.ts +14 -4
  209. package/src/session-runtime/index.ts +55 -11
  210. package/src/task-agent/cover.ts +28 -9
  211. package/src/task-agent/live-moves.ts +14 -6
  212. package/src/task-agent/rejudge-on-head.ts +220 -23
  213. package/src/task-agent/review-result-capture.ts +64 -1
  214. package/src/task-agent/shadow.ts +137 -22
  215. package/src/task-agent/task-hand.ts +18 -2
  216. package/src/task-orchestrator/surfaces/self-implement-pod.ts +1 -0
  217. package/src/tool-runtime/tool-search-runtime.ts +25 -0
  218. package/src/tui.ts +20 -1
  219. package/src/user-config.ts +3 -59
  220. package/src/version/packed-revision.json +1 -1
  221. package/apps/pwa/out/_next/static/chunks/app/autopilot/page-f08f6529d09ffae1.js +0 -1
  222. package/apps/pwa/out/_next/static/chunks/app/board/page-f000d54d258f9ef6.js +0 -1
  223. package/apps/pwa/out/_next/static/chunks/app/botlab/page-b12149c51f7d04b1.js +0 -1
  224. package/apps/pwa/out/_next/static/chunks/app/bots/page-22f674e7e4c2c9d5.js +0 -1
  225. package/apps/pwa/out/_next/static/chunks/app/ceo/page-8888733e40cea6d1.js +0 -1
  226. package/apps/pwa/out/_next/static/chunks/app/chat/page-9717ec6964b92276.js +0 -1
  227. package/apps/pwa/out/_next/static/chunks/app/design-check/page-dea4b795741126fd.js +0 -1
  228. package/apps/pwa/out/_next/static/chunks/app/editor/page-35e05d7450461a67.js +0 -1
  229. package/apps/pwa/out/_next/static/chunks/app/inside/page-b2638013c0bf7dfd.js +0 -1
  230. package/apps/pwa/out/_next/static/chunks/app/layout-c44f93a41167536f.js +0 -1
  231. package/apps/pwa/out/_next/static/chunks/app/loops/page-1b810474507f3702.js +0 -1
  232. package/apps/pwa/out/_next/static/chunks/app/observatory/page-6a14333d1b1b3967.js +0 -1
  233. package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-8c91a9a66c9ec90a.js +0 -1
  234. package/apps/pwa/out/_next/static/chunks/app/ops/release/page-4e634c5b98fd4e93.js +0 -1
  235. package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-ed3070d637850548.js +0 -1
  236. package/apps/pwa/out/_next/static/chunks/app/reflection/page-128458c8d86fbb5f.js +0 -1
  237. package/apps/pwa/out/_next/static/chunks/app/sessions/page-cf0c2b0183991d09.js +0 -1
  238. package/apps/pwa/out/_next/static/chunks/app/share/page-89cb33bced824e4a.js +0 -1
  239. package/apps/pwa/out/_next/static/chunks/app/tasks/page-814394dcbae789b1.js +0 -1
  240. package/apps/pwa/out/_next/static/chunks/app/term/page-6a87325c87f09dd2.js +0 -1
  241. package/apps/pwa/out/_next/static/chunks/app/vault/page-087ceeb975ef272b.js +0 -1
  242. package/apps/pwa/out/_next/static/chunks/app/worktrees/page-05a4b2c9b91034aa.js +0 -1
  243. /package/apps/pwa/out/_next/static/{dRS6lEhSRRBr1abbzp7fJ → Ev2jivDMTSoEc-5rIXdcy}/_buildManifest.js +0 -0
  244. /package/apps/pwa/out/_next/static/{dRS6lEhSRRBr1abbzp7fJ → Ev2jivDMTSoEc-5rIXdcy}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8677],{8801:(e,t,r)=>{"use strict";r.d(t,{C:()=>d,DaemonProvider:()=>c,Q:()=>u});var n=r(77194),a=r(49954),l=r(9248),s=r(19631),o=r(49638),i=r(35857);let d=(0,a.createContext)(null);function c(e){let{children:t}=e,r={baseUrl:"",token:"",provider:""},[c,u]=(0,a.useState)(r),[m,x]=(0,a.useState)(""),[h]=(0,a.useState)(()=>new o.ki(r));(0,a.useEffect)(()=>{let e=(0,l.Fp)();u(e),h.updateConfig(e),x((0,s.oD)()),(0,i.cY)("webterm.provider.daemon.init",{baseUrl:e.baseUrl,hasToken:!!e.token})},[h]),(0,a.useEffect)(()=>{let e=e=>{if("elanous.daemon.token"===e.key||"elanous.nexus.baseUrl"===e.key){let t=(0,l.Fp)();h.updateConfig(t),u(t),(0,i.cY)("webterm.provider.daemon.config-cross-tab",{key:e.key,hasToken:!!t.token});return}"elanous.daemon.sessionId"===e.key&&e.newValue&&x(t=>t===e.newValue?t:((0,i.cY)("webterm.provider.daemon.session-cross-tab",{previous:t||"(empty)",next:e.newValue}),e.newValue))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[h]);let p=e=>{u(t=>{let r={...t,...e};return(0,l.Qc)(e),h.updateConfig(r),(0,i.cY)("webterm.provider.daemon.config-update",{keys:Object.keys(e)}),r})},g=e=>{x(e),localStorage.setItem("elanous.daemon.sessionId",e),(0,i.cY)("webterm.provider.daemon.session-set",{sessionId:e})},f=(0,a.useMemo)(()=>({config:c,setConfig:p,client:h,sessionId:m,setSessionId:g}),[c,h,m]);return(0,n.jsx)(d.Provider,{value:f,children:t})}function u(){let e=(0,a.useContext)(d);if(!e)throw Error("useDaemon must be used inside <DaemonProvider>");return e}},19631:(e,t,r)=>{"use strict";r.d(t,{Zr:()=>s,f6:()=>a,oD:()=>l});let n="elanous.daemon.sessionId";function a(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"s-".concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2,10))}function l(){let e=function(){let e=new URLSearchParams(window.location.search).get("session");return e?(localStorage.setItem(n,e),e):localStorage.getItem(n)}();if(e)return e;let t=a();return localStorage.setItem(n,t),t}function s(){let e=a();return localStorage.setItem(n,e),e}},35083:(e,t,r)=>{"use strict";r.d(t,{cn:()=>l});var n=r(44196),a=r(25080);function l(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.QP)((0,n.$)(t))}},44092:(e,t,r)=>{"use strict";r.d(t,{$:()=>i});var n=r(77194),a=r(51225),l=r(65106),s=r(35083);let o=(0,l.F)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function i(e){let{className:t,variant:r="default",size:l="default",...i}=e;return(0,n.jsx)(a.$,{"data-slot":"button",className:(0,s.cn)(o({variant:r,size:l,className:t})),...i})}},47797:(e,t,r)=>{"use strict";r.d(t,{HS:()=>n,O2:()=>l,Rk:()=>d,XP:()=>c,sR:()=>i,uU:()=>a});let n=["auto","default","neutral","dark","forest"],a="elanous.mermaid.theme",l="elanous:mermaid-theme-change",s=null,o=null;function i(){if(o!==window&&(s=null),null!==s)return s;try{var e;let t=window.localStorage.getItem(a);return null!=(e=n.find(e=>e===t))?e:"auto"}catch(e){return"auto"}}function d(e){o=window;try{window.localStorage.setItem(a,e),s=null}catch(t){s=e}window.dispatchEvent(new Event(l))}function c(e,t){for(let t of e.matchAll(/%%\{\s*init\s*:\s*\{([\s\S]*?)\}\s*\}%%/gi)){var r;let e=null==(r=t[1])?void 0:r.match(/(?:^|,)\s*['"]?theme['"]?\s*:\s*['"]?(default|neutral|dark|forest|base)\b/i);if(e)return e[1].toLowerCase()}return"auto"===t?"default":t}},57526:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>D});var n=r(77194),a=r(49954),l=r(8801),s=r(44092),o=r(73137),i=r(21666),d=r(58091),c=r(22961),u=r(47797);let m=null,x=Promise.resolve();function h(){var e;return"dark"===(null!=(e=getComputedStyle(document.documentElement).colorScheme)?e:"").trim().split(/\s+/)[0]}async function p(e,t,n){let a=x.then(async()=>{let a=await (!m&&(m=Promise.all([r.e(3966),r.e(9719),r.e(4089),r.e(9117)]).then(r.bind(r,20184)).then(e=>e.default).catch(e=>{throw m=null,e})),m);a.initialize({startOnLoad:!1,securityLevel:"strict",theme:n,fontFamily:"inherit"});try{let{svg:r}=await a.render(e,t);return r}finally{var l,s;"undefined"!=typeof document&&(null==(l=document.getElementById(e))||l.remove(),null==(s=document.getElementById("d".concat(e)))||s.remove())}});return x=a.catch(()=>void 0),a}function g(e){let{source:t}=e,r=(0,a.useId)(),l="mermaid-".concat(r.replace(/[^a-zA-Z0-9_-]/g,"")),[s,o]=(0,a.useState)({status:"loading"}),[i,d]=(0,a.useState)(()=>h()),[c,m]=(0,a.useState)(u.sR),x=(0,u.XP)(t,c);if((0,a.useEffect)(()=>{let e=()=>m((0,u.sR)()),t=t=>{(t.key===u.uU||null===t.key)&&e()};return window.addEventListener(u.O2,e),window.addEventListener("storage",t),()=>{window.removeEventListener(u.O2,e),window.removeEventListener("storage",t)}},[]),(0,a.useEffect)(()=>{if(d(h()),"undefined"==typeof MutationObserver)return;let e=new MutationObserver(()=>d(h()));return e.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","class","style"]}),()=>e.disconnect()},[]),(0,a.useEffect)(()=>{let e=!1;return o({status:"loading"}),p("".concat(l,"-").concat(Date.now().toString(36)),t,x).then(r=>{e||o({status:"ok",svg:r,theme:x,source:t})}).catch(t=>{e||o({status:"error",message:(t instanceof Error?t.message:String(t)).split("\n").filter(Boolean).slice(0,3).join(" \xb7 ")||"mermaid 렌더 실패"})}),()=>{e=!0}},[l,t,x]),"ok"===s.status&&s.theme===x&&s.source===t)return(0,n.jsx)("div",{className:"".concat("my-3 flex justify-center overflow-x-auto rounded-lg border p-3 [&_svg]:h-auto [&_svg]:max-w-full"," ").concat(i&&"dark"!==x?"border-gray-200 bg-white text-gray-900 [color-scheme:light]":"border-border bg-muted/20"),"data-elanous-mermaid":"ok",dangerouslySetInnerHTML:{__html:s.svg}});return(0,n.jsxs)("div",{className:"my-3","data-elanous-mermaid":"ok"===s.status?"loading":s.status,children:["error"===s.status&&(0,n.jsxs)("p",{className:"mb-1 text-xs text-destructive",children:["mermaid 도식을 그리지 못했습니다: ",s.message]}),("loading"===s.status||"ok"===s.status&&(s.theme!==x||s.source!==t))&&(0,n.jsx)("p",{className:"mb-1 text-xs text-muted-foreground",children:"mermaid 도식을 그리는 중…"}),(0,n.jsx)("pre",{className:"overflow-x-auto rounded-lg border border-border bg-muted/40 p-3 text-xs",children:(0,n.jsx)("code",{className:"language-mermaid font-mono",children:t})})]})}let f="wikilink:",v={aliasDivider:"|",pageResolver:e=>[e],hrefTemplate:e=>"".concat(f).concat(encodeURIComponent(e))};function b(e){let{markdown:t,onWikilink:r}=e;return(0,n.jsx)("div",{className:"text-sm text-foreground/90",children:(0,n.jsx)(o.oz,{remarkPlugins:[i.A,c.A,[d.A,v]],components:{h1:e=>{let{children:t}=e;return(0,n.jsx)("h1",{className:"mb-3 mt-5 border-b border-border pb-1 text-2xl font-bold",children:t})},h2:e=>{let{children:t}=e;return(0,n.jsx)("h2",{className:"mb-2 mt-5 text-xl font-bold",children:t})},h3:e=>{let{children:t}=e;return(0,n.jsx)("h3",{className:"mb-2 mt-4 text-lg font-semibold",children:t})},h4:e=>{let{children:t}=e;return(0,n.jsx)("h4",{className:"mb-1 mt-3 text-base font-semibold",children:t})},h5:e=>{let{children:t}=e;return(0,n.jsx)("h5",{className:"mb-1 mt-2 text-sm font-semibold text-muted-foreground",children:t})},h6:e=>{let{children:t}=e;return(0,n.jsx)("h6",{className:"mb-1 mt-2 text-xs font-semibold uppercase text-muted-foreground",children:t})},p:e=>{let{children:t}=e;return(0,n.jsx)("p",{className:"my-2 leading-relaxed",children:t})},ul:e=>{let{children:t}=e;return(0,n.jsx)("ul",{className:"my-2 list-disc space-y-1 pl-6",children:t})},ol:e=>{let{children:t}=e;return(0,n.jsx)("ol",{className:"my-2 list-decimal space-y-1 pl-6",children:t})},li:e=>{let{children:t}=e;return(0,n.jsx)("li",{className:"leading-relaxed",children:t})},blockquote:e=>{let{children:t}=e;return(0,n.jsx)("blockquote",{className:"my-3 border-l-4 border-primary/40 bg-muted/40 py-1 pl-3 text-muted-foreground",children:t})},hr:()=>(0,n.jsx)("hr",{className:"my-4 border-border"}),table:e=>{let{children:t}=e;return(0,n.jsx)("div",{className:"my-3 overflow-x-auto",children:(0,n.jsx)("table",{className:"w-full border-collapse text-sm",children:t})})},thead:e=>{let{children:t}=e;return(0,n.jsx)("thead",{className:"bg-muted/60",children:t})},th:e=>{let{children:t}=e;return(0,n.jsx)("th",{className:"border border-border px-3 py-1.5 text-left font-semibold",children:t})},td:e=>{let{children:t}=e;return(0,n.jsx)("td",{className:"border border-border px-3 py-1.5",children:t})},code:e=>{let{className:t,children:r}=e;return t?(0,n.jsx)("code",{className:"".concat(t," font-mono"),children:r}):(0,n.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[0.85em]",children:r})},pre:e=>{let{node:t,children:r}=e,a=function(e){var t,r;let n=null==e||null==(t=e.children)?void 0:t.find(e=>"element"===e.type&&"code"===e.tagName);if(!n)return null;let a=null==(r=n.properties)?void 0:r.className;return(Array.isArray(a)?a.map(String):"string"==typeof a?a.split(/\s+/):[]).includes("language-mermaid")?(function e(t){var r,n;return t?"text"===t.type?null!=(r=t.value)?r:"":(null!=(n=t.children)?n:[]).map(e).join(""):""})(n).replace(/\n$/,""):null}(t);return null!==a?(0,n.jsx)(g,{source:a}):(0,n.jsx)("pre",{className:"my-3 overflow-x-auto rounded-lg border border-border bg-muted/40 p-3 text-xs",children:r})},img:e=>{let{src:t,alt:r}=e;return(0,n.jsx)("img",{src:"string"==typeof t?t:"",alt:null!=r?r:"",className:"my-2 max-w-full rounded"})},a:e=>{let{href:t,children:a}=e,l=null!=t?t:"";if(l.startsWith(f)){let e=decodeURIComponent(l.slice(f.length));return(0,n.jsx)("button",{type:"button",onClick:()=>null==r?void 0:r(e),className:"text-primary underline decoration-dotted underline-offset-2 hover:decoration-solid",children:a})}return(0,n.jsx)("a",{href:l,target:"_blank",rel:"noreferrer",className:"text-primary underline underline-offset-2",children:a})}},children:t})})}class y{get(e){return this.client.fetchJson(e)}info(){return this.get("/v1/vault/info")}list(e){return this.get("/v1/vault/list".concat(e?"?cwd=".concat(encodeURIComponent(e)):""))}read(e,t){let r=new URLSearchParams({path:e,...t?{maxBytes:String(t)}:{}});return this.get("/v1/vault/read?".concat(r.toString()))}search(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return this.get("/v1/vault/search?q=".concat(encodeURIComponent(e),"&limit=").concat(t))}notes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return this.get("/v1/vault/notes?".concat(e?"query=".concat(encodeURIComponent(e),"&"):"","limit=").concat(t))}backlinks(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return this.get("/v1/vault/backlinks?target=".concat(encodeURIComponent(e),"&limit=").concat(t))}tags(){return this.get("/v1/vault/tags")}templates(){return this.get("/v1/vault/templates")}graph(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:500,n=new URLSearchParams({limit:String(r),...e?{focus:e,hops:String(t)}:{}});return this.get("/v1/vault/graph?".concat(n.toString()))}pollChanges(e){return this.get("/v1/vault/poll-changes?sinceMs=".concat(e))}orphans(){return this.get("/v1/vault/orphans")}templateExpand(e,t){return this.client.fetchJson("/v1/vault/template-expand",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({templatePath:e,...t?{title:t}:{}})})}async writeNote(e){var t,r,n,a;let l=await this.client.fetchResponse("/v1/vault/file",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e)}),s=(null!=(t=l.headers.get("content-type"))?t:"").includes("application/json")?await l.json():await l.text();if(!l.ok&&409!==l.status)throw Error(String("string"==typeof s?s:null!=(a=null!=(n=null!=(r=null==s?void 0:s.message)?r:null==s?void 0:s.reason)?n:null==s?void 0:s.error)?a:"".concat(l.status)));return s}async saveNote(e){var t,r,n;let a=await this.client.fetchResponse("/v1/notes/save",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)}),l=(null!=(t=a.headers.get("content-type"))?t:"").includes("application/json")?await a.json():await a.text();if(!a.ok&&409!==a.status)throw Error(String("string"==typeof l?l:null!=(n=null!=(r=null==l?void 0:l.reason)?r:null==l?void 0:l.error)?n:"".concat(a.status)));return l}constructor(e){this.client=e}}function j(e){let t=/^---\n([\s\S]*?)\n---\n?/.exec(e);return t?{frontmatter:t[1],body:e.slice(t[0].length)}:{frontmatter:null,body:e}}function w(e){let t=e.toLowerCase();return t.endsWith(".md")||t.endsWith(".markdown")?"markdown":/\.(png|jpe?g|gif|webp|svg)$/.test(t)?"image":t.endsWith(".pdf")?"pdf":/\.(txt|json|ya?ml|csv|log)$/.test(t)?"text":"other"}function N(e){let{onPickTag:t}=e,{client:r}=(0,l.Q)(),s=(0,a.useMemo)(()=>new y(r),[r]),[o,i]=(0,a.useState)([]),[d,c]=(0,a.useState)(""),[u,m]=(0,a.useState)(!0),x=(0,a.useCallback)(async()=>{m(!0);try{var e;let t=await s.tags();i((null!=(e=t.tags)?e:[]).sort((e,t)=>t.count-e.count))}catch(e){}finally{m(!1)}},[s]);(0,a.useEffect)(()=>{x()},[x]);let h=d?o.filter(e=>e.tag.toLowerCase().includes(d.toLowerCase())):o;return(0,n.jsxs)("div",{className:"flex h-full flex-col",children:[(0,n.jsx)("div",{className:"border-b border-border p-2",children:(0,n.jsx)("input",{value:d,onChange:e=>c(e.target.value),placeholder:"태그 필터…",className:"w-full rounded border border-border bg-background px-2 py-1 text-xs"})}),(0,n.jsx)("div",{className:"flex-1 overflow-auto p-1",children:u?(0,n.jsx)("p",{className:"p-2 text-xs text-muted-foreground",children:"불러오는 중…"}):0===h.length?(0,n.jsx)("p",{className:"p-2 text-xs text-muted-foreground",children:"태그 없음"}):(0,n.jsx)("ul",{className:"space-y-0.5",children:h.map(e=>(0,n.jsx)("li",{children:(0,n.jsxs)("button",{onClick:()=>t(e.tag),className:"flex w-full items-center justify-between rounded px-2 py-1 text-left text-xs hover:bg-muted",children:[(0,n.jsxs)("span",{className:"truncate",children:["#",e.tag]}),(0,n.jsx)("span",{className:"ml-2 shrink-0 rounded bg-muted px-1.5 text-[10px] text-muted-foreground",children:e.count})]})},e.tag))})})]})}function k(e){var t,r;let{onOpen:o}=e,{client:i}=(0,l.Q)(),d=(0,a.useMemo)(()=>new y(i),[i]),[c,u]=(0,a.useState)(null),[m,x]=(0,a.useState)(null),[h,p]=(0,a.useState)(!0),g=(0,a.useCallback)(async e=>{p(!0);try{u(await d.graph(null!=e?e:void 0,1,e?60:400))}catch(e){}finally{p(!1)}},[d]);(0,a.useEffect)(()=>{g(m)},[g,m]);let f=(0,a.useMemo)(()=>{if(!c)return{nodes:[],edges:[]};let e=c.nodes.map(e=>e.id),t=c.edges.map(e=>({source:e.from,target:e.to}));return{nodes:function(e,t){var r,n,a;let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{width:800,height:600},{width:s,height:o}=l,i=null!=(r=l.iterations)?r:120,d=e.length,c=new Map;for(let e of t)c.set(e.source,(null!=(n=c.get(e.source))?n:0)+1),c.set(e.target,(null!=(a=c.get(e.target))?a:0)+1);let u=s/2,m=o/2,x=.4*Math.min(s,o),h=e.map((e,t)=>{var r;return{id:e,deg:null!=(r=c.get(e))?r:0,x:u+x*Math.cos(2*Math.PI*t/Math.max(1,d)),y:m+x*Math.sin(2*Math.PI*t/Math.max(1,d))}}),p=new Map(h.map((e,t)=>[e.id,t])),g=Math.sqrt(s*o/Math.max(1,d));for(let e=0;e<i;e++){let r=h.map(()=>({x:0,y:0}));for(let e=0;e<d;e++)for(let t=e+1;t<d;t++){let n=h[e].x-h[t].x,a=h[e].y-h[t].y,l=Math.hypot(n,a)||.01,s=g*g/l;n/=l,a/=l,r[e].x+=n*s,r[e].y+=a*s,r[t].x-=n*s,r[t].y-=a*s}for(let e of t){let t=p.get(e.source),n=p.get(e.target);if(null==t||null==n)continue;let a=h[t].x-h[n].x,l=h[t].y-h[n].y,s=Math.hypot(a,l)||.01,o=s*s/g;a/=s,l/=s,r[t].x-=a*o,r[t].y-=l*o,r[n].x+=a*o,r[n].y+=l*o}let n=1-e/i;for(let e=0;e<d;e++){let t=Math.hypot(r[e].x,r[e].y)||.01,a=Math.min(t,30*n);h[e].x=Math.max(20,Math.min(s-20,h[e].x+r[e].x/t*a)),h[e].y=Math.max(20,Math.min(o-20,h[e].y+r[e].y/t*a))}}return h}(e,t,{width:900,height:640,iterations:140}),edges:t}},[c]),v=(0,a.useMemo)(()=>new Map(f.nodes.map(e=>[e.id,e])),[f]),b=Math.max(1,...f.nodes.map(e=>e.deg));return(0,n.jsxs)("div",{className:"flex h-full flex-col",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 border-b border-border px-3 py-2 text-sm",children:[(0,n.jsx)("span",{className:"font-medium",children:"노트 그래프"}),m?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("span",{className:"text-xs text-muted-foreground",children:["focus: ",m," (1-hop)"]}),(0,n.jsx)(s.$,{size:"sm",variant:"outline",className:"ml-auto h-6 px-2 text-xs",onClick:()=>x(null),children:"전체 그래프"})]}):(0,n.jsxs)("span",{className:"ml-auto text-xs text-muted-foreground",children:[null!=(t=null==c?void 0:c.nodes.length)?t:0," 노드 \xb7 ",null!=(r=null==c?void 0:c.edges.length)?r:0," 링크",(null==c?void 0:c.truncated)?" (일부)":""]})]}),(0,n.jsx)("div",{className:"flex-1 overflow-auto p-2",children:h?(0,n.jsx)("p",{className:"p-4 text-sm text-muted-foreground",children:"그래프 계산 중…"}):c&&0!==c.nodes.length?(0,n.jsxs)("svg",{viewBox:"0 0 ".concat(900," ").concat(640),className:"h-auto w-full",style:{maxHeight:"78vh"},children:[f.edges.map((e,t)=>{let r=v.get(e.source),a=v.get(e.target);return r&&a?(0,n.jsx)("line",{x1:r.x,y1:r.y,x2:a.x,y2:a.y,stroke:"currentColor",className:"text-border",strokeWidth:.6,opacity:.5},t):null}),f.nodes.map(e=>{let t=3+e.deg/b*9;return(0,n.jsxs)("g",{className:"cursor-pointer",onClick:()=>null==o?void 0:o(e.id),onDoubleClick:()=>x(e.id),children:[(0,n.jsx)("circle",{cx:e.x,cy:e.y,r:t,className:"fill-primary/70 hover:fill-primary"}),(e.deg>=.3*b||m)&&(0,n.jsx)("text",{x:e.x+t+2,y:e.y+3,className:"fill-foreground/70 text-[9px]",children:e.id.split("/").pop()})]},e.id)})]}):(0,n.jsx)("p",{className:"p-4 text-sm text-muted-foreground",children:"그래프가 비어있습니다."})}),(0,n.jsx)("p",{className:"border-t border-border px-3 py-1 text-[11px] text-muted-foreground",children:"클릭=노트 열기 \xb7 더블클릭=로컬 그래프(focus)"})]})}function S(e){let{onClose:t,onCreated:r}=e,{client:o}=(0,l.Q)(),i=(0,a.useMemo)(()=>new y(o),[o]),[d,c]=(0,a.useState)(""),[u,m]=(0,a.useState)([]),[x,h]=(0,a.useState)(""),[p,g]=(0,a.useState)(!1),[f,v]=(0,a.useState)(null);(0,a.useEffect)(()=>{i.templates().then(e=>{var t;return m(null!=(t=e.templates)?t:[])}).catch(()=>{})},[i]);let b=(0,a.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};g(!0),v(null);try{let t=e.daily?function(){let e=new Date;return"".concat(e.getFullYear(),"-").concat(String(e.getMonth()+1).padStart(2,"0"),"-").concat(String(e.getDate()).padStart(2,"0"))}():d.trim();if(!t){v("제목을 입력하세요"),g(!1);return}let n="# ".concat(t,"\n\n");if(x){let e=await i.templateExpand(x,t);e.content&&(n=e.content)}else e.daily&&(n="# ".concat(t,"\n\n## 오늘\n\n- \n"));let a=e.daily?"Daily/".concat(t,".md"):"".concat(t,".md"),l=await i.writeNote({path:a,content:n,createOnly:!0});if(l.error){v("file_exists"===l.error?"이미 존재하는 노트입니다":l.error),g(!1);return}r(a)}catch(e){v(e instanceof Error?e.message:String(e)),g(!1)}},[i,d,x,r]);return(0,n.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:t,children:(0,n.jsxs)("div",{className:"w-[420px] rounded-lg border border-border bg-card p-4 shadow-xl",onClick:e=>e.stopPropagation(),children:[(0,n.jsx)("h2",{className:"mb-3 text-sm font-semibold",children:"새 노트"}),(0,n.jsx)("input",{value:d,onChange:e=>c(e.target.value),onKeyDown:e=>{"Enter"===e.key&&b()},placeholder:"노트 제목…",autoFocus:!0,className:"mb-2 w-full rounded border border-border bg-background px-3 py-2 text-sm"}),u.length>0&&(0,n.jsxs)("select",{value:x,onChange:e=>h(e.target.value),className:"mb-2 w-full rounded border border-border bg-background px-2 py-1.5 text-sm",children:[(0,n.jsx)("option",{value:"",children:"템플릿 없음"}),u.map(e=>(0,n.jsx)("option",{value:e.relPath,children:e.name},e.relPath))]}),f&&(0,n.jsx)("p",{className:"mb-2 text-xs text-rose-400",children:f}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(s.$,{size:"sm",onClick:()=>void b(),disabled:p||!d.trim(),children:"생성"}),(0,n.jsx)(s.$,{size:"sm",variant:"outline",onClick:()=>void b({daily:!0}),disabled:p,children:"오늘 데일리노트"}),(0,n.jsx)(s.$,{size:"sm",variant:"ghost",className:"ml-auto",onClick:t,children:"취소"})]})]})})}let C="elanous.pwa.vaultTreeOpen";function E(e){let{onEdit:t}=e,{client:r}=(0,l.Q)(),o=(0,a.useMemo)(()=>new y(r),[r]),[i,d]=(0,a.useState)(null),[c,u]=(0,a.useState)(""),[m,x]=(0,a.useState)([]),[h,p]=(0,a.useState)(null),[g,f]=(0,a.useState)(null),[v,b]=(0,a.useState)(""),[j,E]=(0,a.useState)(null),[z,D]=(0,a.useState)(!1),[I,P]=(0,a.useState)("view"),[R,U]=(0,a.useState)("files"),[_,O]=(0,a.useState)(!1),[$,L]=(0,a.useState)(0),[T,q]=(0,a.useState)(!0);(0,a.useEffect)(()=>{q(function(e){try{return(null==e?void 0:e.getItem(C))!=="0"}catch(e){return!0}}(window.localStorage))},[]);let A=(0,a.useCallback)(()=>{q(e=>{let t=!e;var r=window.localStorage;try{null==r||r.setItem(C,t?"1":"0")}catch(e){}return t})},[]);(0,a.useEffect)(()=>{let e=Date.now(),t=setInterval(()=>{o.pollChanges(e).then(e=>{var t;return L(null!=(t=e.count)?t:0)}).catch(()=>{})},3e4);return()=>clearInterval(t)},[o]);let F=(0,a.useCallback)(e=>{b("#".concat(e)),U("files"),(async()=>{D(!0);try{var t;let r=await o.search("#".concat(e),50);E(null!=(t=r.matches)?t:[])}catch(e){E([])}finally{D(!1)}})()},[o]),B=(0,a.useCallback)(async e=>{D(!0),E(null);try{let t=await o.list(e||void 0);t.error||(x(t.entries),u(t.cwd))}catch(e){}finally{D(!1)}},[o]);(0,a.useEffect)(()=>{let e=!0;return o.info().then(t=>{e&&(d(t),t.available&&B(""))}).catch(()=>{}),()=>{e=!1}},[o,B]);let K=(0,a.useCallback)(async e=>{p(e),f(null),window.innerWidth<=767&&q(!1);try{f(await o.read(e))}catch(e){}},[o]),Q=(0,a.useCallback)(async()=>{let e=v.trim();if(!e)return void E(null);D(!0);try{var t;let r=await o.search(e,50);E(null!=(t=r.matches)?t:[])}catch(e){E([])}finally{D(!1)}},[o,v]),W=c&&(null==i?void 0:i.root)?c.replace(i.root,"").split("/").filter(Boolean):[],V=(null==i?void 0:i.root)?c.replace(i.root,"").replace(/^\//,""):"";return i&&!i.available?(0,n.jsxs)("div",{className:"p-6 text-sm text-muted-foreground",children:["Obsidian vault를 찾을 수 없습니다 (source: ",i.source,"). ~/.elanous/config.json 의 obsidian.vault 를 확인하세요."]}):(0,n.jsxs)("div",{className:"mx-auto flex h-[calc(100vh-3rem)] max-w-[1920px] gap-3 px-3 py-3",children:[_&&(0,n.jsx)(S,{onClose:()=>O(!1),onCreated:e=>{O(!1),B(""),null==t||t(e)}}),(0,n.jsxs)("div",{"data-testid":"vault-tree",className:[T?"flex":"hidden","w-full shrink-0 flex-col rounded-lg border border-border bg-card/40 md:w-64 lg:w-72"].join(" "),children:[(0,n.jsxs)("div",{className:"flex items-center gap-1 border-b border-border px-2 py-1.5",children:[["files","tags","graph"].map(e=>(0,n.jsx)("button",{onClick:()=>U(e),className:["rounded px-2 py-0.5 text-xs",R===e?"bg-primary/20 text-foreground":"text-muted-foreground"].join(" "),children:{files:"파일",tags:"태그",graph:"그래프"}[e]},e)),$>0&&(0,n.jsxs)("span",{className:"rounded bg-amber-500/15 px-1.5 py-0.5 text-[10px] text-amber-300",title:"외부 변경 감지",children:["↻ ",$]}),(0,n.jsx)(s.$,{size:"sm",variant:"outline",className:"ml-auto h-6 px-2 text-xs",onClick:()=>O(!0),children:"+ 새 노트"})]}),"graph"===R?(0,n.jsx)(k,{onOpen:e=>{U("files"),K("".concat(e,".md"))}}):"tags"===R?(0,n.jsx)(N,{onPickTag:F}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"border-b border-border p-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("input",{value:v,onChange:e=>b(e.target.value),onKeyDown:e=>{"Enter"===e.key&&Q()},placeholder:"vault 전문검색…",className:"min-w-0 flex-1 rounded border border-border bg-background px-2 py-1 text-sm"}),(0,n.jsx)(s.$,{size:"sm",variant:"outline",onClick:()=>void Q(),children:"검색"})]}),!j&&(0,n.jsxs)("div",{className:"mt-1.5 flex flex-wrap items-center gap-1 text-xs text-muted-foreground",children:[(0,n.jsx)("button",{className:"hover:text-foreground",onClick:()=>void B(""),children:"vault"}),W.map((e,t)=>(0,n.jsxs)("span",{children:["/ ",(0,n.jsx)("button",{className:"hover:text-foreground",onClick:()=>void B("".concat(i.root,"/").concat(W.slice(0,t+1).join("/"))),children:e})]},t))]})]}),(0,n.jsxs)("div",{className:"flex-1 overflow-auto p-1",children:[z&&(0,n.jsx)("p",{className:"p-2 text-xs text-muted-foreground",children:"불러오는 중…"}),j?0===j.length?(0,n.jsx)("p",{className:"p-2 text-xs text-muted-foreground",children:"검색 결과 없음"}):(0,n.jsx)("ul",{className:"space-y-1",children:j.map((e,t)=>(0,n.jsx)("li",{children:(0,n.jsxs)("button",{className:"w-full rounded px-2 py-1.5 text-left text-xs hover:bg-muted",onClick:()=>void K(e.path),children:[(0,n.jsx)("span",{className:"font-medium",children:e.path.split("/").pop()})," ",(0,n.jsxs)("span",{className:"text-muted-foreground",children:[":",e.lineNumber]}),(0,n.jsx)("div",{className:"truncate text-muted-foreground",children:e.snippet})]})},t))}):(0,n.jsxs)("ul",{children:[V&&(0,n.jsx)("li",{children:(0,n.jsx)("button",{className:"w-full rounded px-2 py-1.5 text-left text-sm text-muted-foreground hover:bg-muted",onClick:()=>void B("".concat(i.root,"/").concat(function(e){let t=e.split("/").filter(Boolean);return t.pop(),t.join("/")}(V))),children:"\uD83D\uDCC1 .."})}),m.map(e=>(0,n.jsx)("li",{children:(0,n.jsxs)("button",{className:["flex w-full items-center gap-1.5 rounded px-2 py-1.5 text-left text-sm hover:bg-muted",h==="".concat(V?V+"/":"").concat(e.name)?"bg-muted":""].join(" "),onClick:()=>e.isDir?void B("".concat(c,"/").concat(e.name)):void K("".concat(V?V+"/":"").concat(e.name)),children:[(0,n.jsx)("span",{children:e.isDir?"\uD83D\uDCC1":"markdown"===w(e.name)?"\uD83D\uDCDD":"image"===w(e.name)?"\uD83D\uDDBC️":"\uD83D\uDCC4"}),(0,n.jsx)("span",{className:"truncate",children:e.name})]})},e.relPath))]})]})]})]}),(0,n.jsxs)("div",{className:[T?"hidden md:flex":"flex","min-w-0 flex-1 flex-col rounded-lg border border-border bg-card/40"].join(" "),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-3 py-2",children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,n.jsx)("button",{type:"button",onClick:A,"aria-expanded":T,"aria-label":T?"폴더 접기":"폴더 펴기",title:T?"폴더 접기":"폴더 펴기",className:"shrink-0 rounded px-1.5 py-0.5 text-xs text-muted-foreground ring-1 ring-border hover:text-foreground",children:T?"◀ 폴더":"▶ 폴더"}),(0,n.jsx)("span",{className:"truncate text-sm font-medium",children:null!=h?h:"파일을 선택하세요"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[h&&"markdown"===w(h)&&(0,n.jsx)("div",{className:"flex items-center gap-0.5 rounded ring-1 ring-border",children:["view","raw"].map(e=>(0,n.jsx)("button",{onClick:()=>P(e),className:["px-2 py-0.5 text-xs",I===e?"bg-primary/20 text-foreground":"text-muted-foreground"].join(" "),children:"view"===e?"View":"Raw"},e))}),h&&"markdown"===w(h)&&t&&(0,n.jsx)(s.$,{size:"sm",variant:"outline",onClick:()=>t(h),children:"편집"})]})]}),(0,n.jsx)("div",{className:"flex-1 overflow-auto p-4",children:g?(0,n.jsx)(M,{preview:g,selected:h,mode:I,onWikilink:e=>{K("".concat(V?V+"/":"").concat(e,".md"))}}):(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:h?"로딩…":"좌측에서 노트를 선택하면 여기에 표시됩니다."})})]})]})}function M(e){let{preview:t,selected:r,mode:a,onWikilink:l}=e;if(t.error)return(0,n.jsx)("p",{className:"text-sm text-rose-400",children:t.error});let s=w(r);if("image"===s&&t.bytes)return(0,n.jsx)("img",{src:"data:".concat(t.mime,";base64,").concat(t.bytes),alt:r,className:"max-w-full rounded"});if("markdown"===s&&null!=t.content){let{frontmatter:e,body:r}=j(t.content);return"raw"===a?(0,n.jsx)("pre",{className:"whitespace-pre-wrap font-mono text-xs leading-relaxed",children:t.content}):(0,n.jsxs)("div",{children:[e&&(0,n.jsx)("pre",{className:"mb-3 rounded bg-muted/40 p-2 text-[11px] text-muted-foreground",children:e}),(0,n.jsx)(b,{markdown:r,onWikilink:l}),t.truncated&&(0,n.jsxs)("p",{className:"mt-2 text-xs text-amber-400",children:["⚠ 일부만 표시됨(",(t.size/1024).toFixed(0),"KB)"]})]})}return null!=t.content?(0,n.jsx)("pre",{className:"whitespace-pre-wrap text-sm",children:t.content}):(0,n.jsxs)("p",{className:"text-sm text-muted-foreground",children:["미리보기 불가(",t.mime,")"]})}function z(e){let{path:t,onClose:r}=e,{client:o}=(0,l.Q)(),i=(0,a.useMemo)(()=>new y(o),[o]),[d,c]=(0,a.useState)(""),[u,m]=(0,a.useState)(!1),[x,h]=(0,a.useState)("split"),[p,g]=(0,a.useState)("clean"),[f,v]=(0,a.useState)(null),w=(0,a.useRef)(void 0),N=(0,a.useRef)(null),k=(0,a.useRef)(null),[S,C]=(0,a.useState)("outline"),[E,M]=(0,a.useState)([]),[z,D]=(0,a.useState)(null),I=(0,a.useMemo)(()=>(function(e){let t=[],r=!1;return e.split("\n").forEach((e,n)=>{let a=e.trimEnd();if(/^```/.test(a.trim())){r=!r;return}if(r)return;let l=/^(#{1,6})\s+(.+)$/.exec(a);l&&t.push({level:l[1].length,text:l[2].trim(),line:n})}),t})(j(d).body),[d]);(0,a.useEffect)(()=>{let e=!0;return i.read(t,8388608).then(t=>{var r;e&&(c(null!=(r=t.content)?r:""),w.current=t.mtimeMs,m(!0),g("clean"))}).catch(()=>{e&&(v("노트를 불러오지 못했습니다"),m(!0))}),()=>{e=!1,N.current&&clearTimeout(N.current)}},[i,t]);let P=(0,a.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;g("saving"),v(null);try{let n=await i.writeNote({path:t,content:r,...e?{}:null!=w.current?{lastKnownMtime:w.current}:{}});if("mtime_conflict"===n.error||n.error&&null!=n.currentMtime)return void g("conflict");if(n.error){g("error"),v(n.error);return}null!=n.mtimeMs&&(w.current=n.mtimeMs),g("saved")}catch(e){g("error"),v(e instanceof Error?e.message:String(e))}},[i,t,d]);(0,a.useEffect)(()=>{var e;let r=!0;return i.backlinks((null!=(e=t.split("/").pop())?e:t).replace(/\.md$/i,""),100).then(e=>{var t;r&&M(null!=(t=e.matches)?t:[])}).catch(()=>{}),()=>{r=!1}},[i,t]);let R=(0,a.useCallback)((e,t)=>{let r=function(e,t){let r=e.slice(0,t),n=r.lastIndexOf("[[");if(n<0)return null;let a=r.slice(n+2);return a.includes("]]")||a.includes("\n")?null:{query:a,start:n+2}}(e,t);if(!r)return void D(null);i.notes(r.query||void 0,8).then(e=>{var n;D({query:r.query,start:r.start,caret:t,items:(null!=(n=e.notes)?n:[]).slice(0,8)})}).catch(()=>D(null))},[i]),U=(0,a.useCallback)((e,t)=>{c(e),g("dirty"),R(e,t),N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{P(!1,e)},2500)},[P,R]),_=(0,a.useCallback)(e=>{if(!z)return;let t=function(e,t,r,n){let a=e.slice(0,t),l=e.slice(r),s="".concat(n,"]]");return{text:a+s+l,caret:a.length+s.length}}(d,z.start,z.caret,e.name);c(t.text),g("dirty"),D(null),requestAnimationFrame(()=>{k.current&&(k.current.focus(),k.current.setSelectionRange(t.caret,t.caret))})},[z,d]),O=(0,a.useCallback)(e=>{let t=k.current;if(!t)return;let r=d.split("\n").slice(0,e).join("\n").length;t.focus(),t.setSelectionRange(r,r),t.scrollTop=Math.max(0,20*e-100)},[d]),$=j(d).body;return u?(0,n.jsxs)("div",{className:"mx-auto flex h-[calc(100vh-3rem)] max-w-[1500px] flex-col px-3 py-3",children:[(0,n.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,n.jsx)(s.$,{size:"sm",variant:"ghost",onClick:r,children:"← 목록"}),(0,n.jsx)("span",{className:"truncate text-sm font-medium",children:t}),(0,n.jsx)("span",{className:["ml-2 rounded px-2 py-0.5 text-xs",{clean:"text-muted-foreground",dirty:"text-amber-400",saving:"text-sky-400",saved:"text-emerald-400",conflict:"text-rose-400",error:"text-rose-400"}[p]].join(" "),children:{clean:"저장됨",dirty:"● 편집 중",saving:"저장 중…",saved:"✓ 저장됨",conflict:"⚠ 충돌",error:"✗ 오류"}[p]}),(0,n.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[["edit","split","preview"].map(e=>(0,n.jsx)("button",{onClick:()=>h(e),className:["rounded px-2 py-1 text-xs ring-1",x===e?"bg-primary/20 ring-primary/40":"bg-muted text-muted-foreground ring-border"].join(" "),children:{edit:"편집",split:"분할",preview:"미리보기"}[e]},e)),(0,n.jsx)(s.$,{size:"sm",variant:"outline",onClick:()=>void P(!1),children:"저장"})]})]}),"conflict"===p&&(0,n.jsxs)("div",{className:"mb-2 flex items-center gap-2 rounded border border-rose-500/40 bg-rose-500/10 px-3 py-2 text-xs text-rose-200",children:[(0,n.jsx)("span",{children:"디스크의 노트가 외부에서 변경됐습니다."}),(0,n.jsx)(s.$,{size:"sm",variant:"outline",onClick:()=>void P(!0),children:"강제 덮어쓰기"}),(0,n.jsx)(s.$,{size:"sm",variant:"ghost",onClick:()=>void i.read(t,8388608).then(e=>{var t;c(null!=(t=e.content)?t:""),w.current=e.mtimeMs,g("clean")}),children:"디스크 버전 로드"})]}),f&&(0,n.jsx)("div",{className:"mb-2 text-xs text-rose-400",children:f}),(0,n.jsxs)("div",{className:"flex min-h-0 flex-1 gap-3",children:["preview"!==x&&(0,n.jsxs)("div",{className:"relative min-h-0 flex-1",children:[(0,n.jsx)("textarea",{ref:k,value:d,onChange:e=>U(e.target.value,e.target.selectionStart),onKeyUp:e=>R(d,e.target.selectionStart),onClick:e=>R(d,e.target.selectionStart),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"s"===e.key&&(e.preventDefault(),P(!1)),"Escape"===e.key&&z&&(e.preventDefault(),D(null)),"Enter"===e.key&&z&&z.items.length&&(e.preventDefault(),_(z.items[0]))},className:"h-full min-h-0 w-full resize-none rounded-lg border border-border bg-background p-3 font-mono text-sm leading-relaxed focus:outline-none focus:ring-1 focus:ring-ring",spellCheck:!1}),z&&z.items.length>0&&(0,n.jsxs)("div",{className:"absolute left-3 top-3 z-20 max-h-56 w-72 overflow-auto rounded-md border border-border bg-popover shadow-lg",children:[(0,n.jsxs)("div",{className:"border-b border-border px-2 py-1 text-[11px] text-muted-foreground",children:["[[wikilink: ",z.query||"…"]}),z.items.map(e=>(0,n.jsxs)("button",{className:"block w-full truncate px-2 py-1.5 text-left text-xs hover:bg-muted",onMouseDown:t=>{t.preventDefault(),_(e)},children:[(0,n.jsx)("span",{className:"font-medium",children:e.name})," ",(0,n.jsx)("span",{className:"text-muted-foreground",children:e.relPath})]},e.relPath))]})]}),"edit"!==x&&(0,n.jsx)("div",{className:"min-h-0 flex-1 overflow-auto rounded-lg border border-border bg-card/40 p-4",children:(0,n.jsx)(b,{markdown:$})}),(0,n.jsxs)("div",{className:"flex w-[220px] min-w-[180px] flex-col rounded-lg border border-border bg-card/40",children:[(0,n.jsx)("div",{className:"flex border-b border-border text-xs",children:["outline","backlinks"].map(e=>(0,n.jsx)("button",{onClick:()=>C(e),className:["flex-1 px-2 py-1.5",S===e?"border-b-2 border-primary text-foreground":"text-muted-foreground"].join(" "),children:"outline"===e?"개요":"역참조 ".concat(E.length?"(".concat(E.length,")"):"")},e))}),(0,n.jsx)("div",{className:"flex-1 overflow-auto p-1 text-xs",children:"outline"===S?0===I.length?(0,n.jsx)("p",{className:"p-2 text-muted-foreground",children:"heading 없음"}):I.map((e,t)=>(0,n.jsx)("button",{onClick:()=>O(e.line),className:"block w-full truncate rounded px-2 py-1 text-left hover:bg-muted",style:{paddingLeft:"".concat(8*e.level,"px")},children:e.text},t)):0===E.length?(0,n.jsx)("p",{className:"p-2 text-muted-foreground",children:"역참조 없음"}):E.map((e,t)=>(0,n.jsxs)("div",{className:"truncate rounded px-2 py-1",title:e.snippet,children:["\uD83D\uDCCE ",e.path.split("/").pop(),e.headingAnchor?" #".concat(e.headingAnchor):""]},t))})]})]})]}):(0,n.jsx)("div",{className:"p-6 text-sm text-muted-foreground",children:"노트 로딩…"})}function D(){let[e,t]=(0,a.useState)(null);return e?(0,n.jsx)(z,{path:e,onClose:()=>t(null)}):(0,n.jsx)(E,{onEdit:e=>t(e)})}},90527:(e,t,r)=>{Promise.resolve().then(r.bind(r,57526))}},e=>{e.O(0,[8085,5194,1314,3259,9638,2201,6356,7358],()=>e(e.s=90527)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2975],{6896:(e,t,s)=>{"use strict";s.d(t,{M1:()=>c,Qj:()=>u,tI:()=>o});var r=s(77194),i=s(49954),a=s(6066),n=s(91403);let l=(0,i.createContext)(null);function o(e){let{client:t,queryClient:s,defaultStaleTimeMs:o,children:c}=e,u=(0,i.useMemo)(()=>null!=s?s:new a.E({defaultOptions:{queries:{staleTime:null!=o?o:2e3,refetchOnWindowFocus:!1}}}),[s,o]);return(0,r.jsx)(l.Provider,{value:t,children:(0,r.jsx)(n.Ht,{client:u,children:c})})}function c(){let e=(0,i.useContext)(l);if(!e)throw Error("useNexusClient must be used within <NexusProvider>");return e}function u(){return(0,i.useContext)(l)}},13399:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(30728).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},28948:(e,t,s)=>{"use strict";s.d(t,{AF:()=>r});let r={all:["nexus"],health:()=>[...r.all,"health"],snapshot:()=>[...r.all,"snapshot"],tabs:e=>e?[...r.all,"tabs",{kind:e}]:[...r.all,"tabs"],tab:e=>[...r.all,"tab",e],templates:()=>[...r.all,"templates"],template:e=>[...r.all,"template",e],config:()=>[...r.all,"config"],switches:()=>[...r.all,"switches"],switch:e=>[...r.all,"switch",e],secrets:()=>[...r.all,"secrets"],bindingChannels:()=>[...r.all,"bindings","channels"],bindings:e=>[...r.all,"bindings",e],binding:(e,t)=>[...r.all,"binding",e,t],logsTail:(e,t)=>t?[...r.all,"logs",e,{lines:t}]:[...r.all,"logs",e],workflows:()=>[...r.all,"workflows"],workflow:e=>[...r.all,"workflow",e],workflowRun:e=>[...r.all,"workflow-run",e],workflowRuns:()=>[...r.all,"workflow-runs"],pendingApprovals:()=>[...r.all,"workflow-pending-approvals"],platforms:()=>[...r.all,"platforms"],providers:()=>[...r.all,"providers"],worktrees:()=>[...r.all,"worktrees"],designCheck:()=>[...r.all,"design-check"],designPreviews:()=>[...r.all,"design-previews"],designPreview:e=>[...r.all,"design-preview",e],registryCatalog:()=>[...r.all,"registry-catalog"],resolvedView:()=>[...r.all,"resolved-view"]};r.snapshot(),r.tabs(),r.health(),r.snapshot(),r.config(),r.switches()},29968:(e,t,s)=>{"use strict";s.d(t,{n:()=>u});var r=s(49954),i=s(94192),a=s(25869),n=s(59270),l=s(91716),o=class extends n.Q{#e;#t=void 0;#s;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,l.f8)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.EN)(t.mutationKey)!==(0,l.EN)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(e)}#i(){let e=this.#s?.state??(0,i.$)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#a(e){a.jG.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,s=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,s,r)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,s,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},c=s(91403);function u(e,t){let s=(0,c.jE)(t),[i]=r.useState(()=>new o(s,e));r.useEffect(()=>{i.setOptions(e)},[i,e]);let n=r.useSyncExternalStore(r.useCallback(e=>i.subscribe(a.jG.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),u=r.useCallback((e,t)=>{i.mutate(e,t).catch(l.lQ)},[i]);if(n.error&&(0,l.GU)(i.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:u,mutateAsync:n.mutate}}},30728:(e,t,s)=>{"use strict";s.d(t,{A:()=>c});var r=s(49954);let i=function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return t.filter((e,t,s)=>!!e&&""!==e.trim()&&s.indexOf(e)===t).join(" ").trim()},a=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,s)=>s?s.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let l=(0,r.createContext)({}),o=(0,r.forwardRef)((e,t)=>{var s,a,o;let{color:c,size:u,strokeWidth:d,absoluteStrokeWidth:h,className:p="",children:m,iconNode:f,...x}=e,{size:g=24,strokeWidth:w=2,absoluteStrokeWidth:y=!1,color:v="currentColor",className:b=""}=null!=(s=(0,r.useContext)(l))?s:{},k=(null!=h?h:y)?24*Number(null!=d?d:w)/Number(null!=u?u:g):null!=d?d:w;return(0,r.createElement)("svg",{ref:t,...n,width:null!=(a=null!=u?u:g)?a:n.width,height:null!=(o=null!=u?u:g)?o:n.height,stroke:null!=c?c:v,strokeWidth:k,className:i("lucide",b,p),...!m&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(x)&&{"aria-hidden":"true"},...x},[...f.map(e=>{let[t,s]=e;return(0,r.createElement)(t,s)}),...Array.isArray(m)?m:[m]])}),c=(e,t)=>{let s=(0,r.forwardRef)((s,n)=>{let{className:l,...c}=s;return(0,r.createElement)(o,{ref:n,iconNode:t,className:i("lucide-".concat(a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),l),...c})});return s.displayName=a(e),s}},31645:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>O});var r=s(77194),i=s(49954),a=s(79854),n=s(93708),l=s(60166),o=s(30728);let c=(0,o.A)("folder-tree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);var u=s(13399),d=s(98430);let h=(0,o.A)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);var p=s(55844),m=s(6896),f=s(59917),x=s(91403),g=s(29968),w=s(28948),y=s(45785);let v={orphan:0,active:1,detached:2,idle:3,main:4},b={orphan:"Orphan",active:"Active",detached:"Detached",idle:"Idle",main:"Main"},k={orphan:"bg-error/10 text-error",active:"bg-green-600/10 text-green-700",detached:"bg-warning/10 text-warning",idle:"bg-muted text-muted-foreground",main:"bg-primary/10 text-primary"},j={orphan:a.A,active:n.A,detached:l.A,idle:c,main:c};function N(){return(0,m.Qj)()?(0,r.jsx)(M,{}):(0,r.jsxs)("div",{className:"mx-auto max-w-2xl space-y-2 p-6",children:[(0,r.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:"Worktrees"}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"Connect to a NEXUS daemon to see active worktrees."})]})}function M(){var e,t,s,n;let{data:l,isLoading:o,error:N,refetch:M,isFetching:O}=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=(0,m.M1)();return(0,f.I)({queryKey:w.AF.worktrees(),queryFn:()=>s.getWorktrees(),enabled:null==(e=t.enabled)||e,refetchInterval:5e3})}(),C=function(){let e=(0,m.M1)(),t=(0,x.jE)();return(0,g.n)({mutationFn:async t=>{try{return await e.disposeWorktree(t)}catch(t){let e=function(e){if(e instanceof y.Iu&&e.body&&"object"==typeof e.body){let t=e.body;if("ok"in t)return t}return null}(t);if(e)return e;throw t}},onSuccess:e=>{e.ok&&t.invalidateQueries({queryKey:w.AF.worktrees()})}})}(),[S,F]=(0,i.useState)(null),E=null!=(e=null==l?void 0:l.repoRoot)?e:null,q=null!=(t=null==l?void 0:l.worktrees)?t:[],R=null!=(s=null==l?void 0:l.orphanedSessions)?s:[],I=q.map(e=>({view:e,status:e.orphan?"orphan":e.isMain?"main":e.isDetached?"detached":e.session&&e.session.alive?"active":"idle"})).sort((e,t)=>{var s,r,i,a;let n=null!=(s=v[e.status])?s:99,l=null!=(r=v[t.status])?r:99;if(n!==l)return n-l;let o=null!=(i=e.view.branch)?i:"~detached",c=null!=(a=t.view.branch)?a:"~detached";return o.localeCompare(c)}),B=function(e){let t={total:e.length,active:0,orphan:0,idle:0,detached:0,main:0};for(let s of e)t[s.status]+=1;return t}(I),L=Date.now(),P=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=!0===t.force,r=s?"Force-remove this worktree (will discard local changes)?\n\n".concat(e):t.locked?"This worktree is locked. Removing it will fail unless you force.\nProceed with --force?\n\n".concat(e):"Remove this worktree?\n\n".concat(e);if(!window.confirm(r))return;let i=await C.mutateAsync({path:e,force:s||!0===t.locked});F({path:e,result:i})};return(0,r.jsxs)("div",{className:"mx-auto max-w-5xl space-y-4 p-6",children:[(0,r.jsxs)("header",{className:"space-y-1",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("h1",{className:"flex items-center gap-2 text-xl font-semibold tracking-tight",children:[(0,r.jsx)(c,{className:"h-5 w-5"}),"Worktrees"]}),(0,r.jsxs)("button",{type:"button",onClick:()=>M(),disabled:O,"aria-label":"Refresh worktrees",className:"flex items-center gap-1 rounded-md border border-border px-2 py-1 text-[11px] hover:bg-surface-elevated disabled:opacity-50",children:[(0,r.jsx)(u.A,{className:"h-3 w-3 ".concat(O?"animate-spin":"")}),"Refresh"]})]}),E?(0,r.jsx)("p",{className:"text-[11px] font-mono text-muted-foreground",children:E}):(0,r.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["No repository found. Set ",(0,r.jsx)("code",{className:"font-mono",children:"harness.defaultRepo"})," (absolute path) in Settings, or start NEXUS inside a checkout."]})]}),N&&(0,r.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-error",children:[(0,r.jsx)(d.A,{className:"h-3 w-3"}),N instanceof Error?N.message:"Failed to load worktrees"]}),o&&!l&&(0,r.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Querying /v1/worktrees…"}),l&&(0,r.jsx)(A,{summary:B}),S&&(0,r.jsx)("div",{"data-testid":"worktree-dispose-result","data-result-status":S.result.ok?"ok":"error",className:"rounded-md border px-2.5 py-1.5 text-[11px] ".concat(S.result.ok?"border-green-600/40 bg-green-600/5 text-green-700":"border-error/40 bg-error/5 text-error"),children:(0,r.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,r.jsxs)("span",{children:[S.result.ok?"".concat("orphan-session-cleanup"===S.result.action?"Cleared orphan session":"Removed worktree"," — ").concat(S.path):"Dispose failed — ".concat(null!=(n=S.result.error)?n:"unknown error"),S.result.detail&&(0,r.jsxs)("span",{className:"ml-1 font-mono text-[10px] opacity-80",children:["(",S.result.detail,")"]})]}),(0,r.jsx)("button",{type:"button",onClick:()=>F(null),className:"text-[10px] underline opacity-70 hover:opacity-100",children:"dismiss"})]})}),l&&I.length>0&&(0,r.jsx)("section",{"data-testid":"worktree-list",className:"overflow-x-auto rounded-md border border-border",children:(0,r.jsxs)("table",{className:"min-w-full text-[11px]",children:[(0,r.jsx)("thead",{className:"bg-surface-elevated",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",children:"Status"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",children:"Branch"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",children:"Path"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",children:"SHA"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",children:"Owner"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",children:"Entered"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-right font-medium",children:"Actions"})]})}),(0,r.jsx)("tbody",{children:I.map(e=>{var t;let{view:s,status:i}=e,a=j[i];return(0,r.jsxs)("tr",{"data-testid":"worktree-row-".concat(s.path),"data-status":i,className:"border-t border-border",children:[(0,r.jsxs)("td",{className:"px-2 py-1.5",children:[(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-wider ".concat(k[i]),children:[(0,r.jsx)(a,{className:"h-3 w-3"}),b[i]]}),s.isLocked&&(0,r.jsx)("span",{title:"locked",className:"ml-1 inline-flex items-center text-warning",children:(0,r.jsx)(h,{className:"h-3 w-3"})})]}),(0,r.jsx)("td",{className:"px-2 py-1.5 font-mono",children:null!=(t=s.branch)?t:(0,r.jsx)("span",{className:"text-muted-foreground",children:"—"})}),(0,r.jsx)("td",{className:"px-2 py-1.5 font-mono text-[10px] text-muted-foreground",children:s.path}),(0,r.jsx)("td",{className:"px-2 py-1.5 font-mono text-[10px] text-muted-foreground",children:s.sha.slice(0,7)}),(0,r.jsx)("td",{className:"px-2 py-1.5",children:s.session?(0,r.jsxs)("span",{className:"text-[10px] ".concat(s.session.alive?"text-foreground":"text-error"),children:["pid ",s.session.sessionId,s.session.alive?" (alive)":" (dead — orphan)"]}):(0,r.jsx)("span",{className:"text-[10px] text-muted-foreground",children:"—"})}),(0,r.jsx)("td",{className:"px-2 py-1.5 text-[10px] text-muted-foreground",children:s.session?function(e,t){if(void 0===t)return"";let s=Math.floor(Math.max(0,e-t)/1e3);if(s<60)return"".concat(s,"s ago");let r=Math.floor(s/60);if(r<60)return"".concat(r,"m ago");let i=Math.floor(r/60);if(i<24)return"".concat(i,"h ago");let a=Math.floor(i/24);return"".concat(a,"d ago")}(L,s.session.enteredAt):""}),(0,r.jsx)("td",{className:"px-2 py-1.5 text-right",children:s.isMain?(0,r.jsx)("span",{className:"text-[10px] text-muted-foreground",children:"—"}):(0,r.jsxs)("button",{type:"button","data-testid":"dispose-worktree-".concat(s.path),onClick:()=>P(s.path,{locked:s.isLocked}),disabled:C.isPending,className:"inline-flex items-center gap-1 rounded-md border border-border px-1.5 py-0.5 text-[10px] text-error hover:bg-error/10 disabled:opacity-50","aria-label":"Dispose worktree ".concat(s.path),children:[(0,r.jsx)(p.A,{className:"h-3 w-3"}),"Dispose"]})})]},s.path)})})]})}),l&&0===I.length&&(0,r.jsx)("p",{className:"text-[11px] text-muted-foreground","data-testid":"worktree-empty",children:"No worktrees registered."}),l&&R.length>0&&(0,r.jsxs)("section",{"data-testid":"orphaned-sessions",className:"space-y-1",children:[(0,r.jsxs)("h2",{className:"flex items-center gap-1 text-sm font-medium text-warning",children:[(0,r.jsx)(a.A,{className:"h-4 w-4"}),"Orphaned sessions (",R.length,")"]}),(0,r.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["Worktree directory was removed (e.g., via ",(0,r.jsx)("code",{children:"git worktree remove"}),") but the session JSON wasn't cleaned. Boot-time stale-cleanup will reap these the next time NEXUS restarts."]}),(0,r.jsx)("ul",{className:"space-y-1 text-[11px]",children:R.map(e=>(0,r.jsxs)("li",{"data-testid":"orphan-session-".concat(e.sessionId),className:"rounded-md border border-warning/40 bg-warning/5 px-2 py-1.5",children:[(0,r.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("span",{className:"font-mono",children:["pid ",e.sessionId]})," ",(0,r.jsxs)("span",{className:"text-muted-foreground",children:["(",e.alive?"alive (unusual)":"dead",")"]})]}),(0,r.jsxs)("button",{type:"button","data-testid":"cleanup-orphan-".concat(e.sessionId),onClick:()=>P(e.worktreePath),disabled:C.isPending,className:"inline-flex items-center gap-1 rounded-md border border-border px-1.5 py-0.5 text-[10px] text-error hover:bg-error/10 disabled:opacity-50","aria-label":"Clear orphan session ".concat(e.sessionId),children:[(0,r.jsx)(p.A,{className:"h-3 w-3"}),"Cleanup"]})]}),(0,r.jsxs)("div",{className:"font-mono text-[10px] text-muted-foreground",children:["branch ",(0,r.jsx)("strong",{children:e.branch})," \xb7 ",e.worktreePath]})]},e.sessionId))})]})]})}function A(e){let{summary:t}=e,s=[{label:"Total",value:t.total,cls:"text-foreground"},{label:"Active",value:t.active,cls:"text-green-700"},{label:"Orphan",value:t.orphan,cls:"text-error"},{label:"Idle",value:t.idle,cls:"text-muted-foreground"},{label:"Detached",value:t.detached,cls:"text-warning"}];return(0,r.jsx)("div",{"data-testid":"worktree-summary",className:"flex flex-wrap items-baseline gap-3 text-[11px]",children:s.map(e=>(0,r.jsxs)("span",{className:"flex items-baseline gap-1",children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.label}),(0,r.jsx)("span",{className:"font-medium ".concat(e.cls),children:e.value})]},e.label))})}function O(){return(0,r.jsx)(N,{})}},35857:(e,t,s)=>{"use strict";let r;s.d(t,{cY:()=>u,x8:()=>l});let i={debug:0,info:1,warn:2,error:3},a="/v1/debug-logs/batch",n=null;function l(e){n=e}class o{health(){return{pending:this.queue.length,consecutiveFailures:this.consecutiveFailures,lastOkAt:this.lastOkAt,droppedByCap:this.droppedByCap,fallbackBatches:this.fallbackBatches}}push(e){if(!(i[function(e){let t=e.slice(e.lastIndexOf(".")+1).toLowerCase();return/^(error|exception|crash|fail|failed)$/.test(t)?"error":/^(warn|degraded|timeout)$/.test(t)?"warn":/^(boot|ready|start|begin|open|ok|done|resolve|end|stop|close)$/.test(t)?"info":"debug"}(e.category)]<i[this.minLevel])){if(this.queue.push(e),this.queue.length>500){let e=this.queue.length-500;this.droppedByCap+=e,this.queue.splice(0,e)}if(this.queue.length>=100&&!this.inFlight){null!==this.timer&&(clearTimeout(this.timer),this.timer=null),this.flush();return}null===this.timer&&(this.timer=setTimeout(()=>{this.flush()},this.flushMs))}}async flush(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.inFlight||0===this.queue.length)return;let e=this.queue.slice(0,100);this.inFlight=!0;let t=!1,s=JSON.stringify({records:e});try{var r,i;t=await (r=this.fetchFn(s),i=this.postTimeoutMs,new Promise((e,t)=>{let s=setTimeout(()=>t(Error("debug-forward timeout after ".concat(i,"ms"))),i);r.then(t=>{clearTimeout(s),e(t)},e=>{clearTimeout(s),t(e)})}))}catch(e){t=!1}finally{this.inFlight=!1}if(!t){if(this.consecutiveFailures+=1,this.consecutiveFailures>=2&&n)try{await n(JSON.stringify({records:[...e,this.blockedNotice()]}))&&(this.fallbackBatches+=1)}catch(e){}this.wasFailing=!0,this.scheduleRetry();return}let a=this.lastOkAt;this.lastOkAt=Date.now();let l=this.consecutiveFailures;this.consecutiveFailures=0,this.queue.splice(0,e.length),this.wasFailing&&(this.wasFailing=!1,this.queue.push({ts:new Date().toISOString(),category:"pwa.debug-forwarder.recovered",event:"recovered",data:{consecutiveFailures:l,droppedByCap:this.droppedByCap,fallbackBatches:this.fallbackBatches,pending:this.queue.length,previousOkAt:a},source:{platform:"pwa"}})),this.queue.length>0&&null===this.timer&&(this.timer=setTimeout(()=>{this.flush()},this.flushMs))}scheduleRetry(){if(null!==this.timer||0===this.queue.length)return;let e=Math.min(this.flushMs*2**this.consecutiveFailures,3e4);this.timer=setTimeout(()=>{this.flush()},e)}blockedNotice(){return{ts:new Date().toISOString(),category:"pwa.debug-forwarder.http-blocked",event:"http-blocked",data:{consecutiveFailures:this.consecutiveFailures,pending:this.queue.length,droppedByCap:this.droppedByCap,lastOkAt:this.lastOkAt,via:"acp-fallback"},source:{platform:"pwa"}}}beaconFlush(){if(0!==this.queue.length)try{if("undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon){let e=this.queue.slice(0,100),t=new Blob([JSON.stringify({records:e})],{type:"application/json"});navigator.sendBeacon(a,t)&&this.queue.splice(0,e.length)}}catch(e){}}get pending(){return this.queue.length}constructor(e=c,t="debug",s=1e4,r=100){this.fetchFn=e,this.minLevel=t,this.postTimeoutMs=s,this.flushMs=r,this.queue=[],this.timer=null,this.inFlight=!1,this.consecutiveFailures=0,this.lastOkAt=null,this.droppedByCap=0,this.fallbackBatches=0,this.wasFailing=!1}}async function c(e){return(await fetch(a,{method:"POST",headers:{"content-type":"application/json"},body:e,keepalive:!0,..."undefined"!=typeof AbortSignal&&"function"==typeof AbortSignal.timeout?{signal:AbortSignal.timeout(1e4)}:{}})).ok}function u(e,t){if("undefined"==typeof console)return;let s=new Date().toISOString();if(void 0!==t){let r="";try{let e=new WeakSet;r=JSON.stringify(t,(t,s)=>{if("bigint"==typeof s)return"".concat(s.toString(),"n");if("function"==typeof s)return"[fn ".concat(s.name||"anon","]");if(s&&"object"==typeof s){if(e.has(s))return"[circular]";e.add(s)}return s})}catch(e){r="[unserializable: ".concat(String(e),"]")}r&&r.length>800&&(r=r.slice(0,797)+"..."),console.debug("[".concat(s,"] ").concat(e," ").concat(r),t),d(s,e,r)}else console.debug("[".concat(s,"] ").concat(e)),d(s,e,void 0)}function d(e,t,s){let i,a=function(){if(void 0!==r)return r;let e=function(){try{let e="off"!==window.localStorage.getItem("elanous.pwa.debug.forward"),t=window.localStorage.getItem("elanous.pwa.debug.forwardLevel");return{forward:e,level:"info"===t||"warn"===t||"error"===t?t:"debug"}}catch(e){return{forward:!0,level:"debug"}}}();if(!e.forward)return r=null,null;let t=new o(c,e.level,1e4,1500);try{window.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&t.beaconFlush()})}catch(e){}return r=t,t}();if(!a)return;let n=t.slice(t.lastIndexOf(".")+1)||t;if(void 0!==s&&""!==s)try{i=JSON.parse(s)}catch(e){i=s}a.push({ts:e,category:t,event:n,...void 0!==i?{data:i}:{},source:{platform:"pwa"}})}},55844:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(30728).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},60166:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(30728).A)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]])},71350:(e,t,s)=>{"use strict";s.d(t,{Qb:()=>n,SI:()=>o,dJ:()=>l});let r="elanous:auth-required",i=null,a=!1;function n(e){null===i&&(i=e,window.dispatchEvent(new CustomEvent(r,{detail:{path:e}})))}function l(e){let t=window,s=t=>e(t.detail);return t.addEventListener(r,s),null===i||a||e({path:i}),()=>t.removeEventListener(r,s)}function o(){a=!0}},79854:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(30728).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},92953:(e,t,s)=>{Promise.resolve().then(s.bind(s,31645))},93708:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(30728).A)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]])},98430:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(30728).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])}},e=>{e.O(0,[2566,9917,5785,2201,6356,7358],()=>e(e.s=92953)),_N_E=e.O()}]);