thursday-agent 0.8.0 → 0.9.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 (264) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  5. package/.next/server/app/_global-error.html +1 -1
  6. package/.next/server/app/_global-error.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/_not-found.html +1 -1
  13. package/.next/server/app/_not-found.rsc +2 -2
  14. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  15. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  16. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  17. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  18. package/.next/server/app/api/bot/keep-working/route.js.nft.json +1 -1
  19. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
  20. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
  21. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  22. package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
  23. package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
  24. package/.next/server/app/api/config/route.js.nft.json +1 -1
  25. package/.next/server/app/api/events/route.js.nft.json +1 -1
  26. package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
  27. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  28. package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
  29. package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
  30. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  31. package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
  32. package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
  33. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  34. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  35. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  36. package/.next/server/app/api/memory/edit/route.js +1 -1
  37. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
  38. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  39. package/.next/server/app/api/probe/route.js.nft.json +1 -1
  40. package/.next/server/app/api/reach/route.js +11 -11
  41. package/.next/server/app/api/reach/route.js.nft.json +1 -1
  42. package/.next/server/app/api/routine/route.js +6 -6
  43. package/.next/server/app/api/routine/route.js.nft.json +1 -1
  44. package/.next/server/app/api/signins/route.js.nft.json +1 -1
  45. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  46. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  47. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  48. package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
  49. package/.next/server/app/api/thursday/text/route.js +11 -11
  50. package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
  51. package/.next/server/app/api/thursday/tool-call/route.js +6 -6
  52. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  53. package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
  54. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  55. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
  56. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  57. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  58. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  59. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  60. package/.next/server/app/page/server-reference-manifest.json +56 -56
  61. package/.next/server/app/page.js +3 -3
  62. package/.next/server/app/page.js.nft.json +1 -1
  63. package/.next/server/app/page_client-reference-manifest.js +1 -1
  64. package/.next/server/chunks/[root-of-the-server]__012s2o8._.js +1 -1
  65. package/.next/server/chunks/[root-of-the-server]__04r4h-2._.js +1 -1
  66. package/.next/server/chunks/[root-of-the-server]__0mrk2it._.js +1 -1
  67. package/.next/server/chunks/[root-of-the-server]__0nmhgeo._.js +3 -0
  68. package/.next/server/chunks/[root-of-the-server]__1fy2g82._.js +3 -0
  69. package/.next/server/chunks/[root-of-the-server]__1ndi14y._.js +1 -1
  70. package/.next/server/chunks/[root-of-the-server]__1nmflqk._.js +3 -0
  71. package/.next/server/chunks/[root-of-the-server]__1v7-zke._.js +1 -1
  72. package/.next/server/chunks/[root-of-the-server]__1wnzmx9._.js +3 -0
  73. package/.next/server/chunks/[root-of-the-server]__1xv-5cq._.js +1 -1
  74. package/.next/server/chunks/[root-of-the-server]__1ygplx1._.js +1 -1
  75. package/.next/server/chunks/_05v8k21._.js +1 -1
  76. package/.next/server/chunks/_0awtznl._.js +4 -4
  77. package/.next/server/chunks/_0k6qjcf._.js +1 -1
  78. package/.next/server/chunks/_0na2fj1._.js +5 -5
  79. package/.next/server/chunks/_0x-ej3f._.js +21 -21
  80. package/.next/server/chunks/_1dc_d1q._.js +22 -20
  81. package/.next/server/chunks/_1jc5g4p._.js +2 -2
  82. package/.next/server/chunks/_1jn-aep._.js +50 -48
  83. package/.next/server/chunks/{_1u8ygbz._.js → _1m88lkh._.js} +7 -7
  84. package/.next/server/chunks/_1uuucy-._.js +4 -4
  85. package/.next/server/chunks/_1v9r2ke._.js +1 -1
  86. package/.next/server/chunks/ssr/{[root-of-the-server]__1h4bnrf._.js → [root-of-the-server]__0oo-wlv._.js} +2 -2
  87. package/.next/server/chunks/ssr/{[root-of-the-server]__1kyi568._.js → [root-of-the-server]__0tvavy9._.js} +1 -1
  88. package/.next/server/chunks/ssr/[root-of-the-server]__0tzekbl._.js +1 -1
  89. package/.next/server/chunks/ssr/[root-of-the-server]__0zuns7e._.js +3 -0
  90. package/.next/server/chunks/ssr/[root-of-the-server]__1se25x0._.js +1 -1
  91. package/.next/server/chunks/ssr/{_1i3ddn7._.js → _05pl_u8._.js} +1 -1
  92. package/.next/server/chunks/ssr/_070nv1_._.js +3 -0
  93. package/.next/server/chunks/ssr/_097-ljd._.js +1 -1
  94. package/.next/server/chunks/ssr/_0dshsh4._.js +3 -0
  95. package/.next/server/chunks/ssr/_0fqhhwi._.js +1 -1
  96. package/.next/server/chunks/ssr/{_0z8jpch._.js → _0ital-2._.js} +2 -2
  97. package/.next/server/chunks/ssr/{_19g570d._.js → _0kjj5ts._.js} +3 -3
  98. package/.next/server/chunks/ssr/{_1nod5hh._.js → _0l_mcfz._.js} +2 -2
  99. package/.next/server/chunks/ssr/_0ld9_qq._.js +1 -1
  100. package/.next/server/chunks/ssr/_0ltz2q5._.js +3 -0
  101. package/.next/server/chunks/ssr/_0scf7xy._.js +3 -0
  102. package/.next/server/chunks/ssr/_0u5xv6g._.js +3 -0
  103. package/.next/server/chunks/ssr/{_0ewory0._.js → _0urj3mc._.js} +2 -2
  104. package/.next/server/chunks/ssr/{_0pm-2p-._.js → _1-zyvdb._.js} +2 -2
  105. package/.next/server/chunks/ssr/{_1_rqu8x._.js → _12mijol._.js} +7 -7
  106. package/.next/server/chunks/ssr/_15zqt-t._.js +1 -1
  107. package/.next/server/chunks/ssr/_184327j._.js +1 -1
  108. package/.next/server/chunks/ssr/{_1y-ea28._.js → _1a-nuxx._.js} +2 -2
  109. package/.next/server/chunks/ssr/_1alxym6._.js +3 -0
  110. package/.next/server/chunks/ssr/{_0hzz82u._.js → _1d423aj._.js} +25 -23
  111. package/.next/server/chunks/ssr/{_1u1mxu9._.js → _1flbs77._.js} +2 -2
  112. package/.next/server/chunks/ssr/_1mqn9mc._.js +1 -1
  113. package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
  114. package/.next/server/chunks/ssr/{_1oijqjw._.js → _1tmu8z-._.js} +2 -2
  115. package/.next/server/chunks/ssr/{_10y6r1n._.js → _1uy0xom._.js} +3 -3
  116. package/.next/server/chunks/ssr/_1x-kojb._.js +20 -0
  117. package/.next/server/chunks/ssr/_1xoch6f._.js +1 -1
  118. package/.next/server/chunks/ssr/_1z74dmq._.js +164 -0
  119. package/.next/server/chunks/ssr/features_bot_1nr94ks._.js +3 -0
  120. package/.next/server/chunks/ssr/features_bot_1s_-2vj._.js +1 -1
  121. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  122. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
  123. package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
  124. package/.next/server/chunks/ssr/{node_modules_111sh9o._.js → node_modules_03d0rfz._.js} +1 -1
  125. package/.next/server/chunks/ssr/{node_modules_0lg75qx._.js → node_modules_04_sbbc._.js} +1 -1
  126. package/.next/server/chunks/ssr/{node_modules_10gbm2y._.js → node_modules_05ybmta._.js} +1 -1
  127. package/.next/server/chunks/ssr/{node_modules_1v9tc1c._.js → node_modules_068ws5v._.js} +1 -1
  128. package/.next/server/chunks/ssr/{node_modules_1_8mv4v._.js → node_modules_06bb4q8._.js} +1 -1
  129. package/.next/server/chunks/ssr/{node_modules_01f8_se._.js → node_modules_07rs_p2._.js} +1 -1
  130. package/.next/server/chunks/ssr/{node_modules_0ii1l89._.js → node_modules_0dzm4um._.js} +1 -1
  131. package/.next/server/chunks/ssr/{node_modules_20xmwtu._.js → node_modules_0jljel9._.js} +1 -1
  132. package/.next/server/chunks/ssr/{node_modules_1ix-g49._.js → node_modules_0sgy-dc._.js} +1 -1
  133. package/.next/server/chunks/ssr/{node_modules_0woscox._.js → node_modules_0t_ez6-._.js} +1 -1
  134. package/.next/server/chunks/ssr/{node_modules_059vtf2._.js → node_modules_0th357h._.js} +1 -1
  135. package/.next/server/chunks/ssr/{node_modules_06w645b._.js → node_modules_0ubdtk-._.js} +1 -1
  136. package/.next/server/chunks/ssr/{node_modules_0b8df3s._.js → node_modules_0uyh_vb._.js} +1 -1
  137. package/.next/server/chunks/ssr/{node_modules_07ih6wb._.js → node_modules_0wnlddw._.js} +1 -1
  138. package/.next/server/chunks/ssr/{node_modules_0gt-uw9._.js → node_modules_0x630an._.js} +1 -1
  139. package/.next/server/chunks/ssr/{node_modules_1x825hz._.js → node_modules_0yvz9e0._.js} +1 -1
  140. package/.next/server/chunks/ssr/{node_modules_0t-44lj._.js → node_modules_12et8d5._.js} +1 -1
  141. package/.next/server/chunks/ssr/{node_modules_1m3gb16._.js → node_modules_13kwejm._.js} +1 -1
  142. package/.next/server/chunks/ssr/{node_modules_1p9rdsy._.js → node_modules_1af3w91._.js} +1 -1
  143. package/.next/server/chunks/ssr/{node_modules_0sz5yg1._.js → node_modules_1bucjlk._.js} +1 -1
  144. package/.next/server/chunks/ssr/{node_modules_1teyzfa._.js → node_modules_1lkix61._.js} +1 -1
  145. package/.next/server/chunks/ssr/{node_modules_1lsyy7k._.js → node_modules_1ogczzz._.js} +1 -1
  146. package/.next/server/chunks/ssr/{node_modules_1-7qawg._.js → node_modules_1s-gb-1._.js} +1 -1
  147. package/.next/server/chunks/ssr/{node_modules_0yv-re6._.js → node_modules_1uwg-gz._.js} +1 -1
  148. package/.next/server/chunks/ssr/{node_modules_03ptrl9._.js → node_modules_1wbkzl9._.js} +1 -1
  149. package/.next/server/chunks/ssr/{node_modules_00jv9_3._.js → node_modules_1z1lrbk._.js} +1 -1
  150. package/.next/server/chunks/ssr/{node_modules_@base-ui_react_0jne69c._.js → node_modules_@base-ui_react_0buz1-j._.js} +1 -1
  151. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_00q1oa3._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0r443fh._.js} +1 -1
  152. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1-2_5z7._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_10wnlbk._.js} +1 -1
  153. package/.next/server/middleware-build-manifest.js +3 -3
  154. package/.next/server/pages/404.html +1 -1
  155. package/.next/server/pages/500.html +1 -1
  156. package/.next/server/server-reference-manifest.js +1 -1
  157. package/.next/server/server-reference-manifest.json +57 -57
  158. package/.next/static/chunks/06nt9tatr-dug.js +1 -0
  159. package/.next/static/chunks/0_awn8tucznxc.js +1 -0
  160. package/.next/static/chunks/{34s52v8f841zo.js → 0ge-hx0ed83a1.js} +1 -1
  161. package/.next/static/chunks/0pda_vf-abwvx.js +1 -0
  162. package/.next/static/chunks/{2u9yjkpkoij75.js → 0qmd8n52hp-6v.js} +1 -1
  163. package/.next/static/chunks/0rowp9rx3qbxu.js +18 -0
  164. package/.next/static/chunks/{1ocy4w0v20a3v.js → 13ixzheqw7o-w.js} +2 -2
  165. package/.next/static/chunks/1grkt5gr8pbg1.js +17 -0
  166. package/.next/static/chunks/{21gf2t_whhurc.js → 1yugpvvi8qrbu.js} +2 -2
  167. package/.next/static/chunks/{1e4yrzs5evq_r.js → 245hb85nsy6j4.js} +1 -1
  168. package/.next/static/chunks/27lkanxvtdn09.js +1 -0
  169. package/.next/static/chunks/{0oz7a68qanm99.js → 27tvv1i-smrck.js} +1 -1
  170. package/.next/static/chunks/{2zhfdbq50ee5i.js → 2c64drdevdla3.js} +1 -1
  171. package/.next/static/chunks/{0k5tkt_qi52kb.js → 2ndw4w4u2x51r.js} +1 -1
  172. package/.next/static/chunks/37j27b3e1gt7r.js +1 -0
  173. package/.next/static/chunks/{2om4lkg86feb4.js → 38301ji-85i30.js} +1 -1
  174. package/.next/static/chunks/{09c13vnqy7al3.js → 3bbzsitgiltnt.js} +2 -2
  175. package/.next/static/chunks/3fec-aeteddr-.js +1 -0
  176. package/.next/static/chunks/3go3hwp1z2_h2.css +1 -0
  177. package/.next/static/chunks/3h2bun3hcggg8.js +1 -0
  178. package/.next/static/chunks/{0g1p98s2pfx2w.js → 3h2e-xv1zxh_f.js} +2 -2
  179. package/.next/static/chunks/3j1y335o95mj7.js +1 -0
  180. package/.next/static/chunks/3obf9n3cxj99k.js +1 -0
  181. package/.next/static/chunks/{2upc9mkcc3nlq.js → 427qsc6kahxyo.js} +1 -1
  182. package/README.md +31 -14
  183. package/bin/port.mjs +11 -7
  184. package/bin/thursday.mjs +1 -1
  185. package/components/ui/radio-group.tsx +2 -2
  186. package/components/ui/shiny-text.tsx +3 -22
  187. package/docs/how-it-works.md +11 -3
  188. package/docs/images/first-run.png +0 -0
  189. package/docs/images/keeps-going.png +0 -0
  190. package/docs/images/two-minds.png +0 -0
  191. package/features/ai/components/model-browser.tsx +1 -1
  192. package/features/ai/components/model-picker.tsx +1 -1
  193. package/features/ai/guide.ts +9 -4
  194. package/features/ai/prompts/bot.prompt.ts +4 -1
  195. package/features/ai/tools/routine.tool.ts +28 -16
  196. package/features/bot/bot.runner.ts +3 -1
  197. package/features/bot/components/bot-mark.tsx +6 -1
  198. package/features/bot/components/bot-setting.tsx +2 -4
  199. package/features/bot/components/bot-tool.tsx +2 -0
  200. package/features/bot/components/room-list.tsx +12 -3
  201. package/features/bot/components/room-pill.tsx +26 -19
  202. package/features/config/components/config-setting.tsx +17 -5
  203. package/features/config/components/voice-key.tsx +38 -18
  204. package/features/connectors/mcp.const.ts +90 -59
  205. package/features/intro/components/intro.tsx +50 -27
  206. package/features/routine/components/routine-mark.tsx +4 -6
  207. package/features/routine/components/routine-setting.tsx +332 -143
  208. package/features/routine/routine.query.ts +24 -3
  209. package/features/routine/routine.schema.ts +55 -4
  210. package/features/settings/components/install-app.tsx +1 -4
  211. package/features/settings/components/setting-ui.tsx +1 -1
  212. package/features/skills/skills.discover.ts +2 -1
  213. package/features/skills/skills.query.ts +5 -1
  214. package/features/skills/skills.schema.ts +2 -0
  215. package/features/thursday/components/ascii-orb.tsx +39 -10
  216. package/features/thursday/components/connect-wave.tsx +284 -0
  217. package/features/thursday/components/side-captions.tsx +29 -17
  218. package/features/thursday/components/thursday-setting.tsx +2 -2
  219. package/features/thursday/components/thursday.tsx +130 -58
  220. package/features/thursday/components/voice-picker.tsx +1 -1
  221. package/features/thursday/components/write-line.tsx +2 -2
  222. package/features/thursday/open-work.ts +11 -3
  223. package/features/thursday/tool-line.ts +94 -12
  224. package/features/thursday/use-text-call.ts +3 -2
  225. package/features/thursday/use-thursday.ts +5 -2
  226. package/features/workspace/components/artifact-view.tsx +129 -7
  227. package/guide/bots.md +17 -5
  228. package/guide/calls.md +15 -7
  229. package/guide/setup.md +10 -2
  230. package/lib/desktop-notify.ts +3 -2
  231. package/package.json +1 -1
  232. package/scripts/bot-context.test.mts +1 -1
  233. package/skills/computer/SKILL.md +1 -0
  234. package/skills/interactive-page/SKILL.md +4 -0
  235. package/.next/server/chunks/[root-of-the-server]__0n-l_n_._.js +0 -3
  236. package/.next/server/chunks/[root-of-the-server]__0wvo2of._.js +0 -3
  237. package/.next/server/chunks/[root-of-the-server]__1e6aut3._.js +0 -3
  238. package/.next/server/chunks/[root-of-the-server]__1ziojdq._.js +0 -3
  239. package/.next/server/chunks/ssr/[root-of-the-server]__1srp8l5._.js +0 -3
  240. package/.next/server/chunks/ssr/_0mes4s0._.js +0 -3
  241. package/.next/server/chunks/ssr/_0ya0cb0._.js +0 -3
  242. package/.next/server/chunks/ssr/_0yto5s7._.js +0 -20
  243. package/.next/server/chunks/ssr/_10dw2nv._.js +0 -3
  244. package/.next/server/chunks/ssr/_1p0gxeo._.js +0 -164
  245. package/.next/server/chunks/ssr/_1r41yvh._.js +0 -3
  246. package/.next/server/chunks/ssr/_1r79ksv._.js +0 -3
  247. package/.next/server/chunks/ssr/features_bot_1ogjt52._.js +0 -3
  248. package/.next/server/chunks/ssr/node_modules_@base-ui_react_0b3d4m9._.js +0 -3
  249. package/.next/static/chunks/03omwz_vi2ndg.js +0 -1
  250. package/.next/static/chunks/0_1bqgd6wt_og.js +0 -1
  251. package/.next/static/chunks/0abgkzikaznxc.js +0 -1
  252. package/.next/static/chunks/0bddkpash59-o.js +0 -17
  253. package/.next/static/chunks/0c2-bzhy3a0ib.js +0 -1
  254. package/.next/static/chunks/0iilfb1ocevnx.js +0 -1
  255. package/.next/static/chunks/0imbhx-j830a_.css +0 -1
  256. package/.next/static/chunks/24h1y9dhy3m_2.js +0 -1
  257. package/.next/static/chunks/2be08eqxsfc1y.js +0 -1
  258. package/.next/static/chunks/2d3yhjtafgmtw.js +0 -1
  259. package/.next/static/chunks/2f_5saocsko_b.js +0 -1
  260. package/.next/static/chunks/2lwbr5vx0ixaj.js +0 -18
  261. package/.next/static/chunks/44kjmi5h_p8px.js +0 -1
  262. /package/.next/static/{UiOMPYpQ4fqGyu5PzS-7j → u8kJqShUAa49vY7BxAWsw}/_buildManifest.js +0 -0
  263. /package/.next/static/{UiOMPYpQ4fqGyu5PzS-7j → u8kJqShUAa49vY7BxAWsw}/_clientMiddlewareManifest.js +0 -0
  264. /package/.next/static/{UiOMPYpQ4fqGyu5PzS-7j → u8kJqShUAa49vY7BxAWsw}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59377,e=>{"use strict";var t=e.i(843476);e.s([],158421),e.i(158421);var n=e.i(271645),a=e.i(896499),i=e.i(17989),s=e.i(46420),o=e.i(733332);let r=n.createContext(void 0);function l(e){let t=n.useContext(r);if(void 0===t&&!e)throw Error((0,o.default)(47));return t}var c=e.i(174080),d=e.i(301252),u=e.i(439957),p=e.i(956789),m=e.i(56434),h=e.i(18478),g=e.i(264111),f=e.i(116786),x=e.i(990627),v=e.i(638396);let S={...f.popupStoreSelectors,disabled:e=>e.disabled,instantType:e=>e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,modal:e=>e.modal,focusManagerModal:e=>e.focusManagerModal,stickIfOpen:e=>e.stickIfOpen,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class b extends d.ReactStore{constructor(e,t,n){const a=new x.PopupTriggerMap;super(C(e,a,t,n),j(a),S)}setOpen=(e,t)=>{let n,a=t.reason===m.REASONS.triggerHover,i=t.reason===m.REASONS.triggerPress&&0===t.event.detail,s=!e&&(t.reason===m.REASONS.escapeKey||null==t.reason),o=(0,g.attachPreventUnmountOnClose)(t),r=this.select("activeTriggerId");if(e||t.reason!==m.REASONS.closePress||null!=t.trigger||null==r||(t.trigger=this.context.triggerElements.getById(r)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let l=()=>{let n=(0,g.createPopupOpenState)(this.state,e,t.trigger,o());n.openChangeReason=t.reason,this.update(n)};a?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(v.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),c.flushSync(l)):l(),i?n="click":s?n="dismiss":t.reason===m.REASONS.focusOut&&(n="focus"),this.set("instantType",n)}}function C(e,t,n,a=!1){let i={...(0,f.createInitialPopupStoreState)(t,n,a),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function j(e){return{popupRef:n.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:n.createRef(),beforeContentFocusGuardRef:n.createRef(),stickIfOpenTimeout:new u.Timeout,triggerElements:e}}var y=e.i(675606);let N=(0,a.fastComponent)(function({props:e}){var a;let i,{children:s,open:o,defaultOpen:l=!1,onOpenChange:c,onOpenChangeComplete:d,modal:u=!1,handle:p,triggerId:h,defaultTriggerId:f=null}=e,x=(a={modal:u,open:l,openProp:o,activeTriggerId:f,triggerIdProp:h},i=(0,g.usePopupRootStore)((e,t)=>new b(a,e,t)),n.useEffect(()=>i.context.stickIfOpenTimeout.disposeEffect(),[i]),i);x.useControlledProp("openProp",o),x.useControlledProp("triggerIdProp",h);let v=x.useState("open"),S=x.useState("mounted"),C=x.useState("payload");x.useContextCallback("onOpenChange",c),x.useContextCallback("onOpenChangeComplete",d),(0,g.usePopupRootSync)(x,v),(0,g.useImplicitActiveTrigger)(x);let{forceUnmount:j}=(0,g.useOpenStateTransitions)(v,x,()=>{x.update({stickIfOpen:!0,openChangeReason:null})});x.useSyncedValues({modal:u}),n.useEffect(()=>{v||x.context.stickIfOpenTimeout.clear()},[x,v]),n.useImperativeHandle(e.actionsRef,()=>({unmount:j,close:()=>x.setOpen(!1,(0,y.createChangeEventDetails)(m.REASONS.imperativeAction))}),[j,x]);let N=v||S;return(0,t.jsxs)(r.Provider,{value:x,children:[p&&(0,t.jsx)(g.PopupHandleAttachment,{handle:p,store:x}),N&&(0,t.jsx)(M,{store:x,modal:u}),"function"==typeof s?s({payload:C}):s]})});function M({store:e,modal:t}){let n=e.useState("floatingRootContext"),a=(0,i.useDismiss)(n,{outsidePressEvent:{mouse:"trap-focus"===t?"sloppy":"intentional",touch:"sloppy"}}),s=a.reference,o=a.floating;return(0,g.usePopupInteractionProps)(e,{activeTriggerProps:s,inactiveTriggerProps:s,popupProps:o}),null}var k=e.i(540886),z=e.i(879938),w=e.i(552245),R=e.i(650316),O=e.i(385689),P=e.i(872135),V=e.i(788015),E=e.i(152535),I=e.i(459636),T=e.i(346570),L=e.i(32199);let A=(0,a.fastComponentRef)(function(e,a){let{render:i,className:s,style:r,disabled:c=!1,nativeButton:d=!0,handle:u,payload:p,openOnHover:h=!1,delay:f=300,closeDelay:x=0,id:S,...b}=e,C=l(!0),j=(0,I.usePopupHandleStore)(u)??C;if(!j)throw Error((0,o.default)(74));let y=(0,V.useBaseUiId)(S),N=j.useState("isTriggerActive",y),M=j.useState("floatingRootContext"),A=j.useState("isOpenedByTrigger",y),H=j.useState("triggerPopupId",y),F=n.useRef(null),{registerTrigger:D,isMountedByThisTrigger:q}=(0,g.useTriggerDataForwarding)(y,F,j,{payload:p,disabled:c,openOnHover:h,closeDelay:x}),B=j.useState("openChangeReason"),K=j.useState("stickIfOpen"),U=j.useState("openMethod"),G=j.useState("focusManagerModal"),_=(0,P.useHoverReferenceInteraction)(M,{enabled:!c&&h&&("touch"!==U||B!==m.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:(0,R.safePolygon)(),restMs:f,delay:{close:x},triggerElementRef:F,isActiveTrigger:N,isClosing:()=>"ending"===j.select("transitionStatus")}),$=(0,O.useClick)(M,{stickIfOpen:K}),W=(0,L.useOpenMethodTriggerProps)(()=>j.select("open"),e=>{j.set("openMethod",e)}),Y=j.useState("triggerProps",q),{getButtonProps:X,buttonRef:Z}=(0,k.useButton)({disabled:c,native:d}),{preFocusGuardRef:J,handlePreFocusGuardFocus:Q,handleFocusTargetFocus:ee}=(0,T.useTriggerFocusGuards)(j,F),et=(0,w.useRenderElement)("button",e,{state:{disabled:c,open:A},ref:[Z,a,D,F],props:[$.reference,_,Y,W,{[v.CLICK_TRIGGER_IDENTIFIER]:"",id:y,"aria-haspopup":"dialog","aria-expanded":A,"aria-controls":H},b,X],stateAttributesMapping:{open:e=>e&&B===m.REASONS.triggerPress?z.pressableTriggerOpenStateMapping.open(e):z.triggerOpenStateMapping.open(e)}}),en=(0,t.jsx)(n.Fragment,{children:et},y);return q&&!G?(0,t.jsxs)(n.Fragment,{children:[(0,t.jsx)(E.FocusGuard,{ref:J,onFocus:Q}),en,(0,t.jsx)(E.FocusGuard,{ref:j.context.triggerFocusTargetRef,onFocus:ee})]}):en});var H=e.i(726674);let F=n.createContext(void 0),D=n.forwardRef(function(e,n){let{keepMounted:a=!1,...i}=e;return l().useState("mounted")||a?(0,t.jsx)(F.Provider,{value:a,children:(0,t.jsx)(H.FloatingPortal,{ref:n,...i})}):null});var q=e.i(144394),B=e.i(146376);let K=n.createContext(void 0);function U(){let e=n.useContext(K);if(!e)throw Error((0,o.default)(46));return e}var G=e.i(923706),_=e.i(426),$=e.i(222640),W=e.i(789579),Y=e.i(33383);let X=n.forwardRef(function(e,a){let{render:i,className:r,style:c,anchor:d,positionMethod:u,side:p,align:h,sideOffset:g,alignOffset:f,collisionBoundary:x="clipping-ancestors",collisionPadding:S,arrowPadding:b,sticky:C,disableAnchorTracking:j=!1,collisionAvoidance:y=v.POPUP_COLLISION_AVOIDANCE,...N}=e,M=l(),k=function(){let e=n.useContext(F);if(void 0===e)throw Error((0,o.default)(45));return e}(),z=(0,s.useFloatingNodeId)(),w=M.useState("floatingRootContext"),R=M.useState("mounted"),O=M.useState("open"),P=M.useState("openChangeReason"),V=M.useState("activeTriggerElement"),E=M.useState("modal"),I=M.useState("openMethod"),T=M.useState("positionerElement"),L=M.useState("instantType"),A=M.useState("transitionStatus"),H=M.useState("adaptiveOrigin"),D=n.useRef(null),U=(0,$.useAnimationsFinished)(T),X=(0,G.useAnchorPositioning)({anchor:d,floatingRootContext:w,positionMethod:u,mounted:R,side:p,sideOffset:g,align:h,alignOffset:f,arrowPadding:b,collisionBoundary:x,collisionPadding:S,sticky:C,disableAnchorTracking:j,keepMounted:k,nodeId:z,collisionAvoidance:y,adaptiveOrigin:H}),Z=w.useState("domReferenceElement");(0,B.useIsoLayoutEffect)(()=>{let e=D.current;if(Z&&(D.current=Z),e&&Z&&Z!==e){M.set("instantType",void 0);let e=new AbortController;return U(()=>{M.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[Z,U,M]);let J=!0===E&&P!==m.REASONS.triggerHover;(0,Y.useAnchoredPopupScrollLock)(O&&J,"touch"===I,T,V);let Q=M.useStateSetter("positionerElement"),ee={open:O,side:X.side,align:X.align,anchorHidden:X.anchorHidden,instant:L},et=(0,W.usePositioner)(e,ee,{styles:X.positionerStyles,transitionStatus:A,props:N,refs:[a,Q],hidden:!R,inert:!O});return(0,t.jsxs)(K.Provider,{value:X,children:[R&&J&&(0,t.jsx)(_.InternalBackdrop,{inert:(0,q.inertValue)(!O),cutout:V}),(0,t.jsx)(s.FloatingNode,{id:z,children:et})]})});var Z=e.i(229315),J=e.i(61487),Q=e.i(431157),ee=e.i(137584),et=e.i(673327),en=e.i(96533),ea=e.i(253984),ei=e.i(667865);let es=n.createContext(void 0),eo=n.forwardRef(function(e,a){let{render:i,className:s,style:o,initialFocus:r,finalFocus:c,...d}=e,u=l(),p=U(),h=null!=(0,en.useToolbarRootContext)(!0),{context:f,hasClosePart:x}=function(){let[e,t]=n.useState(0),a=(0,ei.useStableCallback)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:n.useMemo(()=>({register:a}),[a]),hasClosePart:e>0}}(),v=u.useState("open"),S=u.useState("openMethod"),b=u.useState("instantType"),C=u.useState("transitionStatus"),j=u.useState("popupProps"),y=u.useState("titleElementId"),N=u.useState("descriptionElementId"),M=u.useState("modal"),k=u.useState("mounted"),R=u.useState("openChangeReason"),O=u.useState("activeTriggerElement"),P=u.useState("floatingRootContext"),V=P.useState("floatingId"),E=u.useState("disabled"),I=u.useState("openOnHover"),T=u.useState("closeDelay");(0,ee.useOpenChangeComplete)({open:v,ref:u.context.popupRef,onComplete(){v&&u.context.onOpenChangeComplete?.(!0)}}),(0,Q.useHoverFloatingInteraction)(P,{enabled:I&&!E,closeDelay:T});let L=void 0===r?(0,g.createDefaultInitialFocus)(u.context.popupRef):r,A=!1!==M&&x;u.useSyncedValue("focusManagerModal",A);let H=u.useStateSetter("popupElement"),F={open:v,side:p.side,align:p.align,instant:b,transitionStatus:C},D=(0,w.useRenderElement)("div",e,{state:F,ref:[a,u.context.popupRef,H],props:[j,{id:V,role:"dialog",...g.FOCUSABLE_POPUP_PROPS,"aria-labelledby":y,"aria-describedby":N,onKeyDown(e){h&&et.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,ea.getDisabledMountTransitionStyles)(C),d],stateAttributesMapping:z.popupTransitionStateMapping});return(0,t.jsx)(J.FloatingFocusManager,{context:P,openInteractionType:S,modal:A,disabled:!k||R===m.REASONS.triggerHover,initialFocus:L,returnFocus:c,restoreFocus:"popup",previousFocusableElement:(0,Z.isHTMLElement)(O)?O:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:(0,t.jsx)(es.Provider,{value:f,children:D})})}),er=n.forwardRef(function(e,t){let{render:n,className:a,style:i,...s}=e,o=l().useState("open"),{arrowRef:r,side:c,align:d,arrowUncentered:u,arrowStyles:p}=U();return(0,w.useRenderElement)("div",e,{state:{open:o,side:c,align:d,uncentered:u},ref:[t,r],props:[{style:p,"aria-hidden":!0},s],stateAttributesMapping:z.popupStateMapping})}),el=n.forwardRef(function(e,t){let{render:n,className:a,style:i,...s}=e,o=l(),r=o.useState("open"),c=o.useState("mounted"),d=o.useState("transitionStatus"),u=o.useState("openChangeReason");return(0,w.useRenderElement)("div",e,{state:{open:r,transitionStatus:d},ref:t,props:[{role:"presentation",hidden:!c,style:{pointerEvents:u===m.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},s],stateAttributesMapping:z.popupTransitionStateMapping})}),ec=n.forwardRef(function(e,t){let{render:n,className:a,style:i,...s}=e,o=l(),r=(0,V.useBaseUiId)(s.id);return o.useSyncedValueWithCleanup("titleElementId",r),(0,w.useRenderElement)("h2",e,{ref:t,props:[{id:r},s]})}),ed=n.forwardRef(function(e,t){let{render:n,className:a,style:i,...s}=e,o=l(),r=(0,V.useBaseUiId)(s.id);return o.useSyncedValueWithCleanup("descriptionElementId",r),(0,w.useRenderElement)("p",e,{ref:t,props:[{id:r},s]})}),eu=n.forwardRef(function(e,t){let a,{render:i,className:s,style:o,disabled:r=!1,nativeButton:c=!0,...d}=e,{buttonRef:u,getButtonProps:p}=(0,k.useButton)({disabled:r,focusableWhenDisabled:!1,native:c}),h=l();return a=n.useContext(es),(0,B.useIsoLayoutEffect)(()=>a?.register(),[a]),(0,w.useRenderElement)("button",e,{ref:[t,u],props:[{onClick(e){h.setOpen(!1,(0,y.createChangeEventDetails)(m.REASONS.closePress,e.nativeEvent))}},d,p]})});var ep=e.i(818390);let em=n.forwardRef(function(e,t){let{render:n,className:a,style:i,children:s,...o}=e,r=l(),{side:c}=U(),d=r.useState("instantType"),{children:u,state:p}=(0,ep.usePopupViewport)({store:r,side:c,children:s}),m={activationDirection:p.activationDirection,transitioning:p.transitioning,instant:d};return(0,w.useRenderElement)("div",e,{state:m,ref:t,props:[o,{children:u}],stateAttributesMapping:ep.popupViewportStateMapping})});var eh=e.i(564170);class eg extends eh.BasePopupHandle{constructor(){super(function(){let e=new x.PopupTriggerMap;return Object.assign(new h.NullStore(Object.freeze(C(void 0,e)),Object.freeze(j(e)),S),{setOpen:p.NOOP})}(),"Popover")}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}}e.s(["Arrow",0,er,"Backdrop",0,el,"Close",0,eu,"Description",0,ed,"Handle",0,eg,"Popup",0,eo,"Portal",0,D,"Positioner",0,X,"Root",0,function(e){return l(!0)?(0,t.jsx)(N,{props:e}):(0,t.jsx)(s.FloatingTree,{children:(0,t.jsx)(N,{props:e})})},"Title",0,ec,"Trigger",0,A,"Viewport",0,em,"createHandle",0,function(){return new eg}],466914);var ef=e.i(466914),ef=ef,ex=e.i(647163);e.s(["Popover",0,function({...e}){return(0,t.jsx)(ef.Root,{"data-slot":"popover",...e})},"PopoverContent",0,function({className:e,align:n="center",alignOffset:a=0,side:i="bottom",sideOffset:s=4,...o}){return(0,t.jsx)(ef.Portal,{children:(0,t.jsx)(ef.Positioner,{align:n,alignOffset:a,side:i,sideOffset:s,className:"isolate z-50",children:(0,t.jsx)(ef.Popup,{"data-slot":"popover-content",className:(0,ex.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...o})})})},"PopoverTrigger",0,function({...e}){return(0,t.jsx)(ef.Trigger,{"data-slot":"popover-trigger",...e})}],59377)},412294,e=>{"use strict";var t=e.i(843476),n=e.i(271645),a=e.i(167881),i=e.i(6799),s=e.i(95187);let o=(0,s.createServerReference)("7f082c0fc23a025e50f6da3880b5c761103c036f16",s.callServer,void 0,s.findSourceMapURL,"startChatGptSignInAction");var r=e.i(609856);e.s(["ChatGptSignIn",0,function({variant:e}){let[s,l]=(0,n.useState)(!1),c=(0,n.useRef)(null),d=()=>{c.current&&clearInterval(c.current),c.current=null};(0,n.useEffect)(()=>d,[]);let[u,p]=(0,r.useServerAction)(o,{onOk:e=>{let t=window.open(e,"thursday-chatgpt","popup,width=520,height=720");if(!t)return void i.toast.add({type:"error",title:"The sign-in window was blocked",description:"Allow pop-ups for this page, then try again"});l(!0),d();let n=Date.now()+6e5;c.current=setInterval(()=>{!t.closed&&Date.now()<n||(d(),l(!1))},700)}});return(0,t.jsx)(a.Button,{variant:e,loading:p||s,onClick:()=>u(),children:"Sign in with ChatGPT"})}],412294)},146538,e=>{"use strict";var t=e.i(843476),n=e.i(689664),a=e.i(563707),i=e.i(152886),s=e.i(758925),o=e.i(271645),r=e.i(798120),l=e.i(167881),c=e.i(23750),d=e.i(59377),u=e.i(439100),p=e.i(609856),m=e.i(283653),h=e.i(647163),g=e.i(265402),f=e.i(412294),x=e.i(611568),v=e.i(566595),S=e.i(7227),b=e.i(630374),C=e.i(421429),j=e.i(968978);let y={anthropic:"anthropic",openai:"openai",google:"google",spacexai:"xai",mistral:"mistral",deepseek:"deepseek",cohere:"cohere"},N={alibaba:[{d:"M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z"}],amazon:[{d:"M13.05 15.513h3.08c.214 0 .389.177.389.394v1.82a1.704 1.704 0 011.296 1.661c0 .943-.755 1.708-1.685 1.708-.931 0-1.686-.765-1.686-1.708 0-.807.554-1.484 1.297-1.662v-1.425h-2.69v4.663a.395.395 0 01-.188.338l-2.69 1.641a.385.385 0 01-.405-.002l-4.926-3.086a.395.395 0 01-.185-.336V16.3L2.196 14.87A.395.395 0 012 14.555L2 14.528V9.406c0-.14.073-.27.192-.34l2.465-1.462V4.448c0-.129.062-.249.165-.322l.021-.014L9.77 1.058a.385.385 0 01.407 0l2.69 1.675a.395.395 0 01.185.336V7.6h3.856V5.683a1.704 1.704 0 01-1.296-1.662c0-.943.755-1.708 1.685-1.708.931 0 1.685.765 1.685 1.708 0 .807-.553 1.484-1.296 1.662v2.311a.391.391 0 01-.389.394h-4.245v1.806h6.624a1.69 1.69 0 011.64-1.313c.93 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708a1.69 1.69 0 01-1.64-1.314H13.05v1.937h4.953l.915 1.18a1.66 1.66 0 01.84-.227c.931 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708-.93 0-1.685-.765-1.685-1.708 0-.346.102-.668.276-.937l-.724-.935H13.05v1.806zM9.973 1.856L7.93 3.122V6.09h-.778V3.604L5.435 4.669v2.945l2.11 1.36L9.712 7.61V5.334h.778V7.83c0 .136-.07.263-.184.335L7.963 9.638v2.081l1.422 1.009-.446.646-1.406-.998-1.53 1.005-.423-.66 1.605-1.055v-1.99L5.038 8.29l-2.26 1.34v1.676l1.972-1.189.398.677-2.37 1.429V14.3l2.166 1.258 2.27-1.368.397.677-2.176 1.311V19.3l1.876 1.175 2.365-1.426.398.678-2.017 1.216 1.918 1.201 2.298-1.403v-5.78l-4.758 2.893-.4-.675 5.158-3.136V3.289L9.972 1.856zM16.13 18.47a.913.913 0 00-.908.92c0 .507.406.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zm3.63-3.81a.913.913 0 00-.908.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92zm1.555-4.99a.913.913 0 00-.908.92c0 .507.407.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zM17.296 3.1a.913.913 0 00-.907.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92z"}],"arcee-ai":[{d:"M13.236 2.377L2.751 20.493H0L11.863 0l1.373 2.377zm3.554 6.156l-9.606 11.96H4.13L15.511 6.32l1.279 2.212zm6.908 11.96H14.05l8.406-2.151 1.242 2.15zm-3.42-5.922l-7.843 5.92H8.482l10.597-7.997 1.2 2.077z"}],bfl:[{d:"M0 20.683L12.01 2.5 24 20.683h-2.233L12.009 5.878 3.471 18.806h12.122l1.239 1.877H0z"},{d:"M8.069 16.724l2.073-3.115 2.074 3.115H8.069zM18.24 20.683l-5.668-8.707h2.177l5.686 8.707h-2.196zM19.74 11.676l2.13-3.19 2.13 3.19h-4.26z"}],bytedance:[{d:"M14.944 18.587l-1.704-.445V10.01l1.824-.462c1-.254 1.84-.461 1.88-.453.032 0 .056 2.235.056 4.972v4.973l-.176-.008c-.104 0-.952-.207-1.88-.446z"},{d:"M7 16.542c0-2.736.024-4.98.064-4.98.032-.008.872.2 1.88.454l1.816.461-.016 4.05-.024 4.049-1.632.422c-.896.23-1.736.445-1.856.469L7 21.523v-4.98z"},{d:"M19.24 12.477c0-9.03.008-9.515.144-9.475.072.024.784.207 1.576.406.792.207 1.576.405 1.744.445l.296.08-.016 8.56-.024 8.568-1.624.414c-.888.23-1.728.437-1.856.47l-.24.055v-9.523z"},{d:"M1 12.509c0-4.678.024-8.505.064-8.505.032 0 .872.207 1.872.454l1.824.461v7.582c0 4.16-.016 7.574-.032 7.574-.024 0-.872.215-1.88.47L1 21.013v-8.505z"}],"fish-audio":[{d:"M23.12 12.13v.62c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-.62c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44m-1.77.37v1.74c0 .24.2.44.44.44.25 0 .44-.2.44-.44V12.5c0-.24-.19-.44-.44-.44-.24 0-.44.2-.44.44m-1.76.43v1.99q0 .09.03.17.04.08.1.14.07.07.15.1t.17.03c.24 0 .44-.19.44-.44v-1.99c0-.25-.2-.44-.44-.44q-.09 0-.17.03t-.15.1q-.06.06-.1.14-.03.08-.03.17m-1.76.35v1.97c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-1.97c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44m-1.77.32v1.65c0 .25.2.45.44.45s.44-.2.44-.45V13.6c0-.25-.2-.45-.44-.45s-.44.2-.44.45m-1.76 1.26v.3q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3v-.3q-.01-.17-.14-.3-.13-.11-.31-.12-.17.01-.3.12-.13.13-.14.3M0 9.38v.19c0 .24.2.44.44.44.25 0 .44-.2.44-.44v-.19c0-.25-.19-.44-.44-.44-.24 0-.44.19-.44.44m1.82.15v.81c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-.81q0-.18-.13-.31t-.31-.13-.31.13-.13.31m1.81-.24v3.39q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V9.29q-.01-.17-.14-.3-.13-.11-.31-.12-.17.01-.3.12-.13.13-.14.3m1.83-.35v.22c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-.22q0-.18-.13-.31T5.9 8.5t-.31.13-.13.31m0 2.94v2.34c0 .25.19.44.44.44.24 0 .44-.19.44-.44v-2.34c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44m15.89-3.32V11c0 .25.2.44.44.44.25 0 .44-.19.44-.44V8.56c0-.24-.19-.44-.44-.44-.24 0-.44.2-.44.44m-1.76-.39v3.28q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V8.17c0-.25-.2-.44-.44-.44q-.09 0-.17.03t-.15.1q-.06.06-.1.14-.03.08-.03.17M17.83 8v3.9c0 .24.19.44.44.44.24 0 .44-.2.44-.44V8c0-.25-.2-.44-.44-.44-.25 0-.44.19-.44.44m-1.77.11v3.96c0 .25.2.44.44.44s.44-.19.44-.44V8.11c0-.25-.2-.44-.44-.44s-.44.19-.44.44m-1.76.27v5.03q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V8.38c0-.25-.2-.44-.45-.44-.24 0-.44.19-.44.44m-1.8.46v5.75q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V8.84c0-.25-.2-.44-.45-.44-.24 0-.44.19-.44.44m-1.76.76v5.52c0 .24.2.44.44.44.25 0 .44-.2.44-.44V9.6c0-.24-.19-.44-.44-.44-.24 0-.44.2-.44.44m-1.77 1.01v4.77q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3v-4.77q-.01-.17-.14-.3-.13-.11-.31-.12-.17.01-.3.12-.13.13-.14.3M23.12 9.6v1.22c0 .24.19.44.44.44.24 0 .44-.2.44-.44V9.6c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44M7.21 11.32V16c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-4.68q0-.18-.13-.31t-.31-.13-.31.13-.13.31"}],inception:[{d:"M14.767 1H7.884L1 7.883v6.884h6.884V7.883h6.883V1zM9.234 23h6.882L23 16.116V9.233h-6.884v6.883H9.234V23z"}],klingai:[{d:"M5.493 21.234c-1.112-1.451-1.109-4.263-.081-7.459l-4.557-2.63a1.683 1.683 0 01-.85-1.304 1.505 1.505 0 01.08-.622 13.18 13.18 0 011.037-2.255c3.476-6.02 10.916-8.23 16.619-4.938.46.266.82.67 1.081 1.184.785 1.545.685 4.096-.234 6.954l4.557 2.631c.339.196.596.492.736.832a1.53 1.53 0 01.034 1.093 13.146 13.146 0 01-1.037 2.255c-3.476 6.02-10.916 8.23-16.619 4.938a2.6 2.6 0 01-.766-.68zm11.096-6.615c-2.073 3.591-5.808 5.316-8.343 3.852-1.267-.731-1.994-2.122-2.145-3.778-.095-1.035.036-2.173.4-3.32.217-.684.517-1.37.902-2.039l.008-.014c2.073-3.59 5.808-5.315 8.343-3.852.633.366 1.13.895 1.49 1.54.986 1.772.922 4.415-.285 6.914-.111.23-.232.457-.362.683l-.008.014z"}],kwaipilot:[{d:"M11.765.03C5.327.03.108 5.25.108 11.686c0 3.514 1.556 6.665 4.015 8.804L9.89 8.665h6.451L9.31 23.083c.807.173 1.63.26 2.455.26 6.438 0 11.657-5.22 11.657-11.658S18.202.028 11.765.028V.03z"}],meta:[{d:"M6.897 4c1.915 0 3.516.932 5.43 3.376l.282-.373c.19-.246.383-.484.58-.71l.313-.35C14.588 4.788 15.792 4 17.225 4c1.273 0 2.469.557 3.491 1.516l.218.213c1.73 1.765 2.917 4.71 3.053 8.026l.011.392.002.25c0 1.501-.28 2.759-.818 3.7l-.14.23-.108.153c-.301.42-.664.758-1.086 1.009l-.265.142-.087.04a3.493 3.493 0 01-.302.118 4.117 4.117 0 01-1.33.208c-.524 0-.996-.067-1.438-.215-.614-.204-1.163-.56-1.726-1.116l-.227-.235c-.753-.812-1.534-1.976-2.493-3.586l-1.43-2.41-.544-.895-1.766 3.13-.343.592C7.597 19.156 6.227 20 4.356 20c-1.21 0-2.205-.42-2.936-1.182l-.168-.184c-.484-.573-.837-1.311-1.043-2.189l-.067-.32a8.69 8.69 0 01-.136-1.288L0 14.468c.002-.745.06-1.49.174-2.23l.1-.573c.298-1.53.828-2.958 1.536-4.157l.209-.34c1.177-1.83 2.789-3.053 4.615-3.16L6.897 4zm-.033 2.615l-.201.01c-.83.083-1.606.673-2.252 1.577l-.138.199-.01.018c-.67 1.017-1.185 2.378-1.456 3.845l-.004.022a12.591 12.591 0 00-.207 2.254l.002.188c.004.18.017.36.04.54l.043.291c.092.503.257.908.486 1.208l.117.137c.303.323.698.492 1.17.492 1.1 0 1.796-.676 3.696-3.641l2.175-3.4.454-.701-.139-.198C9.11 7.3 8.084 6.616 6.864 6.616zm10.196-.552l-.176.007c-.635.048-1.223.359-1.82.933l-.196.198c-.439.462-.887 1.064-1.367 1.807l.266.398c.18.274.362.56.55.858l.293.475 1.396 2.335.695 1.114c.583.926 1.03 1.6 1.408 2.082l.213.262c.282.326.529.54.777.673l.102.05c.227.1.457.138.718.138.176.002.35-.023.518-.073.338-.104.61-.32.813-.637l.095-.163.077-.162c.194-.459.29-1.06.29-1.785l-.006-.449c-.08-2.871-.938-5.372-2.2-6.798l-.176-.189c-.67-.683-1.444-1.074-2.27-1.074z"}],minimax:[{d:"M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z"}],moonshotai:[{d:"M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z"}],morph:[{d:"M7.941 2c.23 0 .452.073.638.21.186.136.325.328.397.55l.593 1.814c.073.221.212.413.397.55.186.136.409.21.638.21h2.791c.23 0 .452-.074.638-.21a1.11 1.11 0 00.397-.55l.594-1.815a1.11 1.11 0 01.397-.55c.185-.136.408-.209.637-.209h1.7c.23 0 .453.073.639.21.185.136.324.328.397.55l.652 1.994c.118.361.41.635.77.728l2.957.752c.236.06.446.199.596.394.15.195.23.436.231.684v9.376c0 .248-.081.488-.231.684a1.09 1.09 0 01-.595.394l-2.957.752a1.086 1.086 0 00-.477.263 1.114 1.114 0 00-.293.465l-.653 1.994a1.11 1.11 0 01-.396.55c-.186.136-.41.21-.638.21h-1.702c-.229 0-.452-.073-.637-.21a1.11 1.11 0 01-.397-.55l-.364-1.11a1.131 1.131 0 01.15-1.002 1.074 1.074 0 01.885-.462h2.85c.29 0 .567-.116.772-.325.204-.208.32-.49.32-.785V6.444c0-.294-.116-.577-.32-.785a1.08 1.08 0 00-.771-.326h-3.273c-.29 0-.567.117-.772.326-.204.208-.32.49-.32.785v7.778c0 .295-.114.578-.319.786a1.08 1.08 0 01-.771.325h-2.182a1.08 1.08 0 01-.771-.325 1.122 1.122 0 01-.32-.786V6.444c0-.294-.115-.577-.32-.785a1.081 1.081 0 00-.77-.326H5.454c-.29 0-.567.117-.772.326-.204.208-.32.49-.32.785v11.112c0 .294.116.577.32.785.205.209.482.326.772.326h2.85a1.075 1.075 0 01.885.461 1.122 1.122 0 01.15 1.001l-.364 1.112a1.11 1.11 0 01-.397.55c-.185.136-.408.209-.637.209H6.24c-.229 0-.452-.073-.638-.21a1.11 1.11 0 01-.397-.55l-.652-1.994a1.114 1.114 0 00-.294-.465 1.086 1.086 0 00-.477-.263l-2.956-.752a1.09 1.09 0 01-.595-.394A1.124 1.124 0 010 16.688V7.312c0-.248.081-.489.231-.684.15-.195.36-.334.595-.394l2.957-.753c.178-.045.342-.136.477-.263.134-.127.235-.287.293-.464l.653-1.995a1.11 1.11 0 01.397-.55C5.788 2.075 6.01 2 6.24 2h1.701z"}],nvidia:[{d:"M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z"}],perplexity:[{d:"M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z"}],recraft:[{d:"M19.667 8.275c0-4.57-4.15-8.275-9.27-8.275-1.774 0-3.213 3.705-3.213 8.275 0 1.143.09 2.233.253 3.224H4.29L1 23h9.4v-6.447c5.117 0 9.266-3.707 9.266-8.275l.001-.002zm-9.27-6.76c.93 0 1.682 3.028 1.682 6.76 0 3.733-.752 6.76-1.681 6.76-.93 0-1.681-3.027-1.681-6.76 0-3.732.752-6.76 1.68-6.76z"},{d:"M19.848 16.552h-9.44L14.028 23h9.438l-3.618-6.448z"}],stepfun:[{d:"M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zM8.762 19.614H4.376v-4.386h4.386v4.386zm5.423 0H9.798v-4.386h4.387v4.386zm0-5.42H9.798V9.81h4.387v4.386zm0-5.418H9.798V4.39h4.387v4.386zm5.422-.004h-4.386V4.386h4.386v4.386z"}],tencent:[{d:"M12 0c6.627 0 12 5.373 12 12s-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0zm1.652 1.123l-.01-.001c.533.097 1.023.233 1.41.404 6.084 2.683 7.396 9.214 1.601 14.338a3.781 3.781 0 01-5.337-.328 3.654 3.654 0 01-.884-3.044c-1.934.6-3.295 2.305-3.524 4.45-.204 1.912.324 4.044 2.056 5.634l.245.067C10.1 22.876 11.036 23 12 23c6.075 0 11-4.925 11-11 0-5.513-4.056-10.08-9.348-10.877zM2.748 6.21c-.178.269-.348.536-.51.803l-.235.394.078-.167A10.957 10.957 0 001 12c0 4.919 3.228 9.083 7.682 10.49l.214.065C3.523 18.528 2.84 14.149 6.47 8.68A2.234 2.234 0 102.748 6.21zm10.157-5.172c4.408 1.33 3.61 5.41 2.447 6.924-.86 1.117-2.922 1.46-3.708 2.238-.666.657-1.077 1.462-1.212 2.291A5.303 5.303 0 0112 12.258a5.672 5.672 0 001.404-11.169 10.51 10.51 0 00-.5-.052z"}],voyage:[{d:"M5.407 0v.066a.974.974 0 00-.048.245c-.011.11-.016.208-.016.295 0 .339.043.715.128 1.13.097.405.274.912.531 1.524l7.125 16.366L20.011 3.39c.161-.404.333-.846.515-1.327.182-.48.273-.966.273-1.458a1.406 1.406 0 00-.096-.54V0H24v.066c-.204.207-.45.578-.74 1.114-.29.535-.606 1.195-.949 1.982L13.095 24h-1.287L3.075 3.965c-.204-.47-.418-.923-.644-1.36-.214-.437-.418-.83-.61-1.18-.194-.36-.365-.66-.515-.9A5.666 5.666 0 001 .064V0h4.407z"}],xiaomi:[{d:"M12 0C8.016 0 4.756.255 2.493 2.516.23 4.776 0 8.033 0 12.012c0 3.98.23 7.235 2.494 9.497C4.757 23.77 8.017 24 12 24c3.983 0 7.243-.23 9.506-2.491C23.77 19.247 24 15.99 24 12.012c0-3.984-.233-7.243-2.502-9.504C19.234.252 15.978 0 12 0zM4.906 7.405h5.624c1.47 0 3.007.068 3.764.827.746.746.827 2.233.83 3.676v4.54a.15.15 0 0 1-.152.147h-1.947a.15.15 0 0 1-.152-.148V11.83c-.002-.806-.048-1.634-.464-2.051-.358-.36-1.026-.441-1.72-.458H7.158a.15.15 0 0 0-.151.147v6.98a.15.15 0 0 1-.152.148H4.906a.15.15 0 0 1-.15-.148V7.554a.15.15 0 0 1 .15-.149zm12.131 0h1.949a.15.15 0 0 1 .15.15v8.892a.15.15 0 0 1-.15.148h-1.949a.15.15 0 0 1-.151-.148V7.554a.15.15 0 0 1 .151-.149zM8.92 10.948h2.046c.083 0 .15.066.15.147v5.352a.15.15 0 0 1-.15.148H8.92a.15.15 0 0 1-.152-.148v-5.352a.15.15 0 0 1 .152-.147Z"}],zai:[{d:"M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"}]};function M({owner:e,className:n}){let a=y[e];if(a)return(0,t.jsx)(j.ProviderIcon,{provider:a,className:n});let i=N[e];return i?(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:n,"aria-hidden":"true",children:i.map(e=>(0,t.jsx)("path",{d:e.d,opacity:e.opacity},e.d))}):null}function k({models:e,kind:n,value:a,loading:i,onPick:s}){let[r,d]=(0,o.useState)(!1),[u,p]=(0,o.useState)(""),[m,f]=(0,o.useState)("cheap"),[j,y]=(0,o.useState)(a),N=e.filter(e=>e.type===(n??g.GATEWAY_TEXT)),M=n?N:N.filter(e=>e.tags.includes(g.GATEWAY_TOOL_USE)),O=u.trim().toLowerCase(),V=(O?M.filter(e=>`${e.id} ${e.label}`.toLowerCase().includes(O)):M).slice().sort(w[m].compare);return(0,t.jsxs)(b.Dialog,{open:r,onOpenChange:e=>{d(e),e?y(a):p("")},children:[(0,t.jsxs)(b.DialogTrigger,{render:(0,t.jsx)("button",{type:"button","aria-label":"Model",className:(0,h.cn)(c.inputClassName,"relative flex items-center pr-8 text-left font-mono text-sm")}),children:[(0,t.jsx)("span",{className:(0,h.cn)("min-w-0 flex-1 truncate",!a&&"font-sans text-muted-foreground"),children:a||"Pick a model"}),(0,t.jsx)("span",{className:"absolute inset-y-0 right-0 flex w-8 items-center justify-center text-muted-foreground",children:i&&0===M.length?(0,t.jsx)(x.LoaderCircle,{className:"size-3.5 animate-spin"}):(0,t.jsx)(v.Search,{className:"size-3.5"})})]}),(0,t.jsx)(b.DialogContent,{className:"h-[min(40rem,calc(100vh-3rem))] gap-0 overflow-hidden p-0 sm:max-w-2xl",children:(0,t.jsxs)("div",{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,t.jsxs)("div",{className:"shrink-0 space-y-1 px-6 pt-5 pb-4",children:[(0,t.jsxs)(b.DialogTitle,{className:"flex items-center gap-2.5 text-xl font-semibold",children:[(0,t.jsx)(S.VercelIcon,{className:"size-3.5"}),n?z[n]:"Text"," models"]}),(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:O?`${V.length} matching “${u.trim()}”`:n?`${M.length} on the gateway`:`${M.length} of ${N.length} on the gateway can call tools`})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-t border-border/60 px-6 py-3",children:[(0,t.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,t.jsx)(v.Search,{className:"pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(c.Input,{autoFocus:!0,"aria-label":"Search models",placeholder:"name, id or provider",spellCheck:!1,value:u,onChange:e=>p(e.target.value),className:"h-8 pl-8 font-mono text-xs"})]}),(0,t.jsx)(C.Segmented,{"aria-label":"Sort",options:R,value:m,onChange:f})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-4 px-6 pb-1.5 font-mono text-[10px] tracking-wide text-muted-foreground/60",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1",children:"model"}),(0,t.jsx)("span",{className:"w-28 text-right",children:"per 1M in / out"})]}),(0,t.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border/60",children:[V.map(e=>(0,t.jsx)(P,{model:e,picked:e.id===j,onPick:()=>y(e.id)},e.id)),0===V.length&&(0,t.jsxs)("div",{className:"flex flex-col items-start gap-2.5 p-10",children:[(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:O?`Nothing matches “${u.trim()}”.`:"Nothing on the shelf — search for an id."}),O&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(l.Button,{size:"sm",onClick:()=>y(u.trim()),children:["Use “",u.trim(),"” as the id"]}),(0,t.jsx)(l.Button,{variant:"outline",size:"sm",onClick:()=>p(""),children:"Clear search"})]})]})]}),(0,t.jsxs)("div",{className:"flex h-14 shrink-0 items-center gap-3 border-t border-border/60 px-6",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:j||"Nothing picked — the field keeps what it has"}),(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>d(!1),children:"Cancel"}),(0,t.jsx)(l.Button,{disabled:!j,onClick:()=>{s(j),d(!1)},children:"Use this model"})]})]})})]})}let z={image:"Image",video:"Video",speech:"Speech",transcription:"Transcription"},w={cheap:{label:"$↑",title:"Cheapest first",compare:(e,t)=>(e.price.in??1/0)-(t.price.in??1/0)},dear:{label:"$↓",title:"Dearest first",compare:(e,t)=>(t.price.in??-1)-(e.price.in??-1)},name:{label:"a–z",title:"By name",compare:(e,t)=>e.label.localeCompare(t.label)}},R=Object.keys(w).map(e=>({value:e,label:w[e].label,title:w[e].title})),O=e=>e>=1?e.toFixed(2):String(Number(e.toFixed(4)));function P({model:e,picked:a,onPick:i}){let{price:s}=e,o=null!==s.in||null!==s.out;return(0,t.jsxs)("button",{type:"button",onClick:i,className:(0,h.cn)("flex w-full items-center gap-4 border-b border-border/60 px-6 py-2.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",a?"bg-muted/40":"hover:bg-muted/50"),children:[(0,t.jsx)("span",{className:"grid size-[18px] shrink-0 place-items-center",children:(0,t.jsx)(M,{owner:e.owner,className:"size-[15px]"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{className:(0,h.cn)("truncate text-[13px]",a&&"font-medium"),children:e.label}),a&&(0,t.jsx)(n.Check,{className:"size-3.5 shrink-0 text-brand"}),e.retiring&&(0,t.jsx)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground",children:"retiring"})]}),(0,t.jsx)("span",{className:"block truncate font-mono text-[11px] text-muted-foreground",children:e.id})]}),(0,t.jsxs)("span",{className:"flex w-28 shrink-0 flex-col items-end",children:[(0,t.jsx)("span",{className:(0,h.cn)("font-mono text-xs",o||s.free?"text-foreground":"text-muted-foreground"),children:s.free?"free":null===s.in&&null===s.out?s.note??"—":`${null===s.in?"—":O(s.in)} / ${null===s.out?"—":O(s.out)}`}),o&&s.note&&(0,t.jsx)("span",{className:"font-mono text-[9px] text-muted-foreground/70",children:s.note})]})]})}function V({tier:e}){return(0,t.jsx)("span",{className:"shrink-0 rounded-full px-1.5 font-mono text-[9.5px] leading-4 font-normal text-muted-foreground ring-1 ring-border ring-inset",children:e})}function E({provider:e,onSaved:n}){let[a,i]=(0,o.useState)(""),[s,d]=(0,p.useServerAction)(u.setConfigAction,{okMessage:`${e.label} key saved`,onOk:()=>{(0,m.revalidate)(r.queryKey.llmModel),(0,m.revalidate)(r.queryKey.config),n()}});return e.signIn?(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("p",{className:"px-1 font-mono text-[11px] text-muted-foreground",children:"Runs on your plan once you sign in"}),(0,t.jsx)(f.ChatGptSignIn,{variant:"outline"})]}):(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(c.Input,{value:a,onChange:e=>i(e.target.value),placeholder:e.apiKeyName,spellCheck:!1,type:"password"}),(0,t.jsx)(l.Button,{variant:"outline",loading:d,disabled:a.trim().length<8,onClick:()=>s(e.apiKeyName,a),children:"Save key"})]})}e.s(["ModelPicker",0,function({provider:e,model:u,kind:p,unset:f,onChange:x,onUnset:v,compact:S=!1}){let{data:b=[],mutate:C}=(0,m.useServerRoute)(r.queryKey.llmModel),y=p?b.filter(e=>(0,g.canMakeKind)(e.id,p)):b,N=y.find(t=>t.id===e),[M,z]=(0,o.useState)(!1),[w,R]=(0,o.useState)(null),[O,P]=(0,o.useState)(""),I=y.find(t=>t.id===(w??e))??y[0],T=I?.id==="vercel-ai-gateway",L=(0,m.useServerRoute)(M&&T&&r.queryKey.modelCatalog),A=e=>p&&e?g.MEDIA_MODEL_PROVIDERS[e.id]?.models[p]??[]:e?.suggestModels??[],H=A(N).find(e=>e.id===u),F=e=>{I&&e.trim()&&(x({provider:I.id,model:e.trim()}),P(""),z(!1))};return(0,t.jsxs)(d.Popover,{open:M,onOpenChange:e=>{z(e),e||R(null)},children:[(0,t.jsxs)(d.PopoverTrigger,{render:S?(0,t.jsx)("button",{type:"button",className:"inline-flex h-5 max-w-64 items-center gap-1.5 rounded-full px-2 text-foreground/80 ring-1 ring-border outline-none ring-inset transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50"}):(0,t.jsx)(l.Button,{variant:"outline",className:"w-full min-w-0 justify-start gap-2 font-normal"}),children:[N?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.ProviderIcon,{provider:N.id,className:(0,h.cn)("shrink-0",S?"size-3":"size-4")}),!S&&(0,t.jsxs)("span",{className:"min-w-0 max-w-fit grow basis-0 truncate text-muted-foreground",children:[N.label,(0,t.jsx)("span",{className:"ml-2 text-muted-foreground/40",children:"·"})]}),(0,t.jsx)("span",{className:(0,h.cn)("truncate",!S&&"font-medium"),children:H?.label??(u||"Pick a model")})]}):(0,t.jsx)("span",{className:"truncate text-muted-foreground",children:f??(p?"Not picked":"App default")}),(0,t.jsx)(a.ChevronsUpDown,{className:(0,h.cn)("ml-auto shrink-0 text-muted-foreground",S?"size-2.5":"size-3.5")})]}),(0,t.jsxs)(d.PopoverContent,{align:"start",className:"flex w-[min(34rem,calc(100vw-2rem))] flex-row gap-0 overflow-hidden rounded-2xl p-0",children:[(0,t.jsxs)("div",{className:"flex max-h-80 w-48 shrink-0 flex-col gap-px overflow-y-auto border-r border-border/60 bg-muted/40 p-1.5",children:[v&&(0,t.jsxs)("button",{type:"button",onClick:()=>{v(),z(!1)},className:(0,h.cn)("mb-1 flex h-8.5 shrink-0 items-center gap-2 rounded-lg px-2 text-left text-[13px] outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",N?"hover:bg-muted/60":"bg-muted font-medium"),children:[(0,t.jsx)(i.CircleDashed,{className:"size-4 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:f??(p?"Not picked":"App default")}),!N&&(0,t.jsx)(n.Check,{className:"size-3.5 shrink-0"})]}),y.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>R(e.id),className:(0,h.cn)("flex h-8.5 shrink-0 items-center gap-2 rounded-lg px-2 text-left text-[13px] outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",e.id===I?.id?"bg-muted font-medium":"hover:bg-muted/60",!e.hasKey&&"text-muted-foreground"),children:[(0,t.jsx)(j.ProviderIcon,{provider:e.id,className:"size-4 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.label}),!e.hasKey&&(0,t.jsx)(s.KeyRound,{className:"size-3 shrink-0"})]},e.id))]}),(0,t.jsx)("div",{className:"flex max-h-80 min-w-0 flex-1 flex-col gap-px overflow-y-auto p-1.5",children:I?I.hasKey?T&&!L.error?(0,t.jsxs)("div",{className:"space-y-2 p-2",children:[(0,t.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"Every model the gateway carries, with what each costs."}),(0,t.jsx)(k,{models:L.data??[],kind:p,value:I.id===e?u:"",loading:L.isLoading,onPick:F})]}):(0,t.jsxs)(t.Fragment,{children:[A(I).map(a=>{let i=I.id===e&&a.id===u;return(0,t.jsxs)("button",{type:"button",onClick:()=>F(a.id),className:(0,h.cn)("flex shrink-0 items-center gap-2 rounded-lg px-2.5 py-1.5 text-left outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",i?"bg-muted":"hover:bg-muted/60"),children:[(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-[13px] font-medium",children:[(0,t.jsx)("span",{className:"truncate",children:a.label}),(0,t.jsx)(V,{tier:a.tier})]}),(0,t.jsx)("span",{className:"block truncate font-mono text-[10.5px] text-muted-foreground",children:a.id})]}),i&&(0,t.jsx)(n.Check,{className:"size-3.5 shrink-0 text-brand"})]},a.id)}),(0,t.jsx)("form",{onSubmit:e=>{e.preventDefault(),F(O)},className:"mt-1 px-1 pb-1",children:(0,t.jsx)(c.Input,{value:O,onChange:e=>P(e.target.value),spellCheck:!1,"aria-label":"Model id",placeholder:L.error?"Could not read the catalog — type an id":"or type a model id",className:"h-8 font-mono text-xs"})})]}):(0,t.jsxs)("div",{className:"space-y-2 p-2",children:[(0,t.jsxs)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:[I.label," has no key yet."]}),(0,t.jsx)(E,{provider:I,onSaved:()=>C()})]}):null})]})]})}],146538)},563707,152886,e=>{"use strict";var t=e.i(456420);let n={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};n.node;let a=(0,t.default)(n);e.s(["ChevronsUpDown",0,a],563707);let i={name:"circle-dashed",size:24,node:[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]};i.node;let s=(0,t.default)(i);e.s(["CircleDashed",0,s],152886)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59377,e=>{"use strict";var t=e.i(843476);e.s([],158421),e.i(158421);var n=e.i(271645),a=e.i(896499),i=e.i(17989),s=e.i(46420),o=e.i(733332);let r=n.createContext(void 0);function l(e){let t=n.useContext(r);if(void 0===t&&!e)throw Error((0,o.default)(47));return t}var c=e.i(174080),d=e.i(301252),u=e.i(439957),p=e.i(956789),m=e.i(56434),h=e.i(18478),g=e.i(264111),f=e.i(116786),x=e.i(990627),v=e.i(638396);let S={...f.popupStoreSelectors,disabled:e=>e.disabled,instantType:e=>e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,modal:e=>e.modal,focusManagerModal:e=>e.focusManagerModal,stickIfOpen:e=>e.stickIfOpen,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class b extends d.ReactStore{constructor(e,t,n){const a=new x.PopupTriggerMap;super(C(e,a,t,n),j(a),S)}setOpen=(e,t)=>{let n,a=t.reason===m.REASONS.triggerHover,i=t.reason===m.REASONS.triggerPress&&0===t.event.detail,s=!e&&(t.reason===m.REASONS.escapeKey||null==t.reason),o=(0,g.attachPreventUnmountOnClose)(t),r=this.select("activeTriggerId");if(e||t.reason!==m.REASONS.closePress||null!=t.trigger||null==r||(t.trigger=this.context.triggerElements.getById(r)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let l=()=>{let n=(0,g.createPopupOpenState)(this.state,e,t.trigger,o());n.openChangeReason=t.reason,this.update(n)};a?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(v.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),c.flushSync(l)):l(),i?n="click":s?n="dismiss":t.reason===m.REASONS.focusOut&&(n="focus"),this.set("instantType",n)}}function C(e,t,n,a=!1){let i={...(0,f.createInitialPopupStoreState)(t,n,a),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function j(e){return{popupRef:n.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:n.createRef(),beforeContentFocusGuardRef:n.createRef(),stickIfOpenTimeout:new u.Timeout,triggerElements:e}}var y=e.i(675606);let N=(0,a.fastComponent)(function({props:e}){var a;let i,{children:s,open:o,defaultOpen:l=!1,onOpenChange:c,onOpenChangeComplete:d,modal:u=!1,handle:p,triggerId:h,defaultTriggerId:f=null}=e,x=(a={modal:u,open:l,openProp:o,activeTriggerId:f,triggerIdProp:h},i=(0,g.usePopupRootStore)((e,t)=>new b(a,e,t)),n.useEffect(()=>i.context.stickIfOpenTimeout.disposeEffect(),[i]),i);x.useControlledProp("openProp",o),x.useControlledProp("triggerIdProp",h);let v=x.useState("open"),S=x.useState("mounted"),C=x.useState("payload");x.useContextCallback("onOpenChange",c),x.useContextCallback("onOpenChangeComplete",d),(0,g.usePopupRootSync)(x,v),(0,g.useImplicitActiveTrigger)(x);let{forceUnmount:j}=(0,g.useOpenStateTransitions)(v,x,()=>{x.update({stickIfOpen:!0,openChangeReason:null})});x.useSyncedValues({modal:u}),n.useEffect(()=>{v||x.context.stickIfOpenTimeout.clear()},[x,v]),n.useImperativeHandle(e.actionsRef,()=>({unmount:j,close:()=>x.setOpen(!1,(0,y.createChangeEventDetails)(m.REASONS.imperativeAction))}),[j,x]);let N=v||S;return(0,t.jsxs)(r.Provider,{value:x,children:[p&&(0,t.jsx)(g.PopupHandleAttachment,{handle:p,store:x}),N&&(0,t.jsx)(M,{store:x,modal:u}),"function"==typeof s?s({payload:C}):s]})});function M({store:e,modal:t}){let n=e.useState("floatingRootContext"),a=(0,i.useDismiss)(n,{outsidePressEvent:{mouse:"trap-focus"===t?"sloppy":"intentional",touch:"sloppy"}}),s=a.reference,o=a.floating;return(0,g.usePopupInteractionProps)(e,{activeTriggerProps:s,inactiveTriggerProps:s,popupProps:o}),null}var k=e.i(540886),z=e.i(879938),w=e.i(552245),R=e.i(650316),O=e.i(385689),P=e.i(872135),V=e.i(788015),E=e.i(152535),I=e.i(459636),T=e.i(346570),L=e.i(32199);let A=(0,a.fastComponentRef)(function(e,a){let{render:i,className:s,style:r,disabled:c=!1,nativeButton:d=!0,handle:u,payload:p,openOnHover:h=!1,delay:f=300,closeDelay:x=0,id:S,...b}=e,C=l(!0),j=(0,I.usePopupHandleStore)(u)??C;if(!j)throw Error((0,o.default)(74));let y=(0,V.useBaseUiId)(S),N=j.useState("isTriggerActive",y),M=j.useState("floatingRootContext"),A=j.useState("isOpenedByTrigger",y),H=j.useState("triggerPopupId",y),F=n.useRef(null),{registerTrigger:D,isMountedByThisTrigger:q}=(0,g.useTriggerDataForwarding)(y,F,j,{payload:p,disabled:c,openOnHover:h,closeDelay:x}),B=j.useState("openChangeReason"),K=j.useState("stickIfOpen"),U=j.useState("openMethod"),G=j.useState("focusManagerModal"),_=(0,P.useHoverReferenceInteraction)(M,{enabled:!c&&h&&("touch"!==U||B!==m.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:(0,R.safePolygon)(),restMs:f,delay:{close:x},triggerElementRef:F,isActiveTrigger:N,isClosing:()=>"ending"===j.select("transitionStatus")}),$=(0,O.useClick)(M,{stickIfOpen:K}),W=(0,L.useOpenMethodTriggerProps)(()=>j.select("open"),e=>{j.set("openMethod",e)}),Y=j.useState("triggerProps",q),{getButtonProps:X,buttonRef:Z}=(0,k.useButton)({disabled:c,native:d}),{preFocusGuardRef:J,handlePreFocusGuardFocus:Q,handleFocusTargetFocus:ee}=(0,T.useTriggerFocusGuards)(j,F),et=(0,w.useRenderElement)("button",e,{state:{disabled:c,open:A},ref:[Z,a,D,F],props:[$.reference,_,Y,W,{[v.CLICK_TRIGGER_IDENTIFIER]:"",id:y,"aria-haspopup":"dialog","aria-expanded":A,"aria-controls":H},b,X],stateAttributesMapping:{open:e=>e&&B===m.REASONS.triggerPress?z.pressableTriggerOpenStateMapping.open(e):z.triggerOpenStateMapping.open(e)}}),en=(0,t.jsx)(n.Fragment,{children:et},y);return q&&!G?(0,t.jsxs)(n.Fragment,{children:[(0,t.jsx)(E.FocusGuard,{ref:J,onFocus:Q}),en,(0,t.jsx)(E.FocusGuard,{ref:j.context.triggerFocusTargetRef,onFocus:ee})]}):en});var H=e.i(726674);let F=n.createContext(void 0),D=n.forwardRef(function(e,n){let{keepMounted:a=!1,...i}=e;return l().useState("mounted")||a?(0,t.jsx)(F.Provider,{value:a,children:(0,t.jsx)(H.FloatingPortal,{ref:n,...i})}):null});var q=e.i(144394),B=e.i(146376);let K=n.createContext(void 0);function U(){let e=n.useContext(K);if(!e)throw Error((0,o.default)(46));return e}var G=e.i(923706),_=e.i(426),$=e.i(222640),W=e.i(789579),Y=e.i(33383);let X=n.forwardRef(function(e,a){let{render:i,className:r,style:c,anchor:d,positionMethod:u,side:p,align:h,sideOffset:g,alignOffset:f,collisionBoundary:x="clipping-ancestors",collisionPadding:S,arrowPadding:b,sticky:C,disableAnchorTracking:j=!1,collisionAvoidance:y=v.POPUP_COLLISION_AVOIDANCE,...N}=e,M=l(),k=function(){let e=n.useContext(F);if(void 0===e)throw Error((0,o.default)(45));return e}(),z=(0,s.useFloatingNodeId)(),w=M.useState("floatingRootContext"),R=M.useState("mounted"),O=M.useState("open"),P=M.useState("openChangeReason"),V=M.useState("activeTriggerElement"),E=M.useState("modal"),I=M.useState("openMethod"),T=M.useState("positionerElement"),L=M.useState("instantType"),A=M.useState("transitionStatus"),H=M.useState("adaptiveOrigin"),D=n.useRef(null),U=(0,$.useAnimationsFinished)(T),X=(0,G.useAnchorPositioning)({anchor:d,floatingRootContext:w,positionMethod:u,mounted:R,side:p,sideOffset:g,align:h,alignOffset:f,arrowPadding:b,collisionBoundary:x,collisionPadding:S,sticky:C,disableAnchorTracking:j,keepMounted:k,nodeId:z,collisionAvoidance:y,adaptiveOrigin:H}),Z=w.useState("domReferenceElement");(0,B.useIsoLayoutEffect)(()=>{let e=D.current;if(Z&&(D.current=Z),e&&Z&&Z!==e){M.set("instantType",void 0);let e=new AbortController;return U(()=>{M.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[Z,U,M]);let J=!0===E&&P!==m.REASONS.triggerHover;(0,Y.useAnchoredPopupScrollLock)(O&&J,"touch"===I,T,V);let Q=M.useStateSetter("positionerElement"),ee={open:O,side:X.side,align:X.align,anchorHidden:X.anchorHidden,instant:L},et=(0,W.usePositioner)(e,ee,{styles:X.positionerStyles,transitionStatus:A,props:N,refs:[a,Q],hidden:!R,inert:!O});return(0,t.jsxs)(K.Provider,{value:X,children:[R&&J&&(0,t.jsx)(_.InternalBackdrop,{inert:(0,q.inertValue)(!O),cutout:V}),(0,t.jsx)(s.FloatingNode,{id:z,children:et})]})});var Z=e.i(229315),J=e.i(61487),Q=e.i(431157),ee=e.i(137584),et=e.i(673327),en=e.i(96533),ea=e.i(253984),ei=e.i(667865);let es=n.createContext(void 0),eo=n.forwardRef(function(e,a){let{render:i,className:s,style:o,initialFocus:r,finalFocus:c,...d}=e,u=l(),p=U(),h=null!=(0,en.useToolbarRootContext)(!0),{context:f,hasClosePart:x}=function(){let[e,t]=n.useState(0),a=(0,ei.useStableCallback)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:n.useMemo(()=>({register:a}),[a]),hasClosePart:e>0}}(),v=u.useState("open"),S=u.useState("openMethod"),b=u.useState("instantType"),C=u.useState("transitionStatus"),j=u.useState("popupProps"),y=u.useState("titleElementId"),N=u.useState("descriptionElementId"),M=u.useState("modal"),k=u.useState("mounted"),R=u.useState("openChangeReason"),O=u.useState("activeTriggerElement"),P=u.useState("floatingRootContext"),V=P.useState("floatingId"),E=u.useState("disabled"),I=u.useState("openOnHover"),T=u.useState("closeDelay");(0,ee.useOpenChangeComplete)({open:v,ref:u.context.popupRef,onComplete(){v&&u.context.onOpenChangeComplete?.(!0)}}),(0,Q.useHoverFloatingInteraction)(P,{enabled:I&&!E,closeDelay:T});let L=void 0===r?(0,g.createDefaultInitialFocus)(u.context.popupRef):r,A=!1!==M&&x;u.useSyncedValue("focusManagerModal",A);let H=u.useStateSetter("popupElement"),F={open:v,side:p.side,align:p.align,instant:b,transitionStatus:C},D=(0,w.useRenderElement)("div",e,{state:F,ref:[a,u.context.popupRef,H],props:[j,{id:V,role:"dialog",...g.FOCUSABLE_POPUP_PROPS,"aria-labelledby":y,"aria-describedby":N,onKeyDown(e){h&&et.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,ea.getDisabledMountTransitionStyles)(C),d],stateAttributesMapping:z.popupTransitionStateMapping});return(0,t.jsx)(J.FloatingFocusManager,{context:P,openInteractionType:S,modal:A,disabled:!k||R===m.REASONS.triggerHover,initialFocus:L,returnFocus:c,restoreFocus:"popup",previousFocusableElement:(0,Z.isHTMLElement)(O)?O:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:(0,t.jsx)(es.Provider,{value:f,children:D})})}),er=n.forwardRef(function(e,t){let{render:n,className:a,style:i,...s}=e,o=l().useState("open"),{arrowRef:r,side:c,align:d,arrowUncentered:u,arrowStyles:p}=U();return(0,w.useRenderElement)("div",e,{state:{open:o,side:c,align:d,uncentered:u},ref:[t,r],props:[{style:p,"aria-hidden":!0},s],stateAttributesMapping:z.popupStateMapping})}),el=n.forwardRef(function(e,t){let{render:n,className:a,style:i,...s}=e,o=l(),r=o.useState("open"),c=o.useState("mounted"),d=o.useState("transitionStatus"),u=o.useState("openChangeReason");return(0,w.useRenderElement)("div",e,{state:{open:r,transitionStatus:d},ref:t,props:[{role:"presentation",hidden:!c,style:{pointerEvents:u===m.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},s],stateAttributesMapping:z.popupTransitionStateMapping})}),ec=n.forwardRef(function(e,t){let{render:n,className:a,style:i,...s}=e,o=l(),r=(0,V.useBaseUiId)(s.id);return o.useSyncedValueWithCleanup("titleElementId",r),(0,w.useRenderElement)("h2",e,{ref:t,props:[{id:r},s]})}),ed=n.forwardRef(function(e,t){let{render:n,className:a,style:i,...s}=e,o=l(),r=(0,V.useBaseUiId)(s.id);return o.useSyncedValueWithCleanup("descriptionElementId",r),(0,w.useRenderElement)("p",e,{ref:t,props:[{id:r},s]})}),eu=n.forwardRef(function(e,t){let a,{render:i,className:s,style:o,disabled:r=!1,nativeButton:c=!0,...d}=e,{buttonRef:u,getButtonProps:p}=(0,k.useButton)({disabled:r,focusableWhenDisabled:!1,native:c}),h=l();return a=n.useContext(es),(0,B.useIsoLayoutEffect)(()=>a?.register(),[a]),(0,w.useRenderElement)("button",e,{ref:[t,u],props:[{onClick(e){h.setOpen(!1,(0,y.createChangeEventDetails)(m.REASONS.closePress,e.nativeEvent))}},d,p]})});var ep=e.i(818390);let em=n.forwardRef(function(e,t){let{render:n,className:a,style:i,children:s,...o}=e,r=l(),{side:c}=U(),d=r.useState("instantType"),{children:u,state:p}=(0,ep.usePopupViewport)({store:r,side:c,children:s}),m={activationDirection:p.activationDirection,transitioning:p.transitioning,instant:d};return(0,w.useRenderElement)("div",e,{state:m,ref:t,props:[o,{children:u}],stateAttributesMapping:ep.popupViewportStateMapping})});var eh=e.i(564170);class eg extends eh.BasePopupHandle{constructor(){super(function(){let e=new x.PopupTriggerMap;return Object.assign(new h.NullStore(Object.freeze(C(void 0,e)),Object.freeze(j(e)),S),{setOpen:p.NOOP})}(),"Popover")}open(e){this.openByTrigger(e)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}}e.s(["Arrow",0,er,"Backdrop",0,el,"Close",0,eu,"Description",0,ed,"Handle",0,eg,"Popup",0,eo,"Portal",0,D,"Positioner",0,X,"Root",0,function(e){return l(!0)?(0,t.jsx)(N,{props:e}):(0,t.jsx)(s.FloatingTree,{children:(0,t.jsx)(N,{props:e})})},"Title",0,ec,"Trigger",0,A,"Viewport",0,em,"createHandle",0,function(){return new eg}],466914);var ef=e.i(466914),ef=ef,ex=e.i(647163);e.s(["Popover",0,function({...e}){return(0,t.jsx)(ef.Root,{"data-slot":"popover",...e})},"PopoverContent",0,function({className:e,align:n="center",alignOffset:a=0,side:i="bottom",sideOffset:s=4,...o}){return(0,t.jsx)(ef.Portal,{children:(0,t.jsx)(ef.Positioner,{align:n,alignOffset:a,side:i,sideOffset:s,className:"isolate z-50",children:(0,t.jsx)(ef.Popup,{"data-slot":"popover-content",className:(0,ex.cn)("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...o})})})},"PopoverTrigger",0,function({...e}){return(0,t.jsx)(ef.Trigger,{"data-slot":"popover-trigger",...e})}],59377)},412294,e=>{"use strict";var t=e.i(843476),n=e.i(271645),a=e.i(167881),i=e.i(6799),s=e.i(95187);let o=(0,s.createServerReference)("7f3cf6b1793082312db7b2fd7c85ff203efbeb9ed4",s.callServer,void 0,s.findSourceMapURL,"startChatGptSignInAction");var r=e.i(609856);e.s(["ChatGptSignIn",0,function({variant:e}){let[s,l]=(0,n.useState)(!1),c=(0,n.useRef)(null),d=()=>{c.current&&clearInterval(c.current),c.current=null};(0,n.useEffect)(()=>d,[]);let[u,p]=(0,r.useServerAction)(o,{onOk:e=>{let t=window.open(e,"thursday-chatgpt","popup,width=520,height=720");if(!t)return void i.toast.add({type:"error",title:"The sign-in window was blocked",description:"Allow pop-ups for this page, then try again"});l(!0),d();let n=Date.now()+6e5;c.current=setInterval(()=>{!t.closed&&Date.now()<n||(d(),l(!1))},700)}});return(0,t.jsx)(a.Button,{variant:e,loading:p||s,onClick:()=>u(),children:"Sign in with ChatGPT"})}],412294)},146538,e=>{"use strict";var t=e.i(843476),n=e.i(689664),a=e.i(563707),i=e.i(152886),s=e.i(758925),o=e.i(271645),r=e.i(798120),l=e.i(167881),c=e.i(23750),d=e.i(59377),u=e.i(799623),p=e.i(609856),m=e.i(283653),h=e.i(647163),g=e.i(265402),f=e.i(412294),x=e.i(611568),v=e.i(566595),S=e.i(7227),b=e.i(630374),C=e.i(421429),j=e.i(968978);let y={anthropic:"anthropic",openai:"openai",google:"google",spacexai:"xai",mistral:"mistral",deepseek:"deepseek",cohere:"cohere"},N={alibaba:[{d:"M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z"}],amazon:[{d:"M13.05 15.513h3.08c.214 0 .389.177.389.394v1.82a1.704 1.704 0 011.296 1.661c0 .943-.755 1.708-1.685 1.708-.931 0-1.686-.765-1.686-1.708 0-.807.554-1.484 1.297-1.662v-1.425h-2.69v4.663a.395.395 0 01-.188.338l-2.69 1.641a.385.385 0 01-.405-.002l-4.926-3.086a.395.395 0 01-.185-.336V16.3L2.196 14.87A.395.395 0 012 14.555L2 14.528V9.406c0-.14.073-.27.192-.34l2.465-1.462V4.448c0-.129.062-.249.165-.322l.021-.014L9.77 1.058a.385.385 0 01.407 0l2.69 1.675a.395.395 0 01.185.336V7.6h3.856V5.683a1.704 1.704 0 01-1.296-1.662c0-.943.755-1.708 1.685-1.708.931 0 1.685.765 1.685 1.708 0 .807-.553 1.484-1.296 1.662v2.311a.391.391 0 01-.389.394h-4.245v1.806h6.624a1.69 1.69 0 011.64-1.313c.93 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708a1.69 1.69 0 01-1.64-1.314H13.05v1.937h4.953l.915 1.18a1.66 1.66 0 01.84-.227c.931 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708-.93 0-1.685-.765-1.685-1.708 0-.346.102-.668.276-.937l-.724-.935H13.05v1.806zM9.973 1.856L7.93 3.122V6.09h-.778V3.604L5.435 4.669v2.945l2.11 1.36L9.712 7.61V5.334h.778V7.83c0 .136-.07.263-.184.335L7.963 9.638v2.081l1.422 1.009-.446.646-1.406-.998-1.53 1.005-.423-.66 1.605-1.055v-1.99L5.038 8.29l-2.26 1.34v1.676l1.972-1.189.398.677-2.37 1.429V14.3l2.166 1.258 2.27-1.368.397.677-2.176 1.311V19.3l1.876 1.175 2.365-1.426.398.678-2.017 1.216 1.918 1.201 2.298-1.403v-5.78l-4.758 2.893-.4-.675 5.158-3.136V3.289L9.972 1.856zM16.13 18.47a.913.913 0 00-.908.92c0 .507.406.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zm3.63-3.81a.913.913 0 00-.908.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92zm1.555-4.99a.913.913 0 00-.908.92c0 .507.407.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zM17.296 3.1a.913.913 0 00-.907.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92z"}],"arcee-ai":[{d:"M13.236 2.377L2.751 20.493H0L11.863 0l1.373 2.377zm3.554 6.156l-9.606 11.96H4.13L15.511 6.32l1.279 2.212zm6.908 11.96H14.05l8.406-2.151 1.242 2.15zm-3.42-5.922l-7.843 5.92H8.482l10.597-7.997 1.2 2.077z"}],bfl:[{d:"M0 20.683L12.01 2.5 24 20.683h-2.233L12.009 5.878 3.471 18.806h12.122l1.239 1.877H0z"},{d:"M8.069 16.724l2.073-3.115 2.074 3.115H8.069zM18.24 20.683l-5.668-8.707h2.177l5.686 8.707h-2.196zM19.74 11.676l2.13-3.19 2.13 3.19h-4.26z"}],bytedance:[{d:"M14.944 18.587l-1.704-.445V10.01l1.824-.462c1-.254 1.84-.461 1.88-.453.032 0 .056 2.235.056 4.972v4.973l-.176-.008c-.104 0-.952-.207-1.88-.446z"},{d:"M7 16.542c0-2.736.024-4.98.064-4.98.032-.008.872.2 1.88.454l1.816.461-.016 4.05-.024 4.049-1.632.422c-.896.23-1.736.445-1.856.469L7 21.523v-4.98z"},{d:"M19.24 12.477c0-9.03.008-9.515.144-9.475.072.024.784.207 1.576.406.792.207 1.576.405 1.744.445l.296.08-.016 8.56-.024 8.568-1.624.414c-.888.23-1.728.437-1.856.47l-.24.055v-9.523z"},{d:"M1 12.509c0-4.678.024-8.505.064-8.505.032 0 .872.207 1.872.454l1.824.461v7.582c0 4.16-.016 7.574-.032 7.574-.024 0-.872.215-1.88.47L1 21.013v-8.505z"}],"fish-audio":[{d:"M23.12 12.13v.62c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-.62c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44m-1.77.37v1.74c0 .24.2.44.44.44.25 0 .44-.2.44-.44V12.5c0-.24-.19-.44-.44-.44-.24 0-.44.2-.44.44m-1.76.43v1.99q0 .09.03.17.04.08.1.14.07.07.15.1t.17.03c.24 0 .44-.19.44-.44v-1.99c0-.25-.2-.44-.44-.44q-.09 0-.17.03t-.15.1q-.06.06-.1.14-.03.08-.03.17m-1.76.35v1.97c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-1.97c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44m-1.77.32v1.65c0 .25.2.45.44.45s.44-.2.44-.45V13.6c0-.25-.2-.45-.44-.45s-.44.2-.44.45m-1.76 1.26v.3q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3v-.3q-.01-.17-.14-.3-.13-.11-.31-.12-.17.01-.3.12-.13.13-.14.3M0 9.38v.19c0 .24.2.44.44.44.25 0 .44-.2.44-.44v-.19c0-.25-.19-.44-.44-.44-.24 0-.44.19-.44.44m1.82.15v.81c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-.81q0-.18-.13-.31t-.31-.13-.31.13-.13.31m1.81-.24v3.39q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V9.29q-.01-.17-.14-.3-.13-.11-.31-.12-.17.01-.3.12-.13.13-.14.3m1.83-.35v.22c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-.22q0-.18-.13-.31T5.9 8.5t-.31.13-.13.31m0 2.94v2.34c0 .25.19.44.44.44.24 0 .44-.19.44-.44v-2.34c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44m15.89-3.32V11c0 .25.2.44.44.44.25 0 .44-.19.44-.44V8.56c0-.24-.19-.44-.44-.44-.24 0-.44.2-.44.44m-1.76-.39v3.28q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V8.17c0-.25-.2-.44-.44-.44q-.09 0-.17.03t-.15.1q-.06.06-.1.14-.03.08-.03.17M17.83 8v3.9c0 .24.19.44.44.44.24 0 .44-.2.44-.44V8c0-.25-.2-.44-.44-.44-.25 0-.44.19-.44.44m-1.77.11v3.96c0 .25.2.44.44.44s.44-.19.44-.44V8.11c0-.25-.2-.44-.44-.44s-.44.19-.44.44m-1.76.27v5.03q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V8.38c0-.25-.2-.44-.45-.44-.24 0-.44.19-.44.44m-1.8.46v5.75q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3V8.84c0-.25-.2-.44-.45-.44-.24 0-.44.19-.44.44m-1.76.76v5.52c0 .24.2.44.44.44.25 0 .44-.2.44-.44V9.6c0-.24-.19-.44-.44-.44-.24 0-.44.2-.44.44m-1.77 1.01v4.77q.01.17.14.3.13.11.3.12.18-.01.31-.12.13-.13.14-.3v-4.77q-.01-.17-.14-.3-.13-.11-.31-.12-.17.01-.3.12-.13.13-.14.3M23.12 9.6v1.22c0 .24.19.44.44.44.24 0 .44-.2.44-.44V9.6c0-.24-.2-.44-.44-.44-.25 0-.44.2-.44.44M7.21 11.32V16c0 .24.19.44.44.44.24 0 .44-.2.44-.44v-4.68q0-.18-.13-.31t-.31-.13-.31.13-.13.31"}],inception:[{d:"M14.767 1H7.884L1 7.883v6.884h6.884V7.883h6.883V1zM9.234 23h6.882L23 16.116V9.233h-6.884v6.883H9.234V23z"}],klingai:[{d:"M5.493 21.234c-1.112-1.451-1.109-4.263-.081-7.459l-4.557-2.63a1.683 1.683 0 01-.85-1.304 1.505 1.505 0 01.08-.622 13.18 13.18 0 011.037-2.255c3.476-6.02 10.916-8.23 16.619-4.938.46.266.82.67 1.081 1.184.785 1.545.685 4.096-.234 6.954l4.557 2.631c.339.196.596.492.736.832a1.53 1.53 0 01.034 1.093 13.146 13.146 0 01-1.037 2.255c-3.476 6.02-10.916 8.23-16.619 4.938a2.6 2.6 0 01-.766-.68zm11.096-6.615c-2.073 3.591-5.808 5.316-8.343 3.852-1.267-.731-1.994-2.122-2.145-3.778-.095-1.035.036-2.173.4-3.32.217-.684.517-1.37.902-2.039l.008-.014c2.073-3.59 5.808-5.315 8.343-3.852.633.366 1.13.895 1.49 1.54.986 1.772.922 4.415-.285 6.914-.111.23-.232.457-.362.683l-.008.014z"}],kwaipilot:[{d:"M11.765.03C5.327.03.108 5.25.108 11.686c0 3.514 1.556 6.665 4.015 8.804L9.89 8.665h6.451L9.31 23.083c.807.173 1.63.26 2.455.26 6.438 0 11.657-5.22 11.657-11.658S18.202.028 11.765.028V.03z"}],meta:[{d:"M6.897 4c1.915 0 3.516.932 5.43 3.376l.282-.373c.19-.246.383-.484.58-.71l.313-.35C14.588 4.788 15.792 4 17.225 4c1.273 0 2.469.557 3.491 1.516l.218.213c1.73 1.765 2.917 4.71 3.053 8.026l.011.392.002.25c0 1.501-.28 2.759-.818 3.7l-.14.23-.108.153c-.301.42-.664.758-1.086 1.009l-.265.142-.087.04a3.493 3.493 0 01-.302.118 4.117 4.117 0 01-1.33.208c-.524 0-.996-.067-1.438-.215-.614-.204-1.163-.56-1.726-1.116l-.227-.235c-.753-.812-1.534-1.976-2.493-3.586l-1.43-2.41-.544-.895-1.766 3.13-.343.592C7.597 19.156 6.227 20 4.356 20c-1.21 0-2.205-.42-2.936-1.182l-.168-.184c-.484-.573-.837-1.311-1.043-2.189l-.067-.32a8.69 8.69 0 01-.136-1.288L0 14.468c.002-.745.06-1.49.174-2.23l.1-.573c.298-1.53.828-2.958 1.536-4.157l.209-.34c1.177-1.83 2.789-3.053 4.615-3.16L6.897 4zm-.033 2.615l-.201.01c-.83.083-1.606.673-2.252 1.577l-.138.199-.01.018c-.67 1.017-1.185 2.378-1.456 3.845l-.004.022a12.591 12.591 0 00-.207 2.254l.002.188c.004.18.017.36.04.54l.043.291c.092.503.257.908.486 1.208l.117.137c.303.323.698.492 1.17.492 1.1 0 1.796-.676 3.696-3.641l2.175-3.4.454-.701-.139-.198C9.11 7.3 8.084 6.616 6.864 6.616zm10.196-.552l-.176.007c-.635.048-1.223.359-1.82.933l-.196.198c-.439.462-.887 1.064-1.367 1.807l.266.398c.18.274.362.56.55.858l.293.475 1.396 2.335.695 1.114c.583.926 1.03 1.6 1.408 2.082l.213.262c.282.326.529.54.777.673l.102.05c.227.1.457.138.718.138.176.002.35-.023.518-.073.338-.104.61-.32.813-.637l.095-.163.077-.162c.194-.459.29-1.06.29-1.785l-.006-.449c-.08-2.871-.938-5.372-2.2-6.798l-.176-.189c-.67-.683-1.444-1.074-2.27-1.074z"}],minimax:[{d:"M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z"}],moonshotai:[{d:"M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z"}],morph:[{d:"M7.941 2c.23 0 .452.073.638.21.186.136.325.328.397.55l.593 1.814c.073.221.212.413.397.55.186.136.409.21.638.21h2.791c.23 0 .452-.074.638-.21a1.11 1.11 0 00.397-.55l.594-1.815a1.11 1.11 0 01.397-.55c.185-.136.408-.209.637-.209h1.7c.23 0 .453.073.639.21.185.136.324.328.397.55l.652 1.994c.118.361.41.635.77.728l2.957.752c.236.06.446.199.596.394.15.195.23.436.231.684v9.376c0 .248-.081.488-.231.684a1.09 1.09 0 01-.595.394l-2.957.752a1.086 1.086 0 00-.477.263 1.114 1.114 0 00-.293.465l-.653 1.994a1.11 1.11 0 01-.396.55c-.186.136-.41.21-.638.21h-1.702c-.229 0-.452-.073-.637-.21a1.11 1.11 0 01-.397-.55l-.364-1.11a1.131 1.131 0 01.15-1.002 1.074 1.074 0 01.885-.462h2.85c.29 0 .567-.116.772-.325.204-.208.32-.49.32-.785V6.444c0-.294-.116-.577-.32-.785a1.08 1.08 0 00-.771-.326h-3.273c-.29 0-.567.117-.772.326-.204.208-.32.49-.32.785v7.778c0 .295-.114.578-.319.786a1.08 1.08 0 01-.771.325h-2.182a1.08 1.08 0 01-.771-.325 1.122 1.122 0 01-.32-.786V6.444c0-.294-.115-.577-.32-.785a1.081 1.081 0 00-.77-.326H5.454c-.29 0-.567.117-.772.326-.204.208-.32.49-.32.785v11.112c0 .294.116.577.32.785.205.209.482.326.772.326h2.85a1.075 1.075 0 01.885.461 1.122 1.122 0 01.15 1.001l-.364 1.112a1.11 1.11 0 01-.397.55c-.185.136-.408.209-.637.209H6.24c-.229 0-.452-.073-.638-.21a1.11 1.11 0 01-.397-.55l-.652-1.994a1.114 1.114 0 00-.294-.465 1.086 1.086 0 00-.477-.263l-2.956-.752a1.09 1.09 0 01-.595-.394A1.124 1.124 0 010 16.688V7.312c0-.248.081-.489.231-.684.15-.195.36-.334.595-.394l2.957-.753c.178-.045.342-.136.477-.263.134-.127.235-.287.293-.464l.653-1.995a1.11 1.11 0 01.397-.55C5.788 2.075 6.01 2 6.24 2h1.701z"}],nvidia:[{d:"M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z"}],perplexity:[{d:"M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z"}],recraft:[{d:"M19.667 8.275c0-4.57-4.15-8.275-9.27-8.275-1.774 0-3.213 3.705-3.213 8.275 0 1.143.09 2.233.253 3.224H4.29L1 23h9.4v-6.447c5.117 0 9.266-3.707 9.266-8.275l.001-.002zm-9.27-6.76c.93 0 1.682 3.028 1.682 6.76 0 3.733-.752 6.76-1.681 6.76-.93 0-1.681-3.027-1.681-6.76 0-3.732.752-6.76 1.68-6.76z"},{d:"M19.848 16.552h-9.44L14.028 23h9.438l-3.618-6.448z"}],stepfun:[{d:"M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zM8.762 19.614H4.376v-4.386h4.386v4.386zm5.423 0H9.798v-4.386h4.387v4.386zm0-5.42H9.798V9.81h4.387v4.386zm0-5.418H9.798V4.39h4.387v4.386zm5.422-.004h-4.386V4.386h4.386v4.386z"}],tencent:[{d:"M12 0c6.627 0 12 5.373 12 12s-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0zm1.652 1.123l-.01-.001c.533.097 1.023.233 1.41.404 6.084 2.683 7.396 9.214 1.601 14.338a3.781 3.781 0 01-5.337-.328 3.654 3.654 0 01-.884-3.044c-1.934.6-3.295 2.305-3.524 4.45-.204 1.912.324 4.044 2.056 5.634l.245.067C10.1 22.876 11.036 23 12 23c6.075 0 11-4.925 11-11 0-5.513-4.056-10.08-9.348-10.877zM2.748 6.21c-.178.269-.348.536-.51.803l-.235.394.078-.167A10.957 10.957 0 001 12c0 4.919 3.228 9.083 7.682 10.49l.214.065C3.523 18.528 2.84 14.149 6.47 8.68A2.234 2.234 0 102.748 6.21zm10.157-5.172c4.408 1.33 3.61 5.41 2.447 6.924-.86 1.117-2.922 1.46-3.708 2.238-.666.657-1.077 1.462-1.212 2.291A5.303 5.303 0 0112 12.258a5.672 5.672 0 001.404-11.169 10.51 10.51 0 00-.5-.052z"}],voyage:[{d:"M5.407 0v.066a.974.974 0 00-.048.245c-.011.11-.016.208-.016.295 0 .339.043.715.128 1.13.097.405.274.912.531 1.524l7.125 16.366L20.011 3.39c.161-.404.333-.846.515-1.327.182-.48.273-.966.273-1.458a1.406 1.406 0 00-.096-.54V0H24v.066c-.204.207-.45.578-.74 1.114-.29.535-.606 1.195-.949 1.982L13.095 24h-1.287L3.075 3.965c-.204-.47-.418-.923-.644-1.36-.214-.437-.418-.83-.61-1.18-.194-.36-.365-.66-.515-.9A5.666 5.666 0 001 .064V0h4.407z"}],xiaomi:[{d:"M12 0C8.016 0 4.756.255 2.493 2.516.23 4.776 0 8.033 0 12.012c0 3.98.23 7.235 2.494 9.497C4.757 23.77 8.017 24 12 24c3.983 0 7.243-.23 9.506-2.491C23.77 19.247 24 15.99 24 12.012c0-3.984-.233-7.243-2.502-9.504C19.234.252 15.978 0 12 0zM4.906 7.405h5.624c1.47 0 3.007.068 3.764.827.746.746.827 2.233.83 3.676v4.54a.15.15 0 0 1-.152.147h-1.947a.15.15 0 0 1-.152-.148V11.83c-.002-.806-.048-1.634-.464-2.051-.358-.36-1.026-.441-1.72-.458H7.158a.15.15 0 0 0-.151.147v6.98a.15.15 0 0 1-.152.148H4.906a.15.15 0 0 1-.15-.148V7.554a.15.15 0 0 1 .15-.149zm12.131 0h1.949a.15.15 0 0 1 .15.15v8.892a.15.15 0 0 1-.15.148h-1.949a.15.15 0 0 1-.151-.148V7.554a.15.15 0 0 1 .151-.149zM8.92 10.948h2.046c.083 0 .15.066.15.147v5.352a.15.15 0 0 1-.15.148H8.92a.15.15 0 0 1-.152-.148v-5.352a.15.15 0 0 1 .152-.147Z"}],zai:[{d:"M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"}]};function M({owner:e,className:n}){let a=y[e];if(a)return(0,t.jsx)(j.ProviderIcon,{provider:a,className:n});let i=N[e];return i?(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:n,"aria-hidden":"true",children:i.map(e=>(0,t.jsx)("path",{d:e.d,opacity:e.opacity},e.d))}):null}function k({models:e,kind:n,value:a,loading:i,onPick:s}){let[r,d]=(0,o.useState)(!1),[u,p]=(0,o.useState)(""),[m,f]=(0,o.useState)("cheap"),[j,y]=(0,o.useState)(a),N=e.filter(e=>e.type===(n??g.GATEWAY_TEXT)),M=n?N:N.filter(e=>e.tags.includes(g.GATEWAY_TOOL_USE)),O=u.trim().toLowerCase(),V=(O?M.filter(e=>`${e.id} ${e.label}`.toLowerCase().includes(O)):M).slice().sort(w[m].compare);return(0,t.jsxs)(b.Dialog,{open:r,onOpenChange:e=>{d(e),e?y(a):p("")},children:[(0,t.jsxs)(b.DialogTrigger,{render:(0,t.jsx)("button",{type:"button","aria-label":"Model",className:(0,h.cn)(c.inputClassName,"relative flex items-center pr-8 text-left font-mono text-sm")}),children:[(0,t.jsx)("span",{className:(0,h.cn)("min-w-0 flex-1 truncate",!a&&"font-sans text-muted-foreground"),children:a||"Pick a model"}),(0,t.jsx)("span",{className:"absolute inset-y-0 right-0 flex w-8 items-center justify-center text-muted-foreground",children:i&&0===M.length?(0,t.jsx)(x.LoaderCircle,{className:"size-3.5 animate-spin"}):(0,t.jsx)(v.Search,{className:"size-3.5"})})]}),(0,t.jsx)(b.DialogContent,{className:"h-[min(40rem,calc(100vh-3rem))] gap-0 overflow-hidden p-0 sm:max-w-2xl",children:(0,t.jsxs)("div",{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,t.jsxs)("div",{className:"shrink-0 space-y-1 px-6 pt-5 pb-4",children:[(0,t.jsxs)(b.DialogTitle,{className:"flex items-center gap-2.5 text-xl font-semibold",children:[(0,t.jsx)(S.VercelIcon,{className:"size-3.5"}),n?z[n]:"Text"," models"]}),(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:O?`${V.length} matching “${u.trim()}”`:n?`${M.length} on the gateway`:`${M.length} of ${N.length} on the gateway can call tools`})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-t border-border/60 px-6 py-3",children:[(0,t.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,t.jsx)(v.Search,{className:"pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(c.Input,{autoFocus:!0,"aria-label":"Search models",placeholder:"name, id or provider",spellCheck:!1,value:u,onChange:e=>p(e.target.value),className:"h-8 pl-8 font-mono text-xs"})]}),(0,t.jsx)(C.Segmented,{"aria-label":"Sort",options:R,value:m,onChange:f})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-4 px-6 pb-1.5 font-mono text-[10px] tracking-wide text-muted-foreground/60",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1",children:"model"}),(0,t.jsx)("span",{className:"w-28 text-right",children:"per 1M in / out"})]}),(0,t.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border/60",children:[V.map(e=>(0,t.jsx)(P,{model:e,picked:e.id===j,onPick:()=>y(e.id)},e.id)),0===V.length&&(0,t.jsxs)("div",{className:"flex flex-col items-start gap-2.5 p-10",children:[(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:O?`Nothing matches “${u.trim()}”.`:"Nothing on the shelf — search for an id."}),O&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(l.Button,{size:"sm",onClick:()=>y(u.trim()),children:["Use “",u.trim(),"” as the id"]}),(0,t.jsx)(l.Button,{variant:"outline",size:"sm",onClick:()=>p(""),children:"Clear search"})]})]})]}),(0,t.jsxs)("div",{className:"flex h-14 shrink-0 items-center gap-3 border-t border-border/60 px-6",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:j||"Nothing picked — the field keeps what it has"}),(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>d(!1),children:"Cancel"}),(0,t.jsx)(l.Button,{disabled:!j,onClick:()=>{s(j),d(!1)},children:"Use this model"})]})]})})]})}let z={image:"Image",video:"Video",speech:"Speech",transcription:"Transcription"},w={cheap:{label:"$↑",title:"Cheapest first",compare:(e,t)=>(e.price.in??1/0)-(t.price.in??1/0)},dear:{label:"$↓",title:"Dearest first",compare:(e,t)=>(t.price.in??-1)-(e.price.in??-1)},name:{label:"a–z",title:"By name",compare:(e,t)=>e.label.localeCompare(t.label)}},R=Object.keys(w).map(e=>({value:e,label:w[e].label,title:w[e].title})),O=e=>e>=1?e.toFixed(2):String(Number(e.toFixed(4)));function P({model:e,picked:a,onPick:i}){let{price:s}=e,o=null!==s.in||null!==s.out;return(0,t.jsxs)("button",{type:"button",onClick:i,className:(0,h.cn)("flex w-full items-center gap-4 border-b border-border/60 px-6 py-2.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",a?"bg-muted/40":"hover:bg-muted/50"),children:[(0,t.jsx)("span",{className:"grid size-[18px] shrink-0 place-items-center",children:(0,t.jsx)(M,{owner:e.owner,className:"size-[15px]"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{className:(0,h.cn)("truncate text-[13px]",a&&"font-medium"),children:e.label}),a&&(0,t.jsx)(n.Check,{className:"size-3.5 shrink-0"}),e.retiring&&(0,t.jsx)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground",children:"retiring"})]}),(0,t.jsx)("span",{className:"block truncate font-mono text-[11px] text-muted-foreground",children:e.id})]}),(0,t.jsxs)("span",{className:"flex w-28 shrink-0 flex-col items-end",children:[(0,t.jsx)("span",{className:(0,h.cn)("font-mono text-xs",o||s.free?"text-foreground":"text-muted-foreground"),children:s.free?"free":null===s.in&&null===s.out?s.note??"—":`${null===s.in?"—":O(s.in)} / ${null===s.out?"—":O(s.out)}`}),o&&s.note&&(0,t.jsx)("span",{className:"font-mono text-[9px] text-muted-foreground/70",children:s.note})]})]})}function V({tier:e}){return(0,t.jsx)("span",{className:"shrink-0 rounded-full px-1.5 font-mono text-[9.5px] leading-4 font-normal text-muted-foreground ring-1 ring-border ring-inset",children:e})}function E({provider:e,onSaved:n}){let[a,i]=(0,o.useState)(""),[s,d]=(0,p.useServerAction)(u.setConfigAction,{okMessage:`${e.label} key saved`,onOk:()=>{(0,m.revalidate)(r.queryKey.llmModel),(0,m.revalidate)(r.queryKey.config),n()}});return e.signIn?(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("p",{className:"px-1 font-mono text-[11px] text-muted-foreground",children:"Runs on your plan once you sign in"}),(0,t.jsx)(f.ChatGptSignIn,{variant:"outline"})]}):(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(c.Input,{value:a,onChange:e=>i(e.target.value),placeholder:e.apiKeyName,spellCheck:!1,type:"password"}),(0,t.jsx)(l.Button,{variant:"outline",loading:d,disabled:a.trim().length<8,onClick:()=>s(e.apiKeyName,a),children:"Save key"})]})}e.s(["ModelPicker",0,function({provider:e,model:u,kind:p,unset:f,onChange:x,onUnset:v,compact:S=!1}){let{data:b=[],mutate:C}=(0,m.useServerRoute)(r.queryKey.llmModel),y=p?b.filter(e=>(0,g.canMakeKind)(e.id,p)):b,N=y.find(t=>t.id===e),[M,z]=(0,o.useState)(!1),[w,R]=(0,o.useState)(null),[O,P]=(0,o.useState)(""),I=y.find(t=>t.id===(w??e))??y[0],T=I?.id==="vercel-ai-gateway",L=(0,m.useServerRoute)(M&&T&&r.queryKey.modelCatalog),A=e=>p&&e?g.MEDIA_MODEL_PROVIDERS[e.id]?.models[p]??[]:e?.suggestModels??[],H=A(N).find(e=>e.id===u),F=e=>{I&&e.trim()&&(x({provider:I.id,model:e.trim()}),P(""),z(!1))};return(0,t.jsxs)(d.Popover,{open:M,onOpenChange:e=>{z(e),e||R(null)},children:[(0,t.jsxs)(d.PopoverTrigger,{render:S?(0,t.jsx)("button",{type:"button",className:"inline-flex h-5 max-w-64 items-center gap-1.5 rounded-full px-2 text-foreground/80 ring-1 ring-border outline-none ring-inset transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50"}):(0,t.jsx)(l.Button,{variant:"outline",className:"w-full min-w-0 justify-start gap-2 font-normal"}),children:[N?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.ProviderIcon,{provider:N.id,className:(0,h.cn)("shrink-0",S?"size-3":"size-4")}),!S&&(0,t.jsxs)("span",{className:"min-w-0 max-w-fit grow basis-0 truncate text-muted-foreground",children:[N.label,(0,t.jsx)("span",{className:"ml-2 text-muted-foreground/40",children:"·"})]}),(0,t.jsx)("span",{className:(0,h.cn)("truncate",!S&&"font-medium"),children:H?.label??(u||"Pick a model")})]}):(0,t.jsx)("span",{className:"truncate text-muted-foreground",children:f??(p?"Not picked":"App default")}),(0,t.jsx)(a.ChevronsUpDown,{className:(0,h.cn)("ml-auto shrink-0 text-muted-foreground",S?"size-2.5":"size-3.5")})]}),(0,t.jsxs)(d.PopoverContent,{align:"start",className:"flex w-[min(34rem,calc(100vw-2rem))] flex-row gap-0 overflow-hidden rounded-2xl p-0",children:[(0,t.jsxs)("div",{className:"flex max-h-80 w-48 shrink-0 flex-col gap-px overflow-y-auto border-r border-border/60 bg-muted/40 p-1.5",children:[v&&(0,t.jsxs)("button",{type:"button",onClick:()=>{v(),z(!1)},className:(0,h.cn)("mb-1 flex h-8.5 shrink-0 items-center gap-2 rounded-lg px-2 text-left text-[13px] outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",N?"hover:bg-muted/60":"bg-muted font-medium"),children:[(0,t.jsx)(i.CircleDashed,{className:"size-4 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:f??(p?"Not picked":"App default")}),!N&&(0,t.jsx)(n.Check,{className:"size-3.5 shrink-0"})]}),y.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>R(e.id),className:(0,h.cn)("flex h-8.5 shrink-0 items-center gap-2 rounded-lg px-2 text-left text-[13px] outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",e.id===I?.id?"bg-muted font-medium":"hover:bg-muted/60",!e.hasKey&&"text-muted-foreground"),children:[(0,t.jsx)(j.ProviderIcon,{provider:e.id,className:"size-4 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.label}),!e.hasKey&&(0,t.jsx)(s.KeyRound,{className:"size-3 shrink-0"})]},e.id))]}),(0,t.jsx)("div",{className:"flex max-h-80 min-w-0 flex-1 flex-col gap-px overflow-y-auto p-1.5",children:I?I.hasKey?T&&!L.error?(0,t.jsxs)("div",{className:"space-y-2 p-2",children:[(0,t.jsx)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"Every model the gateway carries, with what each costs."}),(0,t.jsx)(k,{models:L.data??[],kind:p,value:I.id===e?u:"",loading:L.isLoading,onPick:F})]}):(0,t.jsxs)(t.Fragment,{children:[A(I).map(a=>{let i=I.id===e&&a.id===u;return(0,t.jsxs)("button",{type:"button",onClick:()=>F(a.id),className:(0,h.cn)("flex shrink-0 items-center gap-2 rounded-lg px-2.5 py-1.5 text-left outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",i?"bg-muted":"hover:bg-muted/60"),children:[(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-[13px] font-medium",children:[(0,t.jsx)("span",{className:"truncate",children:a.label}),(0,t.jsx)(V,{tier:a.tier})]}),(0,t.jsx)("span",{className:"block truncate font-mono text-[10.5px] text-muted-foreground",children:a.id})]}),i&&(0,t.jsx)(n.Check,{className:"size-3.5 shrink-0"})]},a.id)}),(0,t.jsx)("form",{onSubmit:e=>{e.preventDefault(),F(O)},className:"mt-1 px-1 pb-1",children:(0,t.jsx)(c.Input,{value:O,onChange:e=>P(e.target.value),spellCheck:!1,"aria-label":"Model id",placeholder:L.error?"Could not read the catalog — type an id":"or type a model id",className:"h-8 font-mono text-xs"})})]}):(0,t.jsxs)("div",{className:"space-y-2 p-2",children:[(0,t.jsxs)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:[I.label," has no key yet."]}),(0,t.jsx)(E,{provider:I,onSaved:()=>C()})]}):null})]})]})}],146538)},563707,152886,e=>{"use strict";var t=e.i(456420);let n={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};n.node;let a=(0,t.default)(n);e.s(["ChevronsUpDown",0,a],563707);let i={name:"circle-dashed",size:24,node:[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]};i.node;let s=(0,t.default)(i);e.s(["CircleDashed",0,s],152886)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,947627,e=>{"use strict";var t=e.i(843476),a=e.i(647163);e.s(["Table",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,a.cn)("w-full caption-bottom text-sm",e),...r})})},"TableBody",0,function({className:e,...r}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,a.cn)("[&_tr:last-child]:border-0",e),...r})},"TableCell",0,function({className:e,...r}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,a.cn)("p-2 align-middle [&:has([role=checkbox])]:pr-0",e),...r})},"TableHead",0,function({className:e,...r}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,a.cn)("h-9 px-2 text-left align-middle font-mono text-[11px] font-normal tracking-[0.1em] whitespace-nowrap text-muted-foreground uppercase [&:has([role=checkbox])]:pr-0",e),...r})},"TableHeader",0,function({className:e,...r}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,a.cn)("[&_tr]:border-b",e),...r})},"TableRow",0,function({className:e,...r}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,a.cn)("border-b border-border/60 transition-colors data-[state=selected]:bg-muted hover:bg-muted/40",e),...r})}])},41533,e=>{"use strict";var t=e.i(247167);t.default.env.THURSDAY_APP_DIR?.trim()||t.default.cwd(),t.default.env.THURSDAY_HOME?.trim()||t.default.cwd(),t.default.env.THURSDAY_URL?.trim()||t.default.env.PORT?.trim();let a=".ai-workspace",r={workspace:a,artifacts:"artifacts",projects:"projects",scratch:"scratch",bots:"bots",output:".output",signIns:".sign-ins",skills:{default:"skills",custom:`${a}/.agents/skills`,own:".agents/skills",seeds:"seed-skills"}};e.s(["APP_NAME",0,"Thursday","ARTIFACT_VIEW",0,{rows:200,setFiles:120},"ASCII_FACE",0,{charset:"emojiOnly",fontSize:{default:8,min:4,max:16},density:{default:1.4,min:.6,max:2}},"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},participants:12,concurrent:4,turns:120,queuedMessages:200,silenceMs:3e5,overflowShrink:.6,retryMs:1e4,compactFiles:40},"BROWSER_SKILL",0,"browser","CALL_BACK",0,{ringMs:3e4},"CALL_END",0,{quietMs:600,unsaidMs:2e3,maxMs:8e3},"CALL_ENDED_MS",0,12e3,"CALL_HISTORY_PAGE",0,10,"CALL_IDLE",0,{hangUpMs:2e4,warnMs:1e4},"CALL_LINE",0,{dwellMs:2e3},"CALL_NUDGE",0,{on:!1,waitMs:1500},"CALL_RELAY",0,{quietMs:7e3,perTurn:3,readMs:15e3,chars:600},"FILE_THUMB",0,{pageWidth:1024,textWidth:512,textBytes:4096,pages:2},"FINISHED_NOTICE",0,{rows:5,words:240},"GIVEN_FILES",0,{dir:"inbox",maxBytes:0x1900000,perMessage:8},"INBOX_FINISHED",0,5,"IS_DEV",0,!1,"LIVE_CALL",0,{startupMs:3e4,closeMs:15e3,transcriptGapMs:1500,transcriptSaveMs:500,appendMs:15e3,backendOutputTokens:4096,reasoningCheckMs:5e3,keyCheckMs:5e3},"MEMORY_LIMITS",0,{facts:400,factsPerNote:50,carried:20,expanded:10},"PAGE_SIZE",0,50,"PATHS",0,r,"PROMPT_CROWDED",0,{bots:10,skills:20},"ROUTINE",0,{tickMs:3e4,max:12,minHours:1,runsShown:5},"STUDIO_SERVER",0,"studio","TEXT_CALL",0,{maxSteps:12,model:"text"},"WORKSPACE_VIEW",0,{rows:200,textMax:524288,elementMax:0x3200000}])},621285,38593,e=>{"use strict";var t=e.i(843476),a=e.i(24071),r=e.i(867927),i=e.i(482022),l=e.i(271645),s=e.i(798120),n=e.i(167881),o=e.i(630374),d=e.i(683408),c=e.i(671428),h=e.i(947627),u=e.i(41533),f=e.i(616172),g=e.i(95187);let m=(0,g.createServerReference)("7f284980eddf0dc50d6dc014ce41f10d9aaa77294a",g.callServer,void 0,g.findSourceMapURL,"openFileAction");e.s(["openFileAction",0,m],38593);var p=e.i(609856),x=e.i(647163);let w=new Set(["frame","image","audio","video"]),y=new Set(["image"]);function b(e){let t=(0,f.workspaceRelative)(e);if(!t)return{how:"os"};let a=(0,f.viewKindOf)(t);return y.has(a)?{how:"dialog",path:t}:w.has(a)?{how:"tab",path:t,href:s.queryKey.fileView(t)}:"none"===a?{how:"os"}:{how:"dialog",path:t}}let k=(0,l.createContext)(null),v={dialog:{prose:"px-5 py-4",block:"px-4 py-3"},page:{prose:"px-5 py-6 sm:px-8",block:"px-5 py-5"},inline:{prose:"pb-3",block:"pb-3"}};function _({kind:e,content:a,truncated:r,where:i="dialog"}){return(0,t.jsxs)(t.Fragment,{children:[null!=r&&(0,t.jsx)(j,{of:r}),(0,t.jsx)(N,{kind:e,content:a,where:i})]})}function j({of:e}){return(0,t.jsxs)("p",{className:"border-b border-border/60 px-5 py-2.5 font-mono text-[11px] text-muted-foreground",children:[`Showing the first ${(0,x.formatBytes)(u.WORKSPACE_VIEW.textMax)} of ${(0,x.formatBytes)(e)}. `,"Open the file itself for the rest."]})}function N({kind:e,content:a,where:r}){let i=v[r];switch(e){case"markdown":return(0,t.jsx)("div",{className:(0,x.cn)("min-w-0 text-sm leading-relaxed",i.prose),children:(0,t.jsx)(d.Markdown,{children:a})});case"csv":return(0,t.jsx)(E,{content:a,className:i.block});case"json":return(0,t.jsx)(T,{text:function(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}(a),className:i.block});default:return(0,t.jsx)(T,{text:a,className:i.block})}}function S(e){let[t,a]=(0,l.useState)(null),[r,i]=(0,l.useState)(null),[n,o]=(0,l.useState)(null);return(0,l.useEffect)(()=>{if(!e)return;a(null),i(null),o(null);let t=!1;return fetch(s.queryKey.file(e),{headers:{range:`bytes=0-${u.WORKSPACE_VIEW.textMax-1}`}}).then(async e=>{if(!e.ok)throw Error(await e.text());return{text:await e.text(),of:function(e){let t=e.headers.get("content-range")?.match(/^bytes \d+-(\d+)\/(\d+)$/);if(!t)return null;let[,a,r]=t.map(Number);return a+1<r?r:null}(e)}}).then(({text:e,of:r})=>{t||(a(null===r?e:e.slice(0,e.lastIndexOf("\n")+1||void 0)),o(r))}).catch(e=>!t&&i((0,x.errorToString)(e))),()=>{t=!0}},[e]),{content:t,failure:r,truncated:n}}function C({path:e,bytes:a}){let[r,i]=(0,p.useServerAction)(m);return(0,t.jsxs)("div",{className:"space-y-4 p-8",children:[(0,t.jsxs)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:[`This file is ${(0,x.formatBytes)(a)} — too big to draw here without `,"taking the window with it. Open it where it is instead."]}),(0,t.jsx)(n.Button,{variant:"outline",loading:i,onClick:()=>r(e),children:"Reveal in the file manager"})]})}function L({path:e,group:l=[],kind:d,onPath:h,onClose:u}){let f="image"===d,{content:g,failure:m,truncated:p}=S(f?null:e),w=e?.split("/").pop()??"",y=e?l.indexOf(e):-1,b=e=>{!(y<0)&&h&&h(l[(y+e+l.length)%l.length])};return(0,t.jsx)(o.Dialog,{open:null!==e,onOpenChange:e=>!e&&u(),children:(0,t.jsxs)(o.DialogContent,{onKeyDown:e=>{"ArrowLeft"===e.key&&b(-1),"ArrowRight"===e.key&&b(1)},className:"flex max-h-[calc(100vh-3rem)] flex-col gap-0 overflow-hidden p-0 sm:max-w-4xl",children:[(0,t.jsx)(o.DialogTitle,{className:"sr-only",children:w}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-1 border-b border-border/60 py-2 pr-12 pl-4",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px]",children:e}),y>=0&&l.length>1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:[y+1," / ",l.length]}),(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm","aria-label":"Previous image",onClick:()=>b(-1),children:(0,t.jsx)(a.ChevronLeft,{})}),(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm","aria-label":"Next image",onClick:()=>b(1),children:(0,t.jsx)(r.ChevronRight,{})})]}),f&&e&&(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm","aria-label":"Open in a new tab",render:(0,t.jsx)("a",{href:s.queryKey.fileView(e),target:"_blank",rel:"noreferrer"}),children:(0,t.jsx)(i.ExternalLink,{})})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:f&&e?(0,t.jsx)("img",{src:s.queryKey.file(e),alt:w,className:"mx-auto max-h-[calc(100vh-11rem)] object-contain p-4"}):m?(0,t.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:m}):null===g?(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(c.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-5/6"})]}):(0,t.jsx)(_,{kind:d,content:g,truncated:p})}),f&&l.length>1&&(0,t.jsx)("div",{className:"flex shrink-0 justify-center gap-1.5 border-t border-border/60 p-2.5",children:l.map(a=>(0,t.jsx)("button",{type:"button","aria-label":a.split("/").pop(),onClick:()=>h?.(a),className:(0,x.cn)("size-11 shrink-0 overflow-hidden rounded-md outline-none focus-visible:ring-3 focus-visible:ring-ring/50",a===e?"ring-2 ring-foreground":"opacity-55"),children:(0,t.jsx)("img",{src:s.queryKey.file(a),alt:"",loading:"lazy",className:"size-full bg-muted object-cover"})},a))})]})})}function T({text:e,className:a}){return(0,t.jsx)("pre",{className:(0,x.cn)("overflow-x-auto font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-foreground/90",a),children:e})}function E({content:e,className:a}){let[r,...i]=(0,l.useMemo)(()=>(function(e){let t=[],a=[],r="",i=!1;for(let l=0;l<e.length;l++){let s=e[l];i?'"'===s&&'"'===e[l+1]?(r+='"',l++):'"'===s?i=!1:r+=s:'"'===s?i=!0:","===s?(a.push(r),r=""):"\n"===s||"\r"===s?("\r"===s&&"\n"===e[l+1]&&l++,a.push(r),t.push(a),a=[],r=""):r+=s}return(r.length||a.length)&&(a.push(r),t.push(a)),t.filter(e=>e.some(e=>e.trim()))})(e),[e]);return r?(0,t.jsx)("div",{className:(0,x.cn)("overflow-x-auto",a),children:(0,t.jsxs)(h.Table,{children:[(0,t.jsx)(h.TableHeader,{children:(0,t.jsx)(h.TableRow,{children:r.map((e,a)=>(0,t.jsx)(h.TableHead,{className:"whitespace-nowrap",children:e},`${a}-${e}`))})}),(0,t.jsx)(h.TableBody,{children:i.map((e,a)=>(0,t.jsx)(h.TableRow,{children:r.map((r,i)=>(0,t.jsx)(h.TableCell,{className:"whitespace-nowrap",children:e[i]??""},`${a}-${i}`))},`${a}-${e[0]??""}`))})]})}):(0,t.jsx)(T,{text:e,className:a})}e.s(["FileBody",0,_,"FileLink",0,function({path:e,group:a,className:r,title:i,label:n,children:o}){let d=b(e),c=(0,l.useContext)(k),[h,u]=(0,p.useServerAction)(m);return"tab"===d.how?(0,t.jsx)("a",{href:d.href,target:"_blank",rel:"noreferrer",title:i??e,"aria-label":n,className:r,children:o}):(0,t.jsx)("button",{type:"button",disabled:u,title:i??e,"aria-label":n,className:r,onClick:()=>{"dialog"===d.how?c?c(d.path,a):window.open(s.queryKey.fileView(d.path),"_blank"):h(e)},children:o})},"FilePreview",0,function({path:e,bytes:a}){let r=(0,f.viewKindOf)(e),{content:i,failure:l,truncated:n}=S(w.has(r)?null:e);return("frame"===r||"image"===r)&&a>u.WORKSPACE_VIEW.elementMax?(0,t.jsx)(C,{path:e,bytes:a}):"frame"===r?(0,t.jsx)("iframe",{title:e,src:s.queryKey.file(e),allow:"clipboard-read; clipboard-write; fullscreen; autoplay",className:"h-full w-full bg-white"}):"image"===r?(0,t.jsx)("img",{src:s.queryKey.file(e),alt:e,className:"mx-auto max-w-full p-6"}):"audio"===r||"video"===r?"audio"===r?(0,t.jsx)("audio",{controls:!0,src:s.queryKey.file(e),className:"w-full p-6",children:(0,t.jsx)("track",{kind:"captions"})}):(0,t.jsx)("video",{controls:!0,src:s.queryKey.file(e),className:"max-w-full p-6",children:(0,t.jsx)("track",{kind:"captions"})}):l?(0,t.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:l}):null===i?(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(c.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-5/6"})]}):(0,t.jsx)(_,{kind:r,content:i,truncated:n})},"FileViewer",0,function({children:e}){let[a,r]=(0,l.useState)(null),i=(0,l.useCallback)((e,t=[])=>r({path:e,group:t}),[]);return(0,t.jsxs)(k,{value:i,children:[e,(0,t.jsx)(L,{path:a?.path??null,group:a?.group??[],kind:a?(0,f.viewKindOf)(a.path):"text",onPath:e=>r(t=>t&&{...t,path:e}),onClose:()=>r(null)})]})},"fileTarget",0,b,"useFileText",0,S,"useOpenFile",0,function(){let e=(0,l.useContext)(k);return(0,l.useCallback)((t,a=[])=>{let r=b(t);if("os"===r.how)return!1;if("dialog"===r.how&&e)return e(r.path,a),!0;let i="tab"===r.how?r.href:s.queryKey.fileView(r.path);return null!==window.open(i,"_blank")},[e])}],621285)},616172,e=>{"use strict";var t=e.i(798120),a=e.i(41533);let r=e=>`text/${e}; charset=utf-8`,i={md:{kind:"markdown",mime:r("markdown")},markdown:{kind:"markdown",mime:r("markdown")},csv:{kind:"csv",mime:r("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:r("plain")},log:{kind:"text",mime:r("plain")},html:{kind:"frame",mime:r("html")},htm:{kind:"frame",mime:r("html")},pdf:{kind:"frame",mime:"application/pdf"},png:{kind:"image",mime:"image/png"},jpg:{kind:"image",mime:"image/jpeg"},jpeg:{kind:"image",mime:"image/jpeg"},gif:{kind:"image",mime:"image/gif"},webp:{kind:"image",mime:"image/webp"},svg:{kind:"image",mime:"image/svg+xml"},mp3:{kind:"audio",mime:"audio/mpeg"},wav:{kind:"audio",mime:"audio/wav"},mp4:{kind:"video",mime:"video/mp4"},webm:{kind:"video",mime:"video/webm"},css:{kind:"none",mime:r("css")},js:{kind:"none",mime:r("javascript")},woff2:{kind:"none",mime:"font/woff2"}},l=e=>e.split(".").pop()?.toLowerCase()??"",s=Object.entries(i).filter(([,e])=>"none"!==e.kind).map(([e])=>e),n=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])\/?(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${s.join("|")})\b`,"giu"),o=`${a.PATHS.workspace}/`,d=t.queryKey.file("");function c(e){let t=function(e){if(!e.startsWith(d))return e;let t=e.slice(d.length);try{return decodeURIComponent(t)}catch{return t}}(e.trim()),a=t.indexOf(o);return a>=0?t.slice(a+o.length)||null:t.startsWith("/")||/^[A-Za-z]:/.test(t)||t.split("/").includes("..")?null:t||null}let h=/^[\s`'"*_)]*(?:~|–|—|-|\.{2,}|…|to|through)[\s`'"*_(]*$/i;e.s(["opensOnFinish",0,e=>e.startsWith(`${a.PATHS.artifacts}/`)&&["md","markdown","html","htm"].includes(l(e)),"pathsIn",0,function(e){let t=e.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," "),a=new Set,r="",i=null;for(let e of t.matchAll(n)){let l=e[0],s=!l.includes("/"),n=function(e){let t=c(e);if(!t)return null;let[a,...r]=t.split("/");return r.length&&a.includes(".")?null:t}(s?r+l:l);if(s||(r=n?.slice(0,n.lastIndexOf("/")+1)??""),n){if(i&&h.test(t.slice(i.end,e.index)))for(let e of function(e,t){let a=/^(.*?)(\d+)(\D*)$/.exec(e),r=/^(.*?)(\d+)(\D*)$/.exec(t);if(!a||!r||a[1]!==r[1]||a[3]!==r[3])return[];let i=Number(a[2]),l=Number(r[2]);if(!(l-i>1)||l-i>12)return[];let s=a[2].startsWith("0")?a[2].length:0;return Array.from({length:l-i-1},(e,t)=>`${a[1]}${String(i+t+1).padStart(s,"0")}${a[3]}`)}(i.rel,n))a.add(e);a.add(n),i={rel:n,end:e.index+l.length}}}return[...a].slice(0,12)},"viewKindOf",0,e=>i[l(e)]?.kind??"none","workspaceRelative",0,c])},867927,986253,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let r=(0,t.default)(a);e.s(["default",0,r],986253),e.s(["ChevronRight",0,r],867927)},482022,e=>{"use strict";var t=e.i(456420);let a={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};a.node;let r=(0,t.default)(a);e.s(["ExternalLink",0,r],482022)},696017,e=>{"use strict";var t=e.i(60231),a=e.i(419524);e.i(947716);var r=e.i(723685),i=(0,a.__name)(e=>{let{securityLevel:a}=(0,t.getConfig2)(),i=(0,r.select)("body");if("sandbox"===a){let t=(0,r.select)(`#i${e}`),a=t.node()?.contentDocument??document;i=(0,r.select)(a.body)}return i.select(`#${e}`)},"selectSvgElement");e.s(["selectSvgElement",0,i])},502056,e=>{"use strict";var t=e.i(217248),a=e.i(447804),r=e.i(508324),i=e.i(419524),l=(0,i.__name)(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,a=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:a,subGraphTitleTotalMargin:t+a}},"getSubGraphTitleMargins"),s=new Map;async function n(e,r,i){let l,n;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");let o=r.shape?t.shapes[r.shape]:void 0;if(!o)throw Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let t;"sandbox"===i.config.securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),l=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t??null),n=await o(l,r,i)}else l=n=await o(e,r,i);return l.attr("data-look",(0,a.handleUndefinedAttr)(r.look)),r.tooltip&&n.attr("title",r.tooltip),s.set(r.id,l),r.haveCallback&&l.attr("class",l.attr("class")+" clickable"),l}(0,i.__name)(n,"insertNode");var o=(0,i.__name)((e,t)=>{s.set(t.id,e)},"setNodeElem"),d=(0,i.__name)(()=>{s.clear()},"clear"),c=(0,i.__name)(e=>{let t=s.get(e.id);r.log.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let a=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+a-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),a},"positionNode");e.s(["clear",0,d,"getSubGraphTitleMargins",0,l,"insertNode",0,n,"positionNode",0,c,"setNodeElem",0,o])},369110,e=>{"use strict";var t=e.i(502056),a=e.i(217248),r=e.i(224797),i=e.i(836333),l=e.i(60231),s=e.i(508324),n=e.i(419524);e.i(947716);var o=e.i(723685),d=e.i(883272),c=(0,n.__name)(async(e,t)=>{let n,c,h=(0,l.getConfig2)(),{themeVariables:u,handDrawnSeed:f}=h,{clusterBkg:g,clusterBorder:m}=u,{labelStyles:p,nodeStyles:x,borderStyles:w,backgroundStyles:y}=(0,r.styles2String)(t),b=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),k=(0,l.evaluate)(h.flowchart.htmlLabels),v="LR"===t.direction,_=b.insert("g").attr("class","cluster-label swimlane-label"),j=await (0,i.createText)(_,t.label,{style:t.labelStyle,useHtmlLabels:k,isNode:!0,width:t.width}),N=j.getBBox();if(k){let e=j.children[0],t=(0,o.select)(j);N=e.getBoundingClientRect(),t.attr("width",N.width),t.attr("height",N.height)}let S=t.padding??0,C=t.width<=N.width+S?N.width+S:t.width;t.width<=N.width+S?t.diff=(C-t.width)/2-S:t.diff=-S;let L=t.height,T=t.y-L/2,E=t.y+L/2,B=t.x-C/2,M=void 0!==t.swimlaneContentTop?t.swimlaneContentTop:T+L/3,R=4*!!v,A=N.height+2*R;if(v){let e=Math.max(A,N.height+2*R),a=B+e,i=Math.max(0,C-e);if("handDrawn"===t.look){let l=d.default.svg(b),s=(0,r.userNodeOverrides)(t,{roughness:.7,fill:g,stroke:m,fillWeight:3,seed:f}),o=(0,r.userNodeOverrides)(t,{roughness:.7,fill:"none",stroke:m,seed:f}),h=l.rectangle(B,T,e,L,s);n=b.insert(()=>h,":first-child");let u=l.rectangle(a,T,i,L,o);c=b.insert(()=>u,":first-child"),n.select("path:nth-child(2)").attr("style",w.join(";")),n.select("path").attr("style",y.join(";").replace("fill","stroke"))}else n=b.insert("rect",":first-child"),c=b.insert("rect",":first-child"),n.attr("class","swimlane-title").attr("style",x).attr("x",B).attr("y",T).attr("width",e).attr("height",L).attr("fill",g).attr("stroke",m),c.attr("class","swimlane-body").attr("style",x).attr("x",a).attr("y",T).attr("width",i).attr("height",L).attr("fill","none").attr("stroke",m);let l=B+e/2,s=t.y;_.attr("transform",`translate(${l}, ${s}) rotate(-90) translate(${-N.width/2}, ${-N.height/2})`)}else{let e=Math.min(A,Math.max(0,M-T)),a=T+e,i=Math.max(0,E-a),l=t.x-C/2;if("handDrawn"===t.look){let s=d.default.svg(b),o=(0,r.userNodeOverrides)(t,{roughness:.7,fill:g,stroke:m,fillWeight:3,seed:f}),h=(0,r.userNodeOverrides)(t,{roughness:.7,fill:"none",stroke:m,seed:f}),u=s.rectangle(l,T,C,e,o);n=b.insert(()=>u,":first-child");let p=s.rectangle(l,a,C,i,h);c=b.insert(()=>p,":first-child"),n.select("path:nth-child(2)").attr("style",w.join(";")),n.select("path").attr("style",y.join(";").replace("fill","stroke"))}else n=b.insert("rect",":first-child"),c=b.insert("rect",":first-child"),n.attr("class","swimlane-title").attr("style",x).attr("x",l).attr("y",T).attr("width",C).attr("height",e).attr("fill",g).attr("stroke",m),c.attr("class","swimlane-body").attr("style",x).attr("x",l).attr("y",a).attr("width",C).attr("height",i).attr("fill","none").attr("stroke",m);let s=t.x-N.width/2,o=T+(e-N.height)/2;_.attr("transform",`translate(${s}, ${o})`)}if(s.log.trace("Swimlane data ",t,JSON.stringify(t)),p){let e=_.select("span");e&&e.attr("style",p)}return t.offsetX=0,t.width=C,t.height=L,t.offsetY=N.height-S/2,t.intersect=function(e){return(0,a.intersect_rect_default)(t,e)},{cluster:b,labelBBox:N}},"swimlane"),h=(0,n.__name)(async(e,n)=>{let c,h;s.log.info("Creating subgraph rect for ",n.id,n);let u=(0,l.getConfig2)(),{themeVariables:f,handDrawnSeed:g}=u,{clusterBkg:m,clusterBorder:p}=f,{labelStyles:x,nodeStyles:w,borderStyles:y,backgroundStyles:b}=(0,r.styles2String)(n),k=e.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),v=(0,l.getEffectiveHtmlLabels)(u),_=k.insert("g").attr("class","cluster-label "),j=(c="markdown"===n.labelType?await (0,i.createText)(_,n.label,{style:n.labelStyle,useHtmlLabels:v,isNode:!0,width:n.width}):await (0,a.createLabel_default)(_,n.label,n.labelStyle||"",!1,!0)).getBBox();if((0,l.getEffectiveHtmlLabels)(u)){let e=c.children[0],t=(0,o.select)(c);j=e.getBoundingClientRect(),t.attr("width",j.width),t.attr("height",j.height)}let N=n.width<=j.width+n.padding?j.width+n.padding:n.width;n.width<=j.width+n.padding?n.diff=(N-n.width)/2-n.padding:n.diff=-n.padding;let S=n.height,C=n.x-N/2,L=n.y-S/2;if(s.log.trace("Data ",n,JSON.stringify(n)),"handDrawn"===n.look){let e=d.default.svg(k),t=(0,r.userNodeOverrides)(n,{roughness:.7,fill:m,stroke:p,fillWeight:3,seed:g}),i=e.path((0,a.createRoundedRectPathD)(C,L,N,S,0),t);(h=k.insert(()=>(s.log.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",y.join(";")),h.select("path").attr("style",b.join(";").replace("fill","stroke"))}else(h=k.insert("rect",":first-child")).attr("style",w).attr("rx",n.rx).attr("ry",n.ry).attr("x",C).attr("y",L).attr("width",N).attr("height",S);let{subGraphTitleTopMargin:T}=(0,t.getSubGraphTitleMargins)(u);if(_.attr("transform",`translate(${n.x-j.width/2}, ${n.y-n.height/2+T})`),x){let e=_.select("span");e&&e.attr("style",x)}let E=h.node().getBBox();return n.offsetX=0,n.width=E.width,n.height=E.height,n.offsetY=j.height-n.padding/2,n.intersect=function(e){return(0,a.intersect_rect_default)(n,e)},{cluster:k,labelBBox:j}},"rect"),u=(0,n.__name)((e,t)=>{let r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),l=0*t.padding,s=l/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+l).attr("height",t.height+l).attr("fill","none");let n=i.node().getBBox();return t.width=n.width,t.height=n.height,t.intersect=function(e){return(0,a.intersect_rect_default)(t,e)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),f=(0,n.__name)(async(e,t)=>{let r,i=(0,l.getConfig2)(),{themeVariables:s,handDrawnSeed:n}=i,{altBackground:c,compositeBackground:h,compositeTitleBackground:u,nodeBorder:f}=s,g=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),m=g.insert("g",":first-child"),p=g.insert("g").attr("class","cluster-label"),x=g.append("rect"),w=await (0,a.createLabel_default)(p,t.label,t.labelStyle,void 0,!0),y=w.getBBox();if((0,l.getEffectiveHtmlLabels)(i)){let e=w.children[0],t=(0,o.select)(w);y=e.getBoundingClientRect(),t.attr("width",y.width),t.attr("height",y.height)}let b=0*t.padding,k=(t.width<=y.width+t.padding?y.width+t.padding:t.width)+b;t.width<=y.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;let v=t.height+b,_=t.height+b-y.height-6,j=t.x-k/2,N=t.y-v/2;t.width=k;let S=t.y-t.height/2-b/2+y.height+2;if("handDrawn"===t.look){let e=t.cssClasses.includes("statediagram-cluster-alt"),i=d.default.svg(g),l=t.rx||t.ry?i.path((0,a.createRoundedRectPathD)(j,N,k,v,10),{roughness:.7,fill:u,fillStyle:"solid",stroke:f,seed:n}):i.rectangle(j,N,k,v,{seed:n});r=g.insert(()=>l,":first-child");let s=i.rectangle(j,S,k,_,{fill:e?c:h,fillStyle:e?"hachure":"solid",stroke:f,seed:n});r=g.insert(()=>l,":first-child"),x=g.insert(()=>s)}else(r=m.insert("rect",":first-child")).attr("class","outer").attr("x",j).attr("y",N).attr("width",k).attr("height",v).attr("data-look",t.look),x.attr("class","inner").attr("x",j).attr("y",S).attr("width",k).attr("height",_);return p.attr("transform",`translate(${t.x-y.width/2}, ${N+1-3*!(0,l.getEffectiveHtmlLabels)(i)})`),t.height=r.node().getBBox().height,t.offsetX=0,t.offsetY=y.height-t.padding/2,t.labelBBox=y,t.intersect=function(e){return(0,a.intersect_rect_default)(t,e)},{cluster:g,labelBBox:y}},"roundedWithTitle"),g=(0,n.__name)(async(e,n)=>{let c;s.log.info("Creating subgraph rect for ",n.id,n);let h=(0,l.getConfig2)(),{themeVariables:u,handDrawnSeed:f}=h,{clusterBkg:g,clusterBorder:m}=u,{labelStyles:p,nodeStyles:x,borderStyles:w,backgroundStyles:y}=(0,r.styles2String)(n),b=e.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),k=(0,l.getEffectiveHtmlLabels)(h),v=b.insert("g").attr("class","cluster-label "),_=await (0,i.createText)(v,n.label,{style:n.labelStyle,useHtmlLabels:k,isNode:!0,width:n.width}),j=_.getBBox();if((0,l.getEffectiveHtmlLabels)(h)){let e=_.children[0],t=(0,o.select)(_);j=e.getBoundingClientRect(),t.attr("width",j.width),t.attr("height",j.height)}let N=n.width<=j.width+n.padding?j.width+n.padding:n.width;n.width<=j.width+n.padding?n.diff=(N-n.width)/2-n.padding:n.diff=-n.padding;let S=n.height,C=n.x-N/2,L=n.y-S/2;if(s.log.trace("Data ",n,JSON.stringify(n)),"handDrawn"===n.look){let e=d.default.svg(b),t=(0,r.userNodeOverrides)(n,{roughness:.7,fill:g,stroke:m,fillWeight:4,seed:f}),i=e.path((0,a.createRoundedRectPathD)(C,L,N,S,n.rx),t);(c=b.insert(()=>(s.log.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",w.join(";")),c.select("path").attr("style",y.join(";").replace("fill","stroke"))}else(c=b.insert("rect",":first-child")).attr("style",x).attr("rx",n.rx).attr("ry",n.ry).attr("x",C).attr("y",L).attr("width",N).attr("height",S);let{subGraphTitleTopMargin:T}=(0,t.getSubGraphTitleMargins)(h);if(v.attr("transform",`translate(${n.x-j.width/2}, ${n.y-n.height/2+T})`),p){let e=v.select("span");e&&e.attr("style",p)}let E=c.node().getBBox();return n.offsetX=0,n.width=E.width,n.height=E.height,n.offsetY=j.height-n.padding/2,n.intersect=function(e){return(0,a.intersect_rect_default)(n,e)},{cluster:b,labelBBox:j}},"kanbanSection"),m={rect:h,squareRect:h,roundedWithTitle:f,noteGroup:u,divider:(0,n.__name)((e,t)=>{let r,{themeVariables:i,handDrawnSeed:s}=(0,l.getConfig2)(),{nodeBorder:n}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),c=o.insert("g",":first-child"),h=0*t.padding,u=t.width+h;t.diff=-t.padding;let f=t.height+h,g=t.x-u/2,m=t.y-f/2;if(t.width=u,"handDrawn"===t.look){let e=d.default.svg(o).rectangle(g,m,u,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:s});r=o.insert(()=>e,":first-child")}else{r=c.insert("rect",":first-child");let e="outer";t.look,e="divider",r.attr("class",e).attr("x",g).attr("y",m).attr("width",u).attr("height",f).attr("data-look",t.look)}return t.height=r.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return(0,a.intersect_rect_default)(t,e)},{cluster:o,labelBBox:{}}},"divider"),kanbanSection:g,swimlane:c},p=new Map,x=(0,n.__name)(async(e,t)=>{let a=t.shape||"rect",r=await m[a](e,t);return p.set(t.id,r),r},"insertCluster"),w=(0,n.__name)(()=>{p=new Map},"clear");e.s(["clear",0,w,"insertCluster",0,x])},121292,e=>{"use strict";var t=e.i(369110),a=e.i(382793),r=e.i(502056),i=e.i(217248),l=e.i(447804),s=e.i(60231),n=e.i(508324),o=e.i(419524),d={common:s.common_default,getConfig:s.getConfig,insertCluster:t.insertCluster,insertEdge:a.insertEdge,insertEdgeLabel:a.insertEdgeLabel,insertMarkers:a.markers_default,insertNode:r.insertNode,interpolateToCurve:l.interpolateToCurve,labelHelper:i.labelHelper,log:n.log,positionEdgeLabel:a.positionEdgeLabel},c={},h=(0,o.__name)(e=>{for(let t of e)c[t.name]=t},"registerLayoutLoaders");(0,o.__name)(()=>{h([{name:"dagre",loader:(0,o.__name)(async()=>await e.A(555153),"loader")},{name:"swimlane",loader:(0,o.__name)(async()=>await e.A(12782),"loader")},{name:"cose-bilkent",loader:(0,o.__name)(async()=>await e.A(208503),"loader")}])},"registerDefaultLayoutLoaders")();var u=(0,o.__name)(async(e,t)=>{if(!(e.layoutAlgorithm in c))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let a=t.domId||t.id;t.domId=`${e.diagramId}-${a}`}let a=c[e.layoutAlgorithm],r=await a.loader(),{theme:i,themeVariables:l}=e.config,{useGradient:s,gradientStart:n,gradientStop:o}=l,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i?.includes("dark")?"#FFFFFF":"#000000"}`),s){let e=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),e.append("svg:stop").attr("offset","100%").attr("stop-color",o).attr("stop-opacity",1)}return r.render(e,t,d,{algorithm:a.algorithm})},"render"),f=(0,o.__name)((e="",{fallback:t="dagre"}={})=>{if(e in c)return e;if(t in c)return n.log.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm");e.s(["getRegisteredLayoutAlgorithm",0,f,"registerLayoutLoaders",0,h,"render",0,u])}]);