@kitn.ai/ui 0.18.2 → 0.20.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 (258) hide show
  1. package/LICENSE +6 -0
  2. package/NOTICE +54 -0
  3. package/dist/components/audio-visualizer/audio-visualizer.voice-fixture.d.ts +59 -0
  4. package/dist/components/audio-visualizer/aurora.glsl.d.ts +114 -0
  5. package/dist/components/audio-visualizer/index.d.ts +155 -0
  6. package/dist/components/audio-visualizer/shader-canvas.d.ts +130 -0
  7. package/dist/components/audio-visualizer/sizes.d.ts +25 -0
  8. package/dist/components/audio-visualizer/variant-aurora.d.ts +89 -0
  9. package/dist/components/audio-visualizer/variant-bar.d.ts +46 -0
  10. package/dist/components/audio-visualizer/variant-custom.d.ts +73 -0
  11. package/dist/components/audio-visualizer/variant-grid.d.ts +22 -0
  12. package/dist/components/audio-visualizer/variant-radial.d.ts +13 -0
  13. package/dist/components/audio-visualizer/variant-wave.d.ts +11 -0
  14. package/dist/components/audio-visualizer/wave.glsl.d.ts +16 -0
  15. package/dist/components/thread.d.ts +54 -0
  16. package/dist/create-tween-hvpmSuwW.js +7 -0
  17. package/dist/custom-elements.json +477 -0
  18. package/dist/elements/agent-card.js +1 -1
  19. package/dist/elements/artifact.js +1 -1
  20. package/dist/elements/attachments.js +1 -1
  21. package/dist/elements/audio-visualizer.d.ts +1 -0
  22. package/dist/elements/audio-visualizer.js +1 -0
  23. package/dist/elements/autoloader.js +1 -1
  24. package/dist/elements/avatar.js +1 -1
  25. package/dist/elements/badge.js +1 -1
  26. package/dist/elements/button.js +1 -1
  27. package/dist/elements/card.js +1 -1
  28. package/dist/elements/cards.js +1 -1
  29. package/dist/elements/chain-of-thought.js +1 -1
  30. package/dist/elements/chat-scope-picker.js +1 -1
  31. package/dist/elements/chat-workspace.js +1 -1
  32. package/dist/elements/chat.js +1 -1
  33. package/dist/elements/checkpoint.js +1 -1
  34. package/dist/elements/choice.js +1 -1
  35. package/dist/elements/chunks/{Icon-C2LTALdM.js → Icon-Tj58ES_d.js} +1 -1
  36. package/dist/elements/chunks/action-icons-ns1Fnedj.js +1 -0
  37. package/dist/elements/chunks/arrow-left-DQocUFvy.js +1 -0
  38. package/dist/elements/chunks/{attachments-DLJcWCDV.js → attachments-mCB5F1Fq.js} +1 -1
  39. package/dist/elements/chunks/audio-visualizer-BqNy7dfm.js +1 -0
  40. package/dist/elements/chunks/{badge-BTNZTODL.js → badge-B4Zuajl2.js} +1 -1
  41. package/dist/elements/chunks/{button-DBDZebGr.js → button-ZWNif3--.js} +1 -1
  42. package/dist/elements/chunks/{card-YfCyI4fH.js → card-BkHbp4BA.js} +1 -1
  43. package/dist/elements/chunks/chat-thread-CkRN6pZ7.js +1 -0
  44. package/dist/elements/chunks/check-B9-gn6SS.js +1 -0
  45. package/dist/elements/chunks/chevron-down-BNsxc2hk.js +1 -0
  46. package/dist/elements/chunks/chevron-right-Hv00StBO.js +1 -0
  47. package/dist/elements/chunks/circle-0e3KJTDr.js +1 -0
  48. package/dist/elements/chunks/circle-check-BNAS0JEy.js +1 -0
  49. package/dist/elements/chunks/{circle-x-pDtzlghQ.js → circle-x-B7faJFlY.js} +1 -1
  50. package/dist/elements/chunks/{code-block-DZ6mz6vs.js → code-block-BFUHn6Va.js} +1 -1
  51. package/dist/elements/chunks/collapsible-DM1Ckd4e.js +1 -0
  52. package/dist/elements/chunks/{composer-BZyPU6gD.js → composer-BguS0QL_.js} +7 -3
  53. package/dist/elements/chunks/{context-Cx6eQA_G.js → context-Cb7k4F-v.js} +1 -1
  54. package/dist/elements/chunks/{conversation-list-C4xTQSpT.js → conversation-list-CvoAkWhN.js} +1 -1
  55. package/dist/elements/chunks/create-tween-oVvAIG8r.js +7 -0
  56. package/dist/elements/chunks/{default-input-BZcwyKcP.js → default-input-Cqqilg9t.js} +1 -1
  57. package/dist/elements/chunks/define-D1din7Ld.js +1 -0
  58. package/dist/elements/chunks/{disclosure-BcBs--Jf.js → disclosure-CIZ5c8nO.js} +1 -1
  59. package/dist/elements/chunks/{download-BDQwcFav.js → download-Dsbg3ste.js} +1 -1
  60. package/dist/elements/chunks/{dropdown-wgs8xCJZ.js → dropdown-BDd1-Zgi.js} +1 -1
  61. package/dist/elements/chunks/{ellipsis-CUiEJ6R1.js → ellipsis-Dw6qrss-.js} +1 -1
  62. package/dist/elements/chunks/{external-link-DJUmC7g2.js → external-link-Vt74zAoL.js} +1 -1
  63. package/dist/elements/chunks/{file-text-DOYfYvrh.js → file-text-CZrZF6_v.js} +1 -1
  64. package/dist/elements/chunks/{file-tree-DQzNQrbr.js → file-tree-DF4okKyo.js} +1 -1
  65. package/dist/elements/chunks/{folder-DBDUBANz.js → folder-glP5rha4.js} +1 -1
  66. package/dist/elements/chunks/hover-card-Cmm6Q53m.js +1 -0
  67. package/dist/elements/chunks/icon-BLb8beoi.js +1 -0
  68. package/dist/elements/chunks/{info-DBQl-m6e.js → info-CIsv92JK.js} +1 -1
  69. package/dist/elements/chunks/{input-DZD67EvW.js → input-Dds1kFyt.js} +1 -1
  70. package/dist/elements/chunks/{kbd-DbyVrlnU.js → kbd-De_xbgi9.js} +1 -1
  71. package/dist/elements/chunks/{link-vko7AttA.js → link-i4r_k7z4.js} +1 -1
  72. package/dist/elements/chunks/{loader-Cg6rO8tQ.js → loader-BmQH4s3V.js} +1 -1
  73. package/dist/elements/chunks/{markdown-n3Xbj3PR.js → markdown-Zi21WhUz.js} +7 -7
  74. package/dist/elements/chunks/{message-CgKytiSB.js → message-BqyXDN3-.js} +1 -1
  75. package/dist/elements/chunks/{message-feedback-Ds3-US0e.js → message-feedback-Djr3z6Yb.js} +1 -1
  76. package/dist/elements/chunks/message-square-vFAgbDaX.js +1 -0
  77. package/dist/elements/chunks/{minimize-2-3kCdE0q3.js → minimize-2--ifeCGrl.js} +1 -1
  78. package/dist/elements/chunks/{model-switcher-BMtXGwLU.js → model-switcher-B94YAKsM.js} +1 -1
  79. package/dist/elements/chunks/{overlay-B1-MBI6h.js → overlay-kD8dwRv_.js} +1 -1
  80. package/dist/elements/chunks/{paperclip-DDEfmkHc.js → paperclip-q21dYOSK.js} +1 -1
  81. package/dist/elements/chunks/{progress-bar-Dwbiyv3s.js → progress-bar-BrAIIaaJ.js} +1 -1
  82. package/dist/elements/chunks/{prompt-suggestion-9lvgFcEa.js → prompt-suggestion-Bjn2K-fR.js} +1 -1
  83. package/dist/elements/chunks/{reasoning-DzHWsdAJ.js → reasoning-DTpCGtnY.js} +1 -1
  84. package/dist/elements/chunks/resizable-Dp4JExql.js +1 -0
  85. package/dist/elements/chunks/{rotate-cw-jpisOdOV.js → rotate-cw-CFWWkpj2.js} +1 -1
  86. package/dist/elements/chunks/{scroll-area-g5Ze3K6f.js → scroll-area-Bb0kHH1j.js} +1 -1
  87. package/dist/elements/chunks/scroll-button-B0cH5fXf.js +1 -0
  88. package/dist/elements/chunks/{separator-Bmjc5XyX.js → separator-9kRgr1X9.js} +1 -1
  89. package/dist/elements/chunks/{settings-Cz1bMJP9.js → settings-B8lmec4D.js} +1 -1
  90. package/dist/elements/chunks/{settings-group-9imY3kRA.js → settings-group-I0hEuXiN.js} +1 -1
  91. package/dist/elements/chunks/{share-BdenF0wQ.js → share-C3lTiYGt.js} +1 -1
  92. package/dist/elements/chunks/skeleton-DSXW5Yya.js +1 -0
  93. package/dist/elements/chunks/{slots-DkZ-Cmha.js → slots--V19HwUb.js} +1 -1
  94. package/dist/elements/chunks/{star-DY6z1UUH.js → star-CSJtGxgv.js} +1 -1
  95. package/dist/elements/chunks/{store-th4VyJXM.js → store-CHyW95TP.js} +1 -1
  96. package/dist/elements/chunks/{text-shimmer-CEi-tlXr.js → text-shimmer-Cn9TmNpI.js} +1 -1
  97. package/dist/elements/chunks/textarea-CUwqAX0G.js +1 -0
  98. package/dist/elements/chunks/{thumbs-up-BR33KLfA.js → thumbs-up-PNVVThEF.js} +1 -1
  99. package/dist/elements/chunks/{toast-store-BEMda0fv.js → toast-store-DKbQn3Wn.js} +1 -1
  100. package/dist/elements/chunks/{tool-TMued3WO.js → tool-DjTRpIpl.js} +1 -1
  101. package/dist/elements/chunks/tooltip-CgBZCVKp.js +1 -0
  102. package/dist/elements/chunks/{triangle-alert-B07fX3Q8.js → triangle-alert-DsHTHCPm.js} +1 -1
  103. package/dist/elements/chunks/use-card-resolution-BSu_XHjH.js +1 -0
  104. package/dist/elements/chunks/variant-aurora-Dc4nQUia.js +218 -0
  105. package/dist/elements/chunks/variant-custom-y_3kVQhS.js +1 -0
  106. package/dist/elements/chunks/variant-wave-D5OR1-9Z.js +116 -0
  107. package/dist/elements/chunks/{video-MKp3LmNT.js → video-B7vmenoC.js} +1 -1
  108. package/dist/elements/chunks/x-GRUeeQFT.js +1 -0
  109. package/dist/elements/coachmark.js +1 -1
  110. package/dist/elements/code-block.js +1 -1
  111. package/dist/elements/command.js +1 -1
  112. package/dist/elements/compare.js +1 -1
  113. package/dist/elements/composer.js +1 -1
  114. package/dist/elements/confirm-card.js +1 -1
  115. package/dist/elements/context-meter.js +1 -1
  116. package/dist/elements/conversation-list.js +1 -1
  117. package/dist/elements/define.d.ts +11 -0
  118. package/dist/elements/dialog.js +1 -1
  119. package/dist/elements/editable-label.js +1 -1
  120. package/dist/elements/embed.js +1 -1
  121. package/dist/elements/empty.js +1 -1
  122. package/dist/elements/feedback-bar.js +1 -1
  123. package/dist/elements/file-tree.js +1 -1
  124. package/dist/elements/file-upload.js +1 -1
  125. package/dist/elements/form.js +1 -1
  126. package/dist/elements/hover-card.js +1 -1
  127. package/dist/elements/icon.js +1 -1
  128. package/dist/elements/image.js +1 -1
  129. package/dist/elements/input.js +1 -1
  130. package/dist/elements/kbd.js +1 -1
  131. package/dist/elements/link-preview.js +1 -1
  132. package/dist/elements/loader.js +1 -1
  133. package/dist/elements/markdown.js +1 -1
  134. package/dist/elements/menu.js +1 -1
  135. package/dist/elements/message-skills.js +1 -1
  136. package/dist/elements/message.js +1 -1
  137. package/dist/elements/model-switcher.js +1 -1
  138. package/dist/elements/nav.js +1 -1
  139. package/dist/elements/notice.js +1 -1
  140. package/dist/elements/pane-group.js +1 -1
  141. package/dist/elements/pane.js +1 -1
  142. package/dist/elements/popover.js +1 -1
  143. package/dist/elements/progress-bar.js +1 -1
  144. package/dist/elements/prompt-dock.js +1 -1
  145. package/dist/elements/prompt-input.js +1 -1
  146. package/dist/elements/prompt-suggestions.js +1 -1
  147. package/dist/elements/reasoning.js +1 -1
  148. package/dist/elements/remote.js +1 -1
  149. package/dist/elements/resizable.js +1 -1
  150. package/dist/elements/response-stream.js +1 -1
  151. package/dist/elements/screen.js +1 -1
  152. package/dist/elements/scroll-area.js +1 -1
  153. package/dist/elements/scroll-button.js +1 -1
  154. package/dist/elements/search.js +1 -1
  155. package/dist/elements/segmented.js +1 -1
  156. package/dist/elements/separator.js +1 -1
  157. package/dist/elements/setting-item.js +1 -1
  158. package/dist/elements/settings-group.js +1 -1
  159. package/dist/elements/skeleton.js +1 -1
  160. package/dist/elements/slots.d.ts +15 -0
  161. package/dist/elements/source.js +1 -1
  162. package/dist/elements/status.js +1 -1
  163. package/dist/elements/switch.js +1 -1
  164. package/dist/elements/tabs.js +1 -1
  165. package/dist/elements/tasks.js +1 -1
  166. package/dist/elements/text-shimmer.js +1 -1
  167. package/dist/elements/thinking-bar.js +1 -1
  168. package/dist/elements/thread.d.ts +1 -0
  169. package/dist/elements/thread.js +1 -0
  170. package/dist/elements/toast.js +1 -1
  171. package/dist/elements/tool.js +1 -1
  172. package/dist/elements/tooltip.js +1 -1
  173. package/dist/elements/voice-input.js +1 -1
  174. package/dist/elements/voice-output.js +1 -1
  175. package/dist/elements.d.ts +62 -0
  176. package/dist/index.js +3411 -3328
  177. package/dist/kai.es.js +1 -1
  178. package/dist/llms/llms-full.txt +70 -4
  179. package/dist/llms/llms.txt +3 -3
  180. package/dist/primitives/audio-bands.d.ts +106 -0
  181. package/dist/primitives/create-tween.d.ts +33 -0
  182. package/dist/primitives/use-audio-analysis.d.ts +149 -0
  183. package/dist/primitives/use-sequencer.d.ts +13 -0
  184. package/dist/primitives/use-voice-recorder.d.ts +1 -0
  185. package/dist/primitives/visualizer-sequences.d.ts +39 -0
  186. package/dist/react/index.d.ts +105 -0
  187. package/dist/react/use-voice-input.d.ts +15 -0
  188. package/dist/react.js +269 -240
  189. package/dist/register-impl-DQyejdfb.js +145 -0
  190. package/dist/test-utils/fake-clock.d.ts +45 -0
  191. package/dist/ui/resizable.d.ts +9 -3
  192. package/dist/variant-aurora-DVtGqVH6.js +218 -0
  193. package/dist/variant-custom-Dif-IV4u.js +1 -0
  194. package/dist/variant-wave-DbfNdvSi.js +116 -0
  195. package/frameworks/react/index.tsx +74 -1
  196. package/frameworks/react/use-voice-input.tsx +59 -0
  197. package/llms-full.txt +70 -4
  198. package/llms.txt +3 -3
  199. package/package.json +32 -7
  200. package/src/components/audio-visualizer/audio-visualizer.voice-fixture.ts +257 -0
  201. package/src/components/audio-visualizer/aurora.glsl.ts +330 -0
  202. package/src/components/audio-visualizer/index.tsx +442 -0
  203. package/src/components/audio-visualizer/shader-canvas.tsx +846 -0
  204. package/src/components/audio-visualizer/sizes.ts +54 -0
  205. package/src/components/audio-visualizer/variant-aurora.tsx +299 -0
  206. package/src/components/audio-visualizer/variant-bar.tsx +143 -0
  207. package/src/components/audio-visualizer/variant-custom.tsx +338 -0
  208. package/src/components/audio-visualizer/variant-grid.tsx +170 -0
  209. package/src/components/audio-visualizer/variant-radial.tsx +158 -0
  210. package/src/components/audio-visualizer/variant-wave.tsx +125 -0
  211. package/src/components/audio-visualizer/wave.glsl.ts +130 -0
  212. package/src/components/component-meta.json +34 -32
  213. package/src/components/composer.tsx +5 -0
  214. package/src/components/thread.tsx +177 -0
  215. package/src/elements/audio-visualizer.tsx +183 -0
  216. package/src/elements/chat-workspace.tsx +1 -1
  217. package/src/elements/compiled.css +1 -1
  218. package/src/elements/define.tsx +12 -1
  219. package/src/elements/element-manifest.json +8 -0
  220. package/src/elements/element-meta.json +287 -0
  221. package/src/elements/element-types.d.ts +62 -0
  222. package/src/elements/icon-names.json +2 -0
  223. package/src/elements/menu.tsx +7 -4
  224. package/src/elements/register-impl.ts +3 -0
  225. package/src/elements/resizable.tsx +78 -2
  226. package/src/elements/slots.ts +42 -0
  227. package/src/elements/thread.tsx +105 -0
  228. package/src/primitives/audio-bands.ts +174 -0
  229. package/src/primitives/create-tween.ts +214 -0
  230. package/src/primitives/use-audio-analysis.ts +321 -0
  231. package/src/primitives/use-sequencer.ts +53 -0
  232. package/src/primitives/use-voice-recorder.ts +16 -4
  233. package/src/primitives/visualizer-sequences.ts +350 -0
  234. package/src/test-utils/fake-clock.ts +88 -0
  235. package/src/ui/action-icons.ts +2 -1
  236. package/src/ui/icon.tsx +4 -0
  237. package/src/ui/overlay.tsx +8 -1
  238. package/src/ui/resizable.tsx +47 -9
  239. package/dist/elements/chunks/action-icons-Dtl8Ox5D.js +0 -1
  240. package/dist/elements/chunks/arrow-left-GbBceGBE.js +0 -1
  241. package/dist/elements/chunks/chat-thread-Dz2qbzvI.js +0 -1
  242. package/dist/elements/chunks/check-fhmRksq_.js +0 -1
  243. package/dist/elements/chunks/chevron-down-DcRg1aRU.js +0 -1
  244. package/dist/elements/chunks/chevron-right-ChzBcNJ-.js +0 -1
  245. package/dist/elements/chunks/circle-B4fTe9v6.js +0 -1
  246. package/dist/elements/chunks/circle-check-CJV-3Rem.js +0 -1
  247. package/dist/elements/chunks/collapsible-CWUAShMC.js +0 -1
  248. package/dist/elements/chunks/define-CNSKFZCd.js +0 -1
  249. package/dist/elements/chunks/hover-card-BQGdGAQ3.js +0 -1
  250. package/dist/elements/chunks/icon-CAyRqVrg.js +0 -1
  251. package/dist/elements/chunks/message-square-MmRkvc-M.js +0 -1
  252. package/dist/elements/chunks/resizable-Bq_eHxUm.js +0 -1
  253. package/dist/elements/chunks/skeleton-Pjc5jiaY.js +0 -1
  254. package/dist/elements/chunks/textarea-CboigarR.js +0 -1
  255. package/dist/elements/chunks/tooltip-Cft_Rxiw.js +0 -1
  256. package/dist/elements/chunks/use-card-resolution-M36zVciB.js +0 -1
  257. package/dist/elements/chunks/x-Ckwicf6g.js +0 -1
  258. package/dist/register-impl-DcjZDELj.js +0 -141
