thursday-agent 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +0 -1
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/routes-manifest.json +0 -6
  6. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  7. package/.next/server/app/_global-error.html +1 -1
  8. package/.next/server/app/_global-error.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  13. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/_not-found.html +1 -1
  15. package/.next/server/app/_not-found.rsc +2 -2
  16. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  17. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  18. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  19. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  20. package/.next/server/app/api/bot/keep-working/route.js.nft.json +1 -1
  21. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
  22. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
  23. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  24. package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
  25. package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
  26. package/.next/server/app/api/config/route.js.nft.json +1 -1
  27. package/.next/server/app/api/events/route.js.nft.json +1 -1
  28. package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
  29. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  30. package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
  31. package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
  32. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  33. package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
  34. package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
  35. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  36. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  37. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  38. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
  39. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  40. package/.next/server/app/api/reach/route.js +13 -13
  41. package/.next/server/app/api/reach/route.js.nft.json +1 -1
  42. package/.next/server/app/api/routine/route.js.nft.json +1 -1
  43. package/.next/server/app/api/signins/route.js +1 -1
  44. package/.next/server/app/api/signins/route.js.nft.json +1 -1
  45. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  46. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  47. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  48. package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
  49. package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
  50. package/.next/server/app/api/thursday/tool-call/route.js +14 -15
  51. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  52. package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
  53. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  54. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
  55. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  56. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  57. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  58. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  59. package/.next/server/app/page/server-reference-manifest.json +56 -56
  60. package/.next/server/app/page.js +4 -4
  61. package/.next/server/app/page.js.nft.json +1 -1
  62. package/.next/server/app/page_client-reference-manifest.js +1 -1
  63. package/.next/server/app-paths-manifest.json +0 -1
  64. package/.next/server/chunks/[root-of-the-server]__014ydvq._.js +2 -2
  65. package/.next/server/chunks/[root-of-the-server]__0209ah4._.js +7 -5
  66. package/.next/server/chunks/[root-of-the-server]__04r4h-2._.js +4 -2
  67. package/.next/server/chunks/[root-of-the-server]__0542v_d._.js +3 -0
  68. package/.next/server/chunks/[root-of-the-server]__0gewdg9._.js +2 -2
  69. package/.next/server/chunks/[root-of-the-server]__0mrk2it._.js +1 -1
  70. package/.next/server/chunks/[root-of-the-server]__1-swlkw._.js +2 -2
  71. package/.next/server/chunks/[root-of-the-server]__12iddfq._.js +1 -1
  72. package/.next/server/chunks/[root-of-the-server]__1ai5lme._.js +3 -3
  73. package/.next/server/chunks/[root-of-the-server]__1cjxw0-._.js +2 -2
  74. package/.next/server/chunks/{[root-of-the-server]__1fy2g82._.js → [root-of-the-server]__1k3j52n._.js} +1 -1
  75. package/.next/server/chunks/[root-of-the-server]__1kyjt5m._.js +3 -3
  76. package/.next/server/chunks/[root-of-the-server]__1ygplx1._.js +1 -1
  77. package/.next/server/chunks/_05v8k21._.js +3 -1
  78. package/.next/server/chunks/_0awtznl._.js +1 -1
  79. package/.next/server/chunks/_0na2fj1._.js +1 -1
  80. package/.next/server/chunks/_0x-ej3f._.js +17 -17
  81. package/.next/server/chunks/_12-amdu._.js +2 -2
  82. package/.next/server/chunks/_15740dw._.js +60 -0
  83. package/.next/server/chunks/_1dc_d1q._.js +3 -3
  84. package/.next/server/chunks/_1i350l5._.js +3 -1
  85. package/.next/server/chunks/_1jc5g4p._.js +2 -2
  86. package/.next/server/chunks/_1jn-aep._.js +4 -4
  87. package/.next/server/chunks/_1m88lkh._.js +11 -11
  88. package/.next/server/chunks/_1ogqovh._.js +4 -4
  89. package/.next/server/chunks/_1uuucy-._.js +1 -1
  90. package/.next/server/chunks/_1zxp-p6._.js +1 -1
  91. package/.next/server/chunks/features_0rfvely._.js +5 -3
  92. package/.next/server/chunks/ssr/{[root-of-the-server]__1se25x0._.js → [root-of-the-server]__0hpp3nw._.js} +29 -13
  93. package/.next/server/chunks/ssr/[root-of-the-server]__0m7u9j-._.js +3 -0
  94. package/.next/server/chunks/ssr/[root-of-the-server]__0tzekbl._.js +24 -60
  95. package/.next/server/chunks/ssr/[root-of-the-server]__1cz2rz5._.js +3 -0
  96. package/.next/server/chunks/ssr/{[root-of-the-server]__0tvavy9._.js → [root-of-the-server]__1iwyp1e._.js} +1 -1
  97. package/.next/server/chunks/ssr/[root-of-the-server]__1w9hqq8._.js +1 -1
  98. package/.next/server/chunks/ssr/_097-ljd._.js +1 -1
  99. package/.next/server/chunks/ssr/{_1tmu8z-._.js → _0btzccu._.js} +2 -2
  100. package/.next/server/chunks/ssr/_0fqhhwi._.js +1 -1
  101. package/.next/server/chunks/ssr/_0hjzb5o._.js +3 -0
  102. package/.next/server/chunks/ssr/_0ld9_qq._.js +1 -1
  103. package/.next/server/chunks/ssr/{_0urj3mc._.js → _0ouzu9f._.js} +2 -2
  104. package/.next/server/chunks/ssr/{_1-zyvdb._.js → _0u7ko71._.js} +2 -2
  105. package/.next/server/chunks/ssr/{_0ltz2q5._.js → _0wd_o8-._.js} +2 -2
  106. package/.next/server/chunks/ssr/_0ya0cb0._.js +3 -0
  107. package/.next/server/chunks/ssr/_10yyqtk._.js +67 -0
  108. package/.next/server/chunks/ssr/{_1uy0xom._.js → _12eyown._.js} +3 -3
  109. package/.next/server/chunks/ssr/_12mijol._.js +11 -11
  110. package/.next/server/chunks/ssr/_132qkfz._.js +1 -1
  111. package/.next/server/chunks/ssr/_184327j._.js +1 -1
  112. package/.next/server/chunks/ssr/{_1z74dmq._.js → _19ps4p3._.js} +7 -7
  113. package/.next/server/chunks/ssr/{_1flbs77._.js → _1bhy4yg._.js} +2 -2
  114. package/.next/server/chunks/ssr/_1d423aj._.js +7 -5
  115. package/.next/server/chunks/ssr/{_1a-nuxx._.js → _1kd843u._.js} +2 -2
  116. package/.next/server/chunks/ssr/{_0ital-2._.js → _1kq2ye_._.js} +2 -2
  117. package/.next/server/chunks/ssr/_1mqn9mc._.js +1 -1
  118. package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
  119. package/.next/server/chunks/ssr/_1p8xorg._.js +3 -0
  120. package/.next/server/chunks/ssr/{_1x-kojb._.js → _1q683w8._.js} +3 -3
  121. package/.next/server/chunks/ssr/_1tawxu2._.js +3 -0
  122. package/.next/server/chunks/ssr/{_0scf7xy._.js → _1w2oba6._.js} +2 -2
  123. package/.next/server/chunks/ssr/_1xoch6f._.js +1 -1
  124. package/.next/server/chunks/ssr/{_0kjj5ts._.js → _1ybo1hd._.js} +3 -3
  125. package/.next/server/chunks/ssr/features_bot_0s11m4r._.js +3 -0
  126. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  127. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
  128. package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
  129. package/.next/server/chunks/ssr/features_workspace_00jz2hu._.js +1 -1
  130. package/.next/server/chunks/ssr/{node_modules_1af3w91._.js → node_modules_00pocul._.js} +1 -1
  131. package/.next/server/chunks/ssr/{node_modules_0th357h._.js → node_modules_02zt4az._.js} +1 -1
  132. package/.next/server/chunks/ssr/{node_modules_0jljel9._.js → node_modules_05ojmcl._.js} +1 -1
  133. package/.next/server/chunks/ssr/{node_modules_0wnlddw._.js → node_modules_06i6bli._.js} +1 -1
  134. package/.next/server/chunks/ssr/{node_modules_06bb4q8._.js → node_modules_09dj429._.js} +1 -1
  135. package/.next/server/chunks/ssr/{node_modules_068ws5v._.js → node_modules_0auzgvx._.js} +1 -1
  136. package/.next/server/chunks/ssr/{node_modules_1ogczzz._.js → node_modules_0evjwh1._.js} +1 -1
  137. package/.next/server/chunks/ssr/{node_modules_13kwejm._.js → node_modules_0gmdur8._.js} +1 -1
  138. package/.next/server/chunks/ssr/{node_modules_1s-gb-1._.js → node_modules_0j3te-1._.js} +1 -1
  139. package/.next/server/chunks/ssr/{node_modules_1bucjlk._.js → node_modules_0rbaymq._.js} +1 -1
  140. package/.next/server/chunks/ssr/{node_modules_1wbkzl9._.js → node_modules_0tf8_1e._.js} +1 -1
  141. package/.next/server/chunks/ssr/{node_modules_12et8d5._.js → node_modules_0yqy-0b._.js} +1 -1
  142. package/.next/server/chunks/ssr/{node_modules_1lkix61._.js → node_modules_1-53ebx._.js} +1 -1
  143. package/.next/server/chunks/ssr/{node_modules_03d0rfz._.js → node_modules_1-y9aho._.js} +1 -1
  144. package/.next/server/chunks/ssr/{node_modules_0x630an._.js → node_modules_11bltzp._.js} +1 -1
  145. package/.next/server/chunks/ssr/{node_modules_0uyh_vb._.js → node_modules_18jn2qo._.js} +1 -1
  146. package/.next/server/chunks/ssr/{node_modules_0dzm4um._.js → node_modules_1_te3bu._.js} +1 -1
  147. package/.next/server/chunks/ssr/{node_modules_07rs_p2._.js → node_modules_1c0pg3k._.js} +1 -1
  148. package/.next/server/chunks/ssr/{node_modules_0sgy-dc._.js → node_modules_1en2jx5._.js} +1 -1
  149. package/.next/server/chunks/ssr/{node_modules_0ubdtk-._.js → node_modules_1p-c8cr._.js} +1 -1
  150. package/.next/server/chunks/ssr/{node_modules_1z1lrbk._.js → node_modules_1qe-oxg._.js} +1 -1
  151. package/.next/server/chunks/ssr/{node_modules_04_sbbc._.js → node_modules_1rjt833._.js} +1 -1
  152. package/.next/server/chunks/ssr/{node_modules_0yvz9e0._.js → node_modules_1tzw5sn._.js} +1 -1
  153. package/.next/server/chunks/ssr/{node_modules_1uwg-gz._.js → node_modules_1x6uwvn._.js} +1 -1
  154. package/.next/server/chunks/ssr/{node_modules_0t_ez6-._.js → node_modules_1zqddke._.js} +1 -1
  155. package/.next/server/chunks/ssr/{node_modules_05ybmta._.js → node_modules_211zgim._.js} +1 -1
  156. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0r443fh._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0y51bqj._.js} +1 -1
  157. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_10wnlbk._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1sc114e._.js} +1 -1
  158. package/.next/server/middleware-build-manifest.js +3 -3
  159. package/.next/server/pages/404.html +1 -1
  160. package/.next/server/pages/500.html +1 -1
  161. package/.next/server/server-reference-manifest.js +1 -1
  162. package/.next/server/server-reference-manifest.json +57 -57
  163. package/.next/static/chunks/{13ixzheqw7o-w.js → 03-724sj0nk_z.js} +2 -2
  164. package/.next/static/chunks/03bhu4mk8en2q.js +1 -0
  165. package/.next/static/chunks/{3h2e-xv1zxh_f.js → 04imzjhvzw65d.js} +2 -2
  166. package/.next/static/chunks/{27tvv1i-smrck.js → 0gljzv9fz1g7d.js} +1 -1
  167. package/.next/static/chunks/{37j27b3e1gt7r.js → 0h0lythv1ql93.js} +1 -1
  168. package/.next/static/chunks/{2o4dndk0d68do.js → 0hzbj7f48cmx0.js} +1 -1
  169. package/.next/static/chunks/0lwunwbl7u7pt.js +1 -0
  170. package/.next/static/chunks/{0u9ae9k_2g7k3.js → 0r6nwxg4dv83t.js} +1 -1
  171. package/.next/static/chunks/0rn9nbg6aif9f.js +17 -0
  172. package/.next/static/chunks/{3bbzsitgiltnt.js → 0x_w4shtvrrfg.js} +1 -1
  173. package/.next/static/chunks/{2sdwbfs1x5skp.js → 0ympuji_ufypd.js} +1 -1
  174. package/.next/static/chunks/{3t9huugh-5_ps.js → 0zmrz4zfzm4dt.js} +1 -1
  175. package/.next/static/chunks/{0qmd8n52hp-6v.js → 11tlxkr7a_rpc.js} +1 -1
  176. package/.next/static/chunks/{2c64drdevdla3.js → 12scesro428m7.js} +2 -2
  177. package/.next/static/chunks/16s2fx3890_jd.js +65 -0
  178. package/.next/static/chunks/{0oyz95sujd2c7.js → 1qzfgplyo18tc.js} +1 -1
  179. package/.next/static/chunks/{04e-e--5lk26x.js → 1r4zajz14jp9-.js} +1 -1
  180. package/.next/static/chunks/1s6m4cmbn7htf.js +1 -0
  181. package/.next/static/chunks/1wl9t1-3i-q8p.css +1 -0
  182. package/.next/static/chunks/2-asot3p1j3yg.js +1 -0
  183. package/.next/static/chunks/{0u3ktztrzu1fa.js → 2-jn4xscbm-i2.js} +1 -1
  184. package/.next/static/chunks/22h9gvclqtx_2.js +1 -0
  185. package/.next/static/chunks/{337g9g_ux2gj-.js → 26-eblxwnykck.js} +1 -1
  186. package/.next/static/chunks/{43q9cgbuw8krx.js → 2kzwhbuobpkw3.js} +2 -2
  187. package/.next/static/chunks/2m6jd3586ijb-.js +1 -0
  188. package/.next/static/chunks/{0_awn8tucznxc.js → 304q9p54tcgm1.js} +1 -1
  189. package/.next/static/chunks/{1u5i-jti87jbo.js → 35wdx3wt7cg4a.js} +1 -1
  190. package/.next/static/chunks/37unh9460im7v.js +18 -0
  191. package/.next/static/chunks/{01xjer0i_e5z5.js → 39gj5vxz1zpm_.js} +1 -1
  192. package/.next/static/chunks/{427qsc6kahxyo.js → 39vrqy1r_00jc.js} +1 -1
  193. package/.next/static/chunks/{245hb85nsy6j4.js → 3dipmu0mptqum.js} +1 -1
  194. package/.next/static/chunks/3gki-squw28yu.js +1 -0
  195. package/.next/static/chunks/{3obf9n3cxj99k.js → 3jvldk2wvwbge.js} +1 -1
  196. package/.next/static/chunks/{38301ji-85i30.js → 3nnzdl_te20hv.js} +1 -1
  197. package/.next/static/chunks/{2m267diam_vib.js → 3tz4dr0_8pq1-.js} +1 -1
  198. package/.next/static/chunks/{2gocl3dq0_h1s.js → 3x6pggb-2kyrk.js} +1 -1
  199. package/.next/static/chunks/{025bmrgeukcb2.js → 4440mws9jz3mt.js} +1 -1
  200. package/README.md +4 -0
  201. package/app/api/thursday/tool-call/route.ts +1 -15
  202. package/components/ui/radio-group.tsx +2 -2
  203. package/docs/images/demo-still.jpg +0 -0
  204. package/docs/live-calls.md +19 -11
  205. package/features/ai/prompts/live.prompt.ts +51 -26
  206. package/features/ai/prompts/prompt-helper.ts +1 -9
  207. package/features/ai/prompts/thursday.prompt.ts +8 -2
  208. package/features/bot/bot.run.ts +9 -3
  209. package/features/bot/bot.seed.ts +35 -91
  210. package/features/bot/components/bot-room.tsx +0 -6
  211. package/features/bot/components/bot-setting.tsx +4 -4
  212. package/features/bot/components/room-pill.tsx +4 -2
  213. package/features/bot/seed-bots.ts +2 -2
  214. package/features/intro/components/intro.tsx +2 -3
  215. package/features/reach/reach.ts +2 -2
  216. package/features/routine/components/routine-setting.tsx +1 -1
  217. package/features/signins/signins.query.ts +66 -1
  218. package/features/thursday/components/side-captions.tsx +31 -8
  219. package/features/thursday/components/thursday-setting.tsx +5 -5
  220. package/features/thursday/components/thursday.tsx +97 -39
  221. package/features/thursday/components/write-line.tsx +28 -17
  222. package/features/thursday/thursday.action.ts +4 -20
  223. package/features/thursday/thursday.schema.ts +0 -9
  224. package/features/thursday/thursday.store.ts +11 -15
  225. package/features/thursday/thursday.text.ts +10 -8
  226. package/features/thursday/tool-line.ts +17 -6
  227. package/features/thursday/use-call-ring.ts +1 -5
  228. package/features/thursday/use-text-call.ts +37 -21
  229. package/features/thursday/use-thursday.ts +14 -44
  230. package/features/workspace/workspace.ts +4 -2
  231. package/guide/bots.md +13 -3
  232. package/guide/calls.md +7 -5
  233. package/knip.json +1 -0
  234. package/lib/live/live.session.ts +0 -39
  235. package/package.json +1 -1
  236. package/scripts/live-session.test.mts +19 -26
  237. package/seed-skills/analyst/README.md +18 -0
  238. package/seed-skills/analyst/data-report/SKILL.md +60 -0
  239. package/seed-skills/analyst/data-report/references/brief.md +31 -0
  240. package/seed-skills/analyst/data-report/references/company.md +41 -0
  241. package/seed-skills/analyst/data-report/references/comparison.md +42 -0
  242. package/seed-skills/analyst/data-report/references/decision.md +28 -0
  243. package/seed-skills/analyst/data-report/references/market-size.md +49 -0
  244. package/seed-skills/analyst/data-report/references/price-check.md +33 -0
  245. package/seed-skills/analyst/data-report/references/sources.md +51 -0
  246. package/seed-skills/analyst/data-report/references/trend.md +39 -0
  247. package/seed-skills/analyst/data-report/scripts/fetch.mjs +521 -0
  248. package/seed-skills/insta/instagram/SKILL.md +36 -0
  249. package/seed-skills/insta/instagram/references/dm.md +49 -0
  250. package/seed-skills/insta/instagram/references/post.md +74 -0
  251. package/seed-skills/insta/instagram/scripts/compose.mjs +333 -0
  252. package/seed-skills/insta/instagram/scripts/inbox.mjs +163 -0
  253. package/seed-skills/insta/instagram/scripts/lib.mjs +33 -0
  254. package/seed-skills/insta/instagram/scripts/media.mjs +104 -0
  255. package/seed-skills/insta/instagram/scripts/profile.mjs +143 -0
  256. package/seed-skills/insta/instagram/scripts/read.mjs +244 -0
  257. package/seed-skills/insta/instagram/scripts/search.mjs +137 -0
  258. package/seed-skills/insta/instagram/scripts/selectors.mjs +56 -0
  259. package/seed-skills/insta/instagram/scripts/sheet.mjs +43 -0
  260. package/seed-skills/insta/instagram/templates/carousel.html +62 -0
  261. package/seed-skills/marketer/README.md +6 -4
  262. package/seed-skills/marketer/copywriting/SKILL.md +1 -1
  263. package/seed-skills/marketer/emails/SKILL.md +1 -1
  264. package/seed-skills/marketer/launch/SKILL.md +1 -1
  265. package/seed-skills/marketer/product-marketing/SKILL.md +5 -5
  266. package/seed-skills/marketer/seo-audit/SKILL.md +1 -1
  267. package/seed-skills/marketer/social/SKILL.md +1 -1
  268. package/seed-skills/tutor/picture-book/SKILL.md +16 -0
  269. package/seed-skills/tutor/picture-book/book/book.css +181 -0
  270. package/seed-skills/tutor/picture-book/book/book.html +33 -0
  271. package/seed-skills/tutor/picture-book/book/book.js +60 -0
  272. package/seed-skills/tutor/picture-book/references/picture-book.md +104 -0
  273. package/seed-skills/tutor/picture-book/scripts/book-video.mjs +177 -0
  274. package/seed-skills/tutor/picture-book/scripts/book.mjs +98 -0
  275. package/skills/browser/SKILL.md +13 -4
  276. package/skills/browser/references/scripts.md +55 -0
  277. package/skills/browser/scripts/image-size.mjs +30 -0
  278. package/skills/browser/scripts/render.mjs +126 -0
  279. package/skills/browser/scripts/session.mjs +105 -0
  280. package/skills/browser/scripts/sheet.mjs +97 -0
  281. package/skills/browser/scripts/webimage.mjs +105 -0
  282. package/skills/interactive-page/SKILL.md +4 -3
  283. package/skills/interactive-page/scripts/chart.mjs +679 -0
  284. package/skills/interactive-page/scripts/page.mjs +1 -0
  285. package/.next/server/app/api/probe/route/app-paths-manifest.json +0 -3
  286. package/.next/server/app/api/probe/route/build-manifest.json +0 -12
  287. package/.next/server/app/api/probe/route/server-reference-manifest.json +0 -4
  288. package/.next/server/app/api/probe/route.js +0 -10
  289. package/.next/server/app/api/probe/route.js.map +0 -5
  290. package/.next/server/app/api/probe/route.js.nft.json +0 -1
  291. package/.next/server/app/api/probe/route_client-reference-manifest.js +0 -3
  292. package/.next/server/chunks/[root-of-the-server]__012s2o8._.js +0 -3
  293. package/.next/server/chunks/[root-of-the-server]__0z0hc1f._.js +0 -4
  294. package/.next/server/chunks/[root-of-the-server]__1v7-zke._.js +0 -5
  295. package/.next/server/chunks/_0whlpyi._.js +0 -4
  296. package/.next/server/chunks/_next-internal_server_app_api_probe_route_actions_0cqd30j.js +0 -3
  297. package/.next/server/chunks/ssr/[root-of-the-server]__0oo-wlv._.js +0 -103
  298. package/.next/server/chunks/ssr/[root-of-the-server]__0zuns7e._.js +0 -3
  299. package/.next/server/chunks/ssr/_070nv1_._.js +0 -3
  300. package/.next/server/chunks/ssr/_0dshsh4._.js +0 -3
  301. package/.next/server/chunks/ssr/_0l_mcfz._.js +0 -3
  302. package/.next/server/chunks/ssr/_0u5xv6g._.js +0 -3
  303. package/.next/server/chunks/ssr/_157yfrk._.js +0 -3
  304. package/.next/server/chunks/ssr/features_bot_1nr94ks._.js +0 -3
  305. package/.next/static/chunks/06nt9tatr-dug.js +0 -1
  306. package/.next/static/chunks/0ge-hx0ed83a1.js +0 -1
  307. package/.next/static/chunks/0pda_vf-abwvx.js +0 -1
  308. package/.next/static/chunks/0rowp9rx3qbxu.js +0 -18
  309. package/.next/static/chunks/1grkt5gr8pbg1.js +0 -17
  310. package/.next/static/chunks/1yugpvvi8qrbu.js +0 -101
  311. package/.next/static/chunks/27lkanxvtdn09.js +0 -1
  312. package/.next/static/chunks/3fec-aeteddr-.js +0 -1
  313. package/.next/static/chunks/3go3hwp1z2_h2.css +0 -1
  314. package/.next/static/chunks/3h2bun3hcggg8.js +0 -1
  315. package/.next/static/chunks/3j1y335o95mj7.js +0 -1
  316. package/lib/probe.server.ts +0 -17
  317. package/lib/probe.ts +0 -55
  318. /package/.next/static/{u8kJqShUAa49vY7BxAWsw → En1vUPazxcYjPjnnahcN5}/_buildManifest.js +0 -0
  319. /package/.next/static/{u8kJqShUAa49vY7BxAWsw → En1vUPazxcYjPjnnahcN5}/_clientMiddlewareManifest.js +0 -0
  320. /package/.next/static/{u8kJqShUAa49vY7BxAWsw → En1vUPazxcYjPjnnahcN5}/_ssgManifest.js +0 -0
