superfactory 0.0.0-stage → 0.4.30

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 (308) hide show
  1. package/README.md +34 -2
  2. package/THIRD-PARTY-NOTICES.md +27604 -0
  3. package/bin/superfactory.js +57 -0
  4. package/cli/agent-rf446fr1.js +2 -0
  5. package/cli/agent-state-wv62c1td.js +2 -0
  6. package/cli/bin-0cvfmkhh.js +33 -0
  7. package/cli/bin-0t68hf99.js +3 -0
  8. package/cli/bin-19vpzq7g.js +4 -0
  9. package/cli/bin-37w316c6.js +3 -0
  10. package/cli/bin-3dsqxzbz.js +3 -0
  11. package/cli/bin-4j0jjd8g.js +3 -0
  12. package/cli/bin-4tdqjbbd.js +229 -0
  13. package/cli/bin-4zvje4sn.js +502 -0
  14. package/cli/bin-674kd343.js +7 -0
  15. package/cli/bin-8jdkg4ke.js +3 -0
  16. package/cli/bin-d99yte0j.js +5 -0
  17. package/cli/bin-fgvkq9cq.js +867 -0
  18. package/cli/bin-fkp3j5f3.js +3 -0
  19. package/cli/bin-fypan1f6.js +951 -0
  20. package/cli/bin-gg19acwr.js +4 -0
  21. package/cli/bin-ghp5x0x5.js +139 -0
  22. package/cli/bin-gk00mnmn.js +5 -0
  23. package/cli/bin-gne2w036.js +29 -0
  24. package/cli/bin-grxzwpe8.js +3 -0
  25. package/cli/bin-h57gajkz.js +8 -0
  26. package/cli/bin-mbpvzx2b.js +8 -0
  27. package/cli/bin-nnq8kd9z.js +4 -0
  28. package/cli/bin-ven2efjq.js +3 -0
  29. package/cli/bin-yqb1d1mw.js +22 -0
  30. package/cli/bin-z5b3tt05.js +20 -0
  31. package/cli/bin-za1by1n5.js +3 -0
  32. package/cli/bin-zpfe0pxz.js +1 -0
  33. package/cli/bin.js +3 -0
  34. package/cli/child-agent-qgeqvs03.js +4 -0
  35. package/cli/connect-chn8pxyf.js +2 -0
  36. package/cli/container-j6zr9gww.js +4 -0
  37. package/cli/dev-gsaehf19.js +7 -0
  38. package/cli/health-nqzge5kh.js +2 -0
  39. package/cli/home-lock-5seng0k3.js +2 -0
  40. package/cli/host-7dfjhf0z.js +1507 -0
  41. package/cli/index-1wseh1tm.js +2 -0
  42. package/cli/index-axfe8zef.js +2 -0
  43. package/cli/index-s9pw90xe.js +2 -0
  44. package/cli/install-17r8t45e.js +2 -0
  45. package/cli/join-551zg7yr.js +31 -0
  46. package/cli/local-server-2smsafvg.js +2 -0
  47. package/cli/machine-zfjmpw7h.js +2 -0
  48. package/cli/main-0mxhd968.js +33 -0
  49. package/cli/main-53qmhxmd.js +303 -0
  50. package/cli/move-to-xrr2b135.js +2 -0
  51. package/cli/npm-package.json +1 -0
  52. package/cli/pair-phone-070c9ztt.js +5 -0
  53. package/cli/prompt-psc4drtd.js +2 -0
  54. package/cli/reached-vwzx2cdg.js +2 -0
  55. package/cli/sessions-bm4mk37y.js +3 -0
  56. package/cli/sf-cli-s42gkp0b.js +2 -0
  57. package/cli/sf-db-r8f1a20b.js +23 -0
  58. package/cli/sf-deploy-wqaa4fdm.js +21 -0
  59. package/cli/sf-pr-rg3q3tn6.js +13 -0
  60. package/cli/sf-test-pff158qc.js +10 -0
  61. package/cli/tart-isolation-wr3xwfmw.js +3 -0
  62. package/cli/tray-4rr0y1dv.png +0 -0
  63. package/cli/tray-mac-offline-89dva0gs.png +0 -0
  64. package/cli/tray-mac-paused-hq3a1cxv.png +0 -0
  65. package/cli/tray-mac-tvtavf0g.png +0 -0
  66. package/cli/tray-offline-xj6b5ta4.png +0 -0
  67. package/cli/tray-paused-6pzdv5ze.png +0 -0
  68. package/cli/vm-keeper-p0ggcw3z.js +3 -0
  69. package/package.json +50 -4
  70. package/plugins/sf-video-review/.claude-plugin/plugin.json +17 -0
  71. package/plugins/sf-video-review/.mcp.json +9 -0
  72. package/plugins/sf-video-review/dist/video-review.mjs +135 -0
  73. package/plugins/sf-video-review/skills/video-review/SKILL.md +65 -0
  74. package/plugins/sf-video-studio/.claude-plugin/plugin.json +17 -0
  75. package/plugins/sf-video-studio/.mcp.json +19 -0
  76. package/plugins/sf-video-studio/dist/demo-video.mjs +139 -0
  77. package/plugins/sf-video-studio/dist/narration-voice.mjs +134 -0
  78. package/plugins/sf-video-studio/dist/video-generation.mjs +131 -0
  79. package/plugins/sf-video-studio/fonts/DejaVuSansMono-Bold.ttf +0 -0
  80. package/plugins/sf-video-studio/fonts/DejaVuSansMono.ttf +0 -0
  81. package/plugins/sf-video-studio/fonts/LICENSE-DejaVu +187 -0
  82. package/plugins/sf-video-studio/hooks/hooks.json +17 -0
  83. package/plugins/sf-video-studio/hooks/no-robot-voice.sh +77 -0
  84. package/plugins/sf-video-studio/kokoro/package-lock.json +1137 -0
  85. package/plugins/sf-video-studio/kokoro/package.json +11 -0
  86. package/plugins/sf-video-studio/skills/demo-video/SKILL.md +101 -0
  87. package/plugins/sf-video-studio/skills/narration-voice/SKILL.md +49 -0
  88. package/plugins/sf-video-studio/skills/video-generation/SKILL.md +30 -0
  89. package/server/dist/account.js +3 -0
  90. package/server/dist/backup-process.js +2 -0
  91. package/server/dist/backup.js +3 -0
  92. package/server/dist/chunk-0tbq288f.js +3055 -0
  93. package/server/dist/chunk-18n7tr66.js +3 -0
  94. package/server/dist/chunk-1kgfrgmv.js +3 -0
  95. package/server/dist/chunk-1rnmxaav.js +209 -0
  96. package/server/dist/chunk-26zhqbyn.js +25 -0
  97. package/server/dist/chunk-34mn2zj2.js +2 -0
  98. package/server/dist/chunk-3psgsw9t.js +2 -0
  99. package/server/dist/chunk-8zbwppny.js +391 -0
  100. package/server/dist/chunk-9pn7q001.js +3 -0
  101. package/server/dist/chunk-9y7a9gkf.js +2 -0
  102. package/server/dist/chunk-bhm6jzch.js +8 -0
  103. package/server/dist/chunk-dbzjsqvb.js +17 -0
  104. package/server/dist/chunk-fxn504n0.js +2 -0
  105. package/server/dist/chunk-g6pwaap3.js +2 -0
  106. package/server/dist/chunk-gefgv8rg.js +7 -0
  107. package/server/dist/chunk-jg8b833v.js +2 -0
  108. package/server/dist/chunk-jy148bhn.js +3 -0
  109. package/server/dist/chunk-ky4nz39j.js +7 -0
  110. package/server/dist/chunk-mbd1y9qk.js +2 -0
  111. package/server/dist/chunk-neyhk32g.js +13 -0
  112. package/server/dist/chunk-nrz953bx.js +2 -0
  113. package/server/dist/chunk-padvv31s.js +2 -0
  114. package/server/dist/chunk-q1s2ez77.js +3 -0
  115. package/server/dist/chunk-q403h2bh.js +10 -0
  116. package/server/dist/chunk-t64r6enn.js +4 -0
  117. package/server/dist/chunk-vccappg7.js +59 -0
  118. package/server/dist/chunk-vj60fbhw.js +2 -0
  119. package/server/dist/chunk-xj26rwda.js +3 -0
  120. package/server/dist/chunk-xyw98jst.js +5 -0
  121. package/server/dist/main.js +43 -0
  122. package/server/dist/move.js +3 -0
  123. package/server/drizzle/pg/0000_baseline.sql +632 -0
  124. package/server/drizzle/pg/0001_transcripts_packed.sql +2 -0
  125. package/server/drizzle/pg/0002_vm_server_origin.sql +1 -0
  126. package/server/drizzle/pg/0003_reached_machines.sql +1 -0
  127. package/server/drizzle/pg/0004_link_records.sql +2 -0
  128. package/server/drizzle/pg/0005_task_columns.sql +7 -0
  129. package/server/drizzle/pg/0006_task_bundle.sql +3 -0
  130. package/server/drizzle/pg/0007_server_log.sql +9 -0
  131. package/server/drizzle/pg/0008_notification_pauses.sql +6 -0
  132. package/server/drizzle/pg/0009_vm_replaces.sql +1 -0
  133. package/server/drizzle/pg/0010_question_told_once.sql +10 -0
  134. package/server/drizzle/pg/0011_node_next_key.sql +3 -0
  135. package/server/drizzle/pg/0012_task_work.sql +8 -0
  136. package/server/drizzle/pg/0013_task_secret_grants.sql +9 -0
  137. package/server/drizzle/pg/0014_node_paused.sql +2 -0
  138. package/server/drizzle/pg/0015_ssh_machines.sql +19 -0
  139. package/server/drizzle/pg/0016_node_wake.sql +1 -0
  140. package/server/drizzle/pg/0017_node_uninstall_key.sql +1 -0
  141. package/server/drizzle/pg/0018_release_starts.sql +6 -0
  142. package/server/drizzle/pg/0019_session_memory.sql +7 -0
  143. package/server/drizzle/pg/meta/_journal.json +146 -0
  144. package/server/drizzle/sqlite/0000_pre_drizzle_schema.sql +351 -0
  145. package/server/drizzle/sqlite/0001_cluster.sql +36 -0
  146. package/server/drizzle/sqlite/0002_task_records.sql +22 -0
  147. package/server/drizzle/sqlite/0003_indexes.sql +12 -0
  148. package/server/drizzle/sqlite/0004_project_machines.sql +19 -0
  149. package/server/drizzle/sqlite/0005_session_events.sql +7 -0
  150. package/server/drizzle/sqlite/0006_task_platforms.sql +8 -0
  151. package/server/drizzle/sqlite/0007_session_event_tags.sql +7 -0
  152. package/server/drizzle/sqlite/0008_sprints.sql +7 -0
  153. package/server/drizzle/sqlite/0009_project_vms.sql +19 -0
  154. package/server/drizzle/sqlite/0010_server_repairs.sql +4 -0
  155. package/server/drizzle/sqlite/0011_drop_todos.sql +2 -0
  156. package/server/drizzle/sqlite/0012_hypervisors.sql +14 -0
  157. package/server/drizzle/sqlite/0013_manager_leads.sql +2 -0
  158. package/server/drizzle/sqlite/0014_session_text.sql +35 -0
  159. package/server/drizzle/sqlite/0015_vm_resize_machine_instructions_access.sql +22 -0
  160. package/server/drizzle/sqlite/0016_tunnel.sql +23 -0
  161. package/server/drizzle/sqlite/0017_session_secret_grants.sql +7 -0
  162. package/server/drizzle/sqlite/0018_https.sql +18 -0
  163. package/server/drizzle/sqlite/0019_secret_grant_runs.sql +1 -0
  164. package/server/drizzle/sqlite/0020_session_transcripts.sql +16 -0
  165. package/server/drizzle/sqlite/0021_claude_signed_out.sql +2 -0
  166. package/server/drizzle/sqlite/0022_machine_disabled.sql +1 -0
  167. package/server/drizzle/sqlite/0023_machine_access_granted_by.sql +1 -0
  168. package/server/drizzle/sqlite/0024_machine_vms.sql +27 -0
  169. package/server/drizzle/sqlite/0025_machine_tunnel_fallback.sql +1 -0
  170. package/server/drizzle/sqlite/0026_tunnel_peer_linked.sql +3 -0
  171. package/server/drizzle/sqlite/0027_tunnel_upgrade_grace.sql +2 -0
  172. package/server/drizzle/sqlite/0028_dialed_machines.sql +2 -0
  173. package/server/drizzle/sqlite/0029_node_link.sql +3 -0
  174. package/server/drizzle/sqlite/0030_sprint_calendar.sql +1 -0
  175. package/server/drizzle/sqlite/0031_transcripts_packed.sql +2 -0
  176. package/server/drizzle/sqlite/0032_vm_server_origin.sql +1 -0
  177. package/server/drizzle/sqlite/meta/_journal.json +237 -0
  178. package/server/src/account.ts +2 -0
  179. package/server/src/backup.ts +2 -0
  180. package/server/src/features/backups/backup-process.ts +2 -0
  181. package/server/src/main.ts +2 -0
  182. package/server/src/move.ts +2 -0
  183. package/ui/dist/_expo/static/css/global-d378e211074d97e633bc15418ccf57d4.css +2 -0
  184. package/ui/dist/_expo/static/css/xterm-8a7c4e0dca731c11dbe6bdff98fb667c.css +1 -0
  185. package/ui/dist/_expo/static/js/web/Network-f300a5960620f5029c91c06cae29dba5.js +3 -0
  186. package/ui/dist/_expo/static/js/web/[...rest]-9e454d985f211f5c983f42bec15b6ad9.js +1 -0
  187. package/ui/dist/_expo/static/js/web/[managerId]-2580b90e8d862ad66197eecb1dc04a12.js +1 -0
  188. package/ui/dist/_expo/static/js/web/[managerId]-39308153b42eed025c0abb9242ae6c71.js +1 -0
  189. package/ui/dist/_expo/static/js/web/[managerId]-8b7a94ec818e50a371b6b2750b73df6a.js +1 -0
  190. package/ui/dist/_expo/static/js/web/[managerId]-ac3a14c7607e4576d7e6c39c1014bcaf.js +1 -0
  191. package/ui/dist/_expo/static/js/web/[managerId]-e8549b2313a119437c373e30207518c0.js +1 -0
  192. package/ui/dist/_expo/static/js/web/[ref]-9b46f1ec4348f980e9838b68d47c34bf.js +2 -0
  193. package/ui/dist/_expo/static/js/web/[sessionId]-09e376674fb8b3edc4ae8aa9b3a189d7.js +1 -0
  194. package/ui/dist/_expo/static/js/web/[sessionId]-0e5fdba25c9f78220cea4cb66227743d.js +1 -0
  195. package/ui/dist/_expo/static/js/web/[sessionId]-104af3c3885009e6a8d204b6fd6e2c3a.js +1 -0
  196. package/ui/dist/_expo/static/js/web/[sessionId]-863a34ca3835b469134ddbc4ebc6fafc.js +1 -0
  197. package/ui/dist/_expo/static/js/web/[taskId]-1218e1dd3ecf175ffb7701fc886d62c9.js +1 -0
  198. package/ui/dist/_expo/static/js/web/[taskId]-31a48c7017dbd096f8ece9dc102a9762.js +1 -0
  199. package/ui/dist/_expo/static/js/web/[taskId]-a56cf85bcfd14f2d6b5d4180ea17e8d7.js +1 -0
  200. package/ui/dist/_expo/static/js/web/[taskId]-f2a157b3cb676b3c5d04c8eadfe90cdd.js +1 -0
  201. package/ui/dist/_expo/static/js/web/__common-1ad58e53e08528a67b99f53a1690b669.js +2078 -0
  202. package/ui/dist/_expo/static/js/web/__expo-metro-runtime-1f8f5d3ca6b7f58204d51e14506d73fb.js +5 -0
  203. package/ui/dist/_expo/static/js/web/_layout-057457e97e0af20433ed41b39cb5e809.js +1 -0
  204. package/ui/dist/_expo/static/js/web/_layout-2a7d73d5356823e1f7d2dab23e440d09.js +7 -0
  205. package/ui/dist/_expo/static/js/web/_layout-42e6a6b7855655d456015ce41aefdd39.js +1 -0
  206. package/ui/dist/_expo/static/js/web/_layout-a5e5a5b2fb3bfbfcc2914131976679e7.js +1 -0
  207. package/ui/dist/_expo/static/js/web/_layout-b2cbba92506f66815a5d744fd7cd5d8c.js +1 -0
  208. package/ui/dist/_expo/static/js/web/_layout-b4d13dc52bbcb65b18b4e52813d53883.js +198 -0
  209. package/ui/dist/_expo/static/js/web/_layout-fb0f75b354800de2e1582dc963f5c148.js +1 -0
  210. package/ui/dist/_expo/static/js/web/index-41299a961569cc8e5410ec53ba2b87c4.js +4 -0
  211. package/ui/dist/_expo/static/js/web/index-6c2bb0d3b6d00c5c007a663e9f4ce108.js +1 -0
  212. package/ui/dist/_expo/static/js/web/index-70484f7d2769d9ae01dac1fdb22aef1d.js +14 -0
  213. package/ui/dist/_expo/static/js/web/index-7d764cb7cefe0a217728c24d44990057.js +14 -0
  214. package/ui/dist/_expo/static/js/web/index-a5eb3d0c6aa4c483674beb5de428634c.js +12 -0
  215. package/ui/dist/_expo/static/js/web/index-b1c2543003cba86eeb3abfa4d21fd8da.js +14 -0
  216. package/ui/dist/_expo/static/js/web/index-d200aded5448966e5e05d9ccb77b56a4.js +5 -0
  217. package/ui/dist/_expo/static/js/web/index-ea43f51ceec4a981c942fc6dce9cedc4.js +2378 -0
  218. package/ui/dist/_expo/static/js/web/index-efa68d817a7febbf8c0163303bf4cd49.js +29 -0
  219. package/ui/dist/_expo/static/js/web/licenses-30f8c0555f7f4d434a68ee4706fa433d.js +1 -0
  220. package/ui/dist/_expo/static/js/web/pair-3f6f72208023894f43f4f07db5116cca.js +1 -0
  221. package/ui/dist/_expo/static/js/web/rich-markdown-editor-dea9c0f7c0306da4146e54ee44cce173.js +228 -0
  222. package/ui/dist/_expo/static/js/web/sign-in-67d2a0c00232e0e6f40efade1a83dc4b.js +4 -0
  223. package/ui/dist/_expo/static/js/web/terminal-view-32db8e6f8a21dd073f6a310862d36db8.js +90 -0
  224. package/ui/dist/apple-touch-icon.png +0 -0
  225. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/100Thin/GeistMono_100Thin.95eed4519d8c395e41b3b837ca97edea.ttf +0 -0
  226. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/100Thin_Italic/GeistMono_100Thin_Italic.2e50fb9a43d70ceb4925a2c54502097c.ttf +0 -0
  227. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/200ExtraLight/GeistMono_200ExtraLight.0714ea94ac265d76bc16698dd1808599.ttf +0 -0
  228. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/200ExtraLight_Italic/GeistMono_200ExtraLight_Italic.107f2670e94507223548f1d38eb14087.ttf +0 -0
  229. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/300Light/GeistMono_300Light.d6a3533adfd5834dd9f68ee37faa1e2d.ttf +0 -0
  230. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/300Light_Italic/GeistMono_300Light_Italic.09420cdceda8d1f1612daceae1e4890e.ttf +0 -0
  231. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/400Regular/GeistMono_400Regular.3656dcb247d3a6cd141f7601c2101125.ttf +0 -0
  232. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/400Regular_Italic/GeistMono_400Regular_Italic.88343c321b266476ad3bc56735cc6ac7.ttf +0 -0
  233. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/500Medium/GeistMono_500Medium.a298cd61aebdb709299e2a7deb73ed93.ttf +0 -0
  234. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/500Medium_Italic/GeistMono_500Medium_Italic.e149441dd9360bd7dbffeb1de9aa1685.ttf +0 -0
  235. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/600SemiBold/GeistMono_600SemiBold.cae945cb3b6156e396a1008b6252af21.ttf +0 -0
  236. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/600SemiBold_Italic/GeistMono_600SemiBold_Italic.e939ba436795ee2f0a379e7271bb957d.ttf +0 -0
  237. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/700Bold/GeistMono_700Bold.7fcc8478bc1dcadc865d97626ba3206b.ttf +0 -0
  238. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/700Bold_Italic/GeistMono_700Bold_Italic.8cc57ff1f3c45e7ed84e74853c141e06.ttf +0 -0
  239. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/800ExtraBold/GeistMono_800ExtraBold.b09b5457204e06ea7bacff03f0880065.ttf +0 -0
  240. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/800ExtraBold_Italic/GeistMono_800ExtraBold_Italic.0b4dd8c1b0e6d8791ea34c8f1417edfd.ttf +0 -0
  241. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/900Black/GeistMono_900Black.9ec025adf049c8a476588eeac81a36e4.ttf +0 -0
  242. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+geist-mono@0.4.3-2a25012349fb7712/node_modules/@expo-google-fonts/geist-mono/900Black_Italic/GeistMono_900Black_Italic.8dfe24b2fef43fb3d535316e2412be7d.ttf +0 -0
  243. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/100Thin/HankenGrotesk_100Thin.2d9c9415d97b66fb3bbca06b538f11d8.ttf +0 -0
  244. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/100Thin_Italic/HankenGrotesk_100Thin_Italic.5ad53da9f1ff702f55cf870763a159ff.ttf +0 -0
  245. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/200ExtraLight/HankenGrotesk_200ExtraLight.2cae1a1078b5af081aff084011b07522.ttf +0 -0
  246. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/200ExtraLight_Italic/HankenGrotesk_200ExtraLight_Italic.5d4eff887cdb33164b4fba2066c687e3.ttf +0 -0
  247. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/300Light/HankenGrotesk_300Light.2be9fd730ff95b91631e3f99bc449709.ttf +0 -0
  248. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/300Light_Italic/HankenGrotesk_300Light_Italic.4ae6910889ffdf69093da607b369b0a8.ttf +0 -0
  249. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/400Regular/HankenGrotesk_400Regular.2e544d6119b4e635f6cc5a47800523bb.ttf +0 -0
  250. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/400Regular_Italic/HankenGrotesk_400Regular_Italic.ed9d322cffe9e614205ce9512f144834.ttf +0 -0
  251. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/500Medium/HankenGrotesk_500Medium.a822d33614b51eb05478e0e29cf757f3.ttf +0 -0
  252. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/500Medium_Italic/HankenGrotesk_500Medium_Italic.bc71c45237e12974e52335b615fab7da.ttf +0 -0
  253. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/600SemiBold/HankenGrotesk_600SemiBold.b016ff502f15ce9b59c453304c74fb48.ttf +0 -0
  254. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/600SemiBold_Italic/HankenGrotesk_600SemiBold_Italic.94428d43b74e372dc47910fd4fc6b552.ttf +0 -0
  255. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/700Bold/HankenGrotesk_700Bold.14d2af6df606492d846389d2108dae50.ttf +0 -0
  256. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/700Bold_Italic/HankenGrotesk_700Bold_Italic.d075966aaf26126d8aaac0802735e310.ttf +0 -0
  257. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/800ExtraBold/HankenGrotesk_800ExtraBold.b419489745bc870b4e4288e969945f31.ttf +0 -0
  258. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/800ExtraBold_Italic/HankenGrotesk_800ExtraBold_Italic.ea7ac4778026e067a5d637f4a494b2d2.ttf +0 -0
  259. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/900Black/HankenGrotesk_900Black.55e860e6549b53fa530d9eda7c7518a2.ttf +0 -0
  260. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+hanken-grotesk@0.4.3-9a0105bf7cbf8f8b/node_modules/@expo-google-fonts/hanken-grotesk/900Black_Italic/HankenGrotesk_900Black_Italic.dcad6f722a66aae93f70a72604112754.ttf +0 -0
  261. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/200ExtraLight/Newsreader_200ExtraLight.1ee07dc260606863f8bf8101308d85f2.ttf +0 -0
  262. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/200ExtraLight_Italic/Newsreader_200ExtraLight_Italic.52c51abab458715d1205b8732b55735f.ttf +0 -0
  263. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/300Light/Newsreader_300Light.bf0dfa126654b01f65e1c53a4507ec12.ttf +0 -0
  264. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/300Light_Italic/Newsreader_300Light_Italic.03190fe46aa9b7083610981ac13b10f3.ttf +0 -0
  265. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/400Regular/Newsreader_400Regular.b1d919187d5645f84124ef065868ba9e.ttf +0 -0
  266. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/400Regular_Italic/Newsreader_400Regular_Italic.f7b81d92eb42d85de96b6dc1c72d2c36.ttf +0 -0
  267. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/500Medium/Newsreader_500Medium.df89e83cfd4e37176dda53076a01b3b7.ttf +0 -0
  268. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/500Medium_Italic/Newsreader_500Medium_Italic.fb45099c4fb3c395e8f12e181475230c.ttf +0 -0
  269. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/600SemiBold/Newsreader_600SemiBold.20bce29dc5180892ce1fbf4a563737a0.ttf +0 -0
  270. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/600SemiBold_Italic/Newsreader_600SemiBold_Italic.93e2816e201fa363d3289e741f757ff0.ttf +0 -0
  271. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/700Bold/Newsreader_700Bold.bf7c54edbd2afe9b289d5da777f489e9.ttf +0 -0
  272. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/700Bold_Italic/Newsreader_700Bold_Italic.e2f5e5260513d7d4f9f3edbdcbc9f43f.ttf +0 -0
  273. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/800ExtraBold/Newsreader_800ExtraBold.702211ca77927e4c276b28169dc3694c.ttf +0 -0
  274. package/ui/dist/assets/_____.bun/install/cache/links/@expo-google-fonts+newsreader@0.4.1-869d74885c3fd9d6/node_modules/@expo-google-fonts/newsreader/800ExtraBold_Italic/Newsreader_800ExtraBold_Italic.9b9eacc7d72e5152e692cb144ef7a9fd.ttf +0 -0
  275. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png +0 -0
  276. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png +0 -0
  277. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png +0 -0
  278. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png +0 -0
  279. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png +0 -0
  280. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/drawer/toggle-drawer-icon.ae74bb20586a731af545e6b00fe14a09.png +0 -0
  281. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png +0 -0
  282. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png +0 -0
  283. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png +0 -0
  284. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png +0 -0
  285. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png +0 -0
  286. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png +0 -0
  287. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png +0 -0
  288. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png +0 -0
  289. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png +0 -0
  290. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png +0 -0
  291. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png +0 -0
  292. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png +0 -0
  293. package/ui/dist/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png +0 -0
  294. package/ui/dist/favicon.ico +0 -0
  295. package/ui/dist/favicon.svg +10 -0
  296. package/ui/dist/icon-192.png +0 -0
  297. package/ui/dist/icon-512.png +0 -0
  298. package/ui/dist/index.html +45 -0
  299. package/ui/dist/legal/privacy-policy.md +174 -0
  300. package/ui/dist/legal/terms-of-use.md +76 -0
  301. package/ui/dist/load-again.js +42 -0
  302. package/ui/dist/manifest.webmanifest +12 -0
  303. package/ui/dist/metadata.json +1 -0
  304. package/ui/dist/sounds/bell.wav +0 -0
  305. package/ui/dist/sounds/chime.wav +0 -0
  306. package/ui/dist/sounds/knock.wav +0 -0
  307. package/ui/dist/sounds/pop.wav +0 -0
  308. package/ui/dist/sw.js +121 -0