@@ -1 +1 @@
1
- import{s as e,k as i,m as l,i as s,t as c}from"./define-CNSKFZCd.js";import{c as d}from"./cn-CU7UAWzk.js";var f=c("<div tabindex=0>");function v(t){const[o,a]=e(t,["children","class","orientation"]),n=()=>o.orientation==="horizontal"?"overflow-x-auto overflow-y-hidden":o.orientation==="both"?"overflow-auto":"overflow-y-auto overflow-x-hidden";return(()=>{var r=f();return i(r,l({get class(){return d(n(),"scrollbar-thin",o.class)}},a),!1,!0),s(r,()=>o.children),r})()}export{v as S};
1
+ import{s as e,l as i,m as s,i as l,t as c}from"./define-D1din7Ld.js";import{c as d}from"./cn-CU7UAWzk.js";var f=c("<div tabindex=0>");function v(t){const[o,a]=e(t,["children","class","orientation"]),n=()=>o.orientation==="horizontal"?"overflow-x-auto overflow-y-hidden":o.orientation==="both"?"overflow-auto":"overflow-y-auto overflow-x-hidden";return(()=>{var r=f();return i(r,s({get class(){return d(n(),"scrollbar-thin",o.class)}},a),!1,!0),l(r,()=>o.children),r})()}export{v as S};
@@ -0,0 +1 @@
1
+ import{c as i}from"./cn-CU7UAWzk.js";import{B as w}from"./button-ZWNif3--.js";import{g as x,p as A,s as u,c as f,u as C,l as m,m as h,i as g,t as d,A as T,B as y}from"./define-D1din7Ld.js";import{c as E}from"./chevron-down-BNsxc2hk.js";const H=50;function L(){const[t,o]=x(!0);let r,e=!0;function a(){if(!r)return;const{scrollTop:s,scrollHeight:c,clientHeight:b}=r,v=c-s-b<H;o(v),e=v}function l(s="smooth"){r&&(r.scrollTo({top:r.scrollHeight,behavior:s}),e=!0,o(!0))}function n(){e&&requestAnimationFrame(()=>l("instant"))}function B(s){r=s,s.addEventListener("scroll",a,{passive:!0});const c=new MutationObserver(n);c.observe(s,{childList:!0,subtree:!0,characterData:!0}),A(()=>{s.removeEventListener("scroll",a),c.disconnect()})}return{ref:B,isAtBottom:t,scrollToBottom:l}}var k=d("<div role=log tabindex=0>"),S=d("<div>"),q=d("<div aria-hidden=true>");const p=T();function z(){const t=y(p);if(!t)throw new Error("useChatContainer must be used within ChatContainer");return t}function D(t){const[o,r]=u(t,["children","class"]),{ref:e,isAtBottom:a,scrollToBottom:l}=L();return f(p.Provider,{value:{isAtBottom:a,scrollToBottom:l},get children(){var n=k();return C(e,n),m(n,h({get class(){return i("flex flex-col overflow-y-auto",o.class)}},r),!1,!0),g(n,()=>o.children),n}})}function F(t){const[o,r]=u(t,["children","class"]);return(()=>{var e=S();return m(e,h({get class(){return i("flex w-full flex-col",o.class)}},r),!1,!0),g(e,()=>o.children),e})()}function I(t){const[o,r]=u(t,["class"]);return(()=>{var e=q();return m(e,h({get class(){return i("h-px w-full shrink-0 scroll-mt-4",o.class)}},r),!1,!1),e})()}function M(t){const{isAtBottom:o,scrollToBottom:r}=z();return f(w,{get variant(){return t.variant??"outline"},get size(){return t.size??"sm"},"aria-label":"Scroll to bottom",get class(){return i("h-10 w-10 rounded-full transition-all duration-150 ease-out",o()?"pointer-events-none translate-y-4 scale-95 opacity-0":"translate-y-0 scale-100 opacity-100",t.class)},onClick:()=>r(),get children(){return f(E,{class:"h-5 w-5"})}})}export{D as C,M as S,F as a,I as b};
@@ -1 +1 @@
1
- import{s as e,k as n,m as i,t as l}from"./define-CNSKFZCd.js";import{c}from"./cn-CU7UAWzk.js";var p=l("<div role=separator>");function u(t){const[r,a]=e(t,["orientation","class"]),o=()=>r.orientation==="vertical";return(()=>{var s=p();return n(s,i({get class(){return c("shrink-0 bg-border",o()?"h-full w-px":"h-px w-full",r.class)}},a),!1,!1),s})()}export{u as S};
1
+ import{s as e,l as n,m as i,t as l}from"./define-D1din7Ld.js";import{c}from"./cn-CU7UAWzk.js";var p=l("<div role=separator>");function u(t){const[r,a]=e(t,["orientation","class"]),o=()=>r.orientation==="vertical";return(()=>{var s=p();return n(s,i({get class(){return c("shrink-0 bg-border",o()?"h-full w-px":"h-px w-full",r.class)}},a),!1,!1),s})()}export{u as S};
@@ -1 +1 @@
1
- import{I as l}from"./Icon-C2LTALdM.js";import{c as r,m as e}from"./define-CNSKFZCd.js";var o=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],c=a=>r(l,e(a,{name:"Settings",iconNode:o})),m=c;export{m as s};
1
+ import{I as l}from"./Icon-Tj58ES_d.js";import{c as r,m as e}from"./define-D1din7Ld.js";var o=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],c=a=>r(l,e(a,{name:"Settings",iconNode:o})),m=c;export{m as s};
@@ -1 +1 @@
1
- import{i as e,c as a,S as d,a as c,b as u,t as i}from"./define-CNSKFZCd.js";import{c as f}from"./cn-CU7UAWzk.js";var p=i('<p class="text-xs text-muted-foreground">'),x=i('<section><div part=header class="flex flex-col gap-0.5 px-1"><h3 class="text-xs font-semibold uppercase tracking-wide text-muted-foreground"></h3></div><div part=body class="divide-y divide-border overflow-hidden rounded-xl border border-border bg-surface">'),g=i('<span class="text-xs leading-snug text-muted-foreground">'),h=i("<div part=control class=shrink-0>"),v=i('<div><div part=label class="flex min-w-0 flex-col gap-0.5"><span class="text-sm text-foreground">');function b(r){return(()=>{var t=x(),s=t.firstChild,l=s.firstChild,n=s.nextSibling;return e(l,()=>r.heading),e(s,a(d,{get when(){return r.description},get children(){var o=p();return e(o,()=>r.description),o}}),null),e(n,()=>r.children),c(()=>u(t,f("flex flex-col gap-2",r.class))),t})()}function m(r){return(()=>{var t=v(),s=t.firstChild,l=s.firstChild;return e(l,()=>r.label),e(s,a(d,{get when(){return r.description},get children(){var n=g();return e(n,()=>r.description),n}}),null),e(t,a(d,{get when(){return r.control},get children(){var n=h();return e(n,()=>r.control),n}}),null),c(()=>u(t,f("flex items-center justify-between gap-4 px-4 py-3",r.class))),t})()}export{m as S,b as a};
1
+ import{i as e,c as a,S as d,a as c,b as u,t as i}from"./define-D1din7Ld.js";import{c as f}from"./cn-CU7UAWzk.js";var p=i('<p class="text-xs text-muted-foreground">'),x=i('<section><div part=header class="flex flex-col gap-0.5 px-1"><h3 class="text-xs font-semibold uppercase tracking-wide text-muted-foreground"></h3></div><div part=body class="divide-y divide-border overflow-hidden rounded-xl border border-border bg-surface">'),g=i('<span class="text-xs leading-snug text-muted-foreground">'),h=i("<div part=control class=shrink-0>"),v=i('<div><div part=label class="flex min-w-0 flex-col gap-0.5"><span class="text-sm text-foreground">');function b(r){return(()=>{var t=x(),s=t.firstChild,l=s.firstChild,n=s.nextSibling;return e(l,()=>r.heading),e(s,a(d,{get when(){return r.description},get children(){var o=p();return e(o,()=>r.description),o}}),null),e(n,()=>r.children),c(()=>u(t,f("flex flex-col gap-2",r.class))),t})()}function m(r){return(()=>{var t=v(),s=t.firstChild,l=s.firstChild;return e(l,()=>r.label),e(s,a(d,{get when(){return r.description},get children(){var n=g();return e(n,()=>r.description),n}}),null),e(t,a(d,{get when(){return r.control},get children(){var n=h();return e(n,()=>r.control),n}}),null),c(()=>u(t,f("flex items-center justify-between gap-4 px-4 py-3",r.class))),t})()}export{m as S,b as a};
@@ -1 +1 @@
1
- import{I as e}from"./Icon-C2LTALdM.js";import{c as o,m as y}from"./define-CNSKFZCd.js";var h=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],i=a=>o(e,y(a,{name:"Bookmark",iconNode:h})),m=i,n=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],c=a=>o(e,y(a,{name:"Copy",iconNode:n})),p=c,s=[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]],k=a=>o(e,y(a,{name:"Flag",iconNode:s})),t=k,d=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],r=a=>o(e,y(a,{name:"Pencil",iconNode:d})),x=r,l=[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]],f=a=>o(e,y(a,{name:"Share",iconNode:l})),v=f;export{m as b,p as c,t as f,x as p,v as s};
1
+ import{I as e}from"./Icon-Tj58ES_d.js";import{c as o,m as y}from"./define-D1din7Ld.js";var h=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],i=a=>o(e,y(a,{name:"Bookmark",iconNode:h})),m=i,n=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],c=a=>o(e,y(a,{name:"Copy",iconNode:n})),p=c,s=[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]],k=a=>o(e,y(a,{name:"Flag",iconNode:s})),t=k,d=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],r=a=>o(e,y(a,{name:"Pencil",iconNode:d})),x=r,l=[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]],f=a=>o(e,y(a,{name:"Share",iconNode:l})),v=f;export{m as b,p as c,t as f,x as p,v as s};
@@ -0,0 +1 @@
1
+ import{s as m,c as u,i as v,F as w,S as p,t as c,l as x,m as y}from"./define-D1din7Ld.js";import{c as b}from"./cn-CU7UAWzk.js";var k=c("<div part=skeleton>"),S=c('<div class="flex w-full flex-col gap-2">');const l=r=>typeof r=="number"?`${r}px`:r,F=r=>r==="circle"?"rounded-full":r==="text"?"rounded":"rounded-md";function j(r){const[t,o]=m(r,["class","variant","width","height","lines","style"]),s=()=>t.width!=null,d=()=>t.height!=null,g=()=>!s()&&t.variant!=null&&t.variant!=="circle",f=a=>{const e=typeof t.style=="object"&&t.style?{...t.style}:{};if(t.variant==="circle"){const n=l(t.width)??l(t.height)??"2.5rem";return e.width=n,e.height=n,e}return a?e.width="70%":s()&&(e.width=l(t.width)),d()?e.height=l(t.height):t.variant==="text"&&(e.height="0.75rem"),e},h=(a=!1)=>(()=>{var e=k();return x(e,y({get class(){return b("animate-pulse bg-foreground/10",F(t.variant),g()&&"w-full",t.class)},get style(){return f(a)}},o),!1,!1),e})(),i=()=>t.variant==="text"?Math.max(1,t.lines??1):1;return u(p,{get when(){return i()>1},get fallback(){return h()},get children(){var a=S();return v(a,u(w,{get each(){return Array.from({length:i()})},children:(e,n)=>h(n()===i()-1)})),a}})}export{j as S};
@@ -1 +1 @@
1
- const a=[{name:"header-start",mode:"inject",doc:"Leading header controls, left of the title."},{name:"header-end",mode:"inject",doc:"Trailing header controls."},{name:"header",mode:"replace",part:!0,doc:"Full custom header; replaces the built-in title/model/context bar."},{name:"sidebar",mode:"inject",part:!0,doc:"Left column (your nav / conversation list). Fixed width; use compose-your-own for resizable."},{name:"empty",mode:"replace",doc:"Custom zero-state rendered in the message area while the thread is empty. Replaces the empty message list only \u2014 the composer and any suggestions still render."},{name:"composer",mode:"replace",doc:"Full custom composer; you own submit + loading, drive the thread via messages."},{name:"composer-actions",mode:"inject",doc:"Accessory row above the composer."},{name:"footer",mode:"inject",part:!0,doc:"Row below the composer (disclaimers, token meter)."}],n=[{name:"header",mode:"replace",doc:'Full custom title bar; replaces the built-in toggle / "Chats" / New-chat row.'},{name:"empty",mode:"replace",doc:'Custom zero-state shown when there are no conversations; replaces the built-in "No conversations yet".'},{name:"footer",mode:"inject",doc:"A row below the list \u2014 account, settings, or usage."}],c=[{name:"before-body",mode:"inject",doc:"A per-message header at the TOP of the body, above reasoning/tools/content \u2014 a model-name label, a role + timestamp line."},{name:"after-body",mode:"inject",doc:"A row at the BOTTOM of the body, below the action bar \u2014 a citation/sources row, a token-cost/latency line."},{name:"avatar",mode:"replace",part:!0,doc:'Replaces the built-in avatar rail with your own node. Use `avatar="none"` to omit the rail and let the body span the full row.'}],s=[{name:"sidebar-header",mode:"inject",doc:"Top of the conversation rail (brand, a kai-tabs strip)."},{name:"sidebar-footer",mode:"inject",doc:"Bottom of the rail: an upgrade card, a Design trigger, a user-menu cluster."},{name:"main-header",mode:"inject",doc:"Top of the main region (a top-placed banner or a corner action)."},{name:"main",mode:"replace",doc:"Replace the built-in chat thread with your own main view (a home or dashboard screen). Omit to keep the thread."}];function d(t,r=a){const e={};for(const o of r)e[o.name]=!!t.querySelector(`:scope > [slot="${o.name}"]`);return e}export{a as C,c as M,s as W,n as a,d as r};
1
+ const a=[{name:"header-start",mode:"inject",doc:"Leading header controls, left of the title."},{name:"header-end",mode:"inject",doc:"Trailing header controls."},{name:"header",mode:"replace",part:!0,doc:"Full custom header; replaces the built-in title/model/context bar."},{name:"sidebar",mode:"inject",part:!0,doc:"Left column (your nav / conversation list). Fixed width; use compose-your-own for resizable."},{name:"empty",mode:"replace",doc:"Custom zero-state rendered in the message area while the thread is empty. Replaces the empty message list only \u2014 the composer and any suggestions still render."},{name:"composer",mode:"replace",doc:"Full custom composer; you own submit + loading, drive the thread via messages."},{name:"composer-actions",mode:"inject",doc:"Accessory row above the composer."},{name:"footer",mode:"inject",part:!0,doc:"Row below the composer (disclaimers, token meter)."}],n=[{name:"header",mode:"replace",doc:'Full custom title bar; replaces the built-in toggle / "Chats" / New-chat row.'},{name:"empty",mode:"replace",doc:'Custom zero-state shown when there are no conversations; replaces the built-in "No conversations yet".'},{name:"footer",mode:"inject",doc:"A row below the list \u2014 account, settings, or usage."}],s=[{name:"before-body",mode:"inject",doc:"A per-message header at the TOP of the body, above reasoning/tools/content \u2014 a model-name label, a role + timestamp line."},{name:"after-body",mode:"inject",doc:"A row at the BOTTOM of the body, below the action bar \u2014 a citation/sources row, a token-cost/latency line."},{name:"avatar",mode:"replace",part:!0,doc:'Replaces the built-in avatar rail with your own node. Use `avatar="none"` to omit the rail and let the body span the full row.'}],c=[{name:"sidebar-header",mode:"inject",doc:"Top of the conversation rail (brand, a kai-tabs strip)."},{name:"sidebar-footer",mode:"inject",doc:"Bottom of the rail: an upgrade card, a Design trigger, a user-menu cluster."},{name:"main-header",mode:"inject",doc:"Top of the main region (a top-placed banner or a corner action)."},{name:"main",mode:"replace",doc:"Replace the built-in chat thread with your own main view (a home or dashboard screen). Omit to keep the thread."}],d=[{name:"empty",mode:"replace",doc:"Custom zero-state rendered in the message area while the thread is empty; replaces the built-in default."}];function i(t,r=a){const e={};for(const o of r)e[o.name]=!!t.querySelector(`:scope > [slot="${o.name}"]`);return e}export{a as C,s as M,d as T,c as W,n as a,i as r};
@@ -1 +1 @@
1
- import{I as r}from"./Icon-C2LTALdM.js";import{c as a,m}from"./define-CNSKFZCd.js";var p=[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]],s=o=>a(r,m(o,{name:"Star",iconNode:p})),t=s;export{t as s};
1
+ import{I as r}from"./Icon-Tj58ES_d.js";import{c as a,m}from"./define-D1din7Ld.js";var p=[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]],s=o=>a(r,m(o,{name:"Star",iconNode:p})),t=s;export{t as s};
@@ -1 +1 @@
1
- import{$ as u,J as K,K as P,L as w,g as z}from"./define-CNSKFZCd.js";const h=Symbol("store-raw"),y=Symbol("store-node"),f=Symbol("store-has"),m=Symbol("store-self");function v(t){let r=t[u];if(!r&&(Object.defineProperty(t,u,{value:r=new Proxy(t,J)}),!Array.isArray(t))){const o=Object.keys(t),e=Object.getOwnPropertyDescriptors(t),c=Object.getPrototypeOf(t),n=c!==null&&t!==null&&typeof t=="object"&&!Array.isArray(t)&&c!==Object.prototype;if(n){const i=Object.getOwnPropertyDescriptors(c);o.push(...Object.keys(i)),Object.assign(e,i)}for(let i=0,l=o.length;i<l;i++){const s=o[i];n&&s==="constructor"||e[s].get&&Object.defineProperty(t,s,{configurable:!0,enumerable:e[s].enumerable,get:e[s].get.bind(r)})}}return r}function g(t){let r;return t!=null&&typeof t=="object"&&(t[u]||!(r=Object.getPrototypeOf(t))||r===Object.prototype||Array.isArray(t))}function a(t,r=new Set){let o,e,c,n;if(o=t!=null&&t[h])return o;if(!g(t)||r.has(t))return t;if(Array.isArray(t)){Object.isFrozen(t)?t=t.slice(0):r.add(t);for(let i=0,l=t.length;i<l;i++)c=t[i],(e=a(c,r))!==c&&(t[i]=e)}else{Object.isFrozen(t)?t=Object.assign({},t):r.add(t);const i=Object.keys(t),l=Object.getOwnPropertyDescriptors(t);for(let s=0,d=i.length;s<d;s++)n=i[s],!l[n].get&&(c=t[n],(e=a(c,r))!==c&&(t[n]=e))}return t}function _(t,r){let o=t[r];return o||Object.defineProperty(t,r,{value:o=Object.create(null)}),o}function b(t,r,o){if(t[r])return t[r];const[e,c]=z(o,{equals:!1,internal:!0});return e.$=c,t[r]=e}function F(t,r){const o=Reflect.getOwnPropertyDescriptor(t,r);return!o||o.get||!o.configurable||r===u||r===y||(delete o.value,delete o.writable,o.get=()=>t[u][r]),o}function $(t){w()&&b(_(t,y),m)()}function R(t){return $(t),Reflect.ownKeys(t)}const J={get(t,r,o){if(r===h)return t;if(r===u)return o;if(r===P)return $(t),o;const e=_(t,y),c=e[r];let n=c?c():t[r];if(r===y||r===f||r==="__proto__")return n;if(!c){const i=Object.getOwnPropertyDescriptor(t,r);w()&&(typeof n!="function"||t.hasOwnProperty(r))&&!(i&&i.get)&&(n=b(e,r,n)())}return g(n)?v(n):n},has(t,r){return r===h||r===u||r===P||r===y||r===f||r==="__proto__"?!0:(w()&&b(_(t,f),r)(),r in t)},set(){return!0},deleteProperty(){return!0},ownKeys:R,getOwnPropertyDescriptor:F};function p(t,r,o,e=!1){if(r==="__proto__"||!e&&t[r]===o)return;const c=t[r],n=t.length;o===void 0?(delete t[r],t[f]&&t[f][r]&&c!==void 0&&t[f][r].$()):(t[r]=o,t[f]&&t[f][r]&&c===void 0&&t[f][r].$());let i=_(t,y),l;if((l=b(i,r,c))&&l.$(()=>o),Array.isArray(t)&&t.length!==n){for(let s=t.length;s<n;s++)(l=i[s])&&l.$();(l=b(i,"length",n))&&l.$(t.length)}(l=i[m])&&l.$()}function D(t,r){const o=Object.keys(r);for(let e=0;e<o.length;e+=1){const c=o[e];k(c)||p(t,c,r[c])}}function k(t){return t==="__proto__"||t==="constructor"||t==="prototype"}function L(t,r){if(typeof r=="function"&&(r=r(t)),r=a(r),Array.isArray(r)){if(t===r)return;let o=0,e=r.length;for(;o<e;o++){const c=r[o];t[o]!==c&&p(t,o,c)}p(t,"length",e)}else D(t,r)}function O(t,r,o=[]){let e,c=t;if(r.length>1){e=r.shift();const i=typeof e,l=Array.isArray(t);if(i==="string"&&(e==="__proto__"||r.length>1&&k(e)))return;if(Array.isArray(e)){for(let s=0;s<e.length;s++)O(t,[e[s]].concat(r),o);return}else if(l&&i==="function"){for(let s=0;s<t.length;s++)e(t[s],s)&&O(t,[s].concat(r),o);return}else if(l&&i==="object"){const{from:s=0,to:d=t.length-1,by:x=1}=e;for(let A=s;A<=d;A+=x)O(t,[A].concat(r),o);return}else if(r.length>1){O(t[e],r,[e].concat(o));return}c=t[e],o=[e].concat(o)}let n=r[0];typeof n=="function"&&(n=n(c,o),n===c)||e===void 0&&n==null||(n=a(n),e===void 0||g(c)&&g(n)&&!Array.isArray(n)?D(c,n):p(t,e,n))}function W(...[t,r]){const o=a(t||{}),e=Array.isArray(o),c=v(o);function n(...i){K(()=>{e&&i.length===1?L(o,i[0]):O(o,i)})}return[c,n]}const j=new WeakMap,S={get(t,r){if(r===h)return t;const o=t[r];if(r===u||r===P||r===y||r===f||r==="__proto__")return o;let e;return g(o)?j.get(o)||(j.set(o,e=new Proxy(o,S)),e):o},set(t,r,o){return p(t,r,a(o)),!0},deleteProperty(t,r){return p(t,r,void 0,!0),!0}};function q(t){return r=>{if(g(r)){let o;(o=j.get(r))||j.set(r,o=new Proxy(r,S)),t(o)}return r}}export{W as c,q as p,a as u};
1
+ import{$ as u,J as K,K as P,L as w,g as z}from"./define-D1din7Ld.js";const h=Symbol("store-raw"),y=Symbol("store-node"),f=Symbol("store-has"),m=Symbol("store-self");function v(t){let r=t[u];if(!r&&(Object.defineProperty(t,u,{value:r=new Proxy(t,J)}),!Array.isArray(t))){const o=Object.keys(t),e=Object.getOwnPropertyDescriptors(t),c=Object.getPrototypeOf(t),n=c!==null&&t!==null&&typeof t=="object"&&!Array.isArray(t)&&c!==Object.prototype;if(n){const i=Object.getOwnPropertyDescriptors(c);o.push(...Object.keys(i)),Object.assign(e,i)}for(let i=0,l=o.length;i<l;i++){const s=o[i];n&&s==="constructor"||e[s].get&&Object.defineProperty(t,s,{configurable:!0,enumerable:e[s].enumerable,get:e[s].get.bind(r)})}}return r}function g(t){let r;return t!=null&&typeof t=="object"&&(t[u]||!(r=Object.getPrototypeOf(t))||r===Object.prototype||Array.isArray(t))}function a(t,r=new Set){let o,e,c,n;if(o=t!=null&&t[h])return o;if(!g(t)||r.has(t))return t;if(Array.isArray(t)){Object.isFrozen(t)?t=t.slice(0):r.add(t);for(let i=0,l=t.length;i<l;i++)c=t[i],(e=a(c,r))!==c&&(t[i]=e)}else{Object.isFrozen(t)?t=Object.assign({},t):r.add(t);const i=Object.keys(t),l=Object.getOwnPropertyDescriptors(t);for(let s=0,d=i.length;s<d;s++)n=i[s],!l[n].get&&(c=t[n],(e=a(c,r))!==c&&(t[n]=e))}return t}function _(t,r){let o=t[r];return o||Object.defineProperty(t,r,{value:o=Object.create(null)}),o}function b(t,r,o){if(t[r])return t[r];const[e,c]=z(o,{equals:!1,internal:!0});return e.$=c,t[r]=e}function F(t,r){const o=Reflect.getOwnPropertyDescriptor(t,r);return!o||o.get||!o.configurable||r===u||r===y||(delete o.value,delete o.writable,o.get=()=>t[u][r]),o}function $(t){w()&&b(_(t,y),m)()}function R(t){return $(t),Reflect.ownKeys(t)}const J={get(t,r,o){if(r===h)return t;if(r===u)return o;if(r===P)return $(t),o;const e=_(t,y),c=e[r];let n=c?c():t[r];if(r===y||r===f||r==="__proto__")return n;if(!c){const i=Object.getOwnPropertyDescriptor(t,r);w()&&(typeof n!="function"||t.hasOwnProperty(r))&&!(i&&i.get)&&(n=b(e,r,n)())}return g(n)?v(n):n},has(t,r){return r===h||r===u||r===P||r===y||r===f||r==="__proto__"?!0:(w()&&b(_(t,f),r)(),r in t)},set(){return!0},deleteProperty(){return!0},ownKeys:R,getOwnPropertyDescriptor:F};function p(t,r,o,e=!1){if(r==="__proto__"||!e&&t[r]===o)return;const c=t[r],n=t.length;o===void 0?(delete t[r],t[f]&&t[f][r]&&c!==void 0&&t[f][r].$()):(t[r]=o,t[f]&&t[f][r]&&c===void 0&&t[f][r].$());let i=_(t,y),l;if((l=b(i,r,c))&&l.$(()=>o),Array.isArray(t)&&t.length!==n){for(let s=t.length;s<n;s++)(l=i[s])&&l.$();(l=b(i,"length",n))&&l.$(t.length)}(l=i[m])&&l.$()}function D(t,r){const o=Object.keys(r);for(let e=0;e<o.length;e+=1){const c=o[e];k(c)||p(t,c,r[c])}}function k(t){return t==="__proto__"||t==="constructor"||t==="prototype"}function L(t,r){if(typeof r=="function"&&(r=r(t)),r=a(r),Array.isArray(r)){if(t===r)return;let o=0,e=r.length;for(;o<e;o++){const c=r[o];t[o]!==c&&p(t,o,c)}p(t,"length",e)}else D(t,r)}function O(t,r,o=[]){let e,c=t;if(r.length>1){e=r.shift();const i=typeof e,l=Array.isArray(t);if(i==="string"&&(e==="__proto__"||r.length>1&&k(e)))return;if(Array.isArray(e)){for(let s=0;s<e.length;s++)O(t,[e[s]].concat(r),o);return}else if(l&&i==="function"){for(let s=0;s<t.length;s++)e(t[s],s)&&O(t,[s].concat(r),o);return}else if(l&&i==="object"){const{from:s=0,to:d=t.length-1,by:x=1}=e;for(let A=s;A<=d;A+=x)O(t,[A].concat(r),o);return}else if(r.length>1){O(t[e],r,[e].concat(o));return}c=t[e],o=[e].concat(o)}let n=r[0];typeof n=="function"&&(n=n(c,o),n===c)||e===void 0&&n==null||(n=a(n),e===void 0||g(c)&&g(n)&&!Array.isArray(n)?D(c,n):p(t,e,n))}function W(...[t,r]){const o=a(t||{}),e=Array.isArray(o),c=v(o);function n(...i){K(()=>{e&&i.length===1?L(o,i[0]):O(o,i)})}return[c,n]}const j=new WeakMap,S={get(t,r){if(r===h)return t;const o=t[r];if(r===u||r===P||r===y||r===f||r==="__proto__")return o;let e;return g(o)?j.get(o)||(j.set(o,e=new Proxy(o,S)),e):o},set(t,r,o){return p(t,r,a(o)),!0},deleteProperty(t,r){return p(t,r,void 0,!0),!0}};function q(t){return r=>{if(g(r)){let o;(o=j.get(r))||j.set(r,o=new Proxy(r,S)),t(o)}return r}}export{W as c,q as p,a as u};
@@ -1 +1 @@
1
- import{s as o,c as i,m as s,D as m}from"./define-CNSKFZCd.js";import{c}from"./cn-CU7UAWzk.js";function u(a){const[r,e]=o(a,["as","class","duration","spread","children"]),t=()=>Math.min(Math.max(r.spread??20,5),45),n=()=>r.as??"span";return i(m,s({get component(){return n()},get class(){return c("bg-size-[200%_auto] bg-clip-text font-medium text-transparent","animate-[shimmer_4s_infinite_linear]",r.class)},get style(){return{"background-image":`linear-gradient(to right, var(--color-muted-foreground) ${50-t()}%, var(--color-foreground) 50%, var(--color-muted-foreground) ${50+t()}%)`,"animation-duration":`${r.duration??4}s`}}},e,{get children(){return r.children}}))}export{u as T};
1
+ import{s as o,c as i,m as s,D as m}from"./define-D1din7Ld.js";import{c}from"./cn-CU7UAWzk.js";function u(a){const[r,e]=o(a,["as","class","duration","spread","children"]),t=()=>Math.min(Math.max(r.spread??20,5),45),n=()=>r.as??"span";return i(m,s({get component(){return n()},get class(){return c("bg-size-[200%_auto] bg-clip-text font-medium text-transparent","animate-[shimmer_4s_infinite_linear]",r.class)},get style(){return{"background-image":`linear-gradient(to right, var(--color-muted-foreground) ${50-t()}%, var(--color-foreground) 50%, var(--color-muted-foreground) ${50+t()}%)`,"animation-duration":`${r.duration??4}s`}}},e,{get children(){return r.children}}))}export{u as T};
@@ -0,0 +1 @@
1
+ import{p as s,s as a,u,l,m as f,t as g}from"./define-D1din7Ld.js";import{c as m}from"./cn-CU7UAWzk.js";function c(i={}){let e;function r(){if(!e)return;e.style.height="auto";const t=e.scrollHeight;i.maxHeight&&t>i.maxHeight?(e.style.height=`${i.maxHeight}px`,e.style.overflowY="auto"):(e.style.height=`${t}px`,e.style.overflowY="hidden")}function n(t){e=t,t.addEventListener("input",r),requestAnimationFrame(r),s(()=>t.removeEventListener("input",r))}return{ref:n,resize:r}}var h=g("<textarea rows=1>");function d(i){const[e,r]=a(i,["class","maxHeight","autoResize"]),{ref:n}=c({maxHeight:e.maxHeight});return(()=>{var t=h(),o=e.autoResize!==!1?n:void 0;return typeof o=="function"&&u(o,t),l(t,f({get class(){return m("w-full resize-none rounded-md bg-transparent text-sm text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",e.class)}},r),!1,!1),t})()}export{d as T};
@@ -1 +1 @@
1
- import{I as m}from"./Icon-C2LTALdM.js";import{c as e,m as o}from"./define-CNSKFZCd.js";var h=[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]],t=a=>e(m,o(a,{name:"ThumbsDown",iconNode:h})),n=t,p=[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]],r=a=>e(m,o(a,{name:"ThumbsUp",iconNode:p})),d=r;export{n as a,d as t};
1
+ import{I as m}from"./Icon-Tj58ES_d.js";import{c as e,m as o}from"./define-D1din7Ld.js";var h=[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]],t=a=>e(m,o(a,{name:"ThumbsDown",iconNode:h})),n=t,p=[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]],r=a=>e(m,o(a,{name:"ThumbsUp",iconNode:p})),d=r;export{n as a,d as t};
@@ -1 +1 @@
1
- import{Q as p,g as v}from"./define-CNSKFZCd.js";import{c as m,p as f}from"./store-th4VyJXM.js";let e={};function g(i){e.stack&&i.setAttribute("stack",e.stack),e.position&&i.setAttribute("position",e.position),e.max!==void 0&&i.setAttribute("max",String(e.max)),e.appearance&&i.setAttribute("appearance",e.appearance),e.inverse!==void 0&&(e.inverse?i.setAttribute("inverse",""):i.removeAttribute("inverse"))}const b=5e3,x=7e3,{toasts:a,setToasts:o,mounted:O,setMounted:A}=p(()=>{const[i,t]=m([]),[n,s]=v(!1);return{toasts:i,setToasts:t,mounted:n,setMounted:s}});let u=0;function k(){return u+=1,`toast-${u}`}function M(i){const t=i.duration??b;return t===0?0:i.action?Math.max(t,x):t}const c=new Map;function h(i=null){if(typeof document>"u")return;const t=c.get(i);if(t&&t.isConnected)return t;const n=document.createElement("kai-toast-region");return document.body.appendChild(n),n.toasts=a,i&&(n.target=i),g(n),c.set(i,n),A(!0),n}function w(i){const t=a.findIndex(n=>n.id===i.id);t>=0?o(t,i):o(f(n=>{n.push(i)}))}function d(i){o(t=>t.filter(n=>n.id!==i))}function I(i){return{id:i,dismiss:()=>d(i),update:t=>{const n=a.findIndex(s=>s.id===i);n>=0&&o(n,s=>({...s,...t}))}}}function r(i,t,n){h(t?.target??null);const s=t?.id??k(),l={id:s,message:i,variant:t?.variant??n,appearance:t?.appearance??e.appearance??"pill",inverse:t?.inverse??e.inverse??!1,description:t?.description,action:t?.action,duration:t?.duration,dismissible:t?.dismissible,target:t?.target};return w(l),I(s)}const T=Object.assign((i,t)=>r(i,t,"neutral"),{success:(i,t)=>r(i,t,"success"),warning:(i,t)=>r(i,t,"warning"),error:(i,t)=>r(i,t,"error"),info:(i,t)=>r(i,t,"info"),dismiss:d,clear:()=>o([])});export{M as r,T as t};
1
+ import{Q as p,g as v}from"./define-D1din7Ld.js";import{c as m,p as f}from"./store-CHyW95TP.js";let e={};function g(i){e.stack&&i.setAttribute("stack",e.stack),e.position&&i.setAttribute("position",e.position),e.max!==void 0&&i.setAttribute("max",String(e.max)),e.appearance&&i.setAttribute("appearance",e.appearance),e.inverse!==void 0&&(e.inverse?i.setAttribute("inverse",""):i.removeAttribute("inverse"))}const b=5e3,x=7e3,{toasts:a,setToasts:o,mounted:O,setMounted:A}=p(()=>{const[i,t]=m([]),[n,s]=v(!1);return{toasts:i,setToasts:t,mounted:n,setMounted:s}});let u=0;function k(){return u+=1,`toast-${u}`}function M(i){const t=i.duration??b;return t===0?0:i.action?Math.max(t,x):t}const c=new Map;function h(i=null){if(typeof document>"u")return;const t=c.get(i);if(t&&t.isConnected)return t;const n=document.createElement("kai-toast-region");return document.body.appendChild(n),n.toasts=a,i&&(n.target=i),g(n),c.set(i,n),A(!0),n}function w(i){const t=a.findIndex(n=>n.id===i.id);t>=0?o(t,i):o(f(n=>{n.push(i)}))}function d(i){o(t=>t.filter(n=>n.id!==i))}function I(i){return{id:i,dismiss:()=>d(i),update:t=>{const n=a.findIndex(s=>s.id===i);n>=0&&o(n,s=>({...s,...t}))}}}function r(i,t,n){h(t?.target??null);const s=t?.id??k(),l={id:s,message:i,variant:t?.variant??n,appearance:t?.appearance??e.appearance??"pill",inverse:t?.inverse??e.inverse??!1,description:t?.description,action:t?.action,duration:t?.duration,dismissible:t?.dismissible,target:t?.target};return w(l),I(s)}const T=Object.assign((i,t)=>r(i,t,"neutral"),{success:(i,t)=>r(i,t,"success"),warning:(i,t)=>r(i,t,"warning"),error:(i,t)=>r(i,t,"error"),info:(i,t)=>r(i,t,"info"),dismiss:d,clear:()=>o([])});export{M as r,T as t};
@@ -1 +1 @@
1
- import{c as t,m as b,s as B,g as E,i as a,S as l,F as L,n as y,a as p,b as M,t as o,G as g}from"./define-CNSKFZCd.js";import{c as P}from"./cn-CU7UAWzk.js";import{a as $,b as q,C as D}from"./collapsible-CWUAShMC.js";import{B as F}from"./button-DBDZebGr.js";import{c as G}from"./chevron-down-DcRg1aRU.js";import{I as k}from"./Icon-C2LTALdM.js";import{c as J}from"./circle-x-pDtzlghQ.js";import{s as V}from"./settings-Cz1bMJP9.js";var A=[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],H=e=>t(k,b(e,{name:"CircleCheckBig",iconNode:A})),K=H,Q=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],U=e=>t(k,b(e,{name:"LoaderCircle",iconNode:Q})),W=U,X=o('<span class="px-2 py-1 rounded-full text-xs font-medium">Processing'),Y=o('<span class="px-2 py-1 rounded-full text-xs font-medium">Ready'),Z=o('<span class="px-2 py-1 rounded-full text-xs font-medium">Completed'),_=o('<span class="px-2 py-1 rounded-full text-xs font-medium">Error'),tt=o('<div><h4 class="text-muted-foreground mb-2 text-sm font-medium">Input</h4><div class="rounded bg-surface-strong p-2 font-mono text-sm">'),et=o('<div><h4 class="text-muted-foreground mb-2 text-sm font-medium">Output</h4><div tabindex=0 class="max-h-60 overflow-auto rounded bg-surface-strong p-2 font-mono text-sm"><pre class=whitespace-pre-wrap>'),rt=o('<div><h4 class="mb-2 text-sm font-medium text-red-600 dark:text-red-400">Error</h4><div class="rounded bg-red-500/10 p-2 text-sm">'),nt=o('<div class="text-muted-foreground text-sm">Processing tool call...'),at=o('<div class="text-muted-foreground pt-2 text-xs"><span class=font-mono>Call ID: '),lt=o('<div class="space-y-3 p-3">'),ot=o("<div>"),st=o('<div class="flex items-center gap-2"><span class="font-mono text-sm font-medium">'),it=o("<div class=mb-1><span class=text-muted-foreground>:</span> <span>");function S(e){return e===null?"null":e===void 0?"undefined":typeof e=="string"?e:typeof e=="object"?JSON.stringify(e,null,2):String(e)}function ut(e){return[t(l,{get when(){return e.state==="input-streaming"},get children(){return t(W,{class:"size-4 animate-spin text-blue-500"})}}),t(l,{get when(){return e.state==="input-available"},get children(){return t(V,{class:"size-4 text-orange-500"})}}),t(l,{get when(){return e.state==="output-available"},get children(){return t(K,{class:"size-4 text-green-500"})}}),t(l,{get when(){return e.state==="output-error"},get children(){return t(J,{class:"size-4 text-red-500"})}})]}const dt={"input-streaming":"var(--color-tool-blue)","input-available":"var(--color-tool-amber)","output-available":"var(--color-tool-green)","output-error":"var(--color-tool-red)"},ct={"input-streaming":"hsl(217 91% 60%)","input-available":"hsl(38 92% 50%)","output-available":"hsl(142 71% 45%)","output-error":"hsl(0 84% 60%)"};function f(e){return{color:dt[e],background:`color-mix(in oklab, ${ct[e]} 15%, transparent)`}}function pt(e){return[t(l,{get when(){return e.state==="input-streaming"},get children(){var r=X();return p(u=>g(r,f("input-streaming"),u)),r}}),t(l,{get when(){return e.state==="input-available"},get children(){var r=Y();return p(u=>g(r,f("input-available"),u)),r}}),t(l,{get when(){return e.state==="output-available"},get children(){var r=Z();return p(u=>g(r,f("output-available"),u)),r}}),t(l,{get when(){return e.state==="output-error"},get children(){var r=_();return p(u=>g(r,f("output-error"),u)),r}})]}function mt(e){const[r,u]=B(e,["toolPart","defaultOpen","disabled","controllerRef","class"]),[z,O]=E(),I=()=>{var d;return((d=z())==null?void 0:d.open())??r.defaultOpen??!1},m=()=>r.toolPart.state,h=()=>r.toolPart.input,w=()=>r.toolPart.output;return(()=>{var d=ot();return a(d,t(D,{get defaultOpen(){return r.defaultOpen},get disabled(){return r.disabled},controllerRef:s=>{var n;O(s),(n=r.controllerRef)==null||n.call(r,s)},get children(){return[t($,{as:s=>t(F,b({variant:"ghost",class:"h-auto w-full justify-between rounded-b-none px-3 py-2 font-normal"},s,{get children(){return[(()=>{var n=st(),i=n.firstChild;return a(n,t(ut,{get state(){return m()}}),i),a(i,()=>r.toolPart.type),a(n,t(pt,{get state(){return m()}}),null),n})(),t(G,{get class(){return P("size-4 transition-transform",I()&&"rotate-180")}})]}}))}),t(q,{class:"data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down overflow-hidden",get children(){var s=lt();return a(s,t(l,{get when(){return y(()=>!!h())()&&Object.keys(h()).length>0},get children(){var n=tt(),i=n.firstChild,c=i.nextSibling;return a(c,t(L,{get each(){return Object.entries(h())},children:([v,j])=>(()=>{var C=it(),x=C.firstChild,R=x.firstChild,N=x.nextSibling,T=N.nextSibling;return a(x,v,R),a(T,()=>S(j)),C})()})),n}}),null),a(s,t(l,{get when(){return w()},get children(){var n=et(),i=n.firstChild,c=i.nextSibling,v=c.firstChild;return a(v,()=>S(w())),n}}),null),a(s,t(l,{get when(){return y(()=>m()==="output-error")()&&r.toolPart.errorText},get children(){var n=rt(),i=n.firstChild,c=i.nextSibling;return a(c,()=>r.toolPart.errorText),n}}),null),a(s,t(l,{get when(){return m()==="input-streaming"},get children(){return nt()}}),null),a(s,t(l,{get when(){return r.toolPart.toolCallId},get children(){var n=at(),i=n.firstChild;return i.firstChild,a(i,()=>r.toolPart.toolCallId,null),n}}),null),s}})]}})),p(()=>M(d,P("mt-3 overflow-hidden rounded-lg bg-surface",r.class))),d})()}export{mt as T};
1
+ import{c as t,m as b,s as B,g as E,i as a,S as l,F as L,n as y,a as p,b as M,t as o,r as g}from"./define-D1din7Ld.js";import{c as P}from"./cn-CU7UAWzk.js";import{a as $,b as q,C as D}from"./collapsible-DM1Ckd4e.js";import{B as F}from"./button-ZWNif3--.js";import{c as J}from"./chevron-down-BNsxc2hk.js";import{I as k}from"./Icon-Tj58ES_d.js";import{c as V}from"./circle-x-B7faJFlY.js";import{s as A}from"./settings-B8lmec4D.js";var G=[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],H=e=>t(k,b(e,{name:"CircleCheckBig",iconNode:G})),K=H,Q=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],U=e=>t(k,b(e,{name:"LoaderCircle",iconNode:Q})),W=U,X=o('<span class="px-2 py-1 rounded-full text-xs font-medium">Processing'),Y=o('<span class="px-2 py-1 rounded-full text-xs font-medium">Ready'),Z=o('<span class="px-2 py-1 rounded-full text-xs font-medium">Completed'),_=o('<span class="px-2 py-1 rounded-full text-xs font-medium">Error'),tt=o('<div><h4 class="text-muted-foreground mb-2 text-sm font-medium">Input</h4><div class="rounded bg-surface-strong p-2 font-mono text-sm">'),et=o('<div><h4 class="text-muted-foreground mb-2 text-sm font-medium">Output</h4><div tabindex=0 class="max-h-60 overflow-auto rounded bg-surface-strong p-2 font-mono text-sm"><pre class=whitespace-pre-wrap>'),rt=o('<div><h4 class="mb-2 text-sm font-medium text-red-600 dark:text-red-400">Error</h4><div class="rounded bg-red-500/10 p-2 text-sm">'),nt=o('<div class="text-muted-foreground text-sm">Processing tool call...'),at=o('<div class="text-muted-foreground pt-2 text-xs"><span class=font-mono>Call ID: '),lt=o('<div class="space-y-3 p-3">'),ot=o("<div>"),st=o('<div class="flex items-center gap-2"><span class="font-mono text-sm font-medium">'),it=o("<div class=mb-1><span class=text-muted-foreground>:</span> <span>");function S(e){return e===null?"null":e===void 0?"undefined":typeof e=="string"?e:typeof e=="object"?JSON.stringify(e,null,2):String(e)}function ut(e){return[t(l,{get when(){return e.state==="input-streaming"},get children(){return t(W,{class:"size-4 animate-spin text-blue-500"})}}),t(l,{get when(){return e.state==="input-available"},get children(){return t(A,{class:"size-4 text-orange-500"})}}),t(l,{get when(){return e.state==="output-available"},get children(){return t(K,{class:"size-4 text-green-500"})}}),t(l,{get when(){return e.state==="output-error"},get children(){return t(V,{class:"size-4 text-red-500"})}})]}const dt={"input-streaming":"var(--color-tool-blue)","input-available":"var(--color-tool-amber)","output-available":"var(--color-tool-green)","output-error":"var(--color-tool-red)"},ct={"input-streaming":"hsl(217 91% 60%)","input-available":"hsl(38 92% 50%)","output-available":"hsl(142 71% 45%)","output-error":"hsl(0 84% 60%)"};function f(e){return{color:dt[e],background:`color-mix(in oklab, ${ct[e]} 15%, transparent)`}}function pt(e){return[t(l,{get when(){return e.state==="input-streaming"},get children(){var r=X();return p(u=>g(r,f("input-streaming"),u)),r}}),t(l,{get when(){return e.state==="input-available"},get children(){var r=Y();return p(u=>g(r,f("input-available"),u)),r}}),t(l,{get when(){return e.state==="output-available"},get children(){var r=Z();return p(u=>g(r,f("output-available"),u)),r}}),t(l,{get when(){return e.state==="output-error"},get children(){var r=_();return p(u=>g(r,f("output-error"),u)),r}})]}function mt(e){const[r,u]=B(e,["toolPart","defaultOpen","disabled","controllerRef","class"]),[z,O]=E(),I=()=>{var d;return((d=z())==null?void 0:d.open())??r.defaultOpen??!1},m=()=>r.toolPart.state,h=()=>r.toolPart.input,w=()=>r.toolPart.output;return(()=>{var d=ot();return a(d,t(D,{get defaultOpen(){return r.defaultOpen},get disabled(){return r.disabled},controllerRef:s=>{var n;O(s),(n=r.controllerRef)==null||n.call(r,s)},get children(){return[t($,{as:s=>t(F,b({variant:"ghost",class:"h-auto w-full justify-between rounded-b-none px-3 py-2 font-normal"},s,{get children(){return[(()=>{var n=st(),i=n.firstChild;return a(n,t(ut,{get state(){return m()}}),i),a(i,()=>r.toolPart.type),a(n,t(pt,{get state(){return m()}}),null),n})(),t(J,{get class(){return P("size-4 transition-transform",I()&&"rotate-180")}})]}}))}),t(q,{class:"data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down overflow-hidden",get children(){var s=lt();return a(s,t(l,{get when(){return y(()=>!!h())()&&Object.keys(h()).length>0},get children(){var n=tt(),i=n.firstChild,c=i.nextSibling;return a(c,t(L,{get each(){return Object.entries(h())},children:([v,j])=>(()=>{var C=it(),x=C.firstChild,R=x.firstChild,N=x.nextSibling,T=N.nextSibling;return a(x,v,R),a(T,()=>S(j)),C})()})),n}}),null),a(s,t(l,{get when(){return w()},get children(){var n=et(),i=n.firstChild,c=i.nextSibling,v=c.firstChild;return a(v,()=>S(w())),n}}),null),a(s,t(l,{get when(){return y(()=>m()==="output-error")()&&r.toolPart.errorText},get children(){var n=rt(),i=n.firstChild,c=i.nextSibling;return a(c,()=>r.toolPart.errorText),n}}),null),a(s,t(l,{get when(){return m()==="input-streaming"},get children(){return nt()}}),null),a(s,t(l,{get when(){return r.toolPart.toolCallId},get children(){var n=at(),i=n.firstChild;return i.firstChild,a(i,()=>r.toolPart.toolCallId,null),n}}),null),s}})]}})),p(()=>M(d,P("mt-3 overflow-hidden rounded-lg bg-surface",r.class))),d})()}export{mt as T};
@@ -0,0 +1 @@
1
+ import{s as L,y as M,x as S,g as s,p as $,c as v,P as j,u as B,d as f,i as G,a as H,q as g,b as J,S as K,t as N}from"./define-D1din7Ld.js";import{c as Q}from"./cn-CU7UAWzk.js";import{c as U,u as V,a as W,A as X}from"./overlay-kD8dwRv_.js";var Y=N("<div role=tooltip style=position:fixed;pointer-events:none>");function Z(R){var x;const[n]=L(R,["content","children","class","openDelay","closeDelay","placement","defaultOpen","disabled","controllerRef","dismissOnClick"]),F=M(),b=S(),[i,t]=s(n.defaultOpen??!1),[r,q]=s(),[y,A]=s();(x=n.controllerRef)==null||x.call(n,{open:i,setOpen:e=>t(e&&!n.disabled)});let a,l=!1;const[E,c]=s(!1),[I,u]=s(!1),h=(e=0)=>{n.disabled||(clearTimeout(a),e?a=window.setTimeout(()=>t(!0),e):t(!0))},p=()=>{clearTimeout(a);const e=n.closeDelay??0;e?a=window.setTimeout(()=>t(!1),e):t(!1)},w=()=>{!E()&&!I()&&p()},T=()=>{n.dismissOnClick!==!1&&(c(!1),u(!1),p())};$(()=>clearTimeout(a));const d=U(i),m=V(r,y,{placement:n.placement??"top",gutter:6,onDisconnect:()=>t(!1)});return W({enabled:i,onDismiss:p,refs:()=>[r(),y()]}),[v(X,{as:"span",class:"inline-flex",ref:q,get"aria-describedby"(){return i()?b:void 0},onPointerEnter:()=>{c(!0),h(n.openDelay??600)},onPointerLeave:()=>{c(!1),w()},onPointerDown:()=>{l=!0,T(),window.setTimeout(()=>{l=!1},0)},onClick:T,onFocusIn:()=>{u(!0),l||h()},onFocusOut:e=>{const o=r();o&&o.contains(e.relatedTarget)||(u(!1),w())},get children(){return n.children}}),v(K,{get when(){return d.present()},get children(){return v(j,{get mount(){return F.portalMount()},get children(){var e=Y();return B(o=>{A(o),d.setRef(o)},e),f(e,"id",b),G(e,()=>n.content),H(o=>{var D=d.state()==="open"?"":void 0,O=d.state()==="closed"?"":void 0,P=`${m.pos().x}px`,k=`${m.pos().y}px`,z=m.hidden()?"hidden":"visible",C=Q("z-50 rounded-md bg-foreground px-2.5 py-1 text-xs text-background shadow-md","animate-in fade-in-0 zoom-in-95 data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:zoom-out-95",n.class);return D!==o.e&&f(e,"data-expanded",o.e=D),O!==o.t&&f(e,"data-closed",o.t=O),P!==o.a&&g(e,"left",o.a=P),k!==o.o&&g(e,"top",o.o=k),z!==o.i&&g(e,"visibility",o.i=z),C!==o.n&&J(e,o.n=C),o},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),e}})}})]}export{Z as T};
@@ -1 +1 @@
1
- import{I as e}from"./Icon-C2LTALdM.js";import{c as p,m as o}from"./define-CNSKFZCd.js";var r=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],t=a=>p(e,o(a,{name:"TriangleAlert",iconNode:r})),m=t;export{m as t};
1
+ import{I as e}from"./Icon-Tj58ES_d.js";import{c as p,m as o}from"./define-D1din7Ld.js";var r=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],t=a=>p(e,o(a,{name:"TriangleAlert",iconNode:r})),m=t;export{m as t};
@@ -0,0 +1 @@
1
+ import{c as o,m,i as p,S as f,a as g,d as h,t as v,B as x,A as C,g as k,h as b,o as w,j as i}from"./define-D1din7Ld.js";import{c as $}from"./cn-CU7UAWzk.js";import{B as y}from"./button-ZWNif3--.js";import{C as R}from"./card-BkHbp4BA.js";import{I as S}from"./Icon-Tj58ES_d.js";var L=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],A=s=>o(S,m(s,{name:"RotateCcw",iconNode:L})),B=A,D=v('<div role=group class="flex flex-wrap items-center gap-x-2 gap-y-1"><span class="min-w-0 text-sm text-muted-foreground"><span class="font-medium text-foreground"></span> <span class=text-foreground></span><span class=text-muted-foreground> \u2014 dismissed');const T={confirm:"Proposed",choice:"Choose",form:"Form",tasks:"Tasks"};function j(s){const t=T[s];return t?`${t}:`:s.length===0?"Card:":`${s.charAt(0).toUpperCase()}${s.slice(1)}:`}function q(s){const t=()=>j(s.type),a=()=>s.title??"this card",e=()=>s.reopenLabel??"Reopen",c=()=>`${t()} ${a()} \u2014 dismissed`;return o(R,{dense:!0,get class(){return s.class},get children(){var n=D(),l=n.firstChild,d=l.firstChild,r=d.nextSibling,u=r.nextSibling;return p(d,t),p(u,a),p(n,o(y,{type:"button",variant:"ghost",size:"sm",get class(){return $("ml-auto gap-1.5")},onClick:()=>s.onReopen(),get children(){return[o(B,{size:14,"aria-hidden":"true"}),o(f,{get when(){return e()},get children(){return e()}})]}}),null),g(()=>h(n,"aria-label",c())),n}})}const z=C();function F(){return x(z)}const I=new Set(["action","submit","expired"]);function M(s){const[t,a]=k(void 0);b(w(s.data,()=>a(void 0),{defer:!0}));const e=i(()=>s.prop()??t()),c=i(()=>e()!==void 0),n=i(()=>{const r=e();return r!==void 0&&I.has(r.kind)}),l=i(()=>{var r;return((r=e())==null?void 0:r.kind)==="dismissed"}),d=i(()=>s.prop()===void 0&&t()!==void 0);return{resolution:e,isResolved:c,isTerminal:n,isDeferred:l,isOptimistic:d,setLocal:a}}export{q as D,M as a,F as u};
@@ -0,0 +1,218 @@
1
+ import{h as u,i as x,c as y,a as b,d as w,b as R,q as A,g as S,p as _,t as k}from"./define-D1din7Ld.js";import{c as n,h as q,D as M,S as T}from"./create-tween-oVvAIG8r.js";import{C as W}from"./audio-visualizer-BqNy7dfm.js";const C=`
2
+ const float PI = 3.14159265359;
3
+ // Strand phase span: 0.5 + pi (fact sheet section 2's "sigma", the
4
+ // midpoint of the interval [1, 2*pi] with the interpolation knob fixed
5
+ // at 0.5).
6
+ const float STRAND_SIGMA = 0.5 + PI;
7
+ const int STRAND_COUNT = 36;
8
+
9
+ // 4-octave directional-sine warp cascade. M0 and the per-octave rotation B
10
+ // (cos 0.6, sin 0.8, an exact ~53.13 degree rotation) are fact sheet
11
+ // section 2's stated matrices; M1/M2/M3 = B composed with the previous
12
+ // octave's matrix, and each v_k is the first row of M_k. Hand-derived and
13
+ // checked against the fact sheet's own listed v_0..v_3 below, not copied
14
+ // from any source.
15
+ const mat2 WARP_M0 = mat2(0.6, 0.25, -0.25, 0.9);
16
+ const mat2 WARP_M1 = mat2(0.16, 0.63, -0.87, 0.34);
17
+ const mat2 WARP_M2 = mat2(-0.408, 0.506, -0.794, -0.492);
18
+ const mat2 WARP_M3 = mat2(-0.6496, -0.0228, -0.0828, -0.9304);
19
+ const vec2 WARP_V0 = vec2(0.600, -0.250);
20
+ const vec2 WARP_V1 = vec2(0.160, -0.870);
21
+ const vec2 WARP_V2 = vec2(-0.408, -0.794);
22
+ const vec2 WARP_V3 = vec2(-0.650, -0.083);
23
+
24
+ // Displaces p through all 4 octaves. Octave k's phase carries k*tau, so
25
+ // octave 0 is static in time and octave 3 moves fastest -- fine
26
+ // corrugation slides across coarse folds, which reads as flowing wind
27
+ // (fact sheet section 2, "Mechanism of the fold / wind").
28
+ vec2 auroraWarp(vec2 p, float phi, float tau, float freq, float amp) {
29
+ vec2 x = p;
30
+ float f = freq;
31
+ float a = amp;
32
+
33
+ vec2 q = WARP_M0 * x;
34
+ vec2 w = sin(f * q + vec2(phi));
35
+ x += (a / f) * WARP_V0 * w;
36
+ f *= 1.4;
37
+ a *= 1.0 + 0.1 * (max(w.x, w.y) - 1.0);
38
+
39
+ q = WARP_M1 * x;
40
+ w = sin(f * q + vec2(tau + phi));
41
+ x += (a / f) * WARP_V1 * w;
42
+ f *= 1.4;
43
+ a *= 1.0 + 0.1 * (max(w.x, w.y) - 1.0);
44
+
45
+ q = WARP_M2 * x;
46
+ w = sin(f * q + vec2(2.0 * tau + phi));
47
+ x += (a / f) * WARP_V2 * w;
48
+ f *= 1.4;
49
+ a *= 1.0 + 0.1 * (max(w.x, w.y) - 1.0);
50
+
51
+ q = WARP_M3 * x;
52
+ w = sin(f * q + vec2(3.0 * tau + phi));
53
+ x += (a / f) * WARP_V3 * w;
54
+
55
+ return x;
56
+ }
57
+
58
+ vec3 auroraRgb2Hsv(vec3 c) {
59
+ vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
60
+ vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
61
+ vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
62
+ float d = q.x - min(q.w, q.y);
63
+ return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + 1.0e-10)), d / (q.x + 1.0e-10), q.x);
64
+ }
65
+
66
+ vec3 auroraHsv2Rgb(vec3 c) {
67
+ vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
68
+ vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
69
+ return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
70
+ }
71
+
72
+ void mainImage(out vec4 fragColor, in vec2 fragCoord) {
73
+ // Fact sheet section 2: u in [0,1]^2, centered point p = u - 0.5, no
74
+ // aspect correction -- the element is forced square by CSS, so this is
75
+ // only correct on a square canvas (true for every audio-visualizer size).
76
+ vec2 uv = fragCoord / iResolution.xy;
77
+ vec2 p = uv - 0.5;
78
+
79
+ // Solid-body rotation of the sampling frame (module doc, departure 1).
80
+ // gl_FragCoord's y-up frame is mirrored against the screen's y-down one,
81
+ // so the sign here is what makes positive uRotation read CLOCKWISE on
82
+ // screen -- verified empirically against the audit's estimator (which
83
+ // measures +10 for uRotation = +10 deg/s with the wind frozen).
84
+ float rotA = -uRotation * iTime;
85
+ float rc = cos(rotA);
86
+ float rs = sin(rotA);
87
+ p = mat2(rc, -rs, rs, rc) * p;
88
+
89
+ // Negative tau: time-reversing the octave phases flips the wind's
90
+ // emergent angular drift from counter-clockwise (measured on the original)
91
+ // to the reference's clockwise, without touching any static property --
92
+ // lobes, radii, spectra are distribution-identical (module doc,
93
+ // departure 1).
94
+ float tau = -iTime * uSpeed;
95
+ float freq = max(2.0 + 13.0 * uComplexity, 1.0);
96
+ float amp = uAmplitude;
97
+ float ringRadius = uScale;
98
+
99
+ vec3 hsv = auroraRgb2Hsv(uColor);
100
+ // Chain-seed strand, phase -1/36 NOT scaled by STRAND_SIGMA (fact sheet
101
+ // section 2), so inter-strand spacing is defined for strand 1 too.
102
+ vec2 prevStrand = auroraWarp(p, -1.0 / float(STRAND_COUNT), tau, freq, amp);
103
+
104
+ vec3 accum = vec3(0.0);
105
+ for (int j = 1; j <= STRAND_COUNT; j++) {
106
+ float frac = float(j) / float(STRAND_COUNT);
107
+ float phi = frac * STRAND_SIGMA;
108
+ vec2 strand = auroraWarp(p, phi, tau, freq, amp);
109
+
110
+ // Signed distance to the (warped) ring, per strand: negative inside,
111
+ // positive outside -- the sign feeds the asymmetric edge width below.
112
+ float sd = length(strand) - ringRadius;
113
+ float dist = abs(sd);
114
+ // Inter-strand spacing through the chain: an analytic blur exactly
115
+ // proportional to how far this strand's warp has drifted from its
116
+ // neighbour's. Fanned regions (large spacing) fuse into soft veils;
117
+ // bunched regions (small spacing) stay crisp -- this is what turns 36
118
+ // discrete rings into an aurora (fact sheet section 2). The 2.3 growth
119
+ // rate (fact sheet's own is 2.0) and the 0.66x outer-side factor are
120
+ // the parity edge calibration: the reference holds a 10-90% rise of
121
+ // ~6-10px(2x) with the OUTER edge always the sharper of the two
122
+ // (module doc, departure 4).
123
+ float spacing = length(strand - prevStrand);
124
+ float edgeWidth = 0.01 + max(exp(2.3 * spacing) - 1.0, 0.001);
125
+ edgeWidth *= mix(1.0, 0.66, step(0.0, sd));
126
+ float coverage = 1.0 - smoothstep(0.0, 1.0, dist / edgeWidth);
127
+
128
+ // Fixed hue drift across the strand fan, matching the fact sheet's
129
+ // documented colorShift default (0.05 turns at weight 0.3, i.e. 0.015
130
+ // turns end to end); earliest strand shifts most.
131
+ vec3 strandColor = auroraHsv2Rgb(vec3(fract(hsv.x + (1.0 - frac) * 0.015), hsv.y, hsv.z));
132
+ accum += coverage * strandColor;
133
+ prevStrand = strand;
134
+ }
135
+
136
+ // Mean soft coverage across all 36 strands (fact sheet section 2's image
137
+ // accumulator I). The inverse-distance glow accumulator G is omitted: the
138
+ // fact sheet states its gain ships as 0, so it contributes nothing.
139
+ vec3 image = accum / float(STRAND_COUNT);
140
+
141
+ // Deterministic per-pixel dither, +/- 1/510, identical on all channels
142
+ // (fact sheet section 3). Kept as a plain vec3 offset, not pre-mixed into
143
+ // the image accumulator, so each branch can add it at the point the fact
144
+ // sheet actually specifies (see the dark branch below).
145
+ float n = fract(sin(dot(fragCoord, vec2(12.9898, 78.233))) * 43758.5453);
146
+ vec3 dither = vec3((n - 0.5) / 255.0);
147
+
148
+ float brightness = uIntensity;
149
+ vec3 rgb;
150
+ float alpha;
151
+
152
+ if (uTheme < 0.5) {
153
+ // Dark pipeline, parity-calibrated (module doc, departures 2 + 3).
154
+ // RGB1 = 1.2 * I, THEN add dither (fact sheet order: pre-gain first so
155
+ // the dither's written amplitude stays +/- 1/510), then floor at 0 --
156
+ // a negative dither on a near-black pixel would otherwise be blown up
157
+ // by the chroma-preserving rescale's division right below.
158
+ vec3 x1 = max(1.2 * image + dither, 0.0);
159
+
160
+ // Chroma-preserving tonemap: knee the MAX channel (11x/(1+11x) -- a
161
+ // steeper knee than the fact sheet's per-channel 4x/(1+4x)) and rescale
162
+ // the vector, so ribbon cores land on a stable brightness level largely
163
+ // independent of how thin the veils have fanned (the audit measured the
164
+ // per-channel map crushing spread-out states to ~half the reference's
165
+ // rendered brightness) while hue and saturation pass through untouched
166
+ // for the HSV shape-up to own.
167
+ float mxc = max(x1.r, max(x1.g, x1.b));
168
+ float tmMax = 11.0 * mxc / (1.0 + 11.0 * mxc);
169
+ vec3 tm = x1 * (tmMax / max(mxc, 1.0e-5));
170
+
171
+ // Rendered-colour calibration: hue +0.013 turns (audit target
172
+ // ~197.5deg for the default accent), saturation proportional to the
173
+ // caller's own (a desaturated accent stays desaturated) but rising
174
+ // with the pixel's value and capped at 0.98 -- Rob's reference:
175
+ // saturation RISES with brightness, and nothing is ever white.
176
+ vec3 hv = auroraRgb2Hsv(tm);
177
+ hv.x = fract(hv.x + 0.013);
178
+ hv.y = min(hv.y * (1.02 + 0.35 * hv.z), 0.98);
179
+ tm = auroraHsv2Rgb(hv);
180
+
181
+ // Brightness compression (departure 3): uIntensity DRIVES 0.5..2.5 at
182
+ // the thinking/connecting pulse but must RENDER inside roughly
183
+ // 0.5..0.65 mean brightness, never dropping the ring below visibility.
184
+ // Two compressive powers (colour flatter than alpha) plus a smoothstep
185
+ // alpha knee that lifts ribbon cores to full opacity while cutting the
186
+ // dim tails -- which is also what keeps the centre transparent and the
187
+ // edges crisp. max(brightness, 0.05) only guards pow() against a
188
+ // (contractually impossible) zero or negative uniform.
189
+ float bVal = pow(max(brightness, 0.05) / 1.5, 0.07);
190
+ float bAlpha = 0.97 * pow(max(brightness, 0.05) / 1.5, 0.09);
191
+ float luma = dot(tm, vec3(0.299, 0.587, 0.114));
192
+ // Clamped to [0,1] before the premultiply below, mirroring the light
193
+ // branch, so rgb * alpha <= alpha stays enforced for every input.
194
+ rgb = clamp(tm * bVal, 0.0, 1.0);
195
+ alpha = clamp(smoothstep(0.0, 0.50, luma) * bAlpha, 0.0, 1.0);
196
+ } else {
197
+ // Light pipeline (fact sheet section 4): RGB1 = I, then add dither;
198
+ // brightness curve on vector length, hue direction kept, saturation
199
+ // extrapolated 3x about gray.
200
+ vec3 x1 = image + dither;
201
+ float mag = length(x1);
202
+ vec3 dir = x1 / max(mag, 1.0e-5);
203
+ float mag2 = 2.0 * mag / (1.0 + 2.0 * mag);
204
+ vec3 x2 = dir * mag2;
205
+ float gray = dot(x2, vec3(0.2, 0.5, 0.1));
206
+ rgb = clamp(vec3(gray) + 3.0 * (x2 - vec3(gray)), 0.0, 1.0);
207
+ alpha = clamp(mag2 * clamp(brightness, 1.0, 2.0), 0.0, 1.0);
208
+ }
209
+
210
+ // PREMULTIPLIED output. Both branches above clamp their natural rgb to
211
+ // [0,1] before this line, which is what makes rgb * alpha <= alpha
212
+ // (componentwise) a property the code enforces unconditionally, not one
213
+ // that happens to hold for the inputs this was tested against. See the
214
+ // module doc above for why this departs from the fact sheet's own
215
+ // (deliberately non-premultiplied) pipeline.
216
+ fragColor = vec4(rgb * alpha, alpha);
217
+ }
218
+ `;var z=k("<div style=aspect-ratio:1>");function d(e){switch(e){case"listening":return{intensity:[1.5,2],speed:1,complexity:.7,amplitude:1,scale:.3,rotation:5.3};case"thinking":return{intensity:[.5,2.5],speed:1.5,complexity:1,amplitude:.5,scale:.3,rotation:9.4};case"connecting":return{intensity:[.5,2.5],speed:1.5,complexity:1,amplitude:.5,scale:.3,rotation:5.5};case"speaking":return{intensity:1.5,speed:3.5,complexity:1.25,amplitude:.75,scale:.3,rotation:-3.5};case"disconnected":return{intensity:1,speed:.5,complexity:.4,amplitude:1.2,scale:.2,rotation:0};default:return{intensity:1,speed:.5,complexity:.4,amplitude:1.2,scale:.2,rotation:0}}}function P(){var e;const[c,s]=S(!1);if(typeof matchMedia=="function"){const i=matchMedia("(prefers-color-scheme: dark)");s(i.matches);const o=r=>s(r.matches);(e=i.addEventListener)==null||e.call(i,"change",o),_(()=>{var r;return(r=i.removeEventListener)==null?void 0:r.call(i,"change",o)})}return c}function I(e){const c=n(1),s=n(.5),i=n(.4),o=n(1.2),r=n(.2),f=P(),m=()=>e.dark??f();u(()=>{const t=d(e.state),a=e.frozen?{duration:0}:{duration:.5,ease:"easeOut"},l=e.frozen?{duration:0}:{duration:.35,ease:"easeOut"},h=Array.isArray(t.intensity)&&e.frozen?t.intensity[0]:t.intensity;c.to(h,Array.isArray(t.intensity)?l:a),i.to(t.complexity,a),o.to(t.amplitude,a),r.to(t.scale,e.state==="listening"&&!e.frozen?{type:"spring",duration:1,bounce:.35}:a),s.to(e.frozen?0:t.speed,{duration:0})}),u(()=>{if(e.state!=="speaking")return;const t=e.volume;t>0&&(r.animating()||r.to(.2+.2*t))});const v=()=>e.frozen?0:d(e.state).rotation*Math.PI/180,g=()=>m()?0:1;return(()=>{var t=z();return x(t,y(T,{fragment:C,get precision(){return e.size==="icon"||e.size==="sm"?"mediump":"highp"},get uniforms(){return{uColor:{type:"3fv",value:q(e.color??M)},uIntensity:{type:"1f",value:c.value()},uSpeed:{type:"1f",value:s.value()},uComplexity:{type:"1f",value:i.value()},uAmplitude:{type:"1f",value:o.value()},uScale:{type:"1f",value:r.value()},uTheme:{type:"1f",value:g()},uRotation:{type:"1f",value:v()}}},get animateWhenNotVisible(){return e.animateWhenNotVisible},onError:a=>{/not available/i.test(a)?console.warn('<kai-audio-visualizer variant="aurora">: shader unavailable',a):console.error('<kai-audio-visualizer variant="aurora">: shader error',a),e.onUnavailable()}})),b(a=>{var l=e.state,h=e.class,p=`${W[e.size]}px`;return l!==a.e&&w(t,"data-kai-state",a.e=l),h!==a.t&&R(t,a.t=h),p!==a.a&&A(t,"height",a.a=p),a},{e:void 0,t:void 0,a:void 0}),t})()}export{d as auroraTargets,I as default};
@@ -0,0 +1 @@
1
+ import{h as b,j as k,c,S as g,i as w,a as d,d as m,b as y,r as p,t as S}from"./define-D1din7Ld.js";import{c as x,D as M,S as A,h as N}from"./create-tween-oVvAIG8r.js";import{s as j,C}from"./audio-visualizer-BqNy7dfm.js";var h=S("<div>");const E={"1f":!0,"1i":!0,"1fv":!0,"2f":!0,"3f":!0,"3fv":!0,"4f":!0,"4fv":!0,Matrix2fv:!0,Matrix3fv:!0,Matrix4fv:!0},V=new Set(["1f","1i"]),F={"2f":2,"3f":3,"4f":4,Matrix2fv:4,Matrix3fv:9,Matrix4fv:16};function O(r,e){if(e==null||typeof e!="object")return`uniform "${r}" is not a valid declaration (expected an object with "type" and "value").`;if(E[e.type]!==!0)return`uniform "${r}" has an unrecognized type "${String(e.type)}".`;if(V.has(e.type))return typeof e.value!="number"||!Number.isFinite(e.value)?`uniform "${r}" is declared "${e.type}" (a number) but its value is not a finite number.`:void 0;if(!Array.isArray(e.value)||e.value.some(s=>typeof s!="number"||!Number.isFinite(s)))return`uniform "${r}" is declared "${e.type}" (an array) but its value is not an array of finite numbers.`;const o=F[e.type];if(o!==void 0&&e.value.length!==o)return`uniform "${r}" is declared "${e.type}", which takes exactly ${o} numbers, but its value has ${e.value.length}.`}function $(r,e){const o=r.bands.length?r.bands:[0],s={uColor:{type:"3fv",value:N(r.color)},uIntensity:{type:"1f",value:r.intensity},uSpeed:{type:"1f",value:r.speed},uComplexity:{type:"1f",value:r.complexity},uVolume:{type:"1f",value:r.volume},uBands:{type:"1fv",value:o,arraySize:o.length}};if(!e)return s;for(const[l,v]of Object.entries(e)){const a=O(l,v);if(a)throw new Error(a)}return{...s,...e}}function U(r){const e=x(.3),o=x(1);b(()=>{const a=j(r.state);if(r.state==="speaking")e.to(.3+.7*r.volume,{duration:0});else{const t=r.frozen?{duration:0}:{duration:.5,ease:"easeOut"};e.to(Array.isArray(a.intensity)&&r.frozen?a.intensity[0]:a.intensity,t)}o.to(r.frozen?0:a.speed,{duration:0})});const s=k(()=>{var a;try{return{uniforms:$({color:r.color??M,intensity:e.value(),speed:o.value(),complexity:r.complexity??.5,volume:r.volume,bands:r.bands},(a=r.shader)==null?void 0:a.uniforms)}}catch(t){return{error:t instanceof Error?t.message:String(t)}}});let l=!1;b(()=>{const{error:a}=s();if(!a){l=!1;return}l||(l=!0,console.error(`<kai-audio-visualizer variant="custom">: ${a}`),r.onUnavailable())});const v=()=>({height:`${C[r.size]}px`,"aspect-ratio":"1"});return c(g,{get when(){var a;return(a=r.shader)==null?void 0:a.fragment},get fallback(){return(()=>{var a=h();return d(t=>{var n=r.state,i=r.class,u=v();return n!==t.e&&m(a,"data-kai-state",t.e=n),i!==t.t&&y(a,t.t=i),t.a=p(a,u,t.a),t},{e:void 0,t:void 0,a:void 0}),a})()},children:a=>c(g,{get when(){return s().uniforms},get fallback(){return(()=>{var t=h();return d(n=>{var i=r.state,u=r.class,f=v();return i!==n.e&&m(t,"data-kai-state",n.e=i),u!==n.t&&y(t,n.t=u),n.a=p(t,f,n.a),n},{e:void 0,t:void 0,a:void 0}),t})()},children:t=>(()=>{var n=h();return w(n,c(A,{get fragment(){return a()},get precision(){return r.size==="icon"||r.size==="sm"?"mediump":"highp"},get uniforms(){return t()},get animateWhenNotVisible(){return r.animateWhenNotVisible},onError:i=>{/not available/i.test(i)?console.warn('<kai-audio-visualizer variant="custom">: shader unavailable',i):console.error('<kai-audio-visualizer variant="custom">: shader error',i),r.onUnavailable()}})),d(i=>{var u=r.state,f=r.class,z=v();return u!==i.e&&m(n,"data-kai-state",i.e=u),f!==i.t&&y(n,i.t=f),i.a=p(n,z,i.a),i},{e:void 0,t:void 0,a:void 0}),n})()})})}export{$ as customUniforms,U as default};
@@ -0,0 +1,116 @@
1
+ import{h as v,i as p,c as m,a as h,d as x,b as g,q as y,t as b}from"./define-D1din7Ld.js";import{c as r,h as w,D as C,S as z}from"./create-tween-oVvAIG8r.js";import{C as S,w as q}from"./audio-visualizer-BqNy7dfm.js";const U=`
2
+ const float TAU = 6.28318530718;
3
+
4
+ // Noise for dithering
5
+ vec2 randFibo(vec2 p) {
6
+ p = fract(p * vec2(443.897, 441.423));
7
+ p += dot(p, p.yx + 19.19);
8
+ return fract((p.xx + p.yx) * p.xy);
9
+ }
10
+
11
+ // Luma for alpha
12
+ float luma(vec3 color) {
13
+ return dot(color, vec3(0.299, 0.587, 0.114));
14
+ }
15
+
16
+ // RGB to HSV
17
+ vec3 rgb2hsv(vec3 c) {
18
+ vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
19
+ vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
20
+ vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
21
+ float d = q.x - min(q.w, q.y);
22
+ float e = 1.0e-10;
23
+ return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
24
+ }
25
+
26
+ // HSV to RGB
27
+ vec3 hsv2rgb(vec3 c) {
28
+ vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
29
+ vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
30
+ return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
31
+ }
32
+
33
+ // Bell curve function for attenuation from center with rounded top
34
+ float bellCurve(float distanceFromCenter, float maxDistance) {
35
+ float normalizedDistance = distanceFromCenter / maxDistance;
36
+ // Use cosine with high power for smooth rounded top
37
+ return pow(cos(normalizedDistance * (3.14159265359 / 4.0)), 16.0);
38
+ }
39
+
40
+ // Calculate the sine wave
41
+ float oscilloscopeWave(float x, float centerX, float time) {
42
+ float relativeX = x - centerX;
43
+ float maxDistance = centerX;
44
+ float distanceFromCenter = abs(relativeX);
45
+
46
+ // Apply bell curve for amplitude attenuation
47
+ float bell = bellCurve(distanceFromCenter, maxDistance);
48
+
49
+ // Calculate wave with uniforms and bell curve attenuation
50
+ float wave = sin(relativeX * uFrequency + time * uSpeed) * uAmplitude * bell;
51
+
52
+ return wave;
53
+ }
54
+
55
+ void mainImage(out vec4 fragColor, in vec2 fragCoord) {
56
+ vec2 uv = fragCoord / iResolution.xy;
57
+ vec2 pos = uv - 0.5;
58
+
59
+ // Calculate center and positions
60
+ float centerX = 0.5;
61
+ float centerY = 0.5;
62
+ float x = uv.x;
63
+ float y = uv.y;
64
+
65
+ // Convert line width from pixels to UV space
66
+ // Use the average of width and height to handle aspect ratio
67
+ float pixelSize = 2.0 / (iResolution.x + iResolution.y);
68
+ float lineWidthUV = uLineWidth * pixelSize;
69
+ float smoothingUV = uSmoothing * pixelSize;
70
+
71
+ // Find minimum distance to the wave by sampling nearby points
72
+ // This gives us consistent line width without high-frequency artifacts
73
+ const int NUM_SAMPLES = 50; // Must be const for GLSL loop
74
+ float minDist = 1000.0;
75
+ float sampleRange = 0.02; // Range to search for closest point
76
+
77
+ for(int i = 0; i < NUM_SAMPLES; i++) {
78
+ float offset = (float(i) / float(NUM_SAMPLES - 1) - 0.5) * sampleRange;
79
+ float sampleX = x + offset;
80
+ float waveY = centerY + oscilloscopeWave(sampleX, centerX, iTime);
81
+
82
+ // Calculate distance from current pixel to this point on the wave
83
+ vec2 wavePoint = vec2(sampleX, waveY);
84
+ vec2 currentPoint = vec2(x, y);
85
+ float dist = distance(currentPoint, wavePoint);
86
+
87
+ minDist = min(minDist, dist);
88
+ }
89
+
90
+ // Solid line with smooth edges using minimum distance
91
+ float line = smoothstep(lineWidthUV + smoothingUV, lineWidthUV - smoothingUV, minDist);
92
+
93
+ vec3 color = uColor;
94
+ if(abs(uColorShift) > 0.01) {
95
+ // Keep the center 50% at base color, then ramp shift across outer 25% on each side.
96
+ float centerBandHalfWidth = 0.2;
97
+ float edgeBandWidth = 0.5;
98
+ float distanceFromCenter = abs(x - centerX);
99
+ float edgeFactor = clamp((distanceFromCenter - centerBandHalfWidth) / edgeBandWidth, 0.0, 1.0);
100
+ vec3 hsv = rgb2hsv(color);
101
+ // Hue shift is zero in the center band and strongest at far edges.
102
+ hsv.x = fract(hsv.x + edgeFactor * uColorShift * 0.3);
103
+ color = hsv2rgb(hsv);
104
+ }
105
+
106
+ // Apply line intensity
107
+ color *= line;
108
+
109
+ // Add dithering for smoother gradients
110
+ // color += (randFibo(fragCoord).x - 0.5) / 255.0;
111
+
112
+ // Calculate alpha based on line intensity
113
+ float alpha = line * uMix;
114
+
115
+ fragColor = vec4(color * uMix, alpha);
116
+ }`;var F=b('<div style="aspect-ratio:1;mask-image:linear-gradient(90deg, transparent 0%, black 20%, black 80%, transparent 100%)">');const W=.5,A=.05;function D(e){const o=r(0),i=r(0),l=r(1),n=()=>q(e.state),s=()=>e.frozen?{duration:0}:{duration:.2,ease:"easeOut"};v(()=>{const a=n(),t=Array.isArray(a.opacity)&&e.frozen?a.opacity[0]:a.opacity;l.to(t,e.frozen?{duration:0}:{duration:a.pulseDuration||.2})}),v(()=>{if(e.state==="speaking"){const t=e.volume;o.to(.015+.4*t,{duration:0}),i.to(20+60*t,{duration:0});return}const a=n();o.to(a.amplitude,s()),i.to(a.frequency,s())});const d=()=>e.size==="icon"||e.size==="sm"?2:1;return(()=>{var a=F();return p(a,m(z,{fragment:U,get precision(){return e.size==="icon"||e.size==="sm"?"mediump":"highp"},get uniforms(){return{uSpeed:{type:"1f",value:e.frozen?0:n().speed},uAmplitude:{type:"1f",value:o.value()},uFrequency:{type:"1f",value:i.value()},uMix:{type:"1f",value:l.value()},uLineWidth:{type:"1f",value:d()},uSmoothing:{type:"1f",value:W},uColor:{type:"3fv",value:w(e.color??C)},uColorShift:{type:"1f",value:A}}},get animateWhenNotVisible(){return e.animateWhenNotVisible},onError:t=>{console.warn('<kai-audio-visualizer variant="wave">: shader error',t),e.onUnavailable()}})),h(t=>{var c=e.state,u=e.class,f=`${S[e.size]}px`;return c!==t.e&&x(a,"data-kai-state",t.e=c),u!==t.t&&g(a,t.t=u),f!==t.a&&y(a,"height",t.a=f),t},{e:void 0,t:void 0,a:void 0}),a})()}export{D as default};
@@ -1 +1 @@
1
- import{I as e}from"./Icon-C2LTALdM.js";import{c as m,m as o}from"./define-CNSKFZCd.js";var r=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],t=a=>m(e,o(a,{name:"Video",iconNode:r})),i=t;export{i as v};
1
+ import{I as e}from"./Icon-Tj58ES_d.js";import{c as m,m as o}from"./define-D1din7Ld.js";var r=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],t=a=>m(e,o(a,{name:"Video",iconNode:r})),i=t;export{i as v};
@@ -0,0 +1 @@
1
+ import{I as m}from"./Icon-Tj58ES_d.js";import{c as o,m as r}from"./define-D1din7Ld.js";var e=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],t=a=>o(m,r(a,{name:"X",iconNode:e})),p=t;export{p as x};
@@ -1 +1 @@
1
- import{x as K,r as N,g as $,h as Q,p as T,u as R,i as s,c,P as U,d as z,S as x,a as O,z as n,b as P,t as u,e as V,f as W,q as A}from"./chunks/define-CNSKFZCd.js";import{c as D}from"./chunks/cn-CU7UAWzk.js";import{c as X,u as Y}from"./chunks/overlay-B1-MBI6h.js";import{x as Z}from"./chunks/x-Ckwicf6g.js";import{w as ee}from"./chunks/disclosure-BcBs--Jf.js";var re=u("<span style=display:inline-flex;vertical-align:middle>"),te=u('<div part=arrow aria-hidden=true class="absolute size-2 rotate-45">'),oe=u("<span part=badge>"),ae=u('<div class="flex items-center gap-2"><span part=title class="font-semibold leading-tight">'),ne=u("<div>"),ie=u("<div part=bubble role=dialog style=position:fixed><button type=button part=dismiss aria-label=Dismiss>");const le={top:"bottom",bottom:"top",left:"right",right:"left"},se={primary:{bg:"var(--color-primary)",fg:"var(--color-primary-foreground)"},info:{bg:"var(--color-tool-blue)",fg:"#fff"},success:{bg:"var(--color-tool-green)",fg:"#fff"},warning:{bg:"var(--color-warning-soft)",fg:"var(--color-foreground)"},error:{bg:"var(--color-tool-red)",fg:"#fff"}},de="text-current/70 hover:bg-current/15 hover:text-current",ce="bg-current/20",ue="text-current/85";function ge(t){var g;const w=K(),p=()=>se[t.tone??"primary"],v=N(),[i,B]=$(t.defaultOpen??!1),[L,F]=$(),[G,H]=$(),[I,J]=$(),_=()=>t.open!==void 0,C=()=>_()?!!t.open:i(),E=r=>{var a;_()||B(r),(a=t.onOpenChange)==null||a.call(t,r)};(g=t.controllerRef)==null||g.call(t,{open:C,setOpen:E});const k=X(C),d=Y(L,G,{placement:t.placement??"bottom",gutter:10,arrowEl:I,onDisconnect:()=>E(!1)}),y=()=>le[d.pos().placement.split("-")[0]]??"top",j=()=>{var r;E(!1),(r=t.onDismiss)==null||r.call(t)};return Q(()=>{const r=L();if(!r)return;const a=()=>{C()&&j()};r.addEventListener("click",a),T(()=>r.removeEventListener("click",a))}),[(()=>{var r=re();return R(F,r),s(r,()=>t.children),r})(),c(x,{get when(){return k.present()},get children(){return c(U,{get mount(){return w.portalMount()},get children(){var r=ie(),a=r.firstChild;return R(e=>{H(e),k.setRef(e)},r),z(r,"aria-labelledby",v),s(r,c(x,{get when(){return t.arrow!==!1},get children(){var e=te();return R(J,e),O(o=>{var l=y()==="left"?"-4px":d.arrowPos().x!=null?`${d.arrowPos().x}px`:"",f=y()==="top"?"-4px":d.arrowPos().y!=null?`${d.arrowPos().y}px`:"",m=y()==="right"?"-4px":"",h=y()==="bottom"?"-4px":"",b=`var(--kai-coachmark-bg, ${p().bg})`;return l!==o.e&&n(e,"left",o.e=l),f!==o.t&&n(e,"top",o.t=f),m!==o.a&&n(e,"right",o.a=m),h!==o.o&&n(e,"bottom",o.o=h),b!==o.i&&n(e,"background",o.i=b),o},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),e}}),a),a.$$click=j,s(a,c(Z,{class:"size-3.5","aria-hidden":"true"})),s(r,c(x,{get when(){return t.headline},get children(){var e=ae(),o=e.firstChild;return z(o,"id",v),s(o,()=>t.headline),s(e,c(x,{get when(){return t.badge},get children(){var l=oe();return s(l,()=>t.badge),O(()=>P(l,D("inline-flex items-center rounded-full px-1.5 py-0.5 text-[0.625rem] font-medium uppercase leading-none tracking-wide",ce))),l}}),null),e}}),null),s(r,c(x,{get when(){return t.content},get children(){var e=ne();return s(e,()=>t.content),O(()=>P(e,D(ue,t.headline?"mt-1.5":""))),e}}),null),O(e=>{var o=k.state()==="open"?"":void 0,l=k.state()==="closed"?"":void 0,f=`${d.pos().x}px`,m=`${d.pos().y}px`,h=d.hidden()?"hidden":"visible",b=`var(--kai-coachmark-bg, ${p().bg})`,q=`var(--kai-coachmark-fg, ${p().fg})`,M=D("z-50 w-64 rounded-lg p-3 pr-8 text-sm kai-elevation","animate-in fade-in-0 zoom-in-95 data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:zoom-out-95"),S=D("absolute right-2 top-2 inline-flex size-5 items-center justify-center rounded transition-colors",de);return o!==e.e&&z(r,"data-expanded",e.e=o),l!==e.t&&z(r,"data-closed",e.t=l),f!==e.a&&n(r,"left",e.a=f),m!==e.o&&n(r,"top",e.o=m),h!==e.i&&n(r,"visibility",e.i=h),b!==e.n&&n(r,"background",e.n=b),q!==e.s&&n(r,"color",e.s=q),M!==e.h&&P(r,e.h=M),S!==e.r&&P(a,e.r=S),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0}),r}})}})]}V(["click"]);var pe=u("<slot>"),ve=u("<slot name=content>");W("kai-coachmark",{open:void 0,defaultOpen:void 0,headline:void 0,badge:void 0,placement:void 0,tone:void 0,arrow:!0},(t,g)=>{const{flag:w,dispatch:p}=g;let v;return ee(g,()=>v,()=>t.open),c(ge,{get defaultOpen(){return w("defaultOpen")},get arrow(){return w("arrow")},get placement(){return t.placement},get tone(){return t.tone},get headline(){return t.headline},get badge(){return t.badge},get content(){return(()=>{var i=ve();return i._$owner=A(),i})()},controllerRef:i=>v=i,onDismiss:()=>p("kai-dismiss",{}),get children(){var i=pe();return i._$owner=A(),i}})});
1
+ import{y as K,x as N,g as $,h as Q,p as T,u as R,i as s,c,P as U,d as z,S as x,a as O,q as n,b as P,t as u,e as V,f as W,w as A}from"./chunks/define-D1din7Ld.js";import{c as D}from"./chunks/cn-CU7UAWzk.js";import{c as X,u as Y}from"./chunks/overlay-kD8dwRv_.js";import{x as Z}from"./chunks/x-GRUeeQFT.js";import{w as ee}from"./chunks/disclosure-CIZ5c8nO.js";var re=u("<span style=display:inline-flex;vertical-align:middle>"),te=u('<div part=arrow aria-hidden=true class="absolute size-2 rotate-45">'),oe=u("<span part=badge>"),ae=u('<div class="flex items-center gap-2"><span part=title class="font-semibold leading-tight">'),ne=u("<div>"),ie=u("<div part=bubble role=dialog style=position:fixed><button type=button part=dismiss aria-label=Dismiss>");const le={top:"bottom",bottom:"top",left:"right",right:"left"},se={primary:{bg:"var(--color-primary)",fg:"var(--color-primary-foreground)"},info:{bg:"var(--color-tool-blue)",fg:"#fff"},success:{bg:"var(--color-tool-green)",fg:"#fff"},warning:{bg:"var(--color-warning-soft)",fg:"var(--color-foreground)"},error:{bg:"var(--color-tool-red)",fg:"#fff"}},de="text-current/70 hover:bg-current/15 hover:text-current",ce="bg-current/20",ue="text-current/85";function ge(t){var g;const w=K(),p=()=>se[t.tone??"primary"],v=N(),[i,B]=$(t.defaultOpen??!1),[L,F]=$(),[G,H]=$(),[I,J]=$(),_=()=>t.open!==void 0,C=()=>_()?!!t.open:i(),E=r=>{var a;_()||B(r),(a=t.onOpenChange)==null||a.call(t,r)};(g=t.controllerRef)==null||g.call(t,{open:C,setOpen:E});const k=X(C),d=Y(L,G,{placement:t.placement??"bottom",gutter:10,arrowEl:I,onDisconnect:()=>E(!1)}),y=()=>le[d.pos().placement.split("-")[0]]??"top",j=()=>{var r;E(!1),(r=t.onDismiss)==null||r.call(t)};return Q(()=>{const r=L();if(!r)return;const a=()=>{C()&&j()};r.addEventListener("click",a),T(()=>r.removeEventListener("click",a))}),[(()=>{var r=re();return R(F,r),s(r,()=>t.children),r})(),c(x,{get when(){return k.present()},get children(){return c(U,{get mount(){return w.portalMount()},get children(){var r=ie(),a=r.firstChild;return R(e=>{H(e),k.setRef(e)},r),z(r,"aria-labelledby",v),s(r,c(x,{get when(){return t.arrow!==!1},get children(){var e=te();return R(J,e),O(o=>{var l=y()==="left"?"-4px":d.arrowPos().x!=null?`${d.arrowPos().x}px`:"",f=y()==="top"?"-4px":d.arrowPos().y!=null?`${d.arrowPos().y}px`:"",m=y()==="right"?"-4px":"",h=y()==="bottom"?"-4px":"",b=`var(--kai-coachmark-bg, ${p().bg})`;return l!==o.e&&n(e,"left",o.e=l),f!==o.t&&n(e,"top",o.t=f),m!==o.a&&n(e,"right",o.a=m),h!==o.o&&n(e,"bottom",o.o=h),b!==o.i&&n(e,"background",o.i=b),o},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),e}}),a),a.$$click=j,s(a,c(Z,{class:"size-3.5","aria-hidden":"true"})),s(r,c(x,{get when(){return t.headline},get children(){var e=ae(),o=e.firstChild;return z(o,"id",v),s(o,()=>t.headline),s(e,c(x,{get when(){return t.badge},get children(){var l=oe();return s(l,()=>t.badge),O(()=>P(l,D("inline-flex items-center rounded-full px-1.5 py-0.5 text-[0.625rem] font-medium uppercase leading-none tracking-wide",ce))),l}}),null),e}}),null),s(r,c(x,{get when(){return t.content},get children(){var e=ne();return s(e,()=>t.content),O(()=>P(e,D(ue,t.headline?"mt-1.5":""))),e}}),null),O(e=>{var o=k.state()==="open"?"":void 0,l=k.state()==="closed"?"":void 0,f=`${d.pos().x}px`,m=`${d.pos().y}px`,h=d.hidden()?"hidden":"visible",b=`var(--kai-coachmark-bg, ${p().bg})`,q=`var(--kai-coachmark-fg, ${p().fg})`,M=D("z-50 w-64 rounded-lg p-3 pr-8 text-sm kai-elevation","animate-in fade-in-0 zoom-in-95 data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:zoom-out-95"),S=D("absolute right-2 top-2 inline-flex size-5 items-center justify-center rounded transition-colors",de);return o!==e.e&&z(r,"data-expanded",e.e=o),l!==e.t&&z(r,"data-closed",e.t=l),f!==e.a&&n(r,"left",e.a=f),m!==e.o&&n(r,"top",e.o=m),h!==e.i&&n(r,"visibility",e.i=h),b!==e.n&&n(r,"background",e.n=b),q!==e.s&&n(r,"color",e.s=q),M!==e.h&&P(r,e.h=M),S!==e.r&&P(a,e.r=S),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0}),r}})}})]}V(["click"]);var pe=u("<slot>"),ve=u("<slot name=content>");W("kai-coachmark",{open:void 0,defaultOpen:void 0,headline:void 0,badge:void 0,placement:void 0,tone:void 0,arrow:!0},(t,g)=>{const{flag:w,dispatch:p}=g;let v;return ee(g,()=>v,()=>t.open),c(ge,{get defaultOpen(){return w("defaultOpen")},get arrow(){return w("arrow")},get placement(){return t.placement},get tone(){return t.tone},get headline(){return t.headline},get badge(){return t.badge},get content(){return(()=>{var i=ve();return i._$owner=A(),i})()},controllerRef:i=>v=i,onDismiss:()=>p("kai-dismiss",{}),get children(){var i=pe();return i._$owner=A(),i}})});
@@ -1 +1 @@
1
- import{f as g,x as a,c as r,C as i}from"./chunks/define-CNSKFZCd.js";import{C as n,a as d}from"./chunks/code-block-DZ6mz6vs.js";g("kai-code-block",{code:"",language:void 0,codeTheme:"github-dark-dimmed",codeHighlight:!0,proseSize:"sm"},(e,{flag:t})=>{const o=a();return r(i,{get proseSize(){return e.proseSize},get codeTheme(){return e.codeTheme},get codeHighlight(){return t("codeHighlight")},get portalMount(){return o.portalMount()},get children(){return r(n,{get children(){return r(d,{get code(){return e.code},get language(){return e.language}})}})}})});
1
+ import{f as g,y as a,c as r,C as i}from"./chunks/define-D1din7Ld.js";import{C as n,a as d}from"./chunks/code-block-BFUHn6Va.js";g("kai-code-block",{code:"",language:void 0,codeTheme:"github-dark-dimmed",codeHighlight:!0,proseSize:"sm"},(e,{flag:t})=>{const o=a();return r(i,{get proseSize(){return e.proseSize},get codeTheme(){return e.codeTheme},get codeHighlight(){return t("codeHighlight")},get portalMount(){return o.portalMount()},get children(){return r(n,{get children(){return r(d,{get code(){return e.code},get language(){return e.language}})}})}})});