thursday-agent 0.6.0 → 0.7.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 (193) 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.html +1 -1
  5. package/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  9. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  10. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/_not-found.html +1 -1
  12. package/.next/server/app/_not-found.rsc +2 -2
  13. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  14. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  15. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  16. package/.next/server/app/api/artifact/route.js +3 -3
  17. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  18. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
  19. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
  20. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  21. package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
  22. package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
  23. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  24. package/.next/server/app/api/memory/edit/route.js +1 -1
  25. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
  26. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  27. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  28. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  29. package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
  30. package/.next/server/app/api/thursday/tool-call/route.js +1 -1
  31. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  32. package/.next/server/app/api/workspace/missing/route.js +2 -2
  33. package/.next/server/app/api/workspace/missing/route.js.nft.json +1 -1
  34. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  35. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
  36. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  37. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  38. package/.next/server/app/page/server-reference-manifest.json +42 -42
  39. package/.next/server/app/page.js +5 -4
  40. package/.next/server/app/page.js.nft.json +1 -1
  41. package/.next/server/app/page_client-reference-manifest.js +1 -1
  42. package/.next/server/chunks/[root-of-the-server]__0-06t3f._.js +8 -0
  43. package/.next/server/chunks/{[root-of-the-server]__049f521._.js → [root-of-the-server]__06l05n_._.js} +1 -1
  44. package/.next/server/chunks/[root-of-the-server]__0_ue8oe._.js +1 -1
  45. package/.next/server/chunks/{[root-of-the-server]__0ye3da2._.js → [root-of-the-server]__0btqrct._.js} +1 -1
  46. package/.next/server/chunks/[root-of-the-server]__0c9fgca._.js +1 -1
  47. package/.next/server/chunks/[root-of-the-server]__0zp35ul._.js +1 -1
  48. package/.next/server/chunks/[root-of-the-server]__1kv8p3e._.js +1 -1
  49. package/.next/server/chunks/_02szwk8._.js +1 -1
  50. package/.next/server/chunks/_06c9kie._.js +24 -24
  51. package/.next/server/chunks/_0i55en5._.js +6 -6
  52. package/.next/server/chunks/_0p56fn0._.js +1 -1
  53. package/.next/server/chunks/_11ujpya._.js +1 -1
  54. package/.next/server/chunks/_1dbixxz._.js +1 -1
  55. package/.next/server/chunks/_1dc_d1q._.js +16 -16
  56. package/.next/server/chunks/_1gnjfli._.js +3 -0
  57. package/.next/server/chunks/_1klbcft._.js +1 -1
  58. package/.next/server/chunks/features_0-cnt0l._.js +1 -1
  59. package/.next/server/chunks/features_0hdaci0._.js +1 -1
  60. package/.next/server/chunks/ssr/[root-of-the-server]__0-e011f._.js +3 -0
  61. package/.next/server/chunks/ssr/[root-of-the-server]__0pd8yr7._.js +3 -0
  62. package/.next/server/chunks/ssr/[root-of-the-server]__1nygfik._.js +1 -1
  63. package/.next/server/chunks/ssr/[root-of-the-server]__1sdphb0._.js +1 -1
  64. package/.next/server/chunks/ssr/{[root-of-the-server]__1fll8dc._.js → [root-of-the-server]__1vdmfbe._.js} +2 -2
  65. package/.next/server/chunks/ssr/[root-of-the-server]__1waa3rc._.js +34 -49
  66. package/.next/server/chunks/ssr/{_1anqots._.js → _0-2qsxo._.js} +2 -2
  67. package/.next/server/chunks/ssr/_02oc_h5._.js +9 -9
  68. package/.next/server/chunks/ssr/_05yghx6._.js +1 -1
  69. package/.next/server/chunks/ssr/_07nbwap._.js +3 -0
  70. package/.next/server/chunks/ssr/_08c4z-9._.js +1 -1
  71. package/.next/server/chunks/ssr/_0_qfdlw._.js +1 -1
  72. package/.next/server/chunks/ssr/_0b6_jv-._.js +3 -0
  73. package/.next/server/chunks/ssr/_0hxt2ul._.js +1 -1
  74. package/.next/server/chunks/ssr/_0i_6q1w._.js +1 -1
  75. package/.next/server/chunks/ssr/{_18xqmny._.js → _0no7i1o._.js} +2 -2
  76. package/.next/server/chunks/ssr/_0tzg--b._.js +3 -0
  77. package/.next/server/chunks/ssr/{_1ztk7p6._.js → _114ylv7._.js} +3 -3
  78. package/.next/server/chunks/ssr/{_1k0spz7._.js → _12c-iwh._.js} +2 -2
  79. package/.next/server/chunks/ssr/_12w42gi._.js +1 -1
  80. package/.next/server/chunks/ssr/{_0eaog6_._.js → _167hchk._.js} +2 -2
  81. package/.next/server/chunks/ssr/{_1x9pskj._.js → _1_x5spz._.js} +3 -3
  82. package/.next/server/chunks/ssr/{_0dr-ddg._.js → _1a61fc9._.js} +2 -2
  83. package/.next/server/chunks/ssr/_1jmz33w._.js +1 -1
  84. package/.next/server/chunks/ssr/{_1y6b5mr._.js → _1w_t7h7._.js} +2 -2
  85. package/.next/server/chunks/ssr/{_0dh2e1j._.js → _1wyfaq_._.js} +7 -7
  86. package/.next/server/chunks/ssr/{[root-of-the-server]__0bxsfyn._.js → _200gt-m._.js} +4 -3
  87. package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +1 -1
  88. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  89. package/.next/server/chunks/ssr/{_0c9e5w6._.js → features_workspace_00jz2hu._.js} +3 -4
  90. package/.next/server/chunks/ssr/{node_modules_0746rzi._.js → node_modules_02ai7br._.js} +1 -1
  91. package/.next/server/chunks/ssr/{node_modules_0vsxbzp._.js → node_modules_02deexj._.js} +1 -1
  92. package/.next/server/chunks/ssr/{node_modules_1g1eihe._.js → node_modules_07za262._.js} +1 -1
  93. package/.next/server/chunks/ssr/{node_modules_0332gw4._.js → node_modules_0_s9get._.js} +1 -1
  94. package/.next/server/chunks/ssr/{node_modules_1gpednh._.js → node_modules_0n3c7h0._.js} +1 -1
  95. package/.next/server/chunks/ssr/{node_modules_0t-9nup._.js → node_modules_0od6jwr._.js} +1 -1
  96. package/.next/server/chunks/ssr/{node_modules_0mxvg8h._.js → node_modules_0rdt7pk._.js} +1 -1
  97. package/.next/server/chunks/ssr/{node_modules_0vv0-fg._.js → node_modules_0w1z7kz._.js} +1 -1
  98. package/.next/server/chunks/ssr/{node_modules_1d53yiq._.js → node_modules_0wdupfz._.js} +1 -1
  99. package/.next/server/chunks/ssr/{node_modules_1u6w1pb._.js → node_modules_1720w0a._.js} +1 -1
  100. package/.next/server/chunks/ssr/{node_modules_1gu1pph._.js → node_modules_18lsg7d._.js} +1 -1
  101. package/.next/server/chunks/ssr/{node_modules_1he1w8_._.js → node_modules_1b94fxf._.js} +1 -1
  102. package/.next/server/chunks/ssr/{node_modules_0qbfyjh._.js → node_modules_1ecdo1s._.js} +1 -1
  103. package/.next/server/chunks/ssr/{node_modules_0qapgjr._.js → node_modules_1fa9ag7._.js} +1 -1
  104. package/.next/server/chunks/ssr/{node_modules_0d5uzof._.js → node_modules_1fv-_si._.js} +1 -1
  105. package/.next/server/chunks/ssr/{node_modules_1lnjapm._.js → node_modules_1hf461g._.js} +1 -1
  106. package/.next/server/chunks/ssr/{node_modules_1-urho9._.js → node_modules_1m71ta-._.js} +1 -1
  107. package/.next/server/chunks/ssr/{node_modules_1lynj9m._.js → node_modules_1n93n-g._.js} +1 -1
  108. package/.next/server/chunks/ssr/{node_modules_0fr-ml8._.js → node_modules_1n9lqu9._.js} +1 -1
  109. package/.next/server/chunks/ssr/{node_modules_04vxchl._.js → node_modules_1npnsvd._.js} +1 -1
  110. package/.next/server/chunks/ssr/{node_modules_0exkwcm._.js → node_modules_1rn2r0n._.js} +1 -1
  111. package/.next/server/chunks/ssr/{node_modules_022sipm._.js → node_modules_1vq-mfk._.js} +1 -1
  112. package/.next/server/chunks/ssr/{node_modules_00_51_v._.js → node_modules_1vzyw1t._.js} +1 -1
  113. package/.next/server/chunks/ssr/{node_modules_0wsvp00._.js → node_modules_1w359w4._.js} +1 -1
  114. package/.next/server/chunks/ssr/{node_modules_1xn6saw._.js → node_modules_1yajbl6._.js} +1 -1
  115. package/.next/server/chunks/ssr/{node_modules_16pi_dd._.js → node_modules_20eqhy8._.js} +1 -1
  116. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_067_exa._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_019sbis._.js} +1 -1
  117. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0nrrdaq._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0s6piq3._.js} +1 -1
  118. package/.next/server/chunks/ssr/{node_modules_@vercel_oidc_dist_21a5haa._.js → node_modules_@vercel_oidc_dist_05itbb1._.js} +1 -1
  119. package/.next/server/middleware-build-manifest.js +3 -3
  120. package/.next/server/pages/404.html +1 -1
  121. package/.next/server/pages/500.html +1 -1
  122. package/.next/server/server-reference-manifest.js +1 -1
  123. package/.next/server/server-reference-manifest.json +43 -43
  124. package/.next/static/chunks/{0dr16v67vj4n7.js → 07vqbk_9t4em4.js} +2 -2
  125. package/.next/static/chunks/{2nvepds1fu2ux.js → 08krja1zx7nqg.js} +1 -1
  126. package/.next/static/chunks/{42wcg3wfg_m_p.js → 0qcuwdk132jjt.js} +1 -1
  127. package/.next/static/chunks/{2_pnccjp6j1ca.js → 0z69gvysmave7.js} +1 -1
  128. package/.next/static/chunks/12fvz1w5ows75.js +1 -0
  129. package/.next/static/chunks/14t03ned286iu.js +1 -0
  130. package/.next/static/chunks/{2jlz8zp4jax_m.js → 156xxbkrz5lzu.js} +1 -1
  131. package/.next/static/chunks/1fz14reod4lft.js +1 -0
  132. package/.next/static/chunks/{0joan-69kbspd.js → 1g23dbabl-vkr.js} +1 -1
  133. package/.next/static/chunks/{18mkhstgiqcbt.js → 1qy_rc3oxfxok.js} +1 -1
  134. package/.next/static/chunks/1zea7qdl-7365.js +1 -0
  135. package/.next/static/chunks/1zvqumkg7kmo0.css +1 -0
  136. package/.next/static/chunks/26hpqt3y6bogl.js +12 -0
  137. package/.next/static/chunks/{3zk6q3-3f9swq.js → 2_j5mqm6d-z18.js} +1 -1
  138. package/.next/static/chunks/{1vj_5bnbxx84e.js → 2dt6tu7a22svs.js} +1 -1
  139. package/.next/static/chunks/2h5ls3d86kya6.js +1 -0
  140. package/.next/static/chunks/2wc6y1ht6dfuy.js +1 -0
  141. package/.next/static/chunks/{1i-u2wzub_to1.js → 2xr0zpll7thyi.js} +6 -6
  142. package/.next/static/chunks/{26ql4y-43xwhp.js → 31jztc-yq30m7.js} +1 -1
  143. package/.next/static/chunks/391af0i8eljzk.js +1 -0
  144. package/.next/static/chunks/{1kp5nfp06nj9h.js → 3p2s2cjokx1aa.js} +2 -2
  145. package/.next/static/chunks/{1wlo979mx-y3w.js → 41s3fml5oivsa.js} +1 -1
  146. package/README.md +60 -19
  147. package/docs/how-it-works.md +2 -0
  148. package/docs/live-calls.md +38 -33
  149. package/features/ai/load-tools.ts +4 -2
  150. package/features/ai/prompts/bot.prompt.ts +5 -5
  151. package/features/ai/prompts/live.prompt.ts +36 -132
  152. package/features/ai/prompts/prompt-helper.ts +5 -4
  153. package/features/ai/prompts/thursday.prompt.ts +75 -54
  154. package/features/ai/tools/call.tool.ts +32 -4
  155. package/features/ai/tools/tool-name.ts +1 -0
  156. package/features/bot/bot.runner.ts +5 -5
  157. package/features/thursday/ascii.const.ts +74 -0
  158. package/features/thursday/components/ascii-orb.tsx +173 -30
  159. package/features/thursday/components/face.tsx +6 -1
  160. package/features/thursday/components/side-captions.tsx +273 -0
  161. package/features/thursday/components/tab-state.tsx +11 -3
  162. package/features/thursday/components/thursday-setting.tsx +6 -5
  163. package/features/thursday/components/thursday.tsx +227 -251
  164. package/features/thursday/face.store.ts +5 -0
  165. package/features/thursday/thursday.action.ts +4 -6
  166. package/features/thursday/thursday.schema.ts +10 -5
  167. package/features/thursday/thursday.store.ts +3 -0
  168. package/features/thursday/use-thursday.ts +461 -392
  169. package/features/workspace/file-kind.ts +9 -0
  170. package/hooks/use-hotkey.ts +3 -2
  171. package/lib/live/live.schema.ts +0 -21
  172. package/lib/live/live.server.ts +1 -3
  173. package/package.json +1 -1
  174. package/scripts/artifact-paths.test.mts +13 -0
  175. package/scripts/live-session.test.mts +56 -66
  176. package/.next/server/chunks/[root-of-the-server]__0g-ueei._.js +0 -8
  177. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1kipdeo._.js +0 -3
  178. package/.next/server/chunks/ssr/[root-of-the-server]__172cq4x._.js +0 -3
  179. package/.next/server/chunks/ssr/_03_928f._.js +0 -3
  180. package/.next/server/chunks/ssr/_0g_rlog._.js +0 -3
  181. package/.next/server/chunks/ssr/_123ttsf._.js +0 -3
  182. package/.next/static/chunks/10k2xvap03z20.css +0 -1
  183. package/.next/static/chunks/1t9qms5pwwa3n.js +0 -1
  184. package/.next/static/chunks/2a51-ywz9b2a3.js +0 -1
  185. package/.next/static/chunks/2fvdgxih7x7hr.js +0 -1
  186. package/.next/static/chunks/3addj3i4-izma.js +0 -1
  187. package/.next/static/chunks/3gfh7nxwusbt0.js +0 -1
  188. package/.next/static/chunks/3gwa44cvz4qoi.js +0 -1
  189. package/.next/static/chunks/3zkg5iup3v4a2.js +0 -12
  190. package/.next/static/chunks/405m0bqtoihev.js +0 -1
  191. /package/.next/static/{0qzGoKn2wTERVZtblX1tp → yyRVBc0xxYQsh3GpbQX9b}/_buildManifest.js +0 -0
  192. /package/.next/static/{0qzGoKn2wTERVZtblX1tp → yyRVBc0xxYQsh3GpbQX9b}/_clientMiddlewareManifest.js +0 -0
  193. /package/.next/static/{0qzGoKn2wTERVZtblX1tp → yyRVBc0xxYQsh3GpbQX9b}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,146538,412294,e=>{"use strict";var t=e.i(843476),a=e.i(689664),n=e.i(716327),s=e.i(758925),i=e.i(271645),o=e.i(798120),r=e.i(167881),l=e.i(736185),h=e.i(463415),d=e.i(23750),c=e.i(349196),m=e.i(609856),u=e.i(283653),p=e.i(265402),g=e.i(6799),f=e.i(95187);let w=(0,f.createServerReference)("7f9063d6960a24f8e17b8914ee4f6630c7fca22456",f.callServer,void 0,f.findSourceMapURL,"startChatGptSignInAction");function y({variant:e}){let[a,n]=(0,i.useState)(!1),s=(0,i.useRef)(null),o=()=>{s.current&&clearInterval(s.current),s.current=null};(0,i.useEffect)(()=>o,[]);let[l,h]=(0,m.useServerAction)(w,{onOk:e=>{let t=window.open(e,"thursday-chatgpt","popup,width=520,height=720");if(!t)return void g.toast.add({type:"error",title:"The sign-in window was blocked",description:"Allow pop-ups for this page, then try again"});n(!0),o();let a=Date.now()+6e5;s.current=setInterval(()=>{!t.closed&&Date.now()<a||(o(),n(!1))},700)}});return(0,t.jsx)(r.Button,{variant:e,loading:h||a,onClick:()=>l(),children:"Sign in with ChatGPT"})}e.s(["ChatGptSignIn",0,y],412294);var v=e.i(611568),b=e.i(566595),x=e.i(7227),k=e.i(630374),S=e.i(421429),M=e.i(647163),j=e.i(968978);let z={anthropic:"anthropic",openai:"openai",google:"google",spacexai:"xai"},A={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"}],cohere:[{d:"M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z"},{d:"M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z"},{d:"M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z"}],deepseek:[{d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"}],"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"}],mistral:[{d:"M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z"}],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 L({owner:e,className:a}){let n=z[e];if(n)return(0,t.jsx)(j.ProviderIcon,{provider:n,className:a});let s=A[e];return s?(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:a,"aria-hidden":"true",children:s.map(e=>(0,t.jsx)("path",{d:e.d,opacity:e.opacity},e.d))}):null}function T({models:e,kind:a,value:n,loading:s,onPick:o}){let[l,h]=(0,i.useState)(!1),[c,m]=(0,i.useState)(""),[u,g]=(0,i.useState)("cheap"),[f,w]=(0,i.useState)(n),y=e.filter(e=>e.type===(a??p.GATEWAY_TEXT)),j=a?y:y.filter(e=>e.tags.includes(p.GATEWAY_TOOL_USE)),z=c.trim().toLowerCase(),A=(z?j.filter(e=>`${e.id} ${e.label}`.toLowerCase().includes(z)):j).slice().sort(N[u].compare);return(0,t.jsxs)(k.Dialog,{open:l,onOpenChange:e=>{h(e),e?w(n):m("")},children:[(0,t.jsxs)(k.DialogTrigger,{render:(0,t.jsx)("button",{type:"button","aria-label":"Model",className:(0,M.cn)(d.inputClassName,"relative flex items-center pr-8 text-left font-mono text-sm")}),children:[(0,t.jsx)("span",{className:(0,M.cn)("min-w-0 flex-1 truncate",!n&&"font-sans text-muted-foreground"),children:n||"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:s&&0===j.length?(0,t.jsx)(v.LoaderCircle,{className:"size-3.5 animate-spin"}):(0,t.jsx)(b.Search,{className:"size-3.5"})})]}),(0,t.jsx)(k.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)(k.DialogTitle,{className:"flex items-center gap-2.5 text-xl font-semibold",children:[(0,t.jsx)(x.VercelIcon,{className:"size-3.5"}),a?O[a]:"Text"," models"]}),(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:z?`${A.length} matching “${c.trim()}”`:a?`${j.length} on the gateway`:`${j.length} of ${y.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)(b.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)(d.Input,{autoFocus:!0,"aria-label":"Search models",placeholder:"name, id or provider",spellCheck:!1,value:c,onChange:e=>m(e.target.value),className:"h-8 pl-8 font-mono text-xs"})]}),(0,t.jsx)(S.Segmented,{"aria-label":"Sort",options:E,value:u,onChange:g})]}),(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:[A.map(e=>(0,t.jsx)(_,{model:e,picked:e.id===f,onPick:()=>w(e.id)},e.id)),0===A.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:z?`Nothing matches “${c.trim()}”.`:"Nothing on the shelf — search for an id."}),z&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(r.Button,{size:"sm",onClick:()=>w(c.trim()),children:["Use “",c.trim(),"” as the id"]}),(0,t.jsx)(r.Button,{variant:"outline",size:"sm",onClick:()=>m(""),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:f||"Nothing picked — the field keeps what it has"}),(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>h(!1),children:"Cancel"}),(0,t.jsx)(r.Button,{disabled:!f,onClick:()=>{o(f),h(!1)},children:"Use this model"})]})]})})]})}let O={image:"Image",video:"Video",speech:"Speech",transcription:"Transcription"},N={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)}},E=Object.keys(N).map(e=>({value:e,label:N[e].label,title:N[e].title})),V=e=>e>=1?e.toFixed(2):String(Number(e.toFixed(4)));function _({model:e,picked:n,onPick:s}){let{price:i}=e,o=null!==i.in||null!==i.out;return(0,t.jsxs)("button",{type:"button",onClick:s,className:(0,M.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",n?"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)(L,{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,M.cn)("truncate text-[13px]",n&&"font-medium"),children:e.label}),n&&(0,t.jsx)(a.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,M.cn)("font-mono text-xs",o||i.free?"text-foreground":"text-muted-foreground"),children:i.free?"free":null===i.in&&null===i.out?i.note??"—":`${null===i.in?"—":V(i.in)} / ${null===i.out?"—":V(i.out)}`}),o&&i.note&&(0,t.jsx)("span",{className:"font-mono text-[9px] text-muted-foreground/70",children:i.note})]})]})}function I({provider:e,onSaved:a}){let[n,s]=(0,i.useState)(""),[l,h]=(0,m.useServerAction)(c.setConfigAction,{okMessage:`${e.label} key saved`,onOk:()=>{(0,u.revalidate)(o.queryKey.llmModel),(0,u.revalidate)(o.queryKey.config),a()}});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)(y,{variant:"outline"})]}):(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(d.Input,{value:n,onChange:e=>s(e.target.value),placeholder:e.apiKeyName,spellCheck:!1,type:"password"}),(0,t.jsx)(r.Button,{variant:"outline",loading:h,disabled:n.trim().length<8,onClick:()=>l(e.apiKeyName,n),children:"Save key"})]})}e.s(["ModelPicker",0,function({provider:e,model:i,kind:d,unset:c,onChange:m}){let{data:g=[],mutate:f}=(0,u.useServerRoute)(o.queryKey.llmModel),w=d?g.filter(e=>(0,p.canMakeKind)(e.id,d)):g,y=w.find(t=>t.id===e),v="vercel-ai-gateway"===e,b=(0,u.useServerRoute)(v&&o.queryKey.modelCatalog),x=(d&&y?p.MEDIA_MODEL_PROVIDERS[y.id]?.models[d]??[]:y?.suggestModels??[]).map(e=>({value:e.id,label:e.label,badge:e.tier,hint:e.id}));return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(h.DropdownMenu,{children:[(0,t.jsxs)(h.DropdownMenuTrigger,{render:(0,t.jsx)(r.Button,{variant:"outline",className:"shrink-0"}),children:[y?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.ProviderIcon,{provider:y.id,className:"size-4"}),y.label]}):(0,t.jsx)("span",{className:"text-muted-foreground",children:c??(d?"Not picked":"App default")}),(0,t.jsx)(n.ChevronDown,{className:"size-3.5 text-muted-foreground"})]}),(0,t.jsx)(h.DropdownMenuContent,{align:"start",children:w.map(n=>(0,t.jsxs)(h.DropdownMenuItem,{onClick:()=>m({provider:n.id,model:""}),children:[(0,t.jsx)(j.ProviderIcon,{provider:n.id,className:"size-4"}),n.label,n.hasKey?n.id===e&&(0,t.jsx)(a.Check,{className:"ml-auto size-3.5"}):(0,t.jsx)(s.KeyRound,{className:"ml-auto size-3 text-muted-foreground"})]},n.id))})]}),v&&y&&!b.error?(0,t.jsx)(T,{models:b.data??[],kind:d,value:i,loading:b.isLoading,onPick:e=>m({provider:y.id,model:e})}):(0,t.jsx)(l.Combobox,{value:i,onChange:e=>y&&m({provider:y.id,model:e}),options:x,disabled:!y?.hasKey,"aria-label":"Model",placeholder:y?"Type a model id":"Pick a provider",empty:b.error?"Could not read the catalog — type an id":"Not on the list — it still runs",className:"flex-1"})]}),y&&!y.hasKey&&(0,t.jsx)(I,{provider:y,onSaved:()=>f()}),v&&b.error&&(0,t.jsx)("p",{className:"px-1 font-mono text-[11px] text-destructive",children:b.error.message})]})}],146538)},451888,504565,553429,e=>{"use strict";var t=e.i(722219);e.s(["default",0,t],504565);var t=t,a=e.i(265402),n=e.i(245629),s=e.i(981203),i=e.i(864723),o=e.i(681307);o.z.object({to:o.z.string().trim().min(1),text:o.z.string().trim().min(1),kind:o.z.enum(["message","question"]).default("message"),options:o.z.array(o.z.string().trim().min(1)).nullish(),replyTo:o.z.string().nullish()});let r=o.z.enum(["queued","running","waiting","external","paused","done","cancelled"]),l=o.z.object({bot:o.z.string(),state:r}),h=o.z.object({id:o.z.string(),bot:o.z.string(),text:o.z.string(),options:o.z.string().array().optional()}),d="Thursday",c=o.z.object({participants:l.array(),questions:h.array(),deliveries:o.z.object({id:o.z.string(),bot:o.z.string(),text:o.z.string(),delivered:o.z.boolean()}).array(),relays:o.z.object({id:o.z.number(),bot:o.z.string(),text:o.z.string(),kind:o.z.enum(["message","question","report","interrupted"]),messageId:o.z.string().nullable()}).array()});e.s(["ROOM_THURSDAY",0,d,"RoomViewSchema",0,c],553429);let m=t.object({color:t.string().regex(/^(#[0-9a-fA-F]{6}|currentColor)$/,"Hex color").optional(),shape:t.enum(i.MARK_SHAPES).optional(),outline:t.boolean().optional(),paint:t.enum(i.MARK_PAINT_IDS).optional()}),u=t.string().max(s.COMMON_VALIDATE.prompt.max);function p(e){return(0,i.randomMarkFills)(e).map(e=>({...e,shape:i.MARK_SHAPES[Math.floor(Math.random()*i.MARK_SHAPES.length)]}))}let g=t.object({id:t.number(),name:t.string(),serverName:t.string()}),f=t.string().trim().transform(e=>e.replace(/\s+/g," ")).refine(e=>e.toLowerCase()!==d.toLowerCase(),"Thursday is reserved for the voice assistant.").pipe(t.string().min(1,"A name is required").max(s.COMMON_VALIDATE.name.max)),w=t.object({input:t.number(),output:t.number()});t.object({name:t.string(),description:t.string(),systemPrompt:t.string().nullish(),icon:m.nullish(),provider:a.textModelProviderSchema.nullish(),model:t.string().nullish(),compactAt:t.number().nullish(),disabled:t.boolean(),createdAt:n.DateLikeSchema,tools:g.array().default([]),tokens:w,lastJobAt:n.DateLikeSchema.nullish()}),t.object({name:f,description:t.string().trim().min(1,"Say what this bot is for").max(s.COMMON_VALIDATE.description.max),systemPrompt:u.optional(),icon:m.optional(),provider:a.textModelProviderSchema.nullish(),model:t.string().trim().max(80).nullish(),compactAt:t.coerce.number().int().min(8e3,"At least 8k").nullish(),disabled:t.boolean().optional(),toolIds:t.number().int().array().max(10).default([])}),t.object({file:t.string(),path:t.string(),line:t.string(),at:n.DateLikeSchema,bytes:t.number()});let y="Continue",v=t.discriminatedUnion("type",[t.object({type:t.literal("text"),text:t.string()}),t.object({type:t.literal("image"),src:t.string()})]),b=t.object({id:t.string(),seq:t.number(),bot:t.string().nullable(),parent:t.string().nullable(),to:t.string().nullish(),at:n.DateLikeSchema}),x=t.discriminatedUnion("kind",[b.extend({kind:t.literal("user"),text:t.string()}),b.extend({kind:t.literal("text"),text:t.string()}),b.extend({kind:t.literal("note"),text:t.string()}),b.extend({kind:t.literal("stop"),text:t.string()}),b.extend({kind:t.literal("tool"),callId:t.string(),name:t.string(),input:t.string(),note:t.string().nullish(),path:t.string().nullish()}),b.extend({kind:t.literal("tool-result"),callId:t.string(),name:t.string(),results:v.array(),more:t.boolean()}),b.extend({kind:t.literal("ask"),callId:t.string(),to:t.string(),text:t.string(),question:t.boolean().optional()})]),k=t.object({question:t.string(),messageId:t.string().optional(),bot:t.string().optional(),options:t.string().array(),auto:t.boolean()});t.object({id:t.string(),bot:t.string(),label:t.string(),request:t.string(),status:t.enum(["running","waiting","done","cancelled"]),outcome:t.string().nullable(),ask:k.nullable(),seen:t.boolean(),tokens:w,contextTokens:t.number(),contextBudget:t.number(),createdAt:n.DateLikeSchema,updatedAt:n.DateLikeSchema,lines:x.array(),room:c}),e.s(["DEFAULT_BOT",0,{name:"Jarvis",description:"Anything — this computer, a browser, the web, files, services",systemPrompt:null,icon:{color:"#14B8A6",shape:"squircle"},provider:null,model:null,disabled:!1,compactAt:null},"MAX_PINNED_TOOLS",0,10,"THREAD_CONTINUE",0,y,"botIconSchema",0,m,"isAppStop",0,e=>{let t=e?.options??[];return!e?.messageId&&1===t.length&&t[0]===y},"needsThreadReply",0,e=>"waiting"===e.status||e.room.questions.length>0,"randomBotIcon",0,()=>p(1)[0],"randomBotIcons",0,p],451888)},257790,463625,e=>{"use strict";var t=e.i(95187);let a=(0,t.createServerReference)("7f715086ad9fe6863a53cb04b7ff210ffdcd44d4da",t.callServer,void 0,t.findSourceMapURL,"createSeedBotsAction");e.s(["createSeedBotsAction",0,a],257790);var n=e.i(41533),s=e.i(213377),i=e.i(451888);let o=[{name:"Jarvis",description:"Anything nobody else is for — orders, bookings, forms, the web, this computer",hint:"Takes whatever nobody else is for",recommended:!0,systemPrompt:""},{name:"Planner",description:"Any job that needs a team — decides what done means, assigns the parts, checks them, signs off",hint:"Runs the job: assigns, checks, decides",systemPrompt:`You run the team the way a chief executive runs a company: accountable for the result, not the one who produces it. A job comes in as a request and goes out as one finished result. Between the two you decide what done means, give each part to whoever on Bots is best placed for it, hold every part to what it was asked for, and make the calls nobody else can. A part is yours only when nobody on Bots fits it.
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,146538,412294,e=>{"use strict";var t=e.i(843476),a=e.i(689664),n=e.i(716327),s=e.i(758925),i=e.i(271645),o=e.i(798120),r=e.i(167881),l=e.i(736185),h=e.i(463415),d=e.i(23750),c=e.i(981577),m=e.i(609856),u=e.i(283653),p=e.i(265402),g=e.i(6799),f=e.i(95187);let w=(0,f.createServerReference)("7f01514ec9c15f2e0d83fce157779d74a52b9c739f",f.callServer,void 0,f.findSourceMapURL,"startChatGptSignInAction");function y({variant:e}){let[a,n]=(0,i.useState)(!1),s=(0,i.useRef)(null),o=()=>{s.current&&clearInterval(s.current),s.current=null};(0,i.useEffect)(()=>o,[]);let[l,h]=(0,m.useServerAction)(w,{onOk:e=>{let t=window.open(e,"thursday-chatgpt","popup,width=520,height=720");if(!t)return void g.toast.add({type:"error",title:"The sign-in window was blocked",description:"Allow pop-ups for this page, then try again"});n(!0),o();let a=Date.now()+6e5;s.current=setInterval(()=>{!t.closed&&Date.now()<a||(o(),n(!1))},700)}});return(0,t.jsx)(r.Button,{variant:e,loading:h||a,onClick:()=>l(),children:"Sign in with ChatGPT"})}e.s(["ChatGptSignIn",0,y],412294);var v=e.i(611568),b=e.i(566595),x=e.i(7227),k=e.i(630374),S=e.i(421429),M=e.i(647163),j=e.i(968978);let z={anthropic:"anthropic",openai:"openai",google:"google",spacexai:"xai"},A={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"}],cohere:[{d:"M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z"},{d:"M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z"},{d:"M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z"}],deepseek:[{d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"}],"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"}],mistral:[{d:"M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z"}],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 L({owner:e,className:a}){let n=z[e];if(n)return(0,t.jsx)(j.ProviderIcon,{provider:n,className:a});let s=A[e];return s?(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:a,"aria-hidden":"true",children:s.map(e=>(0,t.jsx)("path",{d:e.d,opacity:e.opacity},e.d))}):null}function T({models:e,kind:a,value:n,loading:s,onPick:o}){let[l,h]=(0,i.useState)(!1),[c,m]=(0,i.useState)(""),[u,g]=(0,i.useState)("cheap"),[f,w]=(0,i.useState)(n),y=e.filter(e=>e.type===(a??p.GATEWAY_TEXT)),j=a?y:y.filter(e=>e.tags.includes(p.GATEWAY_TOOL_USE)),z=c.trim().toLowerCase(),A=(z?j.filter(e=>`${e.id} ${e.label}`.toLowerCase().includes(z)):j).slice().sort(N[u].compare);return(0,t.jsxs)(k.Dialog,{open:l,onOpenChange:e=>{h(e),e?w(n):m("")},children:[(0,t.jsxs)(k.DialogTrigger,{render:(0,t.jsx)("button",{type:"button","aria-label":"Model",className:(0,M.cn)(d.inputClassName,"relative flex items-center pr-8 text-left font-mono text-sm")}),children:[(0,t.jsx)("span",{className:(0,M.cn)("min-w-0 flex-1 truncate",!n&&"font-sans text-muted-foreground"),children:n||"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:s&&0===j.length?(0,t.jsx)(v.LoaderCircle,{className:"size-3.5 animate-spin"}):(0,t.jsx)(b.Search,{className:"size-3.5"})})]}),(0,t.jsx)(k.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)(k.DialogTitle,{className:"flex items-center gap-2.5 text-xl font-semibold",children:[(0,t.jsx)(x.VercelIcon,{className:"size-3.5"}),a?O[a]:"Text"," models"]}),(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:z?`${A.length} matching “${c.trim()}”`:a?`${j.length} on the gateway`:`${j.length} of ${y.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)(b.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)(d.Input,{autoFocus:!0,"aria-label":"Search models",placeholder:"name, id or provider",spellCheck:!1,value:c,onChange:e=>m(e.target.value),className:"h-8 pl-8 font-mono text-xs"})]}),(0,t.jsx)(S.Segmented,{"aria-label":"Sort",options:E,value:u,onChange:g})]}),(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:[A.map(e=>(0,t.jsx)(_,{model:e,picked:e.id===f,onPick:()=>w(e.id)},e.id)),0===A.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:z?`Nothing matches “${c.trim()}”.`:"Nothing on the shelf — search for an id."}),z&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(r.Button,{size:"sm",onClick:()=>w(c.trim()),children:["Use “",c.trim(),"” as the id"]}),(0,t.jsx)(r.Button,{variant:"outline",size:"sm",onClick:()=>m(""),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:f||"Nothing picked — the field keeps what it has"}),(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>h(!1),children:"Cancel"}),(0,t.jsx)(r.Button,{disabled:!f,onClick:()=>{o(f),h(!1)},children:"Use this model"})]})]})})]})}let O={image:"Image",video:"Video",speech:"Speech",transcription:"Transcription"},N={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)}},E=Object.keys(N).map(e=>({value:e,label:N[e].label,title:N[e].title})),V=e=>e>=1?e.toFixed(2):String(Number(e.toFixed(4)));function _({model:e,picked:n,onPick:s}){let{price:i}=e,o=null!==i.in||null!==i.out;return(0,t.jsxs)("button",{type:"button",onClick:s,className:(0,M.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",n?"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)(L,{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,M.cn)("truncate text-[13px]",n&&"font-medium"),children:e.label}),n&&(0,t.jsx)(a.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,M.cn)("font-mono text-xs",o||i.free?"text-foreground":"text-muted-foreground"),children:i.free?"free":null===i.in&&null===i.out?i.note??"—":`${null===i.in?"—":V(i.in)} / ${null===i.out?"—":V(i.out)}`}),o&&i.note&&(0,t.jsx)("span",{className:"font-mono text-[9px] text-muted-foreground/70",children:i.note})]})]})}function I({provider:e,onSaved:a}){let[n,s]=(0,i.useState)(""),[l,h]=(0,m.useServerAction)(c.setConfigAction,{okMessage:`${e.label} key saved`,onOk:()=>{(0,u.revalidate)(o.queryKey.llmModel),(0,u.revalidate)(o.queryKey.config),a()}});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)(y,{variant:"outline"})]}):(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(d.Input,{value:n,onChange:e=>s(e.target.value),placeholder:e.apiKeyName,spellCheck:!1,type:"password"}),(0,t.jsx)(r.Button,{variant:"outline",loading:h,disabled:n.trim().length<8,onClick:()=>l(e.apiKeyName,n),children:"Save key"})]})}e.s(["ModelPicker",0,function({provider:e,model:i,kind:d,unset:c,onChange:m}){let{data:g=[],mutate:f}=(0,u.useServerRoute)(o.queryKey.llmModel),w=d?g.filter(e=>(0,p.canMakeKind)(e.id,d)):g,y=w.find(t=>t.id===e),v="vercel-ai-gateway"===e,b=(0,u.useServerRoute)(v&&o.queryKey.modelCatalog),x=(d&&y?p.MEDIA_MODEL_PROVIDERS[y.id]?.models[d]??[]:y?.suggestModels??[]).map(e=>({value:e.id,label:e.label,badge:e.tier,hint:e.id}));return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(h.DropdownMenu,{children:[(0,t.jsxs)(h.DropdownMenuTrigger,{render:(0,t.jsx)(r.Button,{variant:"outline",className:"shrink-0"}),children:[y?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.ProviderIcon,{provider:y.id,className:"size-4"}),y.label]}):(0,t.jsx)("span",{className:"text-muted-foreground",children:c??(d?"Not picked":"App default")}),(0,t.jsx)(n.ChevronDown,{className:"size-3.5 text-muted-foreground"})]}),(0,t.jsx)(h.DropdownMenuContent,{align:"start",children:w.map(n=>(0,t.jsxs)(h.DropdownMenuItem,{onClick:()=>m({provider:n.id,model:""}),children:[(0,t.jsx)(j.ProviderIcon,{provider:n.id,className:"size-4"}),n.label,n.hasKey?n.id===e&&(0,t.jsx)(a.Check,{className:"ml-auto size-3.5"}):(0,t.jsx)(s.KeyRound,{className:"ml-auto size-3 text-muted-foreground"})]},n.id))})]}),v&&y&&!b.error?(0,t.jsx)(T,{models:b.data??[],kind:d,value:i,loading:b.isLoading,onPick:e=>m({provider:y.id,model:e})}):(0,t.jsx)(l.Combobox,{value:i,onChange:e=>y&&m({provider:y.id,model:e}),options:x,disabled:!y?.hasKey,"aria-label":"Model",placeholder:y?"Type a model id":"Pick a provider",empty:b.error?"Could not read the catalog — type an id":"Not on the list — it still runs",className:"flex-1"})]}),y&&!y.hasKey&&(0,t.jsx)(I,{provider:y,onSaved:()=>f()}),v&&b.error&&(0,t.jsx)("p",{className:"px-1 font-mono text-[11px] text-destructive",children:b.error.message})]})}],146538)},451888,504565,553429,e=>{"use strict";var t=e.i(722219);e.s(["default",0,t],504565);var t=t,a=e.i(265402),n=e.i(245629),s=e.i(981203),i=e.i(864723),o=e.i(681307);o.z.object({to:o.z.string().trim().min(1),text:o.z.string().trim().min(1),kind:o.z.enum(["message","question"]).default("message"),options:o.z.array(o.z.string().trim().min(1)).nullish(),replyTo:o.z.string().nullish()});let r=o.z.enum(["queued","running","waiting","external","paused","done","cancelled"]),l=o.z.object({bot:o.z.string(),state:r}),h=o.z.object({id:o.z.string(),bot:o.z.string(),text:o.z.string(),options:o.z.string().array().optional()}),d="Thursday",c=o.z.object({participants:l.array(),questions:h.array(),deliveries:o.z.object({id:o.z.string(),bot:o.z.string(),text:o.z.string(),delivered:o.z.boolean()}).array(),relays:o.z.object({id:o.z.number(),bot:o.z.string(),text:o.z.string(),kind:o.z.enum(["message","question","report","interrupted"]),messageId:o.z.string().nullable()}).array()});e.s(["ROOM_THURSDAY",0,d,"RoomViewSchema",0,c],553429);let m=t.object({color:t.string().regex(/^(#[0-9a-fA-F]{6}|currentColor)$/,"Hex color").optional(),shape:t.enum(i.MARK_SHAPES).optional(),outline:t.boolean().optional(),paint:t.enum(i.MARK_PAINT_IDS).optional()}),u=t.string().max(s.COMMON_VALIDATE.prompt.max);function p(e){return(0,i.randomMarkFills)(e).map(e=>({...e,shape:i.MARK_SHAPES[Math.floor(Math.random()*i.MARK_SHAPES.length)]}))}let g=t.object({id:t.number(),name:t.string(),serverName:t.string()}),f=t.string().trim().transform(e=>e.replace(/\s+/g," ")).refine(e=>e.toLowerCase()!==d.toLowerCase(),"Thursday is reserved for the voice assistant.").pipe(t.string().min(1,"A name is required").max(s.COMMON_VALIDATE.name.max)),w=t.object({input:t.number(),output:t.number()});t.object({name:t.string(),description:t.string(),systemPrompt:t.string().nullish(),icon:m.nullish(),provider:a.textModelProviderSchema.nullish(),model:t.string().nullish(),compactAt:t.number().nullish(),disabled:t.boolean(),createdAt:n.DateLikeSchema,tools:g.array().default([]),tokens:w,lastJobAt:n.DateLikeSchema.nullish()}),t.object({name:f,description:t.string().trim().min(1,"Say what this bot is for").max(s.COMMON_VALIDATE.description.max),systemPrompt:u.optional(),icon:m.optional(),provider:a.textModelProviderSchema.nullish(),model:t.string().trim().max(80).nullish(),compactAt:t.coerce.number().int().min(8e3,"At least 8k").nullish(),disabled:t.boolean().optional(),toolIds:t.number().int().array().max(10).default([])}),t.object({file:t.string(),path:t.string(),line:t.string(),at:n.DateLikeSchema,bytes:t.number()});let y="Continue",v=t.discriminatedUnion("type",[t.object({type:t.literal("text"),text:t.string()}),t.object({type:t.literal("image"),src:t.string()})]),b=t.object({id:t.string(),seq:t.number(),bot:t.string().nullable(),parent:t.string().nullable(),to:t.string().nullish(),at:n.DateLikeSchema}),x=t.discriminatedUnion("kind",[b.extend({kind:t.literal("user"),text:t.string()}),b.extend({kind:t.literal("text"),text:t.string()}),b.extend({kind:t.literal("note"),text:t.string()}),b.extend({kind:t.literal("stop"),text:t.string()}),b.extend({kind:t.literal("tool"),callId:t.string(),name:t.string(),input:t.string(),note:t.string().nullish(),path:t.string().nullish()}),b.extend({kind:t.literal("tool-result"),callId:t.string(),name:t.string(),results:v.array(),more:t.boolean()}),b.extend({kind:t.literal("ask"),callId:t.string(),to:t.string(),text:t.string(),question:t.boolean().optional()})]),k=t.object({question:t.string(),messageId:t.string().optional(),bot:t.string().optional(),options:t.string().array(),auto:t.boolean()});t.object({id:t.string(),bot:t.string(),label:t.string(),request:t.string(),status:t.enum(["running","waiting","done","cancelled"]),outcome:t.string().nullable(),ask:k.nullable(),seen:t.boolean(),tokens:w,contextTokens:t.number(),contextBudget:t.number(),createdAt:n.DateLikeSchema,updatedAt:n.DateLikeSchema,lines:x.array(),room:c}),e.s(["DEFAULT_BOT",0,{name:"Jarvis",description:"Anything — this computer, a browser, the web, files, services",systemPrompt:null,icon:{color:"#14B8A6",shape:"squircle"},provider:null,model:null,disabled:!1,compactAt:null},"MAX_PINNED_TOOLS",0,10,"THREAD_CONTINUE",0,y,"botIconSchema",0,m,"isAppStop",0,e=>{let t=e?.options??[];return!e?.messageId&&1===t.length&&t[0]===y},"needsThreadReply",0,e=>"waiting"===e.status||e.room.questions.length>0,"randomBotIcon",0,()=>p(1)[0],"randomBotIcons",0,p],451888)},531699,463625,e=>{"use strict";var t=e.i(95187);let a=(0,t.createServerReference)("7f37f5a1a9230f7fde616aea41c384ce3d489abd23",t.callServer,void 0,t.findSourceMapURL,"createSeedBotsAction");e.s(["createSeedBotsAction",0,a],531699);var n=e.i(41533),s=e.i(213377),i=e.i(451888);let o=[{name:"Jarvis",description:"Anything nobody else is for — orders, bookings, forms, the web, this computer",hint:"Takes whatever nobody else is for",recommended:!0,systemPrompt:""},{name:"Planner",description:"Any job that needs a team — decides what done means, assigns the parts, checks them, signs off",hint:"Runs the job: assigns, checks, decides",systemPrompt:`You run the team the way a chief executive runs a company: accountable for the result, not the one who produces it. A job comes in as a request and goes out as one finished result. Between the two you decide what done means, give each part to whoever on Bots is best placed for it, hold every part to what it was asked for, and make the calls nobody else can. A part is yours only when nobody on Bots fits it.
2
2
 
3
3
  **Decide what done means, first.** Before anything is handed out, send Thursday one \`${s.TOOL_NAMES.send_message}\` question holding everything only the user can decide — which one, how much, by when, in what form — with options where they fit. What you can find out, or the request already says, is not asked. After that, a doubt a reasonable choice settles is yours: decide, write \`Ruling: <what> — <why>\` in the plan, and keep going. Only what cannot be undone goes back to Thursday.
4
4
 
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,736185,186698,611568,e=>{"use strict";var t=e.i(843476);e.s([],148099),e.i(148099);var n=e.i(271645),r=e.i(733332),l=e.i(951437),i=e.i(146376),a=e.i(667865),o=e.i(828918),u=e.i(446265),s=e.i(502077),c=e.i(388940),d=e.i(301252),p=e.i(956789),f=e.i(229315),g=e.i(17989),m=e.i(265858),v=e.i(260891),x=e.i(385689),h=e.i(621082);function S(e,t,n,r,l,i,a,o,u,s=2){let c=(0,h.getGridNavigatedIndex)(n.current,{event:e,orientation:r,loopFocus:l,rtl:i,cols:s,disabledIndices:a,minIndex:o,maxIndex:u,prevIndex:t>u?o:t,stopEvent:!0});return(0,h.isIndexOutOfListBounds)(n.current,c)?void 0:c}var C=e.i(584446),b=e.i(675606),E=e.i(56434);let I=n.createContext(void 0),R=n.createContext(void 0),y=n.createContext(void 0),L=n.createContext(!1),O=n.createContext("");function A(){let e=n.useContext(I);if(!e)throw Error((0,r.default)(22));return e}function w(){let e=n.useContext(R);if(!e)throw Error((0,r.default)(23));return e}function M(){let e=n.useContext(y);if(!e)throw Error((0,r.default)(24));return e}function P(){return n.useContext(O)}let N=(e,t)=>Object.is(e,t);function j(e,t,n){return null==e||null==t?Object.is(e,t):n(e,t)}function k(e,t,n){return!!e&&e.some(e=>void 0!==e&&j(t,e,n))}function D(e,t,n){return e?e.findIndex(e=>void 0!==e&&j(e,t,n)):-1}function V(e,t,n,r){let l=r&&Array.isArray(t)?e.findIndex(function(e,t){if(t!==N)return n=>k(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(0!==t||e.some(e=>Object.is(t,e)))}(t,n)):D(e,t,n);return -1===l?null:l}function T(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}function F(e){var t;return"object"==typeof(t=e?.[0])&&null!=t&&Array.isArray(t.items)}function B(e){return F(e)?e.flatMap(e=>e.items):e}function H(e,t){if(t&&null!=e)return t(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return T(e)}function z(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?T(e.value):T(e)}e.s(["serializeValue",0,T],186698);let q={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectionChips:e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0},hasSelectedValue:e=>{let{selectedValue:t,selectionMode:n}=e;return null!=t&&(!("multiple"===n&&Array.isArray(t))||t.length>0)},hasNullItemLabel:(e,t)=>!!t&&function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(F(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1}(e.items),open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>j(t,e,n)):j(t,r,n)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemProps:e=>e.itemProps,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight};var Y=e.i(137584),_=e.i(469690),G=e.i(381104),U=e.i(884708),W=e.i(538489);function K(e){return null==e?void 0:`${e}-popup`}let $=new Map,J=function(e={}){let t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${function e(t){return Array.isArray(t)?t.map(t=>e(t)).join(","):null==t?"":String(t)}(e.locale)}|${JSON.stringify(t)}`,r=$.get(n);if(r)return r;let l=new Intl.Collator(e.locale,t),i={contains(e,t,n){if(!t)return!0;let r=H(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(0===l.compare(r.slice(e,e+t.length),t))return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=H(e,n);return 0===l.compare(r.slice(0,t.length),t)},endsWith(e,t,n){if(!t)return!0;let r=H(e,n),i=t.length;return r.length>=i&&0===l.compare(r.slice(r.length-i),t)}};return $.set(n,i),i};var Q=e.i(223910),X=e.i(32199),Z=e.i(606039),ee=e.i(264111),et=e.i(176782);let en=Symbol("none"),er={value:en,index:-1};var el=e.i(872855);function ei(e){let h,A,{id:w,onOpenChangeComplete:M,defaultSelectedValue:P=null,selectedValue:T,onSelectedValueChange:K,defaultInputValue:$,inputValue:ei,open:ea,defaultOpen:eo=!1,selectionMode:eu,onItemHighlighted:es,name:ec,form:ed,disabled:ep=!1,readOnly:ef=!1,required:eg=!1,inputRef:em,grid:ev=!1,items:ex,filteredItems:eh,filter:eS,filterQuery:eC,openOnInputClick:eb=!0,autoHighlight:eE=!1,keepHighlight:eI=!1,highlightItemOnHover:eR=!0,loopFocus:ey=!0,itemToStringLabel:eL,itemToStringValue:eO,isItemEqualToValue:eA=N,virtualized:ew=!1,inline:eM=!1,fillInputOnItemPress:eP=!0,modal:eN=!1,limit:ej=-1,autoComplete:ek="list",formAutoComplete:eD,locale:eV,submitOnItemClick:eT=!1}=e,{clearErrors:eF}=(0,U.useFormContext)(),{setDirty:eB,validityData:eH,setFilled:ez,name:eq,disabled:eY,setTouched:e_,setFocused:eG,validationMode:eU,validation:eW}=(0,_.useFieldRootContext)(),eK=(0,el.useDirection)(),e$=(0,W.useLabelableId)({id:w}),eJ=J({locale:eV}),eQ=Array.isArray(ex)?null:ex;if(eQ&&"function"!=typeof eQ.label)throw Error((0,r.default)(100));let eX=eQ?eQ.data:ex,eZ=eQ?.value,e0=eZ?void 0:eX,e1=n.useMemo(()=>{let e;if(!eh||!eZ)return;let t=B(eh),n=t.map(eZ);return{values:n,findItem(r,l){if(!e){e=new Map;for(let r=0;r<n.length;r+=1)e.has(n[r])||e.set(n[r],t[r])}var i=e;let a=i.get(r);if(void 0!==a||l===N)return a;for(let[e,t]of i)if(j(e,r,l))return t}}},[eh,eZ]),e5=n.useMemo(()=>eQ?e=>eQ.label(e,eA,e=>{let t=e1?.findItem(e,eA);return null!=t?eQ.itemLabel(t):H(e,eL)}):eL,[eQ,eL,e1,eA]),e9=n.useMemo(()=>eQ?Object.assign(e=>eQ.itemLabel(e),{selected:e=>H(e,e5)}):eL,[eQ,e5,eL]);function e2(e){return H(e,e5)}let[e7,e4]=n.useState(!1),[e3,e8]=n.useState(null),e6=n.useRef(e3),te=n.useRef([]),tt=n.useRef([]),tn=n.useRef(null),tr=n.useRef(null),tl=n.useRef(null),ti=n.useRef(null),ta=n.useRef(null),to=n.useRef(!0),tu=n.useRef(!1),ts=n.useRef(null),tc=n.useRef(null),td=n.useRef(null),tp=n.useRef(er),tf=n.useRef(null),tg=n.useRef([]),tm=n.useRef(null),tv=eY||ep,tx=eq??ec,th="multiple"===eu,tS="single"===eu,tC=void 0!==ei||void 0!==$,tb=void 0!==eX,tE=void 0!==eh;h="always"===eE?"always":!!eE&&"input-change";let[tI,tR]=(0,l.useControlled)({controlled:T,default:th?P??p.EMPTY_ARRAY:P,name:"Combobox",state:"selectedValue"}),ty=n.useMemo(()=>null===eS?()=>!0:void 0!==eS?eS:(e,t)=>null!=e&&eJ.contains(e,t,e9),[eS,eJ,e9]),tL=(0,c.useRefWithInit)(()=>tC?$??"":tS?e2(tI):"").current,[tO,tA]=(0,l.useControlled)({controlled:ei,default:tL,name:"Combobox",state:"inputValue"}),[tw,tM]=(0,l.useControlled)({controlled:ea,default:eo,name:"Combobox",state:"open"}),tP=F(eX),tN=tw||null===e3?String(tO).trim():e3,tj=tS?e2(tI):"",tk=tS&&!e7&&""!==tN&&tj.length===tN.length&&eJ.contains(tj,tN),tD=tk?"":eC??tN,tV=tb&&tE&&tk&&(!eQ||eQ.hasValue(tI,eA)),tT=n.useMemo(()=>eX?B(eX):p.EMPTY_ARRAY,[eX]),tF=n.useMemo(()=>{if(eh&&!tV)return eh;if(!eX)return p.EMPTY_ARRAY;if(tP){let e=[],t=0;for(let n of eX){if(ej>-1&&t>=ej)break;let r=ej>-1?ej-t:1/0,l=""===tD?n.items.slice(0,r):[];if(""!==tD)for(let e of n.items){if(l.length>=r)break;ty(e,tD,e9)&&l.push(e)}if(l.length>0){let r={...n,items:l};e.push(r),t+=l.length}}return e}if(""===tD)return ej>-1?tT.slice(0,ej):tT;let e=[];for(let t of tT){if(ej>-1&&e.length>=ej)break;ty(t,tD,e9)&&e.push(t)}return e},[eh,tV,eX,tP,tD,ej,ty,e9,tT]),tB=n.useMemo(()=>{if(e1&&tF===eh)return e1.values;let e=B(tF);return eZ?e.map(e=>eZ(e)):e},[tF,eh,e1,eZ]),tH=(0,c.useRefWithInit)(()=>{let e=null;return eM&&tw&&tb&&"none"!==eu&&(e=V(tB,tI,eA,th)),new d.ReactStore({id:e$,labelId:void 0,selectedValue:tI,open:tw,items:e0,selectionMode:eu,name:tx,form:ed,disabled:tv,readOnly:ef,required:eg,grid:ev,virtualized:ew,openOnInputClick:eb,itemToStringLabel:e5,isItemEqualToValue:eA,modal:eN,autoHighlight:h,submitOnItemClick:eT,hasInputValue:tC,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:eM,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemProps:p.EMPTY_OBJECT,positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:"none"===eu},{onOpenChangeComplete:p.NOOP,setOpen:p.NOOP,setInputValue:p.NOOP,setSelectedValue:p.NOOP,setIndices:p.NOOP,handleSelection:p.NOOP,forceMount:p.NOOP,requestSubmit:p.NOOP,listRef:te,labelsRef:tt,popupRef:tn,emptyRef:ta,inputRef:tr,startDismissRef:tl,endDismissRef:ti,keyboardActiveRef:to,chipsContainerRef:ts,clearRef:tc,valuesRef:tg,pointerDownItemRef:tm,selectionEventRef:td},q)}).current,tz="none"===eu?tO:tI,tq=n.useMemo(()=>"none"===eu?tz:Array.isArray(tI)?tI.map(e=>z(e,eO)):z(tI,eO),[tz,eO,eu,tI]),tY=(0,a.useStableCallback)(es),t_=(0,a.useStableCallback)(M),tG=tH.useState("activeIndex"),tU=tH.useState("selectedIndex"),tW=tH.useState("positionerElement"),tK=tH.useState("listElement"),t$=tH.useState("triggerElement"),tJ=tH.useState("inputElement"),tQ=tH.useState("inputGroupElement"),tX=tH.useState("inline"),tZ=tH.useState("inputInsidePopup"),t0=tH.useState("inputOwnsFormValue"),t1=tS&&!tZ&&tO===tj,t5=(0,u.useValueAsRef)(t$),{mounted:t9,setMounted:t2,transitionStatus:t7}=(0,Q.useTransitionStatus)(tw),{openMethod:t4,triggerProps:t3}=(0,X.useOpenInteractionType)(tw),t8=(0,a.useStableCallback)(()=>tq);(0,G.useRegisterFieldControl)(tZ?t5:tr,e$,tz,t8,!tv,ec);let t6=(0,a.useStableCallback)(()=>{eX?tt.current=tB.map(e2):tH.set("forceMounted",!0)}),ne=(0,a.useStableCallback)((e,t,n)=>{if(-1===t){if(tp.current===er)return;tp.current=er}else tp.current={value:e,index:t};tY(e,(0,b.createGenericEventDetails)(n,void 0,{index:t}))}),nt=(0,a.useStableCallback)(e=>{let t={};void 0!==e.activeIndex&&(t.activeIndex=e.activeIndex),void 0!==e.selectedIndex&&(t.selectedIndex=e.selectedIndex),tH.update(t);let n=e.activeIndex;if(void 0===n)return;let r=e.type||E.REASONS.none;null===n?ne(void 0,-1,r):ne(tg.current[n],n,r)}),nn=(0,a.useStableCallback)((t,n)=>{if(e.onInputValueChange?.(t,n),!n.isCanceled){if(tu.current=n.reason===E.REASONS.inputClear,n.reason===E.REASONS.inputChange){tw&&null!==e3&&e8(null);let e=n.event,r=e.inputType;if("compositionend"===e.type||null!=r&&""!==r&&"insertReplacementText"!==r){let e=""!==t.trim();e&&e4(!0),tf.current={hasQuery:e};let n=tH.state.listElement;if(!tH.state.virtualized&&n){let e=tn.current;for(let t of(0,f.getOverflowAncestors)(n.firstElementChild??n)){if(!(0,f.isHTMLElement)(t)||(e?!(0,C.contains)(e,t):"dialog"===t.getAttribute("role")))break;if(function(e,t=!1){let{overflowY:n}=(0,f.getComputedStyle)(e);return("auto"===n||"scroll"===n)&&(t?e.clientHeight>0:e.scrollHeight>e.clientHeight)}(t)){t.scrollTop=0;break}}}e&&h&&null==tH.state.activeIndex&&(tw||tX)&&tH.set("activeIndex",0)}}else n.reason===E.REASONS.inputClear&&""===t&&tH.state.inputInsidePopup&&(tf.current={hasQuery:!1,selection:!0});tA(t)}}),nr=(0,a.useStableCallback)(e=>{let t=!e&&tZ&&!tX&&""!==tO&&(String(tO).trim()===e3||tO===tj);!e&&(t||""===tO||t1)&&e4(!1),e8(null),t&&nn("",(0,b.createChangeEventDetails)(E.REASONS.inputClear))}),nl=(0,a.useStableCallback)((t,n)=>{if(tw!==t&&(n.reason===E.REASONS.escapeKey&&tb&&0===tB.length&&!ta.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(t&&null!==e3&&nr(n.reason===E.REASONS.inputChange),!t&&e7&&(tS?(tX||e8(tN),""===tN&&e4(!1)):th&&(tX||e8(tN),tZ&&nt({activeIndex:null}),(!tZ||tX)&&nn("",(0,b.createChangeEventDetails)(E.REASONS.inputClear,n.event,void 0,{isItemPress:n.reason===E.REASONS.itemPress})))),tM(t),!t&&tZ&&(n.reason===E.REASONS.focusOut||n.reason===E.REASONS.outsidePress))&&(e_(!0),eG(!1),"onBlur"===eU))){let e="none"===eu?tO:tI;eW.commit(e)}}),ni=(0,a.useStableCallback)((e,t)=>{K?.(e,t),t.isCanceled||(tR(e),("none"===eu&&tn.current&&eP||tS&&!tH.state.inputInsidePopup)&&nn(e2(e),(0,b.createChangeEventDetails)(t.reason,t.event)))}),na=(0,a.useStableCallback)((e,t)=>{let n=(0,C.getTarget)(e),r=td.current??e;td.current=null;let l=(0,b.createChangeEventDetails)(E.REASONS.itemPress,r),i=n?.closest("a")?.getAttribute("href");if(i){i.startsWith("#")&&nl(!1,l);return}if(th){let e=Array.isArray(tI)?tI:[],n=k(e,t,eA);if(ni(n?e.filter(e=>!j(t,e,eA)):[...e,t],l),l.isCanceled||!(tr.current&&""!==tr.current.value.trim()))return;if(tH.state.inputInsidePopup){nn("",(0,b.createChangeEventDetails)(E.REASONS.inputClear,l.event,void 0,{isItemPress:!0}));let e=tf.current;e&&!n&&(e.toggledValue=t)}else nl(!1,l)}else{if(ni(t,l),l.isCanceled)return;nl(!1,l)}}),no=(0,a.useStableCallback)(()=>{let e=eW.inputRef.current?.form??tH.state.inputElement?.form;e&&"function"==typeof e.requestSubmit&&e.requestSubmit()}),nu=(0,a.useStableCallback)(()=>{if(t2(!1),t_?.(!1),e4(!1),e8(null),"none"===eu?nt({activeIndex:null,selectedIndex:null}):nt({activeIndex:null}),th&&tr.current&&""!==tr.current.value&&!tu.current&&nn("",(0,b.createChangeEventDetails)(E.REASONS.inputClear)),tS)if(tH.state.inputInsidePopup)tr.current&&""!==tr.current.value&&nn("",(0,b.createChangeEventDetails)(E.REASONS.inputClear));else{let e=e2(tI);if(tr.current&&tr.current.value!==e){let t=""===e?E.REASONS.inputClear:E.REASONS.none;nn(e,(0,b.createChangeEventDetails)(t))}}}),ns=n.useMemo(()=>tX&&tW?{current:tW.closest('[role="dialog"]')}:tn,[tX,tW]);(0,Y.useOpenChangeComplete)({enabled:!e.actionsRef,open:tw,ref:ns,onComplete(){tw||nu()}}),n.useImperativeHandle(e.actionsRef,()=>({unmount:nu}),[nu]),(0,i.useIsoLayoutEffect)(function(){let e=null!==e6.current&&null===e3;e6.current=e3,(!tw||e&&tb)&&(tw||(tm.current=null),"none"===eu||nt({selectedIndex:V(tb?tB:tg.current,tI,eA,th)}))},[tw,e3,tI,eu,th,tb,tB,eA,nt]),(0,i.useIsoLayoutEffect)(()=>{eX&&(tg.current=tB,te.current.length=tB.length)},[eX,tB]),(0,i.useIsoLayoutEffect)(()=>{let e=tf.current;if(e){let t=tw||tX||tH.state.positionerElement?.hidden===!1;if(e.hasQuery)h&&t&&tH.set("activeIndex",0),tf.current=null;else if(""===String(tO).trim()&&(tf.current=null,t)){let t=e.selection;"always"!==h||t||"none"!==tH.state.selectionMode||tH.set("activeIndex",0),queueMicrotask(()=>{if(!tH.state.open&&!tH.state.inline||tr.current&&""!==tr.current.value.trim())return;let n=tH.state.selectedValue,r="multiple"===tH.state.selectionMode;if(r&&Array.isArray(n)?n.length>0:"none"!==tH.state.selectionMode&&null!=n){let t=tb||tE?tB:tg.current,l=D(t,e.toggledValue,tH.state.isItemEqualToValue);tH.set("activeIndex",-1!==l?l:V(t,n,tH.state.isItemEqualToValue,r))}else t?tH.set("activeIndex",null):"always"===h&&tH.set("activeIndex",0)})}}if(!tw&&!tX)return;let t=tb||tE?tB:tg.current,n=tH.state.activeIndex;if(null==n)return"always"===h&&t.length>0?void tH.set("activeIndex",0):void ne(void 0,-1,E.REASONS.none);if(n>=t.length){ne(void 0,-1,E.REASONS.none),tH.set("activeIndex",null);return}let r=t[n],l=tp.current.value,i=l!==en&&j(r,l,tH.state.isItemEqualToValue);tp.current.index===n&&i||ne(r,n,E.REASONS.none)},[tG,h,ne,tE,tb,tB,tX,tw,tH,tO]),(0,i.useIsoLayoutEffect)(()=>{"none"===eu?ez(""!==String(tO)):ez(th?Array.isArray(tI)&&tI.length>0:null!=tI)},[ez,eu,tO,tI,th]),n.useEffect(()=>{tb&&h&&0===tB.length&&nt({activeIndex:null})},[tb,h,tB.length,nt]);let nc=!1;function nd(){nc||tO===tj||(nc=!0,nn(tj,(0,b.createChangeEventDetails)(E.REASONS.none)))}function np(){!tS||tC||tZ||e7||nd()}(0,Z.useValueChanged)(tN,function(){tw&&""!==tN&&tN!==String(tL)&&!t1&&e4(!0)}),(0,Z.useValueChanged)(tw,function(){tw&&null!==e3&&nr(!1)}),(0,Z.useValueChanged)(tI,function(){if("none"!==eu){var e;eF(tx),eB((e=eH.initialValue,Array.isArray(tI)&&Array.isArray(e)?!function(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let l=0;l<r;l+=1)if(!n(e[l],t[l]))return!1;return!0}(tI,e,(e,t)=>j(e,t,eA)):tI!==e)),eW.change(tI),!tS||tC||tZ||nd()}}),(0,Z.useValueChanged)(tj,np),(0,Z.useValueChanged)(eX,np),(0,Z.useValueChanged)(tO,function(){"none"===eu&&(eF(tx),eB(tO!==eH.initialValue),eW.change(tO))});let nf=(0,m.useFloatingRootContext)({open:!!tX||tw,onOpenChange:nl,elements:{reference:tZ?t$:tJ,floating:tW}}),ng=ev?"grid":"listbox",nm=tw||tX,nv=nm?"true":"false",nx=n.useMemo(()=>{let e=tJ?.tagName==="INPUT",t=null==tJ||e,n=t||nm,r=t?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return n&&(r.role="combobox",r["aria-expanded"]=nv,r["aria-haspopup"]=ng,r["aria-controls"]=nm?tK?.id:void 0,r["aria-autocomplete"]=ef?"none":ek),{reference:r,floating:{role:"presentation"}}},[tJ,nm,nv,ng,tK?.id,ek,ef]),nh=(0,x.useClick)(nf,{enabled:!tv&&eb,event:"mousedown-only",toggle:!1,touchOpenDelay:100*!tZ,reason:E.REASONS.inputPress}),nS=(0,g.useDismiss)(nf,{enabled:!tv&&!tX,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:!!tX||void 0,outsidePress(e){let t=(0,C.getTarget)(e);return!(0,C.contains)(t$,t)&&!(0,C.contains)(tc.current,t)&&!(0,C.contains)(ts.current,t)&&!(0,C.contains)(tQ,t)}}),nC=(0,v.useListNavigation)(nf,{enabled:!tv,id:e$,listRef:te,activeIndex:tG,selectedIndex:tU,virtual:!0,loopFocus:ey,allowEscape:ey&&!h,focusItemOnOpen:!e7&&("none"!==eu||!!h)&&"auto",focusItemOnHover:eR,resetOnPointerLeave:!eI,orientation:ev?"horizontal":void 0,rtl:"rtl"===eK,disabledIndices:p.EMPTY_ARRAY,grid:ev?S:void 0,onNavigate(e,t){(t||tw)&&"ending"!==t7&&(t?nt({activeIndex:e,type:to.current?E.REASONS.keyboard:E.REASONS.pointer}):nt({activeIndex:e}))}}),nb=n.useMemo(()=>(0,et.mergeProps)(nC.reference,{onKeyDown(e){ev&&null==tH.state.activeIndex&&("ArrowLeft"===e.key||"ArrowRight"===e.key)&&e.preventBaseUIHandler()}},nS.reference,nh.reference,nx.reference),[nC.reference,nS.reference,nh.reference,nx.reference,ev,tH]),nE=n.useMemo(()=>(0,et.mergeProps)(ee.FOCUSABLE_POPUP_PROPS,nS.floating),[nS.floating]),nI=n.useMemo(()=>(0,et.mergeProps)(nC.floating,nx.floating),[nC.floating,nx.floating]),nR=n.useMemo(()=>{let e=nC.item;return e?{...e,onFocus:void 0}:p.EMPTY_OBJECT},[nC.item]);tH.useContextCallback("setOpen",nl),tH.useContextCallback("setInputValue",nn),tH.useContextCallback("setSelectedValue",ni),tH.useContextCallback("setIndices",nt),tH.useContextCallback("handleSelection",na),tH.useContextCallback("forceMount",t6),tH.useContextCallback("requestSubmit",no),tH.useContextCallback("onOpenChangeComplete",M),(A=n.useRef(!0)).current&&(A.current=!1,(()=>{tH.update({inline:eM,popupProps:nE,listProps:nI,inputProps:nb,triggerProps:t3,itemProps:nR})})());let ny={id:e$,selectedValue:tI,open:tw,mounted:t9,transitionStatus:t7,items:e0,inline:eM,popupProps:nE,listProps:nI,inputProps:nb,triggerProps:t3,itemProps:nR,openMethod:t4,selectionMode:eu,name:tx,form:ed,disabled:tv,readOnly:ef,required:eg,grid:ev,virtualized:ew,openOnInputClick:eb,itemToStringLabel:e5,modal:eN,autoHighlight:h,isItemEqualToValue:eA,submitOnItemClick:eT,hasInputValue:tC};(0,i.useIsoLayoutEffect)(()=>{tH.update({...ny,inputOwnsFormValue:"none"===eu&&(eM||!tH.state.inputInsidePopup)})},[tH,...Object.values(ny)]);let nL=(0,o.useMergedRefs)(em,eW.inputRef),nO=n.useMemo(()=>({query:tN,hasItems:tb,filteredItems:tF,flatFilteredValues:tB}),[tN,tb,tF,tB]),nA=n.useMemo(()=>Array.isArray(tz)?"":z(tz,eO),[tz,eO]),nw=th&&Array.isArray(tI)&&tI.length>0,nM=th||"none"===eu&&t0?void 0:tx,nP=n.useMemo(()=>th&&Array.isArray(tI)&&tx?tI.map(e=>{let n=z(e,eO);return(0,t.jsx)("input",{type:"hidden",form:ed,name:tx,value:n,disabled:tv},n)}):null,[th,tI,ed,tx,eO,tv]),nN=(0,t.jsxs)(n.Fragment,{children:[e.children,(0,t.jsx)("input",{...eW.getValidationProps(tv,{onFocus(){tZ?t$?.focus():(tr.current||t$)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||tv||ef)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=(0,b.createChangeEventDetails)(E.REASONS.none,e.nativeEvent),l=()=>tg.current.findIndex(e=>z(e,eO).toLowerCase()===n||e2(e).toLowerCase()===n);tS&&(t6(),eX&&-1===l()&&tH.set("forceMounted",!0)),queueMicrotask(function(){if(th)return;if("none"===eu)return void nn(t,r);let e=l();-1===e&&(e=tg.current.findIndex((e,t)=>{let r=tt.current[t];return null!=r&&r.toLowerCase()===n}));let i=-1===e?void 0:tg.current[e];null!=i&&ni?.(i,r)})}}),id:e$&&null==nM?`${e$}-hidden-input`:void 0,form:ed,name:nM,autoComplete:eD,disabled:tv,required:eg&&!nw,readOnly:ef,value:nA,ref:nL,style:nM?s.visuallyHiddenInput:s.visuallyHidden,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),nP]});return(0,t.jsx)(I.Provider,{value:tH,children:(0,t.jsx)(R.Provider,{value:nf,children:(0,t.jsx)(L.Provider,{value:tb,children:(0,t.jsx)(y.Provider,{value:nO,children:(0,t.jsx)(O.Provider,{value:tO,children:nN})})})})})}var ea=e.i(439957),eo=e.i(108868),eu=e.i(552245),es=e.i(540886),ec=e.i(879938),ed=e.i(875812),ep=e.i(145147);ep.CommonTriggerDataAttributes.popupOpen,ep.CommonTriggerDataAttributes.pressed;let ef={...ec.pressableTriggerOpenStateMapping,...ed.fieldValidityMapping,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};var eg=e.i(247778),em=e.i(157940),ev=e.i(264042),ex=e.i(736760);function eh(e){let t=e.useState("mounted"),n=e.useState("popupSide"),r=e.useState("positionerElement");return t&&r?n:null}function eS(){return 0===M().filteredItems.length}function eC(e,t,n){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=n,r.click(),e.context.selectionEventRef.current=null)}let eb=n.forwardRef(function(e,t){let r,{render:l,className:i,nativeButton:o=!0,disabled:u=!1,id:s,style:c,...d}=e,{state:p,disabled:f,setTouched:g,setFocused:m,validationMode:v,validation:h}=(0,_.useFieldRootContext)(),{labelId:S}=(0,eg.useLabelableContext)(),I=A(),R=I.useState("selectionMode"),y=I.useState("disabled"),L=I.useState("readOnly"),O=I.useState("required"),M=I.useState("positionerElement"),N=I.useState("listElement"),j=I.useState("popupId"),k=I.useState("triggerProps"),D=I.useState("inputInsidePopup"),V=I.useState("id"),T=I.useState("labelId"),F=I.useState("open"),B=I.useState("selectedValue"),H=I.useState("activeIndex"),z=I.useState("selectedIndex"),q=I.useState("hasSelectedValue"),Y=w(),G=P(),U=(0,ea.useTimeout)(),$=f||y||u,J=eS(),Q=eh(I);(0,W.useLabelableId)({id:D?s:void 0});let X=D?s??V:s;F&&D?r=j??K(V):F&&(r=N?.id);let Z=n.useRef("");function ee(e){Z.current=e.pointerType}let{reference:et}=(0,ex.useTypeahead)(Y,{enabled:!F&&!L&&!y&&"single"===R,listRef:I.context.labelsRef,activeIndex:H,selectedIndex:z,onMatch(e){let t=I.context.valuesRef.current[e];void 0!==t&&I.context.setSelectedValue(t,(0,b.createChangeEventDetails)(E.REASONS.none))}}),{reference:en}=(0,x.useClick)(Y,{enabled:!y,event:"mousedown"}),{buttonRef:er,getButtonProps:el}=(0,es.useButton)({native:o,disabled:$}),ei={...p,readOnly:L,open:F,disabled:$,popupSide:Q,listEmpty:J,placeholder:"none"!==R&&!q},ec=(0,a.useStableCallback)(e=>{I.set("triggerElement",e)});return(0,eu.useRenderElement)("button",e,{ref:[t,er,ec],state:ei,props:[k,en,et,{id:X,tabIndex:D?0:-1,role:D?"combobox":void 0,"aria-expanded":F,"aria-haspopup":D?"dialog":"listbox","aria-controls":r,"aria-required":D&&O||void 0,"aria-readonly":D&&L||void 0,"aria-labelledby":S??T,onPointerDown:ee,onPointerEnter:ee,onFocus(){m(!0),$||U.start(0,I.context.forceMount)},onBlur(e){(0,C.contains)(M,e.relatedTarget)||(g(!0),m(!1),"onBlur"===v&&h.commit("none"===R?G:B))},onMouseDown(e){if($||(D||Y.set("domReferenceElement",e.currentTarget),I.context.forceMount(),"touch"!==Z.current&&(I.context.inputRef.current?.focus(),D||e.preventDefault()),F))return;let t=(0,eo.ownerDocument)(e.currentTarget);D&&t.addEventListener("mouseup",function(e){let t=I.state.triggerElement;if(!t)return;let n=(0,C.getTarget)(e),r=I.state.positionerElement,l=I.state.listElement;(0,C.contains)(t,n)||(0,C.contains)(r,n)||(0,C.contains)(l,n)||(0,ev.isMouseWithinBounds)(e,t)||I.context.setOpen(!1,(0,b.createChangeEventDetails)(E.REASONS.cancelOpen,e))},{once:!0})},onKeyDown(e){("ArrowDown"===e.key||"ArrowUp"===e.key)&&((0,em.stopEvent)(e),I.context.setOpen(!0,(0,b.createChangeEventDetails)(E.REASONS.listNavigation,e.nativeEvent)),I.context.inputRef.current?.focus())}},h.getValidationProps($,d),el],stateAttributesMapping:ef})});var eE=e.i(328744),eI=e.i(788015);let eR=n.createContext(void 0),ey=n.createContext(void 0);function eL(e){let t=n.useContext(ey);if(void 0===t&&!e)throw Error((0,r.default)(21));return t}let eO=n.forwardRef(function(e,n){let r=A(),{buttonRef:l,getButtonProps:i}=(0,es.useButton)({native:!1}),a=(0,o.useMergedRefs)(n,l),u=i({onClick:function(e){r.context.setOpen(!1,(0,b.createChangeEventDetails)(E.REASONS.closePress,e.nativeEvent,e.currentTarget))}});return(0,t.jsx)("span",{ref:a,...u,"aria-label":"Dismiss",tabIndex:void 0,style:s.visuallyHiddenInput})}),eA=n.forwardRef(function(e,r){let{render:l,className:i,disabled:o=!1,id:u,style:s,...c}=e,{state:d,disabled:p,setTouched:f,setFocused:g,validationMode:m,validation:v}=(0,_.useFieldRootContext)(),{labelId:x}=(0,eg.useLabelableContext)(),h=n.useContext(eR),S=!!eL(!0),C=A(),I=P(),R=(0,el.useDirection)(),y=C.useState("required"),L=C.useState("disabled"),O=C.useState("readOnly"),w=C.useState("name"),M=C.useState("form"),N=C.useState("selectionMode"),j=C.useState("autoHighlight"),k=C.useState("inputProps"),D=C.useState("triggerProps"),V=C.useState("open"),T=C.useState("mounted"),F=C.useState("selectedValue"),B=C.useState("id"),H=C.useState("inline"),z=C.useState("modal"),q=!!j,Y=eh(C),G=p||L||o,U=eS(),W=S||H,K=(0,eI.useBaseUiId)(u??(W?void 0:B)),$=S?ed.DEFAULT_FIELD_STATE_ATTRIBUTES:d,[J,Q]=n.useState(null),X=n.useRef(!1),Z=n.useRef(null),ee=n.useRef(!1),et="none"===N&&!S,en=(0,a.useStableCallback)(e=>{let t=S||C.state.inline;t&&!C.state.hasInputValue&&C.context.setInputValue("",(0,b.createChangeEventDetails)(E.REASONS.none)),C.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:et})}),er=S?c:v.getValidationProps(G,c);function ei(){C.context.setIndices({activeIndex:null,selectedIndex:null,type:C.context.keyboardActiveRef.current?E.REASONS.keyboard:E.REASONS.pointer})}function ea(){C.context.keyboardActiveRef.current=!1}let eo={...$,open:V,disabled:G,readOnly:O,popupSide:Y,listEmpty:U},es=(0,eu.useRenderElement)("input",e,{state:eo,ref:[r,C.context.inputRef,en],props:[k,D,{value:J??I,"aria-readonly":O||void 0,"aria-required":y||void 0,"aria-labelledby":x,disabled:G,readOnly:O,required:"none"===N?y:void 0,form:M,...et&&w&&{name:w},id:K,onFocus(){if(g(!0),!H||!ee.current)return;ee.current=!1;let e=Z.current;null!=e&&Object.hasOwn(C.context.valuesRef.current,e)&&C.context.setIndices({activeIndex:e})},onBlur(){f(!0),g(!1);let e=C.state.activeIndex;if(H&&null!==e&&"always"!==j&&(Z.current=e,ee.current=!0,C.context.setIndices({activeIndex:null})),"onBlur"===m){let e="none"===N?I:F;v.commit(e)}},onCompositionStart(e){eE.platform.os.android||(X.current=!0,Q(e.currentTarget.value))},onCompositionEnd(e){X.current=!1;let t=e.currentTarget.value;Q(null),C.context.setInputValue(t,(0,b.createChangeEventDetails)(E.REASONS.inputChange,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=X.current||!(!n||"insertReplacementText"===n);function l(e){!O&&!G&&e&&r&&(C.context.setOpen(!0,(0,b.createChangeEventDetails)(E.REASONS.inputChange,t)),q||ei())}if(X.current){let n=e.currentTarget.value;Q(n),""!==n||C.state.openOnInputClick||C.state.inputInsidePopup||C.context.setOpen(!1,(0,b.createChangeEventDetails)(E.REASONS.inputClear,t));let r=n.trim(),i=q&&""!==r;l(r),V&&null!==C.state.activeIndex&&!i&&ei();return}let i=(0,b.createChangeEventDetails)(E.REASONS.inputChange,t);if(C.context.setInputValue(e.currentTarget.value,i),i.isCanceled)return;let a=""===e.currentTarget.value,o=(0,b.createChangeEventDetails)(E.REASONS.inputClear,t);a&&!C.state.inputInsidePopup&&("single"===N&&C.context.setSelectedValue(null,o),C.state.openOnInputClick||C.context.setOpen(!1,o)),l(e.currentTarget.value.trim()),V&&null!==C.state.activeIndex&&!q&&ei()},onKeyDown(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(C.context.keyboardActiveRef.current=!0,G||O){O&&"Enter"===e.key&&V&&null!==C.state.activeIndex&&(0,em.stopEvent)(e);return}let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r="rtl"===R;if("Home"===e.key){(0,em.stopEvent)(e);let n=eE.platform.engine.gecko&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if("End"===e.key){(0,em.stopEvent)(e);let l=eE.platform.engine.gecko&&r?0:t.value.length;t.setSelectionRange(l,l),t.scrollLeft=r?-n:n;return}if(!T&&"Escape"===e.key){let t="multiple"===N&&Array.isArray(F)?0===F.length:null===F,n=(0,b.createChangeEventDetails)(E.REASONS.escapeKey,e.nativeEvent);C.context.setInputValue("",n),C.context.setSelectedValue("multiple"===N?[]:null,n),t||C.state.inline||n.isPropagationAllowed||e.stopPropagation();return}if(h&&"Backspace"===e.key&&""===t.value&&void 0===h.highlightedChipIndex&&Array.isArray(F)&&F.length>0){let t=h.chipsRef.current.length,n=t>0?t-1:F.length-1,r=F.filter((e,t)=>t!==n);ei(),C.context.setSelectedValue(r,(0,b.createChangeEventDetails)(E.REASONS.none,e.nativeEvent));return}let l=h?.highlightedChipIndex!==void 0,i=function(e){let t;if(!h)return;let{highlightedChipIndex:n}=h,r=h.chipsRef.current.length,[l,i]="rtl"===R?["ArrowRight","ArrowLeft"]:["ArrowLeft","ArrowRight"];if(void 0!==n){if(e.key===l)e.preventDefault(),t=n>0?n-1:void 0;else if(e.key===i)e.preventDefault(),t=n<r-1?n+1:void 0;else if("Backspace"===e.key||"Delete"===e.key){var a;let r;e.preventDefault(),t=(r=n>=(a=F.length)-1?a-2:n)>=0?r:void 0,ei()}return t}return e.key===l&&(e.currentTarget.selectionStart??0)===0&&F.length>0&&(e.preventDefault(),t=r>0?r-1:void 0),t}(e);if(h?.setHighlightedChipIndex(i),void 0!==i?h?.chipsRef.current[i]?.focus():l&&C.context.inputRef.current?.focus(),229!==e.which&&"Enter"===e.key&&V){let t=C.state.activeIndex,n=e.nativeEvent;if(null===t){if(H)return;C.context.setOpen(!1,(0,b.createChangeEventDetails)(E.REASONS.none,n));return}(0,em.stopEvent)(e),eC(C,t,n)}},onPointerMove:ea,onPointerDown:ea},er],stateAttributesMapping:ef}),ec=S?(0,t.jsx)(_.FieldRootContext.Provider,{value:_.DEFAULT_FIELD_ROOT_CONTEXT,children:es}):es;return(0,t.jsxs)(n.Fragment,{children:[V&&(!W||z)&&(0,t.jsx)(eO,{ref:C.context.startDismissRef}),ec]})});var ew=e.i(596296);let eM=n.forwardRef(function(e,t){let{render:n,className:r,style:l,...i}=e,{state:o}=(0,_.useFieldRootContext)(),u=A(),s=u.useState("open"),c=u.useState("disabled"),d=u.useState("readOnly"),p=u.useState("hasSelectedValue"),g=u.useState("selectionMode"),m=eh(u),v=eS(),x={...o,open:s,disabled:c,readOnly:d,popupSide:m,listEmpty:v,placeholder:"none"!==g&&!p},h=(0,a.useStableCallback)(e=>{u.set("inputGroupElement",e)});return(0,eu.useRenderElement)("div",e,{ref:[t,h],props:[{role:"group",onMouseDown(e){!function(e,t,n,r){if(e.baseUIHandlerPrevented)return;let l=(0,C.getTarget)(e.nativeEvent),i=(0,f.isElement)(l)?l:null;i!==e.currentTarget&&(r?.(i)||(0,ew.isInteractiveElement)(i))||(e.preventDefault(),!n&&(t.context.inputRef.current?.focus(),t.state.openOnInputClick&&t.context.setOpen(!0,(0,b.createChangeEventDetails)(E.REASONS.inputPress,e.nativeEvent))))}(e,u,c,e=>(0,C.contains)(u.context.chipsContainerRef.current,e))}},i],state:x,stateAttributesMapping:ef})}),eP=n.forwardRef(function(e,t){let{render:n,className:r,style:l,...i}=e;return(0,eu.useRenderElement)("span",e,{ref:t,props:[{"aria-hidden":!0,children:"▼"},i]})});var eN=e.i(474354);let ej={...eN.transitionStatusMapping,...ec.triggerOpenStateMapping},ek=n.forwardRef(function(e,t){let{render:n,className:r,disabled:l=!1,nativeButton:i=!0,keepMounted:a=!1,style:o,...u}=e,{disabled:s}=(0,_.useFieldRootContext)(),c=A(),d=c.useState("selectionMode"),p=c.useState("disabled"),f=c.useState("readOnly"),g=c.useState("open"),m=c.useState("selectedValue"),v=c.useState("hasSelectionChips"),x=P(),h=!1;h="none"===d?""!==x:"single"===d?null!=m:v;let S=s||p||l,{buttonRef:C,getButtonProps:I}=(0,es.useButton)({native:i,disabled:S}),{mounted:R,transitionStatus:y,setMounted:L}=(0,Q.useTransitionStatus)(h),O={disabled:S,visible:h,open:g,transitionStatus:y};(0,Y.useOpenChangeComplete)({open:h,ref:c.context.clearRef,onComplete(){h||L(!1)}});let w=(0,eu.useRenderElement)("button",e,{state:O,ref:[t,C,c.context.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(e){e.preventDefault()},onClick(e){if(S||f)return;let t=c.context.keyboardActiveRef.current?E.REASONS.keyboard:E.REASONS.pointer;c.context.setInputValue("",(0,b.createChangeEventDetails)(E.REASONS.clearPress,e.nativeEvent)),"none"!==d?(c.context.setSelectedValue(Array.isArray(m)?[]:null,(0,b.createChangeEventDetails)(E.REASONS.clearPress,e.nativeEvent)),c.context.setIndices({activeIndex:null,selectedIndex:null,type:t})):c.context.setIndices({activeIndex:null,type:t}),c.context.inputRef.current?.focus()}},u,I],stateAttributesMapping:ej});return a||R?w:null}),eD=n.createContext(null);function eV(e){let{children:r,items:l}=e,i=n.useMemo(()=>({items:l}),[l]);return(0,t.jsx)(eD.Provider,{value:i,children:r})}function eT(e){let{children:r}=e,{filteredItems:l}=M(),i=n.useContext(eD),a=i?i.items:l;return(0,t.jsx)(n.Fragment,{children:a.map(r)})}var eF=e.i(53687);let eB=n.forwardRef(function(e,r){var l;let{render:i,className:o,style:u,children:s,...c}=e,d=A(),p=w(),f=!!eL(!0),{filteredItems:g,hasItems:m}=M(),v=d.useState("selectionMode"),x=d.useState("grid"),h=d.useState("readOnly"),S=d.useState("listProps"),C=d.useState("virtualized"),b=d.useState("forceMounted"),E=0===g.length,I=(0,a.useStableCallback)(e=>{d.set("positionerElement",e)}),R=(0,a.useStableCallback)(e=>{d.set("listElement",e)}),y=n.useMemo(()=>"function"==typeof s?l||(l=(0,t.jsx)(eT,{children:s})):s,[s]),L=p.useState("floatingId"),O=(0,eu.useRenderElement)("div",e,{state:{empty:E},ref:[r,R,f?null:I],props:[S,{children:y,tabIndex:-1,id:L,role:x?"grid":"listbox","aria-multiselectable":"multiple"===v?"true":void 0,"aria-readonly":!x&&!!h||void 0,onKeyDown(e){if(!d.state.disabled&&!d.state.readOnly&&"Enter"===e.key){let t=d.state.activeIndex;null!=t&&((0,em.stopEvent)(e),eC(d,t,e.nativeEvent))}},onKeyDownCapture(){d.context.keyboardActiveRef.current=!0},onPointerMoveCapture(){d.context.keyboardActiveRef.current=!1}},c]});if(C)return O;let P=m&&!b?void 0:d.context.labelsRef;return(0,t.jsx)(eF.CompositeList,{elementsRef:d.context.listRef,labelsRef:P,children:O})});function eH(){let e=(0,ea.useTimeout)(),t=n.useRef(null);return n.useEffect(()=>{if(eE.platform.os.ios)return;let n=t.current;if(null==n)return;let r=function(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;""!==e.nodeValue&&(n=e)}return n}(n);if(null==r)return;let l=r.data,i=`${l}\u2060`;return r.nodeValue=i,e.start(200,()=>{r.nodeValue===i&&(r.nodeValue=l)}),()=>{e.clear(),r.nodeValue===i&&(r.nodeValue=l)}},[t,e]),t}let ez=n.forwardRef(function(e,t){let{render:n,className:r,style:l,children:i,...a}=e,o=eH();return(0,eu.useRenderElement)("div",e,{ref:[t,o],props:[{children:i,role:"status","aria-live":"polite","aria-atomic":!0},a]})});var eq=e.i(726674);let eY=n.createContext(void 0),e_=n.forwardRef(function(e,n){let{keepMounted:r=!1,...l}=e,i=A(),a=i.useState("mounted"),o=i.useState("forceMounted");return a||r||o?(0,t.jsx)(eY.Provider,{value:r,children:(0,t.jsx)(eq.FloatingPortal,{ref:n,...l})}):null}),eG={...ec.popupStateMapping,...eN.transitionStatusMapping},eU=n.forwardRef(function(e,t){let{render:n,className:r,style:l,...i}=e,a=A(),o=a.useState("open"),u=a.useState("mounted"),s=a.useState("transitionStatus");return(0,eu.useRenderElement)("div",e,{state:{open:o,transitionStatus:s},ref:t,stateAttributesMapping:eG,props:[{role:"presentation",hidden:!u,style:{userSelect:"none",WebkitUserSelect:"none"}},i]})});var eW=e.i(144394),eK=e.i(923706),e$=e.i(638396),eJ=e.i(426),eQ=e.i(789579),eX=e.i(33383);let eZ=n.forwardRef(function(e,l){let{render:o,className:u,anchor:s,positionMethod:c,side:d,align:p,sideOffset:f,alignOffset:g,collisionBoundary:m="clipping-ancestors",collisionPadding:v,arrowPadding:x,sticky:h,disableAnchorTracking:S=!1,collisionAvoidance:C=e$.DROPDOWN_COLLISION_AVOIDANCE,style:b,...E}=e,I=A(),R=w(),y=function(){let e=n.useContext(eY);if(void 0===e)throw Error((0,r.default)(20));return e}(),L=I.useState("modal"),O=I.useState("open"),M=I.useState("mounted"),P=I.useState("openMethod"),N=I.useState("positionerElement"),j=I.useState("triggerElement"),k=I.useState("inputElement"),D=I.useState("inputGroupElement"),V=I.useState("inputInsidePopup"),T=I.useState("transitionStatus"),F=eS(),B=(0,eK.useAnchorPositioning)({anchor:s??(V?j:D??k),floatingRootContext:R,positionMethod:c,mounted:M,side:d,sideOffset:f,align:p,alignOffset:g,arrowPadding:x,collisionBoundary:m,collisionPadding:v,sticky:h,disableAnchorTracking:S,keepMounted:y,collisionAvoidance:C,lazyFlip:!0});(0,eX.useAnchoredPopupScrollLock)(O&&L,"touch"===P,N,j);let H={open:O,side:B.side,align:B.align,anchorHidden:B.anchorHidden,empty:F};(0,i.useIsoLayoutEffect)(()=>{I.set("popupSide",B.side)},[I,B.side]);let z=(0,a.useStableCallback)(e=>{I.set("positionerElement",e)}),q=(0,eQ.usePositioner)(e,H,{styles:B.positionerStyles,transitionStatus:T,props:E,refs:[l,z],hidden:!M,inert:!O});return(0,t.jsxs)(ey.Provider,{value:B,children:[M&&L&&(0,t.jsx)(eJ.InternalBackdrop,{inert:(0,eW.inertValue)(!O),cutout:D??k??j}),q]})});var e0=e.i(61487),e1=e.i(253984);let e5={...ec.popupStateMapping,...eN.transitionStatusMapping},e9=n.forwardRef(function(e,r){let{render:l,className:a,style:o,initialFocus:u,finalFocus:s,...c}=e,d=A(),p=eL(),f=w(),g=d.useState("mounted"),m=d.useState("open"),v=d.useState("openMethod"),x=d.useState("popupProps"),h=d.useState("transitionStatus"),S=d.useState("inputInsidePopup"),b=d.useState("inputElement"),E=d.useState("modal"),I=d.useState("id"),R=eS(),y=c.id??(S?K(I):void 0);(0,i.useIsoLayoutEffect)(()=>(d.set("popupId",d.context.popupRef.current?.id||y),()=>{d.set("popupId",void 0)}),[d,y]),(0,Y.useOpenChangeComplete)({open:m,ref:d.context.popupRef,onComplete(){m&&d.context.onOpenChangeComplete(!0)}});let L={open:m,side:p.side,align:p.align,anchorHidden:p.anchorHidden,transitionStatus:h,empty:R},O=(0,eu.useRenderElement)("div",e,{state:L,ref:[r,d.context.popupRef],props:[x,{id:y,role:S?"dialog":"presentation",onFocus(e){let t=(0,C.getTarget)(e.nativeEvent);"touch"!==v&&((0,C.contains)(d.state.listElement,t)||t===e.currentTarget)&&d.context.inputRef.current?.focus()}},(0,e1.getDisabledMountTransitionStyles)(h),c],stateAttributesMapping:e5}),M=!!S&&(e=>"touch"===e?d.context.popupRef.current:b),P=!S||E;return(0,t.jsx)(e0.FloatingFocusManager,{context:f,disabled:!g,modal:P,openInteractionType:v,initialFocus:void 0===u?M:u,returnFocus:null!=s?s:!!S&&void 0,getInsideElements:()=>[d.context.startDismissRef.current,d.context.endDismissRef.current],children:(0,t.jsxs)(n.Fragment,{children:[O,P&&(0,t.jsx)(eO,{ref:d.context.endDismissRef})]})})}),e2=n.forwardRef(function(e,t){let{render:n,className:r,style:l,...i}=e,a=A(),{arrowRef:o,side:u,align:s,arrowUncentered:c,arrowStyles:d}=eL(),p=a.useState("open");return(0,eu.useRenderElement)("div",e,{ref:[o,t],stateAttributesMapping:ec.popupStateMapping,state:{open:p,side:u,align:s,uncentered:c},props:{style:d,"aria-hidden":!0,...i}})}),e7=n.createContext(void 0),e4=n.forwardRef(function(e,r){let{render:l,className:i,style:a,items:o,...u}=e,s=A().useState("grid"),[c,d]=n.useState(),p=n.useMemo(()=>({labelId:c,setLabelId:d,items:o}),[c,d,o]),f=(0,eu.useRenderElement)("div",e,{ref:r,props:[{role:s?"rowgroup":"group","aria-labelledby":c},u]}),g=(0,t.jsx)(e7.Provider,{value:p,children:f});return o?(0,t.jsx)(eV,{items:o,children:g}):g}),e3=n.forwardRef(function(e,t){let{render:l,className:a,style:o,id:u,...s}=e,{setLabelId:c}=function(){let e=n.useContext(e7);if(void 0===e)throw Error((0,r.default)(18));return e}(),d=(0,eI.useBaseUiId)(u);return(0,i.useIsoLayoutEffect)(()=>(c(d),()=>{c(e=>e===d?void 0:e)}),[d,c]),(0,eu.useRenderElement)("div",e,{ref:t,props:[{id:d,"aria-hidden":!0},s]})});var e8=e.i(174080),e6=e.i(673553);let te=n.createContext(void 0),tt=n.createContext(!1);function tn(e){let{componentProps:r,forwardedRef:l,virtualized:a,indexFromFilter:o}=e,{render:u,className:s,style:c,value:d=null,index:p,disabled:f=!1,nativeButton:g=!1,...m}=r,v=n.useRef(null),x=(0,e6.useCompositeListItem)({guess:!0,index:p,textRef:v}),h=A(),S=n.useContext(tt),C=n.useContext(L),b=h.useState("selectionMode"),E=h.useState("disabled"),I=h.useState("readOnly"),R=h.useState("isItemEqualToValue"),y=E||f,O="none"!==b,w=p??o??x.index,M=-1!==w,P=h.useState("id"),N=h.useState("isActive",w),D=h.useState("isSelected",d),T=h.useState("itemProps"),F=n.useRef(null),B=null!=P&&M?`${P}-${w}`:void 0,H=D&&O;(0,i.useIsoLayoutEffect)(()=>{if(!(M&&(a||null!=p)))return;let e=h.context.listRef.current;return e[w]=F.current,()=>{delete e[w]}},[M,a,w,p,h]),(0,i.useIsoLayoutEffect)(()=>{if(!M||C)return;let e=h.context.valuesRef.current;return e[w]=d,()=>{delete e[w]}},[M,C,w,d,h]),(0,i.useIsoLayoutEffect)(()=>{if(!M||C)return;let e=h.state.selectedValue,t=h.state.selectedIndex;if("multiple"===h.state.selectionMode&&Array.isArray(e)){var n,r;n=h.context.valuesRef.current,r=t,t=k(e,d,R)?null!=r&&w>r&&k(e,n[r],R)?r:w:w===r?V(n,e,R,!0):r}else j(d,e,R)&&(t=w);h.set("selectedIndex",t)},[M,C,h,w,d,R]);let{getButtonProps:z,buttonRef:q}=(0,es.useButton)({disabled:y,focusableWhenDisabled:!0,native:g,composite:!0});function Y(e){function t(){h.context.handleSelection(e,d)}h.state.submitOnItemClick?(e8.flushSync(t),h.context.requestSubmit()):t()}let _=(0,eu.useRenderElement)("div",r,{ref:[q,l,x.ref,F],state:{disabled:y,selected:H,highlighted:N},props:[T,{id:B,role:S?"gridcell":"option","aria-selected":O?H:void 0,tabIndex:void 0,onPointerDownCapture(e){e.isPrimary&&(h.context.pointerDownItemRef.current=e.currentTarget),e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){y||I||Y(e.nativeEvent)},onMouseUp(e){let t=h.context.pointerDownItemRef.current===e.currentTarget;h.context.pointerDownItemRef.current=null,y||I||0!==e.button||t||!N||Y(e.nativeEvent)}},m,z]}),G=n.useMemo(()=>({selected:H,textRef:v}),[H,v]);return(0,t.jsx)(te.Provider,{value:G,children:_})}function tr(e){let{componentProps:n,forwardedRef:r}=e,l=A().useState("isItemEqualToValue"),{flatFilteredValues:i}=M(),a=D(i,n.value??null,l);return(0,t.jsx)(tn,{componentProps:n,forwardedRef:r,virtualized:!0,indexFromFilter:a})}let tl=n.memo(n.forwardRef(function(e,n){let r=A().useState("virtualized");return r&&null==e.index?(0,t.jsx)(tr,{componentProps:e,forwardedRef:n}):(0,t.jsx)(tn,{componentProps:e,forwardedRef:n,virtualized:r,indexFromFilter:void 0})})),ti=n.forwardRef(function(e,n){let{render:r,className:l,style:i,...a}=e,o=(0,eu.useRenderElement)("div",e,{ref:n,props:[{role:"row"},a]});return(0,t.jsx)(tt.Provider,{value:!0,children:o})}),ta=n.forwardRef(function(e,t){let{render:n,className:r,style:l,children:i,...a}=e,{filteredItems:o}=M(),u=A(),s=eH(),c=0===o.length?i:null;return(0,eu.useRenderElement)("div",e,{ref:[t,u.context.emptyRef,s],props:[{children:c,role:"status","aria-live":"polite","aria-atomic":!0},a]})}),to=n.forwardRef(function(e,t){let{className:n,render:r,orientation:l="horizontal",style:i,...a}=e;return(0,eu.useRenderElement)("div",e,{state:{orientation:l},ref:t,props:[{role:"presentation"},a]})});e.s(["Arrow",0,e2,"Backdrop",0,eU,"Clear",0,ek,"Collection",0,eT,"Empty",0,ta,"Group",0,e4,"GroupLabel",0,e3,"Icon",0,eP,"Input",0,eA,"InputGroup",0,eM,"Item",0,tl,"List",0,eB,"Popup",0,e9,"Portal",0,e_,"Positioner",0,eZ,"Root",0,function(e){let r,{openOnInputClick:l=!1,value:i,defaultValue:a,onValueChange:o,mode:u="list",itemToStringValue:s,...c}=e,d=("inline"===u||"both"===u)&&!e.readOnly,p=void 0!==i,[f,g]=n.useState(a??""),[m,v]=n.useState("");n.useEffect(()=>{(p||!d)&&v("")},[i,p,d]),r=d&&""!==m?m:p?i??"":f;let x=J({locale:c.locale}),h=String((p?i:f)??"").trim(),S="inline"===u||"none"===u||null===c.filter?null:c.filter??x.contains;return(0,t.jsx)(ei,{...c,itemToStringLabel:s,openOnInputClick:l,selectionMode:"none",fillInputOnItemPress:!0,filter:S,filterQuery:"both"===u?h:void 0,autoComplete:u,inputValue:r,defaultInputValue:a,onInputValueChange:function(e,t){v(""),p||g(e),o?.(e,t)},onItemHighlighted:function(t,n){e.onItemHighlighted?.(t,n),n.reason!==E.REASONS.pointer&&v(d&&null!=t?H(t,s):"")}})},"Row",0,ti,"Separator",0,to,"Status",0,ez,"Trigger",0,eb,"Value",0,function(e){let{children:r}=e,l=P(),i=null;return i="function"==typeof r?r(String(l)):null!=r?r:l,(0,t.jsx)(n.Fragment,{children:i})},"useFilter",0,J,"useFilteredItems",0,function(){return M().filteredItems}],196799);var tu=e.i(196799),tu=tu,ts=e.i(689664),tc=e.i(716327),td=e.i(758379);e.s(["LoaderCircle",()=>td.default],611568);var td=td,tp=e.i(167881),tf=e.i(23750),tg=e.i(647163);e.s(["Combobox",0,function({value:e,onChange:r,options:l,placeholder:i,empty:a="Nothing matches",note:o="Not on the list? Type it, then save.",loading:u=!1,disabled:s=!1,className:c,"aria-label":d}){let p=new Set(l.map(e=>e.value.toLowerCase())),[f,g]=(0,n.useState)(e),[m,v]=(0,n.useState)(e);m!==e&&(v(e),g(e));let x=f.trim(),h=""!==x&&x!==e;return(0,t.jsxs)(tu.Root,{items:l,value:f,onValueChange:(e,t)=>{g(e),"item-press"===t.reason&&r(e)},itemToStringValue:e=>e.value,filter:(e,t)=>{let n;return!!(!(n=t.trim().toLowerCase())||p.has(n))||[e.value,e.label,e.badge].filter(Boolean).some(e=>String(e).toLowerCase().includes(n))},openOnInputClick:!0,disabled:s,children:[(0,t.jsxs)("div",{className:(0,tg.cn)("flex gap-2",c),children:[(0,t.jsxs)(tu.InputGroup,{className:"relative min-w-0 flex-1",children:[(0,t.jsx)(tu.Input,{placeholder:i,"aria-label":d,spellCheck:!1,className:(0,tg.cn)(tf.inputClassName,"pr-8 font-mono text-sm")}),(0,t.jsx)(tu.Trigger,{"aria-label":"Show suggestions",className:"absolute inset-y-0 right-0 flex w-8 items-center justify-center text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:text-foreground disabled:opacity-50",children:u?(0,t.jsx)(td.default,{className:"size-3.5 animate-spin"}):(0,t.jsx)(tc.ChevronDown,{className:"size-3.5"})})]}),h&&!s&&(0,t.jsx)(tp.Button,{variant:"outline",className:"shrink-0",onClick:()=>r(x),children:"Save"})]}),(0,t.jsx)(tu.Portal,{children:(0,t.jsx)(tu.Positioner,{sideOffset:4,className:"isolate z-50 outline-none",children:(0,t.jsxs)(tu.Popup,{className:"max-h-(--available-height) w-max min-w-(--anchor-width) max-w-[min(28rem,var(--available-width))] origin-(--transform-origin) rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none 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",children:[o&&(0,t.jsx)("p",{className:"px-1.5 pt-1 pb-1.5 text-[11px] text-muted-foreground",children:o}),(0,t.jsx)(tu.Empty,{className:"px-2 py-2 font-mono text-[11px] text-muted-foreground empty:hidden",children:u?"Loading models…":a}),(0,t.jsx)(tu.List,{className:"max-h-64 overflow-y-auto outline-none",children:n=>(0,t.jsxs)(tu.Item,{value:n,className:"flex cursor-default items-center gap-2 rounded-md px-1.5 py-1.5 text-sm outline-none select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground",children:[(0,t.jsx)("span",{className:"flex-1 whitespace-nowrap",children:n.label}),n.badge&&(0,t.jsx)("span",{className:"shrink-0 rounded-full bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:n.badge}),n.hint&&n.hint!==n.label&&(0,t.jsx)("span",{className:"min-w-0 shrink truncate font-mono text-[11px] text-muted-foreground",children:n.hint}),(0,t.jsx)(ts.Check,{className:(0,tg.cn)("size-3.5 shrink-0",n.value===e.trim()?"opacity-100":"opacity-0")})]},n.value)})]})})})]})}],736185)},7227,e=>{"use strict";var t=e.i(843476);e.s(["ClaudeIcon",0,function({className:e}){return(0,t.jsxs)("svg",{overflow:"visible",width:"100%",height:"100%",viewBox:"0 0 100 101",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",role:"presentation",children:[(0,t.jsx)("path",{d:"M96.0000 40.0000 L99.5002 42.0000 L99.5002 43.5000 L98.5000 47.0000 L56.0000 57.0000 L52.0040 47.0708 L96.0000 40.0000 M96.0000 40.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(330deg) scaleY(1.13102) rotate(-330deg)"}}),(0,t.jsx)("path",{d:"M80.1032 10.5903 L84.9968 11.6171 L86.2958 13.2179 L87.5346 17.0540 L87.0213 19.5007 L58.5000 58.5000 L49.0000 49.0000 L75.3008 14.4873 L80.1032 10.5903 M80.1032 10.5903 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(300deg) scaleY(1.04936) rotate(-300deg)"}}),(0,t.jsx)("path",{d:"M55.5002 4.5000 L58.5005 2.5000 L61.0002 3.5000 L63.5002 7.0000 L56.6511 48.1620 L52.0005 45.0000 L50.0005 39.5000 L53.5003 8.5000 L55.5002 4.5000 M55.5002 4.5000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(270deg) scaleY(1.08769) rotate(-270deg)"}}),(0,t.jsx)("path",{d:"M23.4253 5.1588 L26.5075 1.2217 L28.5175 0.7632 L32.5063 1.3458 L34.4748 2.8868 L48.8202 34.6902 L54.0089 49.8008 L47.9378 53.1760 L24.8009 11.1886 L23.4253 5.1588 M23.4253 5.1588 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(240deg) scaleY(0.94) rotate(-240deg)"}}),(0,t.jsx)("path",{d:"M8.4990 27.0019 L7.4999 23.0001 L10.5003 19.5001 L14.0003 20.0001 L15.0003 20.0001 L36.0000 35.5000 L42.5000 40.5000 L51.5000 47.5000 L46.5000 56.0000 L42.0002 52.5000 L39.0001 49.5000 L10.0000 29.0001 L8.4990 27.0019 M8.4990 27.0019 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(210deg) scaleY(0.925) rotate(-210deg)"}}),(0,t.jsx)("path",{d:"M2.5003 53.0000 L0.2370 50.5000 L0.2373 48.2759 L2.5003 47.5000 L28.0000 49.0000 L53.0000 51.0000 L52.1885 55.9782 L4.5000 53.5000 L2.5003 53.0000 M2.5003 53.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(180deg) scaleY(0.997) rotate(-180deg)"}}),(0,t.jsx)("path",{d:"M17.5002 79.0264 L12.5005 79.0264 L10.5124 76.7369 L10.5124 74.0000 L19.0005 68.0000 L53.5082 46.0337 L57.0005 52.0000 L17.5002 79.0264 M17.5002 79.0264 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(150deg) scaleY(1.045) rotate(-150deg)"}}),(0,t.jsx)("path",{d:"M27.0004 92.9999 L25.0003 93.4999 L22.0003 91.9999 L22.5004 89.4999 L52.0003 50.5000 L56.0004 55.9999 L34.0003 85.0000 L27.0004 92.9999 M27.0004 92.9999 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(120deg) scaleY(1.03) rotate(-120deg)"}}),(0,t.jsx)("path",{d:"M51.9998 98.0000 L50.5002 100.0000 L47.5002 101.0000 L45.0001 99.0000 L43.5000 96.0000 L51.0003 55.4999 L55.5001 55.9999 L51.9998 98.0000 M51.9998 98.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(90deg) scaleY(1.06) rotate(-90deg)"}}),(0,t.jsx)("path",{d:"M77.5007 86.9997 L77.5007 90.9997 L77.0006 92.4997 L75.0004 93.4997 L71.5006 93.0339 L47.4669 57.2642 L56.9998 50.0002 L64.9994 64.5004 L65.7507 69.7497 L77.5007 86.9997 M77.5007 86.9997 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(60deg) scaleY(1.00898) rotate(-60deg)"}}),(0,t.jsx)("path",{d:"M89.0008 80.9991 L89.5008 83.4991 L88.0008 85.4991 L86.5007 84.9991 L78.0007 78.9991 L65.0007 67.4991 L55.0007 60.4991 L58.0000 51.0000 L62.9999 54.0001 L66.0007 59.4991 L89.0008 80.9991 M89.0008 80.9991 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(30deg) scaleY(1.13564) rotate(-30deg)"}}),(0,t.jsx)("path",{d:"M82.5003 55.5000 L95.0003 56.5000 L98.0003 58.5000 L100.0000 61.5000 L100.0000 63.6587 L94.5003 66.0000 L66.5005 59.0000 L55.0003 58.5000 L58.0000 48.0000 L66.0005 54.0000 L82.5003 55.5000 M82.5003 55.5000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(0deg) scaleY(1.27731) rotate(0deg)"}})]})},"GoogleIcon",0,function({className:e}){return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",className:e,width:"24",children:[(0,t.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),(0,t.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),(0,t.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),(0,t.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"}),(0,t.jsx)("path",{d:"M1 1h22v22H1z",fill:"none"})]})},"GrokIcon",0,function({className:e}){return(0,t.jsxs)("svg",{"aria-hidden":"true",className:e,"data-view-component":"true",viewBox:"0 0 35 33",children:[(0,t.jsx)("path",{d:"M13.2371 21.0407L24.3186 12.8506C24.8619 12.4491 25.6384 12.6057 25.8973 13.2294C27.2597 16.5185 26.651 20.4712 23.9403 23.1851C21.2297 25.8989 17.4581 26.4941 14.0108 25.1386L10.2449 26.8843C15.6463 30.5806 22.2053 29.6665 26.304 25.5601C29.5551 22.3051 30.562 17.8683 29.6205 13.8673L29.629 13.8758C28.2637 7.99809 29.9647 5.64871 33.449 0.844576C33.5314 0.730667 33.6139 0.616757 33.6964 0.5L29.1113 5.09055V5.07631L13.2343 21.0436",fill:"currentColor"}),(0,t.jsx)("path",{d:"M10.9503 23.0313C7.07343 19.3235 7.74185 13.5853 11.0498 10.2763C13.4959 7.82722 17.5036 6.82767 21.0021 8.2971L24.7595 6.55998C24.0826 6.07017 23.215 5.54334 22.2195 5.17313C17.7198 3.31926 12.3326 4.24192 8.67479 7.90126C5.15635 11.4239 4.0499 16.8403 5.94992 21.4622C7.36924 24.9165 5.04257 27.3598 2.69884 29.826C1.86829 30.7002 1.0349 31.5745 0.36364 32.5L10.9474 23.0341",fill:"currentColor"})]})},"OpenAIIcon",0,function({className:e}){return(0,t.jsxs)("svg",{"aria-hidden":"true",className:e,"data-view-component":"true",viewBox:"0 0 24 24",role:"img",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("title",{children:"OpenAI icon"}),(0,t.jsx)("path",{fill:"currentColor",d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})]})},"VercelIcon",0,function({className:e}){return(0,t.jsx)("svg",{viewBox:"0 0 115 100",height:"18",width:"21",className:e,"data-slot":"geist-logo-svg",children:(0,t.jsx)("g",{children:(0,t.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M57.5 0 115 100H0z",clipRule:"evenodd"})})})}])},421429,e=>{"use strict";var t=e.i(843476),n=e.i(647163);e.s(["Segmented",0,function({options:e,value:r,onChange:l,className:i,...a}){return(0,t.jsx)("div",{role:"radiogroup",className:(0,n.cn)("flex w-fit gap-1 rounded-lg bg-muted p-0.5",i),...a,children:e.map(e=>{let i=e.value===r;return(0,t.jsx)("button",{type:"button",role:"radio","aria-checked":i,title:e.title,onClick:()=>l(e.value),className:(0,n.cn)("flex items-center justify-center gap-1.5 rounded-md px-2.5 py-1 font-mono text-[11px] transition-colors outline-none focus-visible:ring-3 focus-visible:ring-ring/50",i?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.label},e.value)})})}])},968978,e=>{"use strict";var t=e.i(843476),n=e.i(7227);e.s(["ProviderIcon",0,function({className:e,provider:r}){let l=(e=>{switch(e){case"anthropic":return n.ClaudeIcon;case"google":return n.GoogleIcon;case"openai":case"chatgpt":return n.OpenAIIcon;case"vercel-ai-gateway":return n.VercelIcon;case"xai":return n.GrokIcon}})(r);return(0,t.jsx)(l,{className:e})}])},349196,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("7f0bf76a4aa995e0c29f10cf31783d7b3f36e9294a",t.callServer,void 0,t.findSourceMapURL,"setConfigAction");e.s(["setConfigAction",0,n])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,736185,186698,611568,e=>{"use strict";var t=e.i(843476);e.s([],148099),e.i(148099);var n=e.i(271645),r=e.i(733332),l=e.i(951437),i=e.i(146376),a=e.i(667865),o=e.i(828918),u=e.i(446265),s=e.i(502077),c=e.i(388940),d=e.i(301252),p=e.i(956789),f=e.i(229315),g=e.i(17989),m=e.i(265858),v=e.i(260891),x=e.i(385689),h=e.i(621082);function S(e,t,n,r,l,i,a,o,u,s=2){let c=(0,h.getGridNavigatedIndex)(n.current,{event:e,orientation:r,loopFocus:l,rtl:i,cols:s,disabledIndices:a,minIndex:o,maxIndex:u,prevIndex:t>u?o:t,stopEvent:!0});return(0,h.isIndexOutOfListBounds)(n.current,c)?void 0:c}var C=e.i(584446),b=e.i(675606),E=e.i(56434);let I=n.createContext(void 0),R=n.createContext(void 0),y=n.createContext(void 0),L=n.createContext(!1),O=n.createContext("");function A(){let e=n.useContext(I);if(!e)throw Error((0,r.default)(22));return e}function w(){let e=n.useContext(R);if(!e)throw Error((0,r.default)(23));return e}function M(){let e=n.useContext(y);if(!e)throw Error((0,r.default)(24));return e}function P(){return n.useContext(O)}let N=(e,t)=>Object.is(e,t);function j(e,t,n){return null==e||null==t?Object.is(e,t):n(e,t)}function k(e,t,n){return!!e&&e.some(e=>void 0!==e&&j(t,e,n))}function D(e,t,n){return e?e.findIndex(e=>void 0!==e&&j(e,t,n)):-1}function V(e,t,n,r){let l=r&&Array.isArray(t)?e.findIndex(function(e,t){if(t!==N)return n=>k(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(0!==t||e.some(e=>Object.is(t,e)))}(t,n)):D(e,t,n);return -1===l?null:l}function T(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}function F(e){var t;return"object"==typeof(t=e?.[0])&&null!=t&&Array.isArray(t.items)}function B(e){return F(e)?e.flatMap(e=>e.items):e}function H(e,t){if(t&&null!=e)return t(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return T(e)}function z(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?T(e.value):T(e)}e.s(["serializeValue",0,T],186698);let q={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectionChips:e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0},hasSelectedValue:e=>{let{selectedValue:t,selectionMode:n}=e;return null!=t&&(!("multiple"===n&&Array.isArray(t))||t.length>0)},hasNullItemLabel:(e,t)=>!!t&&function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(F(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1}(e.items),open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>j(t,e,n)):j(t,r,n)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemProps:e=>e.itemProps,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight};var Y=e.i(137584),_=e.i(469690),G=e.i(381104),U=e.i(884708),W=e.i(538489);function K(e){return null==e?void 0:`${e}-popup`}let $=new Map,J=function(e={}){let t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${function e(t){return Array.isArray(t)?t.map(t=>e(t)).join(","):null==t?"":String(t)}(e.locale)}|${JSON.stringify(t)}`,r=$.get(n);if(r)return r;let l=new Intl.Collator(e.locale,t),i={contains(e,t,n){if(!t)return!0;let r=H(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(0===l.compare(r.slice(e,e+t.length),t))return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=H(e,n);return 0===l.compare(r.slice(0,t.length),t)},endsWith(e,t,n){if(!t)return!0;let r=H(e,n),i=t.length;return r.length>=i&&0===l.compare(r.slice(r.length-i),t)}};return $.set(n,i),i};var Q=e.i(223910),X=e.i(32199),Z=e.i(606039),ee=e.i(264111),et=e.i(176782);let en=Symbol("none"),er={value:en,index:-1};var el=e.i(872855);function ei(e){let h,A,{id:w,onOpenChangeComplete:M,defaultSelectedValue:P=null,selectedValue:T,onSelectedValueChange:K,defaultInputValue:$,inputValue:ei,open:ea,defaultOpen:eo=!1,selectionMode:eu,onItemHighlighted:es,name:ec,form:ed,disabled:ep=!1,readOnly:ef=!1,required:eg=!1,inputRef:em,grid:ev=!1,items:ex,filteredItems:eh,filter:eS,filterQuery:eC,openOnInputClick:eb=!0,autoHighlight:eE=!1,keepHighlight:eI=!1,highlightItemOnHover:eR=!0,loopFocus:ey=!0,itemToStringLabel:eL,itemToStringValue:eO,isItemEqualToValue:eA=N,virtualized:ew=!1,inline:eM=!1,fillInputOnItemPress:eP=!0,modal:eN=!1,limit:ej=-1,autoComplete:ek="list",formAutoComplete:eD,locale:eV,submitOnItemClick:eT=!1}=e,{clearErrors:eF}=(0,U.useFormContext)(),{setDirty:eB,validityData:eH,setFilled:ez,name:eq,disabled:eY,setTouched:e_,setFocused:eG,validationMode:eU,validation:eW}=(0,_.useFieldRootContext)(),eK=(0,el.useDirection)(),e$=(0,W.useLabelableId)({id:w}),eJ=J({locale:eV}),eQ=Array.isArray(ex)?null:ex;if(eQ&&"function"!=typeof eQ.label)throw Error((0,r.default)(100));let eX=eQ?eQ.data:ex,eZ=eQ?.value,e0=eZ?void 0:eX,e1=n.useMemo(()=>{let e;if(!eh||!eZ)return;let t=B(eh),n=t.map(eZ);return{values:n,findItem(r,l){if(!e){e=new Map;for(let r=0;r<n.length;r+=1)e.has(n[r])||e.set(n[r],t[r])}var i=e;let a=i.get(r);if(void 0!==a||l===N)return a;for(let[e,t]of i)if(j(e,r,l))return t}}},[eh,eZ]),e5=n.useMemo(()=>eQ?e=>eQ.label(e,eA,e=>{let t=e1?.findItem(e,eA);return null!=t?eQ.itemLabel(t):H(e,eL)}):eL,[eQ,eL,e1,eA]),e9=n.useMemo(()=>eQ?Object.assign(e=>eQ.itemLabel(e),{selected:e=>H(e,e5)}):eL,[eQ,e5,eL]);function e2(e){return H(e,e5)}let[e7,e4]=n.useState(!1),[e8,e3]=n.useState(null),e6=n.useRef(e8),te=n.useRef([]),tt=n.useRef([]),tn=n.useRef(null),tr=n.useRef(null),tl=n.useRef(null),ti=n.useRef(null),ta=n.useRef(null),to=n.useRef(!0),tu=n.useRef(!1),ts=n.useRef(null),tc=n.useRef(null),td=n.useRef(null),tp=n.useRef(er),tf=n.useRef(null),tg=n.useRef([]),tm=n.useRef(null),tv=eY||ep,tx=eq??ec,th="multiple"===eu,tS="single"===eu,tC=void 0!==ei||void 0!==$,tb=void 0!==eX,tE=void 0!==eh;h="always"===eE?"always":!!eE&&"input-change";let[tI,tR]=(0,l.useControlled)({controlled:T,default:th?P??p.EMPTY_ARRAY:P,name:"Combobox",state:"selectedValue"}),ty=n.useMemo(()=>null===eS?()=>!0:void 0!==eS?eS:(e,t)=>null!=e&&eJ.contains(e,t,e9),[eS,eJ,e9]),tL=(0,c.useRefWithInit)(()=>tC?$??"":tS?e2(tI):"").current,[tO,tA]=(0,l.useControlled)({controlled:ei,default:tL,name:"Combobox",state:"inputValue"}),[tw,tM]=(0,l.useControlled)({controlled:ea,default:eo,name:"Combobox",state:"open"}),tP=F(eX),tN=tw||null===e8?String(tO).trim():e8,tj=tS?e2(tI):"",tk=tS&&!e7&&""!==tN&&tj.length===tN.length&&eJ.contains(tj,tN),tD=tk?"":eC??tN,tV=tb&&tE&&tk&&(!eQ||eQ.hasValue(tI,eA)),tT=n.useMemo(()=>eX?B(eX):p.EMPTY_ARRAY,[eX]),tF=n.useMemo(()=>{if(eh&&!tV)return eh;if(!eX)return p.EMPTY_ARRAY;if(tP){let e=[],t=0;for(let n of eX){if(ej>-1&&t>=ej)break;let r=ej>-1?ej-t:1/0,l=""===tD?n.items.slice(0,r):[];if(""!==tD)for(let e of n.items){if(l.length>=r)break;ty(e,tD,e9)&&l.push(e)}if(l.length>0){let r={...n,items:l};e.push(r),t+=l.length}}return e}if(""===tD)return ej>-1?tT.slice(0,ej):tT;let e=[];for(let t of tT){if(ej>-1&&e.length>=ej)break;ty(t,tD,e9)&&e.push(t)}return e},[eh,tV,eX,tP,tD,ej,ty,e9,tT]),tB=n.useMemo(()=>{if(e1&&tF===eh)return e1.values;let e=B(tF);return eZ?e.map(e=>eZ(e)):e},[tF,eh,e1,eZ]),tH=(0,c.useRefWithInit)(()=>{let e=null;return eM&&tw&&tb&&"none"!==eu&&(e=V(tB,tI,eA,th)),new d.ReactStore({id:e$,labelId:void 0,selectedValue:tI,open:tw,items:e0,selectionMode:eu,name:tx,form:ed,disabled:tv,readOnly:ef,required:eg,grid:ev,virtualized:ew,openOnInputClick:eb,itemToStringLabel:e5,isItemEqualToValue:eA,modal:eN,autoHighlight:h,submitOnItemClick:eT,hasInputValue:tC,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:eM,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemProps:p.EMPTY_OBJECT,positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:"none"===eu},{onOpenChangeComplete:p.NOOP,setOpen:p.NOOP,setInputValue:p.NOOP,setSelectedValue:p.NOOP,setIndices:p.NOOP,handleSelection:p.NOOP,forceMount:p.NOOP,requestSubmit:p.NOOP,listRef:te,labelsRef:tt,popupRef:tn,emptyRef:ta,inputRef:tr,startDismissRef:tl,endDismissRef:ti,keyboardActiveRef:to,chipsContainerRef:ts,clearRef:tc,valuesRef:tg,pointerDownItemRef:tm,selectionEventRef:td},q)}).current,tz="none"===eu?tO:tI,tq=n.useMemo(()=>"none"===eu?tz:Array.isArray(tI)?tI.map(e=>z(e,eO)):z(tI,eO),[tz,eO,eu,tI]),tY=(0,a.useStableCallback)(es),t_=(0,a.useStableCallback)(M),tG=tH.useState("activeIndex"),tU=tH.useState("selectedIndex"),tW=tH.useState("positionerElement"),tK=tH.useState("listElement"),t$=tH.useState("triggerElement"),tJ=tH.useState("inputElement"),tQ=tH.useState("inputGroupElement"),tX=tH.useState("inline"),tZ=tH.useState("inputInsidePopup"),t0=tH.useState("inputOwnsFormValue"),t1=tS&&!tZ&&tO===tj,t5=(0,u.useValueAsRef)(t$),{mounted:t9,setMounted:t2,transitionStatus:t7}=(0,Q.useTransitionStatus)(tw),{openMethod:t4,triggerProps:t8}=(0,X.useOpenInteractionType)(tw),t3=(0,a.useStableCallback)(()=>tq);(0,G.useRegisterFieldControl)(tZ?t5:tr,e$,tz,t3,!tv,ec);let t6=(0,a.useStableCallback)(()=>{eX?tt.current=tB.map(e2):tH.set("forceMounted",!0)}),ne=(0,a.useStableCallback)((e,t,n)=>{if(-1===t){if(tp.current===er)return;tp.current=er}else tp.current={value:e,index:t};tY(e,(0,b.createGenericEventDetails)(n,void 0,{index:t}))}),nt=(0,a.useStableCallback)(e=>{let t={};void 0!==e.activeIndex&&(t.activeIndex=e.activeIndex),void 0!==e.selectedIndex&&(t.selectedIndex=e.selectedIndex),tH.update(t);let n=e.activeIndex;if(void 0===n)return;let r=e.type||E.REASONS.none;null===n?ne(void 0,-1,r):ne(tg.current[n],n,r)}),nn=(0,a.useStableCallback)((t,n)=>{if(e.onInputValueChange?.(t,n),!n.isCanceled){if(tu.current=n.reason===E.REASONS.inputClear,n.reason===E.REASONS.inputChange){tw&&null!==e8&&e3(null);let e=n.event,r=e.inputType;if("compositionend"===e.type||null!=r&&""!==r&&"insertReplacementText"!==r){let e=""!==t.trim();e&&e4(!0),tf.current={hasQuery:e};let n=tH.state.listElement;if(!tH.state.virtualized&&n){let e=tn.current;for(let t of(0,f.getOverflowAncestors)(n.firstElementChild??n)){if(!(0,f.isHTMLElement)(t)||(e?!(0,C.contains)(e,t):"dialog"===t.getAttribute("role")))break;if(function(e,t=!1){let{overflowY:n}=(0,f.getComputedStyle)(e);return("auto"===n||"scroll"===n)&&(t?e.clientHeight>0:e.scrollHeight>e.clientHeight)}(t)){t.scrollTop=0;break}}}e&&h&&null==tH.state.activeIndex&&(tw||tX)&&tH.set("activeIndex",0)}}else n.reason===E.REASONS.inputClear&&""===t&&tH.state.inputInsidePopup&&(tf.current={hasQuery:!1,selection:!0});tA(t)}}),nr=(0,a.useStableCallback)(e=>{let t=!e&&tZ&&!tX&&""!==tO&&(String(tO).trim()===e8||tO===tj);!e&&(t||""===tO||t1)&&e4(!1),e3(null),t&&nn("",(0,b.createChangeEventDetails)(E.REASONS.inputClear))}),nl=(0,a.useStableCallback)((t,n)=>{if(tw!==t&&(n.reason===E.REASONS.escapeKey&&tb&&0===tB.length&&!ta.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(t&&null!==e8&&nr(n.reason===E.REASONS.inputChange),!t&&e7&&(tS?(tX||e3(tN),""===tN&&e4(!1)):th&&(tX||e3(tN),tZ&&nt({activeIndex:null}),(!tZ||tX)&&nn("",(0,b.createChangeEventDetails)(E.REASONS.inputClear,n.event,void 0,{isItemPress:n.reason===E.REASONS.itemPress})))),tM(t),!t&&tZ&&(n.reason===E.REASONS.focusOut||n.reason===E.REASONS.outsidePress))&&(e_(!0),eG(!1),"onBlur"===eU))){let e="none"===eu?tO:tI;eW.commit(e)}}),ni=(0,a.useStableCallback)((e,t)=>{K?.(e,t),t.isCanceled||(tR(e),("none"===eu&&tn.current&&eP||tS&&!tH.state.inputInsidePopup)&&nn(e2(e),(0,b.createChangeEventDetails)(t.reason,t.event)))}),na=(0,a.useStableCallback)((e,t)=>{let n=(0,C.getTarget)(e),r=td.current??e;td.current=null;let l=(0,b.createChangeEventDetails)(E.REASONS.itemPress,r),i=n?.closest("a")?.getAttribute("href");if(i){i.startsWith("#")&&nl(!1,l);return}if(th){let e=Array.isArray(tI)?tI:[],n=k(e,t,eA);if(ni(n?e.filter(e=>!j(t,e,eA)):[...e,t],l),l.isCanceled||!(tr.current&&""!==tr.current.value.trim()))return;if(tH.state.inputInsidePopup){nn("",(0,b.createChangeEventDetails)(E.REASONS.inputClear,l.event,void 0,{isItemPress:!0}));let e=tf.current;e&&!n&&(e.toggledValue=t)}else nl(!1,l)}else{if(ni(t,l),l.isCanceled)return;nl(!1,l)}}),no=(0,a.useStableCallback)(()=>{let e=eW.inputRef.current?.form??tH.state.inputElement?.form;e&&"function"==typeof e.requestSubmit&&e.requestSubmit()}),nu=(0,a.useStableCallback)(()=>{if(t2(!1),t_?.(!1),e4(!1),e3(null),"none"===eu?nt({activeIndex:null,selectedIndex:null}):nt({activeIndex:null}),th&&tr.current&&""!==tr.current.value&&!tu.current&&nn("",(0,b.createChangeEventDetails)(E.REASONS.inputClear)),tS)if(tH.state.inputInsidePopup)tr.current&&""!==tr.current.value&&nn("",(0,b.createChangeEventDetails)(E.REASONS.inputClear));else{let e=e2(tI);if(tr.current&&tr.current.value!==e){let t=""===e?E.REASONS.inputClear:E.REASONS.none;nn(e,(0,b.createChangeEventDetails)(t))}}}),ns=n.useMemo(()=>tX&&tW?{current:tW.closest('[role="dialog"]')}:tn,[tX,tW]);(0,Y.useOpenChangeComplete)({enabled:!e.actionsRef,open:tw,ref:ns,onComplete(){tw||nu()}}),n.useImperativeHandle(e.actionsRef,()=>({unmount:nu}),[nu]),(0,i.useIsoLayoutEffect)(function(){let e=null!==e6.current&&null===e8;e6.current=e8,(!tw||e&&tb)&&(tw||(tm.current=null),"none"===eu||nt({selectedIndex:V(tb?tB:tg.current,tI,eA,th)}))},[tw,e8,tI,eu,th,tb,tB,eA,nt]),(0,i.useIsoLayoutEffect)(()=>{eX&&(tg.current=tB,te.current.length=tB.length)},[eX,tB]),(0,i.useIsoLayoutEffect)(()=>{let e=tf.current;if(e){let t=tw||tX||tH.state.positionerElement?.hidden===!1;if(e.hasQuery)h&&t&&tH.set("activeIndex",0),tf.current=null;else if(""===String(tO).trim()&&(tf.current=null,t)){let t=e.selection;"always"!==h||t||"none"!==tH.state.selectionMode||tH.set("activeIndex",0),queueMicrotask(()=>{if(!tH.state.open&&!tH.state.inline||tr.current&&""!==tr.current.value.trim())return;let n=tH.state.selectedValue,r="multiple"===tH.state.selectionMode;if(r&&Array.isArray(n)?n.length>0:"none"!==tH.state.selectionMode&&null!=n){let t=tb||tE?tB:tg.current,l=D(t,e.toggledValue,tH.state.isItemEqualToValue);tH.set("activeIndex",-1!==l?l:V(t,n,tH.state.isItemEqualToValue,r))}else t?tH.set("activeIndex",null):"always"===h&&tH.set("activeIndex",0)})}}if(!tw&&!tX)return;let t=tb||tE?tB:tg.current,n=tH.state.activeIndex;if(null==n)return"always"===h&&t.length>0?void tH.set("activeIndex",0):void ne(void 0,-1,E.REASONS.none);if(n>=t.length){ne(void 0,-1,E.REASONS.none),tH.set("activeIndex",null);return}let r=t[n],l=tp.current.value,i=l!==en&&j(r,l,tH.state.isItemEqualToValue);tp.current.index===n&&i||ne(r,n,E.REASONS.none)},[tG,h,ne,tE,tb,tB,tX,tw,tH,tO]),(0,i.useIsoLayoutEffect)(()=>{"none"===eu?ez(""!==String(tO)):ez(th?Array.isArray(tI)&&tI.length>0:null!=tI)},[ez,eu,tO,tI,th]),n.useEffect(()=>{tb&&h&&0===tB.length&&nt({activeIndex:null})},[tb,h,tB.length,nt]);let nc=!1;function nd(){nc||tO===tj||(nc=!0,nn(tj,(0,b.createChangeEventDetails)(E.REASONS.none)))}function np(){!tS||tC||tZ||e7||nd()}(0,Z.useValueChanged)(tN,function(){tw&&""!==tN&&tN!==String(tL)&&!t1&&e4(!0)}),(0,Z.useValueChanged)(tw,function(){tw&&null!==e8&&nr(!1)}),(0,Z.useValueChanged)(tI,function(){if("none"!==eu){var e;eF(tx),eB((e=eH.initialValue,Array.isArray(tI)&&Array.isArray(e)?!function(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let l=0;l<r;l+=1)if(!n(e[l],t[l]))return!1;return!0}(tI,e,(e,t)=>j(e,t,eA)):tI!==e)),eW.change(tI),!tS||tC||tZ||nd()}}),(0,Z.useValueChanged)(tj,np),(0,Z.useValueChanged)(eX,np),(0,Z.useValueChanged)(tO,function(){"none"===eu&&(eF(tx),eB(tO!==eH.initialValue),eW.change(tO))});let nf=(0,m.useFloatingRootContext)({open:!!tX||tw,onOpenChange:nl,elements:{reference:tZ?t$:tJ,floating:tW}}),ng=ev?"grid":"listbox",nm=tw||tX,nv=nm?"true":"false",nx=n.useMemo(()=>{let e=tJ?.tagName==="INPUT",t=null==tJ||e,n=t||nm,r=t?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return n&&(r.role="combobox",r["aria-expanded"]=nv,r["aria-haspopup"]=ng,r["aria-controls"]=nm?tK?.id:void 0,r["aria-autocomplete"]=ef?"none":ek),{reference:r,floating:{role:"presentation"}}},[tJ,nm,nv,ng,tK?.id,ek,ef]),nh=(0,x.useClick)(nf,{enabled:!tv&&eb,event:"mousedown-only",toggle:!1,touchOpenDelay:100*!tZ,reason:E.REASONS.inputPress}),nS=(0,g.useDismiss)(nf,{enabled:!tv&&!tX,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:!!tX||void 0,outsidePress(e){let t=(0,C.getTarget)(e);return!(0,C.contains)(t$,t)&&!(0,C.contains)(tc.current,t)&&!(0,C.contains)(ts.current,t)&&!(0,C.contains)(tQ,t)}}),nC=(0,v.useListNavigation)(nf,{enabled:!tv,id:e$,listRef:te,activeIndex:tG,selectedIndex:tU,virtual:!0,loopFocus:ey,allowEscape:ey&&!h,focusItemOnOpen:!e7&&("none"!==eu||!!h)&&"auto",focusItemOnHover:eR,resetOnPointerLeave:!eI,orientation:ev?"horizontal":void 0,rtl:"rtl"===eK,disabledIndices:p.EMPTY_ARRAY,grid:ev?S:void 0,onNavigate(e,t){(t||tw)&&"ending"!==t7&&(t?nt({activeIndex:e,type:to.current?E.REASONS.keyboard:E.REASONS.pointer}):nt({activeIndex:e}))}}),nb=n.useMemo(()=>(0,et.mergeProps)(nC.reference,{onKeyDown(e){ev&&null==tH.state.activeIndex&&("ArrowLeft"===e.key||"ArrowRight"===e.key)&&e.preventBaseUIHandler()}},nS.reference,nh.reference,nx.reference),[nC.reference,nS.reference,nh.reference,nx.reference,ev,tH]),nE=n.useMemo(()=>(0,et.mergeProps)(ee.FOCUSABLE_POPUP_PROPS,nS.floating),[nS.floating]),nI=n.useMemo(()=>(0,et.mergeProps)(nC.floating,nx.floating),[nC.floating,nx.floating]),nR=n.useMemo(()=>{let e=nC.item;return e?{...e,onFocus:void 0}:p.EMPTY_OBJECT},[nC.item]);tH.useContextCallback("setOpen",nl),tH.useContextCallback("setInputValue",nn),tH.useContextCallback("setSelectedValue",ni),tH.useContextCallback("setIndices",nt),tH.useContextCallback("handleSelection",na),tH.useContextCallback("forceMount",t6),tH.useContextCallback("requestSubmit",no),tH.useContextCallback("onOpenChangeComplete",M),(A=n.useRef(!0)).current&&(A.current=!1,(()=>{tH.update({inline:eM,popupProps:nE,listProps:nI,inputProps:nb,triggerProps:t8,itemProps:nR})})());let ny={id:e$,selectedValue:tI,open:tw,mounted:t9,transitionStatus:t7,items:e0,inline:eM,popupProps:nE,listProps:nI,inputProps:nb,triggerProps:t8,itemProps:nR,openMethod:t4,selectionMode:eu,name:tx,form:ed,disabled:tv,readOnly:ef,required:eg,grid:ev,virtualized:ew,openOnInputClick:eb,itemToStringLabel:e5,modal:eN,autoHighlight:h,isItemEqualToValue:eA,submitOnItemClick:eT,hasInputValue:tC};(0,i.useIsoLayoutEffect)(()=>{tH.update({...ny,inputOwnsFormValue:"none"===eu&&(eM||!tH.state.inputInsidePopup)})},[tH,...Object.values(ny)]);let nL=(0,o.useMergedRefs)(em,eW.inputRef),nO=n.useMemo(()=>({query:tN,hasItems:tb,filteredItems:tF,flatFilteredValues:tB}),[tN,tb,tF,tB]),nA=n.useMemo(()=>Array.isArray(tz)?"":z(tz,eO),[tz,eO]),nw=th&&Array.isArray(tI)&&tI.length>0,nM=th||"none"===eu&&t0?void 0:tx,nP=n.useMemo(()=>th&&Array.isArray(tI)&&tx?tI.map(e=>{let n=z(e,eO);return(0,t.jsx)("input",{type:"hidden",form:ed,name:tx,value:n,disabled:tv},n)}):null,[th,tI,ed,tx,eO,tv]),nN=(0,t.jsxs)(n.Fragment,{children:[e.children,(0,t.jsx)("input",{...eW.getValidationProps(tv,{onFocus(){tZ?t$?.focus():(tr.current||t$)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||tv||ef)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=(0,b.createChangeEventDetails)(E.REASONS.none,e.nativeEvent),l=()=>tg.current.findIndex(e=>z(e,eO).toLowerCase()===n||e2(e).toLowerCase()===n);tS&&(t6(),eX&&-1===l()&&tH.set("forceMounted",!0)),queueMicrotask(function(){if(th)return;if("none"===eu)return void nn(t,r);let e=l();-1===e&&(e=tg.current.findIndex((e,t)=>{let r=tt.current[t];return null!=r&&r.toLowerCase()===n}));let i=-1===e?void 0:tg.current[e];null!=i&&ni?.(i,r)})}}),id:e$&&null==nM?`${e$}-hidden-input`:void 0,form:ed,name:nM,autoComplete:eD,disabled:tv,required:eg&&!nw,readOnly:ef,value:nA,ref:nL,style:nM?s.visuallyHiddenInput:s.visuallyHidden,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),nP]});return(0,t.jsx)(I.Provider,{value:tH,children:(0,t.jsx)(R.Provider,{value:nf,children:(0,t.jsx)(L.Provider,{value:tb,children:(0,t.jsx)(y.Provider,{value:nO,children:(0,t.jsx)(O.Provider,{value:tO,children:nN})})})})})}var ea=e.i(439957),eo=e.i(108868),eu=e.i(552245),es=e.i(540886),ec=e.i(879938),ed=e.i(875812),ep=e.i(145147);ep.CommonTriggerDataAttributes.popupOpen,ep.CommonTriggerDataAttributes.pressed;let ef={...ec.pressableTriggerOpenStateMapping,...ed.fieldValidityMapping,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};var eg=e.i(247778),em=e.i(157940),ev=e.i(264042),ex=e.i(736760);function eh(e){let t=e.useState("mounted"),n=e.useState("popupSide"),r=e.useState("positionerElement");return t&&r?n:null}function eS(){return 0===M().filteredItems.length}function eC(e,t,n){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=n,r.click(),e.context.selectionEventRef.current=null)}let eb=n.forwardRef(function(e,t){let r,{render:l,className:i,nativeButton:o=!0,disabled:u=!1,id:s,style:c,...d}=e,{state:p,disabled:f,setTouched:g,setFocused:m,validationMode:v,validation:h}=(0,_.useFieldRootContext)(),{labelId:S}=(0,eg.useLabelableContext)(),I=A(),R=I.useState("selectionMode"),y=I.useState("disabled"),L=I.useState("readOnly"),O=I.useState("required"),M=I.useState("positionerElement"),N=I.useState("listElement"),j=I.useState("popupId"),k=I.useState("triggerProps"),D=I.useState("inputInsidePopup"),V=I.useState("id"),T=I.useState("labelId"),F=I.useState("open"),B=I.useState("selectedValue"),H=I.useState("activeIndex"),z=I.useState("selectedIndex"),q=I.useState("hasSelectedValue"),Y=w(),G=P(),U=(0,ea.useTimeout)(),$=f||y||u,J=eS(),Q=eh(I);(0,W.useLabelableId)({id:D?s:void 0});let X=D?s??V:s;F&&D?r=j??K(V):F&&(r=N?.id);let Z=n.useRef("");function ee(e){Z.current=e.pointerType}let{reference:et}=(0,ex.useTypeahead)(Y,{enabled:!F&&!L&&!y&&"single"===R,listRef:I.context.labelsRef,activeIndex:H,selectedIndex:z,onMatch(e){let t=I.context.valuesRef.current[e];void 0!==t&&I.context.setSelectedValue(t,(0,b.createChangeEventDetails)(E.REASONS.none))}}),{reference:en}=(0,x.useClick)(Y,{enabled:!y,event:"mousedown"}),{buttonRef:er,getButtonProps:el}=(0,es.useButton)({native:o,disabled:$}),ei={...p,readOnly:L,open:F,disabled:$,popupSide:Q,listEmpty:J,placeholder:"none"!==R&&!q},ec=(0,a.useStableCallback)(e=>{I.set("triggerElement",e)});return(0,eu.useRenderElement)("button",e,{ref:[t,er,ec],state:ei,props:[k,en,et,{id:X,tabIndex:D?0:-1,role:D?"combobox":void 0,"aria-expanded":F,"aria-haspopup":D?"dialog":"listbox","aria-controls":r,"aria-required":D&&O||void 0,"aria-readonly":D&&L||void 0,"aria-labelledby":S??T,onPointerDown:ee,onPointerEnter:ee,onFocus(){m(!0),$||U.start(0,I.context.forceMount)},onBlur(e){(0,C.contains)(M,e.relatedTarget)||(g(!0),m(!1),"onBlur"===v&&h.commit("none"===R?G:B))},onMouseDown(e){if($||(D||Y.set("domReferenceElement",e.currentTarget),I.context.forceMount(),"touch"!==Z.current&&(I.context.inputRef.current?.focus(),D||e.preventDefault()),F))return;let t=(0,eo.ownerDocument)(e.currentTarget);D&&t.addEventListener("mouseup",function(e){let t=I.state.triggerElement;if(!t)return;let n=(0,C.getTarget)(e),r=I.state.positionerElement,l=I.state.listElement;(0,C.contains)(t,n)||(0,C.contains)(r,n)||(0,C.contains)(l,n)||(0,ev.isMouseWithinBounds)(e,t)||I.context.setOpen(!1,(0,b.createChangeEventDetails)(E.REASONS.cancelOpen,e))},{once:!0})},onKeyDown(e){("ArrowDown"===e.key||"ArrowUp"===e.key)&&((0,em.stopEvent)(e),I.context.setOpen(!0,(0,b.createChangeEventDetails)(E.REASONS.listNavigation,e.nativeEvent)),I.context.inputRef.current?.focus())}},h.getValidationProps($,d),el],stateAttributesMapping:ef})});var eE=e.i(328744),eI=e.i(788015);let eR=n.createContext(void 0),ey=n.createContext(void 0);function eL(e){let t=n.useContext(ey);if(void 0===t&&!e)throw Error((0,r.default)(21));return t}let eO=n.forwardRef(function(e,n){let r=A(),{buttonRef:l,getButtonProps:i}=(0,es.useButton)({native:!1}),a=(0,o.useMergedRefs)(n,l),u=i({onClick:function(e){r.context.setOpen(!1,(0,b.createChangeEventDetails)(E.REASONS.closePress,e.nativeEvent,e.currentTarget))}});return(0,t.jsx)("span",{ref:a,...u,"aria-label":"Dismiss",tabIndex:void 0,style:s.visuallyHiddenInput})}),eA=n.forwardRef(function(e,r){let{render:l,className:i,disabled:o=!1,id:u,style:s,...c}=e,{state:d,disabled:p,setTouched:f,setFocused:g,validationMode:m,validation:v}=(0,_.useFieldRootContext)(),{labelId:x}=(0,eg.useLabelableContext)(),h=n.useContext(eR),S=!!eL(!0),C=A(),I=P(),R=(0,el.useDirection)(),y=C.useState("required"),L=C.useState("disabled"),O=C.useState("readOnly"),w=C.useState("name"),M=C.useState("form"),N=C.useState("selectionMode"),j=C.useState("autoHighlight"),k=C.useState("inputProps"),D=C.useState("triggerProps"),V=C.useState("open"),T=C.useState("mounted"),F=C.useState("selectedValue"),B=C.useState("id"),H=C.useState("inline"),z=C.useState("modal"),q=!!j,Y=eh(C),G=p||L||o,U=eS(),W=S||H,K=(0,eI.useBaseUiId)(u??(W?void 0:B)),$=S?ed.DEFAULT_FIELD_STATE_ATTRIBUTES:d,[J,Q]=n.useState(null),X=n.useRef(!1),Z=n.useRef(null),ee=n.useRef(!1),et="none"===N&&!S,en=(0,a.useStableCallback)(e=>{let t=S||C.state.inline;t&&!C.state.hasInputValue&&C.context.setInputValue("",(0,b.createChangeEventDetails)(E.REASONS.none)),C.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:et})}),er=S?c:v.getValidationProps(G,c);function ei(){C.context.setIndices({activeIndex:null,selectedIndex:null,type:C.context.keyboardActiveRef.current?E.REASONS.keyboard:E.REASONS.pointer})}function ea(){C.context.keyboardActiveRef.current=!1}let eo={...$,open:V,disabled:G,readOnly:O,popupSide:Y,listEmpty:U},es=(0,eu.useRenderElement)("input",e,{state:eo,ref:[r,C.context.inputRef,en],props:[k,D,{value:J??I,"aria-readonly":O||void 0,"aria-required":y||void 0,"aria-labelledby":x,disabled:G,readOnly:O,required:"none"===N?y:void 0,form:M,...et&&w&&{name:w},id:K,onFocus(){if(g(!0),!H||!ee.current)return;ee.current=!1;let e=Z.current;null!=e&&Object.hasOwn(C.context.valuesRef.current,e)&&C.context.setIndices({activeIndex:e})},onBlur(){f(!0),g(!1);let e=C.state.activeIndex;if(H&&null!==e&&"always"!==j&&(Z.current=e,ee.current=!0,C.context.setIndices({activeIndex:null})),"onBlur"===m){let e="none"===N?I:F;v.commit(e)}},onCompositionStart(e){eE.platform.os.android||(X.current=!0,Q(e.currentTarget.value))},onCompositionEnd(e){X.current=!1;let t=e.currentTarget.value;Q(null),C.context.setInputValue(t,(0,b.createChangeEventDetails)(E.REASONS.inputChange,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=X.current||!(!n||"insertReplacementText"===n);function l(e){!O&&!G&&e&&r&&(C.context.setOpen(!0,(0,b.createChangeEventDetails)(E.REASONS.inputChange,t)),q||ei())}if(X.current){let n=e.currentTarget.value;Q(n),""!==n||C.state.openOnInputClick||C.state.inputInsidePopup||C.context.setOpen(!1,(0,b.createChangeEventDetails)(E.REASONS.inputClear,t));let r=n.trim(),i=q&&""!==r;l(r),V&&null!==C.state.activeIndex&&!i&&ei();return}let i=(0,b.createChangeEventDetails)(E.REASONS.inputChange,t);if(C.context.setInputValue(e.currentTarget.value,i),i.isCanceled)return;let a=""===e.currentTarget.value,o=(0,b.createChangeEventDetails)(E.REASONS.inputClear,t);a&&!C.state.inputInsidePopup&&("single"===N&&C.context.setSelectedValue(null,o),C.state.openOnInputClick||C.context.setOpen(!1,o)),l(e.currentTarget.value.trim()),V&&null!==C.state.activeIndex&&!q&&ei()},onKeyDown(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(C.context.keyboardActiveRef.current=!0,G||O){O&&"Enter"===e.key&&V&&null!==C.state.activeIndex&&(0,em.stopEvent)(e);return}let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r="rtl"===R;if("Home"===e.key){(0,em.stopEvent)(e);let n=eE.platform.engine.gecko&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if("End"===e.key){(0,em.stopEvent)(e);let l=eE.platform.engine.gecko&&r?0:t.value.length;t.setSelectionRange(l,l),t.scrollLeft=r?-n:n;return}if(!T&&"Escape"===e.key){let t="multiple"===N&&Array.isArray(F)?0===F.length:null===F,n=(0,b.createChangeEventDetails)(E.REASONS.escapeKey,e.nativeEvent);C.context.setInputValue("",n),C.context.setSelectedValue("multiple"===N?[]:null,n),t||C.state.inline||n.isPropagationAllowed||e.stopPropagation();return}if(h&&"Backspace"===e.key&&""===t.value&&void 0===h.highlightedChipIndex&&Array.isArray(F)&&F.length>0){let t=h.chipsRef.current.length,n=t>0?t-1:F.length-1,r=F.filter((e,t)=>t!==n);ei(),C.context.setSelectedValue(r,(0,b.createChangeEventDetails)(E.REASONS.none,e.nativeEvent));return}let l=h?.highlightedChipIndex!==void 0,i=function(e){let t;if(!h)return;let{highlightedChipIndex:n}=h,r=h.chipsRef.current.length,[l,i]="rtl"===R?["ArrowRight","ArrowLeft"]:["ArrowLeft","ArrowRight"];if(void 0!==n){if(e.key===l)e.preventDefault(),t=n>0?n-1:void 0;else if(e.key===i)e.preventDefault(),t=n<r-1?n+1:void 0;else if("Backspace"===e.key||"Delete"===e.key){var a;let r;e.preventDefault(),t=(r=n>=(a=F.length)-1?a-2:n)>=0?r:void 0,ei()}return t}return e.key===l&&(e.currentTarget.selectionStart??0)===0&&F.length>0&&(e.preventDefault(),t=r>0?r-1:void 0),t}(e);if(h?.setHighlightedChipIndex(i),void 0!==i?h?.chipsRef.current[i]?.focus():l&&C.context.inputRef.current?.focus(),229!==e.which&&"Enter"===e.key&&V){let t=C.state.activeIndex,n=e.nativeEvent;if(null===t){if(H)return;C.context.setOpen(!1,(0,b.createChangeEventDetails)(E.REASONS.none,n));return}(0,em.stopEvent)(e),eC(C,t,n)}},onPointerMove:ea,onPointerDown:ea},er],stateAttributesMapping:ef}),ec=S?(0,t.jsx)(_.FieldRootContext.Provider,{value:_.DEFAULT_FIELD_ROOT_CONTEXT,children:es}):es;return(0,t.jsxs)(n.Fragment,{children:[V&&(!W||z)&&(0,t.jsx)(eO,{ref:C.context.startDismissRef}),ec]})});var ew=e.i(596296);let eM=n.forwardRef(function(e,t){let{render:n,className:r,style:l,...i}=e,{state:o}=(0,_.useFieldRootContext)(),u=A(),s=u.useState("open"),c=u.useState("disabled"),d=u.useState("readOnly"),p=u.useState("hasSelectedValue"),g=u.useState("selectionMode"),m=eh(u),v=eS(),x={...o,open:s,disabled:c,readOnly:d,popupSide:m,listEmpty:v,placeholder:"none"!==g&&!p},h=(0,a.useStableCallback)(e=>{u.set("inputGroupElement",e)});return(0,eu.useRenderElement)("div",e,{ref:[t,h],props:[{role:"group",onMouseDown(e){!function(e,t,n,r){if(e.baseUIHandlerPrevented)return;let l=(0,C.getTarget)(e.nativeEvent),i=(0,f.isElement)(l)?l:null;i!==e.currentTarget&&(r?.(i)||(0,ew.isInteractiveElement)(i))||(e.preventDefault(),!n&&(t.context.inputRef.current?.focus(),t.state.openOnInputClick&&t.context.setOpen(!0,(0,b.createChangeEventDetails)(E.REASONS.inputPress,e.nativeEvent))))}(e,u,c,e=>(0,C.contains)(u.context.chipsContainerRef.current,e))}},i],state:x,stateAttributesMapping:ef})}),eP=n.forwardRef(function(e,t){let{render:n,className:r,style:l,...i}=e;return(0,eu.useRenderElement)("span",e,{ref:t,props:[{"aria-hidden":!0,children:"▼"},i]})});var eN=e.i(474354);let ej={...eN.transitionStatusMapping,...ec.triggerOpenStateMapping},ek=n.forwardRef(function(e,t){let{render:n,className:r,disabled:l=!1,nativeButton:i=!0,keepMounted:a=!1,style:o,...u}=e,{disabled:s}=(0,_.useFieldRootContext)(),c=A(),d=c.useState("selectionMode"),p=c.useState("disabled"),f=c.useState("readOnly"),g=c.useState("open"),m=c.useState("selectedValue"),v=c.useState("hasSelectionChips"),x=P(),h=!1;h="none"===d?""!==x:"single"===d?null!=m:v;let S=s||p||l,{buttonRef:C,getButtonProps:I}=(0,es.useButton)({native:i,disabled:S}),{mounted:R,transitionStatus:y,setMounted:L}=(0,Q.useTransitionStatus)(h),O={disabled:S,visible:h,open:g,transitionStatus:y};(0,Y.useOpenChangeComplete)({open:h,ref:c.context.clearRef,onComplete(){h||L(!1)}});let w=(0,eu.useRenderElement)("button",e,{state:O,ref:[t,C,c.context.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(e){e.preventDefault()},onClick(e){if(S||f)return;let t=c.context.keyboardActiveRef.current?E.REASONS.keyboard:E.REASONS.pointer;c.context.setInputValue("",(0,b.createChangeEventDetails)(E.REASONS.clearPress,e.nativeEvent)),"none"!==d?(c.context.setSelectedValue(Array.isArray(m)?[]:null,(0,b.createChangeEventDetails)(E.REASONS.clearPress,e.nativeEvent)),c.context.setIndices({activeIndex:null,selectedIndex:null,type:t})):c.context.setIndices({activeIndex:null,type:t}),c.context.inputRef.current?.focus()}},u,I],stateAttributesMapping:ej});return a||R?w:null}),eD=n.createContext(null);function eV(e){let{children:r,items:l}=e,i=n.useMemo(()=>({items:l}),[l]);return(0,t.jsx)(eD.Provider,{value:i,children:r})}function eT(e){let{children:r}=e,{filteredItems:l}=M(),i=n.useContext(eD),a=i?i.items:l;return(0,t.jsx)(n.Fragment,{children:a.map(r)})}var eF=e.i(53687);let eB=n.forwardRef(function(e,r){var l;let{render:i,className:o,style:u,children:s,...c}=e,d=A(),p=w(),f=!!eL(!0),{filteredItems:g,hasItems:m}=M(),v=d.useState("selectionMode"),x=d.useState("grid"),h=d.useState("readOnly"),S=d.useState("listProps"),C=d.useState("virtualized"),b=d.useState("forceMounted"),E=0===g.length,I=(0,a.useStableCallback)(e=>{d.set("positionerElement",e)}),R=(0,a.useStableCallback)(e=>{d.set("listElement",e)}),y=n.useMemo(()=>"function"==typeof s?l||(l=(0,t.jsx)(eT,{children:s})):s,[s]),L=p.useState("floatingId"),O=(0,eu.useRenderElement)("div",e,{state:{empty:E},ref:[r,R,f?null:I],props:[S,{children:y,tabIndex:-1,id:L,role:x?"grid":"listbox","aria-multiselectable":"multiple"===v?"true":void 0,"aria-readonly":!x&&!!h||void 0,onKeyDown(e){if(!d.state.disabled&&!d.state.readOnly&&"Enter"===e.key){let t=d.state.activeIndex;null!=t&&((0,em.stopEvent)(e),eC(d,t,e.nativeEvent))}},onKeyDownCapture(){d.context.keyboardActiveRef.current=!0},onPointerMoveCapture(){d.context.keyboardActiveRef.current=!1}},c]});if(C)return O;let P=m&&!b?void 0:d.context.labelsRef;return(0,t.jsx)(eF.CompositeList,{elementsRef:d.context.listRef,labelsRef:P,children:O})});function eH(){let e=(0,ea.useTimeout)(),t=n.useRef(null);return n.useEffect(()=>{if(eE.platform.os.ios)return;let n=t.current;if(null==n)return;let r=function(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;""!==e.nodeValue&&(n=e)}return n}(n);if(null==r)return;let l=r.data,i=`${l}\u2060`;return r.nodeValue=i,e.start(200,()=>{r.nodeValue===i&&(r.nodeValue=l)}),()=>{e.clear(),r.nodeValue===i&&(r.nodeValue=l)}},[t,e]),t}let ez=n.forwardRef(function(e,t){let{render:n,className:r,style:l,children:i,...a}=e,o=eH();return(0,eu.useRenderElement)("div",e,{ref:[t,o],props:[{children:i,role:"status","aria-live":"polite","aria-atomic":!0},a]})});var eq=e.i(726674);let eY=n.createContext(void 0),e_=n.forwardRef(function(e,n){let{keepMounted:r=!1,...l}=e,i=A(),a=i.useState("mounted"),o=i.useState("forceMounted");return a||r||o?(0,t.jsx)(eY.Provider,{value:r,children:(0,t.jsx)(eq.FloatingPortal,{ref:n,...l})}):null}),eG={...ec.popupStateMapping,...eN.transitionStatusMapping},eU=n.forwardRef(function(e,t){let{render:n,className:r,style:l,...i}=e,a=A(),o=a.useState("open"),u=a.useState("mounted"),s=a.useState("transitionStatus");return(0,eu.useRenderElement)("div",e,{state:{open:o,transitionStatus:s},ref:t,stateAttributesMapping:eG,props:[{role:"presentation",hidden:!u,style:{userSelect:"none",WebkitUserSelect:"none"}},i]})});var eW=e.i(144394),eK=e.i(923706),e$=e.i(638396),eJ=e.i(426),eQ=e.i(789579),eX=e.i(33383);let eZ=n.forwardRef(function(e,l){let{render:o,className:u,anchor:s,positionMethod:c,side:d,align:p,sideOffset:f,alignOffset:g,collisionBoundary:m="clipping-ancestors",collisionPadding:v,arrowPadding:x,sticky:h,disableAnchorTracking:S=!1,collisionAvoidance:C=e$.DROPDOWN_COLLISION_AVOIDANCE,style:b,...E}=e,I=A(),R=w(),y=function(){let e=n.useContext(eY);if(void 0===e)throw Error((0,r.default)(20));return e}(),L=I.useState("modal"),O=I.useState("open"),M=I.useState("mounted"),P=I.useState("openMethod"),N=I.useState("positionerElement"),j=I.useState("triggerElement"),k=I.useState("inputElement"),D=I.useState("inputGroupElement"),V=I.useState("inputInsidePopup"),T=I.useState("transitionStatus"),F=eS(),B=(0,eK.useAnchorPositioning)({anchor:s??(V?j:D??k),floatingRootContext:R,positionMethod:c,mounted:M,side:d,sideOffset:f,align:p,alignOffset:g,arrowPadding:x,collisionBoundary:m,collisionPadding:v,sticky:h,disableAnchorTracking:S,keepMounted:y,collisionAvoidance:C,lazyFlip:!0});(0,eX.useAnchoredPopupScrollLock)(O&&L,"touch"===P,N,j);let H={open:O,side:B.side,align:B.align,anchorHidden:B.anchorHidden,empty:F};(0,i.useIsoLayoutEffect)(()=>{I.set("popupSide",B.side)},[I,B.side]);let z=(0,a.useStableCallback)(e=>{I.set("positionerElement",e)}),q=(0,eQ.usePositioner)(e,H,{styles:B.positionerStyles,transitionStatus:T,props:E,refs:[l,z],hidden:!M,inert:!O});return(0,t.jsxs)(ey.Provider,{value:B,children:[M&&L&&(0,t.jsx)(eJ.InternalBackdrop,{inert:(0,eW.inertValue)(!O),cutout:D??k??j}),q]})});var e0=e.i(61487),e1=e.i(253984);let e5={...ec.popupStateMapping,...eN.transitionStatusMapping},e9=n.forwardRef(function(e,r){let{render:l,className:a,style:o,initialFocus:u,finalFocus:s,...c}=e,d=A(),p=eL(),f=w(),g=d.useState("mounted"),m=d.useState("open"),v=d.useState("openMethod"),x=d.useState("popupProps"),h=d.useState("transitionStatus"),S=d.useState("inputInsidePopup"),b=d.useState("inputElement"),E=d.useState("modal"),I=d.useState("id"),R=eS(),y=c.id??(S?K(I):void 0);(0,i.useIsoLayoutEffect)(()=>(d.set("popupId",d.context.popupRef.current?.id||y),()=>{d.set("popupId",void 0)}),[d,y]),(0,Y.useOpenChangeComplete)({open:m,ref:d.context.popupRef,onComplete(){m&&d.context.onOpenChangeComplete(!0)}});let L={open:m,side:p.side,align:p.align,anchorHidden:p.anchorHidden,transitionStatus:h,empty:R},O=(0,eu.useRenderElement)("div",e,{state:L,ref:[r,d.context.popupRef],props:[x,{id:y,role:S?"dialog":"presentation",onFocus(e){let t=(0,C.getTarget)(e.nativeEvent);"touch"!==v&&((0,C.contains)(d.state.listElement,t)||t===e.currentTarget)&&d.context.inputRef.current?.focus()}},(0,e1.getDisabledMountTransitionStyles)(h),c],stateAttributesMapping:e5}),M=!!S&&(e=>"touch"===e?d.context.popupRef.current:b),P=!S||E;return(0,t.jsx)(e0.FloatingFocusManager,{context:f,disabled:!g,modal:P,openInteractionType:v,initialFocus:void 0===u?M:u,returnFocus:null!=s?s:!!S&&void 0,getInsideElements:()=>[d.context.startDismissRef.current,d.context.endDismissRef.current],children:(0,t.jsxs)(n.Fragment,{children:[O,P&&(0,t.jsx)(eO,{ref:d.context.endDismissRef})]})})}),e2=n.forwardRef(function(e,t){let{render:n,className:r,style:l,...i}=e,a=A(),{arrowRef:o,side:u,align:s,arrowUncentered:c,arrowStyles:d}=eL(),p=a.useState("open");return(0,eu.useRenderElement)("div",e,{ref:[o,t],stateAttributesMapping:ec.popupStateMapping,state:{open:p,side:u,align:s,uncentered:c},props:{style:d,"aria-hidden":!0,...i}})}),e7=n.createContext(void 0),e4=n.forwardRef(function(e,r){let{render:l,className:i,style:a,items:o,...u}=e,s=A().useState("grid"),[c,d]=n.useState(),p=n.useMemo(()=>({labelId:c,setLabelId:d,items:o}),[c,d,o]),f=(0,eu.useRenderElement)("div",e,{ref:r,props:[{role:s?"rowgroup":"group","aria-labelledby":c},u]}),g=(0,t.jsx)(e7.Provider,{value:p,children:f});return o?(0,t.jsx)(eV,{items:o,children:g}):g}),e8=n.forwardRef(function(e,t){let{render:l,className:a,style:o,id:u,...s}=e,{setLabelId:c}=function(){let e=n.useContext(e7);if(void 0===e)throw Error((0,r.default)(18));return e}(),d=(0,eI.useBaseUiId)(u);return(0,i.useIsoLayoutEffect)(()=>(c(d),()=>{c(e=>e===d?void 0:e)}),[d,c]),(0,eu.useRenderElement)("div",e,{ref:t,props:[{id:d,"aria-hidden":!0},s]})});var e3=e.i(174080),e6=e.i(673553);let te=n.createContext(void 0),tt=n.createContext(!1);function tn(e){let{componentProps:r,forwardedRef:l,virtualized:a,indexFromFilter:o}=e,{render:u,className:s,style:c,value:d=null,index:p,disabled:f=!1,nativeButton:g=!1,...m}=r,v=n.useRef(null),x=(0,e6.useCompositeListItem)({guess:!0,index:p,textRef:v}),h=A(),S=n.useContext(tt),C=n.useContext(L),b=h.useState("selectionMode"),E=h.useState("disabled"),I=h.useState("readOnly"),R=h.useState("isItemEqualToValue"),y=E||f,O="none"!==b,w=p??o??x.index,M=-1!==w,P=h.useState("id"),N=h.useState("isActive",w),D=h.useState("isSelected",d),T=h.useState("itemProps"),F=n.useRef(null),B=null!=P&&M?`${P}-${w}`:void 0,H=D&&O;(0,i.useIsoLayoutEffect)(()=>{if(!(M&&(a||null!=p)))return;let e=h.context.listRef.current;return e[w]=F.current,()=>{delete e[w]}},[M,a,w,p,h]),(0,i.useIsoLayoutEffect)(()=>{if(!M||C)return;let e=h.context.valuesRef.current;return e[w]=d,()=>{delete e[w]}},[M,C,w,d,h]),(0,i.useIsoLayoutEffect)(()=>{if(!M||C)return;let e=h.state.selectedValue,t=h.state.selectedIndex;if("multiple"===h.state.selectionMode&&Array.isArray(e)){var n,r;n=h.context.valuesRef.current,r=t,t=k(e,d,R)?null!=r&&w>r&&k(e,n[r],R)?r:w:w===r?V(n,e,R,!0):r}else j(d,e,R)&&(t=w);h.set("selectedIndex",t)},[M,C,h,w,d,R]);let{getButtonProps:z,buttonRef:q}=(0,es.useButton)({disabled:y,focusableWhenDisabled:!0,native:g,composite:!0});function Y(e){function t(){h.context.handleSelection(e,d)}h.state.submitOnItemClick?(e3.flushSync(t),h.context.requestSubmit()):t()}let _=(0,eu.useRenderElement)("div",r,{ref:[q,l,x.ref,F],state:{disabled:y,selected:H,highlighted:N},props:[T,{id:B,role:S?"gridcell":"option","aria-selected":O?H:void 0,tabIndex:void 0,onPointerDownCapture(e){e.isPrimary&&(h.context.pointerDownItemRef.current=e.currentTarget),e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){y||I||Y(e.nativeEvent)},onMouseUp(e){let t=h.context.pointerDownItemRef.current===e.currentTarget;h.context.pointerDownItemRef.current=null,y||I||0!==e.button||t||!N||Y(e.nativeEvent)}},m,z]}),G=n.useMemo(()=>({selected:H,textRef:v}),[H,v]);return(0,t.jsx)(te.Provider,{value:G,children:_})}function tr(e){let{componentProps:n,forwardedRef:r}=e,l=A().useState("isItemEqualToValue"),{flatFilteredValues:i}=M(),a=D(i,n.value??null,l);return(0,t.jsx)(tn,{componentProps:n,forwardedRef:r,virtualized:!0,indexFromFilter:a})}let tl=n.memo(n.forwardRef(function(e,n){let r=A().useState("virtualized");return r&&null==e.index?(0,t.jsx)(tr,{componentProps:e,forwardedRef:n}):(0,t.jsx)(tn,{componentProps:e,forwardedRef:n,virtualized:r,indexFromFilter:void 0})})),ti=n.forwardRef(function(e,n){let{render:r,className:l,style:i,...a}=e,o=(0,eu.useRenderElement)("div",e,{ref:n,props:[{role:"row"},a]});return(0,t.jsx)(tt.Provider,{value:!0,children:o})}),ta=n.forwardRef(function(e,t){let{render:n,className:r,style:l,children:i,...a}=e,{filteredItems:o}=M(),u=A(),s=eH(),c=0===o.length?i:null;return(0,eu.useRenderElement)("div",e,{ref:[t,u.context.emptyRef,s],props:[{children:c,role:"status","aria-live":"polite","aria-atomic":!0},a]})}),to=n.forwardRef(function(e,t){let{className:n,render:r,orientation:l="horizontal",style:i,...a}=e;return(0,eu.useRenderElement)("div",e,{state:{orientation:l},ref:t,props:[{role:"presentation"},a]})});e.s(["Arrow",0,e2,"Backdrop",0,eU,"Clear",0,ek,"Collection",0,eT,"Empty",0,ta,"Group",0,e4,"GroupLabel",0,e8,"Icon",0,eP,"Input",0,eA,"InputGroup",0,eM,"Item",0,tl,"List",0,eB,"Popup",0,e9,"Portal",0,e_,"Positioner",0,eZ,"Root",0,function(e){let r,{openOnInputClick:l=!1,value:i,defaultValue:a,onValueChange:o,mode:u="list",itemToStringValue:s,...c}=e,d=("inline"===u||"both"===u)&&!e.readOnly,p=void 0!==i,[f,g]=n.useState(a??""),[m,v]=n.useState("");n.useEffect(()=>{(p||!d)&&v("")},[i,p,d]),r=d&&""!==m?m:p?i??"":f;let x=J({locale:c.locale}),h=String((p?i:f)??"").trim(),S="inline"===u||"none"===u||null===c.filter?null:c.filter??x.contains;return(0,t.jsx)(ei,{...c,itemToStringLabel:s,openOnInputClick:l,selectionMode:"none",fillInputOnItemPress:!0,filter:S,filterQuery:"both"===u?h:void 0,autoComplete:u,inputValue:r,defaultInputValue:a,onInputValueChange:function(e,t){v(""),p||g(e),o?.(e,t)},onItemHighlighted:function(t,n){e.onItemHighlighted?.(t,n),n.reason!==E.REASONS.pointer&&v(d&&null!=t?H(t,s):"")}})},"Row",0,ti,"Separator",0,to,"Status",0,ez,"Trigger",0,eb,"Value",0,function(e){let{children:r}=e,l=P(),i=null;return i="function"==typeof r?r(String(l)):null!=r?r:l,(0,t.jsx)(n.Fragment,{children:i})},"useFilter",0,J,"useFilteredItems",0,function(){return M().filteredItems}],196799);var tu=e.i(196799),tu=tu,ts=e.i(689664),tc=e.i(716327),td=e.i(758379);e.s(["LoaderCircle",()=>td.default],611568);var td=td,tp=e.i(167881),tf=e.i(23750),tg=e.i(647163);e.s(["Combobox",0,function({value:e,onChange:r,options:l,placeholder:i,empty:a="Nothing matches",note:o="Not on the list? Type it, then save.",loading:u=!1,disabled:s=!1,className:c,"aria-label":d}){let p=new Set(l.map(e=>e.value.toLowerCase())),[f,g]=(0,n.useState)(e),[m,v]=(0,n.useState)(e);m!==e&&(v(e),g(e));let x=f.trim(),h=""!==x&&x!==e;return(0,t.jsxs)(tu.Root,{items:l,value:f,onValueChange:(e,t)=>{g(e),"item-press"===t.reason&&r(e)},itemToStringValue:e=>e.value,filter:(e,t)=>{let n;return!!(!(n=t.trim().toLowerCase())||p.has(n))||[e.value,e.label,e.badge].filter(Boolean).some(e=>String(e).toLowerCase().includes(n))},openOnInputClick:!0,disabled:s,children:[(0,t.jsxs)("div",{className:(0,tg.cn)("flex gap-2",c),children:[(0,t.jsxs)(tu.InputGroup,{className:"relative min-w-0 flex-1",children:[(0,t.jsx)(tu.Input,{placeholder:i,"aria-label":d,spellCheck:!1,className:(0,tg.cn)(tf.inputClassName,"pr-8 font-mono text-sm")}),(0,t.jsx)(tu.Trigger,{"aria-label":"Show suggestions",className:"absolute inset-y-0 right-0 flex w-8 items-center justify-center text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:text-foreground disabled:opacity-50",children:u?(0,t.jsx)(td.default,{className:"size-3.5 animate-spin"}):(0,t.jsx)(tc.ChevronDown,{className:"size-3.5"})})]}),h&&!s&&(0,t.jsx)(tp.Button,{variant:"outline",className:"shrink-0",onClick:()=>r(x),children:"Save"})]}),(0,t.jsx)(tu.Portal,{children:(0,t.jsx)(tu.Positioner,{sideOffset:4,className:"isolate z-50 outline-none",children:(0,t.jsxs)(tu.Popup,{className:"max-h-(--available-height) w-max min-w-(--anchor-width) max-w-[min(28rem,var(--available-width))] origin-(--transform-origin) rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none 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",children:[o&&(0,t.jsx)("p",{className:"px-1.5 pt-1 pb-1.5 text-[11px] text-muted-foreground",children:o}),(0,t.jsx)(tu.Empty,{className:"px-2 py-2 font-mono text-[11px] text-muted-foreground empty:hidden",children:u?"Loading models…":a}),(0,t.jsx)(tu.List,{className:"max-h-64 overflow-y-auto outline-none",children:n=>(0,t.jsxs)(tu.Item,{value:n,className:"flex cursor-default items-center gap-2 rounded-md px-1.5 py-1.5 text-sm outline-none select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground",children:[(0,t.jsx)("span",{className:"flex-1 whitespace-nowrap",children:n.label}),n.badge&&(0,t.jsx)("span",{className:"shrink-0 rounded-full bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:n.badge}),n.hint&&n.hint!==n.label&&(0,t.jsx)("span",{className:"min-w-0 shrink truncate font-mono text-[11px] text-muted-foreground",children:n.hint}),(0,t.jsx)(ts.Check,{className:(0,tg.cn)("size-3.5 shrink-0",n.value===e.trim()?"opacity-100":"opacity-0")})]},n.value)})]})})})]})}],736185)},7227,e=>{"use strict";var t=e.i(843476);e.s(["ClaudeIcon",0,function({className:e}){return(0,t.jsxs)("svg",{overflow:"visible",width:"100%",height:"100%",viewBox:"0 0 100 101",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",role:"presentation",children:[(0,t.jsx)("path",{d:"M96.0000 40.0000 L99.5002 42.0000 L99.5002 43.5000 L98.5000 47.0000 L56.0000 57.0000 L52.0040 47.0708 L96.0000 40.0000 M96.0000 40.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(330deg) scaleY(1.13102) rotate(-330deg)"}}),(0,t.jsx)("path",{d:"M80.1032 10.5903 L84.9968 11.6171 L86.2958 13.2179 L87.5346 17.0540 L87.0213 19.5007 L58.5000 58.5000 L49.0000 49.0000 L75.3008 14.4873 L80.1032 10.5903 M80.1032 10.5903 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(300deg) scaleY(1.04936) rotate(-300deg)"}}),(0,t.jsx)("path",{d:"M55.5002 4.5000 L58.5005 2.5000 L61.0002 3.5000 L63.5002 7.0000 L56.6511 48.1620 L52.0005 45.0000 L50.0005 39.5000 L53.5003 8.5000 L55.5002 4.5000 M55.5002 4.5000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(270deg) scaleY(1.08769) rotate(-270deg)"}}),(0,t.jsx)("path",{d:"M23.4253 5.1588 L26.5075 1.2217 L28.5175 0.7632 L32.5063 1.3458 L34.4748 2.8868 L48.8202 34.6902 L54.0089 49.8008 L47.9378 53.1760 L24.8009 11.1886 L23.4253 5.1588 M23.4253 5.1588 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(240deg) scaleY(0.94) rotate(-240deg)"}}),(0,t.jsx)("path",{d:"M8.4990 27.0019 L7.4999 23.0001 L10.5003 19.5001 L14.0003 20.0001 L15.0003 20.0001 L36.0000 35.5000 L42.5000 40.5000 L51.5000 47.5000 L46.5000 56.0000 L42.0002 52.5000 L39.0001 49.5000 L10.0000 29.0001 L8.4990 27.0019 M8.4990 27.0019 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(210deg) scaleY(0.925) rotate(-210deg)"}}),(0,t.jsx)("path",{d:"M2.5003 53.0000 L0.2370 50.5000 L0.2373 48.2759 L2.5003 47.5000 L28.0000 49.0000 L53.0000 51.0000 L52.1885 55.9782 L4.5000 53.5000 L2.5003 53.0000 M2.5003 53.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(180deg) scaleY(0.997) rotate(-180deg)"}}),(0,t.jsx)("path",{d:"M17.5002 79.0264 L12.5005 79.0264 L10.5124 76.7369 L10.5124 74.0000 L19.0005 68.0000 L53.5082 46.0337 L57.0005 52.0000 L17.5002 79.0264 M17.5002 79.0264 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(150deg) scaleY(1.045) rotate(-150deg)"}}),(0,t.jsx)("path",{d:"M27.0004 92.9999 L25.0003 93.4999 L22.0003 91.9999 L22.5004 89.4999 L52.0003 50.5000 L56.0004 55.9999 L34.0003 85.0000 L27.0004 92.9999 M27.0004 92.9999 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(120deg) scaleY(1.03) rotate(-120deg)"}}),(0,t.jsx)("path",{d:"M51.9998 98.0000 L50.5002 100.0000 L47.5002 101.0000 L45.0001 99.0000 L43.5000 96.0000 L51.0003 55.4999 L55.5001 55.9999 L51.9998 98.0000 M51.9998 98.0000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(90deg) scaleY(1.06) rotate(-90deg)"}}),(0,t.jsx)("path",{d:"M77.5007 86.9997 L77.5007 90.9997 L77.0006 92.4997 L75.0004 93.4997 L71.5006 93.0339 L47.4669 57.2642 L56.9998 50.0002 L64.9994 64.5004 L65.7507 69.7497 L77.5007 86.9997 M77.5007 86.9997 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(60deg) scaleY(1.00898) rotate(-60deg)"}}),(0,t.jsx)("path",{d:"M89.0008 80.9991 L89.5008 83.4991 L88.0008 85.4991 L86.5007 84.9991 L78.0007 78.9991 L65.0007 67.4991 L55.0007 60.4991 L58.0000 51.0000 L62.9999 54.0001 L66.0007 59.4991 L89.0008 80.9991 M89.0008 80.9991 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(30deg) scaleY(1.13564) rotate(-30deg)"}}),(0,t.jsx)("path",{d:"M82.5003 55.5000 L95.0003 56.5000 L98.0003 58.5000 L100.0000 61.5000 L100.0000 63.6587 L94.5003 66.0000 L66.5005 59.0000 L55.0003 58.5000 L58.0000 48.0000 L66.0005 54.0000 L82.5003 55.5000 M82.5003 55.5000 ",fill:"#D97757",style:{transformOrigin:"50px 50px",transform:"rotate(0deg) scaleY(1.27731) rotate(0deg)"}})]})},"GoogleIcon",0,function({className:e}){return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",className:e,width:"24",children:[(0,t.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),(0,t.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),(0,t.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),(0,t.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"}),(0,t.jsx)("path",{d:"M1 1h22v22H1z",fill:"none"})]})},"GrokIcon",0,function({className:e}){return(0,t.jsxs)("svg",{"aria-hidden":"true",className:e,"data-view-component":"true",viewBox:"0 0 35 33",children:[(0,t.jsx)("path",{d:"M13.2371 21.0407L24.3186 12.8506C24.8619 12.4491 25.6384 12.6057 25.8973 13.2294C27.2597 16.5185 26.651 20.4712 23.9403 23.1851C21.2297 25.8989 17.4581 26.4941 14.0108 25.1386L10.2449 26.8843C15.6463 30.5806 22.2053 29.6665 26.304 25.5601C29.5551 22.3051 30.562 17.8683 29.6205 13.8673L29.629 13.8758C28.2637 7.99809 29.9647 5.64871 33.449 0.844576C33.5314 0.730667 33.6139 0.616757 33.6964 0.5L29.1113 5.09055V5.07631L13.2343 21.0436",fill:"currentColor"}),(0,t.jsx)("path",{d:"M10.9503 23.0313C7.07343 19.3235 7.74185 13.5853 11.0498 10.2763C13.4959 7.82722 17.5036 6.82767 21.0021 8.2971L24.7595 6.55998C24.0826 6.07017 23.215 5.54334 22.2195 5.17313C17.7198 3.31926 12.3326 4.24192 8.67479 7.90126C5.15635 11.4239 4.0499 16.8403 5.94992 21.4622C7.36924 24.9165 5.04257 27.3598 2.69884 29.826C1.86829 30.7002 1.0349 31.5745 0.36364 32.5L10.9474 23.0341",fill:"currentColor"})]})},"OpenAIIcon",0,function({className:e}){return(0,t.jsxs)("svg",{"aria-hidden":"true",className:e,"data-view-component":"true",viewBox:"0 0 24 24",role:"img",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("title",{children:"OpenAI icon"}),(0,t.jsx)("path",{fill:"currentColor",d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})]})},"VercelIcon",0,function({className:e}){return(0,t.jsx)("svg",{viewBox:"0 0 115 100",height:"18",width:"21",className:e,"data-slot":"geist-logo-svg",children:(0,t.jsx)("g",{children:(0,t.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M57.5 0 115 100H0z",clipRule:"evenodd"})})})}])},421429,e=>{"use strict";var t=e.i(843476),n=e.i(647163);e.s(["Segmented",0,function({options:e,value:r,onChange:l,className:i,...a}){return(0,t.jsx)("div",{role:"radiogroup",className:(0,n.cn)("flex w-fit gap-1 rounded-lg bg-muted p-0.5",i),...a,children:e.map(e=>{let i=e.value===r;return(0,t.jsx)("button",{type:"button",role:"radio","aria-checked":i,title:e.title,onClick:()=>l(e.value),className:(0,n.cn)("flex items-center justify-center gap-1.5 rounded-md px-2.5 py-1 font-mono text-[11px] transition-colors outline-none focus-visible:ring-3 focus-visible:ring-ring/50",i?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.label},e.value)})})}])},968978,e=>{"use strict";var t=e.i(843476),n=e.i(7227);e.s(["ProviderIcon",0,function({className:e,provider:r}){let l=(e=>{switch(e){case"anthropic":return n.ClaudeIcon;case"google":return n.GoogleIcon;case"openai":case"chatgpt":return n.OpenAIIcon;case"vercel-ai-gateway":return n.VercelIcon;case"xai":return n.GrokIcon}})(r);return(0,t.jsx)(l,{className:e})}])},981577,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("7f69248d6d9d1f0b3656881c7801b29d42b68bb667",t.callServer,void 0,t.findSourceMapURL,"setConfigAction");e.s(["setConfigAction",0,n])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,616816,e=>{"use strict";var t=e.i(843476),r=e.i(689664),n=e.i(263676),a=e.i(271645),i=e.i(798120),l=e.i(167881),s=e.i(23750),o=e.i(968978),c=e.i(149666),u=e.i(609856),h=e.i(283653),d=e.i(647163),f=e.i(981577),m=e.i(992112);function g({provider:e,saved:r,autoFocus:n,dense:a,value:i,ready:l,saving:s,onValue:c,onSubmit:u}){return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2 px-0.5 text-muted-foreground",children:[(0,t.jsx)(o.ProviderIcon,{provider:e.id,className:"size-4 shrink-0"}),(0,t.jsx)("span",{className:(0,d.cn)("font-mono",a?"text-[11px]":"text-[12.5px]"),children:e.label})]}),(0,t.jsx)(p,{provider:e,saved:r,autoFocus:n,dense:a,value:i,ready:l,saving:s,onValue:c,onSubmit:u})]})}function p({provider:e,saved:n,autoFocus:a,dense:i,value:o,ready:c,saving:u,onValue:h,onSubmit:f}){let m=o.trim().startsWith("xai-")||o.trim().startsWith("sk-ant-");return(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),f()},className:(0,d.cn)("flex items-center gap-3 rounded-2xl border bg-muted/40 px-4 transition-colors",i?"h-11 rounded-xl px-3":"h-14",n||c?"border-foreground bg-transparent":"border-border"),children:[(0,t.jsx)(s.Input,{autoFocus:a,type:"password","aria-label":"OpenAI API key",autoComplete:"off",value:o,spellCheck:!1,placeholder:n?"Replace it":"sk-…",onChange:e=>h(e.target.value),className:(0,d.cn)("min-w-0 flex-1 border-0 bg-transparent px-0 font-mono shadow-none focus-visible:ring-0 dark:bg-transparent",i?"h-7 text-[13px]":"h-9 text-[15px]")}),o?(0,t.jsx)(l.Button,{type:"submit",size:"sm",variant:m?"outline":"default",loading:u,disabled:!c,className:(0,d.cn)("shrink-0",i?"h-7 px-3":"h-9 px-4"),children:m?`Not ${e.label}?`:"Save"}):n&&(0,t.jsx)("span",{className:(0,d.cn)("grid shrink-0 animate-in place-items-center rounded-full bg-foreground text-background zoom-in-50 duration-300",i?"size-5":"size-7"),children:(0,t.jsx)(r.Check,{className:i?"size-3":"size-4"})})]})}e.s(["KEY_MIN",0,8,"KeyInput",0,p,"VoiceKeys",0,function({ref:e,autoFocus:r,dense:s=!1,onCancel:o,onSaved:p,className:y}){let{data:M}=(0,h.useServerRoute)(i.queryKey.config),[A,x]=(0,a.useState)({}),[E,b]=(0,a.useState)(null),[O]=(0,u.useServerAction)(f.setConfigAction,{onOk:()=>{(0,h.revalidate)(i.queryKey.config),(0,h.revalidate)(i.queryKey.llmModel)}}),v=e=>(A[e]?.trim().length??0)>=8,R=async e=>{let t=e.apiKeyName;if(!v(t)||E)return!1;b(t);try{return await O(t,A[t]),x(e=>({...e,[t]:""})),p?.(e.id),!0}catch{return!1}finally{b(null)}};return(0,a.useImperativeHandle)(e,()=>({pending:()=>v(c.LIVE_PROVIDER.apiKeyName),flush:async()=>!v(c.LIVE_PROVIDER.apiKeyName)||R(c.LIVE_PROVIDER)})),(0,t.jsxs)("div",{className:(0,d.cn)("w-full",s?"space-y-2":"space-y-4",y),children:[s&&(0,t.jsxs)("div",{className:"flex h-6 items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"px-0.5 font-mono text-[11px] text-muted-foreground",children:"Voice key"}),o&&(0,t.jsx)(l.Button,{type:"button",size:"icon",variant:"ghost","aria-label":"Not now",onClick:o,className:"-my-1 size-6",children:(0,t.jsx)(n.X,{className:"size-3.5"})})]}),(0,t.jsx)(g,{provider:c.LIVE_PROVIDER,saved:(0,m.isConfigSet)(M,c.LIVE_PROVIDER.apiKeyName),autoFocus:r,dense:s,value:A[c.LIVE_PROVIDER.apiKeyName]??"",ready:v(c.LIVE_PROVIDER.apiKeyName),saving:E===c.LIVE_PROVIDER.apiKeyName,onValue:e=>x(t=>({...t,[c.LIVE_PROVIDER.apiKeyName]:e})),onSubmit:()=>void R(c.LIVE_PROVIDER)}),(0,t.jsx)("p",{className:(0,d.cn)("px-0.5 font-mono text-muted-foreground",s?"text-[11px]":"pt-1 text-center text-[12.5px]"),children:s?"Live voice and reasoning share this OpenAI API key.":"Live uses an OpenAI API key, billed separately from ChatGPT. Stored on this machine, in this app's database."})]})}])},567334,e=>{"use strict";let t={A:[".##.","#..#","####","#..#","#..#"],B:["###.","#..#","###.","#..#","###."],C:[".###","#...","#...","#...",".###"],D:["###.","#..#","#..#","#..#","###."],E:["####","#...","###.","#...","####"],F:["####","#...","###.","#...","#..."],G:[".###","#...","#.##","#..#",".###"],H:["#..#","#..#","####","#..#","#..#"],I:["###",".#.",".#.",".#.","###"],J:["..##","...#","...#","#..#",".##."],K:["#..#","#.#.","##..","#.#.","#..#"],L:["#...","#...","#...","#...","####"],M:["#...#","##.##","#.#.#","#...#","#...#"],N:["#..#","##.#","#.##","#..#","#..#"],O:[".##.","#..#","#..#","#..#",".##."],P:["###.","#..#","###.","#...","#..."],Q:[".##.","#..#","#..#","#.#.",".#.#"],R:["###.","#..#","###.","#.#.","#..#"],S:[".###","#...",".##.","...#","###."],T:["###",".#.",".#.",".#.",".#."],U:["#..#","#..#","#..#","#..#",".##."],V:["#...#","#...#",".#.#.",".#.#.","..#.."],W:["#...#","#...#","#.#.#","##.##","#...#"],X:["#..#","#..#",".##.","#..#","#..#"],Y:["#.#","#.#",".#.",".#.",".#."],Z:["####","...#",".##.","#...","####"],0:[".##.","#.##","#..#","##.#",".##."],1:[".#.","##.",".#.",".#.","###"],2:["###.","...#",".##.","#...","####"],3:["###.","...#",".##.","...#","###."],4:["#..#","#..#","####","...#","...#"],5:["####","#...","###.","...#","###."],6:[".##.","#...","###.","#..#",".##."],7:["####","...#","..#.",".#..",".#.."],8:[".##.","#..#",".##.","#..#",".##."],9:[".##.","#..#",".###","...#",".##."],"!":["#","#","#",".","#"],"?":["###.","...#",".##.","....",".#.."],".":[".",".",".",".","#"],",":["..","..","..",".#","#."],"'":["#","#",".",".","."],"-":["...","...","###","...","..."],"+":["...",".#.","###",".#.","..."],":":[".","#",".","#","."],"(":[".#","#.","#.","#.",".#"],")":["#.",".#",".#",".#","#."],"<":["..#",".#.","#..",".#.","..#"],">":["#..",".#.","..#",".#.","#.."],"^":[".#.","#.#","...","...","..."],"~":["....",".#.#","#.#.","....","...."],"♥":[".#.#.","#####","#####",".###.","..#.."]," ":["..","..","..","..",".."]};Object.keys(t).filter(e=>!/^[A-Z0-9 ]$/.test(e)),e.s(["ALPHA_TOP",0,.82,"CHAR_RATE",0,2.2,"EMOJI_CHAR_RATE",0,.6,"EMOJI_MIN_LEVEL",0,6,"EMOJI_POOL",0,["🍎","🌹","🍓","❤️","🎈","🧨","🔴","🍊","🔥","🦊","🏀","🧡","🍑","⭐","🍋","🌻","💛","🐥","🌟","🍌","🍀","🌿","🐸","🥝","💚","🌵","🥑","💧","🌊","🫐","🐳","💙","🔵","🧊","🍇","💜","🔮","🟣","🪻","🍆","🌸","🌷","💗","🦩","🩷","🍫","🐻","🌰","🥐","🤍","☁️","🖤","⚪","⚫","🦢","🌈","🦜","🎨","🪩","🦄","✨","🍬","🎡"],"EMOJI_RATIO",0,.11,"FACE_WORD_MAX",0,8,"LETTERS",0,t,"RAMP",0,[[" "],[" ",".","`"],[".",",","·","'"],[":",";","-","^"],["=","+","~",'"'],["*","?","◦","j"],["c","v","○","7"],["o","x","◇","い"],["s","y","t","あ"],["e","a","u","な"],["k","w","z","や"],["q","h","n","米"]],"hash",0,function(e,t){let r=43758.5453*Math.sin(127.1*e+311.7*t);return r-Math.floor(r)},"smoothstep",0,function(e,t,r){let n=Math.min(1,Math.max(0,(r-e)/(t-e)));return n*n*(3-2*n)},"undrawable",0,function(e){return Array.from(e.toUpperCase()).find(e=>!(e in t))??null}])},67045,319841,e=>{"use strict";let t,r;var n=e.i(768834);let a=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>a(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>a(t)(e)}}};var i=e.i(149666),l=e.i(762074),s=e.i(671228);let o=s.ThursdaySettingsSchema.extend({wake:s.WakeSchema.catch(s.WAKE_DEFAULT),hotkey:s.HotkeySchema.catch(s.HOTKEY_DEFAULT),callBack:s.CallBackSchema.catch(s.CALL_BACK_DEFAULT),captionView:s.CaptionViewSchema.catch("center")}),c={...i.LIVE_DEFAULTS,wake:s.WAKE_DEFAULT,hotkey:s.HOTKEY_DEFAULT,callBack:s.CALL_BACK_DEFAULT,captionView:"center"},u=(0,n.create)()((t=e=>({...c,patch:t=>e(t)}),r={name:"thursday.settings",merge:(e,t)=>{let r=o.safeParse((0,i.migrateLiveSettings)(e)),n=r.success?r.data:c;return{...t,...n}}},(e,n,i)=>{let l,s={storage:function(e){let t;try{t=e()}catch(e){return}return{getItem:e=>{var r;let n=e=>null===e?null:JSON.parse(e,void 0),a=null!=(r=t.getItem(e))?r:null;return a instanceof Promise?a.then(n):n(a)},setItem:(e,r)=>t.setItem(e,JSON.stringify(r,void 0)),removeItem:e=>t.removeItem(e)}}(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...r},o=!1,c=0,u=new Set,h=new Set,d=s.storage;if(!d)return t((...t)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),e(...t)});let f=()=>{let e=s.partialize({...n()});return d.setItem(s.name,{state:e,version:s.version})},m=i.setState;i.setState=(e,t)=>(m(e,t),f());let g=t((...t)=>(e(...t),f()));i.getInitialState=()=>g;let p=()=>{var t,r;if(!d)return;let i=++c;o=!1,u.forEach(e=>{var t;return e(null!=(t=n())?t:g)});let m=(null==(r=s.onRehydrateStorage)?void 0:r.call(s,null!=(t=n())?t:g))||void 0;return a(d.getItem.bind(d))(s.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===s.version)return[!1,e.state];else{if(s.migrate){let t=s.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(t=>{var r;if(i!==c)return;let[a,o]=t;if(e(l=s.merge(o,null!=(r=n())?r:g),!0),a)return f()}).then(()=>{i===c&&(null==m||m(n(),void 0),l=n(),o=!0,h.forEach(e=>e(l)))}).catch(e=>{i===c&&(null==m||m(void 0,e))})};return i.persist={setOptions:e=>{s={...s,...e},e.storage&&(d=e.storage)},clearStorage:()=>{++c,null==d||d.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>p(),hasHydrated:()=>o,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(h.add(e),()=>{h.delete(e)})},s.skipHydration||p(),l||g}));e.s(["thursdaySettings",0,()=>{let e="u"<typeof navigator?null:navigator.language??null;return s.ThursdaySettingsSchema.parse({...u.getState(),locale:e,faceWords:"ascii"===(0,l.thursdayFace)().kind})},"useThursdayStore",0,u],67045);var h=e.i(271645);let d=["ctrl","alt","meta"],f=/^(Control|Alt|Shift|Meta|OS)/,m=/^(input|textarea|select)$/i,g=e=>!!e&&!!(m.test(e.tagName)||e.isContentEditable||e.closest?.("[data-hotkey-capture]"));function p(e){let{code:t,ctrlKey:r,altKey:n,shiftKey:a,metaKey:i}=e;if(!t||f.test(t)||!r&&!n&&!i)return null;let l=[];return r&&l.push("ctrl"),n&&l.push("alt"),a&&l.push("shift"),i&&l.push("meta"),[...l,t].join("+")}let y={ctrl:["Ctrl","⌃"],alt:["Alt","⌥"],shift:["Shift","⇧"],meta:["Meta","⌘"]};e.s(["HOTKEY_CAPTURE",0,{"data-hotkey-capture":""},"capturesKeys",0,g,"comboOf",0,p,"isCombo",0,e=>{let t=e.split("+"),r=t.at(-1);return!!(r&&!f.test(r)&&t.slice(0,-1).some(e=>d.includes(e)))},"useHotkey",0,function({enabled:e,combo:t,onPress:r}){let n=(0,h.useRef)(r);n.current=r,(0,h.useEffect)(()=>{if(!e||!t)return;let r=e=>{e.repeat||g(e.target)||p(e)===t&&(e.preventDefault(),n.current())};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[e,t])},"useHotkeyLabel",0,function(e){let[t,r]=(0,h.useState)(!1);return(0,h.useEffect)(()=>r(/mac/i.test(navigator.userAgent)),[]),e?function(e,t=!1){let r=e.split("+"),n=r.at(-1)??"",a=r.slice(0,-1).map(e=>y[e]?.[+!!t]??e),i=n.replace(/^(Key|Digit|Numpad)/,"").replace(/([a-z])([A-Z])/g,"$1 $2")||n;return t?[...a,i].join(""):[...a,i].join(" + ")}(e,t):null}],319841)},561540,333495,e=>{"use strict";var t=e.i(213377);let r={[t.TOOL_NAMES.memory_recall]:"Checking your notes",[t.TOOL_NAMES.memory_remember]:"Noting that down",[t.TOOL_NAMES.memory_forget]:"Forgetting that",[t.TOOL_NAMES.bash]:"Doing it on this computer",[t.TOOL_NAMES.web_search]:"Searching the web",[t.TOOL_NAMES.load_skill]:"Reading how to do this",[t.TOOL_NAMES.end_call]:"Ending the call"};function n(e){if(!e)return null;try{let t=JSON.parse(e);if(t&&"object"==typeof t&&!Array.isArray(t))return t}catch{}return null}e.s(["delegatedLabel",0,function(e,r){if(e!==t.TOOL_NAMES.delegate)return null;try{let e=JSON.parse(r);return"string"==typeof e.label?e.label:null}catch{return null}},"toolBot",0,function(e,r){if(e!==t.TOOL_NAMES.delegate)return null;let a=n(r)?.bot;return"string"==typeof a&&a.trim()?a.trim():null},"toolLine",0,function(e,a){let i;if(e===t.TOOL_NAMES.tool_search||e===t.TOOL_NAMES.tool_call)return"Reaching a connected service";let l=n(a);return(l&&function(e,r){if(e===t.TOOL_NAMES.memory_remember){let e="string"==typeof r.path?r.path.trim():"",t=function(e){if(!Array.isArray(e.facts))return null;let t=e.facts.map(e=>e&&"object"==typeof e&&"string"==typeof e.text?e.text.trim():"").filter(Boolean);return t.length?{text:t[0],more:t.length-1}:null}(r);if(!e)return null;if(!t)return`Noting that under ${e}`;let n=t.more>0?` (+${t.more})`:"";return`Noting under ${e}: ${function(e){let t=e.trim().replace(/\s+/g," ");if(t.length<=28)return t;let r=t.slice(0,28),n=r.lastIndexOf(" ");return`${(n>14?r.slice(0,n):r).trimEnd()}…`}(t.text)}${n}`}if(e===t.TOOL_NAMES.delegate){let e="string"==typeof r.bot?r.bot.trim():"";return e?`Handing this to ${e}`:"Handing this over"}if(e===t.TOOL_NAMES.thread){let e="string"==typeof r.thread?r.thread.trim():"";return"answer"===r.action?"Passing that back":"cancel"===r.action?"Stopping that":"open"===r.action?e?`Opening ${e}`:"Opening that":e?`Checking on ${e}`:"Checking the jobs"}return null}(e,l))??r[e]??((i=e.indexOf("__"))<=0?null:`Reaching ${e.slice(0,i).replace(/[-_]/g," ")}`)}],561540);var a=e.i(843476),i=e.i(271645),l=e.i(635963),s=e.i(41533),o=e.i(218080),c=e.i(567334);let u=[235,235,235];function h(e){let t=[[],[],[],[],[]],r=0;for(let n of Array.from(e.toUpperCase())){let e=c.LETTERS[n];if(e){if(t[0].length)for(let e of t)e.push(-1);e.forEach((e,n)=>{for(let a of e)t[n].push("#"===a?r:-1)})," "!==n&&r++}}return t}let d=h("ERROR");function f(e,t,r,n,a){return e+(t-e)*Math.min(1,a/(t>e?r:n))}function m(e,t,r,n,a,i){let l=Math.floor(t/(n*i)+e[0].length/2),s=Math.floor(r/(a*i)+e.length/2);return s<0||s>=e.length?-1:e[s][l]??-1}function g(e,t,r,n){let a=h(n),i=Math.max(1,Math.min(3,Math.floor(421.6/(a[0].length*t)))),l=0;for(let n of e)n.word=m(a,n.dx,n.dy,t,r,i),l=Math.max(l,n.word+1);return l}function p({className:e,mode:t="idle",charset:r=s.ASCII_FACE.charset,fontSize:n=s.ASCII_FACE.fontSize.default,density:l=s.ASCII_FACE.density.default,size:h=680,color:y=u,getSpectrum:M,getMicSpectrum:A,word:x=null}){let E=(0,i.useRef)(null),b=(0,i.useRef)(null),O=(0,i.useRef)([]),v=(0,i.useRef)(null),R=(0,i.useRef)(r),S=(0,i.useRef)({cur:[...y],target:y}),w=(0,i.useRef)(0),_=(0,i.useRef)(M);_.current=M;let I=(0,i.useRef)(A);I.current=A;let N=(0,i.useRef)({phrase:0,micPhrase:0,micLevel:0,bob:0,bobVel:0,amp:[,,,,].fill(0),phase:Array.from({length:4},(e,t)=>2.1*t),spin:0,rings:[]}),k=(0,i.useRef)({mode:t,start:0}),L=(0,i.useRef)({scale:.3,lift:0,gather:0,comet:0,speech:0,err:0,word:0,listen:0}),T=(0,i.useRef)(null),P=(0,i.useRef)({cw:1,ch:1});return(0,i.useEffect)(()=>{let e=E.current;if(!e)return;let t=.95*n/l,r=1.25*n/l,a=680/h,i=t*a,s=r*a,o=Math.max(1,Math.floor(625.6/(d[0].length*i)));w.current=h,P.current={cw:i,ch:s};let u=[],f=Math.ceil(h/t),p=Math.ceil(h/r);for(let e=0;e<p;e++)for(let n=0;n<f;n++){let l=n*t,f=e*r,g=(l-h/2)*a,p=(f-h/2)*a,y=Math.hypot(g,p),M=m(d,g,p,i,s,o);M<0&&y>328||u.push({x:l+t/2,y:f+r/2,dx:g,dy:p,dist:y,angle:Math.atan2(p,g),seed:(0,c.hash)(n,e),grain:(0,c.hash)(5.7*n+19,2.3*e+53),gap:.05+.3*(0,c.hash)(7.3*n+11,3.1*e+5),emoji:(0,c.hash)(2.7*n+31,5.9*e+17)<c.EMOJI_RATIO,speck:(0,c.hash)(4.1*n+23,6.3*e+41),letter:M,word:-1})}O.current=u,T.current&&g(u,i,s,T.current.text),v.current={ascii:Array.from({length:c.RAMP.length},()=>new Int32Array(u.length)),emoji:Array.from({length:c.RAMP.length},()=>new Int32Array(u.length)),asciiN:new Int32Array(c.RAMP.length),emojiN:new Int32Array(c.RAMP.length),glyph:Array(u.length)};let y=Math.min(2,window.devicePixelRatio||1);e.width=h*y,e.height=h*y,e.style.width=`${h}px`,e.style.height=`${h}px`;let M=e.getContext("2d");return M&&(M.setTransform(y,0,0,y,0,0),M.font=`700 ${n}px ui-monospace,SFMono-Regular,Menlo,monospace`,M.textAlign="center",M.textBaseline="middle",b.current=M),()=>{M?.clearRect(0,0,h,h),O.current=[],v.current=null}},[n,l,h]),(0,i.useEffect)(()=>{R.current=r},[r]),(0,i.useEffect)(()=>{S.current.target=y},[y]),(0,i.useEffect)(()=>{k.current.mode!==t&&(k.current={mode:t,start:.001*performance.now()})},[t]),(0,i.useEffect)(()=>{if(!x)return;let{cw:e,ch:t}=P.current;T.current={text:x.text,start:.001*performance.now(),letters:g(O.current,e,t,x.text)}},[x]),(0,i.useEffect)(()=>{let e=0,t=(0,o.createVoiceFollower)(),r=(0,o.createVoiceFollower)(),n=Array(o.SPECTRUM_BANDS).fill(0),a=Array(o.SPECTRUM_BANDS).fill(0),i=.001*performance.now(),l=0,s=1,u=0,h=o=>{let d=.001*o,m=Math.min(.05,Math.max(0,d-i));i=d;let g=b.current,p=v.current;if(!g||!p){e=requestAnimationFrame(h);return}let y=R.current,M=w.current;p.asciiN.fill(0),p.emojiN.fill(0);let A=_.current?.();if(!A||A.length<2){for(let e=0;e<n.length;e++){let t=.5*Math.sin(1.7*d+1.7*e)+.3*Math.sin(.8*d+.6*e)+.2*Math.sin(3*d+2.9*e);n[e]=.5*t+.5}A=n}let x=N.current,E=t.read(A,m);x.phrase=E.phrase,E.onset>0&&(x.bobVel+=.06*E.onset,x.rings.push({born:d,power:E.onset}),x.rings.length>5&&x.rings.shift()),x.bobVel+=-(.012*x.bob)-.09*x.bobVel,x.bob+=x.bobVel;let P=I.current?.(),j=r.read(P??a,m);x.micPhrase=P?j.phrase:0,x.micLevel=P?j.level:0;let C=P&&"listening"===k.current.mode?.5+8*j.level:1;s=f(s,C,.14,.14,m),l+=m*s;for(let e=0;e<4;e++){let t=Math.floor(e*E.bands.length/4),r=Math.max(t+1,Math.floor((e+1)*E.bands.length/4)),n=0;for(let e=t;e<r;e++)n+=E.bands[e];n/=r-t;let a=.7+.6*(0,c.hash)((.9*d|0)+31*e,e);x.amp[e]+=(n*a-x.amp[e])*(.05+.02*e),x.phase[e]+=m*(.9+.5*e)*(e%2?-1:1)}for(x.spin+=m*(1.1+.9*x.phrase);x.rings.length>0&&d-x.rings[0].born>.7;)x.rings.shift();let V=k.current,F=T.current,K=F?d-F.start:0,D=null!==F&&"error"!==V.mode&&K<3.4+.08*F.letters+.35?{scale:0,lift:0,gather:0,comet:0,speech:0,err:0,word:1,listen:0}:function(e,t,r){let n={scale:1,lift:0,gather:0,comet:0,speech:0,err:0,word:0,listen:0};switch(e){case"idle":return n;case"connecting":{let e=1-Math.exp(-t/1.3);return{...n,scale:.45+.55*e,lift:.06*e,gather:1}}case"listening":return{...n,lift:.24*(.7*r.micPhrase+.3*r.micLevel),listen:1};case"speaking":return{...n,speech:1};case"working":return{...n,comet:1};case"ending":return{...n,scale:0};case"error":return{...n,scale:0,err:1}}}(V.mode,d-V.start,x),z=L.current;z.scale=f(z.scale,D.scale,.45,"ending"===V.mode?.4:.7,m),z.lift=f(z.lift,D.lift,.22,.4,m),z.gather=f(z.gather,D.gather,.3,.95,m),z.comet=f(z.comet,D.comet,.45,.9,m),z.speech=f(z.speech,D.speech,.5,.75,m),"error"===V.mode&&(z.err<=.01&&(u=0),u+=m),z.err=f(z.err,D.err,.5,.6,m),z.word=f(z.word,D.word,.35,.5,m),z.listen=f(z.listen,D.listen,.3,.6,m);let $=z.err>.5,H=z.word>.5,B="emojiOnly"===y?c.EMOJI_CHAR_RATE:c.CHAR_RATE,U=O.current;for(let e=0;e<U.length;e++){let t=U[e],r=function(e,t,r,n,a,i){let l,s,o,u,h=a.scale>.02?function(e,t,r=0,n=1){let a=170*Math.max(.02,n),i=1-(0,c.smoothstep)(.55*a,a,e.dist);return(.58+r+.2*Math.sin(.05*e.dist-.4*t)+.07*Math.sin(.35*t))*i}(e,t,a.lift,a.scale)*(1-.6*a.speech):0;return a.gather>.01&&(h+=function(e,t,r){let n=170*r;if(e.speck>=.55||e.dist<.8*n)return 0;let a=Math.min(55,Math.floor((e.angle+Math.PI)/(2*Math.PI)*56)),i=(.7*t+(0,c.hash)(a,5.3))%1,l=e.dist-(n+(320-n)*(1-i)**1.25)-(e.grain-.5)*16;return Math.exp(-(l*l)/260)*(0,c.smoothstep)(0,.2,i)*(1-i)*1.1}(e,t,a.scale)*a.gather),a.comet>.01&&(h+=(s=Math.exp(-((l=e.dist-210)*l)/1100),s*Math.exp(-((u=Math.atan2(Math.sin(o=e.angle-3*t),Math.cos(o)))*u)/(u<0?2.8:.16))*a.comet)),a.speech>.01&&(h+=function(e,t,r,n){var a;let i=170+40*r.phrase+85*r.bob;for(let t=0;t<4;t++)i+=28*r.amp[t]*Math.sin((t+2)*(e.angle+r.spin)+r.phase[t]);let l=170+(((a=i)<=205?Math.max(110,a):205+30*Math.tanh((a-205)/30))-170)*n,s=(e.grain-.5)*20+20*Math.sin(5*e.angle+.9*t+6.283*e.seed)*.3,o=e.dist-(l+s),c=Math.exp(-(o*o)/800)+.5*Math.exp(-(e.dist*e.dist)/6e3);if(e.dist<l&&(c+=.22*(1-e.dist/l)**.6*(.75+.25*Math.sin(.05*e.dist-1.2*t))),e.speck<.22){let n=90*(.6+.9*e.grain);for(let a=0;a<r.rings.length;a++){let i=r.rings[a],s=t-i.born,o=e.dist-(l+6+s*n);c+=Math.exp(-(o*o)/500)*i.power*Math.max(0,1-s/.7)}}return c}(e,t,i,a.speech)*a.speech),a.err>.01&&(h+=function(e,t,r){if(e.letter<0)return 0;let n=r%9.2,a=.12*e.seed;return Math.max(0,(0,c.smoothstep)(0,1,(n-.65*e.letter-a)/.8)-(0,c.smoothstep)(0,1,(n-5.6-.5*e.letter-a)/.7))*(.86+.14*Math.sin(3.5*t+6*e.seed))}(e,t,r)*a.err),a.word>.01&&(h+=function(e,t,r){if(e.word<0)return 0;let n=.08*e.seed;return Math.max(0,(0,c.smoothstep)(0,1,(r-.11*e.word-n)/.3)-(0,c.smoothstep)(0,1,(r-3.4-.08*e.word-n)/.35))*(.86+.14*Math.sin(3.5*t+6*e.seed))}(e,t,n)*a.word),h}(t,d,u,K,z,x);!($&&t.letter>=0||H&&t.word>=0)&&((r*=(.66+.72*t.grain)*(.8+.4*(0,c.hash)(Math.floor(.05*t.dx+.5*d),Math.floor(.05*t.dy-.3*d))))>.3&&(0,c.hash)(31.7*Math.floor(1.6*d),613*t.seed)>.992&&(r=Math.max(r,.9)),r<t.gap+.05*Math.sin(.28*d+6.283*t.seed)+z.listen*(.16+((0,c.hash)(Math.floor(9*d+3*t.seed),97*t.seed)-.5)*.6*x.micLevel)&&(r=0));let n=(r=r<0?0:r>1?1:r)*(c.RAMP.length-1)|0;if(0===n)continue;let a=l*B+7*t.seed|0;if("emojiOnly"===y||"emoji"===y&&t.emoji&&n>=c.EMOJI_MIN_LEVEL){let r=((t.seed*c.EMOJI_POOL.length|0)+a)%c.EMOJI_POOL.length;p.glyph[e]=c.EMOJI_POOL[r],p.emoji[n][p.emojiN[n]++]=e}else{let r=c.RAMP[n],i=((t.seed*r.length|0)+a)%r.length;p.glyph[e]=r[i],p.ascii[n][p.asciiN[n]++]=e}}g.clearRect(0,0,M,M);let J=O.current,q=c.RAMP.length-1,W=S.current;for(let e=0;e<3;e++)W.cur[e]+=(W.target[e]-W.cur[e])*.05;g.fillStyle=`rgb(${0|W.cur[0]},${0|W.cur[1]},${0|W.cur[2]})`;for(let e=1;e<=q;e++){let t=p.asciiN[e];if(0===t)continue;g.globalAlpha=c.ALPHA_TOP*(e/q);let r=p.ascii[e];for(let e=0;e<t;e++){let t=J[r[e]];g.fillText(p.glyph[r[e]],t.x,t.y)}}for(let e=1;e<=q;e++){let t=p.emojiN[e];if(0===t)continue;g.globalAlpha=.35+e/q*.65;let r=p.emoji[e];for(let e=0;e<t;e++){let t=J[r[e]];g.fillText(p.glyph[r[e]],t.x,t.y)}}g.globalAlpha=1,e=requestAnimationFrame(h)};return e=requestAnimationFrame(h),()=>cancelAnimationFrame(e)},[]),(0,a.jsx)("canvas",{ref:E,className:e,"aria-hidden":!0,style:{display:"block",pointerEvents:"none"}})}var y=e.i(922521),M=e.i(647163);let A={idle:"idle",connecting:"connecting",ending:"connecting",listening:"listening",speaking:"speaking",working:"thinking",delegating:"delegating"},x={ripple:18,bandEase:.03,pulse:0,punch:.05,stretch:0},E={ending:"ending",idle:"idle",connecting:"connecting",listening:"listening",speaking:"speaking",working:"working",delegating:"working"},b=[247,247,247],O=[10,10,10],v={mark:{label:"Mark",hint:"A silhouette with eyes. Blinks, glances, leans into a voice.",render:function({status:e,failed:t,size:r,getSpectrum:n,look:i,className:s}){return(0,a.jsx)(l.BotMark,{size:r,seed:"thursday",color:i.color,shape:i.shape,outline:i.outline,paint:i.paint,state:A[e],crossed:t,getSpectrum:n,options:x,notify:!1,className:s})}},ascii:{label:"Ascii",hint:"A field of characters. No eyes — the whole orb is the expression.",render:function({status:e,failed:t,word:r,size:n,getSpectrum:i,getMicSpectrum:l,look:s,className:o}){let c="dark"===(0,y.useResolvedTheme)();return(0,a.jsx)(p,{mode:t?"error":E[e],word:r,size:n,color:c?b:O,getSpectrum:i,getMicSpectrum:l,charset:s.charset,fontSize:s.fontSize,density:s.density,className:o})}}},R=(0,i.memo)(function({look:e,status:t="idle",size:r=448,className:n,...l}){let s=(0,i.useRef)(null),[o,c]=(0,i.useState)(r),[u,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let e=s.current;if(!e)return;let t=new ResizeObserver(([e])=>{let t=Math.round(e.contentRect.width);t>0&&c(t)});return t.observe(e),()=>t.disconnect()},[]),(0,i.useEffect)(()=>{let e=requestAnimationFrame(()=>h(!0));return()=>cancelAnimationFrame(e)},[]);let d=v[e.kind].render;return(0,a.jsx)("div",{ref:s,className:(0,M.cn)("aspect-square transition-opacity duration-700 ease-out",u?"opacity-100":"opacity-0",n),children:(0,a.jsx)(d,{...l,look:e,status:t,size:o})})});e.s(["FACES",0,v,"Face",0,R],333495)}]);