@@ -0,0 +1,198 @@
1
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return I}});var e=r(d[0]),s=r(d[1]),t=r(d[2]),n=r(d[3]);r(d[4]);var o,c=r(d[5]),l=(o=c)&&o.__esModule?o:{default:o},u=r(d[6]),f=r(d[7]),h=r(d[8]),x=r(d[9]),b=r(d[10]),j=r(d[11]),S=r(d[12]),y=r(d[13]),_=r(d[14]),p=r(d[15]),w=r(d[16]),k=r(d[17]),P=r(d[18]),v=r(d[19]),T=r(d[20]),B=r(d[21]),C=r(d[22]),H=r(d[23]),L=r(d[24]),N=r(d[25]),D=r(d[26]),M=r(d[27]),R=r(d[28]),W=r(d[29]),O=r(d[30]),F=r(d[31]),G=r(d[32]),z=r(d[33]),E=r(d[34]);function I(){const t=(0,e.c)(18);(0,G.useLiveUpdates)(!0),(0,z.usePreload)(),(0,y.usePhonePush)(),(0,p.useWebPushClicks)(),(0,k.useReadyToasts)(),(0,j.useNotificationToasts)(),(0,b.useDismissSeen)(),(0,f.useDesktop)(),(0,_.useNotificationSound)(),(0,M.useNavigationLedger)(),(0,N.useRememberWork)();const n=(0,O.useLayout)(),o=(0,C.useBottomBar)();let c,H,L,R,F,I,Q,V,q,J,K,X,Y;return(0,D.useLegacyQueryLinks)(),t[0]===Symbol.for("react.memo_cache_sentinel")?(c=(0,E.jsx)(v.ScreenPlayer,{}),t[0]=c):c=t[0],t[1]===Symbol.for("react.memo_cache_sentinel")?(H=(0,E.jsx)(w.GetStarted,{}),t[1]=H):H=t[1],t[2]!==o||t[3]!==n?(L=(0,E.jsxs)(l.default,{className:"flex-1",children:[H,"glass"===o?(0,E.jsx)(A,{}):(0,E.jsx)(U,{layout:n})]}),R="desktop"===n&&"glass"!==o?(0,E.jsx)(x.LeadPanel,{}):null,t[2]=o,t[3]=n,t[4]=L,t[5]=R):(L=t[4],R=t[5]),t[6]!==L||t[7]!==R?(F=(0,E.jsxs)(l.default,{className:"flex-1 flex-row bg-canvas",children:[L,R]}),t[6]=L,t[7]=R,t[8]=F):F=t[8],t[9]===Symbol.for("react.memo_cache_sentinel")?(V=(0,E.jsx)(W.ToastHost,{}),q=(0,E.jsx)(S.NotificationsPanel,{}),J=(0,E.jsx)(B.SettingsModal,{}),K=(0,E.jsx)(T.SearchPalette,{}),X=(0,E.jsx)(P.ReviewVideoHost,{}),I=(0,E.jsx)(u.ClaudeSignInHost,{}),Q=(0,E.jsx)(h.FeedbackHost,{}),t[9]=I,t[10]=Q,t[11]=V,t[12]=q,t[13]=J,t[14]=K,t[15]=X):(I=t[9],Q=t[10],V=t[11],q=t[12],J=t[13],K=t[14],X=t[15]),t[16]!==F?(Y=(0,E.jsxs)(s.ModalExtras,{extras:c,children:[F,V,q,J,K,X,I,Q]}),t[16]=F,t[17]=Y):Y=t[17],Y}const Q=["tasks",...R.sections.map(e=>e.name).filter(e=>"tasks"!==e),"agents"];function U(t){const o=(0,e.c)(9),{layout:c}=t,[l]=(0,F.useSidebarWidth)(),{width:u,collapsed:f}=l,[h]=(0,F.useSidebarFolding)(),x=(0,s.useColor)("line"),b=f?F.sidebarWidth.rail:"desktop"===c?u:Math.min(u,260);let j,S,y,_;return o[0]!==h?(j=h?{transition:"width 200ms cubic-bezier(0.2, 0, 0, 1)"}:{},o[0]=h,o[1]=j):j=o[1],o[2]!==x||o[3]!==b||o[4]!==j?(S={headerShown:!1,drawerType:"permanent",drawerStyle:{width:b,borderRightWidth:1,borderRightColor:x,...j}},o[2]=x,o[3]=b,o[4]=j,o[5]=S):S=o[5],o[6]===Symbol.for("react.memo_cache_sentinel")?(y=Q.map(V),o[6]=y):y=o[6],o[7]!==S?(_=(0,E.jsx)(n.Drawer,{drawerContent:q,backBehavior:"fullHistory",screenOptions:S,children:y}),o[7]=S,o[8]=_):_=o[8],_}function V(e){return(0,E.jsx)(n.Drawer.Screen,{name:e},e)}function q(){return(0,E.jsx)(H.DrawerContent,{})}function A(){const s=(0,e.c)(1);let n;return s[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,E.jsx)(t.Tabs,{tabBar:K,backBehavior:"fullHistory",screenOptions:{headerShown:!1,animation:"fade"},children:Q.map(J)}),s[0]=n):n=s[0],n}function J(e){return(0,E.jsx)(t.Tabs.Screen,{name:e},e)}function K(){return(0,E.jsx)(L.GlassTabBar,{})}},2066,[405,408,1463,2099,308,945,2184,2185,2127,2128,404,2131,2186,2187,2188,2189,2190,2132,2191,2192,2133,2141,1915,2179,2193,2194,2195,2196,2197,1462,1916,2198,407,2199,467]);
2
+ __d(function(g,r,i,a,m,e,d){m.exports=r(d[0])},2099,[2100]);
3
+ __d(function(g,r,i,a,m,e,d){"use strict";var t=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Drawer=e.useDrawerProgress=e.useDrawerStatus=e.getDrawerStatusFromState=e.DrawerView=e.DrawerToggleButton=e.DrawerItemList=e.DrawerItem=e.DrawerContentScrollView=e.DrawerContent=void 0;const n=t(r(d[0]));e.Drawer=n.default;const u=r(d[1]);var o=r(d[2]);Object.defineProperty(e,"DrawerContent",{enumerable:!0,get:function(){return o.DrawerContent}}),Object.defineProperty(e,"DrawerContentScrollView",{enumerable:!0,get:function(){return o.DrawerContentScrollView}}),Object.defineProperty(e,"DrawerItem",{enumerable:!0,get:function(){return o.DrawerItem}}),Object.defineProperty(e,"DrawerItemList",{enumerable:!0,get:function(){return o.DrawerItemList}}),Object.defineProperty(e,"DrawerToggleButton",{enumerable:!0,get:function(){return o.DrawerToggleButton}}),Object.defineProperty(e,"DrawerView",{enumerable:!0,get:function(){return o.DrawerView}}),Object.defineProperty(e,"getDrawerStatusFromState",{enumerable:!0,get:function(){return o.getDrawerStatusFromState}}),Object.defineProperty(e,"useDrawerStatus",{enumerable:!0,get:function(){return o.useDrawerStatus}}),Object.defineProperty(e,"useDrawerProgress",{enumerable:!0,get:function(){return o.useDrawerProgress}}),n.default.Screen=u.Screen,e.default=n.default},2100,[2101,1840,2102]);
4
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Drawer=void 0;const t=r(d[0]),o=(0,r(d[1]).createDrawerNavigator)().Navigator;e.Drawer=(0,t.withLayoutContext)(o),e.default=e.Drawer},2101,[1472,2102]);
5
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useDrawerProgress=e.DrawerProgressContext=e.useDrawerStatus=e.getDrawerStatusFromState=e.DrawerStatusContext=e.DrawerView=e.DrawerToggleButton=e.DrawerItemList=e.DrawerItem=e.DrawerContentScrollView=e.DrawerContent=e.createDrawerNavigator=void 0;var t=r(d[0]);Object.defineProperty(e,"createDrawerNavigator",{enumerable:!0,get:function(){return t.createDrawerNavigator}});var n=r(d[1]);Object.defineProperty(e,"DrawerContent",{enumerable:!0,get:function(){return n.DrawerContent}});var o=r(d[2]);Object.defineProperty(e,"DrawerContentScrollView",{enumerable:!0,get:function(){return o.DrawerContentScrollView}});var u=r(d[3]);Object.defineProperty(e,"DrawerItem",{enumerable:!0,get:function(){return u.DrawerItem}});var w=r(d[4]);Object.defineProperty(e,"DrawerItemList",{enumerable:!0,get:function(){return w.DrawerItemList}});var D=r(d[5]);Object.defineProperty(e,"DrawerToggleButton",{enumerable:!0,get:function(){return D.DrawerToggleButton}});var c=r(d[6]);Object.defineProperty(e,"DrawerView",{enumerable:!0,get:function(){return c.DrawerView}});var s=r(d[7]);Object.defineProperty(e,"DrawerStatusContext",{enumerable:!0,get:function(){return s.DrawerStatusContext}});var f=r(d[8]);Object.defineProperty(e,"getDrawerStatusFromState",{enumerable:!0,get:function(){return f.getDrawerStatusFromState}});var b=r(d[9]);Object.defineProperty(e,"useDrawerStatus",{enumerable:!0,get:function(){return b.useDrawerStatus}});var l=r(d[10]);Object.defineProperty(e,"DrawerProgressContext",{enumerable:!0,get:function(){return l.DrawerProgressContext}}),Object.defineProperty(e,"useDrawerProgress",{enumerable:!0,get:function(){return l.useDrawerProgress}})},2102,[2103,2115,2116,2119,2118,2120,2104,2123,2125,2126,2105]);
6
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDrawerNavigator=function(t){return(0,n.createNavigatorFactory)(s)(t)};const t=r(d[0]),n=r(d[1]),o=r(d[2]);function s({id:s,initialRouteName:u,defaultStatus:c="closed",backBehavior:l,UNSTABLE_routeNamesChangeBehavior:N,children:v,layout:h,screenListeners:B,screenOptions:L,screenLayout:_,UNSTABLE_router:f,...S}){const{state:y,descriptors:p,navigation:w,NavigationContent:A}=(0,n.useNavigationBuilder)(n.DrawerRouter,{id:s,initialRouteName:u,defaultStatus:c,backBehavior:l,UNSTABLE_routeNamesChangeBehavior:N,children:v,layout:h,screenListeners:B,screenOptions:L,screenLayout:_,UNSTABLE_router:f});return(0,t.jsx)(A,{children:(0,t.jsx)(o.DrawerView,{...S,defaultStatus:c,state:y,descriptors:p,navigation:w})})}},2103,[467,1503,2104]);
7
+ __d(function(g,r,_i,a,_m,e,d){"use strict";var t,n=this&&this.__createBinding||(Object.create?function(t,n,o,i){void 0===i&&(i=o);var s=Object.getOwnPropertyDescriptor(n,o);s&&!("get"in s?!n.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return n[o]}}),Object.defineProperty(t,i,s)}:function(t,n,o,i){void 0===i&&(i=o),t[i]=n[o]}),o=this&&this.__setModuleDefault||(Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n}),i=this&&this.__importStar||(t=function(n){return t=Object.getOwnPropertyNames||function(t){var n=[];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[n.length]=o);return n},t(n)},function(i){if(i&&i.__esModule)return i;var s={};if(null!=i)for(var l=t(i),u=0;u<l.length;u++)"default"!==l[u]&&n(s,i,l[u]);return o(s,i),s}),s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DrawerView=function({navigation:t,...n}){return(0,l.jsx)(w.SafeAreaProviderCompat,{children:(0,l.jsx)(P,{navigation:t,...n})})};const l=r(d[0]),u=i(r(d[1])),c=r(d[2]),f=r(d[3]),h=s(r(d[4])),p=r(d[5]),y=r(d[6]),S=r(d[7]),b=r(d[8]),w=r(d[9]),m=r(d[10]),v=r(d[11]),O=r(d[12]),k=r(d[13]),j=16,D=t=>(0,l.jsx)(y.DrawerContent,{...t});function P({state:t,navigation:n,descriptors:o,defaultStatus:i,drawerContent:s=D,detachInactiveScreens:y='web'===c.Platform.OS||'android'===c.Platform.OS||'ios'===c.Platform.OS}){const{direction:P}=(0,p.useLocale)(),_=t.routes[t.index].key,{drawerHideStatusBarOnOpen:T,drawerPosition:C=('rtl'===P?'right':'left'),drawerStatusBarAnimation:B,drawerStyle:R,drawerType:L=c.Platform.select({ios:'slide',default:'front'}),configureGestureHandler:M,keyboardDismissMode:E,overlayColor:A="rgba(0, 0, 0, 0.5)",swipeEdgeWidth:H,swipeEnabled:z='web'!==c.Platform.OS&&'windows'!==c.Platform.OS&&'macos'!==c.Platform.OS,swipeMinDistance:W,overlayAccessibilityLabel:F}=o[_].options,[G,I]=u.useState([_]);G.includes(_)||I([...G,_]);const K=u.useRef(_);u.useEffect(()=>{const i=K.current;if(i!==_&&o[i]?.options.popToTopOnBlur){const o=t.routes.find(t=>t.key===i);'stack'===o?.state?.type&&o.state.key&&n.dispatch({...p.StackActions.popToTop(),target:o.state.key})}K.current=_},[o,_,n,t.routes]);const N=(0,w.useFrameSize)(t=>t,!0),{colors:V}=(0,p.useTheme)(),q=(0,k.getDrawerStatusFromState)(t),J=(0,h.default)(()=>{n.dispatch({...p.DrawerActions.openDrawer(),target:t.key})}),Q=(0,h.default)(()=>{n.dispatch({...p.DrawerActions.closeDrawer(),target:t.key})}),U=(0,h.default)(()=>{n.emit({type:'gestureStart',target:t.key})}),X=(0,h.default)(()=>{n.emit({type:'gestureEnd',target:t.key})}),Y=(0,h.default)(()=>{n.emit({type:'gestureCancel',target:t.key})}),Z=(0,h.default)(o=>{n.emit({type:'transitionStart',data:{closing:o},target:t.key})}),$=(0,h.default)(o=>{n.emit({type:'transitionEnd',data:{closing:o},target:t.key})});u.useEffect(()=>{if(q===i||'permanent'===L)return;return(0,O.addCancelListener)(()=>!!n.isFocused()&&('open'===i?J():Q(),!0))},[i,q,L,Q,J,n]);return(0,l.jsx)(v.DrawerStatusContext.Provider,{value:q,children:(0,l.jsx)(f.Drawer,{open:'closed'!==q,onOpen:J,onClose:Q,onGestureStart:U,onGestureEnd:X,onGestureCancel:Y,onTransitionStart:Z,onTransitionEnd:$,layout:N,direction:P,configureGestureHandler:M,swipeEnabled:z,swipeEdgeWidth:H,swipeMinDistance:W,hideStatusBarOnOpen:T,statusBarAnimation:B,keyboardDismissMode:E,drawerType:L,overlayAccessibilityLabel:F,drawerPosition:C,drawerStyle:[{backgroundColor:V.card},'permanent'===L&&(('web'===c.Platform.OS?'right'===C:'rtl'===P&&'right'!==C||'rtl'!==P&&'right'===C)?{borderLeftColor:V.border,borderLeftWidth:c.StyleSheet.hairlineWidth}:{borderRightColor:V.border,borderRightWidth:c.StyleSheet.hairlineWidth}),'front'===L&&('left'===C?{borderTopRightRadius:j,borderBottomRightRadius:j}:{borderTopLeftRadius:j,borderBottomLeftRadius:j}),R],overlayStyle:{backgroundColor:A},renderDrawerContent:()=>(0,l.jsx)(m.DrawerPositionContext.Provider,{value:C,children:s({state:t,navigation:n,descriptors:o})}),children:(0,l.jsx)(b.MaybeScreenContainer,{enabled:y,hasTwoStates:!0,style:x.content,children:t.routes.map((n,i)=>{const s=o[n.key],{lazy:u=!0}=s.options,f=t.index===i,h=t.preloadedRouteKeys.includes(n.key);if(u&&!G.includes(n.key)&&!f&&!h)return null;const{freezeOnBlur:p,header:m=({layout:t,options:o})=>(0,l.jsx)(w.Header,{...o,layout:t,title:(0,w.getHeaderTitle)(o,n.name),headerLeft:'left'===C&&null==o.headerLeft?t=>(0,l.jsx)(S.DrawerToggleButton,{...t}):o.headerLeft,headerRight:'right'===C&&null==o.headerRight?t=>(0,l.jsx)(S.DrawerToggleButton,{...t}):o.headerRight}),headerShown:v,headerStatusBarHeight:O,headerTransparent:k,sceneStyle:j}=s.options;return(0,l.jsx)(b.MaybeScreen,{style:[c.StyleSheet.absoluteFill,{zIndex:f?0:-1}],visible:f,enabled:y,freezeOnBlur:p,shouldFreeze:!f&&!h,children:(0,l.jsx)(w.Screen,{focused:f,route:s.route,navigation:s.navigation,headerShown:v,headerStatusBarHeight:O,headerTransparent:k,header:m({layout:N,route:s.route,navigation:s.navigation,options:s.options}),style:j,children:s.render()})},n.key)})})})})}const x=c.StyleSheet.create({content:{flex:1}})},2104,[467,224,1474,2105,1507,1503,2115,2120,2122,1703,2117,2123,2124,2125]);
8
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DrawerGestureContext",{enumerable:!0,get:function(){return t.DrawerGestureContext}}),Object.defineProperty(e,"DrawerProgressContext",{enumerable:!0,get:function(){return n.DrawerProgressContext}}),Object.defineProperty(e,"useDrawerProgress",{enumerable:!0,get:function(){return u.useDrawerProgress}}),Object.defineProperty(e,"Drawer",{enumerable:!0,get:function(){return o.Drawer}});var t=r(d[0]),n=r(d[1]),u=r(d[2]),o=r(d[3])},2105,[2106,2107,2108,2109]);
9
+ __d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DrawerGestureContext",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).createContext(void 0)},2106,[224]);
10
+ __d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DrawerProgressContext",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).createContext(void 0)},2107,[224]);
11
+ __d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useDrawerProgress=function(){const n=e.useContext(t.DrawerProgressContext);if(void 0===n)throw new Error("Couldn't find a drawer. Is your component inside a drawer?");return n};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1])},2108,[224,2107]);
12
+ __d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.Drawer=function({direction:e="ltr",drawerPosition:n=('rtl'===e?'right':'left'),drawerStyle:y,drawerType:h="front",onClose:v,onTransitionStart:b,onTransitionEnd:w,open:x,overlayStyle:j,overlayAccessibilityLabel:E,renderDrawerContent:_,children:P,style:D}){const L=(0,c.getDrawerWidthWeb)({drawerStyle:y}),O=(0,d.useFakeSharedValue)(x?1:0);t.useEffect(()=>{O.value=x?1:0},[x,O]);const $=t.useRef(null),k=(0,s.default)(e=>{e.target===e.currentTarget&&'transform'===e.propertyName&&b?.(!1===x)}),S=(0,s.default)(e=>{e.target===e.currentTarget&&'transform'===e.propertyName&&w?.(!1===x)});t.useEffect(()=>{const e=$.current;return e?.addEventListener('transitionstart',k),e?.addEventListener('transitionend',S),()=>{e?.removeEventListener('transitionstart',k),e?.removeEventListener('transitionend',S)}},[S,k]);const T='permanent'===h||x,C='right'===n,M=x||'back'===h?'left'===n?'100%':'-100%':0,W='permanent'!==h?{transition:'transform 0.3s',transform:`translateX(${M})`}:null,N=x?'front'===h?0:`calc(${L} * ${'left'===n?1:-1})`:0,X='permanent'!==h?{transition:'transform 0.3s',transform:`translateX(${N})`}:null,z=(0,f.jsx)(o.default,{ref:$,style:[p.drawer,{position:'permanent'===h?'relative':'absolute',zIndex:'back'===h?-1:1},{width:L},'permanent'!==h?'right'===n?{right:`calc(${L} * -1)`}:{left:`calc(${L} * -1)`}:null,W,y],children:_()},"drawer"),A=(0,f.jsxs)(o.default,{style:[p.content,X],children:[(0,f.jsx)(o.default,{"aria-hidden":T&&'permanent'!==h,style:p.content,children:P}),'permanent'!==h?(0,f.jsx)(u.Overlay,{open:x,progress:O,onPress:()=>v(),style:j,accessibilityLabel:E}):null]},"content");return(0,f.jsx)(l.DrawerProgressContext.Provider,{value:O,children:(0,f.jsxs)(o.default,{style:[p.container,D],children:[!C&&z,A,C&&z]})})};var t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),n=e(r(_d[1])),o=e(r(_d[2])),s=e(r(_d[3])),l=r(_d[4]),c=r(_d[5]),d=r(_d[6]),u=r(_d[7]),f=r(_d[8]);const p=n.default.create({container:{flex:1,flexDirection:'row'},drawer:{top:0,bottom:0,maxWidth:'100%',backgroundColor:'white'},content:{flex:1}})},2109,[224,233,945,2110,2107,2112,2113,2114,467]);
13
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u=((e=t)&&e.__esModule?e:{default:e}).default},2110,[2111]);
14
+ __d(function(g,r,i,a,m,e,d){"use strict";var t=r(d[0]),n='undefined'!=typeof document||'undefined'!=typeof navigator&&'ReactNative'===navigator.product?t.useLayoutEffect:t.useEffect;m.exports=function(u){var f=t.useRef(u),c=t.useRef(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return f.current.apply(this,t)}).current;return n(function(){f.current=u}),c}},2111,[224]);
15
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getDrawerWidthNative=function({layout:t,drawerStyle:e}){const o=Math.max(t.width-u<=360?t.width-u:f,0),{width:l=o}=n.default.flatten(e)||{};if('string'==typeof l&&l.endsWith('%')){const e=Number(l.replace(/%$/,''));if(Number.isFinite(e))return t.width*(e/100)}return'number'==typeof l?l:o},_e.getDrawerWidthWeb=function({drawerStyle:t}){const{width:e}=n.default.flatten(t)||{};if('number'==typeof e)return`${e}px`;if('string'==typeof e)return e;return o};var t,e=r(d[0]),n=(t=e)&&t.__esModule?t:{default:t};const u=56,f=360,o=`min(calc(100% - ${u}px), ${f}px)`},2112,[233]);
16
+ __d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useFakeSharedValue=function(s){const u=e.useRef(null);null===u.current&&(u.current=new t(s));return u.current};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(s){var u=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,u.get?u:{enumerable:!0,get:function(){return e[s]}})}),t.default=e,t})(r(_d[0]));class t{_listeners=new Map;constructor(e){this._value=e}addListener(e,t){this._listeners.set(e,t)}removeListener(e){this._listeners.delete(e)}modify(e){this.value=void 0!==e?e(this.value):this.value}get(){return this.value}set(e){this.value=e}set value(e){this._value=e;for(const t of this._listeners.values())t(e)}get value(){return this._value}_isReanimatedSharedValue=!0}},2113,[224]);
17
+ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.Overlay=function({open:e,onPress:u,style:c,accessibilityLabel:b="Close drawer",...f}){return(0,n.jsx)(o.default,{...f,style:[l.default.absoluteFill,s.overlay,{opacity:e?1:0,pointerEvents:e?'auto':'none'},c],"aria-hidden":!e,children:(0,n.jsx)(t.default,{onPress:u,style:[s.pressable,{pointerEvents:e?'auto':'none'}],role:"button","aria-label":b})})};var t=e(r(d[0])),l=e(r(d[1])),o=e(r(d[2])),n=r(d[3]);const s=l.default.create({overlay:{backgroundColor:'rgba(0, 0, 0, 0.5)',WebkitTapHighlightColor:'transparent',transition:'opacity 0.3s'},pressable:{flex:1}})},2114,[1069,233,945,467]);
18
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawerContent=function({descriptors:s,state:c,...l}){const u=c.routes[c.index],w=s[u.key].options,{drawerContentStyle:y,drawerContentContainerStyle:C}=w;return(0,t.jsx)(n.DrawerContentScrollView,{...l,contentContainerStyle:C,style:y,children:(0,t.jsx)(o.DrawerItemList,{descriptors:s,state:c,...l})})};const t=r(d[0]),n=r(d[1]),o=r(d[2])},2115,[467,2116,2118]);
19
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawerContentScrollView=void 0;const t=r(d[0]),n=r(d[1]),o=r(d[2]),l=r(d[3]),c=r(d[4]),s=r(d[5]);e.DrawerContentScrollView=function({ref:u,contentContainerStyle:S,style:p,children:w,...y}){const h=(0,n.use)(s.DrawerPositionContext),C=(0,l.useSafeAreaInsets)(),{direction:_}=(0,c.useLocale)(),x='rtl'===_?'left'===h:'right'===h;return(0,t.jsx)(o.ScrollView,{...y,ref:u,contentContainerStyle:[{paddingTop:12+C.top,paddingBottom:12+C.bottom,paddingStart:12+(x?0:C.left),paddingEnd:12+(x?C.right:0)},S],style:[f.container,p],children:w})};const f=o.StyleSheet.create({container:{flex:1}})},2116,[467,224,1474,1278,1503,2117]);
20
+ __d(function(g,r,_i,a,_m,e,d){"use strict";var t,n=this&&this.__createBinding||(Object.create?function(t,n,o,i){void 0===i&&(i=o);var u=Object.getOwnPropertyDescriptor(n,o);u&&!("get"in u?!n.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return n[o]}}),Object.defineProperty(t,i,u)}:function(t,n,o,i){void 0===i&&(i=o),t[i]=n[o]}),o=this&&this.__setModuleDefault||(Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n}),i=this&&this.__importStar||(t=function(n){return t=Object.getOwnPropertyNames||function(t){var n=[];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[n.length]=o);return n},t(n)},function(i){if(i&&i.__esModule)return i;var u={};if(null!=i)for(var c=t(i),f=0;f<c.length;f++)"default"!==c[f]&&n(u,i,c[f]);return o(u,i),u});Object.defineProperty(e,"__esModule",{value:!0}),e.DrawerPositionContext=void 0;const u=i(r(d[0]));e.DrawerPositionContext=u.createContext(void 0)},2117,[224]);
21
+ __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawerItemList=function({state:i,navigation:l,descriptors:c}){const{buildHref:s}=(0,o.useLinkBuilder)(),u=i.routes[i.index],w=c[u.key].options,{drawerActiveTintColor:v,drawerInactiveTintColor:y,drawerActiveBackgroundColor:k,drawerInactiveBackgroundColor:C}=w;return i.routes.map((u,w)=>{const f=w===i.index,{title:p,drawerLabel:I,drawerIcon:b,drawerLabelStyle:A,drawerItemStyle:B,drawerAllowFontScaling:D}=c[u.key].options;return(0,t.jsx)(n.DrawerItem,{route:u,href:s(u.name,u.params),label:void 0!==I?I:void 0!==p?p:u.name,icon:b,focused:f,activeTintColor:v,inactiveTintColor:y,activeBackgroundColor:k,inactiveBackgroundColor:C,allowFontScaling:D,labelStyle:A,style:B,onPress:()=>{l.emit({type:'drawerItemPress',target:u.key,canPreventDefault:!0}).defaultPrevented||l.dispatch({...f?o.DrawerActions.closeDrawer():o.CommonActions.navigate(u),target:i.key})}},u.key)})};const t=r(d[0]),o=r(d[1]),n=r(d[2])},2118,[467,1503,2119]);
22
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawerItem=function(u){const{colors:p,fonts:b}=(0,s.useTheme)(),{href:f,icon:h,label:y,labelStyle:x,focused:C=!1,allowFontScaling:w,activeTintColor:v=p.primary,inactiveTintColor:S,activeBackgroundColor:j,inactiveBackgroundColor:T="transparent",style:V,onPress:P,pressColor:D,pressOpacity:I=1,testID:O,accessibilityLabel:_,...k}=u,{borderRadius:E=56}=l.StyleSheet.flatten(V||{}),R=C?v:S??(0,o.Color)(p.text)?.alpha(.68).string()??p.text,B=C?j??(0,o.Color)(v)?.alpha(.12).string()??'transparent':T,F=h?h({size:24,focused:C,color:R}):null;return(0,t.jsx)(l.View,{collapsable:!1,...k,style:[c.container,{borderRadius:E,backgroundColor:B},V],children:(0,t.jsx)(n.PlatformPressable,{testID:O,onPress:P,role:"button","aria-label":_,"aria-selected":C,pressColor:D,pressOpacity:I,hoverEffect:{color:R},href:f,children:(0,t.jsxs)(l.View,{style:[c.wrapper,{borderRadius:E}],children:[F,(0,t.jsx)(l.View,{style:[c.label,{marginStart:F?12:0}],children:'string'==typeof y?(0,t.jsx)(n.Text,{numberOfLines:1,allowFontScaling:w,style:[c.labelText,{color:R},b.medium,x],children:y}):y({color:R,focused:C})})]})})})};const t=r(d[0]),l=r(d[1]),o=r(d[2]),n=r(d[3]),s=r(d[4]);const c=l.StyleSheet.create({container:{borderCurve:'continuous',overflow:'hidden'},wrapper:{flexDirection:'row',alignItems:'center',paddingVertical:11,paddingStart:16,paddingEnd:24,borderCurve:'continuous'},label:{marginEnd:12,marginVertical:4,flex:1},labelText:{lineHeight:24,textAlignVertical:'center'}})},2119,[467,1474,1711,1703,1503]);
23
+ __d(function(g,r,i,a,m,e,d){"use strict";var t=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DrawerToggleButton=function({tintColor:t,accessibilityLabel:h="Show navigation menu",imageSource:f=s.default,..._}){const b=(0,l.useNavigation)();return(0,o.jsx)(c.HeaderButton,{..._,accessibilityLabel:h,onPress:()=>b.dispatch(l.DrawerActions.toggleDrawer()),children:(0,o.jsx)(n.Image,{resizeMode:"contain",source:f,fadeDuration:0,tintColor:t,style:u.icon})})};const o=r(d[0]),n=r(d[1]),s=t(r(d[2])),c=r(d[3]),l=r(d[4]);const u=n.StyleSheet.create({icon:{height:24,width:24,marginVertical:8,marginHorizontal:5}})},2120,[467,1474,2121,1703,1503]);
24
+ __d(function(g,r,i,a,m,e,d){m.exports={uri:"/assets/_____.bun/install/cache/links/expo-router@57.0.24+dc951f634b001cec-a06b318b98b13101/node_modules/expo-router/assets/react-navigation/drawer/toggle-drawer-icon.ae74bb20586a731af545e6b00fe14a09.png",width:96,height:96,toString(){return this.uri}}},2121,[]);
25
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,"__esModule",{value:!0}),_e.MaybeScreenContainer=void 0,_e.MaybeScreen=function({visible:n,children:s,...l}){if(t?.screensEnabled?.())return(0,e.jsx)(t.Screen,{activityState:n?2:0,...l,children:s});return(0,e.jsx)(c.ResourceSavingView,{visible:n,...l,children:s})};const e=r(d[0]),n=r(d[1]),c=r(d[2]);let t;try{t=r(d[3],"react-native-screens")}catch(e){}_e.MaybeScreenContainer=({enabled:c,...s})=>t?.screensEnabled?.()?(0,e.jsx)(t.ScreenContainer,{enabled:c,...s}):(0,e.jsx)(n.View,{...s})},2122,[467,1474,1703,1754]);
26
+ __d(function(g,r,_i,a,_m,e,d){"use strict";var t,n=this&&this.__createBinding||(Object.create?function(t,n,o,i){void 0===i&&(i=o);var u=Object.getOwnPropertyDescriptor(n,o);u&&!("get"in u?!n.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return n[o]}}),Object.defineProperty(t,i,u)}:function(t,n,o,i){void 0===i&&(i=o),t[i]=n[o]}),o=this&&this.__setModuleDefault||(Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t.default=n}),i=this&&this.__importStar||(t=function(n){return t=Object.getOwnPropertyNames||function(t){var n=[];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[n.length]=o);return n},t(n)},function(i){if(i&&i.__esModule)return i;var u={};if(null!=i)for(var c=t(i),f=0;f<c.length;f++)"default"!==c[f]&&n(u,i,c[f]);return o(u,i),u});Object.defineProperty(e,"__esModule",{value:!0}),e.DrawerStatusContext=void 0;const u=i(r(d[0]));e.DrawerStatusContext=u.createContext(void 0)},2123,[224]);
27
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,"__esModule",{value:!0}),_e.addCancelListener=void 0;_e.addCancelListener=e=>{const n=n=>{'Escape'===n.key&&e()};return document?.body?.addEventListener?.('keyup',n),()=>{document?.body?.removeEventListener?.('keyup',n)}}},2124,[]);
28
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDrawerStatusFromState=function(t){if(null==t.history)throw new Error("Couldn't find the drawer status in the state object. Is it a valid state object of drawer navigator?");const o=t.history.findLast(t=>'drawer'===t.type);return o?.status??t.default??'closed'}},2125,[]);
29
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useDrawerStatus=function(){const o=(0,t.use)(n.DrawerStatusContext);if(void 0===o)throw new Error("Couldn't find a drawer. Is your component inside a drawer navigator?");return o};const t=r(d[0]),n=r(d[1])},2126,[224,2123]);
30
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.FeedbackHost=function(){return null}},2127,[]);
31
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.LeadPanel=function(){const n=(0,e.c)(35),[s,l,u]=(0,_.useLeadPanel)(),{open:h,width:f}=s,{lead:p,opensIn:J,toggle:D}=(0,w.useLeadInView)(),k=h&&"panel"===J;let W;n[0]===Symbol.for("react.memo_cache_sentinel")?(W=[],n[0]=W):W=n[0];const[I,C]=(0,o.useState)(W),R=(0,o.useRef)(null);O(R,!k);const z=(0,t.useColor)("line");let M;n[1]!==l?(M=()=>l({open:!1}),n[1]=l,n[2]=M):M=n[2];const N=M;let T,q,B,G;n[3]!==p||n[4]!==k?(T=()=>{k&&p&&C(e=>[p.id,...e.filter(e=>e!==p.id)].slice(0,y))},q=[k,p],n[3]=p,n[4]=k,n[5]=T,n[6]=q):(T=n[5],q=n[6]);(0,o.useEffect)(T,q),n[7]!==k?(B=()=>{k&&requestAnimationFrame(()=>document.getElementById(L)?.querySelector("textarea")?.focus())},G=[k],n[7]=k,n[8]=B,n[9]=G):(B=n[8],G=n[9]);if((0,o.useEffect)(B,G),E(k,D,N),!u||!p||0===I.length)return null;const H=!k,X=k?"auto":"none";let $,A,F,K,U,V;n[10]!==z||n[11]!==f?($={width:f,borderLeftWidth:1,borderLeftColor:z},n[10]=z,n[11]=f,n[12]=$):$=n[12];n[13]!==k?(A=k?null:{position:"absolute",top:0,right:0,bottom:0,...P},n[13]=k,n[14]=A):A=n[14];n[15]!==A||n[16]!==$?(F=[$,A],n[15]=A,n[16]=$,n[17]=F):F=n[17];if(n[18]!==I||n[19]!==N||n[20]!==p){let e;n[22]!==N||n[23]!==p?(e=e=>(0,v.jsx)(x,{shown:e===p.id,children:(0,v.jsx)(S.ManagerChat,{managerId:e,onClose:N})},e),n[22]=N,n[23]=p,n[24]=e):e=n[24],K=I.map(e),n[18]=I,n[19]=N,n[20]=p,n[21]=K}else K=n[21];n[25]!==k||n[26]!==l||n[27]!==f?(U=k?(0,v.jsx)(j,{width:f,onWidth:e=>l({width:e})}):null,n[25]=k,n[26]=l,n[27]=f,n[28]=U):U=n[28];n[29]!==F||n[30]!==K||n[31]!==U||n[32]!==H||n[33]!==X?(V=(0,v.jsxs)(c.default,{ref:R,nativeID:b,role:"complementary","aria-label":"Chat panel","aria-hidden":H,pointerEvents:X,style:F,className:"bg-canvas",children:[K,U]}),n[29]=F,n[30]=K,n[31]=U,n[32]=H,n[33]=X,n[34]=V):V=n[34];return V};var e=r(d[0]),t=r(d[1]),n=r(d[2]),o=r(d[3]);r(d[4]);var s,l=r(d[5]),c=(s=l)&&s.__esModule?s:{default:s},u=r(d[6]),h=r(d[7]),f=r(d[8]),_=r(d[9]),p=r(d[10]),w=r(d[11]),S=r(d[12]),v=r(d[13]);const b="lead-panel",y=3;const L="lead-panel-chat",P={opacity:0,visibility:"hidden"};function O(t,n){const s=(0,e.c)(4);let l,c;s[0]!==n||s[1]!==t?(l=()=>{const e=t.current;e&&(e.inert=n)},c=[t,n],s[0]=n,s[1]=t,s[2]=l,s[3]=c):(l=s[2],c=s[3]),(0,o.useEffect)(l,c)}function x(t){const n=(0,e.c)(8),{shown:s,children:l}=t,u=(0,o.useRef)(null);O(u,!s);const h=s?L:void 0,_=!s,p=s?"auto":"none",w=s?void 0:P;let S,b;return n[0]!==l?(S=(0,v.jsx)(f.OwnChatParams,{children:l}),n[0]=l,n[1]=S):S=n[1],n[2]!==h||n[3]!==_||n[4]!==p||n[5]!==w||n[6]!==S?(b=(0,v.jsx)(c.default,{ref:u,nativeID:h,"aria-hidden":_,pointerEvents:p,style:w,className:"absolute inset-0",children:S}),n[2]=h,n[3]=_,n[4]=p,n[5]=w,n[6]=S,n[7]=b):b=n[7],b}function E(e,t,s){const l=(0,o.useRef)({open:e,toggle:t,close:s});l.current={open:e,toggle:t,close:s},(0,n.useKeyDown)(e=>{(0,p.isShortcut)(e,p.shortcuts.leadPanel)&&(e.preventDefault(),t())},{enabled:!1}),(0,o.useEffect)(()=>{let e=!1;const t=t=>{e=!!t.target?.closest?.(`#${b}`)},n=t=>{const{open:n,toggle:o,close:s}=l.current,c=t;if((0,p.isShortcut)(c,p.shortcuts.leadPanel))return t.preventDefault(),void o();if(!n||!(0,p.isShortcut)(c,p.shortcuts.close))return;const u=document.activeElement;(!!u?.closest(`#${b}`)||(!u||u===document.body)&&e)&&(t.preventDefault(),u?.blur?.(),s())};return window.addEventListener("pointerdown",t,!0),window.addEventListener("keydown",n,!0),()=>{window.removeEventListener("pointerdown",t,!0),window.removeEventListener("keydown",n,!0)}},[])}const J={code:"function leadPanelTsx1(e){const{runOnJS,onWidth,clampLeadPanel,start}=this.__closure;return runOnJS(onWidth)(clampLeadPanel(start-e.translationX));}"},D={code:"function leadPanelTsx2(){const{runOnJS,setStart,width}=this.__closure;return runOnJS(setStart)(width);}"};function j(n){const s=(0,e.c)(12),{width:l,onWidth:f}=n,[p,w]=(0,o.useState)(l);let S;if(s[0]!==f||s[1]!==p||s[2]!==l){let e,t;s[4]!==l?(e=(function({_worklet_7099490440696_init_data:e,runOnJS:t,setStart:n,width:o}){const s=()=>t(n)(o);return s.__closure={runOnJS:t,setStart:n,width:o},s.__workletHash=7099490440696,s.__initData=e,s})({_worklet_7099490440696_init_data:D,runOnJS:h.runOnJS,setStart:w,width:l}),s[4]=l,s[5]=e):e=s[5],s[6]!==f||s[7]!==p?(t=(function({_worklet_10770386172422_init_data:e,runOnJS:t,onWidth:n,clampLeadPanel:o,start:s}){const l=e=>t(n)(o(s-e.translationX));return l.__closure={runOnJS:t,onWidth:n,clampLeadPanel:o,start:s},l.__workletHash=0x9cbad0aba06,l.__initData=e,l})({_worklet_10770386172422_init_data:J,runOnJS:h.runOnJS,onWidth:f,clampLeadPanel:_.clampLeadPanel,start:p}),s[6]=f,s[7]=p,s[8]=t):t=s[8],S=u.Gesture.Pan().onBegin(e).onUpdate(t),s[0]=f,s[1]=p,s[2]=l,s[3]=S}else S=s[3];const b=S,y=(0,o.useRef)(null);let L,P;return(0,t.useTooltip)(y,"Drag to resize"),s[9]===Symbol.for("react.memo_cache_sentinel")?(L=(0,v.jsx)(c.default,{ref:y,testID:"lead-panel-edge",accessibilityLabel:"Resize the chat panel",style:{cursor:"col-resize"},className:"absolute top-0 bottom-0 -left-1 w-2 hover:bg-line-strong/60"}),s[9]=L):L=s[9],s[10]!==b?(P=(0,v.jsx)(u.GestureDetector,{gesture:b,children:L}),s[10]=b,s[11]=P):P=s[11],P}},2128,[405,408,1284,224,308,945,1088,470,2200,2201,2202,2129,2203,467]);
32
+ __d(function(g,r,i,a,_m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useLeadInView=function(){const l=(0,n.c)(8),f=(0,t.usePathname)(),v=(0,o.useRouteProject)(),m=(0,s.useManagers)().data?.managers??[],M=(0,u.useLeadOpensIn)(),[P,_]=(0,u.useLeadPanel)(),{opened:k,open:I}=P,L="page"===M&&!!k&&f===`/agents/${k.id}`,b=(L?m.find(n=>n.id===k?.id):void 0)??(0,c.mainManagerFor)(m,v);let h;l[0]!==_?(h=n=>{_({opened:{id:n}}),(0,p.openManager)(n)},l[0]=_,l[1]=h):h=l[1];const j=h,O=()=>{b&&("panel"===M?_({open:!I}):L?t.router.canGoBack()?t.router.back():t.router.navigate("/tasks"):j(b.id))},w="panel"===M?I:L,y=b?(0,p.managerHref)(b.id):void 0;let B;l[2]!==b||l[3]!==M||l[4]!==w||l[5]!==y||l[6]!==O?(B={lead:b,opensIn:M,active:w,href:y,toggle:O},l[2]=b,l[3]=M,l[4]=w,l[5]=y,l[6]=O,l[7]=B):B=l[7];return B};var n=r(d[0]),t=r(d[1]),o=r(d[2]),s=r(d[3]),u=r(d[4]),c=r(d[5]),p=r(d[6])},2129,[405,1463,2130,2204,2201,2205,2206]);
33
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useRouteProject=function(){const o=(0,t.c)(3),n=(0,s.usePathname)(),{project:l}=(0,s.useGlobalSearchParams)(),{filters:u}=(0,c.useTaskFilters)();let f;if(o[0]!==n){let t;o[2]===Symbol.for("react.memo_cache_sentinel")?(t=/^\/(?:projects\/([^/]+)|(?:(?:machines|managers)\/)?tasks\/([^/]+)\/)/,o[2]=t):t=o[2],f=n.match(t),o[0]=n,o[1]=f}else f=o[1];const j=f,h=j?.[1]??j?.[2];if(h)return h;if("/claude"===n&&l)return l;return"all"!==u.projects&&1===u.projects.length?u.projects[0]:void 0};var t=r(d[0]),s=r(d[1]),c=r(d[2])},2130,[405,1463,2207]);
34
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useNotificationToasts=function(){const p=(0,o.useApi)(),l=(0,t.useQueryClient)(),y=(0,f.useOpenEntry)(),v=(0,c.useNotificationsPanel)(),h=(0,n.useRef)({openEntry:y,panelOpen:v.open});h.current={openEntry:y,panelOpen:v.open},(0,n.useEffect)(()=>{let t;return u.serverEvents.subscribe(n=>{"notifications.read"!==n.type?"notification"!==n.type||n.quiet||h.current.panelOpen||l.fetchQuery({...(0,f.notificationsQuery)(p),staleTime:0}).then(({notifications:o})=>{const u=o.find(t=>t.id===n.id);if(!u||u.read||"review"===u.target.reason)return;t={ref:u.id,hide:(0,s.showToastUntil)(u.target.title,void 0,()=>h.current.openEntry(u))}}).catch(()=>{}):!t||n.ids&&!n.ids.includes(t.ref)||t.hide()})},[p,l])};var t=r(d[0]),n=r(d[1]);r(d[2]);var s=r(d[3]),o=r(d[4]),u=r(d[5]),c=r(d[6]),f=r(d[7])},2131,[1408,224,308,1462,407,2045,2208,2209]);
35
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useReadyToasts=function(){const I=(0,t.useQueryClient)(),{merge:k}=(0,f.useMergeActions)(),l=(0,s.useRef)(k);l.current=k;const y=(0,u.useOpenTask)(),v=(0,n.useOpenNotification)(),$=(0,s.useRef)(y);$.current=y,(0,s.useEffect)(()=>{let t;const s=(e,t)=>`${e.projectId}/${e.taskId}/${t}`;return c.serverEvents.subscribe(n=>{if("question.answered"===n.type&&t?.key===s(n,n.questionId))return t.hide();if("question.opened"!==n.type)return;const{question:u,projectId:c,taskId:f}=n;if("merge"!==u.purpose||"open"!==u.status)return;const k=I.getQueryData(["projects"])?.find(e=>e.id===c)?.key,y=(0,e.displayTaskId)(f,k),b=(...e)=>{t={key:s(n,u.id),hide:(0,o.showToastUntil)(...e)}},j=`question:${u.id}`,q=()=>v(`/tasks/${encodeURIComponent(c)}/${encodeURIComponent(f)}?message=${encodeURIComponent(j)}`,()=>$.current({projectId:c,taskId:f},{message:j})),h=(0,e.questionError)(u);if(h)return b(`${y} is back in review. ${h.message}`,void 0,q);const w=p(I,{projectId:c,taskId:f}),R=u.choices.find(e=>"merge"===e.id)?.label??"Merge",_=w&&{...w,status:"in_review",merge:{questionId:u.id,label:R}};if("failing"===w?.pr?.checks)return b(`${y} is ready for review, but its checks fail`,void 0,q);b(`${y} is ready for review`,_?{label:R,run:()=>l.current(_)}:void 0,q)})},[I,v])};var e=r(d[0]),t=r(d[1]),s=r(d[2]);r(d[3]);var n=r(d[4]),o=r(d[5]),u=r(d[6]),c=r(d[7]),f=r(d[8]);function p(e,t){for(const[,s]of e.getQueriesData({queryKey:["tasks","list"]})){const e=s?.find(e=>e.projectId===t.projectId&&e.id===t.taskId);if(e)return e}}},2132,[2,1408,224,308,2210,1462,2211,2045,2212]);
36
+ __d(function(_g,_r,_i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SearchPalette=function(){const e=(0,t.c)(65),o=(0,S.useSearchPalette)(),r="phone"===(0,y.useLayout)();let i,u;e[0]!==o?(i=e=>{(0,j.isShortcut)(e,j.shortcuts.palette)&&(e.preventDefault(),e.stopPropagation(),o.toggle())},e[0]=o,e[1]=i):i=e[1];e[2]===Symbol.for("react.memo_cache_sentinel")?(u={first:!0},e[2]=u):u=e[2];(0,s.useKeyDown)(i,u);const[h,f]=(0,c.useState)(""),[x,b]=N(),{queries:g}=x,[_,k]=(0,c.useState)(0);let C;e[3]!==h?(C=h.trim(),e[3]=h,e[4]=C):C=e[4];const T=C,{groups:R,searchingMessages:M}=(0,w.useSearchResults)(T);let D;e[5]!==T||e[6]!==g?(D=!T&&g.length?[{title:"Recent",results:g.map(e=>({key:`recent:${e}`,face:(0,v.jsx)(n.Icon,{icon:l.default,size:16,color:"ink-3"}),label:e,open:()=>f(e)}))}]:[],e[5]=T,e[6]=g,e[7]=D):D=e[7];const K=D,V=T?R:K;let z;e[8]!==V?(z=V.flatMap(P),e[8]=V,e[9]=z):z=e[9];const O=z;let H,B,F,W;e[10]===Symbol.for("react.memo_cache_sentinel")?(H=()=>{k(0)},e[10]=H):H=e[10];e[11]!==T?(B=[T],e[11]=T,e[12]=B):B=e[12];(0,c.useEffect)(H,B),e[13]!==o.open?(F=()=>{o.open&&f("")},W=[o.open],e[13]=o.open,e[14]=F,e[15]=W):(F=e[14],W=e[15]);(0,c.useEffect)(F,W);const A=(0,c.useRef)(void 0);let Q;e[16]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>{const e=A.current;A.current=void 0,e?.()},e[16]=Q):Q=e[16];const U=Q;let G;e[17]!==o||e[18]!==T||e[19]!==g||e[20]!==b?(G=e=>{if(e){if(e.key.startsWith("recent:"))return e.open();T&&b({queries:[T,...g.filter(e=>e!==T)].slice(0,6)}),A.current=e.open,o.hide(),U()}},e[17]=o,e[18]=T,e[19]=g,e[20]=b,e[21]=G):G=e[21];const J=G;let X;e[22]!==O.length?(X=e=>{const t="ArrowDown"===e?1:"ArrowUp"===e?-1:0;return!(!t||!O.length)&&(k(e=>(e+t+O.length)%O.length),!0)},e[22]=O.length,e[23]=X):X=e[23];const Y=X;let Z;e[24]!==Y?(Z=e=>{Y(e.key)&&e.stopPropagation()},e[24]=Y,e[25]=Z):Z=e[25];const ee=o.open&&!1;let te;e[26]!==ee?(te={enabled:ee,first:!0},e[26]=ee,e[27]=te):te=e[27];(0,s.useKeyDown)(Z,te),(0,s.useEscapeCloses)(o.open,o.hide),(0,n.useModalUp)(o.open);const ne=O[_]?.key;let se,le,oe,ae;e[28]!==O?(se=e=>k(O.findIndex(t=>t.key===e)),e[28]=O,e[29]=se):se=e[29];e[30]!==T||e[31]!==M?(le=T?M?(0,v.jsx)($,{children:"Searching\u2026"}):(0,v.jsx)($,{children:`Nothing matches \u201c${T}\u201d.`}):(0,v.jsx)($,{children:"Find a task by its title or id, a project, an agent, a machine, a setting, or words in a conversation."}),e[30]=T,e[31]=M,e[32]=le):le=e[32];e[33]!==R||e[34]!==T||e[35]!==M?(oe=T&&R.length&&M?(0,v.jsx)($,{children:"Searching messages\u2026"}):null,e[33]=R,e[34]=T,e[35]=M,e[36]=oe):oe=e[36];e[37]!==J||e[38]!==r||e[39]!==T||e[40]!==V||e[41]!==ne||e[42]!==se||e[43]!==le||e[44]!==oe?(ae=(0,v.jsx)(L,{groups:V,lit:ne,query:T,onLight:se,onChoose:J,phone:r,empty:le,footer:oe}),e[37]=J,e[38]=r,e[39]=T,e[40]=V,e[41]=ne,e[42]=se,e[43]=le,e[44]=oe,e[45]=ae):ae=e[45];const re=ae;let ie,ce;e[46]!==J||e[47]!==O||e[48]!==_?(ie=()=>J(O[_]),e[46]=J,e[47]=O,e[48]=_,e[49]=ie):ie=e[49];e[50]!==Y||e[51]!==r||e[52]!==h||e[53]!==ie?(ce=(0,v.jsx)(E,{query:h,onQuery:f,onSubmit:ie,onKey:Y,phone:r}),e[50]=Y,e[51]=r,e[52]=h,e[53]=ie,e[54]=ce):ce=e[54];const ue=ce;let de,he,me;e[55]===Symbol.for("react.memo_cache_sentinel")?(de={flex:1},e[55]=de):de=e[55];e[56]!==re||e[57]!==ue||e[58]!==o.hide||e[59]!==r?(he=(0,v.jsx)(p.GestureHandlerRootView,{style:de,children:(0,v.jsx)(n.ModalLayer,{children:r?(0,v.jsx)(I,{onClose:o.hide,field:ue,children:re}):(0,v.jsx)(q,{onClose:o.hide,field:ue,children:re})})}),e[56]=re,e[57]=ue,e[58]=o.hide,e[59]=r,e[60]=he):he=e[60];e[61]!==o.hide||e[62]!==o.open||e[63]!==he?(me=(0,v.jsx)(n.Overlay,{visible:o.open,transparent:!0,animationType:"none",onRequestClose:o.hide,onDismiss:U,children:he}),e[61]=o.hide,e[62]=o.open,e[63]=he,e[64]=me):me=e[64];return me};var t=_r(d[0]),n=_r(d[1]),s=_r(d[2]),l=e(_r(d[3])),o=e(_r(d[4])),r=e(_r(d[5])),i=e(_r(d[6])),c=_r(d[7]);_r(d[8]);var u=e(_r(d[9])),h=e(_r(d[10])),f=e(_r(d[11])),p=_r(d[12]),x=_r(d[13]),b=e(x),y=_r(d[14]),g=_r(d[15]),j=_r(d[16]),S=_r(d[17]),w=_r(d[18]),v=_r(d[19]);const N=(0,g.deviceSetting)("superfactory.recent-searches",{queries:[]},{ofServer:!0}),_={width:640,height:480},k=130,C=120,T="Search tasks, projects, agents, machines, settings";function P(e){return e.results}function q(e){const n=(0,t.c)(19),{onClose:l,field:o,children:r}=e,i=(0,h.default)(),c=(0,s.useHasKeyboard)(),p=Math.min(_.height,i.height-96);let y,g;n[0]===Symbol.for("react.memo_cache_sentinel")?(y=x.FadeIn.duration(k),n[0]=y):y=n[0],n[1]!==l?(g=(0,v.jsx)(u.default,{accessibilityLabel:"Close the search",onPress:l,className:"absolute inset-0 bg-scrim"}),n[1]=l,n[2]=g):g=n[2];const j=Math.min(_.width,i.width-32),S=Math.min(.12*i.height,120);let w,N,C,T,P;return n[3]!==p||n[4]!==j||n[5]!==S?(w={width:j,height:p,marginTop:S},n[3]=p,n[4]=j,n[5]=S,n[6]=w):w=n[6],n[7]!==r?(N=(0,v.jsx)(f.default,{className:"min-h-0 flex-1",children:r}),n[7]=r,n[8]=N):N=n[8],n[9]!==c?(C=c?(0,v.jsx)(K,{}):null,n[9]=c,n[10]=C):C=n[10],n[11]!==o||n[12]!==w||n[13]!==N||n[14]!==C?(T=(0,v.jsxs)(f.default,{role:"dialog","aria-modal":!0,"aria-label":"Search",style:w,className:"overflow-hidden rounded-xl border border-line bg-canvas shadow-2xl shadow-black/25",children:[o,N,C]}),n[11]=o,n[12]=w,n[13]=N,n[14]=C,n[15]=T):T=n[15],n[16]!==g||n[17]!==T?(P=(0,v.jsxs)(b.default.View,{entering:y,className:"flex-1 items-center px-4",children:[g,T]}),n[16]=g,n[17]=T,n[18]=P):P=n[18],P}function I(e){const s=(0,t.c)(28),{onClose:l,field:o,children:r}=e,i=(0,n.useWindowInsets)();let u;s[0]!==l?(u={onClose:l},s[0]=l,s[1]=u):u=s[1];const h=(0,n.useSwipeToClose)(u),{dim:p}=(0,n.useSwipeStyles)(h);let y,g,j,S;s[2]!==h?(y=()=>{h.reset()},g=[h],s[2]=h,s[3]=y,s[4]=g):(y=s[3],g=s[4]),(0,c.useEffect)(y,g),s[5]!==p?(j=(0,v.jsx)(b.default.View,{style:p,pointerEvents:"none",className:"absolute inset-0 bg-scrim"}),s[5]=p,s[6]=j):j=s[6],s[7]===Symbol.for("react.memo_cache_sentinel")?(S=x.SlideInDown.duration(260),s[7]=S):S=s[7];const w=i.top+8;let N,_,k,C,T,P,q,I;return s[8]!==w?(N={paddingTop:w},s[8]=w,s[9]=N):N=s[9],s[10]===Symbol.for("react.memo_cache_sentinel")?(_=(0,v.jsx)(n.Text,{variant:"callout",tone:"accent",className:"font-sans-medium",children:"Cancel"}),s[10]=_):_=s[10],s[11]!==l?(k=(0,v.jsx)(n.PressableScale,{accessibilityRole:"button",onPress:l,className:"px-1 py-2",children:_}),s[11]=l,s[12]=k):k=s[12],s[13]!==o||s[14]!==N||s[15]!==k?(C=(0,v.jsxs)(n.SwipeHandle,{style:N,className:"flex-row items-center gap-2 border-b border-line px-4 pb-3",children:[o,k]}),s[13]=o,s[14]=N,s[15]=k,s[16]=C):C=s[16],s[17]!==r?(T=(0,v.jsx)(f.default,{className:"min-h-0 flex-1",children:r}),s[17]=r,s[18]=T):T=s[18],s[19]!==C||s[20]!==T?(P=(0,v.jsxs)(f.default,{role:"dialog","aria-label":"Search",className:"flex-1",children:[C,T]}),s[19]=C,s[20]=T,s[21]=P):P=s[21],s[22]!==h||s[23]!==P?(q=(0,v.jsx)(b.default.View,{entering:S,className:"flex-1",children:(0,v.jsx)(n.SwipePanel,{swipe:h,edge:!0,className:"flex-1 bg-canvas",children:P})}),s[22]=h,s[23]=P,s[24]=q):q=s[24],s[25]!==q||s[26]!==j?(I=(0,v.jsxs)(v.Fragment,{children:[j,q]}),s[25]=q,s[26]=j,s[27]=I):I=s[27],I}function E(e){const s=(0,t.c)(22),{query:l,onQuery:o,onSubmit:u,onKey:h,phone:p}=e,x=(0,c.useRef)(null);let b,y;s[0]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{const e=setTimeout(()=>x.current?.focus(),C);return()=>clearTimeout(e)},y=[],s[0]=b,s[1]=y):(b=s[0],y=s[1]),(0,c.useEffect)(b,y);const g=p?"Search":T;let j;s[2]!==h?(j=e=>{h(e.nativeEvent.key)&&(e.preventDefault(),e.stopPropagation())},s[2]=h,s[3]=j):j=s[3];const S=p?"text-callout":"text-body";let w;s[4]!==o||s[5]!==u||s[6]!==l||s[7]!==g||s[8]!==j||s[9]!==S?(w=(0,v.jsx)(n.SearchInput,{ref:x,value:l,onChangeText:o,placeholder:g,accessibilityLabel:"Search",returnKeyType:"go",onSubmitEditing:u,onKeyPress:j,blurOnSubmit:!1,className:S}),s[4]=o,s[5]=u,s[6]=l,s[7]=g,s[8]=j,s[9]=S,s[10]=w):w=s[10];const N=w;let _;s[11]!==o||s[12]!==l?(_=l?(0,v.jsx)(n.PressableScale,{accessibilityRole:"button",accessibilityLabel:"Clear the search",onPress:()=>o(""),children:(0,v.jsx)(n.Icon,{icon:i.default,size:16,color:"ink-3"})}):null,s[11]=o,s[12]=l,s[13]=_):_=s[13];const k=_;if(p){let e,t;return s[14]===Symbol.for("react.memo_cache_sentinel")?(e=(0,v.jsx)(n.Icon,{icon:r.default,size:17,color:"ink-3"}),s[14]=e):e=s[14],s[15]!==k||s[16]!==N?(t=(0,v.jsxs)(f.default,{className:"h-11 flex-1 flex-row items-center gap-2 rounded-full bg-sunken px-4",children:[e,N,k]}),s[15]=k,s[16]=N,s[17]=t):t=s[17],t}let P,q;return s[18]===Symbol.for("react.memo_cache_sentinel")?(P=(0,v.jsx)(n.Icon,{icon:r.default,size:18,color:"ink-3"}),s[18]=P):P=s[18],s[19]!==k||s[20]!==N?(q=(0,v.jsxs)(f.default,{className:"h-14 flex-row items-center gap-3 border-b border-line px-4",children:[P,N,k]}),s[19]=k,s[20]=N,s[21]=q):q=s[21],q}function L(e){const s=(0,t.c)(20),{groups:l,lit:o,query:r,onLight:i,onChoose:c,phone:u,empty:h,footer:p}=e,x=(0,n.useWindowInsets)();let b;s[0]!==x||s[1]!==u?(b=u?{paddingBottom:x.bottom+24}:void 0,s[0]=x,s[1]=u,s[2]=b):b=s[2];const y=u?"px-4 pt-4":"px-2 py-3";let g,j,S,w;return s[3]!==y?(g=(0,n.cn)("gap-4",y),s[3]=y,s[4]=g):g=s[4],s[5]!==h||s[6]!==l||s[7]!==o||s[8]!==c||s[9]!==i||s[10]!==u||s[11]!==r?(j=l.length?l.map(e=>(0,v.jsxs)(f.default,{className:"gap-0.5",children:[(0,v.jsx)(n.Text,{variant:"footnote",tone:"tertiary",className:"px-2 pb-1 font-sans-medium",children:e.title}),e.results.map(e=>(0,v.jsx)(R,{result:e,query:r,lit:e.key===o,phone:u,onLight:()=>i(e.key),onChoose:()=>c(e)},e.key))]},e.title)):(0,v.jsx)(f.default,{className:"px-2",children:h}),s[5]=h,s[6]=l,s[7]=o,s[8]=c,s[9]=i,s[10]=u,s[11]=r,s[12]=j):j=s[12],s[13]!==p?(S=p?(0,v.jsx)(f.default,{className:"px-2",children:p}):null,s[13]=p,s[14]=S):S=s[14],s[15]!==b||s[16]!==g||s[17]!==j||s[18]!==S?(w=(0,v.jsxs)(n.SheetScrollView,{keyboardShouldPersistTaps:"handled",keyboardDismissMode:"on-drag",contentContainerStyle:b,contentContainerClassName:g,children:[j,S]}),s[15]=b,s[16]=g,s[17]=j,s[18]=S,s[19]=w):w=s[19],w}function R(e){const s=(0,t.c)(32),{result:l,query:r,lit:i,phone:u,onLight:h,onChoose:p}=e,x=(0,c.useRef)(null);let b,y,g;s[0]!==i?(b=()=>{i&&x.current?.scrollIntoView?.({block:"nearest"})},y=[i],s[0]=i,s[1]=b,s[2]=y):(b=s[1],y=s[2]),(0,c.useEffect)(b,y),s[3]!==l.detail||s[4]!==l.label?(g=[l.label,l.detail].filter(Boolean),s[3]=l.detail,s[4]=l.label,s[5]=g):g=s[5];const j=g.join(", "),S=u?"min-h-12 py-2":"min-h-10 py-1.5",w=i&&!u&&"bg-sunken";let N,_;s[6]!==S||s[7]!==w?(N=(0,n.cn)("flex-row items-center gap-3 rounded-lg px-2",S,w,"active:bg-sunken"),s[6]=S,s[7]=w,s[8]=N):N=s[8],s[9]!==l.face?(_=(0,v.jsx)(f.default,{className:"w-5 items-center",children:l.face}),s[9]=l.face,s[10]=_):_=s[10];const k=l.quote?2:1;let C,T,P,q,I;return s[11]!==r||s[12]!==l.label||s[13]!==k?(C=(0,v.jsx)(M,{text:l.label,query:r,lines:k}),s[11]=r,s[12]=l.label,s[13]=k,s[14]=C):C=s[14],s[15]!==l.detail?(T=l.detail?(0,v.jsx)(n.Text,{variant:"footnote",tone:"tertiary",numberOfLines:1,children:l.detail}):null,s[15]=l.detail,s[16]=T):T=s[16],s[17]!==C||s[18]!==T?(P=(0,v.jsxs)(f.default,{className:"min-w-0 flex-1 gap-0.5",children:[C,T]}),s[17]=C,s[18]=T,s[19]=P):P=s[19],s[20]!==i||s[21]!==u?(q=i&&!u?(0,v.jsx)(n.Icon,{icon:o.default,size:14,color:"ink-3"}):null,s[20]=i,s[21]=u,s[22]=q):q=s[22],s[23]!==i||s[24]!==p||s[25]!==h||s[26]!==P||s[27]!==q||s[28]!==j||s[29]!==N||s[30]!==_?(I=(0,v.jsxs)(n.PressableScale,{ref:x,scale:.99,accessibilityRole:"button",accessibilityLabel:j,"aria-selected":i,onHoverIn:h,onPress:p,className:N,children:[_,P,q]}),s[23]=i,s[24]=p,s[25]=h,s[26]=P,s[27]=q,s[28]=j,s[29]=N,s[30]=_,s[31]=I):I=s[31],I}function M(e){const s=(0,t.c)(12),{text:l,query:o,lines:r}=e;let i,c,u,h,f;if(s[0]!==r||s[1]!==o||s[2]!==l){const e=o.split(/\s+/).filter(Boolean).map(D),t=e.length?l.split(new RegExp(`(${e.join("|")})`,"i")):[l],f=t=>e.length>0&&new RegExp(`^(${e.join("|")})$`,"i").test(t);i=n.Text,c="callout",u=r,h=t.map((e,t)=>f(e)?(0,v.jsx)(n.Text,{variant:"callout",className:"font-sans-semibold text-accent",children:e},t):e),s[0]=r,s[1]=o,s[2]=l,s[3]=i,s[4]=c,s[5]=u,s[6]=h}else i=s[3],c=s[4],u=s[5],h=s[6];return s[7]!==i||s[8]!==c||s[9]!==u||s[10]!==h?(f=(0,v.jsx)(i,{variant:c,numberOfLines:u,children:h}),s[7]=i,s[8]=c,s[9]=u,s[10]=h,s[11]=f):f=s[11],f}function D(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $(e){const s=(0,t.c)(2),{children:l}=e;let o;return s[0]!==l?(o=(0,v.jsx)(n.Text,{variant:"callout",tone:"tertiary",className:"py-2",children:l}),s[0]=l,s[1]=o):o=s[1],o}function K(){const e=(0,t.c)(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,v.jsx)(f.default,{className:"h-9 flex-row items-center gap-4 border-t border-line px-4",children:[["\u2191\u2193","to move"],["\u23ce","to open"],["Esc","to close"]].map(V)}),e[0]=n):n=e[0],n}function V(e){const[t,s]=e;return(0,v.jsxs)(n.Text,{variant:"caption",tone:"tertiary",children:[(0,v.jsx)(n.Text,{variant:"caption",tone:"secondary",className:"font-sans-medium",children:t}),` ${s}`]},t)}},2133,[405,408,1284,2213,2134,1304,1083,224,308,1069,1087,945,1088,470,1916,2214,2202,2215,2135,467]);
37
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"__iconData",{enumerable:!0,get:function(){return o}}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};
38
+ /**
39
+ * @license lucide-react-native v1.50.0 - ISC
40
+ *
41
+ * This source code is licensed under the ISC license.
42
+ * See the LICENSE file in the root directory of this source tree.
43
+ */
44
+ const o={name:"corner-down-left",size:24,node:[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]]};o.node;const u=(0,n.default)(o)},2134,[1035]);
45
+ __d(function(_g,r,i,a,_m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useSearchResults=function(e){const s=(0,t.c)(11);let n,o;s[0]!==e?(n=e.trim(),o=B(n),s[0]=e,s[1]=n,s[2]=o):(n=s[1],o=s[2]);const l=E(n,o),c=R(n);let u,p;s[3]!==c.results?(u=c.results.length?[{title:"Messages",results:c.results}]:[],s[3]=c.results,s[4]=u):u=s[4];s[5]!==l||s[6]!==u?(p=[...l,...u],s[5]=l,s[6]=u,s[7]=p):p=s[7];const g=p;let f;s[8]!==g||s[9]!==c.searching?(f={groups:g,searchingMessages:c.searching},s[8]=g,s[9]=c.searching,s[10]=f):f=s[10];return f};var e,t=r(d[0]),s=r(d[1]),n=r(d[2]),o=r(d[3]),l=r(d[4]),c=(e=l)&&e.__esModule?e:{default:e},u=r(d[5]),p=r(d[6]),g=r(d[7]),f=r(d[8]),m=r(d[9]),k=r(d[10]),h=r(d[11]),j=r(d[12]),I=r(d[13]),y=r(d[14]),b=r(d[15]),$=r(d[16]),M=r(d[17]),v=r(d[18]),S=r(d[19]),T=r(d[20]),w=r(d[21]),P=r(d[22]),_=r(d[23]),x=r(d[24]),L=r(d[25]);const z={tasks:6,projects:4,agents:4,machines:4,settings:4},A=200,q=2,B=e=>e.toLowerCase().split(/\s+/).filter(Boolean),O=(e,...t)=>{const s=t.filter(Boolean).join(" ").toLowerCase();return e.every(e=>s.includes(e))};function E(e,o){const l=(0,t.c)(41),c=(0,b.useTaskIdLabel)(),u=(0,_.useOpenTask)(),g=(0,T.useSettings)(),m=(0,M.useSettingsEntries)(),k="owner"===(0,p.useAuth)().me?.role,j=(0,y.useProjects)().data??[],I=(0,P.useTasks)(P.everyTask).data??[],$=(0,h.useManagers)().data?.managers??[],x=(0,f.useNodes)().data??[];if(!o.length){let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],l[0]=e):e=l[0],e}const A=e=>j.find(t=>t.id===e),q={...P.everyTask,q:e};let B;l[1]!==A?(B=e=>A(e)?.key,l[1]=A,l[2]=B):B=l[2];const E=(0,s.rankTaskSearch)(I.filter(e=>(0,s.taskMatchesFilters)(e,q,void 0,A(e.projectId)?.key)),e,B);let Q;l[3]!==c||l[4]!==u||l[5]!==A?(Q=e=>({key:`task:${e.projectId}/${e.id}`,face:(0,L.jsx)(n.StatusGlyph,{status:e.status,progress:e.progress,size:18}),label:e.title,detail:[c(e.projectId,e.id),A(e.projectId)?.name,"in_progress"===e.status?`${n.statusLook.in_progress.label}, ${e.progress}%`:n.statusLook[e.status].label].filter(Boolean).join(" \xb7 "),open:()=>u({projectId:e.projectId,taskId:e.id})}),l[3]=c,l[4]=u,l[5]=A,l[6]=Q):Q=l[6];const R=E.slice(0,z.tasks).map(Q);if(E.length-R.length>0){let t;l[7]!==e?(t=()=>(0,w.openPage)({pathname:"/tasks",params:{q:e}}),l[7]=e,l[8]=t):t=l[8],R.push({key:"task:all",face:null,label:`All ${E.length} tasks that match`,open:t})}let H;l[9]!==o?(H=e=>O(o,e.name,e.key),l[9]=o,l[10]=H):H=l[10];const J=j.filter(H).slice(0,z.projects).map(N);let U,V;l[11]!==A?(U=e=>{const t="project"===e.scope.kind?A(e.scope.projectId):void 0;return{m:e,detail:[e.area?"Specialist":"Lead",t?.name??("global"===e.scope.kind?"All projects":void 0)]}},l[11]=A,l[12]=U):U=l[12],l[13]!==o?(V=e=>{const{m:t,detail:s}=e;return O(o,t.name,t.focus,...s)},l[13]=o,l[14]=V):V=l[14];const W=$.map(U).filter(V).slice(0,z.agents).map(K);let X;l[15]!==o?(X=e=>"sandbox"!==e.kind&&O(o,e.name),l[15]=o,l[16]=X):X=l[16];const Y=x.filter(X).slice(0,z.machines).map(G);let Z;if(l[17]!==k||l[18]!==e||l[19]!==m||l[20]!==g||l[21]!==o){const t=new Map(v.navItems.map(D));let s;l[23]!==o?(s=e=>O(o,e.label,`${e.place} ${e.keywords??""}`),l[23]=o,l[24]=s):s=l[24],Z=(0,S.rankPages)(v.navItems,m,e).flatMap(e=>{const s=t.get(e.id);if(!s)return[];const l=(0,L.jsx)(n.Icon,{icon:s.icon,size:18,color:"ink-2"}),c=O(o,s.label,s.keywords),u=e.entries.map(t=>({key:`setting:${t.key}`,face:l,label:t.label,detail:`Settings \u203a ${s.label}`,open:()=>g.show(e.id,(0,v.subpageOf)(e.id,t.key))})),p={key:`settings:${e.id}`,face:l,label:s.label,detail:"Settings",open:()=>g.show(e.id)};return c?[...u,p]:u}).concat((k?(0,M.settingsElsewhere)(w.openPage):[]).filter(s).map(C)).slice(0,z.settings),l[17]=k,l[18]=e,l[19]=m,l[20]=g,l[21]=o,l[22]=Z}else Z=l[22];const ee=Z;let te,se,ae,ne,oe,le;return l[25]!==R?(te={title:"Tasks",results:R},l[25]=R,l[26]=te):te=l[26],l[27]!==J?(se={title:"Projects",results:J},l[27]=J,l[28]=se):se=l[28],l[29]!==W?(ae={title:"Agents",results:W},l[29]=W,l[30]=ae):ae=l[30],l[31]!==Y?(ne={title:"Machines",results:Y},l[31]=Y,l[32]=ne):ne=l[32],l[33]!==ee?(oe={title:"Settings",results:ee},l[33]=ee,l[34]=oe):oe=l[34],l[35]!==ne||l[36]!==oe||l[37]!==te||l[38]!==se||l[39]!==ae?(le=[te,se,ae,ne,oe].filter(F),l[35]=ne,l[36]=oe,l[37]=te,l[38]=se,l[39]=ae,l[40]=le):le=l[40],le}function F(e){return e.results.length}function C(e){return{key:`elsewhere:${e.key}`,face:(0,L.jsx)(n.Icon,{icon:e.icon,size:18,color:"ink-2"}),label:e.label,detail:e.place,open:e.onOpen}}function D(e){return[e.id,e]}function G(e){return{key:`machine:${e.id}`,face:(0,L.jsx)(n.Icon,{icon:m.machineIcon[e.kind],size:18,color:"ink-2"}),label:e.name,detail:(0,m.machineState)(e).label,open:()=>(0,k.openMachine)(e.id)}}function K(e){const{m:t,detail:s}=e;return{key:`agent:${t.id}`,face:(0,L.jsx)(j.ManagerAvatar,{manager:t,size:18,on:"canvas"}),label:t.name,detail:s.filter(Boolean).join(" \xb7 "),open:()=>(0,I.openManager)(t.id)}}function N(e){return{key:`project:${e.id}`,face:(0,L.jsx)($.ProjectIcon,{project:e,size:18}),label:e.name,detail:e.key,open:()=>(0,w.openPage)({pathname:"/projects/[projectId]",params:{projectId:e.id}})}}function Q(e,s){const n=(0,t.c)(4),[o,l]=(0,u.useState)(e);let c,p;return n[0]!==s||n[1]!==e?(c=()=>{const t=setTimeout(()=>l(e),s);return()=>clearTimeout(t)},p=[e,s],n[0]=s,n[1]=e,n[2]=c,n[3]=p):(c=n[2],p=n[3]),(0,u.useEffect)(c,p),o}function R(e){const s=(0,t.c)(22),l=(0,x.useApi)(),u=Q(e,A),p=u.length>=q&&e.length>=q;let f,m,k;s[0]!==u?(f=["search","messages",u],s[0]=u,s[1]=f):f=s[1],s[2]!==l||s[3]!==u?(m=()=>l.sessions.searchMessages(u),s[2]=l,s[3]=u,s[4]=m):m=s[4],s[5]!==p||s[6]!==f||s[7]!==m?(k={queryKey:f,queryFn:m,enabled:p,placeholderData:o.keepPreviousData,staleTime:1e4},s[5]=p,s[6]=f,s[7]=m,s[8]=k):k=s[8];const h=(0,o.useQuery)(k),j=H(),y=(0,g.useOpenSession)();let b;s[9]!==p||s[10]!==h?(b=p?h.data??[]:[],s[9]=p,s[10]=h,s[11]=b):b=s[11];const $=b,M=e.length>=q&&(u!==e||h.isFetching);let v,S;if(s[12]!==j||s[13]!==$||s[14]!==y){let e;s[16]!==j||s[17]!==y?(e=e=>({key:`message:${e.sessionId}/${e.seq}`,face:(0,L.jsx)(n.Icon,{icon:c.default,size:18,color:"ink-2"}),label:e.text,detail:j(e),quote:!0,open:()=>!e.managerId||"lead"!==e.role&&"specialist"!==e.role?y(e.sessionId):(0,I.openManager)(e.managerId)}),s[16]=j,s[17]=y,s[18]=e):e=s[18],v=$.map(e),s[12]=j,s[13]=$,s[14]=y,s[15]=v}else v=s[15];return s[19]!==M||s[20]!==v?(S={searching:M,results:v},s[19]=M,s[20]=v,s[21]=S):S=s[21],S}function H(){const e=(0,t.c)(5),s=(0,b.useTaskIdLabel)(),n=(0,P.useTasks)(P.everyTask).data??[],o=(0,h.useManagers)().data?.managers??[],l=(0,y.useProjects)().data??[];let c;return e[0]!==s||e[1]!==o||e[2]!==l||e[3]!==n?(c=e=>{if(e.managerId&&("lead"===e.role||"specialist"===e.role)){const t=o.find(t=>t.id===e.managerId)?.name??"Lead",s=l.find(t=>t.id===e.projectId)?.name;return[t,s].filter(Boolean).join(" \xb7 ")}if(!e.taskId)return"A session";const t=s(e.projectId,e.taskId),c=n.find(t=>t.projectId===e.projectId&&t.id===e.taskId)?.title;return[e.name?`${e.name} on ${t}`:t,c].filter(Boolean).join(" \xb7 ")},e[0]=s,e[1]=o,e[2]=l,e[3]=n,e[4]=c):c=e[4],c}},2135,[405,2,408,1408,2216,224,1455,2217,2218,2219,2220,2204,2221,2206,2222,2223,2224,2136,2141,2225,2226,2196,2227,2211,407,467]);
46
+ __d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.useSettingsEntries=function(){const e=(0,s.c)(2),o="owner"===(0,p.useAuth)().me?.role;let t;e[0]!==o?(t=o?[...w,...v]:w,e[0]=o,e[1]=t):t=e[1];return t},_e.settingsElsewhere=function(e){const s=e=>(0,o.settingsFor)("server").filter(s=>(0,y.serverSectionOf)(s)===e).map(e=>e.label).join(" "),p=e=>({pathname:"/machines",params:{category:e}}),d=e=>({pathname:"/projects",params:{category:e}});return[{key:"machines/hypervisors",label:"Hypervisors",place:"Machines settings",icon:n.default,keywords:`harvester kubevirt kubernetes vm vms virtual machines proxmox tart hetzner cloud ${s("hypervisors")}`,href:p("hypervisors")},{key:"machines/sandboxes",label:"Sandbox defaults",place:"Machines settings",icon:t.default,keywords:`sandbox sandboxes runner docker container isolation where tasks run ${s("sandboxes")}`,href:p("sandboxes")},{key:"machines/caches",label:"Package caches",place:"Machines settings",icon:u.default,keywords:`mirror npm python go cargo cocoapods registry ${y.packageCaches.map(e=>e.label).join(" ")}`,href:p("caches")},{key:"projects/git",label:"Project defaults",place:"Projects settings",icon:c.default,keywords:`new project git merge tasks sprints testing videos tools storage retention archive ${s("projects")}`,href:d("git")},{key:"projects/github",label:"GitHub",place:"Projects settings",icon:l.default,keywords:"github cli gh pull requests pr",href:d("github")}].map(({href:s,...o})=>({...o,onOpen:()=>e(s)}))};var s=r(_d[0]),o=r(_d[1]),t=e(r(_d[2])),n=e(r(_d[3])),c=e(r(_d[4])),l=e(r(_d[5])),u=e(r(_d[6])),p=r(_d[7]),d=r(_d[8]),h=r(_d[9]),k=r(_d[10]),y=r(_d[11]),f=r(_d[12]),b=r(_d[13]);const w=[{key:"instructions.user",label:"Your instructions",help:"Your own CLAUDE.md, for the sessions you start",keywords:"claude.md claude md prompt rules personal",section:"instructions"},{key:"appearance.theme",label:"Theme",help:"Light, dark, or follow the device",keywords:"dark light mode",section:"preferences"},...(0,f.registryEntries)(k.preferences,()=>"preferences"),...h.hasAppLock?[{key:"security.app-lock",label:h.appLockLabel,help:"Asks when the app opens, on this device",keywords:"lock unlock face id touch id passcode password passkey biometrics privacy",section:"security"}]:[],{key:"feedback.project",label:"Feedback project",help:"Where the phone app's feedback goes; none sends it by email",keywords:"feedback bug report support email shake screenshot developer",section:"about"},{key:"feedback.shake",label:"Shake to send feedback",help:"Shaking your phone opens Feedback with a screenshot",keywords:"feedback shake gesture screenshot bug report developer",section:"about"},...d.notificationKinds.map(e=>({key:e.key,label:e.label,help:e.help,keywords:"notify notifications push alert",section:"notifications"})),{key:"notifications.pause",label:"Pause notifications",help:"For a while, on all your devices",keywords:"pause mute snooze quiet do not disturb silence notifications",section:"notifications"},{key:"notifications.pauseUrgent",label:"Still notify me of questions that block work",help:"While paused",keywords:"pause urgent questions exception notifications",section:"notifications"},{key:"notifications.sound",label:"Sound",keywords:"notifications alert",section:"notifications"},{key:"notifications.volume",label:"Volume",keywords:"notifications sound loud",section:"notifications"}],v=[...(0,f.registryEntries)((0,o.settingsFor)("server").filter(e=>"claude.accounts"!==e.key&&"account"!==e.group&&!y.packageCaches.includes(e)),e=>{const s=(0,y.serverSectionOf)(e);return b.settingsSections.some(e=>e.id===s)?s:void 0}),{key:"claude.accounts",label:"Claude accounts",help:"The Claude logins sessions run on",keywords:"sign in login add subscription anthropic account accounts agents multiple several",section:"claude-accounts"}]},2136,[405,2,2228,2229,2230,2231,2232,1455,2137,2233,2139,2234,2235,2226]);
47
+ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"notificationKinds",{enumerable:!0,get:function(){return W}}),_e.NotificationsSection=function(){const e=(0,t.c)(11),n=(0,v.useUserSettings)(),u=(0,v.usePatchSettings)();let c,h,f,p,y,b,w;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=(0,R.jsx)(x.SettingGroup,{title:"This device",icon:l.default,children:s.isDesktopApp?(0,R.jsx)(x.SettingRow,{label:"Desktop notifications",help:"This app shows them while it runs, also with its window closed; the menu bar shows how many questions wait."}):(0,R.jsx)(B,{})}),h=(0,R.jsx)(T,{}),e[0]=c,e[1]=h):(c=e[0],h=e[1]);e[2]!==u||e[3]!==n?(f=W.map(e=>(0,R.jsx)(x.SettingRow,{setting:e.key,label:e.label,help:e.help,icon:e.icon,children:(0,R.jsx)(o.Toggle,{label:e.label,value:!1!==n.data?.values[e.key]?.value,onChange:t=>u.mutate({[e.key]:t})})},e.key)),e[2]=u,e[3]=n,e[4]=f):f=e[4];e[5]!==f?(p=(0,R.jsx)(x.SettingGroup,{title:"Notify me about",footer:"A notification says only that something needs you. What, and which task, stays on your server until you open it.",children:f}),e[5]=f,e[6]=p):p=e[6];e[7]===Symbol.for("react.memo_cache_sentinel")?(y=(0,R.jsx)(G,{}),b=(0,R.jsx)(j.NotificationDefaults,{}),e[7]=y,e[8]=b):(y=e[7],b=e[8]);e[9]!==p?(w=(0,R.jsxs)(k.default,{className:"gap-6",children:[c,h,p,y,b]}),e[9]=p,e[10]=w):w=e[10];return w};var t=r(d[0]),n=r(d[1]),o=r(d[2]),s=r(d[3]),l=e(r(d[4])),u=e(r(d[5])),c=e(r(d[6])),h=e(r(d[7])),f=e(r(d[8])),p=e(r(d[9])),y=e(r(d[10])),b=e(r(d[11])),w=e(r(d[12])),S=r(d[13]);r(d[14]),r(d[15]);var k=e(r(d[16]));r(d[17]),r(d[18]);var v=r(d[19]),j=r(d[20]),x=r(d[21]);r(d[22]);var P=r(d[23]),_=r(d[24]);r(d[25]);var C=r(d[26]),N=r(d[27]),R=r(d[28]);const W=[{key:"notifications.question",label:"Questions and permissions",help:"When an agent asks you something or needs your OK.",icon:c.default},{key:"notifications.reply",label:"Answers to your replies",help:"When a lead or a task's agent answers what you wrote on a task.",icon:b.default},{key:"notifications.important",label:"Leads' important messages",help:"When a lead tells you something important: a decision, a problem, finished work.",icon:y.default},{key:"notifications.done",label:"Ready for review",help:"When an agent finishes a task.",icon:h.default},{key:"notifications.prChecksFailed",label:"PR checks failed",help:"When a task's PR checks fail.",icon:f.default},{key:"notifications.claudeLimit",label:"Claude usage limits",help:"When a Claude account you manage runs out: when it resets, and what its sessions do meanwhile.",icon:p.default}];function T(){const e=(0,t.c)(21),{pause:n,until:s,setUrgent:l}=(0,_.usePause)(),[c,h]=(0,S.useState)(!1),f=(0,S.useRef)(null),p=s?"Nothing reaches your devices until then; it all waits in the bell, with one notification to sum it up at the end.":"For a while, on all your devices: everything still lands in the bell.";let y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y=()=>h(!0),e[0]=y):y=e[0];const b=s?"Change":"Pause\u2026";let w,v,j,P;e[1]!==b?(w=(0,R.jsx)(k.default,{ref:f,collapsable:!1,children:(0,R.jsx)(o.Button,{kind:"secondary",size:"sm",onPress:y,children:b})}),e[1]=b,e[2]=w):w=e[2],e[3]===Symbol.for("react.memo_cache_sentinel")?(v=()=>h(!1),e[3]=v):v=e[3],e[4]!==c?(j=(0,R.jsx)(_.PauseMenu,{open:c,onClose:v,anchor:f}),e[4]=c,e[5]=j):j=e[5],e[6]!==p||e[7]!==w||e[8]!==j?(P=(0,R.jsxs)(x.SettingRow,{setting:"notifications.pause",label:"Pause notifications",help:p,children:[w,j]}),e[6]=p,e[7]=w,e[8]=j,e[9]=P):P=e[9];const C=n?.urgent??!1;let N,W,T,q;return e[10]!==l||e[11]!==C?(N=(0,R.jsx)(x.SettingRow,{setting:"notifications.pauseUrgent",label:"Still notify me of questions that block work",help:"While paused: a question, a permission or a task to merge still comes through.",children:(0,R.jsx)(o.Toggle,{label:"Still notify me of questions that block work",value:C,onChange:l})}),e[10]=l,e[11]=C,e[12]=N):N=e[12],e[13]!==P||e[14]!==N?(W=(0,R.jsxs)(x.SettingGroup,{title:"Pause",icon:u.default,children:[P,N]}),e[13]=P,e[14]=N,e[15]=W):W=e[15],e[16]!==s?(T=s?(0,R.jsx)(_.PausedPill,{className:"mx-1"}):null,e[16]=s,e[17]=T):T=e[17],e[18]!==T||e[19]!==W?(q=(0,R.jsxs)(k.default,{className:"gap-3",children:[W,T]}),e[18]=T,e[19]=W,e[20]=q):q=e[20],q}const q=n.settingsByKey.get("notifications.sound")?.choices??[],A=n.settingsByKey.get("notifications.volume")?.choices??[];function G(){const e=(0,t.c)(13),n=(0,v.useUserSettings)(),s=(0,v.usePatchSettings)(),l=n.data?.values["notifications.sound"]?.value??"chime",u=n.data?.values["notifications.volume"]?.value??"medium";let c,h,f,p;return e[0]!==s||e[1]!==u?(c=e=>{s.mutate({"notifications.sound":e}),(0,C.playSound)(e,u)},e[0]=s,e[1]=u,e[2]=c):c=e[2],e[3]!==l||e[4]!==c?(h=(0,R.jsx)(x.SettingRow,{setting:"notifications.sound",label:"Sound",help:"Played with every notification, here and on your phone.",children:(0,R.jsx)(x.SelectControl,{plain:!0,label:"Sound",value:l,options:q,onChange:c})}),e[3]=l,e[4]=c,e[5]=h):h=e[5],e[6]!==s||e[7]!==l||e[8]!==u?(f="none"!==l?(0,R.jsx)(x.SettingRow,{setting:"notifications.volume",label:"Volume",help:"On your phone, its own volume decides.",children:(0,R.jsx)(o.Segmented,{label:"Volume",value:u,options:A,onChange:e=>{s.mutate({"notifications.volume":e}),(0,C.playSound)(l,e)}})}):null,e[6]=s,e[7]=l,e[8]=u,e[9]=f):f=e[9],e[10]!==h||e[11]!==f?(p=(0,R.jsxs)(x.SettingGroup,{title:"Sound",icon:w.default,children:[h,f]}),e[10]=h,e[11]=f,e[12]=p):p=e[12],p}function B(){const e=(0,P.useApi)(),[t,n]=(0,S.useState)("busy"),[s,l]=(0,S.useState)();(0,S.useEffect)(()=>{(0,N.webPushState)().then(n,()=>n("unsupported"))},[]);const u={unsupported:"This browser can't show notifications from Superfactory.",blocked:"Notifications are blocked for this site. Allow them in the browser's site settings.",off:"Get a notification here when a task needs you, even with this tab closed.",on:"This browser gets a notification when a task needs you.",busy:""}[t];return(0,R.jsx)(x.SettingRow,{label:"Notifications in this browser",help:u,error:s,children:(0,R.jsxs)(k.default,{className:"flex-row items-center gap-3",children:["on"===t?(0,R.jsx)(o.Button,{size:"sm",kind:"ghost",onPress:()=>(0,N.showTestNotification)().catch(e=>l(`Couldn't show one: ${e.message}`)),children:"Send a test"}):null,"on"===t||"off"===t?(0,R.jsx)(o.Toggle,{label:"Notifications in this browser",value:"on"===t,onChange:async t=>{n("busy"),l(void 0);try{n(await(t?(0,N.enableWebPush)(e):(0,N.disableWebPush)(e)))}catch(e){l(`Couldn't turn notifications ${t?"on":"off"} here: ${e.message}`),n(await(0,N.webPushState)().catch(()=>"off"))}}}):null]})})}},2137,[405,2,408,1403,2236,2237,2238,1054,2239,2240,2241,2138,2242,224,1481,308,945,1929,1934,1962,2234,2243,2244,407,2245,2187,2188,2189,467]);
48
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"__iconData",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};
49
+ /**
50
+ * @license lucide-react-native v1.50.0 - ISC
51
+ *
52
+ * This source code is licensed under the ISC license.
53
+ * See the LICENSE file in the root directory of this source tree.
54
+ */
55
+ const u={name:"message-square-reply",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"m10 8-3 3 3 3",key:"fp6dz7"}],["path",{d:"M17 14v-1a2 2 0 0 0-2-2H7",key:"1tkjnz"}]]};u.node;const o=(0,n.default)(u)},2138,[1035]);
56
+ __d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"preferences",{enumerable:!0,get:function(){return l}}),_e.PreferencesSection=function(){const e=(0,t.c)(5),s=(0,o.useUserSettings)(),f=(0,o.usePatchSettings)(),p=s.data?.values;let v,_;e[0]!==f?(v=(e,t)=>f.mutate({[e]:t}),e[0]=f,e[1]=v):v=e[1];e[2]!==p||e[3]!==v?(_=(0,d.jsx)(u.default,{className:"gap-8",children:(0,d.jsx)(c.RegistryRows,{title:"Code and reviews",icon:n.default,defs:l,values:p,scope:"user",onChange:v})}),e[2]=p,e[3]=v,e[4]=_):_=e[4];return _};var t=r(_d[0]),s=r(_d[1]),n=e(r(_d[2])),u=e(r(_d[3])),o=r(_d[4]),c=r(_d[5]),d=r(_d[6]);const l=(0,s.settingsFor)("user").filter(e=>["editor","review.openPrInBrowser","tasks.groupThen","tasks.groupEpics","board.groupThen"].includes(e.key))},2139,[405,2,2140,945,1962,2246,467]);
57
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"__iconData",{enumerable:!0,get:function(){return o}}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};
58
+ /**
59
+ * @license lucide-react-native v1.50.0 - ISC
60
+ *
61
+ * This source code is licensed under the ISC license.
62
+ * See the LICENSE file in the root directory of this source tree.
63
+ */
64
+ const o={name:"square-code",size:24,node:[["path",{d:"m10 9-3 3 3 3",key:"1oro0q"}],["path",{d:"m14 15 3-3-3-3",key:"bz13h7"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]],aliases:["code-square"]};o.node;const u=(0,n.default)(o)},2140,[1035]);
65
+ __d(function(_g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"navItems",{enumerable:!0,get:function(){return B}}),Object.defineProperty(_e,"subpageOf",{enumerable:!0,get:function(){return C}}),_e.SettingsModal=function(){const e=(0,t.c)(27),{open:n,section:s,sub:o,moved:l,away:p,show:g,rename:S,close:b,closeThen:h}=(0,F.useSettings)();let x,j,w;e[0]!==p||e[1]!==h||e[2]!==l||e[3]!==S||e[4]!==s?(x=()=>{if(!(l&&s||p))return;const e=setTimeout(()=>p?h(()=>(0,v.openPage)(p)):s&&S(s),0);return()=>clearTimeout(e)},j=[l,s,p,S,h],e[0]=p,e[1]=h,e[2]=l,e[3]=S,e[4]=s,e[5]=x,e[6]=j):(x=e[5],j=e[6]);(0,c.useEffect)(x,j),(0,_.useAppliedTheme)(),e[7]!==s||e[8]!==g?(w=()=>g(s??"account"),e[7]=s,e[8]=g,e[9]=w):w=e[9];$(w);const k=(0,D.useSettingsEntries)(),O="owner"===(0,f.useAuth)().me?.role;let L;e[10]!==h||e[11]!==O?(L=O?(0,D.settingsElsewhere)(e=>h(()=>(0,v.openPage)(e))):void 0,e[10]=h,e[11]=O,e[12]=L):L=e[12];const N=L;let T,M,E,q;e[13]===Symbol.for("react.memo_cache_sentinel")?(T=(0,z.jsxs)(u.default,{className:"mt-auto gap-1 px-2",children:[(0,z.jsx)(A.LogOutButton,{quiet:!0}),(0,z.jsx)(y.AppVersion,{})]}),e[13]=T):T=e[13];e[14]!==g?(M=(0,z.jsx)(I,{onPick:g}),E=(0,z.jsx)(V,{onPick:g}),e[14]=g,e[15]=M,e[16]=E):(M=e[15],E=e[16]);e[17]!==b||e[18]!==N||e[19]!==k||e[20]!==n||e[21]!==s||e[22]!==g||e[23]!==o||e[24]!==M||e[25]!==E?(q=(0,z.jsx)(P.CategorizedSettings,{open:n,label:"Settings",items:B,entries:k,category:s,sub:o,onShow:g,onClose:b,subpageOf:C,elsewhere:N,navFooter:T,phoneHeader:M,phoneList:E,onDismissed:F.settingsGone,children:H}),e[17]=b,e[18]=N,e[19]=k,e[20]=n,e[21]=s,e[22]=g,e[23]=o,e[24]=M,e[25]=E,e[26]=q):q=e[26];return q};var t=r(d[0]),n=r(d[1]),s=r(d[2]),o=e(r(d[3])),c=r(d[4]),u=e(r(d[5])),l=r(d[6]),p=r(d[7]),g=r(d[8]),f=r(d[9]),S=r(d[10]),b=r(d[11]),h=r(d[12]),x=r(d[13]),j=r(d[14]),v=r(d[15]),w=r(d[16]),y=r(d[17]),P=r(d[18]),A=r(d[19]),k=r(d[20]),_=r(d[21]),O=r(d[22]),L=r(d[23]),N=r(d[24]),T=r(d[25]),M=r(d[26]),D=r(d[27]),F=r(d[28]),z=r(d[29]);const B=F.settingsSections.map(e=>({...e,subpages:F.settingsSubpages[e.id],phoneParts:F.phoneParts.has(e.id)})),C=(e,t)=>F.settingsSubpages[e]?"network"===e?(0,N.networkSubpageOf)(t):(0,M.serverSubpageOf)(t):void 0,E={account:k.AccountSection,accounts:g.AccountsSection,notifications:S.NotificationsSection,preferences:()=>(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(_.AppearanceSection,{}),(0,z.jsx)(T.PreferencesSection,{})]}),instructions:L.InstructionsSection,security:()=>(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(j.SecuritySection,{}),(0,z.jsx)(b.DevicesSection,{})]}),"claude-accounts":M.ClaudeAccountsSection,agents:M.AgentsSection,secrets:x.SecretsSection,network:N.NetworkSection,backups:M.BackupsSection,audit:O.AuditSection,about:l.AboutSection};function H(e){const t=E[e];return(0,z.jsx)(t,{})}function I(e){const s=(0,t.c)(21),{onPick:c}=e,{me:l}=(0,f.useAuth)(),g=(0,f.useMyAvatarHash)(),S=(0,h.usePairedServer)();if(!l)return null;const b=`${l.email}, profile`;let x,j,v;s[0]!==c?(x=()=>c("account"),s[0]=c,s[1]=x):x=s[1],s[2]!==g||s[3]!==l.name?(j=(0,z.jsx)(n.Avatar,{name:l.name,size:48,avatarHash:g}),s[2]=g,s[3]=l.name,s[4]=j):j=s[4],s[5]!==l.email?(v=(0,z.jsx)(n.Text,{variant:"body",numberOfLines:1,children:l.email}),s[5]=l.email,s[6]=v):v=s[6];const w=`${l.name} \xb7 ${"owner"===l.role?"Owner":"member"===l.role?"Member":"Viewer"}`;let y,P,A,k,_;return s[7]!==w?(y=(0,z.jsx)(n.Text,{variant:"subhead",tone:"tertiary",children:w}),s[7]=w,s[8]=y):y=s[8],s[9]!==S?(P=S?(0,z.jsx)(p.AccountTag,{account:S,className:"mt-1"}):null,s[9]=S,s[10]=P):P=s[10],s[11]!==v||s[12]!==y||s[13]!==P?(A=(0,z.jsxs)(u.default,{className:"min-w-0 flex-1 gap-0.5",children:[v,y,P]}),s[11]=v,s[12]=y,s[13]=P,s[14]=A):A=s[14],s[15]===Symbol.for("react.memo_cache_sentinel")?(k=(0,z.jsx)(n.Icon,{icon:o.default,size:18,color:"ink-3"}),s[15]=k):k=s[15],s[16]!==b||s[17]!==x||s[18]!==j||s[19]!==A?(_=(0,z.jsxs)(n.PressableScale,{scale:.99,accessibilityRole:"button",accessibilityLabel:b,onPress:x,className:"flex-row items-center gap-4 rounded-xl border border-line bg-surface px-4 py-4 active:bg-sunken",children:[j,A,k]}),s[16]=b,s[17]=x,s[18]=j,s[19]=A,s[20]=_):_=s[20],_}function V(e){const s=(0,t.c)(5),{onPick:o}=e;let c,l,p;return s[0]!==o?(c=F.settingsGroups.map(e=>(0,z.jsx)(n.ListSection,{title:e||void 0,children:F.settingsSections.filter(t=>t.group===e&&"account"!==t.id).map(e=>(0,z.jsx)(n.ListRow,{icon:e.icon,title:e.label,chevron:!0,onPress:()=>o(e.id)},e.id))},e)),s[0]=o,s[1]=c):c=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,z.jsxs)(u.default,{className:"mt-auto items-center gap-1 pt-4",children:[(0,z.jsx)(A.LogOutButton,{quiet:!0}),(0,z.jsx)(y.AppVersion,{})]}),s[2]=l):l=s[2],s[3]!==c?(p=(0,z.jsxs)(z.Fragment,{children:[c,l]}),s[3]=c,s[4]=p):p=s[4],p}function $(e){const n=(0,t.c)(2);let o;n[0]!==e?(o=t=>{(0,w.isShortcut)(t,w.shortcuts.openSettings)&&(t.preventDefault(),e())},n[0]=e,n[1]=o):o=n[1],(0,s.useKeyDown)(o)}},2141,[405,408,1284,1299,224,945,2142,2247,2157,1455,2137,2158,1929,2162,2165,2196,2202,2148,2248,2169,2171,2175,2178,2249,2250,2139,2234,2136,2226,467]);
66
+ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.AboutSection=function(){const e=(0,t.c)(19),{about:c}=(0,s.useGlobalSearchParams)();let l;e[0]!==c?(l=e=>e.id===c,e[0]=c,e[1]=l):l=e[1];const u=z.find(l),b="owner"===(0,x.useAuth)().me?.role,A=(0,P.useSettings)();let R,C,H,D,I,M,Q,U,V,$,W,q;e[2]===Symbol.for("react.memo_cache_sentinel")?(R=[],e[2]=R):R=e[2];if((0,f.useEffect)(F,R),u){let t;return e[3]===Symbol.for("react.memo_cache_sentinel")?(t=(0,N.jsx)(n.Button,{size:"sm",kind:"ghost",icon:o.default,className:"self-start",onPress:E,children:"About"}),e[3]=t):t=e[3],(0,N.jsxs)(y.default,{className:"gap-4",children:[t,u.body()]})}e[4]===Symbol.for("react.memo_cache_sentinel")?(C=(0,N.jsx)(n.AppIcon,{size:64}),e[4]=C):C=e[4];e[5]===Symbol.for("react.memo_cache_sentinel")?(H=(0,N.jsx)(n.Text,{variant:"title2",accessibilityRole:"header",children:"Superfactory"}),e[5]=H):H=e[5];e[6]===Symbol.for("react.memo_cache_sentinel")?(D=(0,N.jsxs)(y.default,{className:"flex-row items-center gap-4",children:[C,(0,N.jsxs)(y.default,{className:"min-w-0 flex-1 gap-0.5",children:[H,(0,N.jsx)(n.Text,{variant:"subhead",tone:"secondary",selectable:!0,numberOfLines:1,children:(0,_.appVersion)()}),(0,N.jsx)(_.ServerVersionText,{variant:"subhead",tone:"secondary"})]})]}),e[6]=D):D=e[6];e[7]!==b||e[8]!==A?(I=b?(0,N.jsx)(v.SettingRow,{label:"First steps",help:"Connect a computer, add a project, give Claude its first task and pair your phone.",children:(0,N.jsx)(n.Button,{size:"sm",kind:"secondary",onPress:()=>{A.close(),(0,j.openGetStarted)()},children:"Show"})}):null,e[7]=b,e[8]=A,e[9]=I):I=e[9];e[10]===Symbol.for("react.memo_cache_sentinel")?(M=S.canSendFeedback?(0,N.jsx)(v.SettingRow,{label:"Send feedback",help:"A screenshot to draw on, and what you'd like to tell us.",children:(0,N.jsx)(w.SendFeedbackButton,{})}):null,e[10]=M):M=e[10];e[11]===Symbol.for("react.memo_cache_sentinel")?(Q=(0,N.jsx)(v.SettingRow,{label:"Contact and support",help:"Questions, bugs and ideas, on GitHub.",children:(0,N.jsx)(n.Button,{size:"sm",kind:"secondary",...(0,L.webLink)(O),children:"Open"})}),e[11]=Q):Q=e[11];e[12]!==I?(U=(0,N.jsxs)(v.SettingGroup,{title:"Help",icon:h.default,children:[I,M,Q]}),e[12]=I,e[13]=U):U=e[13];e[14]===Symbol.for("react.memo_cache_sentinel")?(V=(0,N.jsx)(k.FeedbackSettings,{}),e[14]=V):V=e[14];e[15]===Symbol.for("react.memo_cache_sentinel")?($=B(T.legalUpdated),e[15]=$):$=e[15];e[16]===Symbol.for("react.memo_cache_sentinel")?(W=(0,N.jsx)(v.SettingGroup,{title:"Legal",icon:p.default,footer:`The privacy policy and terms were last updated on ${$}.`,children:z.map(G)}),e[16]=W):W=e[16];e[17]!==U?(q=(0,N.jsxs)(y.default,{className:"gap-8",children:[D,U,V,W]}),e[17]=U,e[18]=q):q=e[18];return q};var t=r(d[0]),n=r(d[1]),s=r(d[2]),o=e(r(d[3])),c=e(r(d[4])),l=e(r(d[5])),u=e(r(d[6])),h=e(r(d[7])),p=e(r(d[8])),b=e(r(d[9])),f=r(d[10]),y=e(r(d[11])),x=r(d[12]),S=r(d[13]),j=r(d[14]),_=r(d[15]),k=r(d[16]),w=r(d[17]),v=r(d[18]),P=r(d[19]),L=r(d[20]),T=r(d[21]),A=r(d[22]),R=r(d[23]),N=r(d[24]);const O="https://github.com/bringes/superfactory/issues",z=[{id:"privacy",label:"Privacy policy",icon:b.default,help:"What is kept about you, where, and who else sees it.",body:()=>(0,N.jsx)(A.LegalText,{markdown:T.privacyPolicy})},{id:"terms",label:"Terms of use",icon:l.default,help:"The rules for using Superfactory.",body:()=>(0,N.jsx)(A.LegalText,{markdown:T.termsOfUse})},{id:"licenses",label:"Open-source licenses",icon:p.default,help:"Every package Superfactory ships, and its license.",body:()=>(0,N.jsx)(R.LicensesList,{})},{id:"thanks",label:"Acknowledgements",icon:u.default,help:"The projects Superfactory is built on.",body:()=>(0,N.jsx)(A.LegalText,{markdown:"# Acknowledgements\n\nSuperfactory stands on the work of many people. Thank you in particular to:\n\n- **Claude Code**, by Anthropic, which does the work Superfactory organises.\n- **Expo** and **React Native**, for one app on the phone, the desktop and the web.\n- **Hono**, **Bun** and **PostgreSQL**, under the server.\n- **better-auth**, for accounts and passkeys.\n- **xterm.js**, the terminal in the app.\n- Every open-source package listed under Open-source licenses."})}],B=e=>new Date(`${e}T12:00:00`).toLocaleDateString(void 0,{day:"numeric",month:"long",year:"numeric"});function C(e){const s=(0,t.c)(9),{label:o,icon:l,help:u,onPress:h}=e;let p,b,f;return s[0]===Symbol.for("react.memo_cache_sentinel")?(p=(0,N.jsx)(n.Icon,{icon:c.default,size:18,color:"ink-3"}),s[0]=p):p=s[0],s[1]!==u||s[2]!==l||s[3]!==o?(b=(0,N.jsx)(v.SettingRow,{label:o,icon:l,help:u,children:p}),s[1]=u,s[2]=l,s[3]=o,s[4]=b):b=s[4],s[5]!==o||s[6]!==h||s[7]!==b?(f=(0,N.jsx)(n.PressableScale,{scale:.99,accessibilityRole:"button",accessibilityLabel:o,onPress:h,children:b}),s[5]=o,s[6]=h,s[7]=b,s[8]=f):f=s[8],f}function G(e){return(0,N.jsx)(C,{...e,onPress:()=>s.router.setParams({about:e.id})},e.id)}function E(){return s.router.setParams({about:void 0})}function F(){(0,R.preloadLicenses)()}},2142,[405,408,1463,1082,1299,2251,2143,2144,2145,2252,224,945,1455,2146,2190,2148,2149,2153,2243,2226,2253,2154,2155,2156,467]);
67
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"__iconData",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};
68
+ /**
69
+ * @license lucide-react-native v1.50.0 - ISC
70
+ *
71
+ * This source code is licensed under the ISC license.
72
+ * See the LICENSE file in the root directory of this source tree.
73
+ */
74
+ const u={name:"heart",size:24,node:[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]};u.node;const o=(0,n.default)(u)},2143,[1035]);
75
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"__iconData",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};
76
+ /**
77
+ * @license lucide-react-native v1.50.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */
82
+ const c={name:"life-buoy",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]};c.node;const u=(0,n.default)(c)},2144,[1035]);
83
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"__iconData",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};
84
+ /**
85
+ * @license lucide-react-native v1.50.0 - ISC
86
+ *
87
+ * This source code is licensed under the ISC license.
88
+ * See the LICENSE file in the root directory of this source tree.
89
+ */
90
+ const u={name:"scale",size:24,node:[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"m19 8 3 8a5 5 0 0 1-6 0zV7",key:"zcdpyk"}],["path",{d:"M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1",key:"1yorad"}],["path",{d:"m5 8 3 8a5 5 0 0 1-6 0zV7",key:"eua70x"}],["path",{d:"M7 21h10",key:"1b0cd5"}]]};u.node;const o=(0,n.default)(u)},2145,[1035]);
91
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"canSendFeedback",{enumerable:!0,get:function(){return b}}),_e.openFeedback=async function(){if(l||o||!c.shake)return;o=!0;try{const e=await c.shake.capture().catch(()=>null);l={screenshot:e},f()}finally{o=!1}},_e.closeFeedback=function(){u.default.dismiss(),l=null,f()},_e.useFeedbackOpen=function(){return(0,n.useSyncExternalStore)(y,k)};var e,n=r(d[0]),t=r(d[1]),u=(e=t)&&e.__esModule?e:{default:e},c=r(d[2]);let l=null,o=!1;const s=new Set,f=()=>{for(const e of s)e()},b=null!==c.shake;function k(){return l}function y(e){return s.add(e),()=>s.delete(e)}},2146,[224,1084,2147]);
92
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"shake",{enumerable:!0,get:function(){return n}});const t=(0,r(d[0]).requireOptionalNativeModule)("Shake"),n=t?{listen:n=>t.addListener("onShake",n),capture:()=>t.capture()}:null},2147,[187]);
93
+ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.appVersion=u,_e.ServerVersionText=v,_e.AppVersion=function(){const e=(0,t.c)(1);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,l.jsxs)(c.default,{className:"py-3",children:[(0,l.jsx)(n.Text,{variant:"caption",tone:"tertiary",selectable:!0,className:"text-center",children:u()}),(0,l.jsx)(v,{variant:"caption",tone:"tertiary",className:"text-center"})]}),e[0]=o):o=e[0];return o};var t=r(d[0]),n=r(d[1]),o=e(r(d[2]));r(d[3]);var c=e(r(d[4])),s=r(d[5]),l=r(d[6]);function u(){const e=o.default.expoConfig,t=["build 870","dc5402e4a"].filter(Boolean).join(" \xb7 ");return`Superfactory ${e?.version??"0.0.0"}${t?` (${t})`:""}`}function f(e){if(null===e)return"No server";if(!e)return"";const t=e.commit?.slice(0,7);return`Server ${e.version}${t?` (${t})`:""}`}function v(e){const o=(0,t.c)(5),{data:c}=(0,s.useServerVersion)();let u,v;return o[0]!==c?(u=f(c)||"\xa0",o[0]=c,o[1]=u):u=o[1],o[2]!==e||o[3]!==u?(v=(0,l.jsx)(n.Text,{selectable:!0,numberOfLines:1,...e,children:u}),o[2]=e,o[3]=u,o[4]=v):v=o[4],v}},2148,[405,408,332,308,945,1962,467]);
94
+ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.FeedbackSettings=function(){const e=(0,t.c)(17),l=(0,u.useProjects)(),S=(0,b.useUserSettings)(),v=(0,b.usePatchSettings)(),_=String(S.data?.values["feedback.project"]?.value??""),y=!1!==S.data?.values["feedback.shake"]?.value;let x,F,C,B,E,K,M;e[0]===Symbol.for("react.memo_cache_sentinel")?(x={value:"",label:"None: email"},e[0]=x):x=e[0];e[1]!==l.data?(F=[x,...(l.data??[]).map(j)],e[1]=l.data,e[2]=F):F=e[2];e[3]!==v?(C=e=>v.mutate({"feedback.project":e}),e[3]=v,e[4]=C):C=e[4];e[5]!==_||e[6]!==F||e[7]!==C?(B=(0,k.jsx)(f.SettingRow,{setting:"feedback.project",label:h?.label??"Feedback project",help:h?.help,children:(0,k.jsx)(f.SelectControl,{label:h?.label??"Feedback project",value:_,options:F,onChange:C})}),e[5]=_,e[6]=F,e[7]=C,e[8]=B):B=e[8];e[9]!==v?(E=e=>v.mutate({"feedback.shake":e}),e[9]=v,e[10]=E):E=e[10];e[11]!==y||e[12]!==E?(K=(0,k.jsx)(f.SettingRow,{setting:"feedback.shake",label:p?.label??"Shake to send feedback",help:p?.help,icon:c.default,children:(0,k.jsx)(n.Toggle,{label:p?.label??"Shake to send feedback",value:y,onChange:E})}),e[11]=y,e[12]=E,e[13]=K):K=e[13];e[14]!==B||e[15]!==K?(M=(0,k.jsxs)(f.SettingGroup,{title:"Feedback",icon:o.default,footer:`With no project, feedback opens an email to ${s.FEEDBACK_EMAIL} on your phone.`,children:[B,K]}),e[14]=B,e[15]=K,e[16]=M):M=e[16];return M};var t=r(d[0]),l=r(d[1]),n=r(d[2]),o=e(r(d[3])),c=e(r(d[4])),s=r(d[5]),u=r(d[6]),b=r(d[7]),f=r(d[8]),k=r(d[9]);const h=l.settingsByKey.get("feedback.project"),p=l.settingsByKey.get("feedback.shake");function j(e){return{value:e.id,label:e.name}}},2149,[405,2,408,2150,2151,2152,2222,1962,2243,467]);
95
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"__iconData",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};
96
+ /**
97
+ * @license lucide-react-native v1.50.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */
102
+ const u={name:"message-square-warning",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 15h.01",key:"q59x07"}],["path",{d:"M12 7v4",key:"xawao1"}]]};u.node;const o=(0,n.default)(u)},2150,[1035]);
103
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"__iconData",{enumerable:!0,get:function(){return o}}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};
104
+ /**
105
+ * @license lucide-react-native v1.50.0 - ISC
106
+ *
107
+ * This source code is licensed under the ISC license.
108
+ * See the LICENSE file in the root directory of this source tree.
109
+ */
110
+ const o={name:"vibrate",size:24,node:[["path",{d:"m2 8 2 2-2 2 2 2-2 2",key:"sv1b1"}],["path",{d:"m22 8-2 2 2 2-2 2 2 2",key:"101i4y"}],["rect",{width:"8",height:"14",x:"8",y:"5",rx:"1",key:"1oyrl4"}]]};o.node;const u=(0,n.default)(o)},2151,[1035]);
111
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"FEEDBACK_EMAIL",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"FEEDBACK_SUBJECT",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"FEEDBACK_LABEL",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"SCREENSHOT_NAME",{enumerable:!0,get:function(){return s}}),e.serverOrigin=function(t){if(!t)return;try{return new URL(t).origin}catch{return}},e.feedbackMailBody=function({text:t,context:n}){return`${t.trim()}\n\n--\n${u(n).join("\n")}`},e.sendToProject=async function(n,c,u){const b=await n.tasks.create(t.NewTask.parse({projectId:c,title:f(u.text),description:p(u),status:"backlog",labels:[o]}));if(!u.screenshot)return{task:b,screenshotSent:!1};const l=await n.tasks.addPicture({projectId:c,taskId:b.id},{name:s,...u.screenshot}).then(()=>!0).catch(()=>!1);return{task:b,screenshotSent:l}};var t=r(d[0]);const n="support@bunnytech.app",c="Superfactory feedback",o="feedback",s="feedback-screenshot.png";function u(t){return[`App: ${t.app}`,`Device: ${t.device}`,`System: ${t.system}`,`Screen: ${t.screen}`,...t.server?[`Server: ${t.server}`]:[]]}function f(t){const n=t.trim().split("\n")[0]?.trim()??"";return n?n.length>80?`${n.slice(0,79).trimEnd()}\u2026`:n:"Feedback from the app"}function p({text:t,context:n,screenshot:c}){return[t.trim(),...c?[`Screenshot: \`${s}\`, in the task's media.`]:[],["Sent from the app:",...u(n).map(t=>`- ${t}`)].join("\n")].filter(Boolean).join("\n\n")}},2152,[2]);
112
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.SendFeedbackButton=function(){const s=(0,n.c)(2),f=(0,o.useSettings)();let _;s[0]!==f?(_=(0,c.jsx)(t.Button,{size:"sm",kind:"secondary",onPress:()=>{f.close(),setTimeout(l,u)},children:"Send"}),s[0]=f,s[1]=_):_=s[1];return _};var n=r(d[0]),t=r(d[1]),s=r(d[2]),o=r(d[3]),c=r(d[4]);const u=450;function l(){(0,s.openFeedback)()}},2153,[405,408,2146,2226,467]);
113
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"privacyPolicy",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"termsOfUse",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"legalUpdated",{enumerable:!0,get:function(){return n}});const t="# Privacy policy\n\nWhat Superfactory keeps about you, where, and which other companies see any of it. Open it to answer \"where does my data go?\"; the app shows it under Settings \u203a About.\n\nLast updated 2026-10-27.\n\n## In short\n\nSuperfactory is software you run yourself. Your data stays on **your** server and **your** machines. The company that publishes Superfactory doesn't run a service your data passes through, and doesn't receive it. The apps have no analytics, no tracking, no ads and no crash reporting.\n\nOther companies get data only for features you or your server's owner use, such as Anthropic for Claude Code, or Expo, Apple and Google for notifications. The table under [Other services](#other-services) lists each one and what it gets.\n\n## Who is responsible\n\n- **Your server's owner** is the person or organisation that runs your Superfactory server. They decide who gets an account, what is kept and for how long. Under data-protection law (such as the GDPR) they are responsible for your data on that server. If someone else gave you an account, ask them about your data.\n- **The publisher of Superfactory** is [PUBLISHER LEGAL NAME], [REGISTERED ADDRESS], registered as [COMPANY REGISTRATION NUMBER]. The publisher makes the software and the apps. It doesn't receive, host or see the data on anyone's server. Its contact is [PRIVACY CONTACT EMAIL].\n\n## What is kept, and where\n\n### On the server\n\nThe server keeps these in its database: a file on its own disk, or a PostgreSQL database its owner runs for it (on their own servers, for example their Kubernetes cluster):\n\n- **Your account:** your name, email, role, a hashed password, and when it was created and changed.\n - Other people see a random handle (like `user-3f9a2c`), your name and your picture, never your email.\n- **Sign-ins:** each signed-in session, with the IP address and the browser or device it came from.\n- **Paired devices:** your phones, computers and command-line sign-ins, each with a key that is stored hashed (a machine's, while its owner rotates it, also its next key, hashed too). For a machine that runs agents, also the public half of its identity key, so it gets its own entry back when it connects again, the pool and project a one-time key put it in, whether its owner disabled it, whether its owner lets it use HTTPS when its WireGuard tunnel can't connect, whether it is connected now (through which connection and server, and since when it is moving to another server) and when its connection was last seen.\n- **Hypervisors, if the server's owner connects any (Machines settings \u203a Hypervisors):** each one's name, kind, address, options and limits, which projects may use it, who added it and when; its credential (a Harvester kubeconfig) sealed with the server's key, used only to reach that hypervisor, never shown again.\n- **Machines asking to join:** until the owner approves or denies one, or for 10 minutes at most, what it says it is (its name, system, processor, the account its agent runs as, how it joins), the IP address it asked from and its code, where every replica of the server sees it. The owner sees it in Machines and gets a notification about it; the push itself says nothing of it.\n- **VMs, if the server's owner connects it to their Harvester cluster:** for each VM the server makes there (a project's own, or a machine the owner creates in Add machine), its name there, its machine's name, the projects it was made for, its hypervisor, its machine here, its size, the host it runs on, who made it, when it was made and last used, and, while one made again waits to join, the machine it replaces. The VM itself runs on the owner's Harvester, on disks there, and gets the code and sessions of the projects it is for like any of the owner's machines; the one-time key it joins with is stored hashed here and goes to Harvester only until the VM has joined.\n- **Notification addresses:** for each device that gets notifications, its push token or web-push address.\n- **Your notifications:** what each was about (a task and its question, a manager's message, a device), when it came and when you read it, for the bell's list.\n- **A notifications pause:** when you paused your notifications and until when, and whether questions that block work still come through.\n- **Second factors, if you set them up:**\n - your passkeys, as public keys only;\n - an authenticator-app secret and backup codes, if you set them up before Superfactory dropped authenticator apps: nothing uses them any more, and the next release deletes them. Whether your account had one stays until the server's owner lets it sign in with its password again, or you add a passkey: until then your password alone doesn't sign you in;\n - for a phone that confirms it's you with Face ID or Touch ID, the public half of its key (the private half never leaves the phone), and, until you approve it, a hash of the code it showed. Face ID and Touch ID themselves stay on the phone: the server never sees your face or fingerprint.\n- **Settings:** yours, each project's and the server's.\n - Yours include your own instructions for Claude (your CLAUDE.md), if you write any. They go only to the machines running the sessions you start (and the teammates those sessions start), as part of each session's instructions, and from there to Claude like the rest of the session. Nobody else's sessions get them.\n- **Todos, which Superfactory no longer has:** when a server upgrades to a version without them, the todos it kept (each one's title, notes, due day and group, and whose it was) are written once to a file in its data folder (`backup/todos-<day>.json`), so they aren't lost. The app never shows that file; whoever runs the server can read it on its disk, and delete it.\n - Your manager for all projects can read and change them, but only in a session you started, so they reach Claude like the rest of that conversation. A project's managers, whose chats the project's people share, can't reach them.\n- **Secrets you add:** for example a Claude account's token, a Gemini key, a hosted-sandbox key or a Cloudflare tunnel token. For each session a person started with secrets, the server keeps who started it, on which machine, when, and when that run of the session began, so that only that run gets a secret's changes, and not a later start of the same session.\n - Each is encrypted (AES-256-GCM), and nobody can read it back through the app.\n - Only its name, a note, and when it was last used are shown, never any part of its value.\n - It is handed only to the sessions it is for, as an environment variable: a project's, a machine's, or, for one set for the whole app, the sessions the server's owner starts (or everyone's, if the owner chooses so).\n- **Claude accounts you sign in to from Superfactory:** the login is a secret like the others. Beside it the server keeps whether to keep the account's usage window started, when that window ends, when the account hit its usage limit (and until when its people were told so, to tell them once; the same for a machine's own Claude login), how full its usage windows are as Claude last said, where its sessions moved when it hit its limit, when Claude stopped accepting its login and what Claude said then (until it is signed in again), and which account a session last got. It also keeps who started each session, and who wrote each task (who made it, last changed what it asks, or moved it to todo), to know which of these accounts a session may use.\n- **The WireGuard tunnel (on by default, on your local network):** whether it is on, whether Internet mode is on, whether WireGuard is required, its STUN server and UDP port, and who changed them and when. For each machine or device that joined it: the public half of its key (the private half never leaves it), its address inside the tunnel, when it joined, and when and from which network address it last connected; for a machine, also when its link first came through the tunnel, when its agent first said it checks the server's certificate there, and until when it may use HTTPS after a server upgrade (with when that upgrade was). Each one's preshared key is kept encrypted, like the other secrets. The server's own private key stays in a file in its data folder; each machine's and the desktop app's in its own folder, readable by its user only.\n- **HTTPS, if the owner sets it up (Settings \u203a Network \u203a HTTPS):** how the server's certificate is made (self-signed, Let's Encrypt, or the owner's own), its domain, the email given to Let's Encrypt (optional), how Let's Encrypt checks the domain, and who changed them and when. Let's Encrypt's certificate for the domain, and its account key and the DNS provider's token, both encrypted like the other secrets. An uploaded certificate, with its private key encrypted.\n- **An audit log of sensitive actions:** who did what and when, such as sign-ins, secrets added or used, and terminals opened.\n - It never records what you type in a terminal.\n - It stays when an account is deleted, so the owner can still see what happened.\n- **The server's own log:** what the server notes as it runs (machines linking and dropping, errors, refusals, and the ids of the machines, sessions, projects and people involved), so the owner's main lead can look into a problem. Values named like a secret are left out as it is written, and the server's known secrets and anything that looks like a key are taken out when it is read. It is not in backups.\n- **Projects:** each project's tasks, with their questions, comments and notes, which tasks are bundled for one agent to work through in turn, and the history of their changes (which parts changed, when, and from which machine; when an edit of a task's file in the repository lost to a newer change, what that edit said). Also each project's sprints, a copy of its sessions and machines, so the apps show them quickly, and when its task files were first brought in. Also each project's short key (and the keys it had before, so old task ids still lead to it), and each session's agent number in its project. For a project on more than one of your machines, which machines have a copy of it, where (its folder there) and its repository's addresses, and which machine runs each of a task's agents. For each machine, which projects may use it, and who first gave each of them that machine (so a machine stays in a project only while that person still owns it).\n- **Where each task's work stands on each machine:** its branch, the commit it is at, when it was last pushed, how many commits and files aren't pushed yet, and the branch its backup went to, as that machine's agent last said, so that a task whose machine goes offline can move to another and say what stayed behind. Deleted when the machine is removed.\n- **Task media:** the videos and pictures attached to tasks.\n- **Tasks on several platforms:** for a task that also builds on the project's other machines (a Windows or macOS one), each machine's state there, the commands run there and the last lines of their output, the whole output of each, and the task's code on its way there, kept until the task ends.\n- **Avatars:** each person's picture from Gravatar, kept for a day.\n - Task media, project icons and avatars are files: on the server's disk, or, where its owner set one up, in an S3-compatible bucket of theirs.\n- **When several servers serve one Superfactory:** which of them holds each machine's connection, with the machine's name and the calls its agent answers, and the messages they pass each other, kept for a few minutes. So that each of them knows what the others started, the database also keeps, until they expire (minutes, at most a day): pairing codes and the device each paired, codes of machines and terminals waiting for approval, one-time links to terminals and screens, and how many sign-in and other attempts came from each IP address or account.\n- **Session histories:** what each Claude session did, as its machine recorded it (its messages, the tools it used and what they gave back, and which tasks a manager's messages are about), so its history shows wherever the session ran and even when that machine is gone. Claude's own transcript of each session too (the conversation Claude goes on from), so a session whose machine or sandbox is gone resumes on another with the same context; the server keeps it compressed. Deleted with the session's project, and after the days set under \"How long\".\n - **Their search index:** the text of each message, with known secrets taken out first (the server's own secret values, and anything that looks like a key, a token or a password), so the agents can search the conversations of their own session and of the agents below them. Each agent searches only what its place lets it see: its own task's sessions, an epic's tasks, a specialist's area, a project lead's project, or every project of the main lead's owner; a session in a sandbox only itself. A search outside that is refused and written to the audit log. The index is deleted with the history it was made from.\n - **What stays of a session once its history is deleted:** its record (who it was, its machine and sandbox, when it started and stopped) and its last answer, with secrets taken out, shown in its task's History.\n- **Upgrades:** which one-off repairs of this data an upgrade ran, and when (their names only).\n- **Moves:** when the server's data was moved here from another server, and that server's address (so the apps can say what to set up again: passkeys, paired phones). A move brings everything above along; passkeys, sign-ins and notification addresses for the old address are removed.\n\n### On your machines\n\nOn the machines that run agents, each project's folder (`.superfactory/`) holds:\n\n- a copy of its tasks and their notes, unless the project turns \"Keep a copy in the repository\" off, and its sprints;\n- comments, under the author's handle only;\n- each session's record (what it worked on, and when);\n- the videos, pictures and audio attached to tasks.\n\nThey live in your repository like any other file, so whoever can read the repository can read them.\n\nThe agent keeps the machine's identity key in its own folder (`~/.superfactory/identity.pem`); only its public half is sent, to the servers the machine connects to. While a session runs, its instructions (yours and the server's, if any) are in a file in the agent's folder, deleted when it stops. It also keeps each session's history, meaning what Claude said and did, in its own folder on the machine (`~/.superfactory/sessions/`), and the text each task file last had from the server, to tell what someone changed in it (`~/.superfactory/repo-sync/`). Claude Code keeps its own session files on the machine too, as it always does; Superfactory leaves those to Claude Code.\n\n### On your devices\n\n- **Your sign-in:** in the device's secure storage (the iPhone Keychain, the Android Keystore, the computer's keychain), or a browser cookie on the web.\n- **App preferences:** whether notifications are on, which banners you have closed, whether the app asks for Face ID, Touch ID or a passkey when it opens, and when it was last unlocked there.\n\n- **Feedback's screenshot:** when you send feedback (by shaking the phone or tablet, or from Settings), the screenshot you draw on is kept in the app's cache on the device, which the system clears.\n\nNothing else is stored on the device.\n\n## What the apps don't do\n\n- No analytics, usage tracking, advertising or advertising identifiers.\n- No crash reporting.\n- No location or contacts. The camera and your photos only when you use a feature that needs them:\n - the camera, to scan a pairing code or take a photo for a message;\n - your photos or files, only the ones you pick to attach.\n\n The microphone only while you dictate a message, from a tap on the mic until you tap it again or stop speaking. The audio isn't recorded or kept; only the words go into your message.\n- Nothing is sold or shared for marketing.\n\n## Other services\n\nThe server and your machines talk to another company only for a feature that you or the owner use:\n\n| Service | When | What it gets |\n|---|---|---|\n| Anthropic (Claude Code) | Agents work on a task. | What Claude Code sends: your prompts, the code and files it reads, and its answers. This happens under the Claude account used for that machine or project, and that account's Anthropic terms apply. An account set to keep started also gets a one-word message whenever its 5-hour usage window ends, and any account one when a session finds Claude refusing its login, to check it. |\n| Expo, Apple and Google | Your phone gets notifications. Expo's push service forwards them to Apple (iPhone) or Google (Android). | The device's push token, a count for the app badge, and the same text every time: \"Something needs you. Open it to see what.\" The task's name and its message stay on your server, and the app fetches them when you open the notification. When you've dealt with one, a push with no text and only random ids takes it off your phone. |\n| Google, Mozilla, Apple or Microsoft (web push) | You turn on notifications in a browser. The browser's maker delivers them. | Your browser's push address and an encrypted notification with the same fixed text. |\n| Apple, Google, or your browser's maker (dictation) | You dictate a message. iPhones and iPads turn speech into text on the device when they can; otherwise, and on Android or in a browser, the system's or browser's speech service does it. | Your voice while you dictate, under that company's terms. Superfactory doesn't receive or keep the audio. |\n| Gravatar (Automattic) | Someone's picture is shown. The server fetches it, not your device. | A SHA-256 hash of your email address, from the server's IP address. Gravatar can match the hash only against emails it already knows. |\n| Cloudflare | The owner turns on public access through a Cloudflare tunnel. | All traffic between the apps and your server passes through Cloudflare's network, which decrypts it at its edge to route it. |\n| The STUN server (by default Cloudflare's, `stun.cloudflare.com`) | The owner turns on the WireGuard tunnel's Internet mode. Each machine, device and the server ask it, from the tunnel's own UDP port, which public address they have. | A STUN request with a random id, from that address: it learns the address and nothing else. What then goes between your machines and the server is WireGuard traffic, encrypted end to end; nobody in between can read it. |\n| Let's Encrypt (Internet Security Research Group) | The owner chooses Let's Encrypt for the server's HTTPS. | The server's domain, the email given (if any), and a certificate request holding the server's public key. Let's Encrypt publishes every certificate it issues in public Certificate Transparency logs, so the domain becomes public. It then checks the domain by fetching a file from the server (HTTP-01) or by reading a DNS record. |\n| Cloudflare (its DNS API) | The owner chooses Let's Encrypt's DNS-01 check, with a Cloudflare API token. | The token, the domain's zone, and a temporary TXT record (`_acme-challenge`), removed once the check is done. |\n| sslip.io | You open a sandbox preview by its address (like `web-t-1.192-168-1-5.sslip.io`). | Your device asks sslip.io's public DNS for that name. It learns the preview's name and your server's local IP address, which are both in the name itself. |\n| Google (Gemini) | You add a Gemini key and use video review, narration or video generation. | The video or screen recording being reviewed, the text being spoken, or the prompt for a video. This happens under your Gemini key and Google's terms: on some Gemini plans, Google may use this data to improve its products. |\n| ComputeSDK, with E2B, Daytona or Modal | The owner adds a hosted-sandbox key and a task runs in a hosted sandbox. | The project's code and everything the agent does in that sandbox, on that provider's machines. |\n| Bunnytech support (email) | You send feedback from the phone or tablet app with no feedback project set in Settings \u203a About. It goes as an email you send yourself, from your device's own mail app. | What you write, the screenshot you drew on, the app's version, the device's model and system version, the screen you were on and your server's address; from your email address. With a feedback project set, it becomes a task on your own server instead, and nothing goes to Bunnytech. |\n| GitHub | A project syncs pull requests. | Branches, commits, pull requests and their descriptions. This goes through the machine's own GitHub login (`gh`). |\n\nInstalling Superfactory, or making a sandbox, also downloads software such as Bun, container images and macOS images from their usual sources (GitHub, Docker Hub and others). A Linux machine that sets itself up downloads what tasks need the same way: packages from its distribution's mirrors, Node.js from nodejs.org, Rust (rustup) from static.rust-lang.org when a project uses it, and Claude Code from npm. Narration without a Gemini key downloads its voice once (Kokoro, from npm and Hugging Face) and then speaks on your machine. The desktop app checks for updates, and downloads them, only from the Superfactory server it's paired with. Like any download, the source sees your IP address.\n\n## How long\n\n- Data stays until you or the owner delete it, except as below.\n- **Task media:** the owner can set a number of days, for the whole server or per project. Once a day, the videos, pictures and audio of tasks that are done, cancelled or archived are deleted once they are older than that. This happens on the server and on the machines. Media of open tasks is never deleted.\n- **Session histories:** a session's history, its search index and Claude's transcript of it are deleted once the session has been stopped for the days set, 30 unless the owner sets otherwise, a few sessions at a time (Claude's transcript sooner, after its own days, 14 unless the owner sets otherwise); the database then gives the space back. This happens on the server and on the machines, and a backup made from then on holds none of them; a server restored from an older backup deletes them again when it starts. The session's record and its last answer stay. Running sessions are never touched.\n- Task media starts at 0, which keeps it until someone deletes it.\n- A picture from Gravatar is kept for a day.\n- The server's own log is kept for 7 days.\n- Your notifications are kept for 30 days. The link a push carries to one works for three days.\n\n## Your rights and choices\n\n- See and change your name, settings, devices and keys in Settings.\n- Unpair a device, or sign out everywhere.\n- **Delete your account** in Settings \u203a Profile. This removes, at once:\n - your sign-ins, devices, keys and second factors;\n - your notification addresses, your settings and your secrets;\n - your account itself.\n\n Your handle stays on the tasks and comments you wrote, so their history still makes sense. The audit log keeps its record of your actions.\n\nDepending on where you live (for example under the GDPR in the EU and UK), you can also:\n\n- ask for a copy of your data;\n- ask for your data to be corrected or deleted;\n- object to how your data is used;\n- complain to your data-protection authority.\n\nAsk your server's owner first, because they hold the data. The publisher can't see or change it.\n\n## Security\n\n- **Passwords:** stored hashed, and at least 12 characters long.\n- **Secrets:** stored encrypted.\n- **Devices:** their keys are stored hashed.\n- **Connections:** the apps reach a server on your local network over TLS, and check that it is the server they paired with.\n- **Locking the app:** by default the apps ask for Face ID, Touch ID, the computer's password or a passkey when they open and after a minute away; in a browser, when you open Superfactory in a new browser window (a tab stays unlocked while it's open). Face ID, Touch ID and the password are checked by the device itself; a passkey is checked by your server, against the public key it keeps.\n- **Signing in:** an account with a passkey needs it to sign in, after its password. This keeps nothing new; the audit log notes when a passkey is added or removed.\n- **WireGuard tunnel:** on by default for machines and devices on your local network, and off across the internet until the owner turns on Internet mode. Its UDP port answers only machines and devices that joined it. Inside, each reaches only what it needs: a machine its link to the server, a device the app's API, never another machine. The app's own sign-in and keys still apply inside the tunnel. For a machine that can't reach the server, the server keeps the address it reaches it at and opens the tunnel to it from there; that machine's port answers only the server.\n- **Public access:** off by default. Turning it on asks the owner to confirm it's them, and the app checks that every account has a passkey, and warns the owner when one doesn't.\n\n## Children\n\nSuperfactory is a tool for software work and isn't meant for children under 16.\n\n## Changes\n\nWhen what Superfactory keeps or sends changes, this policy changes with it, and the date at the top moves. Big changes are announced in the app.\n\n## Contact\n\n- About the data on your server: write to its owner.\n- About this policy or the software: write to the publisher at [PRIVACY CONTACT EMAIL], or see Settings \u203a About \u203a Contact and support.\n",s="# Terms of use\n\nThe rules for using the Superfactory apps and software. Open it before you publish the app, or to see what you agree to by using it; the app shows it under Settings \u203a About.\n\nLast updated 2026-10-21.\n\n## Who these terms are with\n\nSuperfactory is published by [PUBLISHER LEGAL NAME], [REGISTERED ADDRESS] (\"we\"). By installing or using the apps or the software, you agree to these terms. If you use Superfactory for an organisation, you agree for it too.\n\n## What Superfactory is\n\nSuperfactory is software that runs Claude Code agents on machines you control, and apps to watch and steer them. You run your own server. We don't host it, and we don't see what you do with it. The privacy policy says what is kept and where.\n\n## Your server, your responsibility\n\n- **The owner of a server is responsible for it:**\n - who gets an account and what they may do;\n - what is stored and for how long;\n - keeping it updated, backed up and safe.\n- **Public access puts the server on the internet.** Protect every account with a passkey first; the app warns you.\n- **Agents act with the permissions you give them.** They run commands on your machines and in your sandboxes, and they can change or delete files. Review what they do before you approve their work, and keep backups of what matters.\n- **Keep your keys safe:** your passwords, devices and secrets (Claude account tokens, API keys). Tell your server's owner at once if one may have leaked.\n\n## Other services\n\nSome features use other companies' services. Their own terms apply to that use, and you need your own accounts with them:\n\n- **Anthropic:** Claude Code, under the Claude account you use.\n- **Notifications:** Apple, Google and Expo on phones; your browser's maker on the web.\n- **Cloudflare:** public access.\n- **Google:** Gemini, for video review, narration and video generation.\n- **ComputeSDK, E2B, Daytona or Modal:** hosted sandboxes.\n- **GitHub:** pull requests.\n- **Gravatar:** pictures.\n\nYou are responsible for following those terms, including any usage limits of your Claude plan.\n\n## Acceptable use\n\nDon't use Superfactory to:\n\n- break the law, or anyone's rights;\n- attack, scan or get into systems you aren't allowed to;\n- get around the terms or limits of the services it connects to;\n- build malware, or anything meant to cause harm.\n\n## The software\n\n- **Licence to use it:** we give you a personal, non-exclusive, non-transferable licence to use the apps and the software. Superfactory's own licence is [SUPERFACTORY LICENCE, e.g. proprietary or an open-source licence]; where it says more, it applies.\n- **The app stores:** if you got an app from Apple's App Store or Google Play, that store's terms also apply. For the App Store, Apple's standard licence for apps applies where these terms say nothing. Apple and Google aren't responsible for the app or for supporting it.\n- **Open source:** Superfactory includes open-source software. Each package and its licence are listed under Settings \u203a About \u203a Open-source licenses, and those licences apply to those packages.\n\n## No warranty\n\nSuperfactory is provided \"as is\" and \"as available\", without warranties of any kind, express or implied. That includes fitness for a particular purpose and that it works without errors or interruptions. Agents are AI: what they write or do can be wrong, and you must check it.\n\n## Limitation of liability\n\nAs far as the law allows, we aren't liable for any indirect or consequential loss, or for lost data, code, profits or work, that comes from using Superfactory or the agents it runs. Our total liability is limited to [LIABILITY CAP, e.g. the amount you paid us in the last 12 months, or EUR 100]. Nothing here limits liability that the law doesn't allow to be limited, such as for death or personal injury caused by negligence, or for fraud.\n\n## Ending\n\nYou can stop using Superfactory at any time; delete your account in Settings \u203a Profile. A server's owner can remove your account from that server. We may stop offering the apps or updates.\n\n## Changes\n\nThese terms may change. The new version appears here with a new date, and big changes are announced in the app. Using Superfactory after a change means you accept it.\n\n## Law\n\nThese terms are governed by the laws of [GOVERNING LAW, e.g. Romania], and disputes go to the courts of [COURTS], except where the law of the country you live in gives you the right to go to your local courts.\n\n## Contact\n\n[PUBLISHER LEGAL NAME], [CONTACT EMAIL]. For help with the app, see Settings \u203a About \u203a Contact and support.\n",n="2026-10-27"},2154,[]);
114
+ __d(function(g,_r,_i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.LegalText=function(t){const s=(0,e.c)(4),{markdown:n}=t;let i,c;s[0]!==n?(i=u(n).map(h),s[0]=n,s[1]=i):i=s[1];s[2]!==i?(c=(0,l.jsx)(r.default,{className:"gap-4",children:i}),s[2]=i,s[3]=c):c=s[3];return c};var t,e=_r(d[0]),s=_r(d[1]),n=_r(d[2]),i=_r(d[3]),r=(t=i)&&t.__esModule?t:{default:t},l=_r(d[4]);function c(t){const s=(0,e.c)(4),{text:n}=t;let i,r;if(s[0]!==n){i=n.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").split(/(\*\*[^*]+\*\*|`[^`]+`)/g).filter(Boolean).map(o),s[0]=n,s[1]=i}else i=s[1];return s[2]!==i?(r=(0,l.jsx)(l.Fragment,{children:i}),s[2]=i,s[3]=r):r=s[3],r}function o(t,e){return t.startsWith("**")?(0,l.jsx)(s.Text,{variant:"callout",className:"font-sans-semibold",children:t.slice(2,-2)},e):t.startsWith("`")?(0,l.jsx)(s.Text,{variant:"mono",children:t.slice(1,-1)},e):(0,l.jsx)(n.Fragment,{children:t},e)}function x(t){const e=[];for(const s of t){const t=s.match(/^(\s*)- (.*)$/),n=e.at(-1);t?e.push({text:t[2]??"",nested:(t[1]??"").length>=2}):n&&(n.text+=` ${s.trim()}`)}return e}function u(t){const e=[];for(const s of t.trim().split(/\n\s*\n/)){const t=s.split("\n"),n=t[0]??"";n.startsWith("### ")?e.push({kind:"h3",text:n.slice(4)}):n.startsWith("## ")?e.push({kind:"h2",text:n.slice(3)}):n.startsWith("# ")?e.push({kind:"h1",text:n.slice(2)}):n.startsWith("> ")?e.push({kind:"quote",text:t.map(t=>t.slice(2)).join(" ")}):n.startsWith("- ")?e.push({kind:"list",items:x(t)}):n.startsWith("|")?e.push({kind:"table",rows:t.filter(t=>!/^\|[\s|:-]+\|$/.test(t)).map(t=>t.slice(1,-1).split("|").map(t=>t.trim()))}):e.push({kind:"p",text:t.map(t=>t.trim()).join(" ")})}return e}function h(t,e){const n=`${t.kind}-${e}`;switch(t.kind){case"h1":return(0,l.jsx)(s.Text,{variant:"title2",accessibilityRole:"header",children:t.text},n);case"h2":return(0,l.jsx)(s.Text,{variant:"headline",accessibilityRole:"header",className:"pt-2",children:t.text},n);case"h3":return(0,l.jsx)(s.Text,{variant:"subhead",accessibilityRole:"header",className:"font-sans-semibold",children:t.text},n);case"quote":return(0,l.jsx)(r.default,{className:"rounded-lg bg-warning-soft px-4 py-3",children:(0,l.jsx)(s.Text,{variant:"callout",children:(0,l.jsx)(c,{text:t.text})})},n);case"list":return(0,l.jsx)(r.default,{className:"gap-2",children:t.items.map(p)},n);case"table":return(0,l.jsx)(r.default,{className:"overflow-hidden rounded-lg border border-line",children:t.rows.map(f)},n);default:return(0,l.jsx)(s.Text,{variant:"callout",children:(0,l.jsx)(c,{text:t.text})},n)}}function f(t,e){return(0,l.jsx)(r.default,{className:(0,s.cn)("flex-row gap-3 px-3 py-2",0===e?"bg-sunken":"border-t border-line"),children:t.map((t,n)=>(0,l.jsx)(s.Text,{variant:"footnote",className:(0,s.cn)("flex-1",0===e&&"font-sans-semibold"),children:(0,l.jsx)(c,{text:t})},n))},t.join("|"))}function p(t){return(0,l.jsxs)(r.default,{className:(0,s.cn)("flex-row gap-2",t.nested&&"pl-5"),children:[(0,l.jsx)(s.Text,{variant:"callout",children:t.nested?"\u25e6":"\u2022"}),(0,l.jsx)(s.Text,{variant:"callout",className:"flex-1",children:(0,l.jsx)(c,{text:t.text})})]},t.text)}},2155,[405,408,224,945,467]);
115
+ __d(function(g,r,_i,a,_m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"preloadLicenses",{enumerable:!0,get:function(){return h}}),_e.LicensesList=function(){const e=(0,t.c)(27),[u,x]=(0,o.useState)(),[f,m]=(0,o.useState)(""),[p,j]=(0,o.useState)();let b,y,v;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{h().then(x)},y=[],e[0]=b,e[1]=y):(b=e[0],y=e[1]);if((0,o.useEffect)(b,y),e[2]!==u?.packages||e[3]!==f){const t=f.trim().toLowerCase(),n=u?.packages??[];v=t?n.filter(e=>{const[n,,s]=e;return`${n} ${s}`.toLowerCase().includes(t)}):n,e[2]=u?.packages,e[3]=f,e[4]=v}else v=e[4];const k=v;if(!u){let t;return e[5]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)(n.Skeleton,{className:"h-60 rounded-lg"}),e[5]=t):t=e[5],t}const _=`Superfactory is built on ${u.packages.length} open-source packages. Thank you to everyone who makes them.`;let S,T,N,$,L,w;e[6]!==_?(S=(0,i.jsx)(n.Text,{variant:"callout",tone:"secondary",children:_}),e[6]=_,e[7]=S):S=e[7];e[8]!==f?(T=(0,i.jsx)(n.TextField,{label:"Search packages",value:f,onChangeText:m,placeholder:"Name or license"}),e[8]=f,e[9]=T):T=e[9];if(e[10]!==u.texts||e[11]!==p||e[12]!==k){let t;e[14]!==u.texts||e[15]!==p?(t=(e,t)=>{const[o,h,x,f]=e;return(0,i.jsxs)(c.default,{className:t?"border-t border-line":void 0,children:[(0,i.jsxs)(n.PressableScale,{scale:.99,accessibilityRole:"button","aria-expanded":p===o,onPress:()=>j(p===o?void 0:o),className:"min-h-12 flex-row items-center gap-3 px-4 py-2",children:[(0,i.jsxs)(c.default,{className:"flex-1",children:[(0,i.jsx)(n.Text,{variant:"callout",children:o}),(0,i.jsx)(n.Text,{variant:"footnote",tone:"tertiary",children:`${h} \xb7 ${x}`})]}),(0,i.jsx)(n.Icon,{icon:p===o?s.default:l.default,size:16,color:"ink-3"})]}),p===o?(0,i.jsx)(n.Text,{variant:"mono",tone:"secondary",selectable:!0,className:"px-4 pb-4",children:u.texts[f]}):null]},`${o}@${h}`)},e[14]=u.texts,e[15]=p,e[16]=t):t=e[16],N=k.slice(0,300).map(t),e[10]=u.texts,e[11]=p,e[12]=k,e[13]=N}else N=e[13];e[17]!==N?($=(0,i.jsx)(n.Card,{children:N}),e[17]=N,e[18]=$):$=e[18];e[19]!==f||e[20]!==k.length?(L=k.length>300?(0,i.jsx)(n.Text,{variant:"footnote",tone:"tertiary",children:k.length-300+" more: search to find one."}):0===k.length?(0,i.jsx)(n.Text,{variant:"footnote",tone:"tertiary",children:`No package matches \u201c${f}\u201d.`}):null,e[19]=f,e[20]=k.length,e[21]=L):L=e[21];e[22]!==S||e[23]!==T||e[24]!==$||e[25]!==L?(w=(0,i.jsxs)(c.default,{className:"gap-3",children:[S,T,$,L]}),e[22]=S,e[23]=T,e[24]=$,e[25]=L,e[26]=w):w=e[26];return w};var t=r(d[0]),n=r(d[1]),s=e(r(d[2])),l=e(r(d[3])),o=r(d[4]),c=e(r(d[5])),i=r(d[6]);let u;const h=()=>(u??=r(d[8])(d[7],d.paths).then(e=>e.default??e),u)},2156,{"0":405,"1":408,"2":2254,"3":1299,"4":224,"5":945,"6":467,"7":2255,"8":2015,"paths":{"2255":"/_expo/static/js/web/licenses-30f8c0555f7f4d434a68ee4706fa433d.js"}});
116
+ __d(function(g,r,i,_a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.AccountsSection=function(){const e=(0,t.c)(26),{list:c,active:o}=(0,a.useAccounts)(),h=(0,p.useAccountsUnread)(),{item:v,openItem:I,closeItem:y}=(0,x.useSettingsItem)(),k=(0,x.useSettings)();let A;if(e[0]!==v||e[1]!==c){let t;e[3]!==v?(t=e=>e.deviceId===v,e[3]=v,e[4]=t):t=e[4],A=c.find(t),e[0]=v,e[1]=c,e[2]=A}else A=e[2];const T=A;let _,N,$,L;e[5]===Symbol.for("react.memo_cache_sentinel")?(_=(0,f.jsx)(n.Text,{variant:"callout",tone:"secondary",children:`Sign this ${u.thisDevice} in to several servers, like staging and production, and switch between them. Each keeps its own key, and its notifications arrive here.`}),e[5]=_):_=e[5];if(e[6]!==o?.deviceId||e[7]!==c||e[8]!==h){let t;e[10]!==o?.deviceId||e[11]!==h?(t=e=>{const t=e.deviceId===o?.deviceId,n=h[e.deviceId];return{id:e.deviceId,title:(0,a.accountName)(e),subtitle:(0,j.accountDetail)(e),leading:(0,f.jsx)(S.AccountMark,{account:e}),badge:t?{label:"In use",tone:"success"}:n?{label:`${n} new`,tone:"accent"}:void 0}},e[10]=o?.deviceId,e[11]=h,e[12]=t):t=e[12],N=c.map(t),e[6]=o?.deviceId,e[7]=c,e[8]=h,e[9]=N}else N=e[9];e[13]!==k?($=(0,f.jsx)(n.Button,{size:"sm",icon:s.default,onPress:()=>k.closeThen(j.addAccount),children:"Add account"}),e[13]=k,e[14]=$):$=e[14];e[15]!==I||e[16]!==N||e[17]!==$?(L=(0,f.jsx)(b.SettingsList,{title:"Accounts",items:N,onOpen:I,action:$}),e[15]=I,e[16]=N,e[17]=$,e[18]=L):L=e[18];const P=!!T&&T.deviceId===o?.deviceId;let R,z;e[19]!==y||e[20]!==T||e[21]!==P?(R=(0,f.jsx)(w,{account:T,inUse:P,onClose:y}),e[19]=y,e[20]=T,e[21]=P,e[22]=R):R=e[22];e[23]!==L||e[24]!==R?(z=(0,f.jsxs)(l.default,{className:"gap-6",children:[_,L,R]}),e[23]=L,e[24]=R,e[25]=z):z=e[25];return z};var t=r(d[0]),n=r(d[1]),s=e(r(d[2])),c=r(d[3]),l=e(r(d[4])),o=r(d[5]),a=r(d[6]),u=r(d[7]),h=r(d[8]),v=r(d[9]),b=r(d[10]),x=r(d[11]),S=r(d[12]),p=r(d[13]),j=r(d[14]),f=r(d[15]);const I={owner:"Owner",member:"Member",viewer:"Viewer"};function w(e){const s=(0,t.c)(16),{account:b,inUse:x,onClose:S}=e,[p,w]=(0,c.useState)(),[A,T]=(0,c.useState)(!1),_=!!b&&p===b.deviceId;let N;s[0]!==S?(N=()=>{w(void 0),S()},s[0]=S,s[1]=N):N=s[1];const $=N;let L;s[2]!==b?(L=b?(0,a.accountName)(b):"",s[2]=b,s[3]=L):L=s[3];const P=L,R=!!b;let z,B;return s[4]!==b||s[5]!==_||s[6]!==$||s[7]!==x||s[8]!==P||s[9]!==A?(z=b?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(v.SettingGroup,{title:"Details",children:[(0,f.jsx)(y,{account:b}),(0,f.jsx)(k,{label:"Server",value:new URL(b.lanUrl).host}),(0,f.jsx)(k,{label:"Signed in as",value:b.user.email}),(0,f.jsx)(k,{label:"Role",value:I[b.user.role]??b.user.role})]}),x?null:(0,f.jsx)(v.SettingGroup,{children:(0,f.jsx)(v.SettingRow,{label:"Switch to this account",help:"The app opens on it, where you left it.",children:(0,f.jsx)(n.Button,{size:"sm",onPress:()=>{$(),(0,j.switchAccount)(b.deviceId)},children:"Switch"})})}),(0,f.jsx)(v.SettingGroup,{children:(0,f.jsx)(v.SettingRow,{label:"Sign out",help:_?`Sign out of ${P}? This ${u.thisDevice}'s key there stops working; your other accounts stay.`:`Signs this ${u.thisDevice} out of ${P} only.`,children:(0,f.jsxs)(l.default,{className:"flex-row gap-2",children:[_?(0,f.jsx)(n.Button,{size:"sm",kind:"ghost",onPress:()=>w(void 0),children:"Keep it"}):null,(0,f.jsx)(n.Button,{kind:"danger",size:"sm",loading:A,accessibilityLabel:`Sign out of ${P}`,onPress:async()=>{if(!_)return w(b.deviceId);T(!0),$(),await(0,o.unpairThisPhone)(b),T(!1)},children:"Sign out"})]})})})]}):null,s[4]=b,s[5]=_,s[6]=$,s[7]=x,s[8]=P,s[9]=A,s[10]=z):z=s[10],s[11]!==$||s[12]!==P||s[13]!==R||s[14]!==z?(B=(0,f.jsx)(h.ItemSettingsModal,{open:R,title:P,onClose:$,children:z}),s[11]=$,s[12]=P,s[13]=R,s[14]=z,s[15]=B):B=s[15],B}function y(e){const s=(0,t.c)(13),{account:l}=e,[o,u]=(0,c.useState)(l.label??"");let h,b,x;s[0]!==l.label?(h=()=>u(l.label??""),b=[l.label],s[0]=l.label,s[1]=h,s[2]=b):(h=s[1],b=s[2]),(0,c.useEffect)(h,b),s[3]!==l.deviceId||s[4]!==l.label||s[5]!==o?(x=()=>{o.trim()!==(l.label??"")&&a.pairedServer.rename(l.deviceId,o)},s[3]=l.deviceId,s[4]=l.label,s[5]=o,s[6]=x):x=s[6];const S=x;let p,j;return s[7]!==l?(p=(0,a.serverName)(l),s[7]=l,s[8]=p):p=s[8],s[9]!==o||s[10]!==S||s[11]!==p?(j=(0,f.jsx)(v.SettingRow,{label:"Name",help:"What this account is called in the app, like Staging.",stacked:!0,children:(0,f.jsx)(n.TextField,{accessibilityLabel:"Account name",value:o,onChangeText:u,onBlur:S,onSubmitEditing:S,placeholder:p,autoCapitalize:"words",returnKeyType:"done"})}),s[9]=o,s[10]=S,s[11]=p,s[12]=j):j=s[12],j}function k(e){const s=(0,t.c)(5),{label:c,value:l}=e;let o,a;return s[0]!==l?(o=(0,f.jsx)(n.Text,{variant:"callout",tone:"secondary",numberOfLines:1,className:"text-right",children:l}),s[0]=l,s[1]=o):o=s[1],s[2]!==c||s[3]!==o?(a=(0,f.jsx)(v.SettingRow,{label:c,oneLine:!0,children:o}),s[2]=c,s[3]=o,s[4]=a):a=s[4],a}},2157,[405,408,2256,224,945,1456,1929,1934,2257,2243,2258,2226,2247,2259,2260,467]);
117
+ __d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.DevicesSection=function(){const e=(0,t.c)(86),o=(0,S.useApi)(),v=(0,s.useQueryClient)(),{signOut:f}=(0,h.useAuth)(),p=(0,w.usePairedServer)(),[j,b]=(0,d.useState)(!1),[U,N]=(0,d.useState)(),[L,K]=(0,d.useState)();let R,q;e[0]===Symbol.for("react.memo_cache_sentinel")?(R=()=>{const e=(0,P.takeApprovalLink)();e&&K(e)},q=[],e[0]=R,e[1]=q):(R=e[0],q=e[1]);(0,d.useEffect)(R,q);const{item:M,openItem:O,closeItem:z}=(0,y.useSettingsItem)();let B,E;e[2]===Symbol.for("react.memo_cache_sentinel")?(B=["devices"],e[2]=B):B=e[2];e[3]!==o?(E={queryKey:B,queryFn:()=>o.devices.list()},e[3]=o,e[4]=E):E=e[4];const Q=(0,s.useQuery)(E);let G,H,W;e[5]!==o?(G=e=>o.devices.revoke(e),e[5]=o,e[6]=G):G=e[6];e[7]!==v?(H=()=>v.invalidateQueries({queryKey:["devices"]}),e[7]=v,e[8]=H):H=e[8];e[9]!==z||e[10]!==G||e[11]!==H?(W={mutationFn:G,onSuccess:z,onSettled:H},e[9]=z,e[10]=G,e[11]=H,e[12]=W):W=e[12];const Y=(0,s.useMutation)(W);let J,V,X,Z,ee,te,ne,ie,se,oe,ae,le,re,ce,de,ue,he;if(e[13]!==L||e[14]!==Q.data||e[15]!==Q.isPending||e[16]!==M||e[17]!==O||e[18]!==j||e[19]!==U||e[20]!==p){const t=Q.data??[];let s,o,d;e[35]!==M?(s=e=>e.id===M,e[35]=M,e[36]=s):s=e[36],Z=t.find(s),e[37]!==p?.deviceId?(o=e=>e.id===p?.deviceId,e[37]=p?.deviceId,e[38]=o):o=e[38],X=o,e[39]!==p?(d=p?null:(0,T.jsx)(D,{onPress:()=>b(!0)}),e[39]=p,e[40]=d):d=e[40];const h=d;let v,f,y;V=u.default,ce="gap-6",e[41]===Symbol.for("react.memo_cache_sentinel")?(ee=(0,T.jsx)(n.Text,{variant:"callout",tone:"secondary",children:"Your phone connects straight to your server on your network, encrypted and checked against the server's own certificate. Each phone has its own key: remove one and that key stops working at once."}),e[41]=ee):ee=e[41],e[42]!==p?(te=p?(0,T.jsx)($.TunnelStatusLine,{}):null,e[42]=p,e[43]=te):te=e[43],ne=p?null:(0,T.jsx)(k.FaceIdPrompts,{devices:t,onSetUp:N}),ie=Q.isPending||t.length?(0,T.jsx)(x.SettingsList,{title:"Paired devices",loading:Q.isPending,items:t.map(e=>({id:e.id,title:e.name??"Unnamed device",subtitle:C(e),icon:e.terminal?c.default:l.default,badge:X(e)?{label:`This ${A.thisDevice}`}:void 0})),onOpen:O,action:h}):(0,T.jsxs)(u.default,{className:"items-center gap-4",children:[(0,T.jsx)(n.EmptyState,{icon:l.default,title:"No phones yet",body:"Pair your phone to get your tasks and questions wherever you are."}),h]}),e[44]===Symbol.for("react.memo_cache_sentinel")?(v=()=>b(!1),e[44]=v):v=e[44],e[45]!==j?(f=j?(0,T.jsx)(I.PairPhonePanel,{onDone:()=>b(!1)}):null,e[45]=j,e[46]=f):f=e[46],e[47]!==f?(y=(0,T.jsx)(n.SheetScroll,{className:"min-h-0 flex-1",children:f}),e[47]=f,e[48]=y):y=e[48],e[49]!==j||e[50]!==y?(se=(0,T.jsx)(n.Sheet,{open:j,onClose:v,title:"Pair a phone",flowHeight:720,children:y}),e[49]=j,e[50]=y,e[51]=se):se=e[51];const S=!!L;let P,w,R,q;e[52]===Symbol.for("react.memo_cache_sentinel")?(P=()=>K(void 0),e[52]=P):P=e[52],e[53]!==L?(w=L?(0,T.jsx)(_.FaceIdStep,{offerId:L.offerId,token:L.token,onDone:()=>K(void 0)}):null,e[53]=L,e[54]=w):w=e[54],e[55]!==w?(R=(0,T.jsx)(n.SheetScroll,{className:"min-h-0 flex-1",children:w}),e[55]=w,e[56]=R):R=e[56],e[57]!==S||e[58]!==R?(oe=(0,T.jsx)(n.Sheet,{open:S,onClose:P,title:"Pair a phone",flowHeight:720,children:R}),e[57]=S,e[58]=R,e[59]=oe):oe=e[59],e[60]===Symbol.for("react.memo_cache_sentinel")?(q=()=>N(void 0),e[60]=q):q=e[60],e[61]!==U?(ae=(0,T.jsx)(k.FaceIdSetUpSheet,{deviceId:U,onClose:q}),e[61]=U,e[62]=ae):ae=e[62],J=F,le=Z,re=!!Z&&X(Z),e[13]=L,e[14]=Q.data,e[15]=Q.isPending,e[16]=M,e[17]=O,e[18]=j,e[19]=U,e[20]=p,e[21]=J,e[22]=V,e[23]=X,e[24]=Z,e[25]=ee,e[26]=te,e[27]=ne,e[28]=ie,e[29]=se,e[30]=oe,e[31]=ae,e[32]=le,e[33]=re,e[34]=ce}else J=e[21],V=e[22],X=e[23],Z=e[24],ee=e[25],te=e[26],ne=e[27],ie=e[28],se=e[29],oe=e[30],ae=e[31],le=e[32],re=e[33],ce=e[34];e[63]!==X||e[64]!==Z||e[65]!==Y||e[66]!==f?(de=()=>Z&&(X(Z)?f():Y.mutate(Z.id)),e[63]=X,e[64]=Z,e[65]=Y,e[66]=f,e[67]=de):de=e[67];e[68]!==J||e[69]!==z||e[70]!==Y.isPending||e[71]!==de||e[72]!==le||e[73]!==re?(ue=(0,T.jsx)(J,{device:le,isThisPhone:re,removing:Y.isPending,onRemove:de,onClose:z}),e[68]=J,e[69]=z,e[70]=Y.isPending,e[71]=de,e[72]=le,e[73]=re,e[74]=ue):ue=e[74];e[75]!==V||e[76]!==ee||e[77]!==te||e[78]!==ne||e[79]!==ie||e[80]!==se||e[81]!==oe||e[82]!==ae||e[83]!==ue||e[84]!==ce?(he=(0,T.jsxs)(V,{className:ce,children:[ee,te,ne,ie,se,oe,ae,ue]}),e[75]=V,e[76]=ee,e[77]=te,e[78]=ne,e[79]=ie,e[80]=se,e[81]=oe,e[82]=ae,e[83]=ue,e[84]=ce,e[85]=he):he=e[85];return he};var t=r(_d[0]),n=r(_d[1]),s=r(_d[2]),o=e(r(_d[3])),l=e(r(_d[4])),c=e(r(_d[5])),d=r(_d[6]);r(_d[7]);var u=e(r(_d[8])),h=r(_d[9]),v=r(_d[10]),f=r(_d[11]),p=r(_d[12]),x=r(_d[13]),y=r(_d[14]),S=r(_d[15]),j=r(_d[16]),P=r(_d[17]),b=r(_d[18]),k=r(_d[19]),_=r(_d[20]),I=r(_d[21]),w=r(_d[22]),A=r(_d[23]),$=r(_d[24]),T=r(_d[25]);function U(e){const s=(0,t.c)(5),{label:o,value:l}=e;let c,d;return s[0]!==l?(c=(0,T.jsx)(n.Text,{variant:"callout",tone:"secondary",numberOfLines:1,className:"text-right",children:l}),s[0]=l,s[1]=c):c=s[1],s[2]!==o||s[3]!==c?(d=(0,T.jsx)(p.SettingRow,{label:o,oneLine:!0,children:c}),s[2]=o,s[3]=c,s[4]=d):d=s[4],d}function D(e){const s=(0,t.c)(2),{onPress:l}=e;let c;return s[0]!==l?(c=(0,T.jsx)(n.Button,{size:"sm",icon:o.default,onPress:l,children:"Pair a phone"}),s[0]=l,s[1]=c):c=s[1],c}function C(e){if("pending"===e.confirmKey)return"Waiting for you to approve Face ID or Touch ID";if(e.pairAgain)return e.terminal?"Sign it in again: it knows this server's old address":"Pair it again: it knows this server's old address";const t=e.terminal?"Signed in with superfactory join":"Paired",n=e.lastUsedAt?`used ${(0,j.ago)(e.lastUsedAt)}`:"not used yet";return`${t} ${(0,j.ago)(e.createdAt)} \xb7 ${n} \xb7 Tunnel: ${N(e)}`}const N=e=>v.tunnelWords[e.tunnel??"off"];function F(e){const s=(0,t.c)(19),{device:o,isThisPhone:h,removing:v,onRemove:x,onClose:y}=e,[S,P]=(0,d.useState)(),k=!!o&&S===o.id;let _;s[0]!==o?.id?(_=e=>P(e?o?.id:void 0),s[0]=o?.id,s[1]=_):_=s[1];const I=_,w=o?.name??"Unnamed device",$=h?"Unpair":"Remove";let D;s[2]!==y||s[3]!==I?(D=()=>{I(!1),y()},s[2]=y,s[3]=I,s[4]=D):D=s[4];const C=D,F=!!o;let L,K;return s[5]!==k||s[6]!==o||s[7]!==h||s[8]!==w||s[9]!==x||s[10]!==v||s[11]!==I||s[12]!==$?(L=o?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(p.SettingGroup,{title:"Details",icon:o.terminal?c.default:l.default,children:[(0,T.jsx)(U,{label:"Kind",value:o.terminal?"A terminal, signed in with superfactory join":"A paired phone"}),(0,T.jsx)(U,{label:o.terminal?"Signed in":"Paired",value:(0,j.ago)(o.createdAt)}),(0,T.jsx)(U,{label:"Last used",value:o.lastUsedAt?(0,j.ago)(o.lastUsedAt):"Not used yet"}),(0,T.jsx)(U,{label:"Tunnel",value:N(o)})]}),o.terminal?null:(0,T.jsx)(b.DeviceConfirmKey,{device:o,isThisPhone:h}),(0,T.jsx)(p.SettingGroup,{children:(0,T.jsx)(p.SettingRow,{label:h?`Unpair this ${A.thisDevice}`:"Remove this device",help:k?`${$} ${w}? Its key stops working at once; pair it again to use it.`:h?"Signs this device out of your server.":"Its key stops working at once.",children:(0,T.jsxs)(u.default,{className:"flex-row gap-2",children:[k?(0,T.jsx)(n.Button,{size:"sm",kind:"ghost",onPress:()=>I(!1),children:"Keep it"}):null,(0,T.jsx)(n.Button,{kind:"danger",size:"sm",loading:v,onPress:()=>k?x():I(!0),accessibilityLabel:`${$} ${w}`,children:$})]})})})]}):null,s[5]=k,s[6]=o,s[7]=h,s[8]=w,s[9]=x,s[10]=v,s[11]=I,s[12]=$,s[13]=L):L=s[13],s[14]!==C||s[15]!==w||s[16]!==F||s[17]!==L?(K=(0,T.jsx)(f.ItemSettingsModal,{open:F,title:w,onClose:C,children:L}),s[14]=C,s[15]=w,s[16]=F,s[17]=L,s[18]=K):K=s[18],K}},2158,[405,408,1408,2261,2262,2263,224,308,945,1455,2264,2257,2243,2258,2226,407,2044,2265,2266,2159,2267,2268,1929,1934,2160,467]);
118
+ __d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.FaceIdPrompts=function(e){const s=(0,t.c)(20),{devices:o,onSetUp:h}=e,{me:p}=(0,d.useAuth)(),y=(0,u.useMySecurity)().data?.security,[j,w]=v(),{deviceIds:$}=j;if("owner"!==p?.role||!y?.protected)return null;let b,_,I,N,T,C;if(s[0]!==o||s[1]!==$||s[2]!==h||s[3]!==w){T=Symbol.for("react.early_return_sentinel");e:{let e;s[9]!==$?(e=e=>!e.terminal&&e.enabled&&("pending"===e.confirmKey||"off"===e.confirmKey&&!$.includes(e.id)),s[9]=$,s[10]=e):e=s[10];const t=o.filter(e);if(!t.length){T=null;break e}let d;b=f.SettingGroup,_="Confirming it's you",I=c.default,s[11]!==$||s[12]!==h||s[13]!==w?(d=e=>{const t=e.name??"This phone",s=(0,x.biometryOf)(e.name),o="pending"===e.confirmKey;return(0,S.jsx)(f.SettingRow,{label:o?`${t} asks to confirm it's you with ${s}`:`${t} can't confirm it's you yet`,help:o?"Approve it with the code it shows; you'll confirm with your passkey first.":`Set up ${s} on it, so it can open a shell on your machine and change secrets.`,children:(0,S.jsxs)(l.default,{className:"flex-row gap-2",children:[o?null:(0,S.jsx)(n.Button,{size:"sm",kind:"ghost",accessibilityLabel:`Not now for ${t}`,onPress:()=>w({deviceIds:[...$,e.id]}),children:"Not now"}),(0,S.jsx)(n.Button,{size:"sm",icon:c.default,accessibilityLabel:`${o?"Approve":"Set up"} ${s} on ${t}`,onPress:()=>h(e.id),children:o?"Approve":"Set up"})]})},e.id)},s[11]=$,s[12]=h,s[13]=w,s[14]=d):d=s[14],N=t.map(d)}s[0]=o,s[1]=$,s[2]=h,s[3]=w,s[4]=b,s[5]=_,s[6]=I,s[7]=N,s[8]=T}else b=s[4],_=s[5],I=s[6],N=s[7],T=s[8];if(T!==Symbol.for("react.early_return_sentinel"))return T;s[15]!==b||s[16]!==_||s[17]!==I||s[18]!==N?(C=(0,S.jsx)(b,{title:_,icon:I,children:N}),s[15]=b,s[16]=_,s[17]=I,s[18]=N,s[19]=C):C=s[19];return C},_e.FaceIdSetUpSheet=function(e){const d=(0,t.c)(24),{deviceId:u,onClose:f}=e,p=(0,h.useApi)();let v,w;d[0]===Symbol.for("react.memo_cache_sentinel")?(v=["devices"],d[0]=v):v=d[0];d[1]!==p?(w=()=>p.devices.list(),d[1]=p,d[2]=w):w=d[2];const $=!!u&&j;let b;d[3]!==w||d[4]!==$?(b={queryKey:v,queryFn:w,refetchInterval:$},d[3]=w,d[4]=$,d[5]=b):b=d[5];const _=(0,s.useQuery)(b);let I,N,T;d[6]!==u||d[7]!==_.data?(I=_.data?.find(e=>e.id===u),N=I?.name??"your phone",T=(0,x.biometryOf)(I?.name),d[6]=u,d[7]=_.data,d[8]=I,d[9]=N,d[10]=T):(I=d[8],N=d[9],T=d[10]);const C=T,K=I?.confirmKey??"off",P=!!u,k=`Set up ${C}`;let A,F,O;d[11]!==I||d[12]!==C||d[13]!==N||d[14]!==f||d[15]!==K?(A=I?(0,S.jsx)(n.SheetStep,{step:K,children:(0,S.jsxs)(n.Card,{className:"items-center gap-4 px-6 py-8",children:["off"===K?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(n.Icon,{icon:c.default,size:40,color:"accent"}),(0,S.jsx)(n.Text,{variant:"headline",className:"text-center",children:`On the ${N}`}),(0,S.jsx)(n.Text,{variant:"callout",tone:"secondary",className:"max-w-sm text-center",children:`Open Superfactory \u203a Settings \u203a Security and tap Set up ${C}. It shows a code; type it here.`}),(0,S.jsx)(n.Text,{variant:"footnote",tone:"tertiary",accessibilityLiveRegion:"polite",children:`Waiting for the ${N}\u2026`})]}):null,"pending"===K?(0,S.jsx)(l.default,{className:"w-full",children:(0,S.jsx)(y.DeviceConfirmKey,{device:I,isThisPhone:!1})}):null,"on"===K?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(n.Icon,{icon:o.default,size:40,color:"success"}),(0,S.jsx)(n.Text,{variant:"headline",className:"text-center",children:`${C} is on for ${N}`}),(0,S.jsx)(n.Text,{variant:"callout",tone:"secondary",className:"max-w-sm text-center",children:`It confirms it's you with ${C} from now on.`})]}):null,(0,S.jsx)(n.Button,{kind:"on"===K?"primary":"secondary",onPress:f,children:"on"===K?"Done":"Close"})]})}):null,d[11]=I,d[12]=C,d[13]=N,d[14]=f,d[15]=K,d[16]=A):A=d[16];d[17]!==A?(F=(0,S.jsx)(n.SheetScroll,{className:"min-h-0 flex-1",children:A}),d[17]=A,d[18]=F):F=d[18];d[19]!==f||d[20]!==P||d[21]!==k||d[22]!==F?(O=(0,S.jsx)(n.Sheet,{open:P,onClose:f,title:k,flowHeight:560,children:F}),d[19]=f,d[20]=P,d[21]=k,d[22]=F,d[23]=O):O=d[23];return O};var t=r(_d[0]),n=r(_d[1]),s=r(_d[2]),o=e(r(_d[3])),c=e(r(_d[4])),l=e(r(_d[5])),d=r(_d[6]),u=r(_d[7]),f=r(_d[8]),h=r(_d[9]),p=r(_d[10]),y=r(_d[11]),x=r(_d[12]),S=r(_d[13]);const v=(0,p.deviceSetting)("superfactory.face-id-prompts",{deviceIds:[]},{ofServer:!0}),j=2e3},2159,[405,408,1408,1054,2269,945,1455,2270,2243,407,2214,2266,2267,467]);
119
+ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.TunnelStatusLine=function(){const e=(0,t.c)(13),s=(0,f.usePairedServer)(),u=(0,h.useTunnelStatus)();if(!s)return null;let o;e[0]!==u?(o=p(u),e[0]=u,e[1]=o):o=e[1];const c="down"===u.state?"danger":"ink-2";let w,x,y,_;e[2]!==o||e[3]!==c?(w=(0,v.jsx)(n.Icon,{icon:o,size:16,color:c}),e[2]=o,e[3]=c,e[4]=w):w=e[4];e[5]!==s||e[6]!==u?(x=T(u,(0,f.serverName)(s)),e[5]=s,e[6]=u,e[7]=x):x=e[7];e[8]!==x?(y=(0,v.jsx)(n.Text,{variant:"footnote",tone:"secondary",numberOfLines:2,className:"flex-1",children:x}),e[8]=x,e[9]=y):y=e[9];e[10]!==w||e[11]!==y?(_=(0,v.jsxs)(l.default,{accessibilityLiveRegion:"polite",className:"min-h-6 flex-row items-center gap-2",children:[w,y]}),e[10]=w,e[11]=y,e[12]=_):_=e[12];return _};var t=r(d[0]),n=r(d[1]),s=e(r(d[2])),u=e(r(d[3])),o=e(r(d[4])),c=e(r(d[5])),l=e(r(d[6])),f=r(d[7]),h=r(d[8]),v=r(d[9]);function T(e,t){switch(e.state){case"up":return"lan"===e.path?"Through the tunnel, on your server's network":"Through the tunnel, over the internet";case"connecting":return"Connecting through the tunnel\u2026";case"direct":return e.serverOff?"Over HTTPS: your server's tunnel is off":"Over HTTPS, checked against your server's certificate";case"down":return(0,h.tunnelMessage)(e.reason,t)}}const p=e=>"down"===e.state?s.default:"up"===e.state?"lan"===e.path?o.default:u.default:c.default},2160,[405,408,2271,2272,2161,2273,945,1929,1933,467]);
120
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"__iconData",{enumerable:!0,get:function(){return o}}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};
121
+ /**
122
+ * @license lucide-react-native v1.50.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */
127
+ const o={name:"house",size:24,node:[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],aliases:["home"]};o.node;const u=(0,n.default)(o)},2161,[1035]);
128
+ __d(function(g,r,i,_a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SecretsSection=function(){const e=(0,t.c)(37),f=(0,x.useSecrets)(),v=(0,x.useLoadSecrets)(),P=(0,l.useConfirmIdentity)(),[k,A]=(0,a.useState)(!1),{item:C,openItem:N,closeItem:I}=(0,h.useSettingsItem)(),T=(0,x.useScopeWords)(),O=f.error;if(O&&!(0,y.needsVerification)(O)){if(O instanceof y.ApiError&&403===O.status){let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,b.jsx)(s.EmptyState,{icon:o.default,title:"Only owners manage secrets",body:"The server's owner manages the secrets every session gets; a project's owner manages that project's."}),e[0]=t):t=e[0],t}const t=`The secrets didn't load: ${O.message}`;let n;return e[1]!==t?(n=(0,b.jsx)(s.Text,{variant:"callout",tone:"danger",accessibilityRole:"alert",children:t}),e[1]=t,e[2]=n):n=e[2],n}let B,E;if(e[3]!==C||e[4]!==f.data?.secrets){let t;B=[...f.data?.secrets??[]].sort(_),e[7]!==C?(t=e=>e.id===C,e[7]=C,e[8]=t):t=e[8],E=B.find(t),e[3]=C,e[4]=f.data?.secrets,e[5]=B,e[6]=E}else B=e[5],E=e[6];const M=E;let V,z,L,R,U,$,G,K;e[9]===Symbol.for("react.memo_cache_sentinel")?(V=(0,b.jsx)(s.Text,{variant:"callout",tone:"secondary",children:"Stored encrypted on your server. Nobody can read a value back, here or anywhere else; a session gets only its project's and its machine's secrets, as environment variables."}),e[9]=V):V=e[9];e[10]!==P||e[11]!==O||e[12]!==B||e[13]!==v||e[14]!==f.isPending?(z=(0,y.needsVerification)(O)?(0,b.jsx)(u.SettingGroup,{title:"Secrets",icon:n.default,children:(0,b.jsx)(u.SettingRow,{label:"Confirm it's you to see them",help:"Secrets reach your machines, so Superfactory checks it's really you first.",children:(0,b.jsx)(s.Button,{size:"sm",onPress:()=>P.run(v),children:"Confirm it's you"})})}):f.isPending?(0,b.jsx)(s.Skeleton,{className:"h-40 rounded-lg"}):(0,b.jsx)(S.Integrations,{secrets:B}),e[10]=P,e[11]=O,e[12]=B,e[13]=v,e[14]=f.isPending,e[15]=z):z=e[15];e[16]!==O||e[17]!==B||e[18]!==N||e[19]!==f.isPending||e[20]!==T?(L=(0,y.needsVerification)(O)||f.isPending?null:(0,b.jsx)(p.SettingsList,{title:"Secrets",icon:n.default,items:B.map(e=>w(e,T)),onOpen:N,action:(0,b.jsx)(s.Button,{size:"sm",kind:"secondary",onPress:()=>A(!0),children:"Add secret"}),empty:"No secrets yet. Add any your projects' tools need, like NPM_TOKEN.",footer:"A project's secret wins over its machine's, which wins over an app-wide one."}),e[16]=O,e[17]=B,e[18]=N,e[19]=f.isPending,e[20]=T,e[21]=L):L=e[21];e[22]!==f.data?.scopes?(R=f.data?.scopes??[],e[22]=f.data?.scopes,e[23]=R):R=e[23];e[24]===Symbol.for("react.memo_cache_sentinel")?(U=()=>A(!1),e[24]=U):U=e[24];e[25]!==k||e[26]!==R?($=(0,b.jsx)(j.AddSecretSheet,{open:k,scopes:R,onClose:U}),e[25]=k,e[26]=R,e[27]=$):$=e[27];e[28]!==I||e[29]!==M?(G=(0,b.jsx)(j.SecretSheet,{secret:M,onClose:I}),e[28]=I,e[29]=M,e[30]=G):G=e[30];e[31]!==P.sheet||e[32]!==z||e[33]!==L||e[34]!==$||e[35]!==G?(K=(0,b.jsxs)(c.default,{className:"gap-8",children:[V,z,L,$,G,P.sheet]}),e[31]=P.sheet,e[32]=z,e[33]=L,e[34]=$,e[35]=G,e[36]=K):K=e[36];return K};var t=r(d[0]),s=r(d[1]),n=e(r(d[2])),o=e(r(d[3])),a=r(d[4]),c=e(r(d[5])),l=r(d[6]),u=r(d[7]),p=r(d[8]),h=r(d[9]),y=r(d[10]),f=r(d[11]),S=r(d[12]),j=r(d[13]),x=r(d[14]),b=r(d[15]);const v={app:0,machine:1,project:2,task:3},_=(e,t)=>v[e.scope.type]-v[t.scope.type]||e.name.localeCompare(t.name);function w(e,t){const s=[e.note,t(e.scope,e.audience),e.lastUsedAt?`used ${(0,f.ago)(e.lastUsedAt)}`:"not used yet"].filter(Boolean);return{id:e.id,title:e.name,subtitle:s.join(" \xb7 "),badge:e.refused?{label:"Name not allowed",tone:"danger"}:"claude-account"===e.kind?{label:"Claude account"}:void 0}}},2162,[405,408,2274,2275,224,945,2276,2243,2258,2226,1939,2044,2163,2277,2278,467]);
129
+ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.Integrations=function(e){const o=(0,t.c)(32),{secrets:s}=e,[S,_]=(0,l.useState)(),v=(0,b.useAddSecret)(),A=(0,b.useChangeSecret)(),C=(0,u.useConfirmIdentity)(),I="owner"===(0,c.useAuth)().me?.role;let E,O,$,x,N,G,j;if(o[0]!==v||o[1]!==A||o[2]!==C||o[3]!==S||o[4]!==I||o[5]!==s){j=Symbol.for("react.early_return_sentinel");e:{const e=n.KNOWN_SECRETS.filter(w);let t;o[13]!==s?(t=e=>s.find(t=>t.name===e&&"app"===t.scope.type)??s.find(t=>t.name===e),o[13]=s,o[14]=t):t=o[14];const l=t;let c;o[15]!==S?(c=e=>e.name===S,o[15]=S,o[16]=c):c=o[16],O=e.find(c);const u=O&&k[O.name];if($=O&&u?[{title:"What it's for",body:u.what},u.get,{title:`Paste the ${O.label.toLowerCase()}`,body:"Saved encrypted on your server. Nobody can read it back, you included.",paste:{label:O.label,secret:!0,check:u.check}},{title:"Save it",body:"Superfactory asks you to confirm it's you, then sessions you start get it from their next start.",test:{label:"Save",run:(e,t)=>C.run(async()=>{const n=s.find(e=>e.name===O.name&&"app"===e.scope.type);n?await A.mutateAsync({id:n.id,change:{value:e}}):await v.mutateAsync({name:O.name,kind:"env",scope:{type:"app"},audience:"owner",note:O.label,value:e}),t(`Saved as ${O.name}.`)})}}]:[],!I){j=null;break e}let b;o[17]!==l?(b=e=>{const t=l(e.name);return{id:e.name,title:e.label,icon:k[e.name]?.icon,subtitle:t?`${e.name} \xb7 ${t.lastUsedAt?`used ${(0,p.ago)(t.lastUsedAt)}`:"not used yet"}`:e.help,badge:t?{label:"Ready",tone:"success"}:{label:"Not set up"}}},o[17]=l,o[18]=b):b=o[18],G=(0,f.jsx)(h.SettingsList,{title:"Integrations",footer:"Each is a secret like the ones below: change who gets it there.",items:e.map(b),onOpen:_}),E=y.SetupFlow,N=!!O,x=O?.label.toLowerCase()??""}o[0]=v,o[1]=A,o[2]=C,o[3]=S,o[4]=I,o[5]=s,o[6]=E,o[7]=O,o[8]=$,o[9]=x,o[10]=N,o[11]=G,o[12]=j}else E=o[6],O=o[7],$=o[8],x=o[9],N=o[10],G=o[11],j=o[12];if(j!==Symbol.for("react.early_return_sentinel"))return j;const L=`Set up the ${x}`,M=`${O?.help??""} Sessions you start get it from their next start.`;let P,T,U,W;o[19]!==M?(P={body:M},o[19]=M,o[20]=P):P=o[20];o[21]===Symbol.for("react.memo_cache_sentinel")?(T=()=>_(void 0),o[21]=T):T=o[21];o[22]!==E||o[23]!==C.sheet||o[24]!==$||o[25]!==N||o[26]!==L||o[27]!==P?(U=(0,f.jsx)(E,{open:N,title:L,steps:$,done:P,onClose:T,children:C.sheet}),o[22]=E,o[23]=C.sheet,o[24]=$,o[25]=N,o[26]=L,o[27]=P,o[28]=U):U=o[28];o[29]!==G||o[30]!==U?(W=(0,f.jsxs)(f.Fragment,{children:[G,U]}),o[29]=G,o[30]=U,o[31]=W):W=o[31];return W};var t=r(d[0]),n=r(d[1]),o=e(r(d[2])),s=e(r(d[3])),l=r(d[4]),c=r(d[5]),u=r(d[6]),h=r(d[7]),y=r(d[8]),p=r(d[9]),b=r(d[10]),f=r(d[11]);const k={GEMINI_API_KEY:{icon:o.default,what:"Gemini watches each task's before/after video, flags what looks wrong and narrates it. Without a key, a voice on your machine narrates and the videos aren't reviewed.",get:{title:"Create a key",body:"In Google AI Studio, choose Create API key and copy it.",link:{label:"Open Google AI Studio",url:"https://aistudio.google.com/apikey"}},check:e=>/^AIza[0-9A-Za-z_-]{35}$/.test(e)?void 0:"A Gemini key starts with AIza and is 39 characters long."},CLAUDE_CODE_OAUTH_TOKEN:{icon:s.default,what:"Claude inside a sandbox can't use your computer's login. This token lets it sign in there; only sandboxed sessions get it.",get:{title:"Make a token",body:"On a computer with Claude Code, run this. It opens Claude's sign-in, then prints a token: copy it.",command:"claude setup-token"},check:e=>e.startsWith("sk-ant-oat")?void 0:"A Claude token starts with sk-ant-oat."}};function w(e){return k[e.name]}},2163,[405,2,2164,2274,224,1455,2276,2258,2244,2044,2278,467]);
130
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"__iconData",{enumerable:!0,get:function(){return o}}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};
131
+ /**
132
+ * @license lucide-react-native v1.50.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */
137
+ const o={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"}]]};o.node;const u=(0,n.default)(o)},2164,[1035]);
138
+ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SecuritySection=function(){const e=(0,t.c)(24),{client:n}=(0,f.useAuth)(),u=(0,A.useMySecurity)(),h=u.data?.security,w=h?.protected?"Protected":"Only a password",S=h?.protected?y.default:l.default,v=h?.protected?"Signing in needs your passkey: your password alone doesn't.":"Anyone with your password can sign in and control your machines. Add a passkey.",P=h?.protected?"success":"warning",x=h?.protected?"Second factor on":"Not protected";let b,N,T,F,q,I,L,M,Q;e[0]!==P||e[1]!==x?(b=(0,O.jsx)(s.Badge,{tone:P,className:"self-center",children:x}),e[0]=P,e[1]=x,e[2]=b):b=e[2];e[3]!==w||e[4]!==S||e[5]!==v||e[6]!==b?(N=(0,O.jsx)(k.SettingRow,{label:w,icon:S,help:v,children:b}),e[3]=w,e[4]=S,e[5]=v,e[6]=b,e[7]=N):N=e[7];e[8]!==u.data||e[9]!==h?.passkeys?(T=u.data?.movedFrom&&!h?.passkeys?(0,O.jsx)(k.SettingRow,{label:"Add your passkey again",icon:o.default,help:`This server moved here from ${new URL(u.data.movedFrom.url).host}. Passkeys belong to an address, so the ones made there were removed: add one for this address below.`}):null,e[8]=u.data,e[9]=h?.passkeys,e[10]=T):T=e[10];e[11]!==N||e[12]!==T?(F=(0,O.jsxs)(k.SettingGroup,{title:"Your account",children:[N,T]}),e[11]=N,e[12]=T,e[13]=F):F=e[13];e[14]===Symbol.for("react.memo_cache_sentinel")?(q=(0,O.jsx)(_.PasswordLocksGroup,{}),e[14]=q):q=e[14];e[15]!==n?(I=n?(0,O.jsx)(C,{client:n}):null,e[15]=n,e[16]=I):I=e[16];e[17]===Symbol.for("react.memo_cache_sentinel")?(L=(0,O.jsx)(j.ThisDeviceSecurity,{}),e[17]=L):L=e[17];e[18]!==n?(M=n?(0,O.jsx)(R,{client:n}):(0,O.jsx)(k.SettingGroup,{title:"Passkeys",children:(0,O.jsx)(k.SettingRow,{label:"Passkeys",icon:c.default,help:"Set them up in Superfactory on the web, where you sign in with your password."})}),e[18]=n,e[19]=M):M=e[19];e[20]!==I||e[21]!==M||e[22]!==F?(Q=(0,O.jsxs)(p.default,{className:"gap-6",children:[F,q,I,L,M]}),e[20]=I,e[21]=M,e[22]=F,e[23]=Q):Q=e[23];return Q};var t=r(d[0]),s=r(d[1]),n=r(d[2]),o=e(r(d[3])),c=e(r(d[4])),u=e(r(d[5])),l=e(r(d[6])),y=e(r(d[7])),h=r(d[8]);r(d[9]);var p=e(r(d[10])),f=r(d[11]),w=r(d[12]),k=r(d[13]),S=r(d[14]),v=r(d[15]),P=r(d[16]),x=r(d[17]),j=r(d[18]),b=r(d[19]),_=r(d[20]),A=r(d[21]),O=r(d[22]);function C(e){const n=(0,t.c)(5),{client:o}=e,[c,l]=(0,h.useState)(!1);let y;n[0]!==o?(y=async function(){l(!0);const e=await o.revokeOtherSessions().catch(N);l(!1),(0,P.showToast)(e&&!e.error?"Signed out everywhere else":"Couldn't sign out the other sessions.")},n[0]=o,n[1]=y):y=n[1];const p=y;let f;return n[2]!==c||n[3]!==p?(f=(0,O.jsx)(k.SettingGroup,{title:"Signed in",children:(0,O.jsx)(k.SettingRow,{label:"Other browsers",icon:u.default,help:"Signs this account out of every other browser. Paired devices stay: remove them in Devices.",children:(0,O.jsx)(s.Button,{size:"sm",kind:"secondary",loading:c,onPress:p,children:"Sign out everywhere else"})})}),n[2]=c,n[3]=p,n[4]=f):f=n[4],f}function N(){}function R(e){const c=(0,t.c)(53),{client:u}=e,l=(0,A.useSecurityRefresh)(),y=(0,n.useQueryClient)();let p,f;c[0]===Symbol.for("react.memo_cache_sentinel")?(p=["security","passkeys"],c[0]=p):p=c[0],c[1]!==u.passkey?(f={queryKey:p,queryFn:async()=>(await u.passkey.listUserPasskeys()).data??[]},c[1]=u.passkey,c[2]=f):f=c[2];const k=(0,n.useQuery)(f),[j,_]=(0,h.useState)(!1),C=(0,w.useConfirmIdentity)(),{item:N,openItem:R,closeItem:B}=(0,v.useSettingsItem)();let E;c[3]!==u.passkey||c[4]!==y||c[5]!==l?(E=async function(){const e=await u.passkey.addPasskey({name:Q()}).catch(M);if(403===e?.error?.status)throw new x.ApiError(403,JSON.stringify(e.error));if(!e||e.error)return(0,P.showToast)("No passkey was added.");(0,P.showToast)("Passkey added"),await Promise.all([l(),y.invalidateQueries({queryKey:["security","passkeys"]})])},c[3]=u.passkey,c[4]=y,c[5]=l,c[6]=E):E=c[6];const G=E;let K;c[7]!==G||c[8]!==C?(K=async function(){_(!0),await C.run(G).catch(L).finally(()=>_(!1))},c[7]=G,c[8]=C,c[9]=K):K=c[9];const W=K;let $;c[10]!==u.passkey||c[11]!==B||c[12]!==y||c[13]!==l?($=async function(e){const t=await u.passkey.deletePasskey({id:e}).catch(I);if(403===t?.error?.status)throw new x.ApiError(403,JSON.stringify(t.error));if(!t||t.error)return(0,P.showToast)("Couldn't remove that passkey.");B(),await Promise.all([l(),y.invalidateQueries({queryKey:["security","passkeys"]})])},c[10]=u.passkey,c[11]=B,c[12]=y,c[13]=l,c[14]=$):$=c[14];const z=$;let D;c[15]!==C||c[16]!==z?(D=async function(e){await C.run(()=>z(e)).catch(q)},c[15]=C,c[16]=z,c[17]=D):D=c[17];const J=D;let U;c[18]!==u.passkey||c[19]!==y?(U=async function(e,t){const s=await u.passkey.updatePasskey({id:e,name:t}).catch(F);if(!s||s.error)return(0,P.showToast)("Couldn't rename that passkey.");await y.invalidateQueries({queryKey:["security","passkeys"]})},c[18]=u.passkey,c[19]=y,c[20]=U):U=c[20];const X=U;let Y;c[21]!==k.data?(Y=k.data??[],c[21]=k.data,c[22]=Y):Y=c[22];const H=Y;let V;if(c[23]!==N||c[24]!==H){let e;c[26]!==N?(e=e=>e.id===N,c[26]=N,c[27]=e):e=c[27],V=H.find(e),c[23]=N,c[24]=H,c[25]=V}else V=c[25];const Z=V;let ee,te,se,ne,ae,oe,re;return c[28]!==H?(ee=H.map(T),c[28]=H,c[29]=ee):ee=c[29],c[30]!==W||c[31]!==j||c[32]!==k.data?.length?(te=(0,O.jsx)(s.Button,{size:"sm",kind:"secondary",loading:j,onPress:W,accessibilityLabel:"Add a passkey",children:k.data?.length?"Add another":"Set up"}),c[30]=W,c[31]=j,c[32]=k.data?.length,c[33]=te):te=c[33],c[34]!==R||c[35]!==ee||c[36]!==te?(se=(0,O.jsx)(S.SettingsList,{title:"Passkeys",icon:o.default,items:ee,onOpen:R,action:te,empty:"No passkeys yet",footer:"Recommended: your device unlocks it with your face, fingerprint or PIN; there is nothing to type or to steal."}),c[34]=R,c[35]=ee,c[36]=te,c[37]=se):se=c[37],c[38]!==Z||c[39]!==X?(ne=e=>Z?X(Z.id,e):Promise.resolve(),c[38]=Z,c[39]=X,c[40]=ne):ne=c[40],c[41]!==Z||c[42]!==J?(ae=()=>Z?J(Z.id):Promise.resolve(),c[41]=Z,c[42]=J,c[43]=ae):ae=c[43],c[44]!==B||c[45]!==Z||c[46]!==ne||c[47]!==ae?(oe=(0,O.jsx)(b.PasskeyModal,{passkey:Z,onRename:ne,onRemove:ae,onClose:B}),c[44]=B,c[45]=Z,c[46]=ne,c[47]=ae,c[48]=oe):oe=c[48],c[49]!==C.sheet||c[50]!==se||c[51]!==oe?(re=(0,O.jsxs)(O.Fragment,{children:[se,oe,C.sheet]}),c[49]=C.sheet,c[50]=se,c[51]=oe,c[52]=re):re=c[52],re}function T(e){return{id:e.id,title:(0,b.passkeyName)(e),subtitle:(0,b.addedWords)(e),icon:o.default}}function F(){}function q(){return(0,P.showToast)("Couldn't remove that passkey.")}function I(){}function L(){return(0,P.showToast)("Sign in again to add a passkey.")}function M(){}function Q(){if("undefined"==typeof navigator)return"web";const e=navigator.userAgent;return`${/Edg\//.test(e)?"Edge":/Chrome\//.test(e)?"Chrome":/Safari\//.test(e)?"Safari":/Firefox\//.test(e)?"Firefox":"Browser"} on ${/Mac OS X/.test(e)?"macOS":/Windows/.test(e)?"Windows":/Android/.test(e)?"Android":/iPhone|iPad/.test(e)?"iOS":"Linux"}`}},2165,[405,408,1408,2166,2274,2279,2280,2252,224,308,945,1455,2276,2243,2258,2226,1462,1939,2281,2167,2168,2270,467]);
139
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"__iconData",{enumerable:!0,get:function(){return p}}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return c}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};
140
+ /**
141
+ * @license lucide-react-native v1.50.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */
146
+ const p={name:"fingerprint-pattern",size:24,node:[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],aliases:["fingerprint"]};p.node;const c=(0,n.default)(p)},2166,[1035]);
147
+ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"passkeyName",{enumerable:!0,get:function(){return h}}),Object.defineProperty(_e,"addedWords",{enumerable:!0,get:function(){return x}}),_e.PasskeyModal=function(e){const p=(0,t.c)(27),{passkey:y,onRename:j,onRemove:v,onClose:b}=e,[S,P]=(0,l.useState)(""),[k,_]=(0,l.useState)(!1),[R,N]=(0,l.useState)();let w;p[0]!==y?.name?(w=()=>{P(y?.name??""),_(!1)},p[0]=y?.name,p[1]=w):w=p[1];const C=y?.id;let M,T;p[2]!==C?(M=[C],p[2]=C,p[3]=M):M=p[3];(0,l.useEffect)(w,M),p[4]!==y?(T=y?h(y):"",p[4]=y,p[5]=T):T=p[5];const B=T;let L;p[6]!==S||p[7]!==y?.name?(L=!!S.trim()&&S.trim()!==(y?.name??""),p[6]=S,p[7]=y?.name,p[8]=L):L=p[8];const O=L;let z;p[9]===Symbol.for("react.memo_cache_sentinel")?(z=(e,t)=>{N(e),t().finally(()=>N(void 0))},p[9]=z):z=p[9];const A=z,D=!!y;let F,G,$;p[10]!==y?(F=y&&x(y),p[10]=y,p[11]=F):F=p[11];p[12]!==k||p[13]!==R||p[14]!==S||p[15]!==v||p[16]!==j||p[17]!==y||p[18]!==O||p[19]!==B?(G=y?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.SettingGroup,{title:"Passkey",icon:s.default,children:(0,f.jsxs)(o.default,{className:"flex-row items-end gap-2 py-3",children:[(0,f.jsx)(o.default,{className:"flex-1",children:(0,f.jsx)(n.TextField,{label:"Name",value:S,onChangeText:P,maxLength:100,autoCorrect:!1})}),O?(0,f.jsx)(n.Button,{loading:"rename"===R,onPress:()=>A("rename",()=>j(S.trim())),children:"Save"}):null]})}),(0,f.jsx)(u.SettingGroup,{children:(0,f.jsx)(u.SettingRow,{label:"Remove passkey",help:k?"Remove it? This device stops signing you in; you can add it again later.":"This device stops signing you in.",children:(0,f.jsxs)(o.default,{className:"flex-row gap-2",children:[k?(0,f.jsx)(n.Button,{size:"sm",kind:"ghost",onPress:()=>_(!1),children:"Keep it"}):null,(0,f.jsx)(n.Button,{size:"sm",kind:"danger",loading:"remove"===R,accessibilityLabel:`Remove ${B}`,onPress:()=>k?A("remove",v):_(!0),children:"Remove"})]})})})]}):null,p[12]=k,p[13]=R,p[14]=S,p[15]=v,p[16]=j,p[17]=y,p[18]=O,p[19]=B,p[20]=G):G=p[20];p[21]!==b||p[22]!==D||p[23]!==F||p[24]!==G||p[25]!==B?($=(0,f.jsx)(c.ItemSettingsModal,{open:D,title:B,subtitle:F,onClose:b,children:G}),p[21]=b,p[22]=D,p[23]=F,p[24]=G,p[25]=B,p[26]=$):$=p[26];return $};var t=r(d[0]),n=r(d[1]),s=e(r(d[2])),l=r(d[3]),o=e(r(d[4])),c=r(d[5]),u=r(d[6]),f=r(d[7]);const h=e=>e.name||"Passkey",x=e=>`Added ${new Date(e.createdAt).toLocaleDateString()}`},2167,[405,408,2166,224,945,2257,2243,467]);
148
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.PasswordLocksGroup=function(){const n=(0,t.c)(6),e="owner"===(0,l.useAuth)().me?.role,s=(0,y.usePasswordLocks)(e);let o;n[0]!==s.data?.accounts?(o=s.data?.accounts??[],n[0]=s.data?.accounts,n[1]=o):o=n[1];const u=o;if(!e||0===u.length)return null;let c,w;n[2]!==u?(c=u.map(k),n[2]=u,n[3]=c):c=n[3];n[4]!==c?(w=(0,j.jsx)(h.SettingGroup,{title:"Password sign-in waiting",children:c}),n[4]=c,n[5]=w):w=n[5];return w};var n,t=r(d[0]),e=r(d[1]),s=r(d[2]),o=r(d[3]),u=(n=o)&&n.__esModule?n:{default:n},c=r(d[4]),l=r(d[5]),h=r(d[6]),w=r(d[7]),p=r(d[8]),f=r(d[9]),y=r(d[10]),j=r(d[11]);function k(n){return(0,j.jsx)(P,{handle:n.handle,name:n.name},n.handle)}function P(n){const o=(0,t.c)(17),{handle:l,name:y}=n,k=(0,p.useApi)(),P=(0,s.useQueryClient)(),x=(0,f.useConfirmIdentity)(),[S,A]=(0,c.useState)(!1);let C;o[0]!==k||o[1]!==l||o[2]!==y||o[3]!==P?(C=async function(){const n=await k.security.unlockPassword(l);P.setQueryData(["security","password-locks"],n),(0,w.showToast)(`${y} can sign in with their password again`)},o[0]=k,o[1]=l,o[2]=y,o[3]=P,o[4]=C):C=o[4];const b=C;let v;o[5]!==x||o[6]!==b?(v=async function(){A(!0),await x.run(b).catch(_).finally(()=>A(!1))},o[5]=x,o[6]=b,o[7]=v):v=o[7];const G=v;let L,M,Q;return o[8]!==S||o[9]!==G?(L=(0,j.jsx)(e.Button,{size:"sm",kind:"secondary",loading:S,onPress:G,children:"Allow password sign-in"}),o[8]=S,o[9]=G,o[10]=L):L=o[10],o[11]!==y||o[12]!==L?(M=(0,j.jsx)(h.SettingRow,{label:y,icon:u.default,help:"Used an authenticator app, which Superfactory no longer supports: their password alone doesn't sign them in until you allow it, or they sign in with a passkey.",children:L}),o[11]=y,o[12]=L,o[13]=M):M=o[13],o[14]!==x.sheet||o[15]!==M?(Q=(0,j.jsxs)(j.Fragment,{children:[M,x.sheet]}),o[14]=x.sheet,o[15]=M,o[16]=Q):Q=o[16],Q}function _(){return(0,w.showToast)("Couldn't allow that sign-in.")}},2168,[405,408,1408,2282,224,1455,2243,1462,407,2276,2270,467]);
149
+ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.LogOutButton=function(e){const p=(0,t.c)(31),{quiet:v,className:b}=e,{signOut:_}=(0,u.useAuth)(),j=(0,l.usePairedServer)(),x=!!j,S=(0,l.useAccounts)().list.length>1,$="phone"===(0,f.useLayout)(),[N,P]=(0,c.useState)(!1);let k;p[0]!==j||p[1]!==x||p[2]!==S?(k=j&&S?`Sign out of ${(0,l.accountName)(j)}`:x?`Unpair this ${h.thisDevice}`:"Log out",p[0]=j,p[1]=x,p[2]=S,p[3]=k):k=p[3];const L=k;let C;p[4]!==j||p[5]!==x||p[6]!==S?(C=j&&S?`This ${h.thisDevice}'s key on ${(0,l.accountName)(j)} stops working. Your other accounts stay.`:x?`This ${h.thisDevice} stops seeing your Superfactory until you pair it again.`:"You'll need to sign in again on this device.",p[4]=j,p[5]=x,p[6]=S,p[7]=C):C=p[7];const D=C;let O;p[8]!==_?(O=async()=>{P(!1),s.haptics.success(),await _()},p[8]=_,p[9]=O):O=p[9];const T=O;let w;p[10]!==T||p[11]!==$?(w=()=>$?P(!0):void T(),p[10]=T,p[11]=$,p[12]=w):w=p[12];const A=w;let B,M;p[13]!==A||p[14]!==b||p[15]!==L||p[16]!==x||p[17]!==v?(B=v?(0,y.jsx)(s.PressableScale,{scale:.97,accessibilityRole:"button",onPress:A,className:(0,s.cn)("h-9 items-center justify-center rounded-md px-3 active:bg-sunken",b),children:(0,y.jsx)(s.Text,{variant:"subhead",tone:"danger",children:L})}):(0,y.jsx)(s.Button,{kind:"danger",icon:x?o.default:n.default,onPress:A,className:b,children:L}),p[13]=A,p[14]=b,p[15]=L,p[16]=x,p[17]=v,p[18]=B):B=p[18];p[19]===Symbol.for("react.memo_cache_sentinel")?(M=()=>P(!1),p[19]=M):M=p[19];const Y=`${L}?`;let q,F,R;p[20]!==T?(q=()=>{T()},p[20]=T,p[21]=q):q=p[21];p[22]!==N||p[23]!==L||p[24]!==D||p[25]!==Y||p[26]!==q?(F=(0,y.jsx)(s.ConfirmSheet,{open:N,onClose:M,title:Y,message:D,confirmLabel:L,onConfirm:q}),p[22]=N,p[23]=L,p[24]=D,p[25]=Y,p[26]=q,p[27]=F):F=p[27];p[28]!==B||p[29]!==F?(R=(0,y.jsxs)(y.Fragment,{children:[B,F]}),p[28]=B,p[29]=F,p[30]=R):R=p[30];return R};var t=r(d[0]),s=r(d[1]),n=e(r(d[2])),o=e(r(d[3])),c=r(d[4]),u=r(d[5]),l=r(d[6]),h=r(d[7]),f=r(d[8]),y=r(d[9])},2169,[405,408,2279,2170,224,1455,1929,1934,1916,467]);
150
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"__iconData",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return l}});var e,n=r(d[0]),t=(e=n)&&e.__esModule?e:{default:e};
151
+ /**
152
+ * @license lucide-react-native v1.50.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */
157
+ const y={name:"unlink",size:24,node:[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]]};y.node;const l=(0,t.default)(y)},2170,[1035]);
158
+ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.AccountSection=function(){const e=(0,t.c)(17),{me:v}=(0,h.useAuth)(),y=(0,h.useMyAvatarHash)();if(!v)return null;let w,_,p;e[0]!==y||e[1]!==v.name?(w=(0,b.jsx)(x.SettingRow,{label:"Photo",icon:o.default,help:"From Gravatar, by your email",children:(0,b.jsx)(n.Avatar,{name:v.name,size:40,avatarHash:y})}),e[0]=y,e[1]=v.name,e[2]=w):w=e[2];e[3]!==v.name?(_=(0,b.jsx)(x.SettingRow,{label:"Name",icon:c.default,children:(0,b.jsx)(n.Text,{variant:"callout",tone:"secondary",children:v.name})}),e[3]=v.name,e[4]=_):_=e[4];e[5]!==v.email?(p=(0,b.jsx)(x.SettingRow,{label:"Email",icon:l.default,oneLine:!0,children:(0,b.jsx)(n.Text,{variant:"callout",tone:"secondary",numberOfLines:1,className:"text-right",children:v.email})}),e[5]=v.email,e[6]=p):p=e[6];const S=j[v.role];let A,O,R,M;e[7]!==S?(A=(0,b.jsx)(x.SettingRow,{label:"Role",icon:s.default,help:"Owners change the server's settings, its machines and its secrets.",children:(0,b.jsx)(n.Badge,{className:"self-center",children:S})}),e[7]=S,e[8]=A):A=e[8];e[9]!==w||e[10]!==_||e[11]!==p||e[12]!==A?(O=(0,b.jsxs)(x.SettingGroup,{title:"Profile",footer:"Others see you by your Gravatar and a public handle; your email stays private.",children:[w,_,p,A]}),e[9]=w,e[10]=_,e[11]=p,e[12]=A,e[13]=O):O=e[13];e[14]===Symbol.for("react.memo_cache_sentinel")?(R=(0,b.jsx)(f.DeleteAccount,{}),e[14]=R):R=e[14];e[15]!==O?(M=(0,b.jsxs)(u.default,{className:"gap-6",children:[O,R]}),e[15]=O,e[16]=M):M=e[16];return M};var t=r(d[0]),n=r(d[1]),l=e(r(d[2])),s=e(r(d[3])),o=e(r(d[4])),c=e(r(d[5])),u=e(r(d[6])),h=r(d[7]),f=r(d[8]),x=r(d[9]),b=r(d[10]);const j={owner:"Owner",member:"Member",viewer:"Viewer"}},2171,[405,408,2172,2173,2283,2284,945,1455,2174,2243,467]);
159
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"__iconData",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};
160
+ /**
161
+ * @license lucide-react-native v1.50.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */
166
+ const c={name:"at-sign",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]]};c.node;const u=(0,n.default)(c)},2172,[1035]);
167
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"__iconData",{enumerable:!0,get:function(){return o}}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};
168
+ /**
169
+ * @license lucide-react-native v1.50.0 - ISC
170
+ *
171
+ * This source code is licensed under the ISC license.
172
+ * See the LICENSE file in the root directory of this source tree.
173
+ */
174
+ const o={name:"badge-check",size:24,node:[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["verified"]};o.node;const u=(0,n.default)(o)},2173,[1035]);
175
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.DeleteAccount=function(){const e=(0,t.c)(20),{me:n,signOut:f}=(0,c.useAuth)(),_=(0,l.useApi)(),[p,v]=(0,u.useState)(!1),[w,S]=(0,u.useState)(),[b,k]=(0,u.useState)(!1),D="owner"===n?.role;let j;e[0]!==_||e[1]!==f?(j=async()=>{k(!0),S(void 0);try{await _.deleteAccount()}catch{return k(!1),S("Couldn't delete your account. Try again.")}o.haptics.success(),v(!1),await f()},e[0]=_,e[1]=f,e[2]=j):j=e[2];const x=j,A=D?"You run this server, so your account stays: the server needs its owner.":"Removes your sign-ins, devices, keys and settings. Tasks you wrote stay, under your handle.";let C,T,M,O,P,R,Y;e[3]===Symbol.for("react.memo_cache_sentinel")?(C=()=>v(!0),e[3]=C):C=e[3];e[4]!==D?(T=(0,h.jsx)(o.Button,{size:"sm",kind:"danger",disabled:D,onPress:C,children:"Delete\u2026"}),e[4]=D,e[5]=T):T=e[5];e[6]!==A||e[7]!==T?(M=(0,h.jsx)(y.SettingRow,{label:"Delete my account",icon:s.default,help:A,children:T}),e[6]=A,e[7]=T,e[8]=M):M=e[8];e[9]===Symbol.for("react.memo_cache_sentinel")?(O=()=>v(!1),e[9]=O):O=e[9];e[10]!==x?(P=()=>{x()},e[10]=x,e[11]=P):P=e[11];e[12]!==p||e[13]!==b||e[14]!==w||e[15]!==P?(R=(0,h.jsx)(o.ConfirmSheet,{open:p,onClose:O,title:"Delete your account?",message:"Your account is deleted for good: you're signed out on every device, your paired phones stop working, and your keys and settings are gone. Tasks and comments you wrote stay, under your handle.",confirmLabel:"Delete my account",onConfirm:P,busy:b,error:w}),e[12]=p,e[13]=b,e[14]=w,e[15]=P,e[16]=R):R=e[16];e[17]!==M||e[18]!==R?(Y=(0,h.jsxs)(y.SettingGroup,{title:"Delete account",children:[M,R]}),e[17]=M,e[18]=R,e[19]=Y):Y=e[19];return Y};var e,t=r(d[0]),o=r(d[1]),n=r(d[2]),s=(e=n)&&e.__esModule?e:{default:e},u=r(d[3]),c=r(d[4]),l=r(d[5]),y=r(d[6]),h=r(d[7])},2174,[405,408,2285,224,1455,407,2243,467]);
176
+ __d(function(g,r,i,_a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.useAppliedTheme=function(){const e=(0,t.c)(3),[n]=v();let l,c;e[0]!==n?(l=()=>(0,a.setAppearance)(n),c=[n],e[0]=n,e[1]=l,e[2]=c):(l=e[1],c=e[2]);(0,o.useEffect)(l,c)},_e.AppearanceSection=function(){const e=(0,t.c)(3),[n,l]=v();let c;e[0]!==l||e[1]!==n?(c=(0,p.jsx)(h.SettingGroup,{title:"Appearance",icon:u.default,children:(0,p.jsx)(h.SettingRow,{setting:"appearance.theme",label:"Theme",help:"Light, dark, or follow the device.",children:(0,p.jsx)(a.Segmented,{label:"Theme",value:n,options:f,onChange:l})})}),e[0]=l,e[1]=n,e[2]=c):c=e[2];return c};var t=r(d[0]),a=r(d[1]),n=e(r(d[2])),l=e(r(d[3])),c=e(r(d[4])),u=e(r(d[5])),o=r(d[6]),s=r(d[7]),h=r(d[8]),p=r(d[9]);const f=[{value:"system",label:"Like the device",short:"Auto",icon:n.default},{value:"light",label:"Light",short:"Light",icon:c.default},{value:"dark",label:"Dark",short:"Dark",icon:l.default}];function v(){const e=(0,t.c)(5),a=(0,s.useUserSettings)(),n=(0,s.usePatchSettings)(),l=a.data?.values["appearance.theme"]?.value??"system";let c,u;return e[0]!==n?(c=e=>n.mutate({"appearance.theme":e}),e[0]=n,e[1]=c):c=e[1],e[2]!==c||e[3]!==l?(u=[l,c],e[2]=c,e[3]=l,e[4]=u):u=e[4],u}},2175,[405,408,2286,2287,2176,2177,224,1962,2243,467]);
177
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"__iconData",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return c}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};
178
+ /**
179
+ * @license lucide-react-native v1.50.0 - ISC
180
+ *
181
+ * This source code is licensed under the ISC license.
182
+ * See the LICENSE file in the root directory of this source tree.
183
+ */
184
+ const u={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};u.node;const c=(0,n.default)(u)},2176,[1035]);
185
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"__iconData",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};
186
+ /**
187
+ * @license lucide-react-native v1.50.0 - ISC
188
+ *
189
+ * This source code is licensed under the ISC license.
190
+ * See the LICENSE file in the root directory of this source tree.
191
+ */
192
+ const u={name:"sun-moon",size:24,node:[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14.837 16.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715",key:"xlf6rm"}],["path",{d:"M16 12a4 4 0 0 0-4-4",key:"6vsxu"}],["path",{d:"m19 5-1.256 1.256",key:"1yg6a6"}],["path",{d:"M20 12h2",key:"1q8mjw"}]]};u.node;const o=(0,n.default)(u)},2177,[1035]);
193
+ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.AuditSection=function(){const e=(0,t.c)(31),o="owner"===(0,h.useAuth)().me?.role,[f,y]=(0,c.useState)(""),[j,b]=(0,c.useState)(!1);let S;e[0]!==f?(S=f.trim(),e[0]=f,e[1]=S):S=e[1];const _=(0,c.useDeferredValue)(S),w=v(_,j,o);if(!o){let t;return e[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,p.jsx)(n.EmptyState,{icon:s.default,title:"Only the owner reads the audit log",body:"It records everyone's changes on this Superfactory, so only its owner reads it."}),e[2]=t):t=e[2],t}let T,C,R,A,E,F,M;if(e[3]!==w.data?.pages||e[4]!==w.error||e[5]!==w.isPending||e[6]!==j||e[7]!==f||e[8]!==_){const t=w.data?.pages.flatMap(N)??[];let o,s;T=u.default,C="gap-8",e[14]===Symbol.for("react.memo_cache_sentinel")?(R=(0,p.jsx)(n.Text,{variant:"callout",tone:"secondary",children:"Every change on this server and every action it refused, newest first."}),e[14]=R):R=e[14],e[15]!==f?(o=(0,p.jsx)(n.TextField,{value:f,onChangeText:y,placeholder:"Search by person, machine, action or target",accessibilityLabel:"Search the audit log",autoCapitalize:"none",autoCorrect:!1}),e[15]=f,e[16]=o):o=e[16],e[17]!==j?(s=(0,p.jsx)(x.SettingRow,{label:"Refusals only",oneLine:!0,children:(0,p.jsx)(n.Toggle,{value:j,onChange:b,label:"Refusals only"})}),e[17]=j,e[18]=s):s=e[18],e[19]!==o||e[20]!==s?(A=(0,p.jsxs)(u.default,{className:"gap-3",children:[o,s]}),e[19]=o,e[20]=s,e[21]=A):A=e[21],E=w.isPending?(0,p.jsx)(n.Skeleton,{className:"h-60 rounded-lg"}):w.error?(0,p.jsx)(n.Text,{variant:"footnote",tone:"danger",accessibilityRole:"alert",children:`Couldn't load the audit log: ${w.error.message}`}):(0,p.jsx)(x.SettingGroup,{title:"Entries",icon:l.default,empty:_||j?"Nothing matches":"Nothing recorded yet",children:t.map(P)}),e[3]=w.data?.pages,e[4]=w.error,e[5]=w.isPending,e[6]=j,e[7]=f,e[8]=_,e[9]=T,e[10]=C,e[11]=R,e[12]=A,e[13]=E}else T=e[9],C=e[10],R=e[11],A=e[12],E=e[13];e[22]!==w?(F=w.hasNextPage?(0,p.jsx)(n.Button,{kind:"secondary",size:"sm",loading:w.isFetchingNextPage,onPress:()=>w.fetchNextPage(),children:"Show older"}):null,e[22]=w,e[23]=F):F=e[23];e[24]!==T||e[25]!==C||e[26]!==R||e[27]!==A||e[28]!==E||e[29]!==F?(M=(0,p.jsxs)(T,{className:C,children:[R,A,E,F]}),e[24]=T,e[25]=C,e[26]=R,e[27]=A,e[28]=E,e[29]=F,e[30]=M):M=e[30];return M};var t=r(d[0]),n=r(d[1]),o=r(d[2]),s=e(r(d[3])),l=e(r(d[4])),c=r(d[5]),u=e(r(d[6])),h=r(d[7]),f=r(d[8]),y=r(d[9]),x=r(d[10]),p=r(d[11]);const j=50;function v(e,n,s){const l=(0,t.c)(11),c=(0,f.useApi)();let u,h,y;return l[0]!==n||l[1]!==e?(u=["server","audit",e,n],l[0]=n,l[1]=e,l[2]=u):u=l[2],l[3]!==c||l[4]!==n||l[5]!==e?(h=t=>{const{pageParam:o}=t;return c.settings.audit({text:e,refused:n,before:o,limit:j})},l[3]=c,l[4]=n,l[5]=e,l[6]=h):h=l[6],l[7]!==s||l[8]!==u||l[9]!==h?(y={queryKey:u,queryFn:h,initialPageParam:void 0,getNextPageParam:b,enabled:s},l[7]=s,l[8]=u,l[9]=h,l[10]=y):y=l[10],(0,o.useInfiniteQuery)(y)}function b(e){return e.entries.length<j?void 0:e.entries.at(-1)?.id}const S=e=>[e.actorName??e.actor,e.target].filter(Boolean).join(" \xb7 ");function P(e){return(0,p.jsx)(x.SettingRow,{label:e.action,help:S(e),details:e.detail??void 0,children:(0,p.jsx)(n.Text,{variant:"subhead",tone:e.action.endsWith("refused")?"danger":"secondary",children:(0,y.ago)(e.at)})},e.id)}function N(e){return e.entries}},2178,[405,408,1408,2275,2288,224,945,1455,407,2044,2243,467]);
194
+ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.DrawerContent=function(){const e=(0,t.c)(26),s=(0,h.useSafeAreaInsets)(),[o]=(0,y.useSidebarWidth)(),{collapsed:u}=o,_="desktop"===(0,k.useLayout)(),S=s.top+10,b=s.bottom+10;let j;e[0]!==S||e[1]!==b?(j={paddingTop:S,paddingBottom:b},e[0]=S,e[1]=b,e[2]=j):j=e[2];const D=u&&"items-center";let W,v,M,I,L,A,R,z,P;e[3]!==D?(W=(0,n.cn)("flex-1 bg-sidebar px-2",D),e[3]=D,e[4]=W):W=e[4];e[5]!==u?(v=u?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(c.default,{className:"mb-3 items-center",children:(0,N.jsx)(T,{collapsed:!0})}),(0,N.jsx)(p.AgentsTools,{rail:!0})]}):(0,N.jsxs)(c.default,{testID:"sidebar-top-row",className:"mb-3 h-10 flex-row items-center",children:[(0,N.jsx)(T,{collapsed:!1}),(0,N.jsx)(p.AgentsTools,{})]}),M=(0,N.jsx)(O.SidebarPlaces,{collapsed:u}),I=u?(0,N.jsx)(c.default,{"aria-hidden":!0,testID:"sidebar-divider",className:"mt-1 mb-1 h-px w-6 bg-line"}):null,e[5]=u,e[6]=v,e[7]=M,e[8]=I):(v=e[6],M=e[7],I=e[8]);e[9]!==u?(L=(0,N.jsx)(l.default,{className:"flex-1 self-stretch",contentContainerClassName:"gap-1 pt-1 pb-4",children:u?(0,N.jsx)(x.ManagersNav,{collapsed:!0}):(0,N.jsx)(J.SidebarSections,{})}),e[9]=u,e[10]=L):L=e[10];e[11]!==u||e[12]!==_?(A=_?(0,N.jsx)(c.default,{className:(0,n.cn)("self-stretch pt-2 pb-2",u?"items-center":"px-1"),children:(0,N.jsx)(f.LeadButton,{collapsed:u})}):null,e[11]=u,e[12]=_,e[13]=A):A=e[13];e[14]!==u?(R=(0,N.jsx)(w.AccountRow,{compact:u}),e[14]=u,e[15]=R):R=e[15];e[16]===Symbol.for("react.memo_cache_sentinel")?(z=(0,N.jsx)(C,{}),e[16]=z):z=e[16];e[17]!==A||e[18]!==R||e[19]!==j||e[20]!==W||e[21]!==v||e[22]!==M||e[23]!==I||e[24]!==L?(P=(0,N.jsxs)(c.default,{nativeID:p.SIDEBAR_ID,style:j,className:W,children:[v,M,I,L,A,R,z]}),e[17]=A,e[18]=R,e[19]=j,e[20]=W,e[21]=v,e[22]=M,e[23]=I,e[24]=L,e[25]=P):P=e[25];return P};var t=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]);r(d[4]);var l=e(r(d[5])),c=e(r(d[6])),u=r(d[7]),_=r(d[8]),h=r(d[9]),p=r(d[10]),f=r(d[11]),x=r(d[12]),S=r(d[13]),b=r(d[14]),w=r(d[15]),j=r(d[16]),O=r(d[17]),J=r(d[18]),k=r(d[19]),y=r(d[20]),N=r(d[21]);function T(e){const l=(0,t.c)(20),{collapsed:c,onNavigate:u}=e,{home:_}=(0,j.useWorkPlaces)(),h=(0,o.useRef)(null);(0,n.useTooltip)(h,"Tasks, projects and machines");const p=(0,b.useWindowCorner)();let f;l[0]!==c||l[1]!==p.left||l[2]!==p.top?(f=c?{marginTop:Math.max(0,p.top-10)}:{marginLeft:Math.max(0,p.left-16)},l[0]=c,l[1]=p.left,l[2]=p.top,l[3]=f):f=l[3];const x=_;let w,O;l[4]!==_||l[5]!==u?(w=()=>{n.haptics.selection(),u?.(),s.router.navigate(_)},l[4]=_,l[5]=u,l[6]=w):w=l[6],l[7]!==x||l[8]!==w?(O=(0,S.appLink)(x,w),l[7]=x,l[8]=w,l[9]=O):O=l[9];const J=c?"justify-center":"min-w-0 flex-1 pr-1 pl-2";let k,y,T,D;return l[10]!==J?(k=(0,n.cn)("h-10 flex-row items-center gap-2 rounded-lg",J),l[10]=J,l[11]=k):k=l[11],l[12]===Symbol.for("react.memo_cache_sentinel")?(y=(0,N.jsx)(n.AppIcon,{size:26}),l[12]=y):y=l[12],l[13]!==c?(T=c?null:(0,N.jsx)(n.Text,{variant:"headline",numberOfLines:1,className:"flex-shrink",children:"Superfactory"}),l[13]=c,l[14]=T):T=l[14],l[15]!==f||l[16]!==O||l[17]!==k||l[18]!==T?(D=(0,N.jsxs)(n.PressableScale,{ref:h,scale:.98,style:f,...O,accessibilityLabel:"Superfactory, go to your work",className:k,children:[y,T]}),l[15]=f,l[16]=O,l[17]=k,l[18]=T,l[19]=D):D=l[19],D}const D={code:"function drawerContentTsx1(e){const{runOnJS,setWidth,clamp,start}=this.__closure;return runOnJS(setWidth)({width:clamp(start+e.translationX)});}"},W={code:"function drawerContentTsx2(){const{runOnJS,setStart,width}=this.__closure;return runOnJS(setStart)(width);}"},v={code:"function drawerContentTsx3(){const{runOnJS,toggle}=this.__closure;return runOnJS(toggle)();}"};function C(){const e=(0,t.c)(20),[s,l]=(0,y.useSidebarWidth)(),{width:h,collapsed:p}=s,[,f]=(0,y.useSidebarFolding)(),[x,S]=(0,o.useState)(h),b=M;let w;e[0]!==p||e[1]!==f||e[2]!==l?(w=()=>{f(),l({collapsed:!p})},e[0]=p,e[1]=f,e[2]=l,e[3]=w):w=e[3];const j=w;let O,J;e[4]!==h?(O=(function({_worklet_7987315478172_init_data:e,runOnJS:t,setStart:n,width:s}){const o=()=>t(n)(s);return o.__closure={runOnJS:t,setStart:n,width:s},o.__workletHash=7987315478172,o.__initData=e,o})({_worklet_7987315478172_init_data:W,runOnJS:_.runOnJS,setStart:S,width:h}),e[4]=h,e[5]=O):O=e[5],e[6]!==l||e[7]!==x?(J=(function({_worklet_2973069033822_init_data:e,runOnJS:t,setWidth:n,clamp:s,start:o}){const l=e=>t(n)({width:s(o+e.translationX)});return l.__closure={runOnJS:t,setWidth:n,clamp:s,start:o},l.__workletHash=2973069033822,l.__initData=e,l})({_worklet_2973069033822_init_data:D,runOnJS:_.runOnJS,setWidth:l,clamp:b,start:x}),e[6]=l,e[7]=x,e[8]=J):J=e[8];const k=u.Gesture.Pan().enabled(!p).onBegin(O).onUpdate(J);let T;e[9]!==j?(T=(function({_worklet_17080538005393_init_data:e,runOnJS:t,toggle:n}){const s=()=>t(n)();return s.__closure={runOnJS:t,toggle:n},s.__workletHash=0xf88df667f91,s.__initData=e,s})({_worklet_17080538005393_init_data:v,runOnJS:_.runOnJS,toggle:j}),e[9]=j,e[10]=T):T=e[10];const C=u.Gesture.Tap().maxDistance(4).onEnd(T),I=(0,o.useRef)(null);(0,n.useTooltip)(I,p?"Expand the sidebar":"Click to collapse, drag to resize");const L=u.GestureDetector,A=u.Gesture.Race(k,C),R=p?"Expand the sidebar":"Collapse the sidebar; drag to resize it";let z,P,B;return e[11]!==p?(z={cursor:p?"e-resize":"col-resize"},e[11]=p,e[12]=z):z=e[12],e[13]!==R||e[14]!==z?(P=(0,N.jsx)(c.default,{ref:I,accessibilityRole:"button",accessibilityLabel:R,style:z,className:"absolute top-0 -right-1 bottom-0 w-2 hover:bg-line-strong/60"}),e[13]=R,e[14]=z,e[15]=P):P=e[15],e[16]!==L||e[17]!==A||e[18]!==P?(B=(0,N.jsx)(L,{gesture:A,children:P}),e[16]=L,e[17]=A,e[18]=P,e[19]=B):B=e[19],B}function M(e){return Math.round(Math.min(y.sidebarWidth.max,Math.max(y.sidebarWidth.min,e)))}},2179,[405,408,1463,224,308,952,945,1088,470,1278,2289,2180,2290,2253,2291,2292,2194,2181,2182,1916,2198,467]);
195
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.LeadButton=function(e){const c=(0,t.c)(30),{collapsed:y}=e,{lead:_,toggle:w,active:$,opensIn:C,href:I}=(0,h.useLeadInView)(),L=(0,p.useManagerAsking)(),N=(0,s.useHasKeyboard)(),P=(0,l.useRef)(null);(0,n.useTooltip)(P,_?`${$&&"panel"===C?"Close":"Chat with"} ${_.name}${N?` (${f.shortcuts.leadPanel.label})`:""}`:void 0);const A=(0,n.useColor)("on-accent");if(!_||!I)return null;let k;c[0]!==w?(k=()=>{n.haptics.selection(),w()},c[0]=w,c[1]=k):k=c[1];const z=k;let M;if(c[2]!==L||c[3]!==_){const{notices:e,asks:t}=L(_);M=(0,b.waitingLabel)(e+(t?1:0),t),c[2]=L,c[3]=_,c[4]=M}else M=c[4];const T=M,D=!!T;let R;c[5]!==$||c[6]!==I||c[7]!==C||c[8]!==z?(R="page"===C?{...(0,u.appLink)(I,$?j:z),"aria-current":$?"page":void 0}:{accessibilityRole:"button","aria-expanded":$,onPress:z},c[5]=$,c[6]=I,c[7]=C,c[8]=z,c[9]=R):R=c[9];const S=`Chat with ${_.name}${T?`, ${T}`:""}`,B=y?"size-10 justify-center self-center rounded-full":"h-9 gap-2 self-stretch rounded-lg px-2.5",F=$&&"bg-accent-fill-pressed";let H;c[10]!==B||c[11]!==F?(H=(0,n.cn)("flex-row items-center bg-accent-fill hover:bg-accent-fill-pressed active:bg-accent-fill-pressed",B,F),c[10]=B,c[11]=F,c[12]=H):H=c[12];const K=y?22:18;let O,V,q,E,G;c[13]!==A||c[14]!==K?(O=(0,x.jsx)(n.AppIcon,{size:K,tile:!1,color:A}),c[13]=A,c[14]=K,c[15]=O):O=c[15];c[16]!==D?(V=D?(0,x.jsx)(v,{}):null,c[16]=D,c[17]=V):V=c[17];c[18]!==V||c[19]!==O?(q=(0,x.jsxs)(o.default,{children:[O,V]}),c[18]=V,c[19]=O,c[20]=q):q=c[20];c[21]!==y||c[22]!==N?(E=y?null:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.Text,{variant:"subhead",tone:"onAccent",className:"flex-1 font-sans-medium",children:"Chat"}),N?(0,x.jsx)(o.default,{"aria-hidden":!0,className:"h-5 min-w-5 items-center justify-center rounded border border-on-accent/40 px-1",children:(0,x.jsx)(n.Text,{variant:"caption",tone:"onAccent",className:"text-[11px] leading-none opacity-80",children:f.shortcuts.leadPanel.label})}):null]}),c[21]=y,c[22]=N,c[23]=E):E=c[23];c[24]!==q||c[25]!==E||c[26]!==R||c[27]!==S||c[28]!==H?(G=(0,x.jsxs)(n.PressableScale,{ref:P,scale:.97,testID:"chat-button",...R,accessibilityLabel:S,className:H,children:[q,E]}),c[24]=q,c[25]=E,c[26]=R,c[27]=S,c[28]=H,c[29]=G):G=c[29];return G};var e,t=r(d[0]),n=r(d[1]),s=r(d[2]),l=r(d[3]),c=r(d[4]),o=(e=c)&&e.__esModule?e:{default:e},u=r(d[5]),f=r(d[6]),h=r(d[7]),p=r(d[8]),b=r(d[9]),x=r(d[10]);function j(){}function v(){const e=(0,t.c)(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,x.jsx)(o.default,{"aria-hidden":!0,testID:"chat-waiting-dot",className:"absolute -top-1 -right-1.5 size-2.5 rounded-full border-[1.5px] border-on-accent bg-status-input"}),e[0]=n):n=e[0],n}},2180,[405,408,1284,224,945,2253,2202,2129,2290,2293,467]);
196
+ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SidebarPlaces=function(e){const t=(0,s.c)(19),{collapsed:n}=e,{hrefOf:u}=(0,w.useWorkPlaces)(),x=(0,P.useTabBadges)().tasks?.count??0,v=(0,p.useManagers)().data?.managers??[];let k;t[0]!==v?(k=(0,j.leadAsks)(v),t[0]=v,t[1]=k):k=t[1];const M=k.length,B=L.sections[0],C=(0,b.useWaitingMachines)("owner"===(0,h.useAuth)().me?.role).length;let I,N,T;t[2]!==u?(I=u(B),t[2]=u,t[3]=I):I=t[3];t[4]!==n||t[5]!==x||t[6]!==M||t[7]!==I?(N=(0,$.jsx)(_,{href:I,base:B.href,label:"Tasks",icon:o.default,needsYou:x,questions:M,collapsed:n}),t[4]=n,t[5]=x,t[6]=M,t[7]=I,t[8]=N):N=t[8];t[9]!==n?(T=(0,$.jsx)(_,{href:"/projects",base:"/projects",label:"Projects",icon:l.default,collapsed:n}),t[9]=n,t[10]=T):T=t[10];const Y=C?`${C} ${1===C?"wants":"want"} to join`:void 0;let y,D;t[11]!==n||t[12]!==C||t[13]!==Y?(y=(0,$.jsx)(_,{href:"/machines",base:"/machines",label:"Machines",icon:c.default,needsYou:C,countLabel:Y,collapsed:n}),t[11]=n,t[12]=C,t[13]=Y,t[14]=y):y=t[14];t[15]!==N||t[16]!==T||t[17]!==y?(D=(0,$.jsxs)(f.default,{testID:"sidebar-places",className:"mb-1 gap-0.5 self-stretch",children:[N,T,y]}),t[15]=N,t[16]=T,t[17]=y,t[18]=D):D=t[18];return D};var s=r(d[0]),t=r(d[1]),n=r(d[2]),l=e(r(d[3])),o=e(r(d[4])),c=e(r(d[5])),u=r(d[6]),f=e(r(d[7])),h=r(d[8]),b=r(d[9]),p=r(d[10]),j=r(d[11]),x=r(d[12]),v=r(d[13]),w=r(d[14]),L=r(d[15]),k=r(d[16]),P=r(d[17]),$=r(d[18]);function _(e){const l=(0,s.c)(30),{href:o,base:c,label:h,icon:b,needsYou:p,questions:j,countLabel:w,collapsed:L}=e,P=void 0===p?0:p,_=void 0===j?0:j,M=(0,n.usePathname)().startsWith(c),B=(0,u.useRef)(null);let C;l[0]!==w||l[1]!==P||l[2]!==_?(C=P>0?w??(0,k.needsYouLabel)(P-_,_):void 0,l[0]=w,l[1]=P,l[2]=_,l[3]=C):C=l[3];const I=C;let N;l[4]!==L||l[5]!==I||l[6]!==h?(N=L?[h,I].filter(Boolean).join(" \xb7 "):I,l[4]=L,l[5]=I,l[6]=h,l[7]=N):N=l[7],(0,t.useTooltip)(B,N);const T=t.PressableScale,Y=o;let y,D;l[8]!==o?(y=()=>{t.haptics.selection(),n.router.navigate(o)},l[8]=o,l[9]=y):y=l[9],l[10]!==Y||l[11]!==y?(D=(0,v.appLink)(Y,y),l[10]=Y,l[11]=y,l[12]=D):D=l[12];const W=M?"page":void 0,q=I?`${h}, ${I}`:h,A=(0,t.cn)("h-10 flex-row items-center gap-3 self-stretch rounded-lg",L?"justify-center":"px-3",(0,x.rowLook)(M));let O,S,z;l[13]!==b?(O=(0,$.jsx)(t.Icon,{icon:b,size:19,color:"ink"}),l[13]=b,l[14]=O):O=l[14],l[15]!==L||l[16]!==h||l[17]!==P?(S=L&&P>0?(0,$.jsx)(t.CountBadge,{count:P,waits:!0,testID:`${h.toLowerCase()}-count`,className:"absolute -top-2 -right-3 border-2 border-sidebar px-1"}):null,l[15]=L,l[16]=h,l[17]=P,l[18]=S):S=l[18],l[19]!==O||l[20]!==S?(z=(0,$.jsxs)(f.default,{children:[O,S]}),l[19]=O,l[20]=S,l[21]=z):z=l[21];const F=L?null:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(t.Text,{variant:"subhead",className:(0,t.cn)("flex-1",M&&"font-sans-medium"),children:h}),P>0?(0,$.jsx)(t.CountBadge,{count:P,waits:!0,testID:`${h.toLowerCase()}-count`}):null]});let R;return l[22]!==T||l[23]!==q||l[24]!==A||l[25]!==z||l[26]!==F||l[27]!==D||l[28]!==W?(R=(0,$.jsxs)(T,{ref:B,scale:.98,...D,"aria-current":W,accessibilityLabel:q,className:A,children:[z,F]}),l[22]=T,l[23]=q,l[24]=A,l[25]=z,l[26]=F,l[27]=D,l[28]=W,l[29]=R):R=l[29],R}},2181,[405,408,1463,2294,2295,2296,224,945,1455,2297,2204,2298,2293,2253,2194,2197,2299,2300,467]);
197
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.SidebarSections=function(){const e=(0,s.c)(10),t=(0,_.useTabBadges)(),h=(0,c.useManagers)().data?.managers,f=(0,o.useNewAgent)(),S=h?.length;let j,M,N,v;e[0]!==f?(j={label:"New agent",onPress:()=>f.add()},e[0]=f,e[1]=j):j=e[1];e[2]===Symbol.for("react.memo_cache_sentinel")?(M=(0,b.jsx)(l.ManagersNav,{}),e[2]=M):M=e[2];e[3]!==t.agents||e[4]!==S||e[5]!==j?(N=(0,b.jsx)(u.SidebarSection,{name:"agents",title:"Agents",count:S,badge:t.agents,add:j,children:M}),e[3]=t.agents,e[4]=S,e[5]=j,e[6]=N):N=e[6];e[7]!==f.sheet||e[8]!==N?(v=(0,b.jsxs)(n.default,{className:"gap-1",children:[N,f.sheet]}),e[7]=f.sheet,e[8]=N,e[9]=v):v=e[9];return v};var e,s=r(d[0]),t=r(d[1]),n=(e=t)&&e.__esModule?e:{default:e},c=r(d[2]),l=r(d[3]),o=r(d[4]),u=r(d[5]),_=r(d[6]),b=r(d[7])},2182,[405,945,2204,2290,2301,2183,2300,467]);
198
+ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SidebarSection=function(e){const c=(0,s.c)(40),{name:b,title:y,count:S,badge:P,add:_,children:v}=e,[N,$]=h(),{folded:k}=N,w=!!k[b];let I;c[0]!==w||c[1]!==k||c[2]!==b||c[3]!==$?(I=()=>{t.haptics.selection(),$({folded:{...k,[b]:!w}})},c[0]=w,c[1]=k,c[2]=b,c[3]=$,c[4]=I):I=c[4];const L=I,R=(0,o.useRef)(null);let z;(0,t.useTooltip)(R,w?`Show ${y}`:`Hide ${y}`),c[5]!==y?(z=(0,x.jsx)(t.Text,{variant:"caption",tone:"tertiary",numberOfLines:1,className:"flex-shrink",children:y}),c[5]=y,c[6]=z):z=c[6];const T=z,D=`sidebar-section-${b}`,H=`section-header-${b}`,M=w?`Show ${y}`:`Hide ${y}`,O=!w,B=w?l.default:n.default;let C,q;c[7]!==B?(C=(0,x.jsx)(t.Icon,{icon:B,size:14,color:"ink-3"}),c[7]=B,c[8]=C):C=c[8];c[9]!==M||c[10]!==O||c[11]!==C||c[12]!==L?(q=(0,x.jsx)(t.PressableScale,{ref:R,scale:.94,accessibilityRole:"button",accessibilityLabel:M,"aria-expanded":O,onPress:L,className:"size-7 items-center justify-center rounded-md hover:bg-ink/[0.06]",children:C}),c[9]=M,c[10]=O,c[11]=C,c[12]=L,c[13]=q):q=c[13];const A=w?P:void 0;let E,F,G,J,K,Q,U;c[14]!==A||c[15]!==y?(E=(0,f.badgeLabel)(y,A),c[14]=A,c[15]=y,c[16]=E):E=c[16];c[17]!==S?(F=(0,x.jsx)(j,{count:S}),c[17]=S,c[18]=F):F=c[18];c[19]!==T||c[20]!==E||c[21]!==F||c[22]!==L?(G=(0,x.jsxs)(t.PressableScale,{scale:.98,accessibilityRole:"button",accessibilityLabel:E,onPress:L,className:"h-7 min-w-0 flex-row items-center gap-1.5 rounded-md px-1.5",children:[T,F]}),c[19]=T,c[20]=E,c[21]=F,c[22]=L,c[23]=G):G=c[23];c[24]!==P||c[25]!==w?(J=w&&P?(0,x.jsx)(t.CountBadge,{...P,testID:"section-badge"}):null,c[24]=P,c[25]=w,c[26]=J):J=c[26];c[27]===Symbol.for("react.memo_cache_sentinel")?(K=(0,x.jsx)(u.default,{className:"flex-1"}),c[27]=K):K=c[27];c[28]!==_?(Q=_?(0,x.jsx)(p,{label:_.label,onPress:_.onPress}):null,c[28]=_,c[29]=Q):Q=c[29];c[30]!==q||c[31]!==G||c[32]!==J||c[33]!==Q||c[34]!==H?(U=(0,x.jsxs)(u.default,{testID:H,className:"group mt-1 h-8 flex-row items-center gap-1 pr-1",children:[q,G,J,K,Q]}),c[30]=q,c[31]=G,c[32]=J,c[33]=Q,c[34]=H,c[35]=U):U=c[35];const V=w?null:v;let W;c[36]!==U||c[37]!==V||c[38]!==D?(W=(0,x.jsxs)(u.default,{testID:D,className:"gap-0.5",children:[U,V]}),c[36]=U,c[37]=V,c[38]=D,c[39]=W):W=c[39];return W};var s=r(d[0]),t=r(d[1]),n=e(r(d[2])),l=e(r(d[3])),c=e(r(d[4])),o=r(d[5]),u=e(r(d[6])),b=r(d[7]),f=r(d[8]),x=r(d[9]);const h=(0,b.deviceSetting)("superfactory.sidebar-sections",{folded:{}});function j(e){const n=(0,s.c)(2),{count:l}=e;let c;return n[0]!==l?(c=void 0===l?null:(0,x.jsx)(t.Text,{variant:"caption",tone:"tertiary","aria-hidden":!0,children:String(l)}),n[0]=l,n[1]=c):c=n[1],c}function p(e){const n=(0,s.c)(4),{label:l,onPress:u}=e,b=(0,o.useRef)(null);let f,h;return(0,t.useTooltip)(b,l),n[0]===Symbol.for("react.memo_cache_sentinel")?(f=(0,x.jsx)(t.Icon,{icon:c.default,size:15,color:"ink-3"}),n[0]=f):f=n[0],n[1]!==l||n[2]!==u?(h=(0,x.jsx)(t.PressableScale,{ref:b,scale:.94,accessibilityRole:"button",accessibilityLabel:l,onPress:u,className:"size-7 items-center justify-center rounded-md hover:bg-ink/[0.06]",children:f}),n[1]=l,n[2]=u,n[3]=h):h=n[3],h}},2183,[405,408,2254,1299,2256,224,945,2214,2299,467]);