@@ -0,0 +1,18 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,421429,e=>{"use strict";var t=e.i(843476),n=e.i(647163);e.s(["Segmented",0,function({options:e,value:r,onChange:a,className:i,...l}){return(0,t.jsx)("div",{role:"radiogroup",className:(0,n.cn)("flex w-fit gap-0.5 rounded-full bg-muted p-0.75",i),...l,children:e.map(e=>{let i=e.value===r;return(0,t.jsx)("button",{type:"button",role:"radio","aria-checked":i,title:e.title,onClick:()=>a(e.value),className:(0,n.cn)("flex h-7 items-center justify-center gap-1.5 rounded-full px-3 text-[12.5px] whitespace-nowrap transition-colors outline-none focus-visible:ring-3 focus-visible:ring-ring/50",i?"bg-brand font-medium text-brand-foreground":"text-muted-foreground hover:text-foreground"),children:e.label},e.value)})})}])},968978,7227,e=>{"use strict";var t=e.i(843476);function n({className:e}){return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",className:e,width:"24",children:[(0,t.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),(0,t.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),(0,t.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),(0,t.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"}),(0,t.jsx)("path",{d:"M1 1h22v22H1z",fill:"none"})]})}function r({className:e}){return(0,t.jsxs)("svg",{"aria-hidden":"true",className:e,"data-view-component":"true",viewBox:"0 0 24 24",role:"img",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("title",{children:"OpenAI icon"}),(0,t.jsx)("path",{fill:"currentColor",d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})]})}function a({className:e}){return(0,t.jsxs)("svg",{"aria-hidden":"true",className:e,"data-view-component":"true",viewBox:"0 0 35 33",children:[(0,t.jsx)("path",{d:"M13.2371 21.0407L24.3186 12.8506C24.8619 12.4491 25.6384 12.6057 25.8973 13.2294C27.2597 16.5185 26.651 20.4712 23.9403 23.1851C21.2297 25.8989 17.4581 26.4941 14.0108 25.1386L10.2449 26.8843C15.6463 30.5806 22.2053 29.6665 26.304 25.5601C29.5551 22.3051 30.562 17.8683 29.6205 13.8673L29.629 13.8758C28.2637 7.99809 29.9647 5.64871 33.449 0.844576C33.5314 0.730667 33.6139 0.616757 33.6964 0.5L29.1113 5.09055V5.07631L13.2343 21.0436",fill:"currentColor"}),(0,t.jsx)("path",{d:"M10.9503 23.0313C7.07343 19.3235 7.74185 13.5853 11.0498 10.2763C13.4959 7.82722 17.5036 6.82767 21.0021 8.2971L24.7595 6.55998C24.0826 6.07017 23.215 5.54334 22.2195 5.17313C17.7198 3.31926 12.3326 4.24192 8.67479 7.90126C5.15635 11.4239 4.0499 16.8403 5.94992 21.4622C7.36924 24.9165 5.04257 27.3598 2.69884 29.826C1.86829 30.7002 1.0349 31.5745 0.36364 32.5L10.9474 23.0341",fill:"currentColor"})]})}function i({className:e}){return(0,t.jsxs)("svg",{overflow:"visible",width:"100%",height:"100%",viewBox:"0 0 100 101",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",role:"presentation",children:[(0,t.jsx)("path",{d:"M96.0000 40.0000 L99.5002 42.0000 L99.5002 43.5000 L98.5000 47.0000 L56.0000 57.0000 L52.0040 47.0708 L96.0000 40.0000 M96.0000 40.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(330deg) scaleY(1.13102) rotate(-330deg)"}}),(0,t.jsx)("path",{d:"M80.1032 10.5903 L84.9968 11.6171 L86.2958 13.2179 L87.5346 17.0540 L87.0213 19.5007 L58.5000 58.5000 L49.0000 49.0000 L75.3008 14.4873 L80.1032 10.5903 M80.1032 10.5903 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(300deg) scaleY(1.04936) rotate(-300deg)"}}),(0,t.jsx)("path",{d:"M55.5002 4.5000 L58.5005 2.5000 L61.0002 3.5000 L63.5002 7.0000 L56.6511 48.1620 L52.0005 45.0000 L50.0005 39.5000 L53.5003 8.5000 L55.5002 4.5000 M55.5002 4.5000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(270deg) scaleY(1.08769) rotate(-270deg)"}}),(0,t.jsx)("path",{d:"M23.4253 5.1588 L26.5075 1.2217 L28.5175 0.7632 L32.5063 1.3458 L34.4748 2.8868 L48.8202 34.6902 L54.0089 49.8008 L47.9378 53.1760 L24.8009 11.1886 L23.4253 5.1588 M23.4253 5.1588 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(240deg) scaleY(0.94) rotate(-240deg)"}}),(0,t.jsx)("path",{d:"M8.4990 27.0019 L7.4999 23.0001 L10.5003 19.5001 L14.0003 20.0001 L15.0003 20.0001 L36.0000 35.5000 L42.5000 40.5000 L51.5000 47.5000 L46.5000 56.0000 L42.0002 52.5000 L39.0001 49.5000 L10.0000 29.0001 L8.4990 27.0019 M8.4990 27.0019 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(210deg) scaleY(0.925) rotate(-210deg)"}}),(0,t.jsx)("path",{d:"M2.5003 53.0000 L0.2370 50.5000 L0.2373 48.2759 L2.5003 47.5000 L28.0000 49.0000 L53.0000 51.0000 L52.1885 55.9782 L4.5000 53.5000 L2.5003 53.0000 M2.5003 53.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(180deg) scaleY(0.997) rotate(-180deg)"}}),(0,t.jsx)("path",{d:"M17.5002 79.0264 L12.5005 79.0264 L10.5124 76.7369 L10.5124 74.0000 L19.0005 68.0000 L53.5082 46.0337 L57.0005 52.0000 L17.5002 79.0264 M17.5002 79.0264 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(150deg) scaleY(1.045) rotate(-150deg)"}}),(0,t.jsx)("path",{d:"M27.0004 92.9999 L25.0003 93.4999 L22.0003 91.9999 L22.5004 89.4999 L52.0003 50.5000 L56.0004 55.9999 L34.0003 85.0000 L27.0004 92.9999 M27.0004 92.9999 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(120deg) scaleY(1.03) rotate(-120deg)"}}),(0,t.jsx)("path",{d:"M51.9998 98.0000 L50.5002 100.0000 L47.5002 101.0000 L45.0001 99.0000 L43.5000 96.0000 L51.0003 55.4999 L55.5001 55.9999 L51.9998 98.0000 M51.9998 98.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(90deg) scaleY(1.06) rotate(-90deg)"}}),(0,t.jsx)("path",{d:"M77.5007 86.9997 L77.5007 90.9997 L77.0006 92.4997 L75.0004 93.4997 L71.5006 93.0339 L47.4669 57.2642 L56.9998 50.0002 L64.9994 64.5004 L65.7507 69.7497 L77.5007 86.9997 M77.5007 86.9997 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(60deg) scaleY(1.00898) rotate(-60deg)"}}),(0,t.jsx)("path",{d:"M89.0008 80.9991 L89.5008 83.4991 L88.0008 85.4991 L86.5007 84.9991 L78.0007 78.9991 L65.0007 67.4991 L55.0007 60.4991 L58.0000 51.0000 L62.9999 54.0001 L66.0007 59.4991 L89.0008 80.9991 M89.0008 80.9991 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(30deg) scaleY(1.13564) rotate(-30deg)"}}),(0,t.jsx)("path",{d:"M82.5003 55.5000 L95.0003 56.5000 L98.0003 58.5000 L100.0000 61.5000 L100.0000 63.6587 L94.5003 66.0000 L66.5005 59.0000 L55.0003 58.5000 L58.0000 48.0000 L66.0005 54.0000 L82.5003 55.5000 M82.5003 55.5000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(0deg) scaleY(1.27731) rotate(0deg)"}})]})}function l({className:e}){return(0,t.jsx)("svg",{viewBox:"0 0 115 100",height:"18",width:"21",className:e,"data-slot":"geist-logo-svg",children:(0,t.jsx)("g",{children:(0,t.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M57.5 0 115 100H0z",clipRule:"evenodd"})})})}e.s(["ClaudeIcon",0,i,"GoogleIcon",0,n,"GrokIcon",0,a,"OpenAIIcon",0,r,"VercelIcon",0,l],7227);let s={mistral:[{d:"M3.428 3.4h3.429v3.428H3.428V3.4zm13.714 0h3.43v3.428h-3.43V3.4z",fill:"gold"},{d:"M3.428 6.828h6.857v3.429H3.429V6.828zm10.286 0h6.857v3.429h-6.857V6.828z",fill:"#FFAF00"},{d:"M3.428 10.258h17.144v3.428H3.428v-3.428z",fill:"#FF8205"},{d:"M3.428 13.686h3.429v3.428H3.428v-3.428zm6.858 0h3.429v3.428h-3.429v-3.428zm6.856 0h3.43v3.428h-3.43v-3.428z",fill:"#FA500F"},{d:"M0 17.114h10.286v3.429H0v-3.429zm13.714 0H24v3.429H13.714v-3.429z",fill:"#E10500"}],deepseek:[{d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z",fill:"#4D6BFE"}],groq:[{d:"M12.036 2c-3.853-.035-7 3-7.036 6.781-.035 3.782 3.055 6.872 6.908 6.907h2.42v-2.566h-2.292c-2.407.028-4.38-1.866-4.408-4.23-.029-2.362 1.901-4.298 4.308-4.326h.1c2.407 0 4.358 1.915 4.365 4.278v6.305c0 2.342-1.944 4.25-4.323 4.279a4.375 4.375 0 01-3.033-1.252l-1.851 1.818A7 7 0 0012.029 22h.092c3.803-.056 6.858-3.083 6.879-6.816v-6.5C18.907 4.963 15.817 2 12.036 2z"}],cerebras:[{d:"M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z",fill:"#F15A29"},{d:"M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z"}],togetherai:[{d:"M23.197 4.503A6 6 0 0015 2.307a5.973 5.973 0 00-2.995 4.933l5.996.008v.515h-5.996c.039.937.298 1.87.8 2.74a6 6 0 1010.39-6z",fill:"#EF2CC1"},{d:"M.805 4.5A6 6 0 003 12.697a5.972 5.972 0 005.77.127L5.779 7.627l.446-.257 2.997 5.192A6 6 0 10.804 4.5z",fill:"#CAAEF5"},{d:"M12 23.894a6 6 0 005.999-6c0-2.13-1.1-3.996-2.775-5.06l-3.005 5.189-.444-.258 2.997-5.192A6 6 0 1012 23.894z",fill:"#FC4C02"}],fireworks:[{d:"M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z",fill:"#5019C5"}],deepinfra:[{d:"M3.294 7.821A2.297 2.297 0 011 5.527a2.297 2.297 0 012.294-2.295A2.297 2.297 0 015.59 5.527 2.297 2.297 0 013.294 7.82zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM3.294 14.293A2.297 2.297 0 011 11.998a2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.295 2.295zm0-3.688a1.395 1.395 0 000 2.788 1.395 1.395 0 100-2.788zM3.294 20.761A2.297 2.297 0 011 18.467a2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM20.738 7.821a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM20.738 14.293a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688c-.769 0-1.395.625-1.395 1.393a1.396 1.396 0 002.79 0c0-.77-.626-1.393-1.395-1.393zM20.738 20.761a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 11.057a2.297 2.297 0 01-2.294-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395zM12.017 4.589a2.297 2.297 0 01-2.295-2.295A2.297 2.297 0 0112.017 0a2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.017 17.529a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.295-2.294 2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 24a2.297 2.297 0 01-2.294-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294A2.297 2.297 0 0112.016 24zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395z",fill:"#2A3275"},{d:"M8.363 8.222a.742.742 0 01-.277-.053l-1.494-.596a.75.75 0 11.557-1.392l1.493.595a.75.75 0 01-.278 1.446h-.001zM8.363 14.566a.743.743 0 01-.277-.053l-1.494-.595a.75.75 0 11.557-1.393l1.493.596a.75.75 0 01-.278 1.445h-.001zM17.124 11.397a.741.741 0 01-.277-.054l-1.493-.595a.75.75 0 11.555-1.392l1.493.595a.75.75 0 01-.278 1.446zM17.124 5.05a.744.744 0 01-.277-.054L15.354 4.4a.75.75 0 01.555-1.392l1.493.596a.75.75 0 01-.278 1.445zM17.124 17.739a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 11.556-1.392l1.493.596a.75.75 0 01-.278 1.445zM6.91 17.966a.75.75 0 01-.279-1.445l1.494-.595a.749.749 0 11.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 11.66a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 5.033a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.596a.744.744 0 01-.277.053H6.91zM8.363 21.364a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 01.555-1.392l1.494.595a.75.75 0 01-.278 1.446zM15.63 8.223a.75.75 0 01-.278-1.447l1.494-.595a.75.75 0 01.556 1.393l-1.494.595a.744.744 0 01-.276.054h-.002zM15.63 14.567a.75.75 0 01-.278-1.446l1.494-.596a.75.75 0 01.556 1.394l-1.494.595a.743.743 0 01-.276.053h-.002zM15.63 21.363a.749.749 0 01-.278-1.445l1.494-.595a.75.75 0 11.555 1.392l-1.494.595a.741.741 0 01-.277.053z",fill:"#5699DB"}],cohere:[{d:"M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z",fill:"#39594D"},{d:"M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z",fill:"#D18EE2"},{d:"M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z",fill:"#FF7759"}]};e.s(["ProviderIcon",0,function({className:e,provider:o}){if(o in s)return(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,"aria-hidden":"true",children:s[o].map(e=>(0,t.jsx)("path",{d:e.d,fill:e.fill},e.d))});let c=(e=>{switch(e){case"anthropic":return i;case"google":return n;case"openai":case"chatgpt":return r;case"vercel-ai-gateway":return l;case"xai":return a}})(o);return(0,t.jsx)(c,{className:e})}],968978)},635963,864723,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(218080),a=e.i(647163);let i="currentColor",l=[{id:"system",label:"System",value:i},{id:"slate",label:"Slate",value:"#64748B"},{id:"indigo",label:"Indigo",value:"#6366F1"},{id:"blue",label:"Blue",value:"#3B82F6"},{id:"cyan",label:"Cyan",value:"#06B6D4"},{id:"teal",label:"Teal",value:"#14B8A6"},{id:"green",label:"Green",value:"#22C55E"},{id:"lime",label:"Lime",value:"#84CC16"},{id:"amber",label:"Amber",value:"#F59E0B"},{id:"orange",label:"Orange",value:"#F97316"},{id:"red",label:"Red",value:"#EF4444"},{id:"pink",label:"Pink",value:"#EC4899"},{id:"violet",label:"Violet",value:"#8B5CF6"},{id:"fuchsia",label:"Fuchsia",value:"#D946EF"},{id:"rose",label:"Rose",value:"#F43F5E"},{id:"sky",label:"Sky",value:"#0EA5E9"},{id:"emerald",label:"Emerald",value:"#10B981"},{id:"yellow",label:"Yellow",value:"#EAB308"},{id:"stone",label:"Stone",value:"#78716C"}],s=Object.fromEntries(l.map(e=>[e.id,e.value])),o=l.filter(e=>e.value!==i).map(e=>e.value),c=[s.amber,s.red],d={rainbow:{label:"Rainbow",look:"flow",colors:[0,45,90,140,190,240,290,330,360].map(e=>`oklch(0.77 0.16 ${e})`)},duo:{label:"Duo",look:"duo",colors:["#818CF8","#F472B6"]},aurora:{label:"Aurora",look:"aurora",edge:"dark",colors:["#1a2f73","#2c56c9","#34d399","#22d3ee","#a7f3d0"]},"aurora-pink":{label:"Pink aurora",look:"aurora",edge:"dark",colors:["#3a1478","#7c3aed","#f472b6","#e879f9","#fbcfe8"]}},u=Object.keys(d);e.s(["MARK_PAINTS",0,d,"MARK_PAINT_IDS",0,u,"MARK_PALETTE",0,o,"MARK_SHAPES",0,["blob","poly","squircle","heart"],"MARK_SYSTEM",0,i,"paintSwatch",0,function(e){let{look:t,colors:n}=d[e];return"aurora"===t?`radial-gradient(circle at 35% 30%, ${n[2]}, transparent 70%), linear-gradient(180deg, ${n[0]}, ${n[1]})`:`linear-gradient(135deg, ${n.join(", ")})`},"randomMarkFills",0,function(e){let t=[...o.filter(e=>!c.includes(e)).map(e=>({color:e})),...u.map(e=>({paint:e}))];for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t.slice(0,e)}],864723);let h=2*Math.PI,f="origin-center animate-in duration-300 zoom-in-0 [transform-box:fill-box]",m="-18 -18 276 276",p=e=>Math.round(100*e)/100,g=(e,t,n)=>Math.min(n,Math.max(t,e));function x(e){let t=e>>>0;return()=>{let e=Math.imul((t=t+0x6d2b79f5>>>0)^t>>>15,1|t);return(((e=e+Math.imul(e^e>>>7,61|e)^e)^e>>>14)>>>0)/0x100000000}}function y(e,t){return[e[0]-t[0],e[1]-t[1]]}function b(e){let t=Math.hypot(e[0],e[1])||1;return[e[0]/t,e[1]/t]}function k(e){let t=e.map((e,t)=>{let n=t/128*h;return[120+Math.cos(n)*e,120+Math.sin(n)*e]}),n=`M${p(t[0][0])} ${p(t[0][1])}`;for(let e=0;e<128;e++){let r=t[(e-1+128)%128],a=t[e],i=t[(e+1)%128],l=t[(e+2)%128],s=a[0]+(i[0]-r[0])/6,o=a[1]+(i[1]-r[1])/6,c=i[0]-(l[0]-a[0])/6,d=i[1]-(l[1]-a[1])/6;n+=`C${p(s)} ${p(o)} ${p(c)} ${p(d)} ${p(i[0])} ${p(i[1])}`}return`${n}Z`}function v(e){let t=e.tilt*Math.PI/180,n=Math.cos(t),r=Math.sin(t),a=(t,a)=>[e.cx+t*n-a*r,e.cy+t*r+a*n],i=-e.len/2,l=e.len/2,s=[],o=[];for(let t=0;t<=30;t++){let n=t/30,r=1-n,c=r*r*i+n*n*l,d=-(2*r*n*e.bend),u=-(2*r*i)+2*n*l,h=-(2*r*e.bend)+2*n*e.bend,f=Math.hypot(u,h)||1,m=-h/f,p=u/f,g=e.width/2*Math.sin(Math.PI*n)**e.taper;s.push(a(c+m*g,d+p*g)),o.push(a(c-m*g,d-p*g))}let c=`M${p(s[0][0])} ${p(s[0][1])}`;for(let e=1;e<=30;e++)c+=`L${p(s[e][0])} ${p(s[e][1])}`;for(let e=29;e>=0;e--)c+=`L${p(o[e][0])} ${p(o[e][1])}`;return`${c}Z`}let M={shape:"blob",sides:3,corner:.74,rotation:0,squircle:4.6,wobble:.2,seed:113,autofit:!0,color:"currentColor",fill:!0,strokeWidth:14,eyeLen:51,eyeWidth:38,eyeBend:-1,eyeTaper:.35,eyeTilt:-90,eyeSkew:0,eyeGap:88,eyeY:100,gazeRange:7,follow:!0,ripple:9,pulse:7,punch:.05,bandEase:.019,bobRate:1,stretch:15,idle:!0,liveliness:55,float:7,breathe:3.7,speed:1.7,blink:!0,notify:!1,notifyAngle:41,notifyDist:109,notifyR:25,notifyRing:11};function w(e,t,n=.035){let r=x(12139^t),a=[2,3,5].map(e=>({k:e,a:(2*r()-1)/e,p:r()*h})),i=e.map((e,t)=>{let n=t/128*h,r=0;for(let e of a)r+=e.a*Math.sin(e.k*n+e.p);return r}),l=Math.max(...i.map(Math.abs))||1;return e.map((e,t)=>e*(1+n*i[t]/l))}let j=new Map;function L(e,t,n){var r,a,i;let l=`${"poly"===t?`poly|${e.sides}|${e.corner}|${e.rotation}|${n}`:"squircle"===t?`squircle|${e.squircle}|${n}`:"heart"===t?`heart|${n}`:`blob|${e.wobble}|${n}`}|${e.autofit}`,s=j.get(l);if(s)return s;let o=function(e){let t=Array(128);for(let n=0;n<128;n++){let r=n/128*h,a=Math.cos(r),i=Math.sin(r),l=0;for(let t=0;t<e.length;t++){let n=e[t],r=e[(t+1)%e.length],s=r[0]-n[0],o=r[1]-n[1],c=a*o-i*s;if(1e-9>Math.abs(c))continue;let d=n[0]-120,u=n[1]-120,h=(d*o-u*s)/c,f=(d*i-u*a)/c;h>l&&f>=-1e-9&&f<=1+1e-9&&(l=h)}t[n]=l||112}return t}((r=e,a=t,i=n,"squircle"===a?function(e){let t=[],n=2/e;for(let e=0;e<360;e++){let r=e/360*h,a=Math.cos(r),i=Math.sin(r);t.push([120+Math.sign(a)*Math.abs(a)**n*112,120+Math.sign(i)*Math.abs(i)**n*112])}return t}(r.squircle):"poly"===a?function(e,t,n){let r=n*Math.PI/180-Math.PI/2,a=[];for(let t=0;t<e;t++){let n=r+t/e*h;a.push([120+112*Math.cos(n),120+112*Math.sin(n)])}let i=(Math.PI-h/e)/2,l=224*Math.sin(Math.PI/e)/2*Math.tan(i)*g(t,.001,1),s=l/Math.tan(i),o=[];for(let t=0;t<e;t++){let n=a[t],r=a[(t-1+e)%e],c=a[(t+1)%e],d=b(y(r,n)),u=b(y(c,n)),f=[n[0]+d[0]*s,n[1]+d[1]*s],m=b([d[0]+u[0],d[1]+u[1]]),p=[n[0]+m[0]*l/Math.sin(i),n[1]+m[1]*l/Math.sin(i)],g=Math.atan2(f[1]-p[1],f[0]-p[0]),x=[n[0]+u[0]*s,n[1]+u[1]*s],k=Math.atan2(x[1]-p[1],x[0]-p[0])-g;for(;k>Math.PI;)k-=h;for(;k<-Math.PI;)k+=h;for(let e=0;e<=20;e++){let t=g+e/20*k;o.push([p[0]+Math.cos(t)*l,p[1]+Math.sin(t)*l])}}return o}(r.sides,r.corner,r.rotation):"heart"===a?function(){let e=[];for(let t=0;t<400;t++){let n=t/400*h,r=16*Math.sin(n)**3,a=13*Math.cos(n)-5*Math.cos(2*n)-2*Math.cos(3*n)-Math.cos(4*n);e.push([120+6.6*r,120-(a+2.2)*7.26])}return e}():function(e,t){let n=x(e),r=[1,2,3,4,5].map(e=>({k:e,a:(2*n()-1)/e,p:n()*h})),a=[],i=0;for(let e=0;e<360;e++){let t=e/360*h,n=0;for(let e of r)n+=e.a*Math.sin(e.k*t+e.p);a.push(n),i=Math.max(i,Math.abs(n))}let l=i>0?t/i:0;return a.map((e,t)=>{let n=t/360*h,r=112*(1+e*l);return[120+Math.cos(n)*r,120+Math.sin(n)*r]})}(i,r.wobble))),c="blob"===t?o:"heart"===t?function(e,t){let n=e;for(let e=0;e<2;e++){let e=n;n=e.map((t,n)=>{let r=0;for(let t=-3;t<=3;t++)r+=e[(n+t+128)%128];return r/7})}let r=n.reduce((e,t)=>e+t,0)/128,a=w(n.map(e=>.95*e+.05*r),t,.05),i=Math.round((2*x(20977^t)()-1)*3);return i?a.map((e,t)=>a[(t-i+256)%128]):a}(o,n):w(o,n),d=e.autofit?function(e){let t=h/128,n=0,r=0;for(let a of e)n+=.5*a*a*t,a>r&&(r=a);if(n<=0)return e;let a=Math.min(Math.sqrt(112*Math.PI*112/n),130/r);return e.map(e=>e*a)}(c):c;return j.size>400&&j.clear(),j.set(l,d),d}let S=e=>345*(.7+.3*e),A=[{cx:42,sway:40,period:5},{cx:134,sway:-35,period:6.5},{cx:209,sway:29,period:4.5}],N={eyeLen:1,eyeWid:1,eyeX:0,eyeY:0,bodyX:0,bodyY:0,rot:0,scale:1,blinkIn:0},C=e=>e*e*(3-2*e),E=e=>Math.sin(Math.PI*e);function z(e,t,n){return e<=0||e>=1?0:e<t?C(e/t):e>1-n?C((1-e)/n):1}let I={glance:{weight:26,dur:[900,1400],play:(e,t,n)=>{let r=z(e,.12,.34);return{eyeX:22*t*r,eyeY:22*n*r,rot:.9*t*r,blinkIn:40*!!(e<.02&&.4>Math.random())}}},lookAway:{weight:12,dur:[1800,2600],play:(e,t,n)=>{let r=z(e,.1,.46);return{eyeX:30*t*r,eyeY:(.5*n+.35)*22*r,rot:1.6*t*r}}},widen:{weight:8,dur:[700,950],play:(e,t)=>{let n=z(e,.22,.5);return{eyeLen:1+.16*n,eyeWid:1+.2*n,rot:-(.5*t)*n}}},squint:{weight:8,dur:[800,1050],play:e=>{let t=z(e,.25,.45);return{eyeLen:1-.3*t,eyeWid:1-.12*t}}},double:{weight:7,dur:[420,420],play:e=>({blinkIn:+(e<.02)})},nod:{weight:11,dur:[1150,1400],play:e=>({bodyY:10*Math.sin(2*h*e)*E(e),rot:2.2*Math.sin(2*h*e+.5)*E(e),eyeY:3.2*Math.sin(2*h*e-.7)*E(e)})},sink:{weight:7,dur:[1800,2300],play:e=>{let t=E(e)**.7;return{eyeLen:1-.26*t,eyeY:4*t,bodyY:8*t,scale:1-.03*t,rot:1.8*t}}},wave:{weight:7,dur:[1300,1700],play:(e,t)=>{let n=z(e,.24,.34);return{bodyX:t*Math.sin(1.5*h*e)*9*n,rot:t*Math.sin(1.5*h*e+.5)*4.5*n,eyeX:t*Math.sin(1.5*h*e)*5*n,eyeLen:1-.2*n}}},reach:{weight:7,dur:[1800,2300],play:e=>{let t=z(e,.28,.34);return{scale:1+.045*t,bodyY:-4*t,eyeLen:1-.28*t,eyeY:3*t,rot:1.8*t}}},tilt:{weight:11,dur:[1500,1900],play:(e,t)=>{let n=z(e,.22,.4);return{rot:9*t*n,bodyX:-3*t*n,eyeY:-1.5*n}}},sweep:{weight:9,dur:[1600,2200],play:(e,t,n)=>{let r=z(e,.12,.18),a=Math.cos(Math.PI*g((e-.15)/.7,0,1));return{eyeX:24*t*r*a,eyeY:24*n*r*a,rot:1.2*t*r*a}}},roll:{weight:5,dur:[900,1200],play:(e,t)=>{let n=E(e)**.5,r=h*e*(t>=0?1:-1);return{eyeX:20*Math.cos(r)*n,eyeY:14*Math.sin(r)*n,rot:1.5*Math.sin(r)*n,blinkIn:+(e>.9&&e<.93)}}},shake:{weight:8,dur:[650,900],play:(e,t)=>{let n=E(e),r=Math.sin(2*h*e);return{rot:t*r*5*n,bodyX:t*r*4*n,eyeX:-t*r*4*n}}},bounce:{weight:6,dur:[850,1100],play:e=>{let t=1-.45*e,n=Math.abs(Math.sin(h*e))*t;return{bodyY:-14*n,eyeY:2.5*n,scale:1-Math.max(0,-Math.cos(h*e))*t*.04}}},slowBlink:{weight:6,dur:[900,1200],play:e=>({eyeWid:1-.88*E(e)**.6,eyeY:1.5*E(e)})},perk:{weight:5,dur:[700,950],play:(e,t)=>{let n=z(e,.09,.62);return{bodyY:-7*n,scale:1+.035*n,eyeLen:1+.14*n,eyeWid:1+.1*n,rot:.8*t*n}}}},_=Object.keys(I),T={idle:{},connecting:{nod:0,wave:0,bounce:0,sweep:1.6,roll:1.4},listening:{glance:.3,lookAway:.15,sweep:.2,roll:0,wave:0,shake:0,bounce:0,sink:.3,widen:2.2,perk:1.8,nod:1.6,slowBlink:1.4},thinking:{lookAway:2.2,squint:2,tilt:1.8,roll:2,sweep:1.4,sink:1.6,glance:.8,slowBlink:1.2,nod:.3,wave:0,bounce:.2,perk:.5},delegating:{wave:2.6,nod:1.8,perk:1.6,glance:1.4,tilt:1.2,lookAway:.4,squint:.4,sink:0,roll:0},speaking:{nod:2,glance:1.2,widen:1.2,sink:0,roll:.3,wave:.4,slowBlink:.4,bounce:.6}},$={idle:{eyes:1,body:1,churn:0,churnSpeed:0,dwell:1,breathe:1,float:1,blink:1,lean:0,aspect:1,gazeX:0,gazeY:0},connecting:{eyes:.75,body:.91,churn:2.5,churnSpeed:3,dwell:.8,breathe:2.2,float:.6,blink:.6,lean:0,aspect:1.03,gazeX:0,gazeY:4},listening:{eyes:1.3,body:1.04,churn:0,churnSpeed:0,dwell:2.6,breathe:.45,float:.35,blink:1.8,lean:0,aspect:.97,gazeX:0,gazeY:-3},thinking:{eyes:.66,body:.96,churn:5,churnSpeed:.6,dwell:.5,breathe:1.3,float:1.4,blink:.8,lean:7,aspect:1.04,gazeX:-9,gazeY:-8},delegating:{eyes:.9,body:.98,churn:0,churnSpeed:0,dwell:2.2,breathe:.6,float:.5,blink:1.3,lean:-6,aspect:1,gazeX:15,gazeY:2},speaking:{eyes:.95,body:1,churn:2.5,churnSpeed:3,dwell:4,breathe:.4,float:.5,blink:1.2,lean:0,aspect:1,gazeX:0,gazeY:0}},D=Array(r.SPECTRUM_BANDS).fill(0);function R(){let e=Math.random();return e<.15?180+320*Math.random():e<.8?1200+2300*Math.random():3500+2800*Math.random()}let O={x:0,y:0,live:!1},B=!1;function P(e){if("number"==typeof e)return e;let t=0x811c9dc5;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),0x1000193);return(t>>>0)%1e4}function K({size:e=32,seed:i,color:l,shape:s,outline:o,paint:c,notify:u,crossed:x,state:y="idle",getSpectrum:b,options:w,className:j}){var C;let E=(0,n.useId)(),z=(0,n.useMemo)(()=>({...M,...w,...void 0===o?{}:{fill:!o}}),[w,o]),F=`${E}-mask`,Y=`${E}-paint`,q=`${E}-curtain`,G=(0,n.useRef)(null),U=(0,n.useRef)(null),V=(0,n.useRef)(null),H=(0,n.useRef)(null),W=(0,n.useRef)(null),X=(0,n.useRef)(null),Z=(0,n.useRef)(null),J=(0,n.useRef)(null),Q=(0,n.useRef)([]),ee=(0,n.useRef)(null),et=(0,n.useRef)(null),en=(0,n.useRef)(null),er=(0,n.useRef)(null),ea=void 0===i?z.seed:P(i),ei=s??z.shape,el=l??z.color,es=u??z.notify,eo=c?d[c]:null,ec=g((e-14)/98,0,1),ed=eo?"edge"in eo?eo.edge:null:(function(e){let t=/^#([0-9a-f]{6})$/i.exec(e);if(!t)return null;let n=e=>{let n=Number.parseInt(t[1].slice(e,e+2),16)/255;return n<=.04045?n/12.92:((n+.055)/1.055)**2.4};return .2126*n(0)+.7152*n(2)+.0722*n(4)}(el)??1)<.06?"dark":null,eu=(0,n.useMemo)(()=>L(z,ei,ea),[z,ei,ea]),eh=(0,n.useMemo)(()=>k(eu),[eu]),ef=(0,n.useMemo)(()=>v({len:z.eyeLen,width:z.eyeWidth,bend:z.eyeBend,taper:z.eyeTaper,tilt:z.eyeTilt,cx:120-z.eyeGap/2,cy:z.eyeY}),[z]),em=(0,n.useMemo)(()=>v({len:z.eyeLen,width:z.eyeWidth,bend:z.eyeBend,taper:z.eyeTaper,tilt:z.eyeTilt+z.eyeSkew,cx:120+z.eyeGap/2,cy:z.eyeY}),[z]),ep=eo?.look??null,eg=!!x,ex=(0,n.useRef)({cfg:z,state:y,getSpectrum:b,radii:eu,shapeSeed:ea,look:ep,crossed:eg,grow:ec});ex.current={cfg:z,state:y,getSpectrum:b,radii:eu,shapeSeed:ea,look:ep,crossed:eg,grow:ec},(0,n.useEffect)(()=>{B||(B=!0,window.addEventListener("pointermove",e=>{O.x=e.clientX,O.y=e.clientY,O.live=!0},{passive:!0}));let e=0,t=ex.current.shapeSeed%17*.91,n=0,a=0,i=performance.now()+600+R(),l=0,s=130,o=0,c=(0,r.createVoiceFollower)(),d={...$.idle},u=Object.keys(d),f=0,m=0,x=.5,y=0,b=0,v=0,M=Array(r.SPECTRUM_BANDS).fill(0),w=Array.from({length:r.SPECTRUM_BANDS},(e,t)=>1.7*t),j=0,L=performance.now(),C=null,E=performance.now()+1500+3e3*Math.random(),z=B=>{e=requestAnimationFrame(z);let{cfg:P,state:K}=ex.current,F=B/1e3*P.speed,Y=Math.min(.05,(B-L)/1e3);L=B;let q=$[K];for(let e of u)d[e]+=(q[e]-d[e])*.06;j+=Y*d.churnSpeed*P.speed;let ea="speaking"===K?ex.current.getSpectrum?.():void 0,ei=c.read(ea??D,Y),el=0;for(let e=0;e<r.SPECTRUM_BANDS;e++){let t=ei.bands[e];M[e]+=(t-M[e])*P.bandEase,w[e]+=Y*(.05+.018*e)*(e%2?-1:1),el+=t}let es="speaking"===K?g(ei.level,0,1):0;f+=(es-f)*.3,m+=(es-m)*.016,ei.onset>0&&B-v>340&&(v=B,b-=P.punch*Math.min(1,1.6*f)*P.bobRate);let eo=.01*P.bobRate*P.bobRate;if(b+=-y*eo-.085*b*P.bobRate,y+=b,el>.04){let e=0;for(let t=0;t<r.SPECTRUM_BANDS;t++)e+=M[t]*t;x+=(e/el/(r.SPECTRUM_BANDS-1)-x)*.04}else x+=(.5-x)*.03;let ec=d.dwell;if(P.idle&&!C&&B>=E){let e=function(e){let t=T[e],n=e=>I[e].weight*(t[e]??1),r=0;for(let e of _)r+=n(e);let a=Math.random()*r;for(let e of _)if((a-=n(e))<=0)return e;return _[0]}(K),t=I[e],n=Math.PI/4*Math.floor(8*Math.random());C={key:e,start:B,dur:t.dur[0]+Math.random()*(t.dur[1]-t.dur[0]),dx:Math.cos(n),dy:.7*Math.sin(n)-.5*("thinking"===K)}}let ed=N;if(C){let e=(B-C.start)/C.dur;e>=1?(C=null,E=B+(9e3-74*P.liveliness)*ec*(.6+.8*Math.random())):(ed={...N,...I[C.key].play(e,C.dx,C.dy)}).blinkIn>0&&0===o&&(o=B+ed.blinkIn)}if(G.current){let e=P.breathe*d.breathe/100,n=m*P.pulse/300-.05*y,r=(.45-x)/.45*m*(P.stretch/100),a=(1+e*Math.sin(1.6*F+t)-.75*n+r)*d.body*ed.scale/d.aspect,i=(1+n-.8*r)*d.body*ed.scale*d.aspect,l=25*e*Math.sin(1.1*F+1.7*t)+ed.rot+d.lean,s=120+90*e*Math.sin(.7*F+.6*t)+ed.bodyX,o=120+120*e*Math.sin(1.3*F+2.3*t)+ed.bodyY+y*P.pulse*2;G.current.setAttribute("transform",`translate(${p(s)} ${p(o)}) rotate(${p(l)}) scale(${i.toFixed(4)} ${a.toFixed(4)}) translate(${-120} ${-120})`)}let eu=ex.current.look;if(eu){let e=B/1e3,t=ex.current.grow;if("flow"===eu)J.current?.setAttribute("gradientTransform",`rotate(-35 120 120) translate(${p(-(e/3.6%1)*S(t))} 0)`);else if("aurora"===eu)for(let[t,n]of A.entries()){let r=.5-.5*Math.cos(e/n.period*h);Q.current[t]?.setAttribute("transform",`translate(${p(n.sway*r)} 0) translate(${n.cx} 91) skewX(${p(20*r-10)}) scale(1 ${p(1+.18*r)}) translate(${-n.cx} -91)`)}}let eh=(M[0]+M[1]+M[2])/3,ef=(M[3]+M[4])/2,em=(M[5]+M[6]+M[7])/3,ep=eh+ef+em>.03&&P.ripple>0,eg=d.churn>0;if(V.current&&(ep||eg)){let e=j,n=k(ex.current.radii.map((n,r)=>{let a=r/128*h,i=n;return ep&&(i+=P.ripple*(eh*Math.sin(2*a+w[0])+.7*ef*Math.sin(3*a+w[1])+.5*em*Math.sin(4*a+w[2]))),eg&&(i+=d.churn*(.65*Math.sin(2*a+e)+.35*Math.sin(3*a-1.4*e+t))),i}));V.current.setAttribute("d",n),H.current?.setAttribute("d",n),Z.current?.setAttribute("d",n)}if(U.current){let e=0,r=0;if(P.follow&&O.live&&er.current){let t=er.current.getBoundingClientRect();t.width>0&&(e=g((O.x-(t.left+t.width/2))/(1.5*t.width),-1,1)*P.gazeRange,r=g((O.y-(t.top+t.height/2))/(1.5*t.height),-1,1)*P.gazeRange)}n+=(e-n)*.12,a+=(r-a)*.12;let c=P.float*d.float*(.62*Math.sin(1.15*F+t)+.38*Math.sin(.47*F+2.1*t)),u=1;if(0===l&&!ex.current.crossed&&(o>0&&B>=o?(l=B,o=0):P.blink&&B>=i&&(l=B),l>0&&(s=110+60*Math.random())),l>0){let e=(B-l)/s;e>=1?(l=0,i=B+R()*d.blink):u=1-.94*Math.sin(Math.PI*e)}let h=`translate(${p(n+ed.eyeX+d.gazeX)} ${p(a+c+ed.eyeY+d.gazeY)}) translate(120 ${P.eyeY}) scale(1 ${u.toFixed(3)}) translate(${-120} ${-P.eyeY})`;U.current.setAttribute("transform",h),ee.current?.setAttribute("transform",h);let f=ed.eyeWid*(1-.13*m)*d.eyes,x=ed.eyeLen*(1+.04*m)*d.eyes,y=P.eyeGap/2;for(let[e,t]of[W,X].entries()){if(!t.current)continue;let n=120+(0===e?-y:y),r=0===e?P.eyeTilt:P.eyeTilt+P.eyeSkew,a=x.toFixed(3),i=f.toFixed(3),l=`translate(${p(n)} ${P.eyeY}) rotate(${p(r)}) scale(${a} ${i}) rotate(${p(-r)}) translate(${p(-n)} ${-P.eyeY})`;t.current.setAttribute("transform",l),(0===e?et:en).current?.setAttribute("transform",l)}}};return e=requestAnimationFrame(z),()=>cancelAnimationFrame(e)},[]);let ey=z.notifyAngle*Math.PI/180,eb=eo?`url(#${Y})`:"var(--fg)",ek=p(18-3*ec),ev=p(22-9*ec),eM=(e,n,r)=>eg?(0,t.jsx)("path",{d:`M${n-ek} ${z.eyeY-ek}L${n+ek} ${z.eyeY+ek}M${n+ek} ${z.eyeY-ek}L${n-ek} ${z.eyeY+ek}`,fill:"none",stroke:r,strokeWidth:ev,strokeLinecap:"round"}):(0,t.jsx)("path",{d:e,fill:r});return(0,t.jsxs)("svg",{ref:er,"data-slot":"bot-mark","aria-hidden":"true",className:j,viewBox:m,width:e,height:e,style:{overflow:"visible","--fg":el},children:[(0,t.jsxs)("defs",{children:[(0,t.jsx)("clipPath",{id:E,children:(0,t.jsx)("path",{ref:H,d:eh})}),z.fill&&(0,t.jsxs)("mask",{id:F,maskUnits:"userSpaceOnUse",children:[(0,t.jsx)("path",{ref:Z,d:eh,fill:"#fff"}),(0,t.jsx)("g",{clipPath:`url(#${E})`,children:(0,t.jsxs)("g",{ref:U,children:[(0,t.jsx)("g",{ref:W,children:eM(ef,120-z.eyeGap/2,"#000")}),(0,t.jsx)("g",{ref:X,children:eM(em,120+z.eyeGap/2,"#000")})]})}),es&&(0,t.jsx)("circle",{cx:p(120+Math.cos(ey)*z.notifyDist),cy:p(120+Math.sin(ey)*z.notifyDist),r:z.notifyR+z.notifyRing,fill:"#000",className:f})]}),eo&&(0,t.jsx)("linearGradient",{ref:J,id:Y,...(C=eo.look,"flow"===C?{gradientUnits:"userSpaceOnUse",x1:0,y1:0,x2:S(ec),y2:0,spreadMethod:"repeat"}:{gradientUnits:"userSpaceOnUse",x1:0,y1:0,x2:240*("duo"===C),y2:240}),children:(function({look:e,colors:t}){let n="aurora"===e?t.slice(0,2):t;return n.map((e,t)=>({offset:t/(n.length-1),color:e}))})(eo).map(e=>(0,t.jsx)("stop",{offset:e.offset,stopColor:e.color},`${e.offset}-${e.color}`))}),eo?.look==="aurora"&&(0,t.jsx)("filter",{id:q,filterUnits:"userSpaceOnUse",x:-72,y:-72,width:384,height:384,colorInterpolationFilters:"sRGB",children:(0,t.jsx)("feGaussianBlur",{stdDeviation:p(34-12*ec)})})]}),(0,t.jsxs)("g",{ref:G,children:[z.fill?(0,t.jsxs)("g",{mask:`url(#${F})`,children:[(0,t.jsx)("path",{ref:V,d:eh,fill:eb}),eo?.look==="aurora"&&(0,t.jsxs)("g",{filter:`url(#${q})`,children:[(0,t.jsx)("rect",{x:-72,y:-72,width:384,height:384,fill:eb}),A.map((e,n)=>(0,t.jsx)("ellipse",{ref:e=>{Q.current[n]=e},cx:e.cx,cy:91,rx:p(60-29*ec),ry:138,fill:eo.colors[2+n],style:{mixBlendMode:"screen"}},e.cx))]})]}):(0,t.jsx)("path",{ref:V,d:eh,fill:"none",stroke:eb,strokeWidth:z.strokeWidth,strokeLinejoin:"round"}),z.fill&&"dark"===ed&&(0,t.jsx)("g",{clipPath:`url(#${E})`,opacity:.92,children:(0,t.jsxs)("g",{ref:ee,children:[(0,t.jsx)("g",{ref:et,children:eM(ef,120-z.eyeGap/2,"#fff")}),(0,t.jsx)("g",{ref:en,children:eM(em,120+z.eyeGap/2,"#fff")})]})}),!z.fill&&(0,t.jsx)("g",{clipPath:`url(#${E})`,children:(0,t.jsxs)("g",{ref:U,children:[(0,t.jsx)("g",{ref:W,children:eM(ef,120-z.eyeGap/2,eb)}),(0,t.jsx)("g",{ref:X,children:eM(em,120+z.eyeGap/2,eb)})]})}),es&&(0,t.jsx)("circle",{cx:p(120+Math.cos(ey)*z.notifyDist),cy:p(120+Math.sin(ey)*z.notifyDist),r:z.notifyR,className:(0,a.cn)("fill-amber-600 dark:fill-amber-400",f)})]})]})}e.s(["BotMark",0,K,"BotsMark",0,function({size:e=16,className:n}){return(0,t.jsx)(K,{size:e,seed:"bots",className:n})},"markAtRest",0,function(e){let t=(e,t)=>v({len:M.eyeLen,width:M.eyeWidth,bend:M.eyeBend,taper:M.eyeTaper,tilt:t,cx:e,cy:M.eyeY});return{head:k(L(M,M.shape,P(e))),eyes:[t(120-M.eyeGap/2,M.eyeTilt),t(120+M.eyeGap/2,M.eyeTilt+M.eyeSkew)]}}],635963)},805995,610225,e=>{"use strict";var t=e.i(843476),n=e.i(493801),r=e.i(456420);let a={name:"audio-lines",size:24,node:[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]};a.node;let i=(0,r.default)(a),l={name:"captions",size:24,node:[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]],aliases:["subtitles"]};l.node;let s=(0,r.default)(l);var o=e.i(689664),c=e.i(867927);let d={name:"clapperboard",size:24,node:[["path",{d:"m12.296 3.464 3.02 3.956",key:"qash78"}],["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z",key:"1h7j8b"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"4lm6w1"}],["path",{d:"m6.18 5.276 3.1 3.899",key:"zjj9t3"}]]};d.node;let u=(0,r.default)(d);var h=e.i(560972),h=h,f=e.i(815170),m=e.i(758925),p=e.i(566595),g=e.i(986206),x=e.i(466787),y=e.i(271645),b=e.i(798120),k=e.i(167881),v=e.i(23750),M=e.i(917162),w=e.i(59377),j=e.i(818125),L=e.i(671428),S=e.i(412294),A=e.i(146538),N=e.i(968978),C=e.i(265402),E=e.i(635963),z=e.i(95187);let I=(0,z.createServerReference)("7f81a8e690a4f00b2f693525611ec96c80d6706dd3",z.callServer,void 0,z.findSourceMapURL,"removeConfigAction");e.s(["removeConfigAction",0,I],610225);var _=e.i(24133),T=e.i(992112),$=e.i(508734),D=e.i(421429),R=e.i(36174);let O={telegram:"telegram.org",discord:"discord.com",slack:"slack.com"},B=`display_information:
2
+ name: Thursday
3
+ features:
4
+ app_home:
5
+ messages_tab_enabled: true
6
+ messages_tab_read_only_enabled: false
7
+ bot_user:
8
+ display_name: Thursday
9
+ oauth_config:
10
+ scopes:
11
+ bot: [chat:write, im:history, im:read, users:read, files:read, files:write]
12
+ settings:
13
+ event_subscriptions:
14
+ bot_events: [message.im]
15
+ interactivity:
16
+ is_enabled: true
17
+ socket_mode_enabled: true
18
+ `,P=({href:e,children:n})=>(0,t.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"font-medium text-foreground underline underline-offset-4 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:n}),K=({children:e})=>(0,t.jsx)("span",{className:"font-medium text-foreground",children:e}),F={telegram:[(0,t.jsxs)(t.Fragment,{children:["In Telegram, write to"," ",(0,t.jsx)(P,{href:"https://t.me/BotFather",children:"@BotFather"}),", send ",(0,t.jsx)(K,{children:"/newbot"})," ","and pick a name. It answers with a ",(0,t.jsx)(K,{children:"token"}),"."]}),(0,t.jsxs)(t.Fragment,{children:["Paste the token below, under ",(0,t.jsx)(K,{children:"Telegram"}),"."]}),(0,t.jsxs)(t.Fragment,{children:["From your phone, ",(0,t.jsx)(K,{children:"write anything to your new bot"}),"."]}),(0,t.jsxs)(t.Fragment,{children:["A question appears on this computer. Press ",(0,t.jsx)(K,{children:"Allow"}),". Done — write to the bot and Thursday answers."]})],discord:[(0,t.jsxs)(t.Fragment,{children:["At"," ",(0,t.jsx)(P,{href:"https://discord.com/developers/applications",children:"discord.com/developers"}),", make a ",(0,t.jsx)(K,{children:"New Application"}),". On its ",(0,t.jsx)(K,{children:"Bot"})," page press"," ",(0,t.jsx)(K,{children:"Reset Token"})," and copy it."]}),(0,t.jsxs)(t.Fragment,{children:["Paste the token below, under ",(0,t.jsx)(K,{children:"Discord"}),"."]}),(0,t.jsxs)(t.Fragment,{children:["On the application's ",(0,t.jsx)(K,{children:"OAuth2"})," page, make an invite link with the"," ",(0,t.jsx)(K,{children:"bot"})," scope and add the bot to a server of your own. Discord only lets you write to a bot you share a server with."]}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(K,{children:"Send the bot a direct message"})," (not in the server), then press"," ",(0,t.jsx)(K,{children:"Allow"})," on this computer."]})],slack:[(0,t.jsxs)(t.Fragment,{children:["At ",(0,t.jsx)(P,{href:"https://api.slack.com/apps",children:"api.slack.com/apps"}),","," ",(0,t.jsx)(K,{children:"Create New App › From a manifest"}),", and paste the manifest (the button under these steps copies it)."]}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(K,{children:"Basic Information › App-Level Tokens"}),": generate one with"," ",(0,t.jsx)(K,{children:"connections:write"}),". It starts with xapp- — paste it below as the"," ",(0,t.jsx)(K,{children:"app token"}),"."]}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(K,{children:"Install App"})," to your workspace. The Bot User OAuth Token starts with xoxb- — paste it below as the ",(0,t.jsx)(K,{children:"bot token"}),"."]}),(0,t.jsxs)(t.Fragment,{children:["In Slack, open the app under ",(0,t.jsx)(K,{children:"Apps"}),", write in its ",(0,t.jsx)(K,{children:"Messages"})," ","tab, then press ",(0,t.jsx)(K,{children:"Allow"})," on this computer."]})]};function Y(){let[e,n]=(0,y.useState)("telegram"),[r,a]=(0,y.useState)(!1);return(0,t.jsxs)("section",{className:"space-y-4 rounded-xl bg-muted/40 p-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)("p",{className:"min-w-0 flex-1 text-sm font-medium",children:"Connect a chat app in four steps"}),(0,t.jsx)(D.Segmented,{"aria-label":"Which chat app",value:e,onChange:n,options:R.REACH_CHANNELS.map(e=>({value:e,label:(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(j.SiteIcon,{host:O[e],className:"size-3.5 rounded-[3px]"}),R.REACH_LABEL[e]]})}))})]}),(0,t.jsx)("ol",{className:"space-y-2.5",children:F[e].map((e,n)=>(0,t.jsxs)("li",{className:"flex gap-3 text-[13px] leading-relaxed",children:[(0,t.jsx)("span",{className:"grid size-5 shrink-0 place-items-center rounded-full bg-background font-mono text-[10.5px] text-muted-foreground ring-1 ring-border/60",children:n+1}),(0,t.jsx)("span",{className:"min-w-0 text-muted-foreground",children:e})]},n))}),"slack"===e&&(0,t.jsxs)(k.Button,{size:"sm",variant:"outline",onClick:()=>void navigator.clipboard.writeText(B).then(()=>{a(!0),setTimeout(()=>a(!1),2e3)}),children:[r?(0,t.jsx)(o.Check,{}):(0,t.jsx)($.Copy,{}),r?"Copied":"Copy the manifest"]}),(0,t.jsxs)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:["Only the one person you allow can write, and only direct messages are read. This computer has to be on with Thursday running; for bots to work while no tab is open, switch on ",(0,t.jsx)(K,{children:"Work while the app is closed"})," in Settings › Bots."]})]})}var q=e.i(511769),G=e.i(609856),U=e.i(283653),V=e.i(647163);let H=(0,z.createServerReference)("7f0b851cb801651b8d7d18fba10184a47b20e07201",z.callServer,void 0,z.findSourceMapURL,"forgetReachAction");function W(){let{data:e}=(0,U.useServerRoute)(b.queryKey.reach);return((0,q.useAppEvent)({reach:()=>void(0,U.revalidate)(b.queryKey.reach)}),e?.channels.length)?(0,t.jsx)("div",{className:"pt-2",children:e.channels.map(e=>(0,t.jsx)(X,{channel:e},e.name))}):null}function X({channel:e}){let[n,r]=(0,G.useServerAction)(H,{onOk:()=>(0,U.revalidate)(b.queryKey.reach)}),a="px-1 text-xs leading-6",i=R.REACH_LABEL[e.name];return e.problem&&!e.bot?(0,t.jsxs)("p",{className:(0,V.cn)(a,"text-destructive"),children:[i,": ",e.problem]}):e.bot?e.allowed?(0,t.jsxs)("p",{className:(0,V.cn)(a,"text-muted-foreground"),children:[i,": listening as ",e.bot,". ",e.allowed.name," is let in."," ",(0,t.jsx)("button",{type:"button",disabled:r,onClick:()=>void n(e.name).catch(()=>{}),className:"rounded-sm text-foreground underline underline-offset-4 outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50",children:"Let them go"})]}):(0,t.jsxs)("p",{className:(0,V.cn)(a,V.WAITING_INK),children:[i,": listening as ",e.bot,". Write to it from your phone, then press Allow here."]}):(0,t.jsxs)("p",{className:(0,V.cn)(a,"text-muted-foreground"),children:[i,": connecting…"]})}var Z=e.i(895836);let J={[T.EXA_API_KEY]:p.Search,...Object.fromEntries(Object.values(R.REACH_KEYS).flat().map(e=>[e,g.Smartphone]))},Q={image:f.Image,video:u,speech:i,transcription:s},ee={keys:["voice","easy","text","search"],models:["bots","studio"],phone:["phone"]};function et({screen:e}){let{data:n,isLoading:r,error:a}=(0,U.useServerRoute)(b.queryKey.config);if(r)return(0,t.jsx)(Z.SettingSkeleton,{rows:4});if(a)return(0,t.jsx)(Z.SettingError,{message:a.message});let i=e=>(0,T.isConfigSet)(n,e),l=ee[e].flatMap(e=>T.CONFIG_GROUPS.find(t=>t.id===e)??[]),s=l.filter(e=>"keys"===e.section).flatMap(e=>e.entries);return(0,t.jsxs)(Z.SettingScreen,{footer:(0,t.jsx)(Z.SettingRailNote,{children:"models"===e?"Her own voice and backend models are in Thursday. A bot can pick its own on its page.":"phone"===e?"Nothing on this computer is opened to the internet: the app asks the chat service what was written.":`${s.filter(e=>i(e.key)).length} of ${s.length} set${l.some(e=>!(0,T.groupSatisfied)(e,i))?" · a call needs one voice key":" · your keys stay on this machine"}`}),children:["phone"===e&&(0,t.jsx)(Y,{}),l.map(e=>(0,t.jsxs)(Z.SettingGroup,{label:e.title,hint:e.hint,right:(0,t.jsx)(er,{group:e,isSet:i}),children:["easy"===e.id?(0,t.jsx)("div",{className:"grid gap-3 sm:grid-cols-2",children:e.entries.map(e=>(0,t.jsx)(ea,{card:!0,entry:e,set:i(e.key),needed:!1},e.key))}):"text"===e.id?(0,t.jsx)("div",{className:"flex flex-wrap gap-x-1.5 gap-y-3.5",children:e.entries.map(e=>(0,t.jsx)(en,{entry:e,set:i(e.key)},e.key))}):(0,t.jsx)(Z.SettingItems,{children:e.entries.map(r=>{let a;return r.choices?(0,t.jsx)(ef,{entry:r,choices:r.choices,value:(a=r.key,n?.find(e=>e.key===a)?.value),isSet:i},r.key):(0,t.jsx)(ea,{entry:r,set:i(r.key),needed:!(0,T.groupSatisfied)(e,i)},r.key)})}),"phone"===e.id&&(0,t.jsx)(W,{})]},e.id))]})}function en({entry:e,set:n}){return(0,t.jsxs)("button",{type:"button",onClick:()=>ex(e,n),"aria-label":`${e.label}: ${n?"set":"not set"}`,className:"group flex w-17 flex-col items-center gap-1.5 rounded-xl py-1 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsxs)("span",{className:"relative grid size-10.5 place-items-center rounded-[13px] bg-muted/60 transition-colors group-hover:bg-muted",children:[(0,t.jsx)(eh,{entry:e}),n&&(0,t.jsx)("span",{className:"absolute -top-1 -right-1 grid size-4 place-items-center rounded-full bg-primary text-primary-foreground ring-2 ring-background",children:(0,t.jsx)(o.Check,{className:"size-2.5"})})]}),(0,t.jsx)("span",{className:(0,V.cn)("max-w-full truncate text-[11px]",n?"text-foreground":"text-muted-foreground"),children:e.label})]})}function er({group:e,isSet:n}){return"none"===e.require?null:(0,T.groupSatisfied)(e,n)?(0,t.jsxs)("span",{className:"flex items-center gap-1 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(o.Check,{className:"size-3"}),"ready"]}):(0,t.jsxs)("span",{className:(0,V.cn)("flex items-center gap-1 font-mono text-[11px]",V.WAITING_INK),children:[(0,t.jsx)(x.TriangleAlert,{className:"size-3"}),e.note??"Required"]})}function ea({entry:e,set:n,needed:r,card:a=!1,narrow:i=!1}){let l=es(e,n),s=ec(e,n),d=eo(e,n),u=s.data?ed(s.data):el(n,r,l.data,e.signIn),h=l.isLoading||s.isLoading,f=(0,t.jsxs)("span",{className:(0,V.cn)("flex shrink-0 items-center gap-1.5 font-mono text-xs",u.ink),children:[u.warn?(0,t.jsx)(x.TriangleAlert,{className:"size-3"}):n&&(0,t.jsx)(o.Check,{className:"size-3"}),u.text]});return(0,t.jsxs)("button",{type:"button",onClick:()=>{var r;return e.signIn?(r=e,M.notify.component({className:"sm:max-w-md",renderer:({close:e})=>(0,t.jsx)(eg,{entry:r,onDone:e})})):ex(e,n)},className:(0,V.cn)("group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",a&&"rounded-xl border border-border/60"),children:[(0,t.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,t.jsx)(eh,{entry:e})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2 truncate text-sm font-medium",children:[e.label,e.recommended&&(0,t.jsx)("span",{className:"rounded-full px-1.5 font-mono text-[9.5px] leading-4 font-normal text-muted-foreground ring-1 ring-border ring-inset",children:"recommended"})]}),i?h?(0,t.jsx)(L.Skeleton,{className:"h-3 w-20"}):f:(0,t.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",children:e.signIn?n?eu(s.data,d):"sign in with your account":e.key})]}),i?null:h?(0,t.jsx)(L.Skeleton,{className:"h-3 w-20 shrink-0"}):f,(0,t.jsx)(c.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}let ei=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function el(e,t,n,r){return e?n?"refused"in n?{text:"Key refused",ink:"text-destructive",warn:!0}:{text:`${ei.format(n.balance)} left`,ink:n.low?V.WAITING_INK:"text-muted-foreground",warn:n.low}:{text:r?"Signed in":"Set",ink:"text-muted-foreground",warn:!1}:t?{text:"Needed",ink:V.WAITING_INK,warn:!0}:{text:r?"Signed out":"Not set",ink:"text-muted-foreground/60",warn:!1}}function es(e,t){return(0,U.useServerRoute)(t&&"vercel-ai-gateway"===e.provider?b.queryKey.gatewayCredits:null)}function eo(e,t){let{data:n}=(0,U.useServerRoute)(t&&e.signIn?b.queryKey.llmModel:null);return n?.find(t=>t.id===e.provider)?.plan??null}function ec(e,t){return(0,U.useServerRoute)(t&&e.signIn?b.queryKey.subscriptionUsage:null)}function ed(e){return"refused"in e?{text:"Sign-in refused",ink:"text-destructive",warn:!0}:{text:e.spent?"Limit reached":`${e.usedPercent}% used`,ink:e.high?V.WAITING_INK:"text-muted-foreground",warn:e.high}}function eu(e,t){let r=!e||"refused"in e?null:e,a=`${r?.plan??t??"unknown"} plan`;return r?.resetsAt?`${a} \xb7 resets in ${(0,n.formatDistanceToNowStrict)(new Date(r.resetsAt))}`:a}function eh({entry:e}){if(e.provider)return(0,t.jsx)(N.ProviderIcon,{provider:e.provider,className:"size-4"});let n=J[e.key]??m.KeyRound,r=(0,t.jsx)(n,{className:"size-4 text-muted-foreground"});return e.site?(0,t.jsx)(j.SiteIcon,{host:e.site,className:"size-4 rounded-[4px]",fallback:r}):r}function ef({entry:e,choices:n,value:r,isSet:a}){let i=n.find(e=>e.value===r),l=n.filter(e=>a(e.needs)),s=r&&!i?r:null,o=e.kind?Q[e.kind]:E.BotsMark;return(0,t.jsxs)("button",{type:"button",onClick:()=>{var r,a,i;return e.kind||e.text?(r=e,M.notify.component({className:"sm:max-w-lg",renderer:({close:e})=>(0,t.jsx)(em,{entry:r,onDone:e})})):(a=e,i=n,M.notify.component({className:"sm:max-w-md",renderer:({close:e})=>(0,t.jsx)(ep,{entry:a,choices:i,onDone:e})}))},className:"group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,t.jsx)(o,{className:"size-4 text-muted-foreground"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.label}),(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[!i&&!s&&(0,t.jsx)("span",{className:(0,V.cn)("shrink-0 rounded-[5px] border border-border/60 px-1 font-mono text-[10px]",e.kind?V.WAITING_INK:"text-muted-foreground"),children:e.kind?"off":"auto"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-muted-foreground",children:i?.label??s??(e.kind?"Not offered to bots until you pick one":l[0]?.label??"No key for any of these yet")})]})]}),(0,t.jsx)(c.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function em({entry:e,onDone:n}){let{data:r}=(0,U.useServerRoute)(b.queryKey.config),a=r?.find(t=>t.key===e.key)?.value,[i,l]=(0,y.useState)(()=>{let t=e.text?(0,C.parseTextModel)(a):(0,C.parseMediaModel)(a);return{provider:t?.provider??null,model:t?.model??""}}),s=()=>{(0,U.revalidate)(b.queryKey.config),n()},[o]=(0,G.useServerAction)(_.setConfigAction,{okMessage:`${e.label} saved`,onOk:s}),[c,d]=(0,G.useServerAction)(I,{okMessage:e.kind?`${e.label} switched off`:`${e.label} back to automatic`,onOk:s});return(0,t.jsx)(Z.SettingDialogContent,{title:e.label,description:e.hint,footer:(0,t.jsxs)(t.Fragment,{children:[a&&(0,t.jsx)(k.Button,{variant:"ghost",loading:d,onClick:()=>c(e.key),children:e.kind?"Turn off":"Automatic"}),(0,t.jsx)(k.Button,{variant:"ghost",onClick:n,children:"Close"})]}),children:(0,t.jsx)(A.ModelPicker,{kind:e.kind,provider:i.provider,model:i.model,onChange:t=>{l(t),t.model.trim()&&o(e.key,`${t.provider}/${t.model.trim()}`)}})})}function ep({entry:e,choices:n,onDone:r}){let{data:a}=(0,U.useServerRoute)(b.queryKey.config),i=a?.find(t=>t.key===e.key)?.value,l=()=>{(0,U.revalidate)(b.queryKey.config),r()},[s,o]=(0,G.useServerAction)(_.setConfigAction,{okMessage:`${e.label} saved`,onOk:l}),[c,d]=(0,G.useServerAction)(I,{okMessage:e.kind?`${e.label} switched off`:`${e.label} back to automatic`,onOk:l});return(0,t.jsx)(Z.SettingDialogContent,{title:e.label,description:e.hint,footer:(0,t.jsxs)(t.Fragment,{children:[i&&(0,t.jsx)(k.Button,{variant:"ghost",loading:d,onClick:()=>c(e.key),children:e.kind?"Turn off":"Automatic"}),(0,t.jsx)(k.Button,{variant:"ghost",onClick:r,children:"Close"})]}),children:(0,t.jsx)(Z.SettingChoiceRows,{options:n.map(e=>({value:e.value,label:e.label,disabled:!(0,T.isConfigSet)(a,e.needs)&&`needs ${e.needs}`})),value:i,onChange:t=>s(e.key,t),disabled:o})})}function eg({entry:e,onDone:n}){let{data:r}=(0,U.useServerRoute)(b.queryKey.config),a=(0,T.isConfigSet)(r,e.key),i=eo(e,a),l=ec(e,a),s=l.data?ed(l.data):null,[o,c]=(0,G.useServerAction)(I,{okMessage:`Signed out of ${e.label}`,onOk:()=>{(0,U.revalidate)(b.queryKey.config),(0,U.revalidate)(b.queryKey.llmModel),n()}});return(0,t.jsx)(Z.SettingDialogContent,{title:e.label,description:a?(0,t.jsxs)(t.Fragment,{children:["Signed in ·"," ",(0,t.jsx)("span",{className:"font-mono",children:eu(l.data,i)}),s&&(0,t.jsxs)(t.Fragment,{children:[" · ",(0,t.jsx)("span",{className:(0,V.cn)("font-mono",s.ink),children:s.text})]})]}):"Sign in with your ChatGPT account instead of a key",footer:(0,t.jsxs)(t.Fragment,{children:[a&&(0,t.jsx)(k.Button,{variant:"ghost",loading:c,onClick:()=>o(e.key),children:"Sign out"}),(0,t.jsx)(k.Button,{variant:"ghost",onClick:n,children:a?"Close":"Cancel"}),!a&&(0,t.jsx)(S.ChatGptSignIn,{})]}),children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(Z.SettingNote,{children:a?"Bots on this subscription spend your plan's usage, not a key. When it runs out, the job stops and says when it resets.":"The sign-in opens in its own window. Approve it there, and this turns to signed in by itself."}),l.data&&"refused"in l.data&&(0,t.jsx)(Z.SettingNote,{className:"wrap-break-word text-destructive",children:l.data.refused})]})})}function ex(e,n){return M.notify.component({className:"sm:max-w-md",renderer:({close:r})=>(0,t.jsx)(ey,{entry:e,set:n,onDone:r})})}function ey({entry:e,set:n,onDone:r}){let[a,i]=(0,y.useState)(""),{data:l}=es(e,n),s=l?el(n,!1,l):null,o=()=>{(0,U.revalidate)(b.queryKey.config),(0,U.revalidate)(b.queryKey.llmModel)},[c,d]=(0,G.useServerAction)(_.setConfigAction,{okMessage:`${e.label} key saved`,onOk:()=>{o(),r()}}),[u,h]=(0,G.useServerAction)(I,{okMessage:`${e.label} key removed`,onOk:()=>{o(),r()}});return(0,t.jsx)(Z.SettingDialogContent,{title:e.label,description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-mono",children:e.key}),e.hint&&(0,t.jsxs)(t.Fragment,{children:[" · ",e.hint]}),s&&(0,t.jsxs)(t.Fragment,{children:[" · ",(0,t.jsx)("span",{className:(0,V.cn)("font-mono",s.ink),children:s.text})]})]}),footer:(0,t.jsxs)(t.Fragment,{children:[n&&(0,t.jsx)(k.Button,{variant:"ghost",loading:h,onClick:()=>u(e.key),children:"Remove"}),(0,t.jsx)(k.Button,{variant:"ghost",onClick:r,children:"Cancel"}),(0,t.jsx)(k.Button,{loading:d,disabled:a.trim().length<8,onClick:()=>c(e.key,a),children:n?"Replace":"Save"})]}),children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.Input,{value:a,onChange:e=>i(e.target.value),onKeyDown:t=>{"Enter"===t.key&&a.trim().length>=8&&c(e.key,a)},placeholder:n?"New value — replaces the current key":e.key,spellCheck:!1,type:"password",autoFocus:!0}),l&&"refused"in l&&(0,t.jsx)(Z.SettingNote,{className:"wrap-break-word text-destructive",children:l.refused})]})})}e.s(["AccountsSetup",0,function({withoutVoice:e=!1}){let{data:n}=(0,U.useServerRoute)(b.queryKey.config),r=e=>(0,T.isConfigSet)(n,e),a=e=>T.CONFIG_GROUPS.find(t=>t.id===e)?.entries??[],[i,l]=(0,y.useState)(!1),s=a("voice"),o=[...s,...a("text")],c=o.filter((t,n)=>(n<4||r(t.key))&&!(e&&s.includes(t))),d=o.filter(t=>!c.includes(t)&&!(e&&s.includes(t)));return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("div",{className:"flex flex-col gap-2",children:a("easy").map(e=>(0,t.jsx)(ea,{card:!0,narrow:!0,entry:e,set:r(e.key),needed:!1},e.key))}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-y-2.5",children:[c.map(e=>(0,t.jsx)(en,{entry:e,set:r(e.key)},e.key)),d.length>0&&(0,t.jsxs)(w.Popover,{open:i,onOpenChange:l,children:[(0,t.jsxs)(w.PopoverTrigger,{"aria-label":`${d.length} more providers`,className:"group flex w-17 flex-col items-center gap-1.5 rounded-xl py-1 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)("span",{className:"grid size-10.5 place-items-center rounded-[13px] bg-muted/60 text-muted-foreground transition-colors group-hover:bg-muted",children:(0,t.jsx)(h.default,{className:"size-4"})}),(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground",children:"More"})]}),(0,t.jsx)(w.PopoverContent,{align:"end",className:"w-78 flex-row flex-wrap gap-0 gap-y-2.5 rounded-2xl p-2.5",onClick:()=>l(!1),children:d.map(e=>(0,t.jsx)(en,{entry:e,set:r(e.key)},e.key))})]})]}),a("search").map(e=>(0,t.jsx)(ea,{card:!0,narrow:!0,entry:e,set:r(e.key),needed:!1},e.key))]})},"KeysSetting",0,()=>(0,t.jsx)(et,{screen:"keys"}),"ModelsSetting",0,()=>(0,t.jsx)(et,{screen:"models"}),"PhoneSetting",0,()=>(0,t.jsx)(et,{screen:"phone"})],805995)},992112,149666,e=>{"use strict";var t=e.i(681307),n=e.i(981203),r=e.i(413168),a=e.i(265402);let i={id:"openai",label:"OpenAI",apiKeyName:a.TEXT_MODEL_PROVIDERS.openai.apiKeyName},l=a.TEXT_MODEL_PROVIDERS.openai.suggestModels,s=["none","minimal","low","medium","high","xhigh"],o=t.z.string().max(n.COMMON_VALIDATE.prompt.max).default(""),c=t.z.object({voice:t.z.string().trim().min(1).max(128).default("marin"),voicePrompt:o,backendModel:t.z.string().trim().min(1).max(128).default(r.LIVE_BACKEND_MODEL),backendPrompt:o,reasoningEffort:t.z.enum(s).nullable().default("low"),webSearch:t.z.boolean().default(!0)}),d=c.parse({});e.s(["LIVE_BACKEND_MODELS",0,l,"LIVE_DEFAULTS",0,d,"LIVE_PROVIDER",0,i,"LIVE_REASONING",0,s,"LIVE_VOICES",0,["marin","cedar","gleam","meridian","quartz","ripple","vesper","willow","stone","bossa","tempo","beacon","delta","cinder","alloy","ash","ballad","coral","echo","sage","shimmer","verse"],"LIVE_VOICE_NOTE",0,{gleam:"North American · feminine",meridian:"North American · masculine",quartz:"Australian · feminine",ripple:"Australian · masculine",vesper:"British · masculine",willow:"Irish · feminine",stone:"Irish · masculine",bossa:"Portuguese · feminine",tempo:"Portuguese · masculine",beacon:"Filipino · masculine",delta:"Southern U.S. · feminine",cinder:"Southern U.S. · masculine"},"LiveSettingsSchema",0,c,"migrateLiveSettings",0,function(e){let n=e&&"object"==typeof e?e:{},{model:r,systemPrompt:a,...i}=n,l=t.z.object({provider:t.z.string(),voice:t.z.string().nullish(),backendModel:t.z.string().nullish()}).safeParse(r),s=l.success&&"openai"===l.data.provider?l.data:null,o={voice:n.voice??s?.voice,voicePrompt:n.voicePrompt??a,backendModel:n.backendModel??s?.backendModel,backendPrompt:n.backendPrompt??a,reasoningEffort:n.reasoningEffort,webSearch:n.webSearch},u=Object.fromEntries(Object.keys(o).map(e=>{let t=c.shape[e].safeParse(o[e]);return[e,t.success?t.data:d[e]]}));return{...i,...u}},"voiceSamplePath",0,e=>`/voices/${e}.ogg`],149666);var u=e.i(36174);let h=[i.apiKeyName],f={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},m={image:{label:"Image model",hint:"What bots draw with"},video:{label:"Video model",hint:"What bots film with — minutes a clip"},speech:{label:"Speech model",hint:"What reads text aloud into a file"},transcription:{label:"Transcription model",hint:"What turns a recording into text"}},p="EXA_API_KEY",g="DEFAULT_MODEL",x={key:g,label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:a.TEXT_MODEL_PROVIDER_LIST.flatMap(e=>e.suggestModels.map(t=>({value:`${e.id}/${t.id}`,label:`${e.label} \xb7 ${t.label}`,needs:e.apiKeyName})))},y=e=>h.includes(e.apiKeyName),b=e=>!!e.signIn||"vercel-ai-gateway"===e.id,k=e=>({key:e.apiKeyName,label:e.label,provider:e.id,signIn:e.signIn}),v=[{id:"voice",title:"voice",hint:"calls run on this key",section:"keys",require:"any",note:"required for calls",entries:a.TEXT_MODEL_PROVIDER_LIST.filter(y).map(k)},{id:"easy",title:"the easy ways",hint:"one sign-in or one key opens every bot",section:"keys",require:"none",entries:a.TEXT_MODEL_PROVIDER_LIST.filter(b).map(e=>({...k(e),..."vercel-ai-gateway"===e.id&&{recommended:!0}}))},{id:"text",title:"or a provider's own key",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:a.TEXT_MODEL_PROVIDER_LIST.filter(e=>!y(e)&&!b(e)).map(k)},{id:"search",title:"search",hint:"how calls and bots look things up — one key, or their own model's",section:"keys",require:"none",entries:[{key:p,label:"Exa",hint:"web search in one call — dashboard.exa.ai",site:"exa.ai"}]},{id:"phone",title:"phone",hint:"write to Thursday from a chat app — nothing is opened to the outside",section:"keys",require:"none",entries:[{key:u.TELEGRAM_TOKEN_KEY,label:"Telegram",site:"telegram.org",hint:"a bot token from @BotFather — then write to your bot, and allow it here"},{key:u.DISCORD_TOKEN_KEY,label:"Discord",site:"discord.com",hint:"a bot token from discord.com/developers — add the bot to a server of yours, then write to it directly"},{key:u.SLACK_APP_TOKEN_KEY,label:"Slack · app token",site:"slack.com",hint:"starts with xapp- — opens the connection. Slack takes this and the bot token"},{key:u.SLACK_BOT_TOKEN_KEY,label:"Slack · bot token",site:"slack.com",hint:"starts with xoxb- — speaks as the app"}]},{id:"bots",title:"Bots",hint:"what a bot runs on when it has not picked its own — start small: a small model is quick and costs little",section:"models",require:"none",entries:[x]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one",section:"models",require:"none",entries:Object.keys(f).map(e=>({key:f[e],...m[e],kind:e,choices:a.MEDIA_MODEL_PROVIDER_LIST.flatMap(t=>t.models[e].map(e=>({value:`${t.id}/${e.id}`,label:`${t.label} \xb7 ${e.label}`,needs:t.apiKeyName})))}))}];Object.fromEntries(v.flatMap(e=>e.entries).map(e=>[e.key,e])),v.flatMap(e=>e.entries.map(e=>e.key)),Object.fromEntries(v.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices])),e.s(["CONFIG_GROUPS",0,v,"DEFAULT_MODEL_KEY",0,g,"EXA_API_KEY",0,p,"MEDIA_MODEL_KEYS",0,f,"groupSatisfied",0,function(e,t){return"none"===e.require||(e.requireKeys??e.entries.map(e=>e.key)).some(t)},"isConfigSet",0,function(e,t){return e?.some(e=>e.key===t&&e.set)??!1},"mediaModelWords",0,e=>`${"image"===e?"an":"a"} ${e} model`],992112)},24133,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("7f599fc8e94d2661399fea62d9255c1e7298176a89",t.callServer,void 0,t.findSourceMapURL,"setConfigAction");e.s(["setConfigAction",0,n])},36174,e=>{"use strict";let t="TELEGRAM_BOT_TOKEN",n="DISCORD_BOT_TOKEN",r="SLACK_APP_TOKEN",a="SLACK_BOT_TOKEN";e.s(["DISCORD_TOKEN_KEY",0,n,"REACH_CHANNELS",0,["telegram","discord","slack"],"REACH_KEYS",0,{telegram:[t],discord:[n],slack:[r,a]},"REACH_LABEL",0,{telegram:"Telegram",discord:"Discord",slack:"Slack"},"SLACK_APP_TOKEN_KEY",0,r,"SLACK_BOT_TOKEN_KEY",0,a,"TELEGRAM_TOKEN_KEY",0,t])},218080,e=>{"use strict";let t=[1,3,5,8,13,21,34,55,90],n=[1,1.1,1.25,1.45,1.7,2,2.4,2.9],r=n.length,a=Array(r).fill(0);function i(e,a,i){e.getByteFrequencyData(a);for(let e=0;e<r;e++){let r=0,l=t[e],s=Math.min(t[e+1],a.length);for(let e=l;e<s;e++)r+=a[e];let o=s>l?r/(s-l)/255:0;i[e]=Math.min(1,o*n[e])}return i}e.s(["SPECTRUM_BANDS",0,r,"createAudioTap",0,function(){let e=new Audio;e.autoplay=!0;let t=null,n=null,l=new Uint8Array(0),s=null,o=Array(r).fill(0),c=null,d=new Uint8Array(0),u=null,h=Array(r).fill(0),f=new Uint8Array(512);function m(){if(t&&n)return{context:t,analyser:n};let e=new AudioContext,r=e.createAnalyser();return r.fftSize=512,r.smoothingTimeConstant=.55,l=new Uint8Array(r.frequencyBinCount),e.resume().catch(()=>{}),t=e,n=r,{context:e,analyser:r}}return{element:e,open:m,levels:()=>{var e;return{output:(e=n)?(e.getByteTimeDomainData(f),Math.sqrt(f.reduce((e,t)=>e+((t-128)/128)**2,0)/f.length)):0}},listen(e){if(s?.mediaStream===e)return;s?.disconnect();let t=m();(s=t.context.createMediaStreamSource(e)).connect(t.analyser),t.context.resume()},hear(e){if(u?.mediaStream===e)return;u?.disconnect();let t=m();c||((c=t.context.createAnalyser()).fftSize=512,c.smoothingTimeConstant=.6,d=new Uint8Array(c.frequencyBinCount)),(u=t.context.createMediaStreamSource(e)).connect(c),t.context.resume()},read:()=>n?i(n,l,o):a,readMic:()=>c?i(c,d,h):a}},"createClipTap",0,function(e){let t=new AudioContext,n=t.createAnalyser();n.fftSize=512,n.smoothingTimeConstant=.55;let a=new Uint8Array(n.frequencyBinCount),l=Array(r).fill(0);return t.createMediaElementSource(e).connect(n),n.connect(t.destination),{resume:()=>t.resume().catch(()=>{}),read:()=>i(n,a,l),close:()=>t.close().catch(()=>{})}},"createVoiceFollower",0,function(){let e=Array(r).fill(0),t=Array(r).fill(0),n={level:0,phrase:0,onset:0,bands:Array(r).fill(0)},a=0,i=0,l=1/0,s=(e,t,n,r)=>e+(t-e)*Math.min(1,r/n);return{read(o,c){let d=0,u=0,h=0;for(let a=0;a<r;a++){let r=o[a]??0;d+=r,e[a]=s(e[a],r,r>e[a]?.03:2.5,c),t[a]=s(t[a],r,r<t[a]?.12:3,c);let i=e[a]-t[a],l=i>.12?Math.min(1,Math.max(0,(r-t[a])/i)):0;n.bands[a]=l,i>.12&&(u+=l,h++)}let f=Math.min(1,Math.max(0,(d/r-.06)/.14)),m=f*f*(3-2*f);for(let e=0;e<r;e++)n.bands[e]*=m;return n.level=(h?u/h:0)*m,a=s(a,n.level,.05,c),i=s(i,n.level,.22,c),n.phrase=s(n.phrase,n.level,.45,c),l+=c,n.onset=0,a>i+.1&&a>.3&&l>.12&&(l=0,n.onset=Math.min(1,a)),n}}}])},33383,e=>{"use strict";var t=e.i(271645),n=e.i(108868),r=e.i(145484),a=e.i(146376);e.s(["useAnchoredPopupScrollLock",0,function(e,i,l,s){let[o,c]=t.useState(!1);(0,a.useIsoLayoutEffect)(()=>{if(!e||!i||null==l)return void c(!1);let t=(0,n.ownerDocument)(l).documentElement.clientWidth,r=l.offsetWidth;c(t>0&&r>0&&r>=t-20)},[e,i,l]),(0,r.useScrollLock)(e&&(!i||o),s)}])},989366,e=>{"use strict";var t=e.i(55545),n=e.i(455024),r=e.i(99151),a=e.i(845110),i=e.i(281092),l=e.i(234662);e.s(["formatDistanceStrict",0,function(e,s,o){var c;let d,u,h=(0,n.getDefaultOptions)(),f=o?.locale??h.locale??t.defaultLocale,m=(u=(0,i.toDate)(e)-(0,i.toDate)(s))<0?-1:u>0?1:u;if(isNaN(m))throw RangeError("Invalid time value");let p=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:m}),[g,x]=(0,a.normalizeDates)(o?.in,...m>0?[s,e]:[e,s]),y=(c=o?.roundingMethod??"round",e=>{let t=(c?Math[c]:Math.trunc)(e);return 0===t?0:t}),b=x.getTime()-g.getTime(),k=b/l.millisecondsInMinute,v=(b-((0,r.getTimezoneOffsetInMilliseconds)(x)-(0,r.getTimezoneOffsetInMilliseconds)(g)))/l.millisecondsInMinute,M=o?.unit;if("second"===(d=M||(k<1?"second":k<60?"minute":k<l.minutesInDay?"hour":v<l.minutesInMonth?"day":v<l.minutesInYear?"month":"year"))){let e=y(b/1e3);return f.formatDistance("xSeconds",e,p)}if("minute"===d){let e=y(k);return f.formatDistance("xMinutes",e,p)}if("hour"===d){let e=y(k/60);return f.formatDistance("xHours",e,p)}if("day"===d){let e=y(v/l.minutesInDay);return f.formatDistance("xDays",e,p)}if("month"===d){let e=y(v/l.minutesInMonth);return 12===e&&"month"!==M?f.formatDistance("xYears",1,p):f.formatDistance("xMonths",e,p)}else{let e=y(v/l.minutesInYear);return f.formatDistance("xYears",e,p)}}],989366)},493801,e=>{"use strict";var t=e.i(24708),n=e.i(989366);e.s(["formatDistanceToNowStrict",0,function(e,r){return(0,n.formatDistanceStrict)(e,(0,t.constructNow)(e),r)}])},508734,e=>{"use strict";var t=e.i(456420);let n={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};n.node;let r=(0,t.default)(n);e.s(["Copy",0,r],508734)},560972,e=>{"use strict";var t=e.i(456420);let n={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};n.node;let r=(0,t.default)(n);e.s(["default",0,r])},815170,e=>{"use strict";var t=e.i(456420);let n={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};n.node;let r=(0,t.default)(n);e.s(["Image",0,r],815170)},611568,e=>{"use strict";var t=e.i(758379);e.s(["LoaderCircle",()=>t.default])},986206,e=>{"use strict";var t=e.i(456420);let n={name:"smartphone",size:24,node:[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]};n.node;let r=(0,t.default)(n);e.s(["Smartphone",0,r],986206)},466787,e=>{"use strict";var t=e.i(755566);e.s(["TriangleAlert",()=>t.default])}]);
@@ -12,4 +12,4 @@
12
12
  stroke: revert;
13
13
  stroke-width: revert;
14
14
  }
15
- `,"getIconStyles");t.s(["getIconStyles",0,e])},58137,t=>{"use strict";var e=t.i(60231),r=t.i(419524),a=t.i(139941);t.i(947716);var i=t.i(723685),s=(0,r.__name)((t,e)=>{let r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)r.attr(t,e.attrs[t]);return e.class&&r.attr("class",e.class),r},"drawRect"),l=(0,r.__name)((t,e)=>{s(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"),n=(0,r.__name)((t,r)=>{let a=r.text.replace(e.lineBreakRegex," "),i=t.append("text");i.attr("x",r.x),i.attr("y",r.y),i.attr("class","legend"),i.style("text-anchor",r.anchor),r.class&&i.attr("class",r.class);let s=i.append("tspan");return s.attr("x",r.x+2*r.textMargin),s.text(a),i},"drawText"),o=(0,r.__name)((t,e,r,i)=>{let s=t.append("image");s.attr("x",e),s.attr("y",r);let l=(0,a.sanitizeUrl)(i);s.attr("xlink:href",l)},"drawImage"),d=(0,r.__name)((t,e,r,i)=>{let s=t.append("use");s.attr("x",e),s.attr("y",r);let l=(0,a.sanitizeUrl)(i);s.attr("xlink:href",`#${l}`)},"drawEmbeddedImage"),c=(0,r.__name)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),x=(0,r.__name)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),g=(0,r.__name)(()=>{let t=(0,i.select)(".mermaidTooltip");return t.empty()&&(t=(0,i.select)("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");t.s(["createTooltip",0,g,"drawBackgroundRect",0,l,"drawEmbeddedImage",0,d,"drawImage",0,o,"drawRect",0,s,"drawText",0,n,"getNoteRect",0,c,"getTextObj",0,x])},117204,t=>{"use strict";var e=t.i(60231),r=t.i(508324),a=t.i(419524),i=(0,a.__name)((t,a,i,n)=>{t.attr("class",i);let{width:o,height:d,x:c,y:x}=s(t,a);(0,e.configureSvgSize)(t,d,o,n);let g=l(c,x,o,d,a);t.attr("viewBox",g),r.log.debug(`viewBox configured: ${g} with padding: ${a}`)},"setupViewPortForSVG"),s=(0,a.__name)((t,e)=>{let r=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+2*e,height:r.height+2*e,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),l=(0,a.__name)((t,e,r,a,i)=>`${t-i} ${e-i} ${r} ${a}`,"createViewBox");t.s(["setupViewPortForSVG",0,i])},248585,t=>{"use strict";var e=t.i(419524);t.i(947716);var r=t.i(723685),a=(0,e.__name)((t,e)=>{let a;return"sandbox"===e&&(a=(0,r.select)("#i"+t)),("sandbox"===e?(0,r.select)(a.nodes()[0].contentDocument.body):(0,r.select)("body")).select(`[id="${t}"]`)},"getDiagramElement");t.s(["getDiagramElement",0,a])},595016,t=>{"use strict";var e=t.i(499272);t.i(248585),t.i(117204),t.i(121292),t.i(58137),t.i(369110),t.i(382793),t.i(502056),t.i(217248),t.i(224797),t.i(836333),t.i(29836),t.i(447804),t.i(60231),t.i(508324);var r=t.i(419524),a={parser:e.classDiagram_default,get db(){return new e.ClassDB},renderer:e.classRenderer_v3_unified_default,styles:e.styles_default,init:(0,r.__name)(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};t.s(["diagram",0,a])}]);
15
+ `,"getIconStyles");t.s(["getIconStyles",0,e])},58137,t=>{"use strict";var e=t.i(60231),r=t.i(419524),a=t.i(779879);t.i(947716);var i=t.i(723685),s=(0,r.__name)((t,e)=>{let r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)r.attr(t,e.attrs[t]);return e.class&&r.attr("class",e.class),r},"drawRect"),l=(0,r.__name)((t,e)=>{s(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"),n=(0,r.__name)((t,r)=>{let a=r.text.replace(e.lineBreakRegex," "),i=t.append("text");i.attr("x",r.x),i.attr("y",r.y),i.attr("class","legend"),i.style("text-anchor",r.anchor),r.class&&i.attr("class",r.class);let s=i.append("tspan");return s.attr("x",r.x+2*r.textMargin),s.text(a),i},"drawText"),o=(0,r.__name)((t,e,r,i)=>{let s=t.append("image");s.attr("x",e),s.attr("y",r);let l=(0,a.sanitizeUrl)(i);s.attr("xlink:href",l)},"drawImage"),d=(0,r.__name)((t,e,r,i)=>{let s=t.append("use");s.attr("x",e),s.attr("y",r);let l=(0,a.sanitizeUrl)(i);s.attr("xlink:href",`#${l}`)},"drawEmbeddedImage"),c=(0,r.__name)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),x=(0,r.__name)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),g=(0,r.__name)(()=>{let t=(0,i.select)(".mermaidTooltip");return t.empty()&&(t=(0,i.select)("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");t.s(["createTooltip",0,g,"drawBackgroundRect",0,l,"drawEmbeddedImage",0,d,"drawImage",0,o,"drawRect",0,s,"drawText",0,n,"getNoteRect",0,c,"getTextObj",0,x])},117204,t=>{"use strict";var e=t.i(60231),r=t.i(508324),a=t.i(419524),i=(0,a.__name)((t,a,i,n)=>{t.attr("class",i);let{width:o,height:d,x:c,y:x}=s(t,a);(0,e.configureSvgSize)(t,d,o,n);let g=l(c,x,o,d,a);t.attr("viewBox",g),r.log.debug(`viewBox configured: ${g} with padding: ${a}`)},"setupViewPortForSVG"),s=(0,a.__name)((t,e)=>{let r=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+2*e,height:r.height+2*e,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),l=(0,a.__name)((t,e,r,a,i)=>`${t-i} ${e-i} ${r} ${a}`,"createViewBox");t.s(["setupViewPortForSVG",0,i])},248585,t=>{"use strict";var e=t.i(419524);t.i(947716);var r=t.i(723685),a=(0,e.__name)((t,e)=>{let a;return"sandbox"===e&&(a=(0,r.select)("#i"+t)),("sandbox"===e?(0,r.select)(a.nodes()[0].contentDocument.body):(0,r.select)("body")).select(`[id="${t}"]`)},"getDiagramElement");t.s(["getDiagramElement",0,a])},595016,t=>{"use strict";var e=t.i(499272);t.i(248585),t.i(117204),t.i(121292),t.i(58137),t.i(369110),t.i(382793),t.i(502056),t.i(217248),t.i(224797),t.i(836333),t.i(29836),t.i(447804),t.i(60231),t.i(508324);var r=t.i(419524),a={parser:e.classDiagram_default,get db(){return new e.ClassDB},renderer:e.classRenderer_v3_unified_default,styles:e.styles_default,init:(0,r.__name)(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};t.s(["diagram",0,a])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,8912,e=>{"use strict";var s=e.i(843476),t=e.i(437750),i=e.i(758925),n=e.i(97923),a=e.i(456420);let o={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};o.node;let r=(0,a.default)(o),l={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};l.node;let d=(0,a.default)(l);var c=e.i(263676),u=e.i(511769),h=e.i(798120),p=e.i(167881),m=e.i(917162),x=e.i(818125),g=e.i(635963),f=e.i(895836),k=e.i(245629),y=e.i(609856),b=e.i(283653),j=e.i(647163),v=e.i(95187);let N=(0,v.createServerReference)("7fe1d039254156c2ed313171ea448ee9fc263728ce",v.callServer,void 0,v.findSourceMapURL,"removeSignInAction");var w=e.i(446558);let S=[[t.AppWindow,"A bot opens a window","When its work needs you signed in to a site, it opens that site on your screen and asks."],[n.LogIn,"You sign in there","The app keeps that sign-in here — the site's session, never your password."],[d,"Only that bot uses it","Later work is signed in without asking. Another bot has to ask you first."]];function z(){return(0,s.jsx)("ol",{className:"grid gap-3 pb-5 sm:grid-cols-3",children:S.map(([e,t,i],n)=>(0,s.jsxs)("li",{className:"flex gap-3 rounded-xl bg-muted/40 p-3.5",children:[(0,s.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-background text-muted-foreground ring-1 ring-border/60",children:(0,s.jsx)(e,{className:"size-4"})}),(0,s.jsxs)("span",{className:"min-w-0 space-y-0.5",children:[(0,s.jsxs)("span",{className:"block text-[13px] font-medium",children:[n+1,". ",t]}),(0,s.jsx)("span",{className:"block text-xs leading-relaxed text-muted-foreground",children:i})]})]},t))})}function A({signIn:e,bots:t}){let n=()=>(0,b.revalidate)(h.queryKey.signIns),[a,o]=(0,y.useServerAction)(w.setSignInBotAction,{onOk:n}),[l,d]=(0,y.useServerAction)(N,{onOk:n}),u=async()=>{await m.notify.confirm({title:`Sign out of ${e.site}?`,description:"What is kept here is removed, and the bots that used it ask you to sign in again. The site itself may still list the session until it ends it.",okText:"Sign out",destructive:!0})&&l(e.site).catch(()=>{})};return(0,s.jsxs)("div",{className:"flex flex-col gap-2.5 p-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-xl bg-muted/60",children:(0,s.jsx)(x.SiteIcon,{host:e.site,className:"size-5 rounded-[5px]",fallback:(0,s.jsx)(i.KeyRound,{className:"size-4 text-muted-foreground"})})}),(0,s.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,s.jsx)("span",{className:"block truncate text-sm font-medium",children:e.site}),(0,s.jsx)("span",{className:"block truncate text-[13px] text-muted-foreground",children:e.account})]}),(0,s.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:e.usedAt?`used ${(0,k.whenOf)(e.usedAt)}`:`kept ${(0,k.whenOf)(e.keptAt)}`}),(0,s.jsxs)(p.Button,{variant:"outline",size:"sm",loading:d,onClick:()=>void u(),children:[(0,s.jsx)(r,{}),"Sign out"]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 pl-13",children:[e.bots.map(i=>(0,s.jsxs)("span",{className:"flex h-7 items-center gap-1.5 rounded-full bg-muted/60 pr-1 pl-1.5 text-[13px]",children:[(0,s.jsx)(g.BotMark,{size:18,seed:i,...I(i,t)}),i,(0,s.jsx)("button",{type:"button",disabled:o,"aria-label":`${i} may no longer use it`,onClick:()=>void a(e.site,i,!1).catch(()=>{}),className:"grid size-5 place-items-center rounded-full text-muted-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,s.jsx)(c.X,{className:"size-3"})})]},i)),0===e.bots.length&&0===e.asking.length&&(0,s.jsx)("span",{className:"text-[13px] text-muted-foreground",children:"No bot may use it. One that needs it will ask."}),e.asking.map(i=>(0,s.jsxs)("span",{className:(0,j.cn)("flex h-7 items-center gap-1.5 rounded-full pr-1 pl-1.5 text-[13px] ring-1 ring-border ring-inset",j.WAITING_INK),children:[(0,s.jsx)(g.BotMark,{size:18,seed:i,...I(i,t)}),i," asks",(0,s.jsx)(p.Button,{size:"sm",variant:"secondary",className:"h-5 rounded-full px-2 text-[11px]",disabled:o,onClick:()=>void a(e.site,i,!0).catch(()=>{}),children:"Allow"})]},i))]})]})}let I=(e,s)=>{let t=s?.find(s=>s.name===e)?.icon;return{color:t?.color,shape:t?.shape,outline:t?.outline,paint:t?.paint,notify:!1}};e.s(["SignInsSetting",0,function(){let{data:e,isLoading:t,error:i}=(0,b.useServerRoute)(h.queryKey.signIns),{data:n}=(0,b.useServerRoute)(h.queryKey.bot);if((0,u.useAppEvent)({signins:()=>void(0,b.revalidate)(h.queryKey.signIns)}),t)return(0,s.jsx)(f.SettingSkeleton,{rows:3});if(i)return(0,s.jsx)(f.SettingError,{message:i.message});let a=e??[];return(0,s.jsxs)(f.SettingScreen,{footer:(0,s.jsx)(f.SettingRailNote,{children:"A site's session as the browser held it — never a password. Kept on this machine, outside the folder the bots work in."}),children:[(0,s.jsx)(z,{}),(0,s.jsx)(f.SettingItems,{children:0===a.length?(0,s.jsx)("p",{className:"p-4 text-sm leading-relaxed text-muted-foreground",children:"Nothing is kept yet. When a bot needs you signed in somewhere, it opens a window for you to sign in — and that sign-in is kept here for its later work."}):a.map(e=>(0,s.jsx)(A,{signIn:e,bots:n},e.site))})]})}],8912)},437750,e=>{"use strict";var s=e.i(456420);let t={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};t.node;let i=(0,s.default)(t);e.s(["AppWindow",0,i],437750)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,8912,e=>{"use strict";var s=e.i(843476),t=e.i(437750),i=e.i(758925),n=e.i(97923),a=e.i(456420);let o={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};o.node;let r=(0,a.default)(o),d={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};d.node;let l=(0,a.default)(d);var c=e.i(263676),u=e.i(511769),h=e.i(798120),p=e.i(167881),m=e.i(917162),x=e.i(818125),g=e.i(635963),f=e.i(895836),k=e.i(245629),b=e.i(609856),y=e.i(283653),j=e.i(647163),v=e.i(95187);let N=(0,v.createServerReference)("7f25f48f714d55b29b84556cb6a6edd9daedb55d52",v.callServer,void 0,v.findSourceMapURL,"removeSignInAction");var w=e.i(328752);let S=[[t.AppWindow,"A bot opens a window","When its work needs you signed in to a site, it opens that site on your screen and asks."],[n.LogIn,"You sign in there","The app keeps that sign-in here — the site's session, never your password."],[l,"Only that bot uses it","Later work is signed in without asking. Another bot has to ask you first."]];function z(){return(0,s.jsx)("ol",{className:"grid gap-3 pb-5 sm:grid-cols-3",children:S.map(([e,t,i],n)=>(0,s.jsxs)("li",{className:"flex gap-3 rounded-xl bg-muted/40 p-3.5",children:[(0,s.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-background text-muted-foreground ring-1 ring-border/60",children:(0,s.jsx)(e,{className:"size-4"})}),(0,s.jsxs)("span",{className:"min-w-0 space-y-0.5",children:[(0,s.jsxs)("span",{className:"block text-[13px] font-medium",children:[n+1,". ",t]}),(0,s.jsx)("span",{className:"block text-xs leading-relaxed text-muted-foreground",children:i})]})]},t))})}function A({signIn:e,bots:t}){let n=()=>(0,y.revalidate)(h.queryKey.signIns),[a,o]=(0,b.useServerAction)(w.setSignInBotAction,{onOk:n}),[d,l]=(0,b.useServerAction)(N,{onOk:n}),u=async()=>{await m.notify.confirm({title:`Sign out of ${e.site}?`,description:"What is kept here is removed, and the bots that used it ask you to sign in again. The site itself may still list the session until it ends it.",okText:"Sign out",destructive:!0})&&d(e.site).catch(()=>{})};return(0,s.jsxs)("div",{className:"flex flex-col gap-2.5 p-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-xl bg-muted/60",children:(0,s.jsx)(x.SiteIcon,{host:e.site,className:"size-5 rounded-[5px]",fallback:(0,s.jsx)(i.KeyRound,{className:"size-4 text-muted-foreground"})})}),(0,s.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,s.jsx)("span",{className:"block truncate text-sm font-medium",children:e.site}),(0,s.jsx)("span",{className:"block truncate text-[13px] text-muted-foreground",children:e.account})]}),(0,s.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:e.usedAt?`used ${(0,k.whenOf)(e.usedAt)}`:`kept ${(0,k.whenOf)(e.keptAt)}`}),(0,s.jsxs)(p.Button,{variant:"outline",size:"sm",loading:l,onClick:()=>void u(),children:[(0,s.jsx)(r,{}),"Sign out"]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 pl-13",children:[e.bots.map(i=>(0,s.jsxs)("span",{className:"flex h-7 items-center gap-1.5 rounded-full bg-muted/60 pr-1 pl-1.5 text-[13px]",children:[(0,s.jsx)(g.BotMark,{size:18,seed:i,...I(i,t)}),i,(0,s.jsx)("button",{type:"button",disabled:o,"aria-label":`${i} may no longer use it`,onClick:()=>void a(e.site,i,!1).catch(()=>{}),className:"grid size-5 place-items-center rounded-full text-muted-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,s.jsx)(c.X,{className:"size-3"})})]},i)),0===e.bots.length&&0===e.asking.length&&(0,s.jsx)("span",{className:"text-[13px] text-muted-foreground",children:"No bot may use it. One that needs it will ask."}),e.asking.map(i=>(0,s.jsxs)("span",{className:(0,j.cn)("flex h-7 items-center gap-1.5 rounded-full pr-1 pl-1.5 text-[13px] ring-1 ring-border ring-inset",j.WAITING_INK),children:[(0,s.jsx)(g.BotMark,{size:18,seed:i,...I(i,t)}),i," asks",(0,s.jsx)(p.Button,{size:"sm",variant:"secondary",className:"h-5 rounded-full px-2 text-[11px]",disabled:o,onClick:()=>void a(e.site,i,!0).catch(()=>{}),children:"Allow"})]},i))]})]})}let I=(e,s)=>{let t=s?.find(s=>s.name===e)?.icon;return{color:t?.color,shape:t?.shape,outline:t?.outline,paint:t?.paint,notify:!1}};e.s(["SignInsSetting",0,function(){let{data:e,isLoading:t,error:i}=(0,y.useServerRoute)(h.queryKey.signIns),{data:n}=(0,y.useServerRoute)(h.queryKey.bot);if((0,u.useAppEvent)({signins:()=>void(0,y.revalidate)(h.queryKey.signIns)}),t)return(0,s.jsx)(f.SettingSkeleton,{rows:3});if(i)return(0,s.jsx)(f.SettingError,{message:i.message});let a=e??[];return(0,s.jsxs)(f.SettingScreen,{footer:(0,s.jsx)(f.SettingRailNote,{children:"A site's session as the browser held it — never a password. Kept on this machine, outside the folder the bots work in."}),children:[(0,s.jsx)(z,{}),(0,s.jsx)(f.SettingItems,{children:0===a.length?(0,s.jsx)("p",{className:"p-4 text-sm leading-relaxed text-muted-foreground",children:"Nothing is kept yet. When a bot needs you signed in somewhere, it opens a window for you to sign in — and that sign-in is kept here for its later work."}):a.map(e=>(0,s.jsx)(A,{signIn:e,bots:n},e.site))})]})}],8912)},437750,e=>{"use strict";var s=e.i(456420);let t={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};t.node;let i=(0,s.default)(t);e.s(["AppWindow",0,i],437750)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,986530,e=>{"use strict";var t=e.i(843476),s=e.i(225913);e.i(271645);var l=e.i(647163);function i({className:e,...s}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,l.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...s})}e.i(652225);let a=(0,s.cva)("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});e.s(["Field",0,function({className:e,orientation:s="vertical",...i}){return(0,t.jsx)("div",{role:"group","data-slot":"field","data-orientation":s,className:(0,l.cn)(a({orientation:s}),e),...i})},"FieldContent",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"field-content",className:(0,l.cn)("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...s})},"FieldLabel",0,function({className:e,...s}){return(0,t.jsx)(i,{"data-slot":"field-label",className:(0,l.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...s})}],986530)},833959,e=>{"use strict";var t=e.i(843476),s=e.i(437750),l=e.i(856539),i=e.i(24071),a=e.i(867927),r=e.i(829600),n=e.i(226091),o=e.i(726067),d=e.i(91511),c=e.i(456420);let u={name:"mouse-pointer-2",size:24,node:[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]};u.node;let m=(0,c.default)(u);var x=e.i(77071),h=e.i(566595);let f={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};f.node;let p=(0,c.default)(f);var g=e.i(759659);let v={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};v.node;let j=(0,c.default)(v);var b=e.i(271645),k=e.i(798120),y=e.i(167881),N=e.i(986530),w=e.i(23750),S=e.i(683408),C=e.i(917162),z=e.i(671428),F=e.i(319036),M=e.i(127341),L=e.i(184762),R=e.i(41533),T=e.i(895836),A=e.i(95187);let D=(0,A.createServerReference)("7f71481f459417afb27d076b8972927f4808165aa6",A.callServer,void 0,A.findSourceMapURL,"createSkillAction"),$=(0,A.createServerReference)("7fc29cba484b0566586cce270b1195770f97f1f490",A.callServer,void 0,A.findSourceMapURL,"deleteSkillAction"),K=(0,A.createServerReference)("7f745110016d50db011a7ba27d2a04d32d7d0ce457",A.callServer,void 0,A.findSourceMapURL,"setSkillDisabledAction"),q=(0,A.createServerReference)("7f97d693ca586e4f61593fadfddcc65d3df878b978",A.callServer,void 0,A.findSourceMapURL,"uploadSkillAction");var P=e.i(609856),B=e.i(283653),O=e.i(647163);let U={browser:d.Globe,computer:s.AppWindow,"find-skills":h.Search,"interactive-page":m,"skill-creator":p};function I({skill:e}){let[s,i]=(0,P.useServerAction)($,{onOk:()=>(0,B.revalidate)(k.queryKey.skills)}),[r]=(0,P.useServerAction)(K,{onOk:()=>(0,B.revalidate)(k.queryKey.skills)}),n=async()=>{await C.notify.confirm({title:`Delete ${e.name}?`,description:"Every file in this skill is deleted for good.",okText:"Delete",destructive:!0})&&s(e.dir)},o="default"===e.source&&U[e.dir]||l.BookMarked;return(0,t.jsxs)("div",{className:"group flex items-center transition-colors hover:bg-muted/50",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>{var s;return s=e,C.notify.component({className:"sm:max-w-4xl",renderer:()=>(0,t.jsx)(W,{skill:s})})},className:"flex min-w-0 flex-1 items-center gap-3 py-4 pl-4 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:(0,O.cn)("grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",e.disabled&&"opacity-45"),children:(0,t.jsx)(o,{className:"size-4"})}),(0,t.jsxs)("span",{className:(0,O.cn)("min-w-0 flex-1 space-y-0.5",e.disabled&&"opacity-45"),children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.name}),(0,t.jsx)("span",{className:"line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:e.description})]}),(0,t.jsx)(a.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 group-hover:text-foreground"})]}),(0,t.jsxs)("div",{className:"mr-4 ml-5 flex w-18 shrink-0 items-center justify-end gap-3",children:[(0,t.jsx)(F.Switch,{checked:!e.disabled,onCheckedChange:t=>r(e.source,e.dir,!t),"aria-label":`${e.name} on or off`,className:"shrink-0"}),"custom"===e.source?(0,t.jsx)(y.Button,{size:"icon-sm",variant:"ghost",loading:i,onClick:n,className:"shrink-0 text-muted-foreground",children:(0,t.jsx)(g.Trash2,{})}):(0,t.jsx)("span",{className:"size-7 shrink-0"})]})]})}function W({skill:e}){let[s,l]=(0,b.useState)(""),[a,r]=(0,b.useState)("SKILL.md");return(0,t.jsx)(T.SettingDialogContent,{title:e.name,description:(0,t.jsx)(E,{skill:e,path:a??s}),children:(0,t.jsxs)("div",{className:"flex h-[36rem] divide-x divide-border/60 overflow-hidden rounded-xl border border-border/60 bg-background",children:[(0,t.jsxs)("div",{className:"flex w-44 shrink-0 flex-col overflow-y-auto bg-muted/20 py-1",children:[s&&(0,t.jsxs)("button",{type:"button",onClick:()=>l(s.split("/").slice(0,-1).join("/")),className:"mx-1 mb-1 flex items-center gap-1 rounded-md px-2 py-1 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/50 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)(i.ChevronLeft,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:s.split("/").pop()})]}),(0,t.jsx)(V,{source:e.source,dir:e.dir,path:s,current:a,onPick:e=>{let t=s?`${s}/${e.name}`:e.name;"dir"===e.kind?l(t):r(t)}})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 overflow-y-auto",children:a?(0,t.jsx)(Y,{source:e.source,dir:e.dir,path:a}):(0,t.jsx)("p",{className:"p-6 text-sm text-muted-foreground/60",children:"Pick a file"})})]})})}function E({skill:e,path:s}){if(!e)return(0,t.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground/60",children:"Pick a skill"});let l=[e.name,...s.split("/").filter(Boolean)];return(0,t.jsx)("span",{className:"flex min-w-0 items-center gap-1 font-mono text-[11px] text-muted-foreground",children:l.map((e,s)=>(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[s>0&&(0,t.jsx)(a.ChevronRight,{className:"size-3 shrink-0 opacity-50"}),(0,t.jsx)("span",{className:(0,O.cn)("truncate",s===l.length-1&&"text-foreground"),children:e})]},`${s}-${e}`))})}function H({icon:e,label:s,active:l,hasChildren:i,onClick:r}){return(0,t.jsxs)("button",{type:"button",onClick:r,className:(0,O.cn)("mx-1 flex items-center gap-1.5 rounded-md px-2 py-1 text-left text-xs outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",l?"bg-secondary text-foreground":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:[(0,t.jsx)("span",{className:"shrink-0 text-muted-foreground/70 [&>svg]:size-3",children:e}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:s}),i&&(0,t.jsx)(a.ChevronRight,{className:"size-3 shrink-0 text-muted-foreground/50"})]})}function V({source:e,dir:s,path:l,current:i,onPick:a}){let{data:d,isLoading:c,error:u}=(0,B.useServerRoute)(k.queryKey.skillNode(e,s,l));return u?(0,t.jsx)("p",{className:"p-3 font-mono text-xs text-destructive",children:u.message}):c||!d?(0,t.jsxs)("div",{className:"space-y-2 p-2",children:[(0,t.jsx)(z.Skeleton,{className:"h-5 w-full"}),(0,t.jsx)(z.Skeleton,{className:"h-5 w-4/5"})]}):"dir"!==d.kind?null:(0,t.jsxs)(t.Fragment,{children:[d.entries.map(e=>(0,t.jsx)(H,{icon:"dir"===e.kind?(0,t.jsx)(o.Folder,{}):e.name.endsWith(".md")?(0,t.jsx)(n.FileText,{}):(0,t.jsx)(r.File,{}),label:e.name,hasChildren:"dir"===e.kind,active:(l?`${l}/${e.name}`:e.name)===i,onClick:()=>a(e)},e.name)),0===d.entries.length&&(0,t.jsx)("p",{className:"p-3 text-xs text-muted-foreground/60",children:"Empty folder"})]})}function G({content:e}){let s=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(e),l=s?.[1].trim(),i=s?e.slice(s[0].length):e;return(0,t.jsxs)("div",{className:"min-w-0",children:[l&&(0,t.jsx)("pre",{className:"border-b border-border/60 bg-muted/20 px-5 py-3 font-mono text-[11px] leading-relaxed whitespace-pre-wrap text-muted-foreground",children:l}),(0,t.jsx)("div",{className:"px-5 py-4 text-sm leading-relaxed",children:(0,t.jsx)(S.Markdown,{children:i})})]})}function Y({source:e,dir:s,path:l}){let{data:i,isLoading:a,error:r}=(0,B.useServerRoute)(k.queryKey.skillNode(e,s,l));if(r)return(0,t.jsx)("p",{className:"p-4 font-mono text-xs text-destructive",children:r.message});if(a||!i)return(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(z.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(z.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(z.Skeleton,{className:"h-4 w-5/6"})]});if("file"!==i.kind)return null;let n=l.split("/").pop()??"";return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"sticky top-0 z-20 flex items-center justify-between gap-2 border-b border-border/60 bg-background/90 px-5 py-2 font-mono text-[11px] text-muted-foreground backdrop-blur",children:[(0,t.jsx)("span",{className:"truncate",children:n}),(0,t.jsx)("span",{className:"shrink-0",children:(0,O.formatBytes)(i.size)})]}),null===i.content?(0,t.jsx)("p",{className:"px-5 py-4 text-sm text-muted-foreground/60",children:"Not a text file — the agent can still read it from disk."}):n.toLowerCase().endsWith(".md")?(0,t.jsx)(G,{content:i.content}):(0,t.jsx)("pre",{className:"overflow-x-auto px-5 py-4 font-mono text-[13px] leading-relaxed whitespace-pre text-foreground/90",children:i.content})]})}function Z(){return C.notify.component({className:"sm:max-w-lg",renderer:({close:e})=>(0,t.jsx)(_,{onDone:e})})}function _({onDone:e}){let[s,l]=(0,b.useState)("write"),[i,a]=(0,b.useState)(""),[r,n]=(0,b.useState)(""),[o,d]=(0,b.useState)(""),[c,u]=(0,b.useState)(null),[m,h]=(0,b.useState)(!1),f=(0,b.useRef)(null),p={errorMessage:!1,onOk:()=>{(0,B.revalidate)(k.queryKey.skills),e()}},[g,v,,S]=(0,P.useServerAction)(D,p),[C,z,,F]=(0,P.useServerAction)(q,p),A=v||z,$="write"===s?S:F,K=!A&&("write"===s?i.trim()&&r.trim()&&o.trim():null!==c),U=async()=>{var e;!K||("write"===s?g({name:i.trim(),description:r.trim(),content:o}):c&&C({fileName:c.name,base64:await (e=c,new Promise((t,s)=>{let l=new FileReader;l.onload=()=>{let e=l.result;t(e.slice(e.indexOf(",")+1))},l.onerror=()=>s(l.error),l.readAsDataURL(e)}))}))},I=e=>{let t=e?.[0]??null;t&&u(t)};return(0,t.jsxs)(T.SettingDialogContent,{title:"New skill",description:"Instructions the agent loads by name when a task calls for them.",footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.Button,{variant:"ghost",onClick:e,children:"Cancel"}),(0,t.jsxs)(y.Button,{disabled:!K,loading:A,onClick:U,children:[!A&&("write"===s?(0,t.jsx)(x.Plus,{}):(0,t.jsx)(j,{})),"write"===s?"Create":"Upload"]})]}),children:[(0,t.jsxs)(M.Tabs,{value:s,onValueChange:e=>l(e),children:[(0,t.jsxs)(M.TabsList,{className:"w-full",children:[(0,t.jsx)(M.TabsTrigger,{value:"write",children:"Write"}),(0,t.jsx)(M.TabsTrigger,{value:"upload",children:"Upload"})]}),(0,t.jsxs)(M.TabsContent,{value:"write",className:"space-y-5 pt-4",children:[(0,t.jsxs)(N.Field,{children:[(0,t.jsx)(N.FieldLabel,{htmlFor:"skill-name",children:"Name"}),(0,t.jsxs)(N.FieldContent,{children:[(0,t.jsx)(w.Input,{id:"skill-name",value:i,onChange:e=>a(e.target.value),placeholder:"deploy-checklist",spellCheck:!1,autoFocus:!0}),(0,t.jsxs)("p",{className:"font-mono text-[11px] text-muted-foreground",children:[R.PATHS.skills.custom,"/",i.trim()||"…","/SKILL.md"]})]})]}),(0,t.jsxs)(N.Field,{children:[(0,t.jsx)(N.FieldLabel,{htmlFor:"skill-description",children:"Description"}),(0,t.jsx)(N.FieldContent,{children:(0,t.jsx)(w.Input,{id:"skill-description",value:r,onChange:e=>n(e.target.value),placeholder:"When to use it — this is how the agent decides to load it"})})]}),(0,t.jsxs)(N.Field,{children:[(0,t.jsx)(N.FieldLabel,{htmlFor:"skill-content",children:"Content"}),(0,t.jsx)(L.Textarea,{id:"skill-content",value:o,onChange:e=>d(e.target.value),placeholder:"Markdown. The steps, the rules, the examples.",className:"min-h-40 resize-none font-mono text-xs"})]})]}),(0,t.jsxs)(M.TabsContent,{value:"upload",className:"space-y-4 pt-4",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>f.current?.click(),onDragOver:e=>{e.preventDefault(),h(!0)},onDragLeave:()=>h(!1),onDrop:e=>{e.preventDefault(),h(!1),I(e.dataTransfer.files)},className:(0,O.cn)("flex w-full flex-col items-center gap-2 rounded-xl border border-dashed px-6 py-10 text-center outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",m?"border-foreground/60 bg-muted/60":"border-border hover:bg-muted/40"),children:[(0,t.jsx)(j,{className:"size-5 text-muted-foreground"}),c?(0,t.jsxs)("span",{className:"text-sm",children:[c.name,(0,t.jsx)("span",{className:"ml-2 font-mono text-[11px] text-muted-foreground",children:(0,O.formatBytes)(c.size)})]}):(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"Drop a file here, or click to choose"})]}),(0,t.jsx)("input",{ref:f,type:"file",accept:".md,.zip,.skill",className:"hidden",onChange:e=>I(e.target.files)}),(0,t.jsxs)("div",{className:"space-y-1 text-xs text-muted-foreground",children:[(0,t.jsx)("p",{className:"font-medium text-foreground/80",children:"File requirements"}),(0,t.jsxs)("p",{children:["A ",(0,t.jsx)("span",{className:"font-mono",children:".md"})," file needs a YAML block with the skill's name and description."]}),(0,t.jsxs)("p",{children:["A ",(0,t.jsx)("span",{className:"font-mono",children:".zip"})," or"," ",(0,t.jsx)("span",{className:"font-mono",children:".skill"})," archive needs a SKILL.md inside — the rest of its folder comes along."]})]})]})]}),$&&(0,t.jsx)("p",{className:"font-mono text-xs text-destructive",children:$})]})}e.s(["SkillsSetting",0,function(){let[e,s]=(0,b.useState)(""),{data:l,isLoading:i,error:a}=(0,B.useServerRoute)(k.queryKey.skills),r=l??[];if(i)return(0,t.jsx)(T.SettingSkeleton,{rows:4});if(a)return(0,t.jsx)(T.SettingError,{message:a.message});let n=e.trim().toLowerCase(),o=r.filter(e=>!n||`${e.name} ${e.description}`.toLowerCase().includes(n)),d=r.filter(e=>!e.disabled).length;return(0,t.jsxs)(T.SettingScreen,{footer:(0,t.jsxs)(T.SettingRailNote,{children:[r.filter(e=>"default"===e.source).length," shipped · ",r.filter(e=>"custom"===e.source).length," ","installed"]}),children:[(0,t.jsx)(T.SettingToolbar,{count:`${d} on \xb7 ${r.length-d} off`,children:(0,t.jsx)(T.SettingFilter,{value:e,onChange:s,placeholder:"Filter skills"})}),(0,t.jsx)(T.SettingGroup,{label:"Custom",hint:"yours — added here · wins a name clash",children:(0,t.jsx)(T.SettingItems,{addRow:{label:"Add skill",onClick:Z},children:o.filter(e=>"custom"===e.source).map(e=>(0,t.jsx)(I,{skill:e},`custom/${e.dir}`))})}),(0,t.jsx)(T.SettingGroup,{label:"Default",hint:"ships with the app · switch off, can't edit or delete",children:(0,t.jsx)(T.SettingItems,{children:o.filter(e=>"default"===e.source).map(e=>(0,t.jsx)(I,{skill:e},`default/${e.dir}`))})}),d>R.PROMPT_CROWDED.skills&&(0,t.jsxs)(T.SettingNote,{children:[d," skills are on. Each is a line in every prompt a bot reads, and one more to look past when it picks."]})]})}],833959)},437750,e=>{"use strict";var t=e.i(456420);let s={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};s.node;let l=(0,t.default)(s);e.s(["AppWindow",0,l],437750)},726067,e=>{"use strict";var t=e.i(456420);let s={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};s.node;let l=(0,t.default)(s);e.s(["Folder",0,l],726067)},759659,e=>{"use strict";var t=e.i(456420);let s={name:"trash",size:24,node:[["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"}]],aliases:["trash-2"]};s.node;let l=(0,t.default)(s);e.s(["Trash2",0,l],759659)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,986530,e=>{"use strict";var t=e.i(843476),s=e.i(225913);e.i(271645);var l=e.i(647163);function a({className:e,...s}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,l.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...s})}e.i(652225);let i=(0,s.cva)("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});e.s(["Field",0,function({className:e,orientation:s="vertical",...a}){return(0,t.jsx)("div",{role:"group","data-slot":"field","data-orientation":s,className:(0,l.cn)(i({orientation:s}),e),...a})},"FieldContent",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"field-content",className:(0,l.cn)("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...s})},"FieldLabel",0,function({className:e,...s}){return(0,t.jsx)(a,{"data-slot":"field-label",className:(0,l.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...s})}],986530)},833959,e=>{"use strict";var t=e.i(843476),s=e.i(437750),l=e.i(856539),a=e.i(24071),i=e.i(867927),r=e.i(829600),n=e.i(226091),o=e.i(726067),d=e.i(91511),c=e.i(456420);let u={name:"mouse-pointer-2",size:24,node:[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]};u.node;let m=(0,c.default)(u);var x=e.i(77071),h=e.i(566595);let f={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};f.node;let p=(0,c.default)(f);var g=e.i(759659);let v={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};v.node;let b=(0,c.default)(v);var j=e.i(271645),k=e.i(798120),y=e.i(167881),N=e.i(986530),w=e.i(23750),S=e.i(683408),C=e.i(917162),z=e.i(671428),F=e.i(319036),M=e.i(127341),L=e.i(184762),R=e.i(41533),T=e.i(895836),A=e.i(95187);let D=(0,A.createServerReference)("7fa037b2510bb0f84957b70cfaa15ba0c43c82ff1a",A.callServer,void 0,A.findSourceMapURL,"createSkillAction"),$=(0,A.createServerReference)("7f520bb01225451f6df7872dc80952b7386b44fa62",A.callServer,void 0,A.findSourceMapURL,"deleteSkillAction"),K=(0,A.createServerReference)("7fb16c6f6a4bd8b486cf24aac3e7cdb8d7c7de31dc",A.callServer,void 0,A.findSourceMapURL,"setSkillDisabledAction"),q=(0,A.createServerReference)("7f760550602b9b0d1a914d7625fb7144b6aa4e1d30",A.callServer,void 0,A.findSourceMapURL,"uploadSkillAction");var P=e.i(609856),B=e.i(283653),O=e.i(647163);let U={browser:d.Globe,computer:s.AppWindow,"find-skills":h.Search,"interactive-page":m,"skill-creator":p};function I({skill:e}){let[s,a]=(0,P.useServerAction)($,{onOk:()=>(0,B.revalidate)(k.queryKey.skills)}),[r]=(0,P.useServerAction)(K,{onOk:()=>(0,B.revalidate)(k.queryKey.skills)}),n=async()=>{await C.notify.confirm({title:`Delete ${e.name}?`,description:"Every file in this skill is deleted for good.",okText:"Delete",destructive:!0})&&s(e.dir)},o="default"===e.source&&U[e.dir]||l.BookMarked;return(0,t.jsxs)("div",{className:"group flex items-center transition-colors hover:bg-muted/50",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>{var s;return s=e,C.notify.component({className:"sm:max-w-4xl",renderer:()=>(0,t.jsx)(W,{skill:s})})},className:"flex min-w-0 flex-1 items-center gap-3 py-4 pl-4 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:(0,O.cn)("grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",e.disabled&&"opacity-45"),children:(0,t.jsx)(o,{className:"size-4"})}),(0,t.jsxs)("span",{className:(0,O.cn)("min-w-0 flex-1 space-y-0.5",e.disabled&&"opacity-45"),children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.name}),(0,t.jsx)("span",{className:"line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:e.description})]}),(0,t.jsx)(i.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 group-hover:text-foreground"})]}),(0,t.jsxs)("div",{className:"mr-4 ml-5 flex w-18 shrink-0 items-center justify-end gap-3",children:[(0,t.jsx)(F.Switch,{checked:!e.disabled,onCheckedChange:t=>r(e.source,e.dir,!t),"aria-label":`${e.name} on or off`,className:"shrink-0"}),"custom"===e.source?(0,t.jsx)(y.Button,{size:"icon-sm",variant:"ghost",loading:a,onClick:n,className:"shrink-0 text-muted-foreground",children:(0,t.jsx)(g.Trash2,{})}):(0,t.jsx)("span",{className:"size-7 shrink-0"})]})]})}function W({skill:e}){let[s,l]=(0,j.useState)(""),[i,r]=(0,j.useState)("SKILL.md");return(0,t.jsx)(T.SettingDialogContent,{title:e.name,description:(0,t.jsx)(E,{skill:e,path:i??s}),children:(0,t.jsxs)("div",{className:"flex h-[36rem] divide-x divide-border/60 overflow-hidden rounded-xl border border-border/60 bg-background",children:[(0,t.jsxs)("div",{className:"flex w-44 shrink-0 flex-col overflow-y-auto bg-muted/20 py-1",children:[s&&(0,t.jsxs)("button",{type:"button",onClick:()=>l(s.split("/").slice(0,-1).join("/")),className:"mx-1 mb-1 flex items-center gap-1 rounded-md px-2 py-1 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/50 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)(a.ChevronLeft,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:s.split("/").pop()})]}),(0,t.jsx)(V,{source:e.source,dir:e.dir,path:s,current:i,onPick:e=>{let t=s?`${s}/${e.name}`:e.name;"dir"===e.kind?l(t):r(t)}})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 overflow-y-auto",children:i?(0,t.jsx)(Y,{source:e.source,dir:e.dir,path:i}):(0,t.jsx)("p",{className:"p-6 text-sm text-muted-foreground/60",children:"Pick a file"})})]})})}function E({skill:e,path:s}){if(!e)return(0,t.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground/60",children:"Pick a skill"});let l=[e.name,...s.split("/").filter(Boolean)];return(0,t.jsx)("span",{className:"flex min-w-0 items-center gap-1 font-mono text-[11px] text-muted-foreground",children:l.map((e,s)=>(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[s>0&&(0,t.jsx)(i.ChevronRight,{className:"size-3 shrink-0 opacity-50"}),(0,t.jsx)("span",{className:(0,O.cn)("truncate",s===l.length-1&&"text-foreground"),children:e})]},`${s}-${e}`))})}function H({icon:e,label:s,active:l,hasChildren:a,onClick:r}){return(0,t.jsxs)("button",{type:"button",onClick:r,className:(0,O.cn)("mx-1 flex items-center gap-1.5 rounded-md px-2 py-1 text-left text-xs outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",l?"bg-secondary text-foreground":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:[(0,t.jsx)("span",{className:"shrink-0 text-muted-foreground/70 [&>svg]:size-3",children:e}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:s}),a&&(0,t.jsx)(i.ChevronRight,{className:"size-3 shrink-0 text-muted-foreground/50"})]})}function V({source:e,dir:s,path:l,current:a,onPick:i}){let{data:d,isLoading:c,error:u}=(0,B.useServerRoute)(k.queryKey.skillNode(e,s,l));return u?(0,t.jsx)("p",{className:"p-3 font-mono text-xs text-destructive",children:u.message}):c||!d?(0,t.jsxs)("div",{className:"space-y-2 p-2",children:[(0,t.jsx)(z.Skeleton,{className:"h-5 w-full"}),(0,t.jsx)(z.Skeleton,{className:"h-5 w-4/5"})]}):"dir"!==d.kind?null:(0,t.jsxs)(t.Fragment,{children:[d.entries.map(e=>(0,t.jsx)(H,{icon:"dir"===e.kind?(0,t.jsx)(o.Folder,{}):e.name.endsWith(".md")?(0,t.jsx)(n.FileText,{}):(0,t.jsx)(r.File,{}),label:e.name,hasChildren:"dir"===e.kind,active:(l?`${l}/${e.name}`:e.name)===a,onClick:()=>i(e)},e.name)),0===d.entries.length&&(0,t.jsx)("p",{className:"p-3 text-xs text-muted-foreground/60",children:"Empty folder"})]})}function G({content:e}){let s=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(e),l=s?.[1].trim(),a=s?e.slice(s[0].length):e;return(0,t.jsxs)("div",{className:"min-w-0",children:[l&&(0,t.jsx)("pre",{className:"border-b border-border/60 bg-muted/20 px-5 py-3 font-mono text-[11px] leading-relaxed whitespace-pre-wrap text-muted-foreground",children:l}),(0,t.jsx)("div",{className:"px-5 py-4 text-sm leading-relaxed",children:(0,t.jsx)(S.Markdown,{children:a})})]})}function Y({source:e,dir:s,path:l}){let{data:a,isLoading:i,error:r}=(0,B.useServerRoute)(k.queryKey.skillNode(e,s,l));if(r)return(0,t.jsx)("p",{className:"p-4 font-mono text-xs text-destructive",children:r.message});if(i||!a)return(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(z.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(z.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(z.Skeleton,{className:"h-4 w-5/6"})]});if("file"!==a.kind)return null;let n=l.split("/").pop()??"";return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"sticky top-0 z-20 flex items-center justify-between gap-2 border-b border-border/60 bg-background/90 px-5 py-2 font-mono text-[11px] text-muted-foreground backdrop-blur",children:[(0,t.jsx)("span",{className:"truncate",children:n}),(0,t.jsx)("span",{className:"shrink-0",children:(0,O.formatBytes)(a.size)})]}),null===a.content?(0,t.jsx)("p",{className:"px-5 py-4 text-sm text-muted-foreground/60",children:"Not a text file — the agent can still read it from disk."}):n.toLowerCase().endsWith(".md")?(0,t.jsx)(G,{content:a.content}):(0,t.jsx)("pre",{className:"overflow-x-auto px-5 py-4 font-mono text-[13px] leading-relaxed whitespace-pre text-foreground/90",children:a.content})]})}function Z(){return C.notify.component({className:"sm:max-w-lg",renderer:({close:e})=>(0,t.jsx)(_,{onDone:e})})}function _({onDone:e}){let[s,l]=(0,j.useState)("write"),[a,i]=(0,j.useState)(""),[r,n]=(0,j.useState)(""),[o,d]=(0,j.useState)(""),[c,u]=(0,j.useState)(null),[m,h]=(0,j.useState)(!1),f=(0,j.useRef)(null),p={errorMessage:!1,onOk:()=>{(0,B.revalidate)(k.queryKey.skills),e()}},[g,v,,S]=(0,P.useServerAction)(D,p),[C,z,,F]=(0,P.useServerAction)(q,p),A=v||z,$="write"===s?S:F,K=!A&&("write"===s?a.trim()&&r.trim()&&o.trim():null!==c),U=async()=>{var e;!K||("write"===s?g({name:a.trim(),description:r.trim(),content:o}):c&&C({fileName:c.name,base64:await (e=c,new Promise((t,s)=>{let l=new FileReader;l.onload=()=>{let e=l.result;t(e.slice(e.indexOf(",")+1))},l.onerror=()=>s(l.error),l.readAsDataURL(e)}))}))},I=e=>{let t=e?.[0]??null;t&&u(t)};return(0,t.jsxs)(T.SettingDialogContent,{title:"New skill",description:"Instructions the agent loads by name when a task calls for them.",footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.Button,{variant:"ghost",onClick:e,children:"Cancel"}),(0,t.jsxs)(y.Button,{disabled:!K,loading:A,onClick:U,children:[!A&&("write"===s?(0,t.jsx)(x.Plus,{}):(0,t.jsx)(b,{})),"write"===s?"Create":"Upload"]})]}),children:[(0,t.jsxs)(M.Tabs,{value:s,onValueChange:e=>l(e),children:[(0,t.jsxs)(M.TabsList,{className:"w-full",children:[(0,t.jsx)(M.TabsTrigger,{value:"write",children:"Write"}),(0,t.jsx)(M.TabsTrigger,{value:"upload",children:"Upload"})]}),(0,t.jsxs)(M.TabsContent,{value:"write",className:"space-y-5 pt-4",children:[(0,t.jsxs)(N.Field,{children:[(0,t.jsx)(N.FieldLabel,{htmlFor:"skill-name",children:"Name"}),(0,t.jsxs)(N.FieldContent,{children:[(0,t.jsx)(w.Input,{id:"skill-name",value:a,onChange:e=>i(e.target.value),placeholder:"deploy-checklist",spellCheck:!1,autoFocus:!0}),(0,t.jsxs)("p",{className:"font-mono text-[11px] text-muted-foreground",children:[R.PATHS.skills.custom,"/",a.trim()||"…","/SKILL.md"]})]})]}),(0,t.jsxs)(N.Field,{children:[(0,t.jsx)(N.FieldLabel,{htmlFor:"skill-description",children:"Description"}),(0,t.jsx)(N.FieldContent,{children:(0,t.jsx)(w.Input,{id:"skill-description",value:r,onChange:e=>n(e.target.value),placeholder:"When to use it — this is how the agent decides to load it"})})]}),(0,t.jsxs)(N.Field,{children:[(0,t.jsx)(N.FieldLabel,{htmlFor:"skill-content",children:"Content"}),(0,t.jsx)(L.Textarea,{id:"skill-content",value:o,onChange:e=>d(e.target.value),placeholder:"Markdown. The steps, the rules, the examples.",className:"min-h-40 resize-none font-mono text-xs"})]})]}),(0,t.jsxs)(M.TabsContent,{value:"upload",className:"space-y-4 pt-4",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>f.current?.click(),onDragOver:e=>{e.preventDefault(),h(!0)},onDragLeave:()=>h(!1),onDrop:e=>{e.preventDefault(),h(!1),I(e.dataTransfer.files)},className:(0,O.cn)("flex w-full flex-col items-center gap-2 rounded-xl border border-dashed px-6 py-10 text-center outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",m?"border-foreground/60 bg-muted/60":"border-border hover:bg-muted/40"),children:[(0,t.jsx)(b,{className:"size-5 text-muted-foreground"}),c?(0,t.jsxs)("span",{className:"text-sm",children:[c.name,(0,t.jsx)("span",{className:"ml-2 font-mono text-[11px] text-muted-foreground",children:(0,O.formatBytes)(c.size)})]}):(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"Drop a file here, or click to choose"})]}),(0,t.jsx)("input",{ref:f,type:"file",accept:".md,.zip,.skill",className:"hidden",onChange:e=>I(e.target.files)}),(0,t.jsxs)("div",{className:"space-y-1 text-xs text-muted-foreground",children:[(0,t.jsx)("p",{className:"font-medium text-foreground/80",children:"File requirements"}),(0,t.jsxs)("p",{children:["A ",(0,t.jsx)("span",{className:"font-mono",children:".md"})," file needs a YAML block with the skill's name and description."]}),(0,t.jsxs)("p",{children:["A ",(0,t.jsx)("span",{className:"font-mono",children:".zip"})," or"," ",(0,t.jsx)("span",{className:"font-mono",children:".skill"})," archive needs a SKILL.md inside — the rest of its folder comes along."]})]})]})]}),$&&(0,t.jsx)("p",{className:"font-mono text-xs text-destructive",children:$})]})}e.s(["SkillsSetting",0,function(){let[e,s]=(0,j.useState)(""),{data:l,isLoading:a,error:i}=(0,B.useServerRoute)(k.queryKey.skills),r=l??[];if(a)return(0,t.jsx)(T.SettingSkeleton,{rows:4});if(i)return(0,t.jsx)(T.SettingError,{message:i.message});let n=e.trim().toLowerCase(),o=r.filter(e=>!n||`${e.name} ${e.description}`.toLowerCase().includes(n)),d=r.filter(e=>!e.disabled).length;return(0,t.jsxs)(T.SettingScreen,{footer:(0,t.jsxs)(T.SettingRailNote,{children:[r.filter(e=>"default"===e.source).length," shipped · ",r.filter(e=>"custom"===e.source).length," ","installed"]}),children:[(0,t.jsx)(T.SettingToolbar,{count:`${d} on \xb7 ${r.length-d} off`,children:(0,t.jsx)(T.SettingFilter,{value:e,onChange:s,placeholder:"Filter skills"})}),(0,t.jsx)(T.SettingGroup,{label:"Custom",hint:"yours — added here · wins a name clash",children:(0,t.jsx)(T.SettingItems,{addRow:{label:"Add skill",onClick:Z},children:o.filter(e=>"custom"===e.source).map(e=>(0,t.jsx)(I,{skill:e},`custom/${e.dir}`))})}),(0,t.jsx)(T.SettingGroup,{label:"Default",hint:"ships with the app · switch off, can't edit or delete",children:(0,t.jsx)(T.SettingItems,{children:o.filter(e=>"default"===e.source).map(e=>(0,t.jsx)(I,{skill:e},`default/${e.dir}`))})}),d>R.PROMPT_CROWDED.skills&&(0,t.jsxs)(T.SettingNote,{children:[d," skills are on. Each is a line in every prompt a bot reads, and one more to look past when it picks."]})]})}],833959)},437750,e=>{"use strict";var t=e.i(456420);let s={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};s.node;let l=(0,t.default)(s);e.s(["AppWindow",0,l],437750)},726067,e=>{"use strict";var t=e.i(456420);let s={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};s.node;let l=(0,t.default)(s);e.s(["Folder",0,l],726067)},759659,e=>{"use strict";var t=e.i(456420);let s={name:"trash",size:24,node:[["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"}]],aliases:["trash-2"]};s.node;let l=(0,t.default)(s);e.s(["Trash2",0,l],759659)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,947627,e=>{"use strict";var t=e.i(843476),a=e.i(647163);e.s(["Table",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,a.cn)("w-full caption-bottom text-sm",e),...r})})},"TableBody",0,function({className:e,...r}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,a.cn)("[&_tr:last-child]:border-0",e),...r})},"TableCell",0,function({className:e,...r}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,a.cn)("p-2 align-middle [&:has([role=checkbox])]:pr-0",e),...r})},"TableHead",0,function({className:e,...r}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,a.cn)("h-9 px-2 text-left align-middle font-mono text-[11px] font-normal tracking-[0.1em] whitespace-nowrap text-muted-foreground uppercase [&:has([role=checkbox])]:pr-0",e),...r})},"TableHeader",0,function({className:e,...r}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,a.cn)("[&_tr]:border-b",e),...r})},"TableRow",0,function({className:e,...r}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,a.cn)("border-b border-border/60 transition-colors data-[state=selected]:bg-muted hover:bg-muted/40",e),...r})}])},41533,e=>{"use strict";var t=e.i(247167);t.default.env.THURSDAY_APP_DIR?.trim()||t.default.cwd(),t.default.env.THURSDAY_HOME?.trim()||t.default.cwd(),t.default.env.THURSDAY_URL?.trim()||t.default.env.PORT?.trim();let a=".ai-workspace",r={workspace:a,artifacts:"artifacts",projects:"projects",scratch:"scratch",bots:"bots",output:".output",signIns:".sign-ins",skills:{default:"skills",custom:`${a}/.agents/skills`,own:".agents/skills",seeds:"seed-skills"}};e.s(["APP_NAME",0,"Thursday","ARTIFACT_VIEW",0,{rows:200,setFiles:120},"ASCII_FACE",0,{charset:"emojiOnly",fontSize:{default:8,min:4,max:16},density:{default:1.4,min:.6,max:2}},"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},participants:12,concurrent:4,turns:120,queuedMessages:200,silenceMs:3e5,overflowShrink:.6,retryMs:1e4,compactFiles:40},"BROWSER_SKILL",0,"browser","CALL_BACK",0,{ringMs:3e4},"CALL_END",0,{quietMs:600,unsaidMs:2e3,maxMs:8e3},"CALL_ENDED_MS",0,12e3,"CALL_HISTORY_PAGE",0,10,"CALL_IDLE",0,{hangUpMs:2e4,warnMs:1e4},"CALL_LINE",0,{dwellMs:2e3},"CALL_RELAY",0,{quietMs:7e3,perTurn:3,readMs:15e3,chars:600},"FILE_THUMB",0,{pageWidth:1024,textWidth:512,textBytes:4096,pages:2},"FINISHED_NOTICE",0,{rows:5,words:240},"GIVEN_FILES",0,{dir:"inbox",maxBytes:0x1900000,perMessage:8},"INBOX_FINISHED",0,5,"IS_DEV",0,!1,"LIVE_CALL",0,{startupMs:3e4,closeMs:15e3,transcriptGapMs:1500,transcriptSaveMs:500,appendMs:15e3,backendOutputTokens:4096,reasoningCheckMs:5e3,keyCheckMs:5e3},"MEMORY_LIMITS",0,{facts:400,factsPerNote:50,carried:20,expanded:10},"PAGE_SIZE",0,50,"PATHS",0,r,"PROMPT_CROWDED",0,{bots:10,skills:20},"ROUTINE",0,{tickMs:3e4,max:12,minHours:1,runsShown:5},"STUDIO_SERVER",0,"studio","TEXT_CALL",0,{maxSteps:12,model:"text"},"WORKSPACE_VIEW",0,{rows:200,textMax:524288,elementMax:0x3200000}])},621285,428817,e=>{"use strict";var t=e.i(843476),a=e.i(24071),r=e.i(867927),i=e.i(482022),l=e.i(271645),s=e.i(798120),n=e.i(167881),o=e.i(630374),d=e.i(683408),c=e.i(671428),h=e.i(947627),u=e.i(41533),f=e.i(616172),g=e.i(95187);let m=(0,g.createServerReference)("7f8d58bd1288271da847b9deff4bb67295444fd389",g.callServer,void 0,g.findSourceMapURL,"openFileAction");e.s(["openFileAction",0,m],428817);var p=e.i(609856),x=e.i(647163);let w=new Set(["frame","image","audio","video"]),b=new Set(["image"]);function y(e){let t=(0,f.workspaceRelative)(e);if(!t)return{how:"os"};let a=(0,f.viewKindOf)(t);return b.has(a)?{how:"dialog",path:t}:w.has(a)?{how:"tab",path:t,href:s.queryKey.fileView(t)}:"none"===a?{how:"os"}:{how:"dialog",path:t}}let k=(0,l.createContext)(null),v={dialog:{prose:"px-5 py-4",block:"px-4 py-3"},page:{prose:"px-5 py-6 sm:px-8",block:"px-5 py-5"},inline:{prose:"pb-3",block:"pb-3"}};function _({kind:e,content:a,truncated:r,where:i="dialog"}){return(0,t.jsxs)(t.Fragment,{children:[null!=r&&(0,t.jsx)(j,{of:r}),(0,t.jsx)(N,{kind:e,content:a,where:i})]})}function j({of:e}){return(0,t.jsxs)("p",{className:"border-b border-border/60 px-5 py-2.5 font-mono text-[11px] text-muted-foreground",children:[`Showing the first ${(0,x.formatBytes)(u.WORKSPACE_VIEW.textMax)} of ${(0,x.formatBytes)(e)}. `,"Open the file itself for the rest."]})}function N({kind:e,content:a,where:r}){let i=v[r];switch(e){case"markdown":return(0,t.jsx)("div",{className:(0,x.cn)("min-w-0 text-sm leading-relaxed",i.prose),children:(0,t.jsx)(d.Markdown,{children:a})});case"csv":return(0,t.jsx)(E,{content:a,className:i.block});case"json":return(0,t.jsx)(L,{text:function(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}(a),className:i.block});default:return(0,t.jsx)(L,{text:a,className:i.block})}}function S(e){let[t,a]=(0,l.useState)(null),[r,i]=(0,l.useState)(null),[n,o]=(0,l.useState)(null);return(0,l.useEffect)(()=>{if(!e)return;a(null),i(null),o(null);let t=!1;return fetch(s.queryKey.file(e),{headers:{range:`bytes=0-${u.WORKSPACE_VIEW.textMax-1}`}}).then(async e=>{if(!e.ok)throw Error(await e.text());return{text:await e.text(),of:function(e){let t=e.headers.get("content-range")?.match(/^bytes \d+-(\d+)\/(\d+)$/);if(!t)return null;let[,a,r]=t.map(Number);return a+1<r?r:null}(e)}}).then(({text:e,of:r})=>{t||(a(null===r?e:e.slice(0,e.lastIndexOf("\n")+1||void 0)),o(r))}).catch(e=>!t&&i((0,x.errorToString)(e))),()=>{t=!0}},[e]),{content:t,failure:r,truncated:n}}function C({path:e,bytes:a}){let[r,i]=(0,p.useServerAction)(m);return(0,t.jsxs)("div",{className:"space-y-4 p-8",children:[(0,t.jsxs)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:[`This file is ${(0,x.formatBytes)(a)} — too big to draw here without `,"taking the window with it. Open it where it is instead."]}),(0,t.jsx)(n.Button,{variant:"outline",loading:i,onClick:()=>r(e),children:"Reveal in the file manager"})]})}function T({path:e,group:l=[],kind:d,onPath:h,onClose:u}){let f="image"===d,{content:g,failure:m,truncated:p}=S(f?null:e),w=e?.split("/").pop()??"",b=e?l.indexOf(e):-1,y=e=>{!(b<0)&&h&&h(l[(b+e+l.length)%l.length])};return(0,t.jsx)(o.Dialog,{open:null!==e,onOpenChange:e=>!e&&u(),children:(0,t.jsxs)(o.DialogContent,{onKeyDown:e=>{"ArrowLeft"===e.key&&y(-1),"ArrowRight"===e.key&&y(1)},className:"flex max-h-[calc(100vh-3rem)] flex-col gap-0 overflow-hidden p-0 sm:max-w-4xl",children:[(0,t.jsx)(o.DialogTitle,{className:"sr-only",children:w}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-1 border-b border-border/60 py-2 pr-12 pl-4",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px]",children:e}),b>=0&&l.length>1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:[b+1," / ",l.length]}),(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm","aria-label":"Previous image",onClick:()=>y(-1),children:(0,t.jsx)(a.ChevronLeft,{})}),(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm","aria-label":"Next image",onClick:()=>y(1),children:(0,t.jsx)(r.ChevronRight,{})})]}),f&&e&&(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm","aria-label":"Open in a new tab",render:(0,t.jsx)("a",{href:s.queryKey.fileView(e),target:"_blank",rel:"noreferrer"}),children:(0,t.jsx)(i.ExternalLink,{})})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:f&&e?(0,t.jsx)("img",{src:s.queryKey.file(e),alt:w,className:"mx-auto max-h-[calc(100vh-11rem)] object-contain p-4"}):m?(0,t.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:m}):null===g?(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(c.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-5/6"})]}):(0,t.jsx)(_,{kind:d,content:g,truncated:p})}),f&&l.length>1&&(0,t.jsx)("div",{className:"flex shrink-0 justify-center gap-1.5 border-t border-border/60 p-2.5",children:l.map(a=>(0,t.jsx)("button",{type:"button","aria-label":a.split("/").pop(),onClick:()=>h?.(a),className:(0,x.cn)("size-11 shrink-0 overflow-hidden rounded-md outline-none focus-visible:ring-3 focus-visible:ring-ring/50",a===e?"ring-2 ring-foreground":"opacity-55"),children:(0,t.jsx)("img",{src:s.queryKey.file(a),alt:"",loading:"lazy",className:"size-full bg-muted object-cover"})},a))})]})})}function L({text:e,className:a}){return(0,t.jsx)("pre",{className:(0,x.cn)("overflow-x-auto font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-foreground/90",a),children:e})}function E({content:e,className:a}){let[r,...i]=(0,l.useMemo)(()=>(function(e){let t=[],a=[],r="",i=!1;for(let l=0;l<e.length;l++){let s=e[l];i?'"'===s&&'"'===e[l+1]?(r+='"',l++):'"'===s?i=!1:r+=s:'"'===s?i=!0:","===s?(a.push(r),r=""):"\n"===s||"\r"===s?("\r"===s&&"\n"===e[l+1]&&l++,a.push(r),t.push(a),a=[],r=""):r+=s}return(r.length||a.length)&&(a.push(r),t.push(a)),t.filter(e=>e.some(e=>e.trim()))})(e),[e]);return r?(0,t.jsx)("div",{className:(0,x.cn)("overflow-x-auto",a),children:(0,t.jsxs)(h.Table,{children:[(0,t.jsx)(h.TableHeader,{children:(0,t.jsx)(h.TableRow,{children:r.map((e,a)=>(0,t.jsx)(h.TableHead,{className:"whitespace-nowrap",children:e},`${a}-${e}`))})}),(0,t.jsx)(h.TableBody,{children:i.map((e,a)=>(0,t.jsx)(h.TableRow,{children:r.map((r,i)=>(0,t.jsx)(h.TableCell,{className:"whitespace-nowrap",children:e[i]??""},`${a}-${i}`))},`${a}-${e[0]??""}`))})]})}):(0,t.jsx)(L,{text:e,className:a})}e.s(["FileBody",0,_,"FileLink",0,function({path:e,group:a,className:r,title:i,label:n,children:o}){let d=y(e),c=(0,l.useContext)(k),[h,u]=(0,p.useServerAction)(m);return"tab"===d.how?(0,t.jsx)("a",{href:d.href,target:"_blank",rel:"noreferrer",title:i??e,"aria-label":n,className:r,children:o}):(0,t.jsx)("button",{type:"button",disabled:u,title:i??e,"aria-label":n,className:r,onClick:()=>{"dialog"===d.how?c?c(d.path,a):window.open(s.queryKey.fileView(d.path),"_blank"):h(e)},children:o})},"FilePreview",0,function({path:e,bytes:a}){let r=(0,f.viewKindOf)(e),{content:i,failure:l,truncated:n}=S(w.has(r)?null:e);return("frame"===r||"image"===r)&&a>u.WORKSPACE_VIEW.elementMax?(0,t.jsx)(C,{path:e,bytes:a}):"frame"===r?(0,t.jsx)("iframe",{title:e,src:s.queryKey.file(e),allow:"clipboard-read; clipboard-write; fullscreen; autoplay",className:"h-full w-full bg-white"}):"image"===r?(0,t.jsx)("img",{src:s.queryKey.file(e),alt:e,className:"mx-auto max-w-full p-6"}):"audio"===r||"video"===r?"audio"===r?(0,t.jsx)("audio",{controls:!0,src:s.queryKey.file(e),className:"w-full p-6",children:(0,t.jsx)("track",{kind:"captions"})}):(0,t.jsx)("video",{controls:!0,src:s.queryKey.file(e),className:"max-w-full p-6",children:(0,t.jsx)("track",{kind:"captions"})}):l?(0,t.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:l}):null===i?(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(c.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-5/6"})]}):(0,t.jsx)(_,{kind:r,content:i,truncated:n})},"FileViewer",0,function({children:e}){let[a,r]=(0,l.useState)(null),i=(0,l.useCallback)((e,t=[])=>r({path:e,group:t}),[]);return(0,t.jsxs)(k,{value:i,children:[e,(0,t.jsx)(T,{path:a?.path??null,group:a?.group??[],kind:a?(0,f.viewKindOf)(a.path):"text",onPath:e=>r(t=>t&&{...t,path:e}),onClose:()=>r(null)})]})},"fileTarget",0,y,"useFileText",0,S,"useOpenFile",0,function(){let e=(0,l.useContext)(k);return(0,l.useCallback)((t,a=[])=>{let r=y(t);if("os"===r.how)return!1;if("dialog"===r.how&&e)return e(r.path,a),!0;let i="tab"===r.how?r.href:s.queryKey.fileView(r.path);return null!==window.open(i,"_blank")},[e])}],621285)},616172,e=>{"use strict";var t=e.i(798120),a=e.i(41533);let r=e=>`text/${e}; charset=utf-8`,i={md:{kind:"markdown",mime:r("markdown")},markdown:{kind:"markdown",mime:r("markdown")},csv:{kind:"csv",mime:r("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:r("plain")},log:{kind:"text",mime:r("plain")},html:{kind:"frame",mime:r("html")},htm:{kind:"frame",mime:r("html")},pdf:{kind:"frame",mime:"application/pdf"},png:{kind:"image",mime:"image/png"},jpg:{kind:"image",mime:"image/jpeg"},jpeg:{kind:"image",mime:"image/jpeg"},gif:{kind:"image",mime:"image/gif"},webp:{kind:"image",mime:"image/webp"},svg:{kind:"image",mime:"image/svg+xml"},mp3:{kind:"audio",mime:"audio/mpeg"},wav:{kind:"audio",mime:"audio/wav"},mp4:{kind:"video",mime:"video/mp4"},webm:{kind:"video",mime:"video/webm"},css:{kind:"none",mime:r("css")},js:{kind:"none",mime:r("javascript")},woff2:{kind:"none",mime:"font/woff2"}},l=e=>e.split(".").pop()?.toLowerCase()??"",s=Object.entries(i).filter(([,e])=>"none"!==e.kind).map(([e])=>e),n=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])\/?(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${s.join("|")})\b`,"giu"),o=`${a.PATHS.workspace}/`,d=t.queryKey.file("");function c(e){let t=function(e){if(!e.startsWith(d))return e;let t=e.slice(d.length);try{return decodeURIComponent(t)}catch{return t}}(e.trim()),a=t.indexOf(o);return a>=0?t.slice(a+o.length)||null:t.startsWith("/")||/^[A-Za-z]:/.test(t)||t.split("/").includes("..")?null:t||null}let h=/^[\s`'"*_)]*(?:~|–|—|-|\.{2,}|…|to|through)[\s`'"*_(]*$/i;e.s(["opensOnFinish",0,e=>e.startsWith(`${a.PATHS.artifacts}/`)&&["md","markdown","html","htm"].includes(l(e)),"pathsIn",0,function(e){let t=e.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," "),a=new Set,r="",i=null;for(let e of t.matchAll(n)){let l=e[0],s=!l.includes("/"),n=function(e){let t=c(e);if(!t)return null;let[a,...r]=t.split("/");return r.length&&a.includes(".")?null:t}(s?r+l:l);if(s||(r=n?.slice(0,n.lastIndexOf("/")+1)??""),n){if(i&&h.test(t.slice(i.end,e.index)))for(let e of function(e,t){let a=/^(.*?)(\d+)(\D*)$/.exec(e),r=/^(.*?)(\d+)(\D*)$/.exec(t);if(!a||!r||a[1]!==r[1]||a[3]!==r[3])return[];let i=Number(a[2]),l=Number(r[2]);if(!(l-i>1)||l-i>12)return[];let s=a[2].startsWith("0")?a[2].length:0;return Array.from({length:l-i-1},(e,t)=>`${a[1]}${String(i+t+1).padStart(s,"0")}${a[3]}`)}(i.rel,n))a.add(e);a.add(n),i={rel:n,end:e.index+l.length}}}return[...a].slice(0,12)},"viewKindOf",0,e=>i[l(e)]?.kind??"none","workspaceRelative",0,c])},867927,986253,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let r=(0,t.default)(a);e.s(["default",0,r],986253),e.s(["ChevronRight",0,r],867927)},482022,e=>{"use strict";var t=e.i(456420);let a={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};a.node;let r=(0,t.default)(a);e.s(["ExternalLink",0,r],482022)},696017,e=>{"use strict";var t=e.i(60231),a=e.i(419524);e.i(947716);var r=e.i(723685),i=(0,a.__name)(e=>{let{securityLevel:a}=(0,t.getConfig2)(),i=(0,r.select)("body");if("sandbox"===a){let t=(0,r.select)(`#i${e}`),a=t.node()?.contentDocument??document;i=(0,r.select)(a.body)}return i.select(`#${e}`)},"selectSvgElement");e.s(["selectSvgElement",0,i])},502056,e=>{"use strict";var t=e.i(217248),a=e.i(447804),r=e.i(508324),i=e.i(419524),l=(0,i.__name)(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,a=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:a,subGraphTitleTotalMargin:t+a}},"getSubGraphTitleMargins"),s=new Map;async function n(e,r,i){let l,n;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");let o=r.shape?t.shapes[r.shape]:void 0;if(!o)throw Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let t;"sandbox"===i.config.securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),l=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t??null),n=await o(l,r,i)}else l=n=await o(e,r,i);return l.attr("data-look",(0,a.handleUndefinedAttr)(r.look)),r.tooltip&&n.attr("title",r.tooltip),s.set(r.id,l),r.haveCallback&&l.attr("class",l.attr("class")+" clickable"),l}(0,i.__name)(n,"insertNode");var o=(0,i.__name)((e,t)=>{s.set(t.id,e)},"setNodeElem"),d=(0,i.__name)(()=>{s.clear()},"clear"),c=(0,i.__name)(e=>{let t=s.get(e.id);r.log.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let a=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+a-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),a},"positionNode");e.s(["clear",0,d,"getSubGraphTitleMargins",0,l,"insertNode",0,n,"positionNode",0,c,"setNodeElem",0,o])},369110,e=>{"use strict";var t=e.i(502056),a=e.i(217248),r=e.i(224797),i=e.i(836333),l=e.i(60231),s=e.i(508324),n=e.i(419524);e.i(947716);var o=e.i(723685),d=e.i(883272),c=(0,n.__name)(async(e,t)=>{let n,c,h=(0,l.getConfig2)(),{themeVariables:u,handDrawnSeed:f}=h,{clusterBkg:g,clusterBorder:m}=u,{labelStyles:p,nodeStyles:x,borderStyles:w,backgroundStyles:b}=(0,r.styles2String)(t),y=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),k=(0,l.evaluate)(h.flowchart.htmlLabels),v="LR"===t.direction,_=y.insert("g").attr("class","cluster-label swimlane-label"),j=await (0,i.createText)(_,t.label,{style:t.labelStyle,useHtmlLabels:k,isNode:!0,width:t.width}),N=j.getBBox();if(k){let e=j.children[0],t=(0,o.select)(j);N=e.getBoundingClientRect(),t.attr("width",N.width),t.attr("height",N.height)}let S=t.padding??0,C=t.width<=N.width+S?N.width+S:t.width;t.width<=N.width+S?t.diff=(C-t.width)/2-S:t.diff=-S;let T=t.height,L=t.y-T/2,E=t.y+T/2,B=t.x-C/2,M=void 0!==t.swimlaneContentTop?t.swimlaneContentTop:L+T/3,R=4*!!v,A=N.height+2*R;if(v){let e=Math.max(A,N.height+2*R),a=B+e,i=Math.max(0,C-e);if("handDrawn"===t.look){let l=d.default.svg(y),s=(0,r.userNodeOverrides)(t,{roughness:.7,fill:g,stroke:m,fillWeight:3,seed:f}),o=(0,r.userNodeOverrides)(t,{roughness:.7,fill:"none",stroke:m,seed:f}),h=l.rectangle(B,L,e,T,s);n=y.insert(()=>h,":first-child");let u=l.rectangle(a,L,i,T,o);c=y.insert(()=>u,":first-child"),n.select("path:nth-child(2)").attr("style",w.join(";")),n.select("path").attr("style",b.join(";").replace("fill","stroke"))}else n=y.insert("rect",":first-child"),c=y.insert("rect",":first-child"),n.attr("class","swimlane-title").attr("style",x).attr("x",B).attr("y",L).attr("width",e).attr("height",T).attr("fill",g).attr("stroke",m),c.attr("class","swimlane-body").attr("style",x).attr("x",a).attr("y",L).attr("width",i).attr("height",T).attr("fill","none").attr("stroke",m);let l=B+e/2,s=t.y;_.attr("transform",`translate(${l}, ${s}) rotate(-90) translate(${-N.width/2}, ${-N.height/2})`)}else{let e=Math.min(A,Math.max(0,M-L)),a=L+e,i=Math.max(0,E-a),l=t.x-C/2;if("handDrawn"===t.look){let s=d.default.svg(y),o=(0,r.userNodeOverrides)(t,{roughness:.7,fill:g,stroke:m,fillWeight:3,seed:f}),h=(0,r.userNodeOverrides)(t,{roughness:.7,fill:"none",stroke:m,seed:f}),u=s.rectangle(l,L,C,e,o);n=y.insert(()=>u,":first-child");let p=s.rectangle(l,a,C,i,h);c=y.insert(()=>p,":first-child"),n.select("path:nth-child(2)").attr("style",w.join(";")),n.select("path").attr("style",b.join(";").replace("fill","stroke"))}else n=y.insert("rect",":first-child"),c=y.insert("rect",":first-child"),n.attr("class","swimlane-title").attr("style",x).attr("x",l).attr("y",L).attr("width",C).attr("height",e).attr("fill",g).attr("stroke",m),c.attr("class","swimlane-body").attr("style",x).attr("x",l).attr("y",a).attr("width",C).attr("height",i).attr("fill","none").attr("stroke",m);let s=t.x-N.width/2,o=L+(e-N.height)/2;_.attr("transform",`translate(${s}, ${o})`)}if(s.log.trace("Swimlane data ",t,JSON.stringify(t)),p){let e=_.select("span");e&&e.attr("style",p)}return t.offsetX=0,t.width=C,t.height=T,t.offsetY=N.height-S/2,t.intersect=function(e){return(0,a.intersect_rect_default)(t,e)},{cluster:y,labelBBox:N}},"swimlane"),h=(0,n.__name)(async(e,n)=>{let c,h;s.log.info("Creating subgraph rect for ",n.id,n);let u=(0,l.getConfig2)(),{themeVariables:f,handDrawnSeed:g}=u,{clusterBkg:m,clusterBorder:p}=f,{labelStyles:x,nodeStyles:w,borderStyles:b,backgroundStyles:y}=(0,r.styles2String)(n),k=e.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),v=(0,l.getEffectiveHtmlLabels)(u),_=k.insert("g").attr("class","cluster-label "),j=(c="markdown"===n.labelType?await (0,i.createText)(_,n.label,{style:n.labelStyle,useHtmlLabels:v,isNode:!0,width:n.width}):await (0,a.createLabel_default)(_,n.label,n.labelStyle||"",!1,!0)).getBBox();if((0,l.getEffectiveHtmlLabels)(u)){let e=c.children[0],t=(0,o.select)(c);j=e.getBoundingClientRect(),t.attr("width",j.width),t.attr("height",j.height)}let N=n.width<=j.width+n.padding?j.width+n.padding:n.width;n.width<=j.width+n.padding?n.diff=(N-n.width)/2-n.padding:n.diff=-n.padding;let S=n.height,C=n.x-N/2,T=n.y-S/2;if(s.log.trace("Data ",n,JSON.stringify(n)),"handDrawn"===n.look){let e=d.default.svg(k),t=(0,r.userNodeOverrides)(n,{roughness:.7,fill:m,stroke:p,fillWeight:3,seed:g}),i=e.path((0,a.createRoundedRectPathD)(C,T,N,S,0),t);(h=k.insert(()=>(s.log.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",b.join(";")),h.select("path").attr("style",y.join(";").replace("fill","stroke"))}else(h=k.insert("rect",":first-child")).attr("style",w).attr("rx",n.rx).attr("ry",n.ry).attr("x",C).attr("y",T).attr("width",N).attr("height",S);let{subGraphTitleTopMargin:L}=(0,t.getSubGraphTitleMargins)(u);if(_.attr("transform",`translate(${n.x-j.width/2}, ${n.y-n.height/2+L})`),x){let e=_.select("span");e&&e.attr("style",x)}let E=h.node().getBBox();return n.offsetX=0,n.width=E.width,n.height=E.height,n.offsetY=j.height-n.padding/2,n.intersect=function(e){return(0,a.intersect_rect_default)(n,e)},{cluster:k,labelBBox:j}},"rect"),u=(0,n.__name)((e,t)=>{let r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),l=0*t.padding,s=l/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+l).attr("height",t.height+l).attr("fill","none");let n=i.node().getBBox();return t.width=n.width,t.height=n.height,t.intersect=function(e){return(0,a.intersect_rect_default)(t,e)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),f=(0,n.__name)(async(e,t)=>{let r,i=(0,l.getConfig2)(),{themeVariables:s,handDrawnSeed:n}=i,{altBackground:c,compositeBackground:h,compositeTitleBackground:u,nodeBorder:f}=s,g=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),m=g.insert("g",":first-child"),p=g.insert("g").attr("class","cluster-label"),x=g.append("rect"),w=await (0,a.createLabel_default)(p,t.label,t.labelStyle,void 0,!0),b=w.getBBox();if((0,l.getEffectiveHtmlLabels)(i)){let e=w.children[0],t=(0,o.select)(w);b=e.getBoundingClientRect(),t.attr("width",b.width),t.attr("height",b.height)}let y=0*t.padding,k=(t.width<=b.width+t.padding?b.width+t.padding:t.width)+y;t.width<=b.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;let v=t.height+y,_=t.height+y-b.height-6,j=t.x-k/2,N=t.y-v/2;t.width=k;let S=t.y-t.height/2-y/2+b.height+2;if("handDrawn"===t.look){let e=t.cssClasses.includes("statediagram-cluster-alt"),i=d.default.svg(g),l=t.rx||t.ry?i.path((0,a.createRoundedRectPathD)(j,N,k,v,10),{roughness:.7,fill:u,fillStyle:"solid",stroke:f,seed:n}):i.rectangle(j,N,k,v,{seed:n});r=g.insert(()=>l,":first-child");let s=i.rectangle(j,S,k,_,{fill:e?c:h,fillStyle:e?"hachure":"solid",stroke:f,seed:n});r=g.insert(()=>l,":first-child"),x=g.insert(()=>s)}else(r=m.insert("rect",":first-child")).attr("class","outer").attr("x",j).attr("y",N).attr("width",k).attr("height",v).attr("data-look",t.look),x.attr("class","inner").attr("x",j).attr("y",S).attr("width",k).attr("height",_);return p.attr("transform",`translate(${t.x-b.width/2}, ${N+1-3*!(0,l.getEffectiveHtmlLabels)(i)})`),t.height=r.node().getBBox().height,t.offsetX=0,t.offsetY=b.height-t.padding/2,t.labelBBox=b,t.intersect=function(e){return(0,a.intersect_rect_default)(t,e)},{cluster:g,labelBBox:b}},"roundedWithTitle"),g=(0,n.__name)(async(e,n)=>{let c;s.log.info("Creating subgraph rect for ",n.id,n);let h=(0,l.getConfig2)(),{themeVariables:u,handDrawnSeed:f}=h,{clusterBkg:g,clusterBorder:m}=u,{labelStyles:p,nodeStyles:x,borderStyles:w,backgroundStyles:b}=(0,r.styles2String)(n),y=e.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),k=(0,l.getEffectiveHtmlLabels)(h),v=y.insert("g").attr("class","cluster-label "),_=await (0,i.createText)(v,n.label,{style:n.labelStyle,useHtmlLabels:k,isNode:!0,width:n.width}),j=_.getBBox();if((0,l.getEffectiveHtmlLabels)(h)){let e=_.children[0],t=(0,o.select)(_);j=e.getBoundingClientRect(),t.attr("width",j.width),t.attr("height",j.height)}let N=n.width<=j.width+n.padding?j.width+n.padding:n.width;n.width<=j.width+n.padding?n.diff=(N-n.width)/2-n.padding:n.diff=-n.padding;let S=n.height,C=n.x-N/2,T=n.y-S/2;if(s.log.trace("Data ",n,JSON.stringify(n)),"handDrawn"===n.look){let e=d.default.svg(y),t=(0,r.userNodeOverrides)(n,{roughness:.7,fill:g,stroke:m,fillWeight:4,seed:f}),i=e.path((0,a.createRoundedRectPathD)(C,T,N,S,n.rx),t);(c=y.insert(()=>(s.log.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",w.join(";")),c.select("path").attr("style",b.join(";").replace("fill","stroke"))}else(c=y.insert("rect",":first-child")).attr("style",x).attr("rx",n.rx).attr("ry",n.ry).attr("x",C).attr("y",T).attr("width",N).attr("height",S);let{subGraphTitleTopMargin:L}=(0,t.getSubGraphTitleMargins)(h);if(v.attr("transform",`translate(${n.x-j.width/2}, ${n.y-n.height/2+L})`),p){let e=v.select("span");e&&e.attr("style",p)}let E=c.node().getBBox();return n.offsetX=0,n.width=E.width,n.height=E.height,n.offsetY=j.height-n.padding/2,n.intersect=function(e){return(0,a.intersect_rect_default)(n,e)},{cluster:y,labelBBox:j}},"kanbanSection"),m={rect:h,squareRect:h,roundedWithTitle:f,noteGroup:u,divider:(0,n.__name)((e,t)=>{let r,{themeVariables:i,handDrawnSeed:s}=(0,l.getConfig2)(),{nodeBorder:n}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),c=o.insert("g",":first-child"),h=0*t.padding,u=t.width+h;t.diff=-t.padding;let f=t.height+h,g=t.x-u/2,m=t.y-f/2;if(t.width=u,"handDrawn"===t.look){let e=d.default.svg(o).rectangle(g,m,u,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:s});r=o.insert(()=>e,":first-child")}else{r=c.insert("rect",":first-child");let e="outer";t.look,e="divider",r.attr("class",e).attr("x",g).attr("y",m).attr("width",u).attr("height",f).attr("data-look",t.look)}return t.height=r.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return(0,a.intersect_rect_default)(t,e)},{cluster:o,labelBBox:{}}},"divider"),kanbanSection:g,swimlane:c},p=new Map,x=(0,n.__name)(async(e,t)=>{let a=t.shape||"rect",r=await m[a](e,t);return p.set(t.id,r),r},"insertCluster"),w=(0,n.__name)(()=>{p=new Map},"clear");e.s(["clear",0,w,"insertCluster",0,x])},121292,e=>{"use strict";var t=e.i(369110),a=e.i(382793),r=e.i(502056),i=e.i(217248),l=e.i(447804),s=e.i(60231),n=e.i(508324),o=e.i(419524),d={common:s.common_default,getConfig:s.getConfig,insertCluster:t.insertCluster,insertEdge:a.insertEdge,insertEdgeLabel:a.insertEdgeLabel,insertMarkers:a.markers_default,insertNode:r.insertNode,interpolateToCurve:l.interpolateToCurve,labelHelper:i.labelHelper,log:n.log,positionEdgeLabel:a.positionEdgeLabel},c={},h=(0,o.__name)(e=>{for(let t of e)c[t.name]=t},"registerLayoutLoaders");(0,o.__name)(()=>{h([{name:"dagre",loader:(0,o.__name)(async()=>await e.A(555153),"loader")},{name:"swimlane",loader:(0,o.__name)(async()=>await e.A(12782),"loader")},{name:"cose-bilkent",loader:(0,o.__name)(async()=>await e.A(208503),"loader")}])},"registerDefaultLayoutLoaders")();var u=(0,o.__name)(async(e,t)=>{if(!(e.layoutAlgorithm in c))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let a=t.domId||t.id;t.domId=`${e.diagramId}-${a}`}let a=c[e.layoutAlgorithm],r=await a.loader(),{theme:i,themeVariables:l}=e.config,{useGradient:s,gradientStart:n,gradientStop:o}=l,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i?.includes("dark")?"#FFFFFF":"#000000"}`),s){let e=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),e.append("svg:stop").attr("offset","100%").attr("stop-color",o).attr("stop-opacity",1)}return r.render(e,t,d,{algorithm:a.algorithm})},"render"),f=(0,o.__name)((e="",{fallback:t="dagre"}={})=>{if(e in c)return e;if(t in c)return n.log.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm");e.s(["getRegisteredLayoutAlgorithm",0,f,"registerLayoutLoaders",0,h,"render",0,u])}]);