reflex-agent 0.18.2 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (313) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +101 -102
  3. package/.next/app-path-routes-manifest.json +9 -9
  4. package/.next/build-manifest.json +5 -5
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/react-loadable-manifest.json +1 -1
  7. package/.next/required-server-files.json +2 -1
  8. package/.next/server/app/_not-found/page.js +1 -1
  9. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  10. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/agents/[agentId]/page.js +2 -2
  12. package/.next/server/app/agents/[agentId]/page.js.nft.json +1 -1
  13. package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/agents/[agentId]/respond/route.js +1 -1
  15. package/.next/server/app/api/agents/[agentId]/respond/route.js.nft.json +1 -1
  16. package/.next/server/app/api/agents/[agentId]/respond/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/images/[rootId]/[file]/route.js +1 -1
  18. package/.next/server/app/api/images/[rootId]/[file]/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/oauth/callback/route.js +2 -2
  20. package/.next/server/app/api/oauth/callback/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/oauth/start/route.js +1 -1
  22. package/.next/server/app/api/oauth/start/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/roots/[id]/attachments/route.js +0 -0
  24. package/.next/server/app/api/roots/[id]/attachments/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route.js +1 -1
  26. package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route.js.nft.json +1 -1
  27. package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route.js +1 -1
  29. package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route.js.nft.json +1 -1
  30. package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route.js +2 -2
  32. package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route.js.nft.json +1 -1
  33. package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/roots/[id]/dashboard/route.js +1 -1
  35. package/.next/server/app/api/roots/[id]/dashboard/route.js.nft.json +1 -1
  36. package/.next/server/app/api/roots/[id]/dashboard/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/roots/[id]/suggestions/route.js +1 -1
  38. package/.next/server/app/api/roots/[id]/suggestions/route.js.nft.json +1 -1
  39. package/.next/server/app/api/roots/[id]/suggestions/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/utilities/[scope]/[id]/bundle.js/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/utilities/[scope]/[id]/host/route.js +1 -1
  42. package/.next/server/app/api/utilities/[scope]/[id]/host/route.js.nft.json +1 -1
  43. package/.next/server/app/api/utilities/[scope]/[id]/host/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/utilities/[scope]/[id]/host-api.mjs/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/utilities/[scope]/[id]/host-ui.mjs/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/utilities/[scope]/[id]/iframe/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/utilities/[scope]/[id]/style.css/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/utilities/install-archive/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/audit/page.js +2 -2
  50. package/.next/server/app/audit/page.js.nft.json +1 -1
  51. package/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  52. package/.next/server/app/dispatcher/page.js +2 -2
  53. package/.next/server/app/dispatcher/page.js.nft.json +1 -1
  54. package/.next/server/app/dispatcher/page_client-reference-manifest.js +1 -1
  55. package/.next/server/app/onboarding/page.js +3 -3
  56. package/.next/server/app/onboarding/page.js.nft.json +1 -1
  57. package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  58. package/.next/server/app/page.js +2 -2
  59. package/.next/server/app/page.js.nft.json +1 -1
  60. package/.next/server/app/page_client-reference-manifest.js +1 -1
  61. package/.next/server/app/roots/[id]/chat/[topicId]/page.js +2 -2
  62. package/.next/server/app/roots/[id]/chat/[topicId]/page.js.nft.json +1 -1
  63. package/.next/server/app/roots/[id]/chat/[topicId]/page_client-reference-manifest.js +1 -1
  64. package/.next/server/app/roots/[id]/kb/[...slug]/page.js +2 -2
  65. package/.next/server/app/roots/[id]/kb/[...slug]/page.js.nft.json +1 -1
  66. package/.next/server/app/roots/[id]/kb/[...slug]/page_client-reference-manifest.js +1 -1
  67. package/.next/server/app/roots/[id]/memory/page.js +2 -2
  68. package/.next/server/app/roots/[id]/memory/page.js.nft.json +1 -1
  69. package/.next/server/app/roots/[id]/memory/page_client-reference-manifest.js +1 -1
  70. package/.next/server/app/roots/[id]/page.js +4 -4
  71. package/.next/server/app/roots/[id]/page.js.nft.json +1 -1
  72. package/.next/server/app/roots/[id]/page_client-reference-manifest.js +1 -1
  73. package/.next/server/app/roots/[id]/workflows/[wfId]/page.js +2 -2
  74. package/.next/server/app/roots/[id]/workflows/[wfId]/page.js.nft.json +1 -1
  75. package/.next/server/app/roots/[id]/workflows/[wfId]/page_client-reference-manifest.js +1 -1
  76. package/.next/server/app/roots/[id]/workflows/page.js +2 -2
  77. package/.next/server/app/roots/[id]/workflows/page.js.nft.json +1 -1
  78. package/.next/server/app/roots/[id]/workflows/page_client-reference-manifest.js +1 -1
  79. package/.next/server/app/roots/new/page.js +4 -4
  80. package/.next/server/app/roots/new/page.js.nft.json +1 -1
  81. package/.next/server/app/roots/new/page_client-reference-manifest.js +1 -1
  82. package/.next/server/app/settings/page.js +5 -5
  83. package/.next/server/app/settings/page.js.nft.json +1 -1
  84. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  85. package/.next/server/app/share/[id]/file/page.js +2 -2
  86. package/.next/server/app/share/[id]/file/page.js.nft.json +1 -1
  87. package/.next/server/app/share/[id]/file/page_client-reference-manifest.js +1 -1
  88. package/.next/server/app/share/[id]/page.js +2 -2
  89. package/.next/server/app/share/[id]/page.js.nft.json +1 -1
  90. package/.next/server/app/share/[id]/page_client-reference-manifest.js +1 -1
  91. package/.next/server/app/utilities/[scope]/[id]/page.js +2 -2
  92. package/.next/server/app/utilities/[scope]/[id]/page.js.nft.json +1 -1
  93. package/.next/server/app/utilities/[scope]/[id]/page_client-reference-manifest.js +1 -1
  94. package/.next/server/app/utilities/page.js +2 -2
  95. package/.next/server/app/utilities/page.js.nft.json +1 -1
  96. package/.next/server/app/utilities/page_client-reference-manifest.js +1 -1
  97. package/.next/server/app-paths-manifest.json +9 -9
  98. package/.next/server/chunks/{6435.js → 1088.js} +1 -1
  99. package/.next/server/chunks/1105.js +1 -1
  100. package/.next/server/chunks/1179.js +1 -0
  101. package/.next/server/chunks/1223.js +1 -1
  102. package/.next/server/chunks/1244.js +1 -1
  103. package/.next/server/chunks/1281.js +80 -0
  104. package/.next/server/chunks/1336.js +252 -0
  105. package/.next/server/chunks/1353.js +51 -0
  106. package/.next/server/chunks/1431.js +1 -0
  107. package/.next/server/chunks/146.js +2 -0
  108. package/.next/server/chunks/1491.js +79 -0
  109. package/.next/server/chunks/1496.js +148 -0
  110. package/.next/server/chunks/{9631.js → 1589.js} +2 -2
  111. package/.next/server/chunks/1623.js +1 -0
  112. package/.next/server/chunks/1862.js +77 -0
  113. package/.next/server/chunks/1888.js +1 -1
  114. package/.next/server/chunks/1908.js +1 -0
  115. package/.next/server/chunks/192.js +1 -0
  116. package/.next/server/chunks/2069.js +1 -0
  117. package/.next/server/chunks/2087.js +24 -0
  118. package/.next/server/chunks/209.js +1 -0
  119. package/.next/server/chunks/2115.js +77 -0
  120. package/.next/server/chunks/2232.js +80 -0
  121. package/.next/server/chunks/{4460.js → 2262.js} +2 -2
  122. package/.next/server/chunks/2280.js +1 -0
  123. package/.next/server/chunks/2433.js +1 -1
  124. package/.next/server/chunks/2485.js +3 -8
  125. package/.next/server/chunks/2503.js +1 -1
  126. package/.next/server/chunks/2539.js +93 -0
  127. package/.next/server/chunks/2764.js +80 -0
  128. package/.next/server/chunks/285.js +24 -75
  129. package/.next/server/chunks/2888.js +7 -0
  130. package/.next/server/chunks/302.js +1 -0
  131. package/.next/server/chunks/3029.js +36 -0
  132. package/.next/server/chunks/3110.js +0 -0
  133. package/.next/server/chunks/3117.js +1 -0
  134. package/.next/server/chunks/3258.js +23 -0
  135. package/.next/server/chunks/331.js +1 -0
  136. package/.next/server/chunks/3332.js +1 -1
  137. package/.next/server/chunks/{4251.js → 3474.js} +24 -25
  138. package/.next/server/chunks/3552.js +43 -0
  139. package/.next/server/chunks/3583.js +104 -0
  140. package/.next/server/chunks/3631.js +1 -0
  141. package/.next/server/chunks/3633.js +1 -0
  142. package/.next/server/chunks/383.js +1 -80
  143. package/.next/server/chunks/3834.js +1 -1
  144. package/.next/server/chunks/3953.js +1 -0
  145. package/.next/server/chunks/3992.js +1 -0
  146. package/.next/server/chunks/4013.js +1 -0
  147. package/.next/server/chunks/4031.js +3 -3
  148. package/.next/server/chunks/4119.js +1 -0
  149. package/.next/server/chunks/4230.js +12 -0
  150. package/.next/server/chunks/4250.js +1 -0
  151. package/.next/server/chunks/4294.js +1 -0
  152. package/.next/server/chunks/4312.js +1 -0
  153. package/.next/server/chunks/4342.js +1 -0
  154. package/.next/server/chunks/4360.js +1 -0
  155. package/.next/server/chunks/449.js +226 -0
  156. package/.next/server/chunks/4578.js +0 -0
  157. package/.next/server/chunks/4585.js +1 -0
  158. package/.next/server/chunks/4611.js +1 -1
  159. package/.next/server/chunks/4639.js +1 -0
  160. package/.next/server/chunks/4682.js +1 -0
  161. package/.next/server/chunks/4788.js +153 -0
  162. package/.next/server/chunks/4812.js +2 -2
  163. package/.next/server/chunks/4925.js +1 -1
  164. package/.next/server/chunks/4952.js +1 -0
  165. package/.next/server/chunks/4969.js +4 -1
  166. package/.next/server/chunks/4989.js +801 -0
  167. package/.next/server/chunks/5211.js +64 -0
  168. package/.next/server/chunks/5243.js +1 -1
  169. package/.next/server/chunks/5308.js +1 -0
  170. package/.next/server/chunks/5461.js +1 -0
  171. package/.next/server/chunks/5549.js +1 -0
  172. package/.next/server/chunks/5719.js +34 -0
  173. package/.next/server/chunks/5810.js +12 -0
  174. package/.next/server/chunks/5922.js +1 -0
  175. package/.next/server/chunks/6142.js +1 -1
  176. package/.next/server/chunks/6216.js +1 -1
  177. package/.next/server/chunks/6318.js +9 -0
  178. package/.next/server/chunks/6483.js +1 -1
  179. package/.next/server/chunks/6509.js +1 -0
  180. package/.next/server/chunks/6571.js +166 -0
  181. package/.next/server/chunks/660.js +1 -0
  182. package/.next/server/chunks/6692.js +1 -0
  183. package/.next/server/chunks/6730.js +1 -1
  184. package/.next/server/chunks/6852.js +1 -0
  185. package/.next/server/chunks/6970.js +1 -0
  186. package/.next/server/chunks/7007.js +1 -0
  187. package/.next/server/chunks/7188.js +1 -1
  188. package/.next/server/chunks/7220.js +1 -1
  189. package/.next/server/chunks/7228.js +1 -0
  190. package/.next/server/chunks/7244.js +1 -0
  191. package/.next/server/chunks/7373.js +90 -0
  192. package/.next/server/chunks/7430.js +1 -1
  193. package/.next/server/chunks/7523.js +1 -0
  194. package/.next/server/chunks/7576.js +1 -0
  195. package/.next/server/chunks/7742.js +7 -0
  196. package/.next/server/chunks/7811.js +215 -0
  197. package/.next/server/chunks/7885.js +1 -0
  198. package/.next/server/chunks/8032.js +3 -0
  199. package/.next/server/chunks/8095.js +24 -0
  200. package/.next/server/chunks/8129.js +5 -0
  201. package/.next/server/chunks/8294.js +1 -0
  202. package/.next/server/chunks/832.js +1 -0
  203. package/.next/server/chunks/8464.js +180 -0
  204. package/.next/server/chunks/8511.js +0 -0
  205. package/.next/server/chunks/8514.js +1 -1
  206. package/.next/server/chunks/8583.js +4 -0
  207. package/.next/server/chunks/8609.js +55 -0
  208. package/.next/server/chunks/8711.js +1 -0
  209. package/.next/server/chunks/8714.js +1 -0
  210. package/.next/server/chunks/8730.js +1 -0
  211. package/.next/server/chunks/8868.js +1 -0
  212. package/.next/server/chunks/9048.js +1 -0
  213. package/.next/server/chunks/9058.js +1 -0
  214. package/.next/server/chunks/9062.js +1 -0
  215. package/.next/server/chunks/9094.js +1 -0
  216. package/.next/server/chunks/9098.js +1 -1
  217. package/.next/server/chunks/9099.js +1 -0
  218. package/.next/server/chunks/9171.js +287 -0
  219. package/.next/server/chunks/9181.js +1 -0
  220. package/.next/server/chunks/9293.js +1 -1
  221. package/.next/server/chunks/9478.js +1 -0
  222. package/.next/server/chunks/9494.js +141 -0
  223. package/.next/server/chunks/952.js +1 -0
  224. package/.next/server/chunks/9600.js +1 -0
  225. package/.next/server/chunks/9607.js +29 -0
  226. package/.next/server/chunks/9653.js +115 -0
  227. package/.next/server/chunks/9784.js +1 -0
  228. package/.next/server/chunks/9798.js +1 -0
  229. package/.next/server/chunks/9990.js +1 -0
  230. package/.next/server/edge-instrumentation.js +2 -0
  231. package/.next/server/edge-instrumentation.js.map +1 -0
  232. package/.next/server/functions-config-manifest.json +3 -3
  233. package/.next/server/instrumentation.js +1 -0
  234. package/.next/server/instrumentation.js.nft.json +1 -0
  235. package/.next/server/middleware-build-manifest.js +1 -1
  236. package/.next/server/middleware-manifest.json +6 -5
  237. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  238. package/.next/server/pages/500.html +1 -1
  239. package/.next/server/pages/_error.js +3 -3
  240. package/.next/server/server-reference-manifest.js +1 -1
  241. package/.next/server/server-reference-manifest.json +1 -1
  242. package/.next/static/chunks/3363-f417b308a8cd156d.js +1 -0
  243. package/.next/static/chunks/3686-0107521d2c14950c.js +1 -0
  244. package/.next/static/chunks/3695-3576767108de7f38.js +1 -0
  245. package/.next/static/chunks/4108.19abaa6d618295ed.js +1 -0
  246. package/.next/static/chunks/5933-4013a6dab4565b5e.js +1 -0
  247. package/.next/static/chunks/7425-9684ea815b4b1731.js +1 -0
  248. package/.next/static/chunks/7552-def8a17828891c8c.js +1 -0
  249. package/.next/static/chunks/8776-2df966dd98c68fd7.js +1 -0
  250. package/.next/static/chunks/app/layout-baad68d32b917b8f.js +1 -0
  251. package/.next/static/chunks/app/onboarding/page-b1b1e6a4467ed781.js +1 -0
  252. package/.next/static/chunks/app/page-556a2139313c3c71.js +1 -0
  253. package/.next/static/chunks/app/roots/[id]/chat/[topicId]/page-52223811258d07b2.js +1 -0
  254. package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-0df769f27549cd16.js +1 -0
  255. package/.next/static/chunks/app/roots/[id]/memory/{page-4edc11023d8a13fd.js → page-1f6bc3a624b141a5.js} +1 -1
  256. package/.next/static/chunks/app/roots/[id]/page-17493991b2d391b3.js +1 -0
  257. package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-a21fe3541418a80a.js +1 -0
  258. package/.next/static/chunks/app/roots/[id]/workflows/page-0952e5fb53d53c3e.js +1 -0
  259. package/.next/static/chunks/app/roots/new/{page-98d64261cc2ae2a1.js → page-4f571184c1856103.js} +1 -1
  260. package/.next/static/chunks/app/settings/page-8c0ad1c1856da988.js +1 -0
  261. package/.next/static/chunks/app/share/[id]/page-b27a0bc7b9c6cda9.js +1 -0
  262. package/.next/static/chunks/app/utilities/[scope]/[id]/page-0fe4c377098064d5.js +1 -0
  263. package/.next/static/chunks/app/utilities/page-445933dcd5a500ae.js +1 -0
  264. package/.next/static/chunks/{webpack-dbfe1e5d0f7f7a98.js → webpack-88066a85eb2d605f.js} +1 -1
  265. package/.next/trace +116 -90
  266. package/dist/lib/reflex/ids.js +66 -0
  267. package/dist/lib/reflex/ids.js.map +1 -0
  268. package/dist/lib/reflex/paths.js +26 -0
  269. package/dist/lib/reflex/paths.js.map +1 -1
  270. package/dist/lib/reflex/store/json-store.js +50 -0
  271. package/dist/lib/reflex/store/json-store.js.map +1 -0
  272. package/package.json +10 -6
  273. package/.next/server/chunks/133.js +0 -1
  274. package/.next/server/chunks/1358.js +0 -1
  275. package/.next/server/chunks/2389.js +0 -4
  276. package/.next/server/chunks/2787.js +0 -1
  277. package/.next/server/chunks/3240.js +0 -1
  278. package/.next/server/chunks/3295.js +0 -1
  279. package/.next/server/chunks/4842.js +0 -1
  280. package/.next/server/chunks/5319.js +0 -1
  281. package/.next/server/chunks/5543.js +0 -1
  282. package/.next/server/chunks/569.js +0 -1
  283. package/.next/server/chunks/6356.js +0 -3
  284. package/.next/server/chunks/7229.js +0 -2
  285. package/.next/server/chunks/7607.js +0 -1
  286. package/.next/server/chunks/8040.js +0 -1
  287. package/.next/server/chunks/8124.js +0 -1
  288. package/.next/server/chunks/8576.js +0 -7
  289. package/.next/server/chunks/9809.js +0 -1
  290. package/.next/server/chunks/9835.js +0 -1
  291. package/.next/static/chunks/2885-3b6efe9070ae7699.js +0 -1
  292. package/.next/static/chunks/334-e9ffb96d6720ee5b.js +0 -1
  293. package/.next/static/chunks/4108.a04c1e0b768f6392.js +0 -1
  294. package/.next/static/chunks/5371-f2503fe0dffea57d.js +0 -1
  295. package/.next/static/chunks/5744-eccd279a734c778c.js +0 -1
  296. package/.next/static/chunks/6568-e4d2de23d9f8d347.js +0 -1
  297. package/.next/static/chunks/6642-02be14d0b5ca62b7.js +0 -1
  298. package/.next/static/chunks/8566-5d4c89b722d9cee1.js +0 -1
  299. package/.next/static/chunks/8775-890699c74c28df61.js +0 -1
  300. package/.next/static/chunks/app/layout-48a6fb46c228b814.js +0 -1
  301. package/.next/static/chunks/app/onboarding/page-06103f281ff3f063.js +0 -1
  302. package/.next/static/chunks/app/page-eed31ba1b952cf24.js +0 -1
  303. package/.next/static/chunks/app/roots/[id]/chat/[topicId]/page-5fc17c5819406917.js +0 -1
  304. package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-a52b2005a7e538ca.js +0 -1
  305. package/.next/static/chunks/app/roots/[id]/page-0f0d498f4b4bd7bf.js +0 -1
  306. package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-f93d6b1bb29e79f0.js +0 -1
  307. package/.next/static/chunks/app/roots/[id]/workflows/page-562913d54bcd08d5.js +0 -1
  308. package/.next/static/chunks/app/settings/page-7a4d8a407fbe5ed8.js +0 -1
  309. package/.next/static/chunks/app/share/[id]/page-a0540dba09771e84.js +0 -1
  310. package/.next/static/chunks/app/utilities/[scope]/[id]/page-2cee9be029f211c6.js +0 -1
  311. package/.next/static/chunks/app/utilities/page-197156f16167514e.js +0 -1
  312. /package/.next/static/{kKiRbrTiD77WXduAvKNfN → EXoiX_YvMRCB6oNXqJnaz}/_buildManifest.js +0 -0
  313. /package/.next/static/{kKiRbrTiD77WXduAvKNfN → EXoiX_YvMRCB6oNXqJnaz}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4662],{3661:(e,t,a)=>{"use strict";a.d(t,{S:()=>r});var s=a(7911);let r=(0,s.createServerReference)("4079689749532425b5ee4ba988777fe1b0539b2237",s.callServer,void 0,s.findSourceMapURL,"saveOAuthClientAction")},4959:(e,t,a)=>{"use strict";a.d(t,{BT:()=>o,Wu:()=>c,ZB:()=>l,Zp:()=>n,aR:()=>i,wL:()=>d});var s=a(4624);a(99356);var r=a(13506);function n(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card",className:(0,r.cn)("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",t),...a})}function i(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...a})}function l(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("leading-none font-semibold",t),...a})}function o(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",t),...a})}function c(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-6",t),...a})}function d(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center px-6 [.border-t]:pt-6",t),...a})}},7e3:(e,t,a)=>{"use strict";a.d(t,{SettingsForm:()=>e3});var s=a(4624),r=a(99356),n=a(69285),i=a(49411),l=a(3747),o=a(3239),c=a(65714),d=a(58726),m=a(52584),u=a(56221),x=a(85253),h=a(4959),p=a(15523),g=a(78825),f=a(32165),v=a(17280),b=a(13506);function j(e){let{className:t,defaultValue:a,value:n,min:i=0,max:l=100,...o}=e,c=r.useMemo(()=>Array.isArray(n)?n:Array.isArray(a)?a:[i,l],[n,a,i,l]);return(0,s.jsxs)(v.Root,{"data-slot":"slider",defaultValue:a,value:n,min:i,max:l,className:(0,b.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",t),...o,children:[(0,s.jsx)(v.Track,{"data-slot":"slider-track",className:(0,b.cn)("relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,s.jsx)(v.Range,{"data-slot":"slider-range",className:(0,b.cn)("absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:c.length},(e,t)=>(0,s.jsx)(v.Thumb,{"data-slot":"slider-thumb",className:"block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},t))]})}var N=a(28310),y=a(22841),w=a(22281);let k=["analyze","chat","rag","embed","quick"],S={analyze:{title:"Analyze",help:"Builds and refreshes the knowledge base. Agentic — runs through Claude Code or Codex with file-write tools."},chat:{title:"Chat",help:"Interactive chat over a folder's KB. Agentic — uses the same harness as analyze by default."},rag:{title:"RAG",help:"Answer questions over the KB without an agent loop. Single-shot LLM call against indexed content."},embed:{title:"Embeddings",help:"Vectorize MD files for retrieval. Ollama runs embedding models locally (e.g. nomic-embed-text)."},quick:{title:"Quick actions",help:"Tiny one-shot calls — generates topic titles, summary snippets, labels. Pick a fast/cheap model."}},R=w.Ik({"claude-code":w.Ik({enabled:w.zM().default(!0)}),codex:w.Ik({enabled:w.zM().default(!0)}),ollama:w.Ik({enabled:w.zM().default(!0),baseUrl:w.Yj().url().default("http://localhost:11434")})}),A=w.Ik({harness:w.k5(["claude-code","codex","ollama"]),model:w.Yj().min(1),allowedTools:w.YO(w.Yj()).default([])}),C=["en","ru"],T=["auto","jpeg","webp","original"],z=w.Ik({enabled:w.zM().default(!0),maxDimension:w.ai().int().min(256).max(8192).default(2e3),quality:w.ai().int().min(40).max(100).default(85),format:w.k5(T).default("auto")});w.Ik({version:w.eu(1).default(1),language:w.Yj().min(1).default("en"),onboardedAt:w.Yj().optional(),userName:w.Yj().default(""),timezone:w.Yj().default(""),uiMode:w.k5(["simple","advanced"]).default("simple"),sharing:w.Ik({requireScopedReads:w.zM().default(!1)}).default({requireScopedReads:!1}),imageProcessing:z.default({enabled:!0,maxDimension:2e3,quality:85,format:"auto"}),harnesses:R.default({"claude-code":{enabled:!0},codex:{enabled:!0},ollama:{enabled:!0,baseUrl:"http://localhost:11434"}}),assignments:w.Ik({analyze:A,chat:A,rag:A,embed:A,quick:A}).default({analyze:{harness:"claude-code",model:"claude-opus-4-7",allowedTools:["Read","Write","Edit","LS","Glob","Grep","WebSearch","WebFetch"]},chat:{harness:"claude-code",model:"claude-sonnet-4-6",allowedTools:["Read","LS","Glob","Grep","WebSearch","WebFetch"]},rag:{harness:"ollama",model:"llama3.1:8b",allowedTools:[]},embed:{harness:"ollama",model:"nomic-embed-text",allowedTools:[]},quick:{harness:"claude-code",model:"claude-haiku-4-5",allowedTools:[]}}),mapServices:w.Ik({enabled:w.YO(w.Yj()).default(["google","yandex","apple","osm"])}).default({enabled:["google","yandex","apple","osm"]}),ngrok:w.Ik({authtoken:w.Yj().default(""),apiKey:w.Yj().default(""),domain:w.Yj().default(""),port:w.ai().int().min(1).max(65535).default(3210)}).default({authtoken:"",apiKey:"",domain:"",port:3210}),notify:w.Ik({telegram:w.Ik({enabled:w.zM().default(!1),botToken:w.Yj().default(""),chatId:w.Yj().default(""),rootId:w.Yj().default("")}).default({enabled:!1,botToken:"",chatId:"",rootId:""})}).default({telegram:{enabled:!1,botToken:"",chatId:"",rootId:""}})}).parse({});var M=a(8096),L=a(13704),U=a(57118),P=a(71651),F=a(49881),E=a(7911);let I=(0,E.createServerReference)("003253b886c365b7688af48529ade07711bce8ecce",E.callServer,void 0,E.findSourceMapURL,"listTemplatesAction"),J=(0,E.createServerReference)("4097156f1abff98a46a4dbc19353511b50b03c90f5",E.callServer,void 0,E.findSourceMapURL,"loadTemplateAction"),_=(0,E.createServerReference)("40b9ae946e0d9f6195eee88b314df579c509fe4553",E.callServer,void 0,E.findSourceMapURL,"mergeTemplateAction"),W=(0,E.createServerReference)("60804dc23292af2a960d5f23c18382b90d6d97a66c",E.callServer,void 0,E.findSourceMapURL,"saveTemplateAction"),B=(0,E.createServerReference)("40731f7cd6fdfe759cdac0d3a7ddcc65d5531bfeed",E.callServer,void 0,E.findSourceMapURL,"resetTemplateAction"),O={body:"",defaultBody:"",missingSections:[],path:"",loading:!0,saving:!1,resetting:!1,merging:!1,variables:[]};function $(){let e=(0,i.c)("settings"),[t,a]=(0,r.useState)([]),[n,l]=(0,r.useState)(null),[d,m]=(0,r.useState)({}),[,p]=(0,r.useTransition)(),[,g]=(0,r.useTransition)();(0,r.useEffect)(()=>{(async()=>{let e=await I();a(e),e[0]&&l(e[0].name);let t={};for(let a of e)t[a.name]={...O};for(let a of(m(t),e))f(a.name)})()},[]);let f=async e=>{m(t=>{var a;return{...t,[e]:{...null!=(a=t[e])?a:O,loading:!0}}});let t=await J(e);if(!t.ok){u.oR.error("Load failed: ".concat(t.error)),m(t=>{var a;return{...t,[e]:{...null!=(a=t[e])?a:O,loading:!1}}});return}m(a=>({...a,[e]:{body:t.body,defaultBody:t.defaultBody,missingSections:t.missingSections,path:t.path,loading:!1,saving:!1,resetting:!1,merging:!1,variables:t.variables}}))};return 0===t.length?(0,s.jsx)(h.Zp,{children:(0,s.jsxs)(h.Wu,{className:"py-6 text-sm text-muted-foreground",children:[(0,s.jsx)(o.A,{className:"inline h-4 w-4 animate-spin mr-2"})," Loading templates…"]})}):(0,s.jsxs)(F.tU,{value:null!=n?n:t[0].name,onValueChange:l,children:[(0,s.jsx)(F.j7,{children:t.map(e=>(0,s.jsx)(F.Xi,{value:e.name,children:e.label},e.name))}),t.map(t=>{var a;let r=null!=(a=d[t.name])?a:O;return(0,s.jsx)(F.av,{value:t.name,className:"mt-3",children:(0,s.jsx)(h.Zp,{children:(0,s.jsxs)(h.Wu,{className:"pt-6 space-y-3",children:[r.missingSections.length>0&&(0,s.jsxs)("div",{className:"rounded border border-amber-300 bg-amber-50 p-3 text-xs text-amber-900 flex items-start gap-2",children:[(0,s.jsx)(M.A,{className:"h-4 w-4 mt-0.5 shrink-0"}),(0,s.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,s.jsx)("div",{className:"font-medium",children:e("promptTemplates.templateUpdated",{count:r.missingSections.length})}),(0,s.jsxs)("div",{className:"text-amber-800/80",children:[e("promptTemplates.missingFromYours")," ",r.missingSections.map((e,t)=>(0,s.jsxs)("span",{children:[(0,s.jsxs)("code",{className:"font-mono",children:["## ",e]}),t<r.missingSections.length-1?", ":""]},e))]})]}),(0,s.jsxs)(x.$,{size:"sm",variant:"outline",onClick:()=>{var a;d[a=t.name]&&(m(e=>{var t;return{...e,[a]:{...null!=(t=e[a])?t:O,merging:!0}}}),(async()=>{let t=await _(a);if(!t.ok){u.oR.error("Merge failed: ".concat(t.error)),m(e=>{var t;return{...e,[a]:{...null!=(t=e[a])?t:O,merging:!1}}});return}u.oR.success(0===t.appended.length?e("promptTemplates.merged"):e("promptTemplates.mergedAppended",{count:t.appended.length,names:t.appended.join(", ")})),m(e=>{var s;return{...e,[a]:{...null!=(s=e[a])?s:O,body:t.body,missingSections:[],merging:!1}}})})())},disabled:r.merging||r.saving||r.resetting,className:"border-amber-400 hover:bg-amber-100 shrink-0",children:[r.merging?(0,s.jsx)(o.A,{className:"mr-1 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(L.A,{className:"mr-1 h-3.5 w-3.5"}),e("promptTemplates.addMissing")]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Variables:"}),r.variables.map(e=>(0,s.jsx)(N.E,{variant:"outline",className:"font-mono",children:"{{".concat(e,"}}")},e))]}),(0,s.jsx)(P.T,{value:r.body,onChange:e=>{var a,s;return a=t.name,s=e.target.value,void m(e=>{var t;let r=null!=(t=e[a])?t:O;return{...e,[a]:{...r,body:s}}})},rows:18,className:"font-mono text-xs",disabled:r.loading,placeholder:r.loading?"loading…":""}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground font-mono truncate",children:r.path}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)(x.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{var e;return e=t.name,void(confirm("Reset ".concat(e,".md to the default template?"))&&g(async()=>{var t;let a=null!=(t=d[e])?t:O;m(t=>({...t,[e]:{...a,resetting:!0}}));let s=await B(e);m(t=>{var a;let r=null!=(a=t[e])?a:O;return{...t,[e]:{...r,resetting:!1,...s.ok&&s.body?{body:s.body}:{}}}}),s.ok?u.oR.success("".concat(e,".md reset")):u.oR.error("Reset failed: ".concat(s.error))}))},disabled:r.resetting||r.saving,children:[(0,s.jsx)(U.A,{className:"mr-1 h-4 w-4 ".concat(r.resetting?"animate-spin":"")}),"Reset to default"]}),(0,s.jsx)(x.$,{type:"button",size:"sm",onClick:()=>{var e;return e=t.name,void p(async()=>{let t=d[e];if(!t)return;m(a=>({...a,[e]:{...t,saving:!0}}));let a=await W(e,t.body);m(t=>{var a;let s=null!=(a=t[e])?a:O;return{...t,[e]:{...s,saving:!1}}}),a.ok?u.oR.success("".concat(e,".md saved")):u.oR.error("Save failed: ".concat(a.error))})},disabled:r.saving||r.loading,children:r.saving?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.A,{className:"mr-1 h-4 w-4 animate-spin"})," ","Saving…"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.A,{className:"mr-1 h-4 w-4"})," Save template"]})})]})]})]})})},t.name)})]})}var D=a(487),q=a(35687),H=a(46972),K=a(41379),Z=a(13561);let Y=(0,E.createServerReference)("4093097ddcac5a6595fdc23afd30914f1ebe2f1e28",E.callServer,void 0,E.findSourceMapURL,"startMcpSetupAction"),G=(0,E.createServerReference)("00321bece9c2ca20c9a553a7cadd89dab7e92ac4a9",E.callServer,void 0,E.findSourceMapURL,"listMcpServersAction"),V=(0,E.createServerReference)("40649a83c901af0a5d2832947f3815d5b321b92796",E.callServer,void 0,E.findSourceMapURL,"removeMcpServerAction"),X=(0,E.createServerReference)("400dbbb06c9d1b12ed3bdaee14d1d3abe742659df8",E.callServer,void 0,E.findSourceMapURL,"testMcpServerAction"),Q=(0,E.createServerReference)("40f80e6fa1c72fd60ad2122afcea9415a2375dec34",E.callServer,void 0,E.findSourceMapURL,"addMcpServerAction");function ee(){let e=(0,i.c)("settings"),[t,a]=(0,r.useState)([]),[l,c]=(0,r.useTransition)(),[d,m]=(0,r.useState)(!1),[g,f]=(0,r.useState)(""),[v,b]=(0,r.useTransition)(),j=(0,n.useRouter)(),y=()=>{let t=g.trim();if(!t)return void u.oR.error(e("mcpServers.wizardDescribeError"));b(async()=>{let a=await Y(t);if(!a.ok)return void u.oR.error(a.error);u.oR.success(e("mcpServers.wizardOpenedToast")),f(""),j.push("/roots/".concat(a.rootId,"/chat/").concat(a.topicId))})},w=()=>{c(async()=>{let e=await G();if(!e.ok)return void u.oR.error(e.error);a(e.servers)})};(0,r.useEffect)(()=>{w()},[]);let k=async t=>{if(!confirm(e("mcpServers.removeConfirm",{id:t})))return;let a=await V(t);if(!a.ok){var s;u.oR.error(null!=(s=a.error)?s:"fail");return}u.oR.success(e("mcpServers.removedToast")),w()};return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)(h.Zp,{className:"reflex-gradient p-[2px]",children:(0,s.jsxs)("div",{className:"rounded-[7px] bg-background/95 p-4 space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,s.jsx)(D.A,{className:"h-4 w-4"}),(0,s.jsx)("span",{children:e("mcpServers.wizardTitle")})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:e("mcpServers.wizardDescription")}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.p,{value:g,onChange:e=>f(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),y())},placeholder:e("mcpServers.wizardPlaceholder"),disabled:v,className:"flex-1"}),(0,s.jsxs)(x.$,{type:"button",onClick:y,disabled:v||!g.trim(),className:"gap-2",children:[v?(0,s.jsx)(o.A,{className:"h-4 w-4 animate-spin"}):(0,s.jsx)(M.A,{className:"h-4 w-4"}),e("mcpServers.wizardRun")]})]}),(0,s.jsx)("p",{className:"text-[10px] text-muted-foreground",children:e("mcpServers.wizardFooter")})]})}),l&&0===t.length?(0,s.jsx)(h.Zp,{children:(0,s.jsxs)(h.Wu,{className:"py-6 text-sm text-muted-foreground",children:[(0,s.jsx)(o.A,{className:"inline h-4 w-4 animate-spin mr-2"})," ",e("mcpServers.loading")]})}):0===t.length?(0,s.jsx)(h.Zp,{className:"border-dashed",children:(0,s.jsx)(h.Wu,{className:"py-6 text-sm text-muted-foreground text-center",children:e.rich("mcpServers.emptyHint",{code:e=>(0,s.jsx)("code",{children:e})})})}):(0,s.jsx)("div",{className:"space-y-2",children:t.map(t=>{var a;return(0,s.jsx)(h.Zp,{children:(0,s.jsxs)(h.Wu,{className:"py-3 px-4 flex items-center gap-3",children:[(0,s.jsx)(q.A,{className:"h-4 w-4 text-muted-foreground"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"font-mono text-sm",children:t.id}),(0,s.jsx)(N.E,{variant:"outline",className:"text-[10px]",children:t.config.transport}),(0,s.jsx)("span",{className:"text-sm text-muted-foreground truncate",children:t.label})]}),(0,s.jsx)("div",{className:"text-[11px] text-muted-foreground font-mono truncate",children:"stdio"===t.config.transport?"".concat(t.config.command," ").concat((null!=(a=t.config.args)?a:[]).join(" ")):t.config.url}),t.description&&(0,s.jsx)("div",{className:"text-[11px] text-muted-foreground truncate",children:t.description})]}),(0,s.jsx)(x.$,{type:"button",size:"icon",variant:"ghost",onClick:()=>void k(t.id),title:e("mcpServers.removeTitle"),className:"h-8 w-8",children:(0,s.jsx)(H.A,{className:"h-3.5 w-3.5"})})]})},t.id)})}),d?(0,s.jsx)(et,{existingIds:t.map(e=>e.id),onCancel:()=>m(!1),onAdded:()=>{m(!1),w()}}):(0,s.jsxs)(x.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>m(!0),className:"gap-2 text-muted-foreground",children:[(0,s.jsx)(K.A,{className:"h-4 w-4"}),e("mcpServers.addManual")]})]})}function et(e){var t;let{existingIds:a,onCancel:n,onAdded:l}=e,c=(0,i.c)("settings"),[m,f]=(0,r.useState)(""),[v,b]=(0,r.useState)(""),[j,N]=(0,r.useState)(""),[w,k]=(0,r.useState)("stdio"),[S,R]=(0,r.useState)(""),[A,C]=(0,r.useState)(""),[T,z]=(0,r.useState)(""),[M,L]=(0,r.useState)(""),[U,F]=(0,r.useState)(""),[E,I]=(0,r.useState)(null),[J,_]=(0,r.useTransition)(),[W,B]=(0,r.useTransition)(),O=()=>{if("stdio"===w){if(!S.trim())return{ok:!1,error:"command required"};try{let e=T.trim()?JSON.parse(T):{};return{ok:!0,config:{transport:"stdio",command:S.trim(),args:A.trim()?A.trim().split(/\s+/).filter(Boolean):[],env:e}}}catch(e){return{ok:!1,error:"env must be JSON object"}}}if(!M.trim())return{ok:!1,error:"URL required"};try{let e=U.trim()?JSON.parse(U):{};return{ok:!0,config:{transport:w,url:M.trim(),headers:e}}}catch(e){return{ok:!1,error:"headers must be JSON object"}}};return(0,s.jsx)(h.Zp,{children:(0,s.jsxs)(h.Wu,{className:"pt-5 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("h3",{className:"text-sm font-medium flex items-center gap-2",children:[(0,s.jsx)(q.A,{className:"h-4 w-4"})," ",c("mcpServers.form.title")]}),(0,s.jsx)(x.$,{type:"button",size:"icon",variant:"ghost",onClick:n,className:"h-7 w-7",children:(0,s.jsx)(Z.A,{className:"h-3.5 w-3.5"})})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:"ID (kebab-case)"}),(0,s.jsx)(p.p,{value:m,onChange:e=>f(e.target.value),placeholder:"github",className:"font-mono text-sm"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:"Label"}),(0,s.jsx)(p.p,{value:v,onChange:e=>b(e.target.value),placeholder:"GitHub",className:"text-sm"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:c("mcpServers.form.descriptionLabel")}),(0,s.jsx)(p.p,{value:j,onChange:e=>N(e.target.value),placeholder:c("mcpServers.form.descriptionPlaceholder"),className:"text-sm"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:"Transport"}),(0,s.jsxs)(y.l6,{value:w,onValueChange:e=>k(e),children:[(0,s.jsx)(y.bq,{className:"w-48",children:(0,s.jsx)(y.yv,{})}),(0,s.jsxs)(y.gC,{children:[(0,s.jsx)(y.eb,{value:"stdio",children:"stdio (subprocess)"}),(0,s.jsx)(y.eb,{value:"http",children:"HTTP (Streamable)"}),(0,s.jsx)(y.eb,{value:"sse",children:"SSE (legacy)"})]})]})]}),"stdio"===w?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:"Command"}),(0,s.jsx)(p.p,{value:S,onChange:e=>R(e.target.value),placeholder:"npx",className:"font-mono text-sm"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:"Args"}),(0,s.jsx)(p.p,{value:A,onChange:e=>C(e.target.value),placeholder:"-y @modelcontextprotocol/server-github",className:"font-mono text-sm"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:"Env (JSON, optional)"}),(0,s.jsx)(P.T,{value:T,onChange:e=>z(e.target.value),placeholder:'{"GITHUB_TOKEN": "ghp_…"}',className:"font-mono text-xs",rows:3})]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:"URL"}),(0,s.jsx)(p.p,{value:M,onChange:e=>L(e.target.value),placeholder:"https://example.com/mcp",className:"font-mono text-sm"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:"Headers (JSON, optional)"}),(0,s.jsx)(P.T,{value:U,onChange:e=>F(e.target.value),placeholder:'{"Authorization": "Bearer …"}',className:"font-mono text-xs",rows:3})]})]}),E&&(0,s.jsxs)("div",{className:"rounded border border-emerald-300 bg-emerald-50 px-3 py-2 text-xs flex items-center gap-2 text-emerald-900",children:[(0,s.jsx)(d.A,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:c.rich("mcpServers.form.connectedTo",{mono:e=>(0,s.jsx)("span",{className:"font-mono",children:e}),name:null!=(t=E.serverName)?t:c("mcpServers.form.anonymousName"),count:E.toolsCount})})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[(0,s.jsxs)(x.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{let e=O();if(!e.ok)return void u.oR.error(e.error);I(null),_(async()=>{var t;let a=await X(e.config);if(!a.ok)return void u.oR.error("Connect failed: "+a.error);I({...a.serverName?{serverName:a.serverName}:{},toolsCount:a.tools.length}),v||b(null!=(t=a.serverName)?t:m)})},disabled:J,children:[J?(0,s.jsx)(o.A,{className:"mr-1 h-3.5 w-3.5 animate-spin"}):null,c("mcpServers.form.testButton")]}),(0,s.jsxs)(x.$,{type:"button",size:"sm",onClick:()=>{let e=m.trim().toLowerCase();if(!e)return void u.oR.error("id required");if(a.includes(e))return void u.oR.error('id "'.concat(e,'" already used'));if(!v.trim())return void u.oR.error("label required");let t=O();if(!t.ok)return void u.oR.error(t.error);B(async()=>{let a=await Q({id:e,label:v.trim(),description:j.trim(),config:t.config});if(!a.ok)return void u.oR.error(a.error);u.oR.success(c("mcpServers.form.addedToast",{id:e})),l()})},disabled:W||!E,children:[W?(0,s.jsx)(o.A,{className:"mr-1 h-3.5 w-3.5 animate-spin"}):null,c("mcpServers.form.saveButton")]})]}),!E&&(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground",children:c("mcpServers.form.testFirstHint")})]})})}var ea=a(94151),es=a(43153),er=a(69709),en=a(85924),ei=a(39783),el=a(25104),eo=a(66459),ec=a(43493),ed=a(31050),em=a(3661),eu=a(50284);let ex=(0,E.createServerReference)("401f34f0d4501fcbd2430b9494dde3179c2782dd38",E.callServer,void 0,E.findSourceMapURL,"probeOAuthAction"),eh=(0,E.createServerReference)("40ee4208659b33a99f9cb07399f7310f4b81fc1ca0",E.callServer,void 0,E.findSourceMapURL,"disconnectOAuthAction"),ep=(0,E.createServerReference)("40b50e8b7cdd766854728ec34c403b5a0ba3f4a6c5",E.callServer,void 0,E.findSourceMapURL,"deleteOAuthClientAction"),eg=(0,E.createServerReference)("40abca1430dcd9aa90dbaa9fd3c03411f6bbc6c394",E.callServer,void 0,E.findSourceMapURL,"removeCustomOAuthProviderAction"),ef=(0,E.createServerReference)("409e9a399fed01a3f02a8da391f842a16724424573",E.callServer,void 0,E.findSourceMapURL,"addCustomOAuthProviderAction");function ev(){let e=(0,i.c)("settings"),[t,a]=(0,r.useState)([]),[n,l]=(0,r.useTransition)(),[c,d]=(0,r.useState)(!1),m=()=>{l(async()=>{let e=await (0,ec.o)();if(!e.ok)return void u.oR.error(e.error);a(e.statuses)})};return((0,r.useEffect)(()=>{m()},[]),n&&0===t.length)?(0,s.jsx)(h.Zp,{children:(0,s.jsxs)(h.Wu,{className:"py-6 text-sm text-muted-foreground",children:[(0,s.jsx)(o.A,{className:"inline h-4 w-4 animate-spin mr-2"})," ",e("oauth.loading")]})}):(0,s.jsxs)("div",{className:"space-y-2",children:[t.map(e=>(0,s.jsx)(eb,{status:e,onChanged:m},e.id)),c?(0,s.jsx)(ej,{existingIds:t.map(e=>e.id),onCancel:()=>d(!1),onAdded:()=>{d(!1),m()}}):(0,s.jsxs)(x.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>d(!0),className:"gap-2 text-muted-foreground",children:[(0,s.jsx)(K.A,{className:"h-4 w-4"}),e("oauth.addCustomButton")]})]})}function eb(e){let{status:t,onChanged:a}=e,n=(0,i.c)("settings"),[l,d]=(0,r.useState)(!1),[m,f]=(0,r.useState)(null),[v,b]=(0,r.useState)([]),[j,y]=(0,r.useState)(""),[w,k]=(0,r.useState)(""),[S,R]=(0,r.useState)(""),[A,C]=(0,r.useTransition)(),[T,z]=(0,r.useTransition)(),[M,L]=(0,r.useTransition)();(0,r.useEffect)(()=>{l&&(async()=>{let e=await (0,ed.J)(t.id);if(!e.ok)return u.oR.error(e.error);f(e.client),b(e.defaultScopes),e.client&&(y(e.client.clientId),R(e.client.scopes.join(" ")))})()},[l]);let P=async()=>{if(!confirm(n("oauth.disconnectConfirm",{label:t.label})))return;let e=await eh(t.id);if(!e.ok)return void u.oR.error(e.error);u.oR.success(n("oauth.disconnectedToast")),a()},F=async()=>{if(!confirm(n("oauth.forgetClientConfirm",{label:t.label})))return;let e=await ep(t.id);if(!e.ok)return void u.oR.error(e.error);u.oR.success(n("oauth.forgottenToast")),f(null),y(""),R(""),a()};return(0,s.jsx)(h.Zp,{children:(0,s.jsxs)(h.Wu,{className:"py-3 px-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(ea.A,{className:"h-4 w-4 text-muted-foreground shrink-0"}),(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("span",{className:"text-sm font-medium",children:t.label}),(0,s.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground",children:t.id}),"user"===t.origin&&(0,s.jsx)(N.E,{variant:"outline",className:"text-[10px]",children:"custom"}),t.hasClient?t.hasTokens?(0,s.jsxs)(N.E,{variant:"secondary",className:"gap-1",children:[(0,s.jsx)(es.A,{className:"h-3 w-3"})," ",n("oauth.authorized")]}):(0,s.jsx)(N.E,{variant:"outline",className:"border-amber-400 text-amber-700",children:n("oauth.readyToAuthorize")}):(0,s.jsx)(N.E,{variant:"outline",children:n("oauth.notConfigured")}),t.hasTokens&&t.expiresAt&&(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:n("oauth.expiresAt",{time:new Date(t.expiresAt).toLocaleTimeString()})})]})}),(0,s.jsxs)(x.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>d(e=>!e),className:"gap-1",children:[(0,s.jsx)(er.A,{className:"h-3.5 w-3.5 transition-transform ".concat(l?"rotate-180":"")}),l?n("oauth.collapse"):n("oauth.configure")]})]}),l&&(0,s.jsxs)("div",{className:"mt-4 pl-7 space-y-3 border-l-2 ml-1.5",children:[t.setupHint&&(0,s.jsxs)("div",{className:"rounded border border-amber-200 bg-amber-50 px-3 py-2 text-[11px] text-amber-900 flex items-start gap-2",children:[(0,s.jsx)(en.A,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),(0,s.jsx)("span",{children:t.setupHint})]}),(0,s.jsxs)("a",{href:t.consoleUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-violet-700 hover:underline",children:[(0,s.jsx)(ei.A,{className:"h-3 w-3"}),n("oauth.openConsole",{label:t.label})]}),t.setupSteps&&t.setupSteps.length>0&&(0,s.jsxs)("div",{className:"rounded border border-violet-200 bg-violet-50/30 p-3",children:[(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-2",children:n("oauth.stepByStep")}),(0,s.jsx)(eo.O,{steps:t.setupSteps})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:"Client ID"}),(0,s.jsx)(p.p,{value:j,onChange:e=>y(e.target.value),placeholder:"123456789-xxxxx.apps.googleusercontent.com",className:"font-mono text-xs h-8"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(g.J,{className:"text-xs",children:[n("oauth.clientSecretLabel"),(null==m?void 0:m.hasSecret)&&(0,s.jsx)("span",{className:"ml-2 text-muted-foreground",children:n("oauth.clientSecretSaved")})]}),(0,s.jsx)(p.p,{type:"password",value:w,onChange:e=>k(e.target.value),placeholder:(null==m?void 0:m.hasSecret)?"••••":"GOCSPX-…",className:"font-mono text-xs h-8"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(g.J,{className:"text-xs",children:[n("oauth.scopesLabel")," ",(0,s.jsx)("span",{className:"text-muted-foreground",children:n("oauth.scopesDefault",{scopes:v.join(" ")||"—"})})]}),(0,s.jsx)(p.p,{value:S,onChange:e=>R(e.target.value),placeholder:v.join(" "),className:"font-mono text-xs h-8"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 pt-1",children:[(0,s.jsxs)(x.$,{type:"button",size:"sm",onClick:()=>{C(async()=>{let e=S.trim().split(/[\s,]+/).filter(e=>e.length>0),s=await (0,em.S)({provider:t.id,clientId:j,...w?{clientSecret:w}:{},...e.length>0?{scopes:e}:{}});if(!s.ok)return void u.oR.error(s.error);u.oR.success(n("oauth.savedToast")),k(""),a();let r=await (0,ed.J)(t.id);r.ok&&f(r.client)})},disabled:A||!j.trim(),children:[A?(0,s.jsx)(o.A,{className:"mr-1 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(c.A,{className:"mr-1 h-3.5 w-3.5"}),n("oauth.saveButton")]}),(0,s.jsxs)(x.$,{type:"button",size:"sm",variant:"outline",onClick:()=>{z(async()=>{let e=await (0,eu.T)(t.id);if(!e.ok)return void u.oR.error(e.error);window.open(e.authorizeUrl,"reflex-oauth","width=600,height=720,noopener=no")||window.open(e.authorizeUrl,"_blank","noopener");let s=Date.now(),r=async()=>{if(Date.now()-s>3e5)return void u.oR.error(n("oauth.authTimeoutToast"));let e=await (0,ec.o)();if(e.ok){let s=e.statuses.find(e=>e.id===t.id);if((null==s?void 0:s.hasTokens)&&!t.hasTokens){u.oR.success(n("oauth.authorizedToast")),a();return}}setTimeout(()=>void r(),1500)};r()})},disabled:T||!m,className:"gap-1",children:[T?(0,s.jsx)(o.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(ei.A,{className:"h-3.5 w-3.5"}),t.hasTokens?n("oauth.reAuthorize"):n("oauth.authorize")]}),t.hasTokens&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(x.$,{type:"button",size:"sm",variant:"outline",onClick:()=>{L(async()=>{let e=await ex(t.id);if(!e.ok){var a;u.oR.error(null!=(a=e.error)?a:n("oauth.probeFailToast"));return}u.oR.success(n("oauth.probeOkToast"))})},disabled:M,children:[M&&(0,s.jsx)(o.A,{className:"mr-1 h-3.5 w-3.5 animate-spin"}),(0,s.jsx)(q.A,{className:"mr-1 h-3.5 w-3.5"})," ",n("oauth.probeButton")]}),(0,s.jsxs)(x.$,{type:"button",size:"sm",variant:"ghost",onClick:P,children:[(0,s.jsx)(el.A,{className:"mr-1 h-3.5 w-3.5"}),n("oauth.disconnect")]})]}),m&&(0,s.jsxs)(x.$,{type:"button",size:"sm",variant:"ghost",onClick:F,className:"text-muted-foreground",children:[(0,s.jsx)(U.A,{className:"mr-1 h-3.5 w-3.5"}),n("oauth.forgetClient")]}),"user"===t.origin&&(0,s.jsxs)(x.$,{type:"button",size:"sm",variant:"ghost",className:"text-destructive ml-auto",onClick:async()=>{if(!confirm(n("oauth.removeProviderConfirm",{id:t.id})))return;let e=await eg(t.id);if(!e.ok)return void u.oR.error(e.error);await ep(t.id),u.oR.success(n("oauth.providerRemovedToast")),a()},children:[(0,s.jsx)(H.A,{className:"mr-1 h-3.5 w-3.5"}),n("oauth.removeProvider")]})]}),(0,s.jsx)("p",{className:"text-[10px] text-muted-foreground",children:n.rich("oauth.usageHint",{code:e=>(0,s.jsx)("code",{className:"font-mono",children:e}),id:t.id})})]})]})})}function ej(e){let{existingIds:t,onCancel:a,onAdded:n}=e,l=(0,i.c)("settings"),[c,d]=(0,r.useState)(""),[m,f]=(0,r.useState)(""),[v,b]=(0,r.useState)(""),[j,N]=(0,r.useState)(""),[y,w]=(0,r.useState)(""),[k,S]=(0,r.useState)(""),[R,A]=(0,r.useState)(""),[C,T]=(0,r.useState)(!0),[z,M]=(0,r.useState)(!0),[L,U]=(0,r.useState)(!0),[F,E]=(0,r.useState)(""),[I,J]=(0,r.useTransition)();return(0,s.jsx)(h.Zp,{children:(0,s.jsxs)(h.Wu,{className:"pt-5 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("h3",{className:"text-sm font-medium flex items-center gap-2",children:[(0,s.jsx)(K.A,{className:"h-4 w-4"})," ",l("oauth.custom.title")]}),(0,s.jsx)(x.$,{type:"button",size:"icon",variant:"ghost",onClick:a,className:"h-7 w-7",children:(0,s.jsx)(Z.A,{className:"h-3.5 w-3.5"})})]}),(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground",children:l.rich("oauth.custom.description",{uri:e=>(0,s.jsx)("code",{className:"font-mono",children:e})})}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:l("oauth.custom.idLabel")}),(0,s.jsx)(p.p,{value:c,onChange:e=>d(e.target.value),placeholder:"dropbox",className:"font-mono text-sm h-8"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:l("oauth.custom.labelLabel")}),(0,s.jsx)(p.p,{value:m,onChange:e=>f(e.target.value),placeholder:"Dropbox",className:"text-sm h-8"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:l("oauth.custom.authorizeUrlLabel")}),(0,s.jsx)(p.p,{value:v,onChange:e=>b(e.target.value),placeholder:"https://example.com/oauth/authorize",className:"font-mono text-sm h-8"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:l("oauth.custom.tokenUrlLabel")}),(0,s.jsx)(p.p,{value:j,onChange:e=>N(e.target.value),placeholder:"https://example.com/oauth/token",className:"font-mono text-sm h-8"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:l("oauth.custom.defaultScopesLabel")}),(0,s.jsx)(p.p,{value:y,onChange:e=>w(e.target.value),placeholder:"read write",className:"font-mono text-sm h-8"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:l("oauth.custom.consoleUrlLabel")}),(0,s.jsx)(p.p,{value:k,onChange:e=>S(e.target.value),placeholder:"https://www.dropbox.com/developers/apps",className:"font-mono text-sm h-8"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:l("oauth.custom.setupHintLabel")}),(0,s.jsx)(P.T,{value:R,onChange:e=>A(e.target.value),placeholder:l("oauth.custom.setupHintPlaceholder"),className:"text-xs",rows:3})]}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-3 text-xs",children:[(0,s.jsxs)("label",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",checked:C,onChange:e=>T(e.target.checked)}),"PKCE"]}),(0,s.jsxs)("label",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",checked:z,onChange:e=>M(e.target.checked)}),"refresh_token"]}),(0,s.jsxs)("label",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",checked:L,onChange:e=>U(e.target.checked)}),"client_secret"]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(g.J,{className:"text-xs",children:l("oauth.custom.extraParamsLabel")}),(0,s.jsx)(P.T,{value:F,onChange:e=>E(e.target.value),placeholder:'{"access_type": "offline", "prompt": "consent"}',className:"font-mono text-xs",rows:2})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[(0,s.jsx)(x.$,{type:"button",variant:"ghost",size:"sm",onClick:a,children:l("oauth.custom.cancel")}),(0,s.jsxs)(x.$,{type:"button",size:"sm",onClick:()=>{let e=c.trim().toLowerCase();if(!e)return void u.oR.error(l("oauth.custom.idRequired"));if(t.includes(e))return void u.oR.error(l("oauth.custom.providerExists",{id:e}));if(!v.trim()||!j.trim())return void u.oR.error(l("oauth.custom.urlsRequired"));let a={};if(F.trim())try{a=JSON.parse(F)}catch(e){u.oR.error(l("oauth.custom.extraMustBeJson"));return}let s=y.trim().split(/[\s,]+/).filter(e=>e.length>0);J(async()=>{let t=await ef({id:e,label:m.trim()||e,authorizeUrl:v.trim(),tokenUrl:j.trim(),defaultScopes:s,supportsPKCE:C,refreshTokenSupported:z,needsClientSecret:L,extraAuthorizeParams:a,setupHint:R.trim(),consoleUrl:k.trim()||"http://localhost:3210/api/oauth/callback"});if(!t.ok)return void u.oR.error(t.error);u.oR.success(l("oauth.custom.addedToast",{id:e})),n()})},disabled:I||!c.trim()||!v.trim()||!j.trim(),children:[I&&(0,s.jsx)(o.A,{className:"mr-1 h-3.5 w-3.5 animate-spin"}),l("oauth.custom.create")]})]})]})})}var eN=a(42713);let ey=(0,E.createServerReference)("4045dbb1dc0d592ca894deb48bcdde715d9848ce3e",E.callServer,void 0,E.findSourceMapURL,"hasApiKeyAction"),ew=(0,E.createServerReference)("40a8b2c8d9872b6c6e2520a21fd047041e7894fac6",E.callServer,void 0,E.findSourceMapURL,"listGeminiModelsAction");var ek=a(75926);let eS=(0,E.createServerReference)("400b8bdc0e15c72f478eaa7c197294b22369c8d751",E.callServer,void 0,E.findSourceMapURL,"saveGeminiModelChoiceAction");function eR(){let e=(0,i.c)("settings"),[t,a]=(0,r.useState)(!1),[n,d]=(0,r.useState)(""),[m,f]=(0,r.useState)([]),[v,b]=(0,r.useState)(""),[j,y]=(0,r.useState)(""),[w,k]=(0,r.useTransition)(),[S,R]=(0,r.useTransition)(),[A,C]=(0,r.useTransition)(),T=async()=>{a((await ey("gemini")).present)},z=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];k(async()=>{let a=await ew(e);if(!a.ok){if(!t)return;u.oR.error(a.error);return}f(a.models),b(a.currentModel),y(a.currentVideoModel)})};(0,r.useEffect)(()=>{(async()=>{await T()})()},[]),(0,r.useEffect)(()=>{t&&z(!1)},[t]);let L=(t,a)=>{C(async()=>{let s=await eS({[t]:a||null});if(!s.ok)return void u.oR.error(s.error);u.oR.success(e("gemini.savedToast")),"model"===t?b(a):y(a)})};return(0,s.jsx)(h.Zp,{children:(0,s.jsxs)(h.Wu,{className:"pt-5 space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,s.jsx)(M.A,{className:"h-4 w-4"}),(0,s.jsx)("span",{children:"Gemini API"}),t?(0,s.jsxs)(N.E,{variant:"secondary",className:"gap-1",children:[(0,s.jsx)(es.A,{className:"h-3 w-3"})," ",e("gemini.keySaved")]}):(0,s.jsx)(N.E,{variant:"outline",children:e("gemini.notConfigured")})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:e.rich("gemini.description",{strong:e=>(0,s.jsx)("strong",{children:e}),model:e=>(0,s.jsx)("code",{className:"font-mono",children:e}),path:e=>(0,s.jsx)("code",{className:"font-mono",children:e}),link:e=>(0,s.jsxs)("a",{href:"https://aistudio.google.com/apikey",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-violet-700 hover:underline",children:[e,(0,s.jsx)(ei.A,{className:"h-3 w-3"})]})})}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsxs)(g.J,{className:"text-xs flex items-center gap-1",children:[(0,s.jsx)(ea.A,{className:"h-3 w-3"}),t?e("gemini.replaceKey"):e("gemini.apiKeyLabel")]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(p.p,{type:"password",value:n,onChange:e=>d(e.target.value),placeholder:t?"••••":"AIza…",className:"font-mono text-sm flex-1 h-8",disabled:S}),(0,s.jsxs)(x.$,{type:"button",size:"sm",onClick:()=>{if(!n.trim())return void u.oR.error(e("gemini.enterKeyError"));R(async()=>{let t=await (0,ek.A)(n.trim());if(!t.ok)return void u.oR.error(t.error);u.oR.success(e("gemini.keySavedToast")),d(""),a(!0),z(!0)})},disabled:S||!n.trim(),className:"h-8 gap-1",children:[S?(0,s.jsx)(o.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(c.A,{className:"h-3 w-3"}),e("gemini.saveButton")]})]})]}),t&&(0,s.jsxs)("div",{className:"space-y-3 pt-1 border-t",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:e.rich("gemini.modelsFromBeta",{path:e=>(0,s.jsx)("code",{className:"font-mono",children:e}),count:m.length>0?"(".concat(m.length,")"):""})}),(0,s.jsxs)(x.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>z(!0),disabled:w,className:"h-7 text-xs gap-1",children:[w?(0,s.jsx)(o.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(l.A,{className:"h-3 w-3"}),e("gemini.refreshButton")]})]}),(0,s.jsx)(eA,{label:e("gemini.defaultModelLabel"),hint:e("gemini.defaultModelHint"),value:v,models:m,disabled:A||w,onChange:e=>L("model",e)}),(0,s.jsx)(eA,{label:e("gemini.youtubeModelLabel"),hint:e("gemini.youtubeModelHint"),value:j,models:m,disabled:A||w,onChange:e=>L("videoModel",e)})]})]})})}function eA(e){let{label:t,hint:a,value:r,models:n,disabled:i,onChange:l}=e,o=new Set(n.map(e=>e.id)).has(r)?n:r?[{id:r,displayName:"".concat(r," (saved)")},...n]:n;return(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(g.J,{className:"text-xs",children:t}),(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground",children:a}),(0,s.jsxs)(y.l6,{value:r,onValueChange:l,disabled:i,children:[(0,s.jsx)(y.bq,{className:"h-8 w-full",children:(0,s.jsx)(y.yv,{placeholder:"(default)"})}),(0,s.jsx)(y.gC,{children:o.map(e=>(0,s.jsx)(y.eb,{value:e.id,children:(0,s.jsxs)("span",{className:"flex items-baseline gap-2",children:[(0,s.jsx)("span",{className:"font-mono text-xs",children:e.id}),e.displayName&&e.displayName!==e.id&&(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:e.displayName})]})},e.id))})]})]})}var eC=a(39160);let eT=(0,E.createServerReference)("002a31e34b59372bae5b92a75833d2ec91a3238b8a",E.callServer,void 0,E.findSourceMapURL,"braveKeyStatusAction"),ez=(0,E.createServerReference)("60542af44ad021bac8dd9b185891ce33c4435d2740",E.callServer,void 0,E.findSourceMapURL,"saveImageProviderKeyAction");function eM(){let e=(0,i.c)("settings");return(0,s.jsx)(h.Zp,{children:(0,s.jsxs)(h.Wu,{className:"pt-5 space-y-5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,s.jsx)(eC.A,{className:"h-4 w-4"}),(0,s.jsx)("span",{children:e("imageSearch.headerTitle")})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:e.rich("imageSearch.description",{api:e=>(0,s.jsx)("code",{className:"font-mono",children:e}),dir:e=>(0,s.jsx)("code",{className:"font-mono",children:e})})}),(0,s.jsx)(eL,{provider:"unsplash",label:"Unsplash",docsHref:"https://unsplash.com/developers",hint:e("imageSearch.unsplash.hint")}),(0,s.jsx)(eL,{provider:"pexels",label:"Pexels",docsHref:"https://pexels.com/api/",hint:e("imageSearch.pexels.hint")}),(0,s.jsx)(eL,{provider:"brave",label:e("imageSearch.brave.label"),docsHref:"https://api-dashboard.search.brave.com/app/keys",hint:e("imageSearch.brave.hint")})]})})}function eL(e){let{provider:t,label:a,docsHref:n,hint:l}=e,d=(0,i.c)("settings"),[m,h]=(0,r.useState)(!1),[f,v]=(0,r.useState)(!1),[b,j]=(0,r.useState)(""),[y,w]=(0,r.useTransition)();return(0,r.useEffect)(()=>{(async()=>{let e=await ey(t);h(e.present),"brave"!==t||e.present||v((await eT()).viaMcp)})()},[t]),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-medium",children:a}),m?(0,s.jsxs)(N.E,{variant:"secondary",className:"gap-1",children:[(0,s.jsx)(es.A,{className:"h-3 w-3"})," ",d("imageSearch.keySaved")]}):f?(0,s.jsxs)(N.E,{variant:"secondary",className:"gap-1",children:[(0,s.jsx)(es.A,{className:"h-3 w-3"})," ",d("imageSearch.viaMcp")]}):(0,s.jsx)(N.E,{variant:"outline",children:d("imageSearch.notConfigured")}),(0,s.jsxs)("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"ml-auto inline-flex items-center gap-1 text-xs text-violet-700 hover:underline",children:["docs ",(0,s.jsx)(ei.A,{className:"h-3 w-3"})]})]}),(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground",children:l}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsxs)(g.J,{className:"sr-only",htmlFor:"".concat(t,"-key"),children:[(0,s.jsx)(ea.A,{className:"h-3 w-3"})," ",a," key"]}),(0,s.jsx)(p.p,{id:"".concat(t,"-key"),type:"password",value:b,onChange:e=>j(e.target.value),placeholder:m?"••••":d("imageSearch.keyPlaceholder",{label:a}),className:"font-mono text-sm flex-1 h-8",disabled:y}),(0,s.jsxs)(x.$,{type:"button",size:"sm",onClick:()=>{if(!b.trim())return void u.oR.error(d("imageSearch.enterKeyError"));w(async()=>{let e=await ez(t,b.trim());if(!e.ok)return void u.oR.error(e.error);u.oR.success(d("imageSearch.keySavedToast",{label:a})),j(""),h(!0)})},disabled:y||!b.trim(),className:"h-8 gap-1",children:[y?(0,s.jsx)(o.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(c.A,{className:"h-3 w-3"}),d("imageSearch.saveButton")]})]})]})}var eU=a(23559),eP=a(68682);function eF(e){let{settings:t,onChange:a}=e,r=(0,i.c)("settings"),n=new Set(t.mapServices.enabled);return(0,s.jsx)(h.Zp,{children:(0,s.jsxs)(h.Wu,{className:"pt-5 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,s.jsx)(eU.A,{className:"h-4 w-4 text-emerald-700"}),(0,s.jsx)("span",{children:r("mapServices.headerTitle")})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:r("mapServices.cardHint")}),(0,s.jsx)("ul",{className:"space-y-1.5",children:eP.yp.map(e=>{let t=n.has(e.id);return(0,s.jsxs)("li",{className:"flex items-start gap-2 rounded-md border bg-card px-3 py-2",children:[(0,s.jsx)("input",{id:"map-svc-".concat(e.id),type:"checkbox",checked:t,onChange:()=>(e=>{let t=new Set(n);t.has(e)?t.delete(e):t.add(e),a({mapServices:{enabled:[...t]}})})(e.id),className:"mt-1 h-3.5 w-3.5"}),(0,s.jsxs)("label",{htmlFor:"map-svc-".concat(e.id),className:"min-w-0 flex-1 cursor-pointer",children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:e.label}),(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground mt-0.5 leading-snug",children:e.description})]}),(0,s.jsxs)("a",{href:e.urlFor(55.7558,37.6173),target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-muted-foreground hover:underline inline-flex items-center gap-0.5 shrink-0 mt-1",title:r("mapServices.previewTitle"),children:[r("mapServices.previewLabel"),(0,s.jsx)(ei.A,{className:"h-2.5 w-2.5"})]})]},e.id)})})]})})}var eE=a(2136),eI=a(84860),eJ=a(67805),e_=a(72172);let eW=(0,E.createServerReference)("0044e95bfba76048f937e4061f96b8943d1d48c1bc",E.callServer,void 0,E.findSourceMapURL,"refreshReservedDomainsAction"),eB=(0,E.createServerReference)("40deca173f482c0e6c7fb51fb6e7a2a6e9576f2d9e",E.callServer,void 0,E.findSourceMapURL,"patchNgrokSettingsAction"),eO=(0,E.createServerReference)("00e5e31f2dde674b5ca4353c1ae691261bef95fc10",E.callServer,void 0,E.findSourceMapURL,"startTunnelAction"),e$=(0,E.createServerReference)("00c6c08fa331eb950fa38aea389fd9fd0465e4c051",E.callServer,void 0,E.findSourceMapURL,"stopTunnelAction"),eD=(0,E.createServerReference)("00cfa020adb180c345737101aedf2ca945239aedd1",E.callServer,void 0,E.findSourceMapURL,"listSharesAction"),eq=(0,E.createServerReference)("403c2fc183d34796b821f1df4795c0cfaf039ab591",E.callServer,void 0,E.findSourceMapURL,"deleteShareAction");function eH(e){var t,a;let{settings:n,onChange:c}=e,m=(0,i.c)("settings"),x=n.ngrok,[p,g]=(0,r.useState)({running:!1}),[f,v]=(0,r.useState)(null),[b,j]=(0,r.useState)(null),[N,y]=(0,r.useState)([]),[w,k]=(0,r.useTransition)(),[S,R]=(0,r.useTransition)(),[A,C]=(0,r.useState)(0),T=(0,r.useRef)(null),z=(0,r.useRef)(""),M=async()=>{let e=await (0,e_.N)();g(e.status),v(e.cliVersion),y((await eD()).shares)};(0,r.useEffect)(()=>{M();let e=setInterval(()=>void M(),1e4);return()=>clearInterval(e)},[]);let L=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=await eW();if(!t.ok){e||u.oR.error(t.error);return}j(t.domains),e||u.oR.success(m("ngrok.domainsLoadedToast",{count:t.domains.length}))},U=e=>{c({ngrok:{...x,...e}}),T.current&&clearTimeout(T.current),T.current=setTimeout(async()=>{let t=await eB(e);if(!t.ok){var a;u.oR.error(m("ngrok.ngrokSaveError",{error:null!=(a=t.error)?a:m("ngrok.saveFailedFallback")}));return}C(e=>e+1),"string"==typeof e.apiKey&&e.apiKey.trim()&&e.apiKey!==z.current&&(z.current=e.apiKey,L(!0))},600)};(0,r.useEffect)(()=>{x.apiKey.trim()&&""===z.current&&(z.current=x.apiKey,L(!0))},[]);let P=async()=>{T.current&&(clearTimeout(T.current),T.current=null,await eB(x))},F=()=>{R(async()=>{await P(),await e$(),await new Promise(e=>setTimeout(e,400));let e=await eO();if(!e.ok)return void u.oR.error(e.error);u.oR.success(e.publicUrl?m("ngrok.tunnelRestarted",{url:e.publicUrl}):m("ngrok.tunnelRestartedNoUrl")),await M()})},E=(()=>{try{return p.publicUrl?new URL(p.publicUrl).hostname:""}catch(e){return""}})(),I=x.domain.trim(),J=p.running&&I&&E!==I,_=p.running&&p.port!==x.port;return(0,s.jsx)(h.Zp,{children:(0,s.jsxs)(h.Wu,{className:"pt-5 space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,s.jsx)(eE.A,{className:"h-4 w-4 text-violet-600"}),(0,s.jsx)("span",{children:m("ngrok.headerTitle")}),f?(0,s.jsx)("span",{className:"text-[10px] font-mono text-muted-foreground ml-1",children:f.split("\n")[0]}):(0,s.jsxs)("span",{className:"text-[10px] text-destructive ml-1 inline-flex items-center gap-0.5",children:[(0,s.jsx)(en.A,{className:"h-3 w-3"}),m("ngrok.cliMissing")]}),A>0&&(0,s.jsxs)("span",{className:"ml-auto text-[10px] text-emerald-700 inline-flex items-center gap-0.5",title:m("ngrok.autoSavedTooltip"),children:[(0,s.jsx)(d.A,{className:"h-3 w-3"}),m("ngrok.autoSavedLabel")]},A)]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:m.rich("ngrok.intro",{code:e=>(0,s.jsx)("code",{className:"font-mono",children:e}),path:e=>(0,s.jsx)("code",{className:"font-mono",children:e}),link:e=>(0,s.jsx)("a",{href:"https://ngrok.com/download",target:"_blank",rel:"noopener noreferrer",className:"underline",children:e})})}),(0,s.jsxs)("div",{className:"grid gap-2",children:[(0,s.jsx)("label",{className:"text-xs font-medium",htmlFor:"ngrok-token",children:m("ngrok.authtokenLabel")}),(0,s.jsx)("input",{id:"ngrok-token",type:"password",autoComplete:"off",value:x.authtoken,onChange:e=>U({authtoken:e.target.value}),placeholder:"2abc...xyz",className:"rounded border bg-background px-2 py-1.5 text-xs font-mono focus:outline-none focus:ring-1 focus:ring-violet-400"}),(0,s.jsx)("p",{className:"text-[10px] text-muted-foreground",children:m.rich("ngrok.authtokenHint",{code:e=>(0,s.jsx)("code",{className:"font-mono",children:e}),path:e=>(0,s.jsx)("code",{className:"font-mono",children:e}),link:e=>(0,s.jsx)("a",{href:"https://dashboard.ngrok.com/get-started/your-authtoken",target:"_blank",rel:"noopener noreferrer",className:"underline",children:e})})})]}),(0,s.jsxs)("div",{className:"grid gap-2",children:[(0,s.jsx)("label",{className:"text-xs font-medium",htmlFor:"ngrok-apikey",children:m("ngrok.apiKeyLabel")}),(0,s.jsx)("input",{id:"ngrok-apikey",type:"password",autoComplete:"off",value:x.apiKey,onChange:e=>U({apiKey:e.target.value}),placeholder:"2abc...xyz",className:"rounded border bg-background px-2 py-1.5 text-xs font-mono focus:outline-none focus:ring-1 focus:ring-violet-400"}),(0,s.jsx)("p",{className:"text-[10px] text-muted-foreground",children:m.rich("ngrok.apiKeyHint",{link:e=>(0,s.jsx)("a",{href:"https://dashboard.ngrok.com/api",target:"_blank",rel:"noopener noreferrer",className:"underline",children:e})})})]}),(0,s.jsxs)("div",{className:"grid gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("label",{className:"text-xs font-medium",htmlFor:"ngrok-domain",children:m("ngrok.reservedDomainLabel")}),(0,s.jsxs)("button",{type:"button",onClick:()=>{k(async()=>{await L()})},disabled:w||!x.apiKey,className:"text-[11px] inline-flex items-center gap-1 text-violet-700 hover:underline disabled:opacity-50",children:[w?(0,s.jsx)(o.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(l.A,{className:"h-3 w-3"}),m("ngrok.refreshList")]})]}),b&&b.length>0?(0,s.jsxs)("select",{id:"ngrok-domain",value:x.domain,onChange:e=>U({domain:e.target.value}),className:"rounded border bg-background px-2 py-1.5 text-xs focus:outline-none focus:ring-1 focus:ring-violet-400",children:[(0,s.jsx)("option",{value:"",children:m("ngrok.randomSubdomain")}),b.map(e=>(0,s.jsxs)("option",{value:e.domain,children:[e.domain,e.region?" (".concat(e.region,")"):""]},e.id))]}):(0,s.jsx)("input",{id:"ngrok-domain",type:"text",value:x.domain,onChange:e=>U({domain:e.target.value}),placeholder:m("ngrok.domainPlaceholder"),className:"rounded border bg-background px-2 py-1.5 text-xs font-mono focus:outline-none focus:ring-1 focus:ring-violet-400"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-end",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs font-medium",htmlFor:"ngrok-port",children:m("ngrok.localPortLabel")}),(0,s.jsx)("input",{id:"ngrok-port",type:"number",min:1,max:65535,value:x.port,onChange:e=>U({port:Math.max(1,Number(e.target.value)||3210)}),className:"mt-1 w-32 rounded border bg-background px-2 py-1.5 text-xs font-mono focus:outline-none focus:ring-1 focus:ring-violet-400"})]}),p.running?(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsxs)("button",{type:"button",onClick:F,disabled:S,className:"rounded border px-3 py-1.5 text-xs font-medium hover:bg-accent disabled:opacity-50 inline-flex items-center gap-1",title:m("ngrok.restartTitle"),children:[S?(0,s.jsx)(o.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(l.A,{className:"h-3 w-3"}),m("ngrok.restart")]}),(0,s.jsxs)("button",{type:"button",onClick:()=>{R(async()=>{await e$(),u.oR.success(m("ngrok.tunnelStoppedToast")),await M()})},disabled:S,className:"rounded bg-destructive px-3 py-1.5 text-xs font-medium text-white hover:bg-destructive/90 disabled:opacity-50 inline-flex items-center gap-1",children:[S?(0,s.jsx)(o.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(eI.A,{className:"h-3 w-3"}),m("ngrok.stop")]})]}):(0,s.jsxs)("button",{type:"button",onClick:()=>{R(async()=>{await P();let e=await eO();if(!e.ok)return void u.oR.error(e.error);u.oR.success(e.publicUrl?m("ngrok.tunnelStarted",{url:e.publicUrl}):m("ngrok.tunnelStartedNoUrl")),await M()})},disabled:S||!x.authtoken,className:"rounded bg-violet-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-violet-700 disabled:opacity-50 inline-flex items-center gap-1",children:[S?(0,s.jsx)(o.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(eJ.A,{className:"h-3 w-3"}),m("ngrok.start")]})]}),p.running&&(0,s.jsxs)("div",{className:"rounded border border-emerald-300 bg-emerald-50 dark:bg-emerald-950/30 dark:border-emerald-900/50 px-3 py-2 text-xs space-y-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-emerald-800 dark:text-emerald-200",children:[(0,s.jsx)(d.A,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:m("ngrok.tunnelActive")})]}),p.publicUrl?(0,s.jsx)("a",{href:p.publicUrl,target:"_blank",rel:"noopener noreferrer",className:"block font-mono text-violet-700 hover:underline truncate",children:p.publicUrl}):(0,s.jsx)("p",{className:"text-muted-foreground",children:m("ngrok.urlPending")}),(0,s.jsx)("p",{className:"text-[10px] text-muted-foreground",children:m("ngrok.startedAt",{time:p.startedAt?new Date(p.startedAt).toLocaleTimeString():"",port:null!=(t=p.port)?t:""})})]}),(J||_)&&(0,s.jsxs)("div",{className:"rounded border border-amber-300 bg-amber-50 dark:bg-amber-950/30 dark:border-amber-900/50 px-3 py-2 text-xs space-y-1.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-amber-800 dark:text-amber-200 font-medium",children:[(0,s.jsx)(en.A,{className:"h-3.5 w-3.5"}),m("ngrok.settingsChanged")]}),(0,s.jsxs)("ul",{className:"text-[11px] text-amber-900 dark:text-amber-100 list-disc pl-4 space-y-0.5",children:[J&&(0,s.jsx)("li",{children:m.rich("ngrok.domainMismatch",{code:e=>(0,s.jsx)("code",{className:"font-mono",children:e}),running:E,desired:I})}),_&&(0,s.jsx)("li",{children:m.rich("ngrok.portMismatch",{code:e=>(0,s.jsx)("code",{className:"font-mono",children:e}),running:null!=(a=p.port)?a:"",desired:x.port})})]}),(0,s.jsxs)("button",{type:"button",onClick:F,disabled:S,className:"inline-flex items-center gap-1 rounded bg-amber-600 px-2 py-1 text-white hover:bg-amber-700 disabled:opacity-50",children:[S?(0,s.jsx)(o.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(l.A,{className:"h-3 w-3"}),m("ngrok.restartWithNewSettings")]})]}),(0,s.jsx)("hr",{className:"my-3"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-xs font-semibold mb-2",children:m("ngrok.activeLinks",{count:N.length})}),0===N.length?(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground",children:m("ngrok.noShares")}):(0,s.jsx)("ul",{className:"space-y-1",children:N.map(e=>(0,s.jsx)(eK,{share:e,publicHost:p.publicUrl,onDeleted:()=>void M()},e.id))})]})]})})}function eK(e){var t,a;let{share:n,publicHost:l,onDeleted:c}=e,d=(0,i.c)("settings"),[m,x]=(0,r.useTransition)(),h=l?new URL("/share/".concat(n.id),l).toString():"/share/".concat(n.id),p=n.label||("utility"===n.kind?d("ngrok.shareLabel.utility",{id:null!=(t=n.utilityId)?t:""}):"kb-file"===n.kind?d("ngrok.shareLabel.kbFile",{path:null!=(a=n.kbRelPath)?a:""}):"kb-tree"===n.kind?d("ngrok.shareLabel.kbTree"):d("ngrok.shareLabel.dashboard"));return(0,s.jsxs)("li",{className:"flex items-start gap-2 rounded border bg-card px-2 py-1.5 text-xs",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"font-medium truncate",children:p}),(0,s.jsx)("span",{className:"text-[9px] uppercase tracking-wider text-muted-foreground",children:n.kind}),n.passwordHash&&(0,s.jsx)("span",{className:"text-[9px] uppercase tracking-wider text-violet-600",children:"\uD83D\uDD12"})]}),(0,s.jsx)("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:"block text-[10px] font-mono text-violet-700 hover:underline truncate",children:h})]}),(0,s.jsx)("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(h).then(()=>u.oR.success(d("ngrok.copiedToast")))},className:"text-[10px] text-muted-foreground hover:text-foreground rounded px-1 py-0.5",children:"copy"}),(0,s.jsx)("button",{type:"button",onClick:()=>{confirm(d("ngrok.deleteConfirm",{label:p}))&&x(async()=>{await eq(n.id),c()})},disabled:m,className:"text-muted-foreground hover:text-destructive rounded px-1",title:d("ngrok.deleteTitle"),children:m?(0,s.jsx)(o.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(H.A,{className:"h-3 w-3"})})]})}var eZ=a(50988),eY=a(95265);let eG=(0,E.createServerReference)("4021fcd2210ecb5f6d3bdb8c5cb7a3bb76f6abff7f",E.callServer,void 0,E.findSourceMapURL,"patchTelegramSettingsAction"),eV=(0,E.createServerReference)("00e6af2deab0c7bab251a2339b33ae862ea883e8b5",E.callServer,void 0,E.findSourceMapURL,"testTelegramAction");function eX(e){let{settings:t,onChange:a}=e,n=t.notify.telegram,[i,l]=(0,r.useTransition)(),c=(0,r.useRef)(null),d=e=>{let s={...n,...e};a({notify:{...t.notify,telegram:s}}),c.current&&clearTimeout(c.current),c.current=setTimeout(async()=>{var t;let a=await eG(e);a.ok||u.oR.error(null!=(t=a.error)?t:"Couldn't save Telegram settings")},600)},m=async()=>{c.current&&(clearTimeout(c.current),c.current=null,await eG(n))};return(0,s.jsx)(h.Zp,{children:(0,s.jsxs)(h.Wu,{className:"pt-5 space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,s.jsx)(eZ.A,{className:"h-4 w-4 text-violet-600"}),(0,s.jsx)("span",{children:"Telegram"}),(0,s.jsxs)("label",{className:"ml-auto inline-flex items-center gap-1.5 text-xs font-normal",children:[(0,s.jsx)("input",{type:"checkbox",checked:n.enabled,onChange:e=>d({enabled:e.target.checked})}),"Enabled"]})]}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Create a bot with"," ",(0,s.jsx)("a",{href:"https://t.me/BotFather",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"@BotFather"}),", paste its token, then send your bot a message and put your chat id below (get it from"," ",(0,s.jsx)("a",{href:"https://t.me/userinfobot",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"@userinfobot"}),"). Reflex pushes notifications here, and your replies go to the dispatcher — the same central chat as the web home page."]}),(0,s.jsxs)("div",{className:"grid gap-2",children:[(0,s.jsx)("label",{className:"text-xs font-medium",htmlFor:"tg-token",children:"Bot token"}),(0,s.jsx)("input",{id:"tg-token",type:"password",autoComplete:"off",value:n.botToken,onChange:e=>d({botToken:e.target.value}),placeholder:"123456:ABC-DEF...",className:"rounded border bg-background px-2 py-1.5 text-xs font-mono focus:outline-none focus:ring-1 focus:ring-violet-400"})]}),(0,s.jsxs)("div",{className:"grid gap-2",children:[(0,s.jsx)("label",{className:"text-xs font-medium",htmlFor:"tg-chat",children:"Chat id"}),(0,s.jsx)("input",{id:"tg-chat",type:"text",value:n.chatId,onChange:e=>d({chatId:e.target.value}),placeholder:"123456789",className:"rounded border bg-background px-2 py-1.5 text-xs font-mono focus:outline-none focus:ring-1 focus:ring-violet-400"})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>{l(async()=>{await m();let e=await eV();if(!e.ok){var t;u.oR.error(null!=(t=e.error)?t:"Test failed");return}u.oR.success("Test message sent — check Telegram")})},disabled:i||!n.botToken||!n.chatId,className:"inline-flex items-center gap-1.5 rounded bg-violet-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-violet-700 disabled:opacity-50",children:[i?(0,s.jsx)(o.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(eY.A,{className:"h-3.5 w-3.5"}),"Send test message"]})]})})}let eQ=(0,E.createServerReference)("408844986caaad5a798602d8465c4f204f183dbcf7",E.callServer,void 0,E.findSourceMapURL,"listModelsAction"),e0=(0,E.createServerReference)("400e7612a53c1a2fb1f36d0b9711c29970076855d1",E.callServer,void 0,E.findSourceMapURL,"probeHarnessAction"),e1=(0,E.createServerReference)("40f2ae4c419ce1b5e819783b537f646d6eefdd7a84",E.callServer,void 0,E.findSourceMapURL,"saveSettingsAction");function e3(e){let{initialSettings:t,harnesses:a}=e,d=(0,i.c)("settings"),[m,v]=(0,r.useState)(t),[b,w]=(0,r.useState)({"claude-code":null,codex:null,ollama:null}),[R,A]=(0,r.useState)({"claude-code":null,codex:null,ollama:null}),[z,M]=(0,r.useState)({"claude-code":!1,codex:!1,ollama:!1}),[L,U]=(0,r.useState)({"claude-code":null,codex:null,ollama:null}),[P,F]=(0,r.useTransition)(),E=(0,r.useCallback)(async e=>{M(t=>({...t,[e]:!0})),A(t=>({...t,[e]:null}));let t=await eQ(e);M(t=>({...t,[e]:!1})),t.ok?w(a=>({...a,[e]:t.models})):(A(a=>({...a,[e]:t.error})),w(t=>({...t,[e]:[]})))},[]),I=(0,r.useCallback)(async e=>{let t=await e0(e);U(a=>({...a,[e]:t}))},[]);(0,r.useEffect)(()=>{a.forEach(e=>{I(e.id),E(e.id)})},[a,I,E]);let J=(e,t)=>{v(a=>({...a,assignments:{...a.assignments,[e]:{...a.assignments[e],...t}}}))},_=(0,n.useRouter)(),W=e=>{v(t=>({...t,imageProcessing:{...t.imageProcessing,...e}}))},B={en:"English",ru:"Русский"},O="advanced"===m.uiMode;return(0,s.jsxs)("div",{className:"space-y-8",children:[(0,s.jsx)(h.Zp,{className:"border-violet-200 dark:border-violet-900/50 bg-violet-50/40 dark:bg-violet-950/20",children:(0,s.jsxs)(h.Wu,{className:"pt-5 pb-5 flex items-center gap-3",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:O?d("uiMode.advancedTitle"):d("uiMode.simpleTitle")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:O?d("uiMode.advancedHint"):d("uiMode.simpleHint")})]}),(0,s.jsx)(x.$,{type:"button",variant:O?"outline":"default",size:"sm",onClick:()=>{let e={...m,uiMode:O?"simple":"advanced"};v(e),e1(e)},children:O?d("uiMode.switchToSimple"):d("uiMode.switchToAdvanced")})]})}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Memory"}),(0,s.jsx)(eN.MemoryEditor,{scope:"global",title:"What Reflex remembers about you",description:"These files are loaded into every chat so the agent has context. Edit any line directly, or let the agent maintain them as you talk.",allowWipe:!0})]}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Interface & content language"}),(0,s.jsx)(h.Zp,{children:(0,s.jsxs)(h.Wu,{className:"pt-6",children:[(0,s.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:"Switches the UI and the language the agent writes in. Code, paths, and quoted source stay verbatim."}),(0,s.jsx)("div",{className:"max-w-xs",children:(0,s.jsxs)(y.l6,{value:C.includes(m.language)?m.language:"en",onValueChange:e=>{v(t=>({...t,language:e}))},children:[(0,s.jsx)(y.bq,{children:(0,s.jsx)(y.yv,{})}),(0,s.jsx)(y.gC,{children:C.map(e=>{var t;return(0,s.jsx)(y.eb,{value:e,children:null!=(t=B[e])?t:e},e)})})]})})]})})]}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:d("imageProcessing.title")}),(0,s.jsx)(h.Zp,{children:(0,s.jsxs)(h.Wu,{className:"pt-6 space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm",children:d.rich("imageProcessing.description",{dir:e=>(0,s.jsx)("code",{className:"font-mono text-xs",children:e})})}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:d("imageProcessing.hint")})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,s.jsx)(g.J,{htmlFor:"img-enabled",className:"text-xs",children:d("imageProcessing.enabledLabel")}),(0,s.jsx)(f.d,{id:"img-enabled",checked:m.imageProcessing.enabled,onCheckedChange:e=>W({enabled:e})})]})]}),(0,s.jsxs)("div",{className:m.imageProcessing.enabled?"space-y-4":"space-y-4 opacity-50 pointer-events-none",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)(g.J,{className:"text-xs text-muted-foreground",children:d("imageProcessing.maxDimensionLabel")}),(0,s.jsxs)("span",{className:"font-mono text-xs",children:[m.imageProcessing.maxDimension,"px"]})]}),(0,s.jsx)(j,{min:256,max:8192,step:64,value:[m.imageProcessing.maxDimension],onValueChange:e=>{var t;return W({maxDimension:null!=(t=e[0])?t:2e3})}}),(0,s.jsxs)("div",{className:"flex justify-between text-[10px] text-muted-foreground mt-1",children:[(0,s.jsx)("span",{children:"256"}),(0,s.jsx)("span",{children:"2048"}),(0,s.jsx)("span",{children:"4096"}),(0,s.jsx)("span",{children:"8192"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)(g.J,{className:"text-xs text-muted-foreground",children:d("imageProcessing.qualityLabel")}),(0,s.jsx)("span",{className:"font-mono text-xs",children:m.imageProcessing.quality})]}),(0,s.jsx)(j,{min:40,max:100,step:1,value:[m.imageProcessing.quality],onValueChange:e=>{var t;return W({quality:null!=(t=e[0])?t:85})}})]}),(0,s.jsxs)("div",{className:"max-w-xs",children:[(0,s.jsx)(g.J,{className:"text-xs text-muted-foreground",children:d("imageProcessing.formatLabel")}),(0,s.jsxs)(y.l6,{value:m.imageProcessing.format,onValueChange:e=>W({format:e}),children:[(0,s.jsx)(y.bq,{className:"mt-1",children:(0,s.jsx)(y.yv,{})}),(0,s.jsx)(y.gC,{children:T.map(e=>(0,s.jsxs)(y.eb,{value:e,children:[(0,s.jsx)("span",{className:"font-mono",children:e}),(0,s.jsx)("span",{className:"ml-2 text-muted-foreground text-xs",children:"auto"===e?d("imageProcessing.format.auto"):"jpeg"===e?d("imageProcessing.format.jpeg"):"webp"===e?d("imageProcessing.format.webp"):d("imageProcessing.format.original")})]},e))})]})]})]})]})})]}),O&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Harnesses"}),(0,s.jsx)("div",{className:"grid gap-4",children:a.map(e=>{var t,a,r,n,i,c;let d=L[e.id],u=m.harnesses[e.id].enabled;return(0,s.jsxs)(h.Zp,{children:[(0,s.jsx)(h.aR,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(h.ZB,{className:"flex items-center gap-2",children:[e.label,(0,s.jsx)(e4,{probe:d})]}),(0,s.jsx)(h.BT,{children:d?d.detail:"checking…"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)(x.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{I(e.id),E(e.id)},disabled:z[e.id],children:[(0,s.jsx)(l.A,{className:"mr-1 h-4 w-4 ".concat(z[e.id]?"animate-spin":"")}),"Refresh"]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(g.J,{htmlFor:"enable-".concat(e.id),className:"text-xs",children:"enabled"}),(0,s.jsx)(f.d,{id:"enable-".concat(e.id),checked:u,onCheckedChange:t=>{var a;return a=e.id,void v(e=>({...e,harnesses:{...e.harnesses,[a]:{...e.harnesses[a],enabled:t}}}))}})]})]})]})}),(0,s.jsxs)(h.Wu,{children:["ollama"===e.id&&(0,s.jsxs)("div",{className:"mb-3 flex items-center gap-2 max-w-md",children:[(0,s.jsx)(g.J,{htmlFor:"ollama-url",className:"text-xs w-24 shrink-0",children:"Base URL"}),(0,s.jsx)(p.p,{id:"ollama-url",value:m.harnesses.ollama.baseUrl,onChange:e=>{var t;return t=e.target.value,void v(e=>({...e,harnesses:{...e.harnesses,ollama:{...e.harnesses.ollama,baseUrl:t}}}))},placeholder:"http://localhost:11434",className:"font-mono text-xs"})]}),(0,s.jsxs)("div",{className:"text-xs text-muted-foreground",children:["Models loaded:"," ",z[e.id]?(0,s.jsxs)("span",{children:[(0,s.jsx)(o.A,{className:"inline h-3 w-3 animate-spin mr-1"}),"loading…"]}):R[e.id]?(0,s.jsx)("span",{className:"text-destructive",children:R[e.id]}):"".concat(null!=(i=null==(t=b[e.id])?void 0:t.length)?i:0),(null!=(c=null==(a=b[e.id])?void 0:a.length)?c:0)>0&&(0,s.jsxs)("span",{className:"ml-2",children:["(",null==(n=b[e.id])||null==(r=n[0])?void 0:r.source,")"]})]})]})]},e.id)})})]}),O&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Task assignments"}),(0,s.jsx)("div",{className:"grid gap-4",children:k.map(e=>{var t,r;let n=m.assignments[e],i=a.filter(t=>t.supports.includes(e)&&m.harnesses[t.id].enabled),l=null!=(r=b[n.harness])?r:[],o=null==(t=l[0])?void 0:t.source;return(0,s.jsxs)(h.Zp,{children:[(0,s.jsxs)(h.aR,{children:[(0,s.jsx)(h.ZB,{className:"text-base",children:S[e].title}),(0,s.jsx)(h.BT,{children:S[e].help})]}),(0,s.jsxs)(h.Wu,{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex flex-col md:flex-row md:items-end gap-3",children:[(0,s.jsxs)("div",{className:"flex-1 max-w-[200px]",children:[(0,s.jsx)(g.J,{className:"text-xs text-muted-foreground",children:"Harness"}),(0,s.jsxs)(y.l6,{value:n.harness,onValueChange:t=>{var a,s,r;return J(e,{harness:t,model:null!=(r=null==(s=b[t])||null==(a=s[0])?void 0:a.id)?r:""})},children:[(0,s.jsx)(y.bq,{className:"mt-1",children:(0,s.jsx)(y.yv,{})}),(0,s.jsx)(y.gC,{children:i.map(e=>(0,s.jsx)(y.eb,{value:e.id,children:e.label},e.id))})]})]}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)(g.J,{className:"text-xs text-muted-foreground",children:"Model"}),o&&(0,s.jsx)(N.E,{variant:"live"===o?"default":"secondary",className:"text-[10px] uppercase",children:o})]}),l.length>0?(0,s.jsxs)(y.l6,{value:n.model,onValueChange:t=>J(e,{model:t}),children:[(0,s.jsx)(y.bq,{className:"mt-1",children:(0,s.jsx)(y.yv,{placeholder:"select model"})}),(0,s.jsx)(y.gC,{children:l.map(e=>(0,s.jsxs)(y.eb,{value:e.id,children:[(0,s.jsx)("span",{className:"font-mono",children:e.id}),e.size&&(0,s.jsx)("span",{className:"ml-2 text-muted-foreground text-xs",children:e.size})]},e.id))})]}):(0,s.jsx)(p.p,{value:n.model,onChange:t=>J(e,{model:t.target.value}),placeholder:"model id",className:"mt-1 font-mono text-xs"})]})]}),"claude-code"===n.harness&&(0,s.jsx)(e2,{tools:n.allowedTools,onChange:t=>J(e,{allowedTools:t})})]})]},e)})})]}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Gemini"}),(0,s.jsx)(eR,{})]}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:d("imageSearch.title")}),(0,s.jsx)(eM,{})]}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:d("oauth.title")}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:d.rich("oauth.description",{code:e=>(0,s.jsx)("code",{children:e}),uri:e=>(0,s.jsx)("code",{className:"font-mono",children:e})})}),(0,s.jsx)(ev,{})]}),O&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:d("mcpServers.title")}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:d.rich("mcpServers.description",{code:e=>(0,s.jsx)("code",{children:e}),path:e=>(0,s.jsx)("code",{children:e})})}),(0,s.jsx)(ee,{})]}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:d("mapServices.title")}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:d("mapServices.description")}),(0,s.jsx)(eF,{settings:m,onChange:e=>v(t=>({...t,...e}))})]}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Notifications"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:"Reach you outside the app — scheduler, workflow, and agent output delivered to Telegram, where you can also chat back."}),(0,s.jsx)(eX,{settings:m,onChange:e=>v(t=>({...t,...e}))})]}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:d("ngrok.title")}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:d("ngrok.description")}),(0,s.jsx)(eH,{settings:m,onChange:e=>v(t=>({...t,...e}))})]}),O&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Prompt templates"}),(0,s.jsxs)("p",{className:"text-sm text-muted-foreground mb-3",children:["Stored on disk under ",(0,s.jsx)("code",{children:"~/.reflex/prompts/"}),". Edit here or directly in any editor. Use ",(0,s.jsx)("code",{children:"{{language}}"}),","," ",(0,s.jsx)("code",{children:"{{scope}}"}),", etc. — variable list is shown per template."]}),(0,s.jsx)($,{})]}),(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)(x.$,{onClick:()=>{F(async()=>{let e=await e1(m);if(!e.ok){var t;u.oR.error(null!=(t=e.error)?t:d("form.saveFailedFallback"));return}u.oR.success(d("form.savedToast")),_.refresh()})},disabled:P,children:P?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.A,{className:"mr-2 h-4 w-4 animate-spin"})," Saving…"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.A,{className:"mr-2 h-4 w-4"})," Save settings"]})})})]})}let e5=["Read","Write","Edit","LS","Glob","Grep","Bash","WebSearch","WebFetch","TodoWrite","Task","NotebookEdit"];function e2(e){let{tools:t,onChange:a}=e,n=(0,i.c)("settings"),l=e=>{let s=e.trim();s&&(t.includes(s)||a([...t,s]))},[o,c]=(0,r.useState)(""),d=e5.filter(e=>!t.includes(e));return(0,s.jsxs)("div",{className:"rounded-md border bg-muted/30 p-3 space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,s.jsx)(g.J,{className:"text-xs text-muted-foreground",children:"Allowed tools (claude-code)"}),(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:n("toolsPolicy.noToolsHint")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[0===t.length&&(0,s.jsx)("span",{className:"text-[11px] italic text-muted-foreground",children:n("toolsPolicy.usingDefaults")}),t.map(e=>(0,s.jsxs)(N.E,{variant:"secondary",className:"gap-1 font-mono",children:[e,(0,s.jsx)("button",{type:"button",className:"text-muted-foreground hover:text-foreground",onClick:()=>a(t.filter(t=>t!==e)),children:"\xd7"})]},e))]}),d.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:d.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>l(e),className:"text-[11px] font-mono rounded px-1.5 py-0.5 border border-dashed border-muted-foreground/40 text-muted-foreground hover:border-foreground hover:text-foreground",children:["+ ",e]},e))}),(0,s.jsxs)("form",{className:"flex gap-1",onSubmit:e=>{e.preventDefault(),l(o),c("")},children:[(0,s.jsx)(p.p,{value:o,onChange:e=>c(e.target.value),placeholder:n("toolsPolicy.customToolPlaceholder"),className:"h-7 text-xs font-mono"}),(0,s.jsx)(x.$,{type:"submit",size:"sm",variant:"ghost",className:"h-7",children:"+"})]})]})}function e4(e){let{probe:t}=e;return t?t.available?(0,s.jsxs)(N.E,{variant:"default",className:"gap-1 bg-emerald-600",children:[(0,s.jsx)(d.A,{className:"h-3 w-3"})," available"]}):(0,s.jsxs)(N.E,{variant:"destructive",className:"gap-1",children:[(0,s.jsx)(m.A,{className:"h-3 w-3"})," unavailable"]}):(0,s.jsxs)(N.E,{variant:"outline",className:"gap-1",children:[(0,s.jsx)(o.A,{className:"h-3 w-3 animate-spin"})," checking"]})}},13506:(e,t,a)=>{"use strict";a.d(t,{cn:()=>n});var s=a(47989),r=a(55701);function n(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,r.QP)((0,s.$)(t))}},15523:(e,t,a)=>{"use strict";a.d(t,{p:()=>n});var s=a(4624);a(99356);var r=a(13506);function n(e){let{className:t,type:a,...n}=e;return(0,s.jsx)("input",{type:a,"data-slot":"input",className:(0,r.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",t),...n})}},17121:(e,t,a)=>{Promise.resolve().then(a.bind(a,7e3)),Promise.resolve().then(a.bind(a,91074)),Promise.resolve().then(a.bind(a,96253)),Promise.resolve().then(a.bind(a,28050)),Promise.resolve().then(a.bind(a,94904)),Promise.resolve().then(a.bind(a,13270)),Promise.resolve().then(a.bind(a,99730)),Promise.resolve().then(a.bind(a,89146)),Promise.resolve().then(a.bind(a,19078)),Promise.resolve().then(a.bind(a,67854)),Promise.resolve().then(a.bind(a,69050)),Promise.resolve().then(a.bind(a,63739)),Promise.resolve().then(a.bind(a,33976)),Promise.resolve().then(a.bind(a,12537)),Promise.resolve().then(a.bind(a,97485)),Promise.resolve().then(a.bind(a,41923)),Promise.resolve().then(a.bind(a,73868)),Promise.resolve().then(a.bind(a,53511)),Promise.resolve().then(a.bind(a,2018)),Promise.resolve().then(a.bind(a,18487)),Promise.resolve().then(a.bind(a,98346)),Promise.resolve().then(a.bind(a,14884)),Promise.resolve().then(a.bind(a,85314)),Promise.resolve().then(a.bind(a,17280)),Promise.resolve().then(a.bind(a,8855)),Promise.resolve().then(a.bind(a,86631)),Promise.resolve().then(a.bind(a,2604)),Promise.resolve().then(a.bind(a,27237)),Promise.resolve().then(a.bind(a,49455)),Promise.resolve().then(a.bind(a,39211)),Promise.resolve().then(a.bind(a,56360)),Promise.resolve().then(a.t.bind(a,54400,23))},22841:(e,t,a)=>{"use strict";a.d(t,{bq:()=>m,eb:()=>x,gC:()=>u,l6:()=>c,yv:()=>d});var s=a(4624);a(99356);var r=a(69709),n=a(43153),i=a(59728),l=a(85314),o=a(13506);function c(e){let{...t}=e;return(0,s.jsx)(l.Root,{"data-slot":"select",...t})}function d(e){let{...t}=e;return(0,s.jsx)(l.Value,{"data-slot":"select-value",...t})}function m(e){let{className:t,size:a="default",children:n,...i}=e;return(0,s.jsxs)(l.Trigger,{"data-slot":"select-trigger","data-size":a,className:(0,o.cn)("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",t),...i,children:[n,(0,s.jsx)(l.Icon,{asChild:!0,children:(0,s.jsx)(r.A,{className:"size-4 opacity-50"})})]})}function u(e){let{className:t,children:a,position:r="item-aligned",align:n="center",...i}=e;return(0,s.jsx)(l.Portal,{children:(0,s.jsxs)(l.Content,{"data-slot":"select-content",className:(0,o.cn)("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,align:n,...i,children:[(0,s.jsx)(h,{}),(0,s.jsx)(l.Viewport,{className:(0,o.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:a}),(0,s.jsx)(p,{})]})})}function x(e){let{className:t,children:a,...r}=e;return(0,s.jsxs)(l.Item,{"data-slot":"select-item",className:(0,o.cn)("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...r,children:[(0,s.jsx)("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,s.jsx)(l.ItemIndicator,{children:(0,s.jsx)(n.A,{className:"size-4"})})}),(0,s.jsx)(l.ItemText,{children:a})]})}function h(e){let{className:t,...a}=e;return(0,s.jsx)(l.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:(0,o.cn)("flex cursor-default items-center justify-center py-1",t),...a,children:(0,s.jsx)(i.A,{className:"size-4"})})}function p(e){let{className:t,...a}=e;return(0,s.jsx)(l.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:(0,o.cn)("flex cursor-default items-center justify-center py-1",t),...a,children:(0,s.jsx)(r.A,{className:"size-4"})})}},28310:(e,t,a)=>{"use strict";a.d(t,{E:()=>o});var s=a(4624);a(99356);var r=a(60621),n=a(50362),i=a(13506);let l=(0,r.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:a="default",asChild:r=!1,...o}=e,c=r?n.bL:"span";return(0,s.jsx)(c,{"data-slot":"badge","data-variant":a,className:(0,i.cn)(l({variant:a}),t),...o})}},31050:(e,t,a)=>{"use strict";a.d(t,{J:()=>r});var s=a(7911);let r=(0,s.createServerReference)("40712890919625c2c36813dd5ee23495aa9ebb2225",s.callServer,void 0,s.findSourceMapURL,"getOAuthClientAction")},32165:(e,t,a)=>{"use strict";a.d(t,{d:()=>i});var s=a(4624);a(99356);var r=a(8855),n=a(13506);function i(e){let{className:t,size:a="default",...i}=e;return(0,s.jsx)(r.Root,{"data-slot":"switch","data-size":a,className:(0,n.cn)("peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",t),...i,children:(0,s.jsx)(r.Thumb,{"data-slot":"switch-thumb",className:(0,n.cn)("pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground")})})}},42713:(e,t,a)=>{"use strict";a.d(t,{MemoryEditor:()=>v});var s=a(4624),r=a(99356),n=a(56221),i=a(3239),l=a(85924),o=a(65714),c=a(46972),d=a(85253),m=a(4959),u=a(71651),x=a(13506),h=a(7911);let p=(0,h.createServerReference)("40a0f1cb3cfa854c9fa23ff252a1acbb859444bdbc",h.callServer,void 0,h.findSourceMapURL,"loadMemoryAction"),g=(0,h.createServerReference)("4053d631a3eb639fb38a7579a6d925b93f731ae43b",h.callServer,void 0,h.findSourceMapURL,"saveMemoryFileAction"),f=(0,h.createServerReference)("408f4c7e74a09fb767274f949eb863c9c6e18b49f4",h.callServer,void 0,h.findSourceMapURL,"wipeMemoryAction");function v(e){let{scope:t,rootId:a,title:n,description:o,allowWipe:c}=e,[d,u]=(0,r.useState)([]),[x,h]=(0,r.useState)(!0),[g,f]=(0,r.useState)(null),v=(0,r.useCallback)(async()=>{h(!0);let e=await p(a?{scope:t,rootId:a}:{scope:t});if(h(!1),!e.ok)return void f(e.error);f(null),u(e.files)},[t,a]);return(0,r.useEffect)(()=>{v()},[v]),(0,s.jsxs)(m.Zp,{children:[(0,s.jsx)(m.aR,{children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(m.ZB,{className:"text-lg",children:n}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:o})]}),c&&d.length>0&&(0,s.jsx)(j,{scope:t,rootId:a,onWiped:v})]})}),(0,s.jsx)(m.Wu,{children:x?(0,s.jsxs)("div",{className:"text-sm text-muted-foreground flex items-center gap-2",children:[(0,s.jsx)(i.A,{className:"h-3 w-3 animate-spin"})," Loading…"]}):g?(0,s.jsxs)("p",{className:"text-sm text-destructive flex items-center gap-2",children:[(0,s.jsx)(l.A,{className:"h-3.5 w-3.5"}),g]}):(0,s.jsx)("div",{className:"space-y-4",children:d.map(e=>(0,s.jsx)(b,{snapshot:e,scope:t,rootId:a,onSaved:e=>u(t=>t.map(t=>t.file===e.file?e:t))},e.file))})})]})}function b(e){let{snapshot:t,scope:a,rootId:l,onSaved:c}=e,[m,h]=(0,r.useState)(t.content),[p,f]=(0,r.useTransition)();(0,r.useEffect)(()=>{h(t.content)},[t.content]);let v=m.trim(),b=v?v.split("\n").length:0,j=b>t.cap,N=b>.9*t.cap,y=m!==t.content;return(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,s.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,s.jsx)("span",{className:"font-mono text-sm font-semibold",children:t.file}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:t.description})]}),(0,s.jsxs)("span",{className:(0,x.cn)("text-xs tabular-nums",j?"text-destructive font-medium":N?"text-amber-600":"text-muted-foreground"),children:[b,"/",t.cap]})]}),(0,s.jsx)(u.T,{value:m,onChange:e=>h(e.target.value),rows:Math.min(t.cap+2,Math.max(3,b+1)),placeholder:"Empty",className:"font-mono text-xs"}),(0,s.jsx)("div",{className:"flex items-center justify-end gap-2",children:(0,s.jsxs)(d.$,{type:"button",size:"sm",variant:y?"default":"ghost",disabled:!y||p||j,onClick:()=>{if(j)return void n.oR.error("".concat(t.file," exceeds ").concat(t.cap,"-line cap (").concat(b,"). Trim before saving."));f(async()=>{let e=await g({scope:a,...l?{rootId:l}:{},file:t.file,content:v});if(!e.ok){var s;n.oR.error(null!=(s=e.error)?s:"Save failed");return}n.oR.success("Saved ".concat(t.file)),c({...t,content:v,lines:e.lines})})},children:[p?(0,s.jsx)(i.A,{className:"mr-1 h-3 w-3 animate-spin"}):(0,s.jsx)(o.A,{className:"mr-1 h-3 w-3"}),"Save"]})})]})}function j(e){let{scope:t,rootId:a,onWiped:i}=e,[l,o]=(0,r.useTransition)();return(0,s.jsxs)(d.$,{type:"button",size:"sm",variant:"ghost",disabled:l,onClick:()=>{confirm("Erase ALL memory at this scope? Cannot be undone.")&&o(async()=>{let e=await f(a?{scope:t,rootId:a}:{scope:t});if(!e.ok){var s;n.oR.error(null!=(s=e.error)?s:"Wipe failed");return}n.oR.success("Memory wiped"),await i()})},className:"text-destructive hover:text-destructive",children:[(0,s.jsx)(c.A,{className:"mr-1 h-3 w-3"}),"Wipe all"]})}},43493:(e,t,a)=>{"use strict";a.d(t,{o:()=>r});var s=a(7911);let r=(0,s.createServerReference)("007665f5739979dd637783fae8cde2f73b50355c56",s.callServer,void 0,s.findSourceMapURL,"listOAuthStatusesAction")},49881:(e,t,a)=>{"use strict";a.d(t,{Xi:()=>d,av:()=>m,j7:()=>c,tU:()=>l});var s=a(4624);a(99356);var r=a(60621),n=a(86631),i=a(13506);function l(e){let{className:t,orientation:a="horizontal",...r}=e;return(0,s.jsx)(n.Root,{"data-slot":"tabs","data-orientation":a,orientation:a,className:(0,i.cn)("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",t),...r})}let o=(0,r.F)("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function c(e){let{className:t,variant:a="default",...r}=e;return(0,s.jsx)(n.List,{"data-slot":"tabs-list","data-variant":a,className:(0,i.cn)(o({variant:a}),t),...r})}function d(e){let{className:t,...a}=e;return(0,s.jsx)(n.Trigger,{"data-slot":"tabs-trigger",className:(0,i.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",t),...a})}function m(e){let{className:t,...a}=e;return(0,s.jsx)(n.Content,{"data-slot":"tabs-content",className:(0,i.cn)("flex-1 outline-none",t),...a})}},50284:(e,t,a)=>{"use strict";a.d(t,{T:()=>r});var s=a(7911);let r=(0,s.createServerReference)("601500c498ee7362ea0662ae9757a7fcf60ab33e0b",s.callServer,void 0,s.findSourceMapURL,"beginOAuthAction")},66459:(e,t,a)=>{"use strict";a.d(t,{O:()=>d});var s=a(4624),r=a(99356),n=a(43153),i=a(9598),l=a(56221),o=a(49411),c=a(85253);function d(e){let{steps:t}=e,a=(0,o.c)("app");return t&&0!==t.length?(0,s.jsx)("ol",{className:"space-y-2 text-xs",children:t.map((e,t)=>(0,s.jsxs)("li",{className:"flex gap-2",children:[(0,s.jsxs)("span",{className:"font-mono text-muted-foreground shrink-0 w-5 text-right",children:[t+1,"."]}),(0,s.jsxs)("div",{className:"space-y-1 flex-1 min-w-0",children:[(0,s.jsx)("div",{children:e.title}),e.choice&&(0,s.jsxs)("div",{className:"text-[11px]",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:a("oauth.copyHint")}),(0,s.jsx)("span",{className:"font-medium bg-muted/60 rounded px-1.5 py-0.5",children:e.choice})]}),e.body&&(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground",children:e.body}),e.copy&&(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[e.field&&(0,s.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:[e.field,":"]}),(0,s.jsx)("code",{className:"font-mono text-[11px] bg-muted/60 rounded px-1.5 py-0.5 break-all flex-1 min-w-0",children:e.copy}),(0,s.jsx)(m,{value:e.copy})]})]})]},t))}):null}function m(e){let{value:t}=e,a=(0,o.c)("app"),[d,m]=(0,r.useState)(!1);return(0,s.jsx)(c.$,{type:"button",size:"icon",variant:"ghost",className:"h-6 w-6 shrink-0",onClick:async()=>{try{await navigator.clipboard.writeText(t),m(!0),l.oR.success(a("oauth.copied")),setTimeout(()=>m(!1),1200)}catch(e){l.oR.error(a("oauth.copyFailed"))}},title:a("oauth.copy"),children:d?(0,s.jsx)(n.A,{className:"h-3 w-3 text-emerald-600"}):(0,s.jsx)(i.A,{className:"h-3 w-3"})})}},68682:(e,t,a)=>{"use strict";function s(e){return"".concat(e.lat,",").concat(e.lng)}function r(e){return"".concat(e.lng,",").concat(e.lat)}a.d(t,{JY:()=>i,yp:()=>n});let n=[{id:"google",label:"Google Maps",description:"Global, navigation + street view. Works everywhere except where the RF blocks it.",brand:"#4285F4",glyph:"G",urlFor:(e,t)=>"https://www.google.com/maps/dir/?api=1&destination=".concat(e,",").concat(t),routeUrlFor:e=>{if(e.length<2)return"";let t=s(e[0]),a=s(e[e.length-1]),r=e.slice(1,-1).map(s).join("|"),n=r?"&waypoints=".concat(encodeURIComponent(r)):"";return"https://www.google.com/maps/dir/?api=1&origin=".concat(t,"&destination=").concat(a).concat(n)}},{id:"yandex",label:"Yandex Maps",description:"CIS region, best RF detail and real-time traffic.",brand:"#FFCC00",glyph:"Y",urlFor:(e,t)=>"https://yandex.ru/maps/?rtext=~".concat(e,",").concat(t,"&rtt=auto"),routeUrlFor:e=>"https://yandex.ru/maps/?rtext=".concat(e.map(s).join("~"),"&rtt=auto")},{id:"2gis",label:"2GIS",description:"CIS region, precise addresses and POI. Uniquely strong on RF cities.",brand:"#1BA049",glyph:"2",urlFor:(e,t)=>"https://2gis.ru/routeSearch/to/".concat(t,",").concat(e),routeUrlFor:e=>{let t=r(e[0]),a=r(e[e.length-1]),s=e.slice(1,-1).map(e=>"/via/".concat(r(e))).join("");return"https://2gis.ru/routeSearch/rsType/car/from/".concat(t).concat(s,"/to/").concat(a)}},{id:"apple",label:"Apple Maps",description:"Opens in the native app on iOS/macOS, otherwise on the website.",brand:"#1d1d1f",glyph:"A",urlFor:(e,t)=>"https://maps.apple.com/?daddr=".concat(e,",").concat(t),routeUrlFor:e=>{let t=s(e[0]),a=e.slice(1).map(e=>"+to:".concat(s(e))).join("");return"https://maps.apple.com/?saddr=".concat(t,"&daddr=").concat(t).concat(a)}},{id:"osm",label:"OpenStreetMap",description:"Open data, no account required. Basic navigation.",brand:"#7EB73F",glyph:"OSM",urlFor:(e,t)=>"https://www.openstreetmap.org/directions?to=".concat(e,",").concat(t),routeUrlFor:e=>{let t=e.map(s).join(";");return"https://www.openstreetmap.org/directions?route=".concat(encodeURIComponent(t))}},{id:"waze",label:"Waze",description:"Car navigation with crowd-sourced traffic and alerts.",brand:"#33CCFF",glyph:"W",urlFor:(e,t)=>"https://waze.com/ul?ll=".concat(e,",").concat(t,"&navigate=yes"),routeUrlFor:e=>{let t=e[e.length-1];return"https://waze.com/ul?ll=".concat(t.lat,",").concat(t.lng,"&navigate=yes")}},{id:"organic",label:"Organic Maps",description:"Offline maps with open data. Opens in the app.",brand:"#006C35",glyph:"OM",urlFor:(e,t)=>"om://map?ll=".concat(e,",").concat(t),routeUrlFor:e=>{let t=e[0],a=e[e.length-1];return"om://route?sll=".concat(t.lat,",").concat(t.lng,"&saddr=&dll=").concat(a.lat,",").concat(a.lng,"&daddr=&type=vehicle")}}],i=["google","yandex","apple","osm"]},71651:(e,t,a)=>{"use strict";a.d(t,{T:()=>n});var s=a(4624);a(99356);var r=a(13506);function n(e){let{className:t,...a}=e;return(0,s.jsx)("textarea",{"data-slot":"textarea",className:(0,r.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",t),...a})}},72172:(e,t,a)=>{"use strict";a.d(t,{N:()=>r});var s=a(7911);let r=(0,s.createServerReference)("00b6c2c32283426c416f7c9c144290ac4a238b8d5f",s.callServer,void 0,s.findSourceMapURL,"getTunnelStatusAction")},75926:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var s=a(7911);let r=(0,s.createServerReference)("40a75de97953e58c554ec89e837383a466cd2497a5",s.callServer,void 0,s.findSourceMapURL,"saveGeminiKeyAction")},78825:(e,t,a)=>{"use strict";a.d(t,{J:()=>i});var s=a(4624);a(99356);var r=a(33976),n=a(13506);function i(e){let{className:t,...a}=e;return(0,s.jsx)(r.Root,{"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...a})}},85253:(e,t,a)=>{"use strict";a.d(t,{$:()=>o});var s=a(4624);a(99356);var r=a(60621),n=a(50362),i=a(13506);let l=(0,r.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:a="default",size:r="default",asChild:o=!1,...c}=e,d=o?n.bL:"button";return(0,s.jsx)(d,{"data-slot":"button","data-variant":a,"data-size":r,className:(0,i.cn)(l({variant:a,size:r,className:t})),...c})}},91074:(e,t,a)=>{"use strict";a.d(t,{Separator:()=>i});var s=a(4624);a(99356);var r=a(44188),n=a(13506);function i(e){let{className:t,orientation:a="horizontal",decorative:i=!0,...l}=e;return(0,s.jsx)(r.b,{"data-slot":"separator",decorative:i,orientation:a,className:(0,n.cn)("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...l})}}},e=>{e.O(0,[4400,4678,9776,6785,3335,9411,9338,4933,146,7358],()=>e(e.s=17121)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8580],{13506:(e,t,r)=>{"use strict";r.d(t,{cn:()=>i});var s=r(47989),a=r(55701);function i(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.QP)((0,s.$)(t))}},15361:(e,t,r)=>{"use strict";r.d(t,{ShareAuthForm:()=>d});var s=r(4624),a=r(99356),i=r(3239);let n=(0,r(45804).A)("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);var l=r(49411),o=r(7911);let c=(0,o.createServerReference)("60f2431a142b5509d08bf0849081a5619324fa98e3",o.callServer,void 0,o.findSourceMapURL,"submitSharePasswordAction");function d(e){let{shareId:t,error:r}=e,o=(0,l.c)("app"),[d,u]=(0,a.useTransition)();return(0,s.jsxs)("form",{action:e=>u(async()=>{var r;await c(t,(null!=(r=e.get("password"))?r:"").toString())}),className:"space-y-2",children:[(0,s.jsx)("label",{className:"block text-xs text-muted-foreground",htmlFor:"pw-".concat(t),children:o("share.auth.passwordLabel")}),(0,s.jsx)("input",{id:"pw-".concat(t),name:"password",type:"password",autoFocus:!0,className:"w-full rounded border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-violet-400",placeholder:"••••••••"}),"bad"===r&&(0,s.jsx)("p",{className:"text-xs text-destructive",children:o("share.auth.badPassword")}),(0,s.jsxs)("button",{type:"submit",disabled:d,className:"w-full rounded bg-violet-600 px-3 py-2 text-sm font-medium text-white hover:bg-violet-700 disabled:opacity-50 inline-flex items-center justify-center gap-2",children:[d?(0,s.jsx)(i.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(n,{className:"h-3.5 w-3.5"}),o("share.auth.open")]})]})}},33513:(e,t,r)=>{"use strict";r.d(t,{UtilityIframe:()=>x});var s=r(4624),a=r(99356),i=r(8096),n=r(13561),l=r(3239),o=r(95265),c=r(56221),d=r(49411),u=r(85253),h=r(71651),p=r(7911);let v=(0,p.createServerReference)("40f107ab9bba4b344ee4012a7726250eafe0be905b",p.callServer,void 0,p.findSourceMapURL,"startUtilityHelperChatAction");function m(e){let{utilityId:t,utilityName:r,rootId:p,requestSnapshot:m}=e,x=(0,d.c)("app"),[f,g]=(0,a.useState)(!1),[b,y]=(0,a.useState)(""),[k,w]=(0,a.useTransition)(),j=(0,a.useRef)(null);(0,a.useEffect)(()=>{var e;f&&(null==(e=j.current)||e.focus())},[f]);let N=!p,A=()=>{let e=b.trim();e&&p&&!k&&w(async()=>{let s;try{let e=await Promise.race([m(),new Promise(e=>setTimeout(()=>e(void 0),600))]);void 0!==e&&(s="string"==typeof e?e:JSON.stringify(e,null,2))}catch(e){}let a=await v({rootId:p,utilityId:t,utilityName:null!=r?r:t,question:e,...s?{context:s}:{}});if(!a.ok)return void c.oR.error(a.error);window.open("/roots/".concat(p,"/chat/").concat(a.topicId),"_blank"),y(""),g(!1)})};return f?(0,s.jsx)("div",{className:"absolute right-3 bottom-3 z-10 w-[min(28rem,calc(100%-1.5rem))]",children:(0,s.jsxs)("div",{className:"rounded-xl border bg-card shadow-xl",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b",children:[(0,s.jsx)(i.A,{className:"h-3.5 w-3.5 text-violet-600 shrink-0"}),(0,s.jsx)("span",{className:"text-sm font-medium truncate",children:x("utilities.ask.title",{name:null!=r?r:t})}),(0,s.jsx)("button",{type:"button",onClick:()=>g(!1),className:"ml-auto p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground shrink-0",title:x("utilities.ask.close"),"aria-label":x("utilities.ask.close"),children:(0,s.jsx)(n.A,{className:"h-3.5 w-3.5"})})]}),(0,s.jsxs)("div",{className:"p-2",children:[N?(0,s.jsx)("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:x("utilities.helper.projectOnly")}):(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsx)(h.T,{ref:j,value:b,onChange:e=>y(e.target.value),onKeyDown:e=>{if("Escape"===e.key){e.preventDefault(),g(!1);return}"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),A())},placeholder:x("utilities.ask.placeholder"),rows:1,disabled:k,className:"resize-none min-h-[44px] max-h-40 text-sm bg-background/70 py-2.5 flex-1"}),(0,s.jsx)(u.$,{type:"button",size:"lg",onClick:A,disabled:k||!b.trim(),className:"h-11 px-5 shadow-md shrink-0",children:k?(0,s.jsx)(l.A,{className:"h-4 w-4 animate-spin"}):(0,s.jsx)(o.A,{className:"h-4 w-4"})})]}),(0,s.jsx)("p",{className:"px-1 pt-1.5 text-[10px] text-muted-foreground",children:x("utilities.ask.hint")})]})]})}):(0,s.jsx)("button",{type:"button",onClick:()=>g(!0),className:"absolute right-3 bottom-3 z-10 inline-flex h-10 w-10 items-center justify-center rounded-full reflex-gradient text-white shadow-lg hover:opacity-90",title:x("utilities.iframe.openHelper"),"aria-label":x("utilities.iframe.openHelper"),children:(0,s.jsx)(i.A,{className:"h-4 w-4"})})}function x(e){let{scope:t,id:r,rootId:i,className:n,title:l,agentChat:o,utilityName:c}=e,d=(0,a.useRef)(null),u=(0,a.useRef)(null),h=i?"?rootId=".concat(encodeURIComponent(i)):"",p="/api/utilities/".concat(t,"/").concat(r,"/iframe").concat(h),v="/api/utilities/".concat(t,"/").concat(r,"/host").concat(h);(0,a.useEffect)(()=>{let e=async e=>{var t,r,s,a,i,n;let l=e.data;if(!l||e.source!==(null==(t=d.current)?void 0:t.contentWindow))return;if("snapshot-payload"===l.type){let e=u.current;e&&(clearTimeout(e.timer),u.current=null,e.resolve(l.snapshot));return}if("host-rpc"!==l.type)return;let o=l.id;try{let e=await fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({method:l.method,args:l.args})}),t=await e.json();null==(s=d.current)||null==(r=s.contentWindow)||r.postMessage(t.ok?{type:"host-rpc-result",id:o,ok:!0,result:t.result}:{type:"host-rpc-result",id:o,ok:!1,error:null!=(a=t.error)?a:"HTTP ".concat(e.status)},"*")}catch(e){null==(n=d.current)||null==(i=n.contentWindow)||i.postMessage({type:"host-rpc-result",id:o,ok:!1,error:e instanceof Error?e.message:String(e)},"*")}};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[v]);let x=(0,s.jsx)("iframe",{ref:d,src:p,sandbox:"allow-scripts allow-forms allow-same-origin",className:null!=n?n:"h-full w-full border-0 bg-white",title:null!=l?l:"utility-".concat(r)});return o?(0,s.jsxs)("div",{className:"relative h-full w-full",children:[x,(0,s.jsx)(m,{utilityId:r,...c?{utilityName:c}:{},...i?{rootId:i}:{},requestSnapshot:()=>{var e;let t=null==(e=d.current)?void 0:e.contentWindow;return t?(u.current&&(clearTimeout(u.current.timer),u.current.resolve(void 0),u.current=null),new Promise(e=>{let r=setTimeout(()=>{var t;(null==(t=u.current)?void 0:t.resolve)===e&&(u.current=null,e(void 0))},500);u.current={resolve:e,timer:r};try{t.postMessage({type:"request-snapshot"},"*")}catch(t){clearTimeout(r),u.current=null,e(void 0)}})):Promise.resolve(void 0)}})]}):x}},35285:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])},41379:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},41695:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]])},50308:(e,t,r)=>{Promise.resolve().then(r.bind(r,33513)),Promise.resolve().then(r.bind(r,58610)),Promise.resolve().then(r.bind(r,15361)),Promise.resolve().then(r.t.bind(r,54400,23))},54207:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},57308:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]])},58610:(e,t,r)=>{"use strict";r.d(t,{ReadonlyWidget:()=>a});var s=r(95933);function a(e){let{kind:t,data:r}=e;return(0,s.v)("",t,r,{readonly:!0})}},64681:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]])},71651:(e,t,r)=>{"use strict";r.d(t,{T:()=>i});var s=r(4624);r(99356);var a=r(13506);function i(e){let{className:t,...r}=e;return(0,s.jsx)("textarea",{"data-slot":"textarea",className:(0,a.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",t),...r})}},84630:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]])},85253:(e,t,r)=>{"use strict";r.d(t,{$:()=>o});var s=r(4624);r(99356);var a=r(60621),i=r(50362),n=r(13506);let l=(0,a.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:r="default",size:a="default",asChild:o=!1,...c}=e,d=o?i.bL:"button";return(0,s.jsx)(d,{"data-slot":"button","data-variant":r,"data-size":a,className:(0,n.cn)(l({variant:r,size:a,className:t})),...c})}},85785:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},87738:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]])},96447:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])}},e=>{e.O(0,[4400,4678,9776,9411,7425,3695,5933,4933,146,7358],()=>e(e.s=50308)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[526],{3024:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},3239:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},3747:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},8096:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]])},9598:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},13506:(e,t,r)=>{"use strict";r.d(t,{cn:()=>a});var s=r(47989),i=r(55701);function a(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,i.QP)((0,s.$)(t))}},13561:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},15523:(e,t,r)=>{"use strict";r.d(t,{p:()=>a});var s=r(4624);r(99356);var i=r(13506);function a(e){let{className:t,type:r,...a}=e;return(0,s.jsx)("input",{type:r,"data-slot":"input",className:(0,i.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",t),...a})}},21093:(e,t,r)=>{"use strict";r.d(t,{ManifestPanel:()=>T});var s=r(4624),i=r(99356),a=r(45804);let n=(0,a.A)("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);var l=r(76974),o=r(3239);let d=(0,a.A)("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);var c=r(3747),u=r(56221),h=r(69285),m=r(49411),v=r(28310),p=r(85253),x=r(71651),f=r(7911);let b=(0,f.createServerReference)("702cd9213a8da3e920edd5d0cec987ed2d349d285d",f.callServer,void 0,f.findSourceMapURL,"rebuildUtilityAction"),g=(0,f.createServerReference)("704520fcf9766d1416e575f6d2b096f57351ce45d8",f.callServer,void 0,f.findSourceMapURL,"checkUpdateAction"),y=(0,f.createServerReference)("4044f135c37afa14db86f4ef2cf67e3c10c4c208cc",f.callServer,void 0,f.findSourceMapURL,"editUtilityAction");var k=r(94151),w=r(43153),j=r(41280),N=r(84784),A=r(46972),S=r(15523),P=r(78825);let R=(0,f.createServerReference)("409fc8104dab3afd3332fd70ce21750e38dc84915e",f.callServer,void 0,f.findSourceMapURL,"listUtilitySecretsAction"),z=(0,f.createServerReference)("40ba2b561ca0f3ef7c0d8e07989ea9355158703be5",f.callServer,void 0,f.findSourceMapURL,"setUtilitySecretAction"),M=(0,f.createServerReference)("40e68a21922ba4a088a51f633e34e0d80f5e76f655",f.callServer,void 0,f.findSourceMapURL,"deleteUtilitySecretAction");function C(e){let{scope:t,id:r,rootId:a,declared:n}=e,l=(0,m.c)("app"),[d,c]=(0,i.useState)(()=>{let e={};for(let t of n)e[t.key]={set:!1,draft:"",reveal:!1};return e}),[h,x]=(0,i.useState)(null),[,f]=(0,i.useTransition)();(0,i.useEffect)(()=>{f(async()=>{let e=await R({scope:t,id:r,...a?{rootId:a}:{}});if(!e.ok)return void u.oR.error(e.error);c(t=>{let r={};for(let a of e.secrets){var s,i;r[a.key]={set:a.set,draft:"",reveal:null!=(i=null==(s=t[a.key])?void 0:s.reveal)&&i}}return r})})},[t,r,a]);let b=async e=>{let s=d[e];if(!s||!s.draft)return void u.oR.error(l("utilities.secrets.enterValue"));x(e);try{let i=await z({scope:t,id:r,...a?{rootId:a}:{},key:e,value:s.draft});if(!i.ok)return void u.oR.error(i.error);u.oR.success(l("utilities.secrets.saved",{key:e})),c(t=>({...t,[e]:{set:!0,draft:"",reveal:!1}}))}finally{x(null)}},g=async e=>{x(e);try{let s=await M({scope:t,id:r,...a?{rootId:a}:{},key:e});if(!s.ok)return void u.oR.error(s.error);u.oR.success(l("utilities.secrets.deleted",{key:e})),c(t=>({...t,[e]:{set:!1,draft:"",reveal:!1}}))}finally{x(null)}};return 0===n.length?null:(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground flex items-center gap-1",children:[(0,s.jsx)(k.A,{className:"h-3 w-3"})," ",l("utilities.secrets.title")]}),(0,s.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:[l("utilities.secrets.description1"),(0,s.jsx)("code",{className:"font-mono",children:"~/.reflex/secrets/"}),l("utilities.secrets.description2")," ",(0,s.jsx)("code",{className:"font-mono",children:"reflex.secrets.get"}),"."]}),(0,s.jsx)("ul",{className:"space-y-3",children:n.map(e=>{var t;let r=null!=(t=d[e.key])?t:{set:!1,draft:"",reveal:!1},i=h===e.key;return(0,s.jsxs)("li",{className:"space-y-1.5",children:[(0,s.jsxs)(P.J,{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"font-mono",children:e.key}),r.set?(0,s.jsxs)(v.E,{variant:"secondary",className:"gap-1",children:[(0,s.jsx)(w.A,{className:"h-2.5 w-2.5"})," set"]}):e.required?(0,s.jsx)(v.E,{variant:"destructive",children:l("utilities.secrets.missingRequired")}):(0,s.jsx)(v.E,{variant:"outline",children:l("utilities.secrets.empty")})]}),(0,s.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:[e.label,e.description?" \xb7 ".concat(e.description):""]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(S.p,{type:r.reveal?"text":"password",value:r.draft,onChange:t=>c(s=>({...s,[e.key]:{...r,draft:t.target.value}})),placeholder:r.set?l("utilities.secrets.placeholderSet"):l("utilities.secrets.placeholderEmpty"),className:"font-mono text-xs flex-1 h-8",disabled:i}),(0,s.jsx)(p.$,{type:"button",size:"icon",variant:"ghost",className:"h-8 w-8 shrink-0",onClick:()=>c(t=>({...t,[e.key]:{...r,reveal:!r.reveal}})),title:r.reveal?l("utilities.secrets.hide"):l("utilities.secrets.show"),children:r.reveal?(0,s.jsx)(j.A,{className:"h-3.5 w-3.5"}):(0,s.jsx)(N.A,{className:"h-3.5 w-3.5"})})]}),(0,s.jsxs)("div",{className:"flex gap-1",children:[(0,s.jsx)(p.$,{type:"button",size:"sm",variant:"default",className:"h-7 text-xs flex-1",onClick:()=>void b(e.key),disabled:i||!r.draft,children:i?(0,s.jsx)(o.A,{className:"h-3 w-3 animate-spin"}):l("utilities.secrets.save")}),r.set&&(0,s.jsx)(p.$,{type:"button",size:"sm",variant:"outline",className:"h-7 text-xs",onClick:()=>void g(e.key),disabled:i,children:(0,s.jsx)(A.A,{className:"h-3 w-3"})})]})]},e.key)})})]})}function T(e){var t,r,a,f,k,w,j,N,A;let{scope:S,id:P,rootId:R,manifest:z,dir:M}=e,T=(0,m.c)("app"),[U,E]=(0,i.useTransition)(),[I,_]=(0,i.useTransition)(),[O,V]=(0,i.useTransition)(),$=(0,h.useRouter)(),[q,H]=(0,i.useState)(null),[D,F]=(0,i.useState)(""),W=null==(r=z.source)||null==(t=r.origin)?void 0:t.startsWith("github:");return(0,s.jsxs)("div",{className:"space-y-4 text-xs",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:T("utilities.manifest.sourceTitle")}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(v.E,{variant:"secondary",className:"capitalize",children:null!=(j=null==(a=z.source)?void 0:a.type)?j:"unknown"}),(null==(f=z.source)?void 0:f.origin)&&(0,s.jsx)("div",{className:"font-mono break-all text-muted-foreground",children:z.source.origin}),(null==(k=z.source)?void 0:k.fetchedAt)&&(0,s.jsx)("div",{className:"text-muted-foreground",children:new Date(z.source.fetchedAt).toLocaleString()})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:T("utilities.manifest.filesTitle")}),(0,s.jsx)("div",{className:"font-mono break-all text-muted-foreground",children:M})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1 flex items-center gap-1",children:[(0,s.jsx)(n,{className:"h-3 w-3"})," Permissions"]}),(0,s.jsx)(L,{manifest:z})]}),(null!=(N=null==(w=z.secrets)?void 0:w.length)?N:0)>0&&(0,s.jsx)("div",{className:"pt-2 border-t",children:(0,s.jsx)(C,{scope:S,id:P,...R?{rootId:R}:{},declared:null!=(A=z.secrets)?A:[]})}),z.serverActions.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:T("utilities.manifest.serverActions")}),(0,s.jsx)("ul",{className:"space-y-1",children:z.serverActions.map(e=>(0,s.jsxs)("li",{children:[(0,s.jsx)(v.E,{variant:"outline",className:"font-mono mr-1",children:e.name}),(0,s.jsxs)("span",{className:"text-muted-foreground",children:["→ ",e.entry]})]},e.name))})]}),(0,s.jsxs)("div",{className:"pt-2 border-t space-y-2",children:[(0,s.jsxs)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground flex items-center gap-1",children:[(0,s.jsx)(l.A,{className:"h-3 w-3"})," ",T("utilities.manifest.editTitle")]}),(0,s.jsx)(x.T,{value:D,onChange:e=>F(e.target.value),placeholder:T("utilities.manifest.editPlaceholder"),className:"text-xs min-h-[80px]",disabled:O}),(0,s.jsxs)(p.$,{type:"button",size:"sm",className:"w-full",onClick:()=>{let e=D.trim();if(!e)return void u.oR.error(T("utilities.manifest.editEmpty"));V(async()=>{let t=await y({scope:S,id:P,...R?{rootId:R}:{},instruction:e});if(!t.ok)return void u.oR.error(t.error);u.oR.success(T("utilities.manifest.topicStarted")),F(""),$.push("/roots/".concat(t.rootId,"/chat/").concat(t.topicId))})},disabled:O||!D.trim(),children:[O?(0,s.jsx)(o.A,{className:"mr-2 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(l.A,{className:"mr-2 h-3.5 w-3.5"}),T("utilities.manifest.editButton")]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t",children:[(0,s.jsxs)(p.$,{type:"button",size:"sm",variant:"outline",onClick:()=>E(async()=>{var e;let t=await b(S,P,R);t.ok?(u.oR.success(T("utilities.manifest.bundleRebuilt")),$.refresh()):u.oR.error(null!=(e=t.error)?e:"fail")}),disabled:U,children:[U?(0,s.jsx)(o.A,{className:"mr-2 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(d,{className:"mr-2 h-3.5 w-3.5"}),T("utilities.manifest.rebuildButton")]}),W&&(0,s.jsxs)(p.$,{type:"button",size:"sm",variant:"outline",onClick:()=>_(async()=>{let e=await g(S,P,R);if(!e.ok)return void u.oR.error(e.error);if(e.upToDate)H(null),u.oR.success(T("utilities.manifest.upToDate"));else{var t,r;H(T("utilities.manifest.newShaAvailable",{sha:null!=(r=null==(t=e.latestSha)?void 0:t.slice(0,7))?r:""}))}}),disabled:I,children:[I?(0,s.jsx)(o.A,{className:"mr-2 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(c.A,{className:"mr-2 h-3.5 w-3.5"}),T("utilities.manifest.checkUpdates")]}),q&&(0,s.jsxs)("div",{className:"rounded border border-emerald-400 bg-emerald-50 px-2 py-1 text-emerald-900",children:[q,T("utilities.manifest.updateBannerSuffix")]})]})]})}function L(e){var t,r,i,a,n,l,o,d,c,u,h,v,p,x;let{manifest:f}=e,b=(0,m.c)("app"),g=f.permissions,y=[];return((null==(r=g.llm)||null==(t=r.tasks)?void 0:t.length)&&y.push("llm.tasks = [".concat(g.llm.tasks.join(", "),"]")),(null==(i=g.kb)?void 0:i.read)&&y.push("kb.read"),(null==(a=g.kb)?void 0:a.write)&&y.push("kb.write"),(null==(l=g.kb)||null==(n=l.kinds)?void 0:n.length)&&y.push("kb.kinds = [".concat(g.kb.kinds.join(", "),"]")),(null==(o=g.fs)?void 0:o.sandbox)&&y.push("fs (sandboxed in data/)"),(null==(u=g.web)||null==(c=u.fetch)||null==(d=c.domains)?void 0:d.length)&&y.push("web.fetch = [".concat(g.web.fetch.domains.join(", "),"]")),(null==(h=g.web)?void 0:h.search)&&y.push("web.search"),(null==(v=g.audit)?void 0:v.write)&&y.push("audit.write"),(null==(p=g.workers)?void 0:p.enabled)&&y.push("workers (max ".concat(null!=(x=g.workers.maxConcurrent)?x:1,")")),0===y.length)?(0,s.jsx)("p",{className:"text-muted-foreground italic",children:b("utilities.manifest.noPermissions")}):(0,s.jsx)("ul",{className:"space-y-0.5 font-mono",children:y.map(e=>(0,s.jsx)("li",{children:e},e))})}},28310:(e,t,r)=>{"use strict";r.d(t,{E:()=>o});var s=r(4624);r(99356);var i=r(60621),a=r(50362),n=r(13506);let l=(0,i.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:r="default",asChild:i=!1,...o}=e,d=i?a.bL:"span";return(0,s.jsx)(d,{"data-slot":"badge","data-variant":r,className:(0,n.cn)(l({variant:r}),t),...o})}},30441:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]])},33513:(e,t,r)=>{"use strict";r.d(t,{UtilityIframe:()=>x});var s=r(4624),i=r(99356),a=r(8096),n=r(13561),l=r(3239),o=r(95265),d=r(56221),c=r(49411),u=r(85253),h=r(71651),m=r(7911);let v=(0,m.createServerReference)("40f107ab9bba4b344ee4012a7726250eafe0be905b",m.callServer,void 0,m.findSourceMapURL,"startUtilityHelperChatAction");function p(e){let{utilityId:t,utilityName:r,rootId:m,requestSnapshot:p}=e,x=(0,c.c)("app"),[f,b]=(0,i.useState)(!1),[g,y]=(0,i.useState)(""),[k,w]=(0,i.useTransition)(),j=(0,i.useRef)(null);(0,i.useEffect)(()=>{var e;f&&(null==(e=j.current)||e.focus())},[f]);let N=!m,A=()=>{let e=g.trim();e&&m&&!k&&w(async()=>{let s;try{let e=await Promise.race([p(),new Promise(e=>setTimeout(()=>e(void 0),600))]);void 0!==e&&(s="string"==typeof e?e:JSON.stringify(e,null,2))}catch(e){}let i=await v({rootId:m,utilityId:t,utilityName:null!=r?r:t,question:e,...s?{context:s}:{}});if(!i.ok)return void d.oR.error(i.error);window.open("/roots/".concat(m,"/chat/").concat(i.topicId),"_blank"),y(""),b(!1)})};return f?(0,s.jsx)("div",{className:"absolute right-3 bottom-3 z-10 w-[min(28rem,calc(100%-1.5rem))]",children:(0,s.jsxs)("div",{className:"rounded-xl border bg-card shadow-xl",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b",children:[(0,s.jsx)(a.A,{className:"h-3.5 w-3.5 text-violet-600 shrink-0"}),(0,s.jsx)("span",{className:"text-sm font-medium truncate",children:x("utilities.ask.title",{name:null!=r?r:t})}),(0,s.jsx)("button",{type:"button",onClick:()=>b(!1),className:"ml-auto p-1 rounded hover:bg-accent text-muted-foreground hover:text-foreground shrink-0",title:x("utilities.ask.close"),"aria-label":x("utilities.ask.close"),children:(0,s.jsx)(n.A,{className:"h-3.5 w-3.5"})})]}),(0,s.jsxs)("div",{className:"p-2",children:[N?(0,s.jsx)("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:x("utilities.helper.projectOnly")}):(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsx)(h.T,{ref:j,value:g,onChange:e=>y(e.target.value),onKeyDown:e=>{if("Escape"===e.key){e.preventDefault(),b(!1);return}"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),A())},placeholder:x("utilities.ask.placeholder"),rows:1,disabled:k,className:"resize-none min-h-[44px] max-h-40 text-sm bg-background/70 py-2.5 flex-1"}),(0,s.jsx)(u.$,{type:"button",size:"lg",onClick:A,disabled:k||!g.trim(),className:"h-11 px-5 shadow-md shrink-0",children:k?(0,s.jsx)(l.A,{className:"h-4 w-4 animate-spin"}):(0,s.jsx)(o.A,{className:"h-4 w-4"})})]}),(0,s.jsx)("p",{className:"px-1 pt-1.5 text-[10px] text-muted-foreground",children:x("utilities.ask.hint")})]})]})}):(0,s.jsx)("button",{type:"button",onClick:()=>b(!0),className:"absolute right-3 bottom-3 z-10 inline-flex h-10 w-10 items-center justify-center rounded-full reflex-gradient text-white shadow-lg hover:opacity-90",title:x("utilities.iframe.openHelper"),"aria-label":x("utilities.iframe.openHelper"),children:(0,s.jsx)(a.A,{className:"h-4 w-4"})})}function x(e){let{scope:t,id:r,rootId:a,className:n,title:l,agentChat:o,utilityName:d}=e,c=(0,i.useRef)(null),u=(0,i.useRef)(null),h=a?"?rootId=".concat(encodeURIComponent(a)):"",m="/api/utilities/".concat(t,"/").concat(r,"/iframe").concat(h),v="/api/utilities/".concat(t,"/").concat(r,"/host").concat(h);(0,i.useEffect)(()=>{let e=async e=>{var t,r,s,i,a,n;let l=e.data;if(!l||e.source!==(null==(t=c.current)?void 0:t.contentWindow))return;if("snapshot-payload"===l.type){let e=u.current;e&&(clearTimeout(e.timer),u.current=null,e.resolve(l.snapshot));return}if("host-rpc"!==l.type)return;let o=l.id;try{let e=await fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({method:l.method,args:l.args})}),t=await e.json();null==(s=c.current)||null==(r=s.contentWindow)||r.postMessage(t.ok?{type:"host-rpc-result",id:o,ok:!0,result:t.result}:{type:"host-rpc-result",id:o,ok:!1,error:null!=(i=t.error)?i:"HTTP ".concat(e.status)},"*")}catch(e){null==(n=c.current)||null==(a=n.contentWindow)||a.postMessage({type:"host-rpc-result",id:o,ok:!1,error:e instanceof Error?e.message:String(e)},"*")}};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[v]);let x=(0,s.jsx)("iframe",{ref:c,src:m,sandbox:"allow-scripts allow-forms allow-same-origin",className:null!=n?n:"h-full w-full border-0 bg-white",title:null!=l?l:"utility-".concat(r)});return o?(0,s.jsxs)("div",{className:"relative h-full w-full",children:[x,(0,s.jsx)(p,{utilityId:r,...d?{utilityName:d}:{},...a?{rootId:a}:{},requestSnapshot:()=>{var e;let t=null==(e=c.current)?void 0:e.contentWindow;return t?(u.current&&(clearTimeout(u.current.timer),u.current.resolve(void 0),u.current=null),new Promise(e=>{let r=setTimeout(()=>{var t;(null==(t=u.current)?void 0:t.resolve)===e&&(u.current=null,e(void 0))},500);u.current={resolve:e,timer:r};try{t.postMessage({type:"request-snapshot"},"*")}catch(t){clearTimeout(r),u.current=null,e(void 0)}})):Promise.resolve(void 0)}})]}):x}},41280:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},43153:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},46972:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},49833:(e,t,r)=>{"use strict";r.d(t,{UtilityFrame:()=>a});var s=r(4624),i=r(33513);function a(e){let{scope:t,id:r,rootId:a,agentChat:n,utilityName:l}=e;return(0,s.jsx)(i.UtilityIframe,{scope:t,id:r,...a?{rootId:a}:{},...n?{agentChat:!0}:{},...l?{utilityName:l}:{}})}},53931:(e,t,r)=>{Promise.resolve().then(r.bind(r,65566)),Promise.resolve().then(r.bind(r,21093)),Promise.resolve().then(r.bind(r,49833)),Promise.resolve().then(r.bind(r,91074)),Promise.resolve().then(r.bind(r,96253)),Promise.resolve().then(r.bind(r,28050)),Promise.resolve().then(r.bind(r,94904)),Promise.resolve().then(r.bind(r,13270)),Promise.resolve().then(r.bind(r,99730)),Promise.resolve().then(r.bind(r,89146)),Promise.resolve().then(r.bind(r,19078)),Promise.resolve().then(r.bind(r,67854)),Promise.resolve().then(r.bind(r,69050)),Promise.resolve().then(r.bind(r,63739)),Promise.resolve().then(r.bind(r,33976)),Promise.resolve().then(r.bind(r,12537)),Promise.resolve().then(r.bind(r,97485)),Promise.resolve().then(r.bind(r,41923)),Promise.resolve().then(r.bind(r,73868)),Promise.resolve().then(r.bind(r,53511)),Promise.resolve().then(r.bind(r,2018)),Promise.resolve().then(r.bind(r,18487)),Promise.resolve().then(r.bind(r,98346)),Promise.resolve().then(r.bind(r,14884)),Promise.resolve().then(r.bind(r,85314)),Promise.resolve().then(r.bind(r,17280)),Promise.resolve().then(r.bind(r,8855)),Promise.resolve().then(r.bind(r,86631)),Promise.resolve().then(r.bind(r,2604)),Promise.resolve().then(r.bind(r,27237)),Promise.resolve().then(r.bind(r,49455)),Promise.resolve().then(r.bind(r,39211)),Promise.resolve().then(r.bind(r,56360)),Promise.resolve().then(r.t.bind(r,54400,23))},60621:(e,t,r)=>{"use strict";r.d(t,{F:()=>n});var s=r(47989);let i=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=s.$,n=(e,t)=>r=>{var s;if((null==t?void 0:t.variants)==null)return a(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:n,defaultVariants:l}=t,o=Object.keys(n).map(e=>{let t=null==r?void 0:r[e],s=null==l?void 0:l[e];if(null===t)return null;let a=i(t)||i(s);return n[e][a]}),d=r&&Object.entries(r).reduce((e,t)=>{let[r,s]=t;return void 0===s||(e[r]=s),e},{});return a(e,o,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:r,className:s,...i}=t;return Object.entries(i).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...l,...d}[t]):({...l,...d})[t]===r})?[...e,r,s]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},65566:(e,t,r)=>{"use strict";r.d(t,{ShareButton:()=>p});var s=r(4624),i=r(99356),a=r(30441),n=r(43153),l=r(9598),o=r(13561),d=r(3024),c=r(56221),u=r(49411),h=r(7911);let m=(0,h.createServerReference)("40cba06848b80561b4d6c130b8eee7ce9275caf0dd",h.callServer,void 0,h.findSourceMapURL,"createShareAction");var v=r(72172);function p(e){let t=(0,u.c)("app"),[r,h]=(0,i.useState)(!1),[p,x]=(0,i.useState)(""),[f,b]=(0,i.useTransition)(),[g,y]=(0,i.useState)(null);return r?g?(0,s.jsxs)("div",{className:"rounded border bg-card p-2 text-xs space-y-1.5 w-full max-w-sm",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-emerald-700",children:[(0,s.jsx)(n.A,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{className:"font-medium",children:t("share.button.createdTitle")})]}),(0,s.jsx)("a",{href:g.url,target:"_blank",rel:"noopener noreferrer",className:"block font-mono text-[11px] text-violet-700 hover:underline break-all",children:g.url}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>void navigator.clipboard.writeText(g.url).then(()=>c.oR.success(t("share.button.copied"))),className:"inline-flex items-center gap-1 rounded border px-2 py-0.5 hover:bg-accent",children:[(0,s.jsx)(l.A,{className:"h-3 w-3"}),t("share.button.copy")]}),(0,s.jsx)("button",{type:"button",onClick:()=>{y(null),h(!1),x("")},className:"text-muted-foreground hover:text-foreground",children:t("share.button.done")})]})]}):(0,s.jsxs)("div",{className:"rounded border bg-card p-2 text-xs space-y-1.5 w-full max-w-sm",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(a.A,{className:"h-3.5 w-3.5 text-violet-600"}),(0,s.jsx)("span",{className:"font-medium",children:t("share.button.newLink")}),(0,s.jsx)("button",{type:"button",onClick:()=>h(!1),className:"ml-auto text-muted-foreground hover:text-foreground",children:(0,s.jsx)(o.A,{className:"h-3 w-3"})})]}),(0,s.jsx)("label",{className:"block text-[10px] text-muted-foreground",children:t("share.button.passwordLabel")}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(d.A,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground pointer-events-none"}),(0,s.jsx)("input",{type:"password",value:p,onChange:e=>x(e.target.value),autoFocus:!0,placeholder:t("share.button.passwordPlaceholder"),className:"w-full rounded border bg-background pl-6 pr-2 py-1 text-xs focus:outline-none focus:ring-1 focus:ring-violet-400"})]}),(0,s.jsx)("button",{type:"button",onClick:()=>{b(async()=>{var r;let s=await (0,v.N)(),i=await m({kind:e.kind,...e.rootId?{rootId:e.rootId}:{},...e.utilityScope?{utilityScope:e.utilityScope}:{},...e.utilityId?{utilityId:e.utilityId}:{},...e.kbRelPath?{kbRelPath:e.kbRelPath}:{},...e.label?{label:e.label}:{},...p.trim()?{password:p.trim()}:{}});if(!i.ok)return void c.oR.error(i.error);let a=null!=(r=s.status.publicUrl)?r:window.location.origin,n=new URL("/share/".concat(i.share.id),a).toString();y({share:i.share,url:n}),navigator.clipboard.writeText(n).catch(()=>null),c.oR.success(s.status.running?t("share.button.created"):t("share.button.createdNoTunnel"))})},disabled:f,className:"w-full rounded bg-violet-600 text-white px-2 py-1 hover:bg-violet-700 disabled:opacity-50 inline-flex items-center justify-center gap-1",children:f?t("share.button.creating"):t("share.button.create")}),(0,s.jsx)("p",{className:"text-[10px] text-muted-foreground",children:t("share.button.footer")})]}):(0,s.jsxs)("button",{type:"button",onClick:()=>h(!0),className:e.iconOnly?"p-1 rounded hover:bg-accent text-muted-foreground hover:text-violet-700":"inline-flex items-center gap-1 rounded border px-2 py-1 text-xs hover:bg-accent",title:t("share.button.title"),children:[(0,s.jsx)(a.A,{className:"h-3.5 w-3.5"}),!e.iconOnly&&t("share.button.label")]})}},69285:(e,t,r)=>{"use strict";var s=r(48849);r.o(s,"usePathname")&&r.d(t,{usePathname:function(){return s.usePathname}}),r.o(s,"useRouter")&&r.d(t,{useRouter:function(){return s.useRouter}})},71651:(e,t,r)=>{"use strict";r.d(t,{T:()=>a});var s=r(4624);r(99356);var i=r(13506);function a(e){let{className:t,...r}=e;return(0,s.jsx)("textarea",{"data-slot":"textarea",className:(0,i.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",t),...r})}},72172:(e,t,r)=>{"use strict";r.d(t,{N:()=>i});var s=r(7911);let i=(0,s.createServerReference)("00b6c2c32283426c416f7c9c144290ac4a238b8d5f",s.callServer,void 0,s.findSourceMapURL,"getTunnelStatusAction")},76974:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},78825:(e,t,r)=>{"use strict";r.d(t,{J:()=>n});var s=r(4624);r(99356);var i=r(33976),a=r(13506);function n(e){let{className:t,...r}=e;return(0,s.jsx)(i.Root,{"data-slot":"label",className:(0,a.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...r})}},84784:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},85253:(e,t,r)=>{"use strict";r.d(t,{$:()=>o});var s=r(4624);r(99356);var i=r(60621),a=r(50362),n=r(13506);let l=(0,i.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:r="default",size:i="default",asChild:o=!1,...d}=e,c=o?a.bL:"button";return(0,s.jsx)(c,{"data-slot":"button","data-variant":r,"data-size":i,className:(0,n.cn)(l({variant:r,size:i,className:t})),...d})}},91074:(e,t,r)=>{"use strict";r.d(t,{Separator:()=>n});var s=r(4624);r(99356);var i=r(44188),a=r(13506);function n(e){let{className:t,orientation:r="horizontal",decorative:n=!0,...l}=e;return(0,s.jsx)(i.b,{"data-slot":"separator",decorative:n,orientation:r,className:(0,a.cn)("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...l})}},94151:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]])},95265:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])}},e=>{e.O(0,[4400,4678,9776,6785,3335,9411,4933,146,7358],()=>e(e.s=53931)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8997],{3239:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},4959:(e,t,s)=>{"use strict";s.d(t,{BT:()=>o,Wu:()=>d,ZB:()=>n,Zp:()=>i,aR:()=>l,wL:()=>c});var r=s(4624);s(99356);var a=s(13506);function i(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card",className:(0,a.cn)("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",t),...s})}function l(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card-header",className:(0,a.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...s})}function n(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card-title",className:(0,a.cn)("leading-none font-semibold",t),...s})}function o(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",t),...s})}function d(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card-content",className:(0,a.cn)("px-6",t),...s})}function c(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"card-footer",className:(0,a.cn)("flex items-center px-6 [.border-t]:pt-6",t),...s})}},8096:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]])},9598:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},13506:(e,t,s)=>{"use strict";s.d(t,{cn:()=>i});var r=s(47989),a=s(55701);function i(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,a.QP)((0,r.$)(t))}},13561:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},15523:(e,t,s)=>{"use strict";s.d(t,{p:()=>i});var r=s(4624);s(99356);var a=s(13506);function i(e){let{className:t,type:s,...i}=e;return(0,r.jsx)("input",{type:s,"data-slot":"input",className:(0,a.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",t),...i})}},22841:(e,t,s)=>{"use strict";s.d(t,{bq:()=>u,eb:()=>m,gC:()=>h,l6:()=>d,yv:()=>c});var r=s(4624);s(99356);var a=s(69709),i=s(43153),l=s(59728),n=s(85314),o=s(13506);function d(e){let{...t}=e;return(0,r.jsx)(n.Root,{"data-slot":"select",...t})}function c(e){let{...t}=e;return(0,r.jsx)(n.Value,{"data-slot":"select-value",...t})}function u(e){let{className:t,size:s="default",children:i,...l}=e;return(0,r.jsxs)(n.Trigger,{"data-slot":"select-trigger","data-size":s,className:(0,o.cn)("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",t),...l,children:[i,(0,r.jsx)(n.Icon,{asChild:!0,children:(0,r.jsx)(a.A,{className:"size-4 opacity-50"})})]})}function h(e){let{className:t,children:s,position:a="item-aligned",align:i="center",...l}=e;return(0,r.jsx)(n.Portal,{children:(0,r.jsxs)(n.Content,{"data-slot":"select-content",className:(0,o.cn)("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,align:i,...l,children:[(0,r.jsx)(x,{}),(0,r.jsx)(n.Viewport,{className:(0,o.cn)("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:s}),(0,r.jsx)(v,{})]})})}function m(e){let{className:t,children:s,...a}=e;return(0,r.jsxs)(n.Item,{"data-slot":"select-item",className:(0,o.cn)("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...a,children:[(0,r.jsx)("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,r.jsx)(n.ItemIndicator,{children:(0,r.jsx)(i.A,{className:"size-4"})})}),(0,r.jsx)(n.ItemText,{children:s})]})}function x(e){let{className:t,...s}=e;return(0,r.jsx)(n.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:(0,o.cn)("flex cursor-default items-center justify-center py-1",t),...s,children:(0,r.jsx)(l.A,{className:"size-4"})})}function v(e){let{className:t,...s}=e;return(0,r.jsx)(n.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:(0,o.cn)("flex cursor-default items-center justify-center py-1",t),...s,children:(0,r.jsx)(a.A,{className:"size-4"})})}},23119:(e,t,s)=>{"use strict";s.d(t,{InstallViaAgentButton:()=>p});var r=s(4624),a=s(99356),i=s(50988),l=s(13561),n=s(43153),o=s(9598),d=s(56221),c=s(49411),u=s(85253),h=s(4959),m=s(15523),x=s(78825),v=s(71651);function p(){let e=(0,c.c)("app"),[t,s]=(0,a.useState)(!1),[p,g]=(0,a.useState)(""),[f,b]=(0,a.useState)(!1),j=e("utilities.viaAgent.promptBody",{url:p.trim()||"<github URL here>"}),y=async()=>{await navigator.clipboard.writeText(j),b(!0),d.oR.success(e("utilities.viaAgent.promptCopied")),setTimeout(()=>b(!1),1500)};return t?(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-start justify-center overflow-y-auto bg-black/30 p-6",children:(0,r.jsxs)(h.Zp,{className:"w-full max-w-2xl",children:[(0,r.jsxs)(h.aR,{className:"flex flex-row items-start justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)(h.ZB,{className:"flex items-center gap-2",children:[(0,r.jsx)(i.A,{className:"h-5 w-5"}),e("utilities.viaAgent.cardTitle")]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:e("utilities.viaAgent.cardSubtitle")})]}),(0,r.jsx)(u.$,{variant:"ghost",size:"icon",onClick:()=>s(!1),children:(0,r.jsx)(l.A,{className:"h-4 w-4"})})]}),(0,r.jsxs)(h.Wu,{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(x.J,{children:"GitHub URL"}),(0,r.jsx)(m.p,{value:p,onChange:e=>g(e.target.value),placeholder:"https://github.com/owner/repo"})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)(x.J,{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{children:e("utilities.viaAgent.promptLabel")}),(0,r.jsxs)(u.$,{size:"sm",variant:"ghost",onClick:y,className:"gap-1",children:[f?(0,r.jsx)(n.A,{className:"h-3 w-3"}):(0,r.jsx)(o.A,{className:"h-3 w-3"}),f?e("utilities.viaAgent.copied"):e("utilities.viaAgent.copy")]})]}),(0,r.jsx)(v.T,{value:j,readOnly:!0,className:"font-mono text-xs h-64"})]}),(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:[e("utilities.viaAgent.footer1"),(0,r.jsx)("code",{className:"font-mono mx-1",children:"<<reflex:utility>>"}),e("utilities.viaAgent.footer2")]})]})]})}):(0,r.jsxs)(u.$,{onClick:()=>s(!0),variant:"outline",className:"gap-2",children:[(0,r.jsx)(i.A,{className:"h-4 w-4"}),e("utilities.viaAgent.button")]})}},24185:(e,t,s)=>{"use strict";s.d(t,{B:()=>a});var r=s(7911);let a=(0,r.createServerReference)("00156d4ff7dcdf419f9c3945e838a4d906b7336fa5",r.callServer,void 0,r.findSourceMapURL,"listCuratedAction")},28310:(e,t,s)=>{"use strict";s.d(t,{E:()=>o});var r=s(4624);s(99356);var a=s(60621),i=s(50362),l=s(13506);let n=(0,a.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:s="default",asChild:a=!1,...o}=e,d=a?i.bL:"span";return(0,r.jsx)(d,{"data-slot":"badge","data-variant":s,className:(0,l.cn)(n({variant:s}),t),...o})}},31462:(e,t,s)=>{"use strict";s.d(t,{InstallFromMcpButton:()=>y});var r=s(4624),a=s(99356),i=s(69285),l=s(35687),n=s(13561),o=s(3239),d=s(56221),c=s(49411),u=s(28310),h=s(85253),m=s(4959),x=s(15523),v=s(78825),p=s(71651),g=s(22841),f=s(7911);let b=(0,f.createServerReference)("405502f57f6a89b5b31871bf118df3f3059cd4619c",f.callServer,void 0,f.findSourceMapURL,"mcpPreviewAction"),j=(0,f.createServerReference)("407022b6fb33383361231ae3f5fc287879eff575e7",f.callServer,void 0,f.findSourceMapURL,"mcpInstallAction");function y(){var e;let t=(0,c.c)("app"),[s,f]=(0,a.useState)(!1),[y,N]=(0,a.useState)("stdio"),[w,k]=(0,a.useState)(""),[A,S]=(0,a.useState)(""),[C,z]=(0,a.useState)(""),[P,R]=(0,a.useState)(""),[M,T]=(0,a.useState)(""),[V,B]=(0,a.useState)(""),[F,O]=(0,a.useState)(""),[L,_]=(0,a.useState)("global"),[J,$]=(0,a.useState)(null),[I,U]=(0,a.useTransition)(),[E,q]=(0,a.useTransition)(),H=(0,i.useRouter)(),Z=()=>{if("stdio"===y){if(!w.trim())return{ok:!1,error:"command required"};try{let e=C.trim()?JSON.parse(C):{};return{ok:!0,config:{transport:"stdio",command:w.trim(),args:A.trim()?A.trim().split(/\s+/).filter(Boolean):[],env:e}}}catch(e){return{ok:!1,error:"env must be JSON object"}}}if(!P.trim())return{ok:!1,error:"URL required"};try{let e=M.trim()?JSON.parse(M):{};return{ok:!0,config:{transport:y,url:P.trim(),headers:e}}}catch(e){return{ok:!1,error:"headers must be JSON object"}}},D=()=>{k(""),S(""),z(""),R(""),T(""),B(""),O(""),$(null)};return s?(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-start justify-center overflow-y-auto bg-black/30 p-6",children:(0,r.jsxs)(m.Zp,{className:"w-full max-w-2xl",children:[(0,r.jsxs)(m.aR,{className:"flex flex-row items-start justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)(m.ZB,{className:"flex items-center gap-2",children:[(0,r.jsx)(l.A,{className:"h-5 w-5"}),"MCP server → Reflex utility"]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:t("utilities.mcp.subtitle")})]}),(0,r.jsx)(h.$,{variant:"ghost",size:"icon",onClick:()=>{f(!1),D()},children:(0,r.jsx)(n.A,{className:"h-4 w-4"})})]}),(0,r.jsxs)(m.Wu,{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"Transport"}),(0,r.jsxs)(g.l6,{value:y,onValueChange:e=>N(e),children:[(0,r.jsx)(g.bq,{className:"w-48",children:(0,r.jsx)(g.yv,{})}),(0,r.jsxs)(g.gC,{children:[(0,r.jsx)(g.eb,{value:"stdio",children:"stdio (subprocess)"}),(0,r.jsx)(g.eb,{value:"http",children:"HTTP (Streamable)"}),(0,r.jsx)(g.eb,{value:"sse",children:"SSE (legacy)"})]})]})]}),"stdio"===y?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"Command"}),(0,r.jsx)(x.p,{value:w,onChange:e=>k(e.target.value),placeholder:"npx"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"Args (space-separated)"}),(0,r.jsx)(x.p,{value:A,onChange:e=>S(e.target.value),placeholder:"-y @modelcontextprotocol/server-everything"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"Env (JSON, optional)"}),(0,r.jsx)(p.T,{value:C,onChange:e=>z(e.target.value),placeholder:'{"FOO": "bar"}',className:"font-mono text-xs"})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"URL"}),(0,r.jsx)(x.p,{value:P,onChange:e=>R(e.target.value),placeholder:"https://example.com/mcp"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"Headers (JSON, optional)"}),(0,r.jsx)(p.T,{value:M,onChange:e=>T(e.target.value),placeholder:'{"Authorization": "Bearer ..."}',className:"font-mono text-xs"})]})]}),(0,r.jsx)("div",{className:"flex justify-end",children:(0,r.jsx)(h.$,{onClick:()=>{let e=Z();if(!e.ok)return void d.oR.error(e.error);$(null),U(async()=>{var t,s;let r=await b(e.config);if(!r.ok)return void d.oR.error("Connect failed: "+r.error);$({...r.serverName?{serverName:r.serverName}:{},...r.serverVersion?{serverVersion:r.serverVersion}:{},tools:r.tools}),V||B((null!=(t=r.serverName)?t:"mcp-server").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40)||"mcp-server"),F||O(null!=(s=r.serverName)?s:"MCP server")})},disabled:I,children:I?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.A,{className:"h-4 w-4 animate-spin mr-2"}),"Connecting…"]}):"Connect & list tools"})}),J&&(0,r.jsxs)("div",{className:"space-y-3 border-t pt-4",children:[(0,r.jsxs)("div",{className:"text-sm",children:[(0,r.jsx)("span",{className:"font-medium",children:"Server:"})," ",null!=(e=J.serverName)?e:"(anonymous)",J.serverVersion?" v".concat(J.serverVersion):"",(0,r.jsxs)(u.E,{variant:"outline",className:"ml-2",children:[J.tools.length," tools"]})]}),(0,r.jsx)("div",{className:"max-h-40 overflow-y-auto rounded border bg-slate-50 p-2 text-xs",children:0===J.tools.length?(0,r.jsx)("em",{className:"text-slate-500",children:"No tools advertised."}):(0,r.jsx)("ul",{className:"space-y-1",children:J.tools.map(e=>(0,r.jsxs)("li",{children:[(0,r.jsx)("span",{className:"font-mono",children:e.name}),e.description&&(0,r.jsxs)("span",{className:"text-slate-500",children:[" — ",e.description]})]},e.name))})}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"Utility id (kebab-case)"}),(0,r.jsx)(x.p,{value:V,onChange:e=>B(e.target.value),placeholder:"my-mcp-server",className:"font-mono"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"Display name"}),(0,r.jsx)(x.p,{value:F,onChange:e=>O(e.target.value),placeholder:"My MCP Server"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(v.J,{children:"Scope"}),(0,r.jsxs)(g.l6,{value:L,onValueChange:e=>_(e),children:[(0,r.jsx)(g.bq,{className:"w-48",children:(0,r.jsx)(g.yv,{})}),(0,r.jsxs)(g.gC,{children:[(0,r.jsx)(g.eb,{value:"global",children:"global (~/.reflex)"}),(0,r.jsx)(g.eb,{value:"project",children:"project"})]})]})]}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)(h.$,{variant:"ghost",onClick:()=>{f(!1),D()},children:t("utilities.mcp.cancel")}),(0,r.jsx)(h.$,{onClick:()=>{let e=Z();return e.ok?J?V.trim()&&F.trim()?void q(async()=>{let t=await j({scope:L,id:V.trim(),name:F.trim(),config:e.config});if(!t.ok)return void d.oR.error(t.error);d.oR.success("installed ".concat(t.id)),f(!1),D(),H.refresh(),H.push("/utilities/".concat(t.scope,"/").concat(t.id))}):void d.oR.error("id and name required"):void d.oR.error("preview first"):void d.oR.error(e.error)},disabled:E,children:E?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.A,{className:"h-4 w-4 animate-spin mr-2"}),"Installing…"]}):"Install"})]})]})]})]})}):(0,r.jsxs)(h.$,{onClick:()=>f(!0),variant:"outline",className:"gap-2",children:[(0,r.jsx)(l.A,{className:"h-4 w-4"}),"From MCP"]})}},33980:(e,t,s)=>{"use strict";s.d(t,{InstallFromGithubButton:()=>k});var r=s(4624),a=s(99356),i=s(69285),l=s(45804);let n=(0,l.A)("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);var o=s(13561),d=s(3239);let c=(0,l.A)("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);var u=s(86295),h=s(85924),m=s(56221),x=s(49411),v=s(28310),p=s(85253),g=s(4959),f=s(15523),b=s(78825),j=s(22841),y=s(7911);let N=(0,y.createServerReference)("40fa51532895f01a79ec9f367b08423c1483cabfcf",y.callServer,void 0,y.findSourceMapURL,"githubPreviewAction"),w=(0,y.createServerReference)("408d27bdd7d7bbf9c367709f95c2c3d0784e844dfc",y.callServer,void 0,y.findSourceMapURL,"githubInstallAction");function k(){let e=(0,x.c)("app"),[t,s]=(0,a.useState)(!1),[l,y]=(0,a.useState)(""),[k,S]=(0,a.useState)(null),[C,z]=(0,a.useState)("global"),[P,R]=(0,a.useTransition)(),[M,T]=(0,a.useTransition)(),V=(0,i.useRouter)();return t?(0,r.jsxs)(g.Zp,{className:"fixed inset-x-4 top-16 z-50 mx-auto max-w-2xl shadow-2xl sm:inset-x-auto sm:right-6",children:[(0,r.jsxs)(g.aR,{className:"flex flex-row items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsxs)(g.ZB,{className:"flex items-center gap-2 text-base",children:[(0,r.jsx)(n,{className:"h-4 w-4"})," ",e("utilities.github.cardTitle")]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:e("utilities.github.cardSubtitle")})]}),(0,r.jsx)(p.$,{size:"icon",variant:"ghost",onClick:()=>{s(!1),S(null),y("")},children:(0,r.jsx)(o.A,{className:"h-4 w-4"})})]}),(0,r.jsxs)(g.Wu,{className:"space-y-4",children:[(0,r.jsxs)("form",{className:"flex gap-2",onSubmit:e=>{e.preventDefault(),l.trim()&&R(async()=>{let e=await N(l.trim());if(!e.ok)return void m.oR.error(e.error);S(e.preview)})},children:[(0,r.jsx)(f.p,{value:l,onChange:e=>y(e.target.value),placeholder:e("utilities.github.urlPlaceholder"),className:"font-mono text-xs"}),(0,r.jsx)(p.$,{type:"submit",disabled:P||!l.trim(),children:P?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.A,{className:"mr-2 h-4 w-4 animate-spin"})," ",e("utilities.github.requesting")]}):e("utilities.github.getPreview")})]}),k&&(0,r.jsxs)("div",{className:"space-y-3 rounded-md border p-4 bg-muted/30",children:[(0,r.jsxs)("div",{className:"flex items-baseline gap-3 flex-wrap",children:[(0,r.jsx)("div",{className:"text-base font-semibold",children:k.manifest.name}),(0,r.jsxs)(v.E,{variant:"outline",className:"font-mono text-[10px]",children:["v",k.manifest.version]}),(0,r.jsxs)(v.E,{variant:"secondary",className:"font-mono text-[10px]",children:["github:",k.source.owner,"/",k.source.repo,"@",k.source.sha.slice(0,7)]})]}),k.manifest.author&&(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:e("utilities.github.author",{author:k.manifest.author})}),k.manifest.description&&(0,r.jsx)("p",{className:"text-sm",children:k.manifest.description}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"text-[11px] uppercase tracking-wider text-muted-foreground mb-1 flex items-center gap-1",children:[(0,r.jsx)(c,{className:"h-3 w-3"})," ",e("utilities.github.permissionsTitle")]}),(0,r.jsx)(A,{permissions:k.manifest.permissions})]}),k.manifest.dependencies&&Object.keys(k.manifest.dependencies).length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-[11px] uppercase tracking-wider text-muted-foreground mb-1",children:e("utilities.github.dependenciesTitle")}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(k.manifest.dependencies).map(e=>{let[t,s]=e;return(0,r.jsxs)(v.E,{variant:"outline",className:"font-mono text-[10px]",children:[t,"@",s]},t)})})]}),(0,r.jsxs)("details",{className:"text-xs",children:[(0,r.jsx)("summary",{className:"cursor-pointer text-muted-foreground",children:e("utilities.github.filesInRepo",{count:Object.keys(k.files).length})}),(0,r.jsx)("ul",{className:"mt-1 font-mono text-[11px] space-y-0.5",children:Object.entries(k.sizes).map(e=>{var t;let[s,a]=e;return(0,r.jsxs)("li",{className:"flex justify-between gap-3",children:[(0,r.jsx)("span",{className:"truncate",children:s}),(0,r.jsx)("span",{className:"text-muted-foreground shrink-0",children:(t=a)<1024?"".concat(t," B"):t<1048576?"".concat((t/1024).toFixed(1)," KB"):"".concat((t/1048576).toFixed(2)," MB")})]},s)})})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3 pt-2 border-t",children:[(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)(b.J,{className:"text-xs",children:e("utilities.github.installInto")}),(0,r.jsxs)(j.l6,{value:C,onValueChange:e=>z(e),children:[(0,r.jsx)(j.bq,{className:"mt-1",children:(0,r.jsx)(j.yv,{})}),(0,r.jsxs)(j.gC,{children:[(0,r.jsx)(j.eb,{value:"global",children:e("utilities.github.globalOption")}),(0,r.jsx)(j.eb,{value:"project",disabled:!0,children:e("utilities.github.projectOption")})]})]})]}),(0,r.jsx)(p.$,{onClick:()=>{k&&T(async()=>{let t=await w({preview:k,scope:C});if(!t.ok)return void m.oR.error(t.error);m.oR.success(e("utilities.github.installedToast",{id:t.id})),s(!1),y(""),S(null),V.refresh()})},disabled:M,size:"lg",className:"self-end",children:M?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.A,{className:"mr-2 h-4 w-4 animate-spin"})," ",e("utilities.github.installing")]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.A,{className:"mr-2 h-4 w-4"})," ",e("utilities.github.installButtonShort")]})})]}),(0,r.jsxs)("div",{className:"flex items-start gap-2 text-[11px] text-muted-foreground rounded bg-amber-100/40 border border-amber-200 px-2 py-1.5",children:[(0,r.jsx)(h.A,{className:"h-3 w-3 mt-0.5 shrink-0 text-amber-700"}),(0,r.jsx)("span",{children:e("utilities.github.warning")})]})]})]})]}):(0,r.jsxs)(p.$,{onClick:()=>s(!0),children:[(0,r.jsx)(n,{className:"mr-2 h-4 w-4"})," ",e("utilities.github.installButton")]})}function A(e){var t,s,a,i,l,n,o,d,c,u,h;let{permissions:m}=e,p=(0,x.c)("app"),g=[];return((null==(s=m.llm)||null==(t=s.tasks)?void 0:t.length)&&g.push({label:"llm: ".concat(m.llm.tasks.join(", ")),severity:"info"}),(null==(a=m.kb)?void 0:a.read)&&g.push({label:"kb.read",severity:"info"}),(null==(i=m.kb)?void 0:i.write)&&g.push({label:"kb.write",severity:"warn"}),(null==(l=m.fs)?void 0:l.sandbox)&&g.push({label:"fs (sandbox)",severity:"info"}),(null==(d=m.web)||null==(o=d.fetch)||null==(n=o.domains)?void 0:n.length)&&g.push({label:"web.fetch → ".concat(m.web.fetch.domains.join(", ")),severity:"warn"}),(null==(c=m.web)?void 0:c.search)&&g.push({label:"web.search",severity:"warn"}),(null==(u=m.audit)?void 0:u.write)&&g.push({label:"audit.write",severity:"info"}),(null==(h=m.workers)?void 0:h.enabled)&&g.push({label:"workers (server actions)",severity:"danger"}),0===g.length)?(0,r.jsx)("span",{className:"text-xs italic text-muted-foreground",children:p("utilities.github.noPermissions")}):(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:g.map(e=>(0,r.jsx)(v.E,{variant:"outline",className:"danger"===e.severity?"border-destructive text-destructive":"warn"===e.severity?"border-amber-600 text-amber-700":"",children:e.label},e.label))})}},35687:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]])},36998:(e,t,s)=>{"use strict";s.d(t,{InstallFromArchiveButton:()=>c});var r=s(4624),a=s(99356),i=s(69285),l=s(3239);let n=(0,s(45804).A)("FileArchive",[["path",{d:"M10 12v-1",key:"v7bkov"}],["path",{d:"M10 18v-2",key:"1cjy8d"}],["path",{d:"M10 7V6",key:"dljcrl"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01",key:"gkbcor"}],["circle",{cx:"10",cy:"20",r:"2",key:"1xzdoj"}]]);var o=s(56221),d=s(85253);function c(){let e=(0,a.useRef)(null),[t,s]=(0,a.useTransition)(),[,c]=(0,a.useState)(0),u=(0,i.useRouter)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("input",{ref:e,type:"file",accept:".zip,application/zip",className:"hidden",onChange:e=>{var t;let r=null==(t=e.target.files)?void 0:t[0];r&&s(async()=>{try{let t=new FormData;t.append("file",r),t.append("scope","global");let s=await fetch("/api/utilities/install-archive",{method:"POST",body:t}),a=await s.json().catch(()=>({}));if(!s.ok||!a.ok){var e;o.oR.error(null!=(e=a.error)?e:"HTTP ".concat(s.status));return}o.oR.success("Installed: ".concat(a.id)),u.refresh()}catch(e){o.oR.error(e instanceof Error?e.message:String(e))}finally{c(e=>e+1)}}),e.target.value=""}}),(0,r.jsxs)(d.$,{variant:"outline",disabled:t,onClick:()=>{var t;return null==(t=e.current)?void 0:t.click()},children:[t?(0,r.jsx)(l.A,{className:"mr-2 h-4 w-4 animate-spin"}):(0,r.jsx)(n,{className:"mr-2 h-4 w-4"}),"Install from zip"]})]})}},43153:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},46972:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},48572:(e,t,s)=>{"use strict";s.d(t,{RemoveUtilityButton:()=>h});var r=s(4624),a=s(99356),i=s(69285),l=s(3239),n=s(46972),o=s(56221),d=s(49411),c=s(85253),u=s(49970);function h(e){let{scope:t,id:s,name:h,rootId:m}=e,x=(0,d.c)("app"),[v,p]=(0,a.useTransition)(),g=(0,i.useRouter)();return(0,r.jsx)(c.$,{type:"button",size:"sm",variant:"ghost",disabled:v,onClick:()=>{confirm(x("utilities.removeConfirm",{name:h}))&&p(async()=>{var e;let r=await (0,u.j)(t,s,m);r.ok?(o.oR.success(x("utilities.removed")),g.refresh()):o.oR.error(null!=(e=r.error)?e:x("utilities.removeFailed"))})},children:v?(0,r.jsx)(l.A,{className:"h-4 w-4 animate-spin"}):(0,r.jsx)(n.A,{className:"h-4 w-4 text-muted-foreground"})})}},49970:(e,t,s)=>{"use strict";s.d(t,{j:()=>a});var r=s(7911);let a=(0,r.createServerReference)("70f40a96d887f43b5bfbffc1d69d8be5d2911ae755",r.callServer,void 0,r.findSourceMapURL,"removeUtilityAction")},50988:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},57751:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},58297:(e,t,s)=>{Promise.resolve().then(s.bind(s,59487)),Promise.resolve().then(s.bind(s,36998)),Promise.resolve().then(s.bind(s,33980)),Promise.resolve().then(s.bind(s,31462)),Promise.resolve().then(s.bind(s,23119)),Promise.resolve().then(s.bind(s,48572)),Promise.resolve().then(s.bind(s,91074)),Promise.resolve().then(s.bind(s,96253)),Promise.resolve().then(s.bind(s,28050)),Promise.resolve().then(s.bind(s,94904)),Promise.resolve().then(s.bind(s,13270)),Promise.resolve().then(s.bind(s,99730)),Promise.resolve().then(s.bind(s,89146)),Promise.resolve().then(s.bind(s,19078)),Promise.resolve().then(s.bind(s,67854)),Promise.resolve().then(s.bind(s,69050)),Promise.resolve().then(s.bind(s,63739)),Promise.resolve().then(s.bind(s,33976)),Promise.resolve().then(s.bind(s,12537)),Promise.resolve().then(s.bind(s,97485)),Promise.resolve().then(s.bind(s,41923)),Promise.resolve().then(s.bind(s,73868)),Promise.resolve().then(s.bind(s,53511)),Promise.resolve().then(s.bind(s,2018)),Promise.resolve().then(s.bind(s,18487)),Promise.resolve().then(s.bind(s,98346)),Promise.resolve().then(s.bind(s,14884)),Promise.resolve().then(s.bind(s,85314)),Promise.resolve().then(s.bind(s,17280)),Promise.resolve().then(s.bind(s,8855)),Promise.resolve().then(s.bind(s,86631)),Promise.resolve().then(s.bind(s,2604)),Promise.resolve().then(s.bind(s,27237)),Promise.resolve().then(s.bind(s,49455)),Promise.resolve().then(s.bind(s,39211)),Promise.resolve().then(s.bind(s,56360)),Promise.resolve().then(s.t.bind(s,54400,23))},59487:(e,t,s)=>{"use strict";s.d(t,{CuratedGallery:()=>f});var r=s(4624),a=s(99356),i=s(69285),l=s(3239),n=s(8096),o=s(43153),d=s(69709),c=s(57751),u=s(56221),h=s(49411),m=s(4959),x=s(28310),v=s(24185),p=s(75257);let g={finance:"utilities.curated.catFinance",health:"utilities.curated.catHealth",productivity:"utilities.curated.catProductivity",travel:"utilities.curated.catTravel",study:"utilities.curated.catStudy",creative:"utilities.curated.catCreative",other:"utilities.curated.catOther"};function f(e){let{installedIds:t,spaces:s}=e,f=(0,i.useRouter)(),b=(0,h.c)("app"),[j,y]=(0,a.useState)([]),[N,w]=(0,a.useState)(!0),[k,A]=(0,a.useState)(null),[S,C]=(0,a.useState)("all"),[z,P]=(0,a.useTransition)(),[R,M]=(0,a.useState)(null);(0,a.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await (0,v.B)();e||y(t.items)}catch(t){e||y([])}finally{e||w(!1)}})(),()=>{e=!0}},[]);let T=(0,a.useMemo)(()=>{let e=new Set;return j.forEach(t=>e.add(t.category)),["all",...Array.from(e).sort()]},[j]),V="all"===S?j:j.filter(e=>e.category===S),B=(e,t)=>{A(e.id),P(async()=>{var r,a;let i=null!=(a=e.suggestedScope)?a:"global",l=await (0,p.g)({github:e.github,scope:i,..."project"===i&&t?{rootId:t}:{}});if(A(null),M(null),!l.ok)return void u.oR.error(l.error);let n=t?null==(r=s.find(e=>e.id===t))?void 0:r.label:void 0;u.oR.success(n?b("utilities.curated.installedToastIn",{name:e.name,space:n}):b("utilities.curated.installedToast",{name:e.name})),f.refresh()})};return N?(0,r.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,r.jsx)(l.A,{className:"h-3 w-3 animate-spin"}),b("utilities.curated.loading")]}):0===j.length?(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:b("utilities.curated.empty")}):(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,r.jsx)(n.A,{className:"h-3 w-3 text-violet-600"}),(0,r.jsx)("span",{className:"text-[11px] text-muted-foreground mr-2",children:b("utilities.curated.categoryLabel")}),T.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>C(e),className:"rounded-full px-2 py-0.5 text-[11px] "+(S===e?"bg-violet-600 text-white":"border bg-card hover:bg-accent"),children:"all"===e?b("utilities.curated.categoryAll"):g[e]?b(g[e]):e},e))]}),(0,r.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:V.map(e=>{let a=t.has(e.id),i=k===e.id&&z;return(0,r.jsx)(m.Zp,{className:"group",children:(0,r.jsxs)(m.Wu,{className:"pt-4 pb-4 space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-start gap-2",children:[(0,r.jsx)("span",{className:"text-2xl leading-none",children:e.emoji}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("div",{className:"font-medium truncate",children:e.name}),(0,r.jsxs)("div",{className:"text-[10px] text-muted-foreground font-mono truncate",children:[e.author?"".concat(e.author,"/"):"",e.id]})]}),(0,r.jsx)(x.E,{variant:"outline",className:"text-[10px]",children:g[e.category]?b(g[e.category]):e.category})]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:e.description}),(0,r.jsxs)("div",{className:"pt-1",children:[a?(0,r.jsxs)("button",{type:"button",disabled:!0,className:"inline-flex items-center gap-1 rounded border px-2 py-1 text-xs text-emerald-700 cursor-default",children:[(0,r.jsx)(o.A,{className:"h-3 w-3"}),b("utilities.curated.installed")]}):(0,r.jsxs)("button",{type:"button",onClick:()=>{var t;return"global"===(null!=(t=e.suggestedScope)?t:"global")?void B(e):0===s.length?void u.oR.error(b("utilities.curated.needSpace")):1===s.length?void B(e,s[0].id):void M(t=>t===e.id?null:e.id)},disabled:i||z,className:"inline-flex items-center gap-1 rounded bg-violet-600 px-2 py-1 text-xs text-white hover:bg-violet-700 disabled:opacity-50",children:[i?(0,r.jsx)(l.A,{className:"h-3 w-3 animate-spin"}):"project"===e.suggestedScope&&s.length>1?(0,r.jsx)(d.A,{className:"h-3 w-3"}):(0,r.jsx)(c.A,{className:"h-3 w-3"}),"project"===e.suggestedScope&&s.length>1?b("utilities.curated.intoSpace"):b("utilities.curated.install")]}),R===e.id&&(0,r.jsxs)("ul",{className:"mt-2 rounded-md border bg-popover shadow-sm divide-y",children:[s.map(t=>(0,r.jsx)("li",{children:(0,r.jsxs)("button",{type:"button",onClick:()=>B(e,t.id),disabled:i||z,className:"w-full text-left px-2.5 py-1.5 text-xs hover:bg-accent disabled:opacity-50 inline-flex items-center gap-1.5",children:[(0,r.jsx)(c.A,{className:"h-3 w-3 text-violet-600"}),(0,r.jsx)("span",{className:"truncate",children:t.label})]})},t.id)),(0,r.jsx)("li",{children:(0,r.jsx)("button",{type:"button",onClick:()=>M(null),className:"w-full text-left px-2.5 py-1.5 text-[10px] text-muted-foreground hover:bg-accent",children:b("utilities.curated.cancel")})})]})]})]})},e.id)})})]})}},59728:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},60621:(e,t,s)=>{"use strict";s.d(t,{F:()=>l});var r=s(47989);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,i=r.$,l=(e,t)=>s=>{var r;if((null==t?void 0:t.variants)==null)return i(e,null==s?void 0:s.class,null==s?void 0:s.className);let{variants:l,defaultVariants:n}=t,o=Object.keys(l).map(e=>{let t=null==s?void 0:s[e],r=null==n?void 0:n[e];if(null===t)return null;let i=a(t)||a(r);return l[e][i]}),d=s&&Object.entries(s).reduce((e,t)=>{let[s,r]=t;return void 0===r||(e[s]=r),e},{});return i(e,o,null==t||null==(r=t.compoundVariants)?void 0:r.reduce((e,t)=>{let{class:s,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,s]=e;return Array.isArray(s)?s.includes({...n,...d}[t]):({...n,...d})[t]===s})?[...e,s,r]:e},[]),null==s?void 0:s.class,null==s?void 0:s.className)}},69285:(e,t,s)=>{"use strict";var r=s(48849);s.o(r,"usePathname")&&s.d(t,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(t,{useRouter:function(){return r.useRouter}})},69709:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},71651:(e,t,s)=>{"use strict";s.d(t,{T:()=>i});var r=s(4624);s(99356);var a=s(13506);function i(e){let{className:t,...s}=e;return(0,r.jsx)("textarea",{"data-slot":"textarea",className:(0,a.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",t),...s})}},75257:(e,t,s)=>{"use strict";s.d(t,{g:()=>a});var r=s(7911);let a=(0,r.createServerReference)("406160ed0783d7658804c8ded217020abc0e118a8a",r.callServer,void 0,r.findSourceMapURL,"installCuratedAction")},78825:(e,t,s)=>{"use strict";s.d(t,{J:()=>l});var r=s(4624);s(99356);var a=s(33976),i=s(13506);function l(e){let{className:t,...s}=e;return(0,r.jsx)(a.Root,{"data-slot":"label",className:(0,i.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...s})}},85253:(e,t,s)=>{"use strict";s.d(t,{$:()=>o});var r=s(4624);s(99356);var a=s(60621),i=s(50362),l=s(13506);let n=(0,a.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:s="default",size:a="default",asChild:o=!1,...d}=e,c=o?i.bL:"button";return(0,r.jsx)(c,{"data-slot":"button","data-variant":s,"data-size":a,className:(0,l.cn)(n({variant:s,size:a,className:t})),...d})}},85924:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},86295:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(45804).A)("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},91074:(e,t,s)=>{"use strict";s.d(t,{Separator:()=>l});var r=s(4624);s(99356);var a=s(44188),i=s(13506);function l(e){let{className:t,orientation:s="horizontal",decorative:l=!0,...n}=e;return(0,r.jsx)(a.b,{"data-slot":"separator",decorative:l,orientation:s,className:(0,i.cn)("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...n})}}},e=>{e.O(0,[4400,4678,9776,6785,3335,9411,4933,146,7358],()=>e(e.s=58297)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (()=>{"use strict";var e={},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}},i=!0;try{e[o].call(a.exports,a,a.exports,r),i=!1}finally{i&&delete t[o]}return a.exports}r.m=e,(()=>{var e=[];r.O=(t,o,n,a)=>{if(o){a=a||0;for(var i=e.length;i>0&&e[i-1][2]>a;i--)e[i]=e[i-1];e[i]=[o,n,a];return}for(var u=1/0,i=0;i<e.length;i++){for(var[o,n,a]=e[i],l=!0,c=0;c<o.length;c++)(!1&a||u>=a)&&Object.keys(r.O).every(e=>r.O[e](o[c]))?o.splice(c--,1):(l=!1,a<u&&(u=a));if(l){e.splice(i--,1);var d=n();void 0!==d&&(t=d)}}return t}})(),r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;r.t=function(o,n){if(1&n&&(o=this(o)),8&n||"object"==typeof o&&o&&(4&n&&o.__esModule||16&n&&"function"==typeof o.then))return o;var a=Object.create(null);r.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var u=2&n&&o;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach(e=>i[e]=()=>o[e]);return i.default=()=>o,r.d(a,i),a}})(),r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,o)=>(r.f[o](e,t),t),[])),r.u=e=>"static/chunks/"+e+".a04c1e0b768f6392.js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="_N_E:";r.l=(o,n,a,i)=>{if(e[o])return void e[o].push(n);if(void 0!==a)for(var u,l,c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var s=c[d];if(s.getAttribute("src")==o||s.getAttribute("data-webpack")==t+a){u=s;break}}u||(l=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,r.nc&&u.setAttribute("nonce",r.nc),u.setAttribute("data-webpack",t+a),u.src=r.tu(o)),e[o]=[n];var f=(t,r)=>{u.onerror=u.onload=null,clearTimeout(p);var n=e[o];if(delete e[o],u.parentNode&&u.parentNode.removeChild(u),n&&n.forEach(e=>e(r)),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=f.bind(null,u.onerror),u.onload=f.bind(null,u.onload),l&&document.head.appendChild(u)}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:e=>e},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("nextjs#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="/_next/",(()=>{var e={8068:0,497:0};r.f.j=(t,o)=>{var n=r.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else if(/^(497|8068)$/.test(t))e[t]=0;else{var a=new Promise((r,o)=>n=e[t]=[r,o]);o.push(n[2]=a);var i=r.p+r.u(t),u=Error();r.l(i,o=>{if(r.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;u.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",u.name="ChunkLoadError",u.type=a,u.request=i,n[1](u)}},"chunk-"+t,t)}},r.O.j=t=>0===e[t];var t=(t,o)=>{var n,a,[i,u,l]=o,c=0;if(i.some(t=>0!==e[t])){for(n in u)r.o(u,n)&&(r.m[n]=u[n]);if(l)var d=l(r)}for(t&&t(o);c<i.length;c++)a=i[c],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return r.O(d)},o=self.webpackChunk_N_E=self.webpackChunk_N_E||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})(),r.nc=void 0})();
1
+ (()=>{"use strict";var e={},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}},i=!0;try{e[o].call(a.exports,a,a.exports,r),i=!1}finally{i&&delete t[o]}return a.exports}r.m=e,(()=>{var e=[];r.O=(t,o,n,a)=>{if(o){a=a||0;for(var i=e.length;i>0&&e[i-1][2]>a;i--)e[i]=e[i-1];e[i]=[o,n,a];return}for(var u=1/0,i=0;i<e.length;i++){for(var[o,n,a]=e[i],l=!0,c=0;c<o.length;c++)(!1&a||u>=a)&&Object.keys(r.O).every(e=>r.O[e](o[c]))?o.splice(c--,1):(l=!1,a<u&&(u=a));if(l){e.splice(i--,1);var d=n();void 0!==d&&(t=d)}}return t}})(),r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;r.t=function(o,n){if(1&n&&(o=this(o)),8&n||"object"==typeof o&&o&&(4&n&&o.__esModule||16&n&&"function"==typeof o.then))return o;var a=Object.create(null);r.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var u=2&n&&o;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach(e=>i[e]=()=>o[e]);return i.default=()=>o,r.d(a,i),a}})(),r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,o)=>(r.f[o](e,t),t),[])),r.u=e=>"static/chunks/"+e+".19abaa6d618295ed.js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="_N_E:";r.l=(o,n,a,i)=>{if(e[o])return void e[o].push(n);if(void 0!==a)for(var u,l,c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var s=c[d];if(s.getAttribute("src")==o||s.getAttribute("data-webpack")==t+a){u=s;break}}u||(l=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,r.nc&&u.setAttribute("nonce",r.nc),u.setAttribute("data-webpack",t+a),u.src=r.tu(o)),e[o]=[n];var f=(t,r)=>{u.onerror=u.onload=null,clearTimeout(p);var n=e[o];if(delete e[o],u.parentNode&&u.parentNode.removeChild(u),n&&n.forEach(e=>e(r)),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=f.bind(null,u.onerror),u.onload=f.bind(null,u.onload),l&&document.head.appendChild(u)}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:e=>e},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("nextjs#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="/_next/",(()=>{var e={8068:0,497:0};r.f.j=(t,o)=>{var n=r.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else if(/^(497|8068)$/.test(t))e[t]=0;else{var a=new Promise((r,o)=>n=e[t]=[r,o]);o.push(n[2]=a);var i=r.p+r.u(t),u=Error();r.l(i,o=>{if(r.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;u.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",u.name="ChunkLoadError",u.type=a,u.request=i,n[1](u)}},"chunk-"+t,t)}},r.O.j=t=>0===e[t];var t=(t,o)=>{var n,a,[i,u,l]=o,c=0;if(i.some(t=>0!==e[t])){for(n in u)r.o(u,n)&&(r.m[n]=u[n]);if(l)var d=l(r)}for(t&&t(o);c<i.length;c++)a=i[c],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return r.O(d)},o=self.webpackChunk_N_E=self.webpackChunk_N_E||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})(),r.nc=void 0})();