@kitn.ai/ui 0.17.0 → 0.18.1
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.
- package/README.md +28 -5
- package/dist/components/artifact.d.ts +39 -1
- package/dist/components/attachment-types.d.ts +12 -0
- package/dist/components/attachments.d.ts +2 -10
- package/dist/components/card.d.ts +27 -0
- package/dist/components/chain-of-thought.d.ts +78 -2
- package/dist/components/chat-scope-picker.d.ts +7 -0
- package/dist/components/chat-thread.d.ts +37 -12
- package/dist/components/choice-card.d.ts +26 -0
- package/dist/components/coachmark.d.ts +49 -0
- package/dist/components/composer-dom.d.ts +35 -0
- package/dist/components/composer-highlight.d.ts +48 -0
- package/dist/components/composer-history.d.ts +34 -0
- package/dist/components/composer.d.ts +86 -0
- package/dist/components/confirm-card.d.ts +17 -0
- package/dist/components/conversation-item.d.ts +9 -0
- package/dist/components/conversation-list.d.ts +36 -1
- package/dist/components/file-tree.d.ts +15 -0
- package/dist/components/form.d.ts +34 -0
- package/dist/components/markdown.d.ts +3 -0
- package/dist/components/message.d.ts +12 -0
- package/dist/components/model-switcher.d.ts +7 -0
- package/dist/components/prompt-input.d.ts +13 -4
- package/dist/components/prompt-suggestion.d.ts +9 -1
- package/dist/components/reasoning.d.ts +14 -1
- package/dist/components/response-compare.d.ts +14 -0
- package/dist/components/screen.d.ts +46 -0
- package/dist/components/tasks-card.d.ts +49 -1
- package/dist/components/toast.d.ts +12 -2
- package/dist/components/tool-types.d.ts +10 -0
- package/dist/components/tool.d.ts +8 -8
- package/dist/components/voice-input.d.ts +27 -0
- package/dist/components/voice-output.d.ts +33 -0
- package/dist/core-C8fzo39E.js +12 -0
- package/dist/custom-elements.json +8392 -1860
- package/dist/elements/agent-card.d.ts +1 -0
- package/dist/elements/agent-card.js +1 -0
- package/dist/elements/artifact.js +1 -1
- package/dist/elements/attachments.js +1 -1
- package/dist/elements/autoloader.js +1 -1
- package/dist/elements/avatar.d.ts +1 -0
- package/dist/elements/avatar.js +1 -0
- package/dist/elements/badge.d.ts +1 -0
- package/dist/elements/badge.js +1 -0
- package/dist/elements/button.d.ts +1 -0
- package/dist/elements/button.js +1 -0
- package/dist/elements/card.js +1 -1
- package/dist/elements/cards.js +1 -1
- package/dist/elements/chain-of-thought.js +1 -1
- package/dist/elements/chat-scope-picker.js +1 -1
- package/dist/elements/chat-types.d.ts +47 -0
- package/dist/elements/chat-workspace.js +1 -1
- package/dist/elements/chat.js +1 -1
- package/dist/elements/checkpoint.js +1 -1
- package/dist/elements/choice.js +1 -1
- package/dist/elements/chunks/Icon-C2LTALdM.js +1 -0
- package/dist/elements/chunks/action-icons-Dtl8Ox5D.js +1 -0
- package/dist/elements/chunks/arrow-left-GbBceGBE.js +1 -0
- package/dist/elements/chunks/attachments-DLJcWCDV.js +1 -0
- package/dist/elements/chunks/badge-BTNZTODL.js +1 -0
- package/dist/elements/chunks/button-DBDZebGr.js +1 -0
- package/dist/elements/chunks/card-YfCyI4fH.js +1 -0
- package/dist/elements/chunks/chat-thread-Dz2qbzvI.js +1 -0
- package/dist/elements/chunks/check-fhmRksq_.js +1 -0
- package/dist/elements/chunks/chevron-down-DcRg1aRU.js +1 -0
- package/dist/elements/chunks/chevron-right-ChzBcNJ-.js +1 -0
- package/dist/elements/chunks/circle-B4fTe9v6.js +1 -0
- package/dist/elements/chunks/circle-check-CJV-3Rem.js +1 -0
- package/dist/elements/chunks/circle-x-pDtzlghQ.js +1 -0
- package/dist/elements/chunks/cn-CU7UAWzk.js +1 -0
- package/dist/elements/chunks/code-block-DZ6mz6vs.js +1 -0
- package/dist/elements/chunks/collapsible-CWUAShMC.js +1 -0
- package/dist/elements/chunks/composer-BZyPU6gD.js +65 -0
- package/dist/elements/chunks/context-Cx6eQA_G.js +1 -0
- package/dist/elements/chunks/conversation-list-C4xTQSpT.js +1 -0
- package/dist/elements/chunks/default-input-BZcwyKcP.js +1 -0
- package/dist/elements/chunks/define-CNSKFZCd.js +1 -0
- package/dist/elements/chunks/disclosure-BcBs--Jf.js +1 -0
- package/dist/elements/chunks/download-BDQwcFav.js +1 -0
- package/dist/elements/chunks/dropdown-wgs8xCJZ.js +1 -0
- package/dist/elements/chunks/ellipsis-CUiEJ6R1.js +1 -0
- package/dist/elements/chunks/external-link-DJUmC7g2.js +1 -0
- package/dist/elements/chunks/file-text-DOYfYvrh.js +1 -0
- package/dist/elements/chunks/file-tree-DQzNQrbr.js +1 -0
- package/dist/elements/chunks/folder-DBDUBANz.js +1 -0
- package/dist/elements/chunks/hover-card-BQGdGAQ3.js +1 -0
- package/dist/elements/chunks/icon-CAyRqVrg.js +1 -0
- package/dist/elements/chunks/{index-CTBEJeo6.js → index-BCRhi84a.js} +1 -1
- package/dist/elements/chunks/info-DBQl-m6e.js +1 -0
- package/dist/elements/chunks/input-DZD67EvW.js +1 -0
- package/dist/elements/chunks/kbd-DbyVrlnU.js +1 -0
- package/dist/elements/chunks/link-vko7AttA.js +1 -0
- package/dist/elements/chunks/loader-Cg6rO8tQ.js +1 -0
- package/dist/elements/chunks/{markdown-CMTGx9r8.js → markdown-n3Xbj3PR.js} +9 -9
- package/dist/elements/chunks/message-CgKytiSB.js +1 -0
- package/dist/elements/chunks/message-feedback-Ds3-US0e.js +1 -0
- package/dist/elements/chunks/message-square-MmRkvc-M.js +1 -0
- package/dist/elements/chunks/minimize-2-3kCdE0q3.js +1 -0
- package/dist/elements/chunks/model-switcher-BMtXGwLU.js +1 -0
- package/dist/elements/chunks/overlay-B1-MBI6h.js +1 -0
- package/dist/elements/chunks/paperclip-DDEfmkHc.js +1 -0
- package/dist/elements/chunks/progress-bar-Dwbiyv3s.js +1 -0
- package/dist/elements/chunks/prompt-suggestion-9lvgFcEa.js +1 -0
- package/dist/elements/chunks/reasoning-DzHWsdAJ.js +1 -0
- package/dist/elements/chunks/resizable-Bq_eHxUm.js +1 -0
- package/dist/elements/chunks/rotate-cw-jpisOdOV.js +1 -0
- package/dist/elements/chunks/scroll-area-g5Ze3K6f.js +1 -0
- package/dist/elements/chunks/separator-Bmjc5XyX.js +1 -0
- package/dist/elements/chunks/settings-Cz1bMJP9.js +1 -0
- package/dist/elements/chunks/settings-group-9imY3kRA.js +1 -0
- package/dist/elements/chunks/share-BdenF0wQ.js +1 -0
- package/dist/elements/chunks/skeleton-Pjc5jiaY.js +1 -0
- package/dist/elements/chunks/slots-DkZ-Cmha.js +1 -0
- package/dist/elements/chunks/star-DY6z1UUH.js +1 -0
- package/dist/elements/chunks/store-th4VyJXM.js +1 -0
- package/dist/elements/chunks/text-shimmer-CEi-tlXr.js +1 -0
- package/dist/elements/chunks/textarea-CboigarR.js +1 -0
- package/dist/elements/chunks/thumbs-up-BR33KLfA.js +1 -0
- package/dist/elements/chunks/toast-store-BEMda0fv.js +1 -0
- package/dist/elements/chunks/tool-TMued3WO.js +1 -0
- package/dist/elements/chunks/tooltip-Cft_Rxiw.js +1 -0
- package/dist/elements/chunks/triangle-alert-B07fX3Q8.js +1 -0
- package/dist/elements/chunks/use-card-resolution-M36zVciB.js +1 -0
- package/dist/elements/chunks/video-MKp3LmNT.js +1 -0
- package/dist/elements/chunks/x-Ckwicf6g.js +1 -0
- package/dist/elements/coachmark.d.ts +1 -0
- package/dist/elements/coachmark.js +1 -0
- package/dist/elements/code-block.js +1 -1
- package/dist/elements/command.d.ts +1 -0
- package/dist/elements/command.js +1 -0
- package/dist/elements/compare.js +1 -1
- package/dist/elements/composer.d.ts +1 -0
- package/dist/elements/composer.js +1 -0
- package/dist/elements/confirm-card.js +1 -1
- package/dist/elements/context-meter.js +1 -1
- package/dist/elements/conversation-list.js +1 -1
- package/dist/elements/css.d.ts +1 -0
- package/dist/elements/default-input.d.ts +51 -0
- package/dist/elements/define.d.ts +53 -0
- package/dist/elements/dialog.d.ts +1 -0
- package/dist/elements/dialog.js +1 -0
- package/dist/elements/disclosure.d.ts +37 -0
- package/dist/elements/editable-label.d.ts +1 -0
- package/dist/elements/editable-label.js +1 -0
- package/dist/elements/embed.js +1 -1
- package/dist/elements/empty.js +1 -1
- package/dist/elements/feedback-bar.js +1 -1
- package/dist/elements/file-tree.js +1 -1
- package/dist/elements/file-upload.js +1 -1
- package/dist/elements/form.js +1 -1
- package/dist/elements/hover-card.d.ts +1 -0
- package/dist/elements/hover-card.js +1 -0
- package/dist/elements/icon.d.ts +1 -0
- package/dist/elements/icon.js +1 -0
- package/dist/elements/image.js +1 -1
- package/dist/elements/input.d.ts +1 -0
- package/dist/elements/input.js +1 -0
- package/dist/elements/kbd.d.ts +1 -0
- package/dist/elements/kbd.js +1 -0
- package/dist/elements/link-preview.js +1 -1
- package/dist/elements/loader.js +1 -1
- package/dist/elements/markdown.js +1 -1
- package/dist/elements/menu.d.ts +1 -0
- package/dist/elements/menu.js +1 -0
- package/dist/elements/message-skills.js +1 -1
- package/dist/elements/message.js +1 -1
- package/dist/elements/model-switcher.js +1 -1
- package/dist/elements/nav.d.ts +1 -0
- package/dist/elements/nav.js +1 -0
- package/dist/elements/notice.d.ts +1 -0
- package/dist/elements/notice.js +1 -0
- package/dist/elements/pane-group.d.ts +1 -0
- package/dist/elements/pane-group.js +1 -0
- package/dist/elements/pane.d.ts +1 -0
- package/dist/elements/pane.js +1 -0
- package/dist/elements/popover.js +1 -1
- package/dist/elements/progress-bar.d.ts +1 -0
- package/dist/elements/progress-bar.js +1 -0
- package/dist/elements/prompt-dock.d.ts +1 -0
- package/dist/elements/prompt-dock.js +1 -0
- package/dist/elements/prompt-input.js +1 -1
- package/dist/elements/prompt-suggestions.js +1 -1
- package/dist/elements/reasoning.js +1 -1
- package/dist/elements/register-impl.d.ts +0 -0
- package/dist/elements/register.d.ts +13 -0
- package/dist/elements/remote.d.ts +1 -0
- package/dist/elements/remote.js +1 -0
- package/dist/elements/resizable.js +1 -1
- package/dist/elements/response-stream.js +2 -2
- package/dist/elements/screen.d.ts +1 -0
- package/dist/elements/screen.js +1 -0
- package/dist/elements/scroll-area.d.ts +1 -0
- package/dist/elements/scroll-area.js +1 -0
- package/dist/elements/scroll-button.js +1 -1
- package/dist/elements/search.d.ts +1 -0
- package/dist/elements/search.js +1 -0
- package/dist/elements/segmented.d.ts +1 -0
- package/dist/elements/segmented.js +1 -0
- package/dist/elements/separator.d.ts +1 -0
- package/dist/elements/separator.js +1 -0
- package/dist/elements/setting-item.d.ts +1 -0
- package/dist/elements/setting-item.js +1 -0
- package/dist/elements/settings-group.d.ts +1 -0
- package/dist/elements/settings-group.js +1 -0
- package/dist/elements/skeleton.d.ts +1 -0
- package/dist/elements/skeleton.js +1 -0
- package/dist/elements/slots.d.ts +176 -0
- package/dist/elements/source.js +1 -1
- package/dist/elements/status.d.ts +1 -0
- package/dist/elements/status.js +1 -0
- package/dist/elements/switch.js +1 -1
- package/dist/elements/tabs.d.ts +1 -0
- package/dist/elements/tabs.js +1 -0
- package/dist/elements/tasks.js +1 -1
- package/dist/elements/text-shimmer.js +1 -1
- package/dist/elements/thinking-bar.js +1 -1
- package/dist/elements/toast.js +1 -1
- package/dist/elements/tool.js +1 -1
- package/dist/elements/tooltip.d.ts +1 -0
- package/dist/elements/tooltip.js +1 -0
- package/dist/elements/voice-input.js +1 -1
- package/dist/elements/voice-output.d.ts +1 -0
- package/dist/elements/voice-output.js +1 -0
- package/dist/elements.d.ts +733 -58
- package/dist/engine-javascript-C1x7zo1_.js +141 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +8255 -5703
- package/dist/kai.es.js +1 -0
- package/dist/llms/llms-full.txt +1146 -64
- package/dist/llms/llms.txt +4 -4
- package/dist/mcp.es.js +62 -7
- package/dist/primitives/composer-model.d.ts +22 -0
- package/dist/primitives/composer-triggers.d.ts +19 -0
- package/dist/primitives/create-kai-chat.d.ts +38 -0
- package/dist/primitives/toast-store.d.ts +32 -2
- package/dist/primitives/use-speech-recognition.d.ts +26 -0
- package/dist/react/index.d.ts +1085 -97
- package/dist/react/runtime.d.ts +9 -2
- package/dist/react/use-kai-chat.d.ts +41 -0
- package/dist/react.js +572 -193
- package/dist/register-impl-cKscku5m.js +141 -0
- package/dist/schemas/tasks.schema.json +2 -2
- package/dist/state/index.d.ts +4 -0
- package/dist/state/messages.d.ts +11 -0
- package/dist/state/stream.d.ts +22 -0
- package/dist/state/suggestions.d.ts +4 -0
- package/dist/state.js +117 -0
- package/dist/theme.tokens.css +87 -0
- package/dist/types.d.ts +4 -0
- package/dist/ui/agent-card.d.ts +61 -0
- package/dist/ui/button.d.ts +5 -2
- package/dist/ui/card.d.ts +61 -0
- package/dist/ui/collapsible.d.ts +15 -1
- package/dist/ui/command.d.ts +33 -0
- package/dist/ui/dialog.d.ts +42 -0
- package/dist/ui/dropdown.d.ts +95 -1
- package/dist/ui/editable-label.d.ts +26 -0
- package/dist/ui/hover-card.d.ts +13 -1
- package/dist/ui/icon.d.ts +18 -0
- package/dist/ui/input.d.ts +33 -0
- package/dist/ui/kbd.d.ts +21 -0
- package/dist/ui/nav.d.ts +62 -0
- package/dist/ui/notice.d.ts +31 -0
- package/dist/ui/overlay.d.ts +12 -0
- package/dist/ui/pane-grid.d.ts +58 -0
- package/dist/ui/pane-group.d.ts +77 -0
- package/dist/ui/pane.d.ts +78 -0
- package/dist/ui/popover.d.ts +11 -1
- package/dist/ui/progress-bar.d.ts +23 -0
- package/dist/ui/prompt-dock.d.ts +96 -0
- package/dist/ui/resizable.d.ts +12 -0
- package/dist/ui/scroll-area.d.ts +4 -0
- package/dist/ui/segmented.d.ts +28 -0
- package/dist/ui/settings-group.d.ts +32 -0
- package/dist/ui/skeleton.d.ts +12 -0
- package/dist/ui/stat.d.ts +16 -0
- package/dist/ui/status.d.ts +13 -0
- package/dist/ui/switch.d.ts +8 -1
- package/dist/ui/tabs.d.ts +35 -0
- package/dist/ui/tooltip.d.ts +19 -1
- package/frameworks/react/index.tsx +1042 -157
- package/frameworks/react/runtime.tsx +30 -1
- package/frameworks/react/use-kai-chat.tsx +87 -0
- package/llms-full.txt +1146 -64
- package/llms.txt +4 -4
- package/package.json +31 -10
- package/src/agent-tooling/mcp/manifest.ts +14 -0
- package/src/agent-tooling/mcp/tools/debug.ts +11 -7
- package/src/agent-tooling/mcp/tools/reference.ts +32 -0
- package/src/agent-tooling/mcp/tools/scaffold.ts +30 -1
- package/src/components/artifact.tsx +98 -13
- package/src/components/attachment-types.ts +13 -0
- package/src/components/attachments.tsx +4 -14
- package/src/components/card.tsx +109 -15
- package/src/components/chain-of-thought.tsx +210 -1
- package/src/components/chat-scope-picker.tsx +13 -3
- package/src/components/chat-thread.tsx +225 -116
- package/src/components/choice-card.tsx +103 -11
- package/src/components/coachmark.tsx +249 -0
- package/src/components/component-meta.json +699 -110
- package/src/components/composer-dom.ts +159 -0
- package/src/components/composer-highlight.ts +242 -0
- package/src/components/composer-history.ts +82 -0
- package/src/components/composer.tsx +979 -0
- package/src/components/confirm-card.tsx +54 -1
- package/src/components/conversation-item.tsx +69 -7
- package/src/components/conversation-list.tsx +134 -37
- package/src/components/file-tree.tsx +197 -47
- package/src/components/form-widgets.tsx +9 -7
- package/src/components/form.tsx +140 -17
- package/src/components/image.tsx +3 -5
- package/src/components/link-preview.tsx +5 -4
- package/src/components/markdown.tsx +5 -2
- package/src/components/message.tsx +23 -4
- package/src/components/model-switcher.tsx +19 -4
- package/src/components/prompt-input.tsx +46 -75
- package/src/components/prompt-suggestion.tsx +48 -16
- package/src/components/reasoning.tsx +29 -6
- package/src/components/response-compare.tsx +31 -2
- package/src/components/screen.tsx +176 -0
- package/src/components/tasks-card.tsx +341 -21
- package/src/components/toast.tsx +119 -31
- package/src/components/tool-types.ts +10 -0
- package/src/components/tool.tsx +22 -16
- package/src/components/voice-input.tsx +102 -19
- package/src/components/voice-output.tsx +202 -0
- package/src/elements/agent-card.tsx +67 -0
- package/src/elements/artifact.tsx +53 -4
- package/src/elements/attachments.tsx +1 -0
- package/src/elements/avatar.tsx +33 -0
- package/src/elements/badge.tsx +32 -0
- package/src/elements/button.tsx +126 -0
- package/src/elements/card-media.jpg +0 -0
- package/src/elements/card.tsx +124 -31
- package/src/elements/cards.tsx +81 -7
- package/src/elements/chain-of-thought.tsx +77 -32
- package/src/elements/chat-scope-picker.tsx +35 -8
- package/src/elements/chat-types.ts +2 -2
- package/src/elements/chat-workspace.tsx +153 -41
- package/src/elements/chat.tsx +45 -23
- package/src/elements/choice.tsx +71 -19
- package/src/elements/coachmark.tsx +90 -0
- package/src/elements/command.tsx +209 -0
- package/src/elements/compare.tsx +24 -2
- package/src/elements/compiled.css +2 -2
- package/src/elements/composer.tsx +151 -0
- package/src/elements/confirm-card.tsx +36 -11
- package/src/elements/conversation-list.tsx +80 -11
- package/src/elements/default-input.tsx +75 -53
- package/src/elements/define.tsx +87 -7
- package/src/elements/dialog.tsx +98 -0
- package/src/elements/disclosure.ts +73 -0
- package/src/elements/editable-label.tsx +125 -0
- package/src/elements/element-manifest.json +129 -1
- package/src/elements/element-meta.json +5562 -1336
- package/src/elements/element-types.d.ts +732 -57
- package/src/elements/file-tree.tsx +12 -2
- package/src/elements/file-upload.tsx +1 -1
- package/src/elements/form.tsx +54 -11
- package/src/elements/hover-card.tsx +80 -0
- package/src/elements/icon-names.json +48 -0
- package/src/elements/icon.tsx +41 -0
- package/src/elements/input.tsx +203 -0
- package/src/elements/kbd.tsx +45 -0
- package/src/elements/menu.tsx +217 -0
- package/src/elements/message.tsx +58 -11
- package/src/elements/model-switcher.tsx +27 -1
- package/src/elements/nav.tsx +87 -0
- package/src/elements/notice.tsx +53 -0
- package/src/elements/pane-group.tsx +119 -0
- package/src/elements/pane.tsx +129 -0
- package/src/elements/popover.tsx +39 -17
- package/src/elements/progress-bar.tsx +39 -0
- package/src/elements/prompt-dock.tsx +81 -0
- package/src/elements/prompt-input.tsx +112 -63
- package/src/elements/prompt-suggestions.tsx +25 -9
- package/src/elements/reasoning.tsx +30 -9
- package/src/elements/register-impl.ts +38 -3
- package/src/elements/register.ts +11 -3
- package/src/elements/resizable.tsx +48 -11
- package/src/elements/screen.tsx +90 -0
- package/src/elements/scroll-area.tsx +33 -0
- package/src/elements/search.tsx +180 -0
- package/src/elements/segmented.tsx +135 -0
- package/src/elements/separator.tsx +36 -0
- package/src/elements/setting-item.tsx +50 -0
- package/src/elements/settings-group.tsx +37 -0
- package/src/elements/skeleton.tsx +45 -0
- package/src/elements/slots.ts +607 -0
- package/src/elements/source.tsx +13 -6
- package/src/elements/status.tsx +42 -0
- package/src/elements/switch.tsx +89 -14
- package/src/elements/tabs.tsx +95 -0
- package/src/elements/tasks.tsx +70 -14
- package/src/elements/toast.tsx +17 -2
- package/src/elements/tool.tsx +43 -9
- package/src/elements/tooltip.tsx +85 -0
- package/src/elements/video-poster.jpg +0 -0
- package/src/elements/voice-input.tsx +66 -16
- package/src/elements/voice-output.tsx +69 -0
- package/src/index.ts +5 -2
- package/src/primitives/card-schemas/tasks.schema.json +2 -2
- package/src/primitives/composer-model.ts +49 -0
- package/src/primitives/composer-triggers.ts +35 -0
- package/src/primitives/create-kai-chat.ts +66 -0
- package/src/primitives/toast-store.ts +43 -2
- package/src/primitives/use-speech-recognition.ts +135 -0
- package/src/state/index.ts +6 -0
- package/src/state/messages.ts +36 -0
- package/src/state/stream.ts +92 -0
- package/src/state/suggestions.ts +9 -0
- package/src/types.ts +4 -0
- package/src/ui/agent-card.tsx +218 -0
- package/src/ui/button.tsx +16 -5
- package/src/ui/card.tsx +245 -0
- package/src/ui/collapsible.tsx +30 -4
- package/src/ui/command.tsx +99 -0
- package/src/ui/dialog.tsx +217 -0
- package/src/ui/dropdown.tsx +375 -13
- package/src/ui/editable-label.tsx +112 -0
- package/src/ui/hover-card.tsx +28 -5
- package/src/ui/icon.tsx +110 -0
- package/src/ui/input.tsx +132 -0
- package/src/ui/kbd.tsx +118 -0
- package/src/ui/nav.tsx +282 -0
- package/src/ui/notice.tsx +84 -0
- package/src/ui/overlay.tsx +108 -2
- package/src/ui/pane-grid.tsx +117 -0
- package/src/ui/pane-group.tsx +291 -0
- package/src/ui/pane.tsx +193 -0
- package/src/ui/popover.tsx +16 -2
- package/src/ui/progress-bar.tsx +83 -0
- package/src/ui/prompt-dock.tsx +145 -0
- package/src/ui/resizable.tsx +69 -1
- package/src/ui/scroll-area.tsx +14 -3
- package/src/ui/segmented.tsx +109 -0
- package/src/ui/settings-group.tsx +67 -0
- package/src/ui/skeleton.tsx +62 -5
- package/src/ui/stat.tsx +41 -0
- package/src/ui/status.tsx +48 -0
- package/src/ui/switch.tsx +49 -23
- package/src/ui/tabs.tsx +168 -0
- package/src/ui/tooltip.tsx +52 -8
- package/theme.css +113 -0
- package/dist/components/slash-command.d.ts +0 -15
- package/dist/elements/chunks/Icon-D_Zmwmwh.js +0 -1
- package/dist/elements/chunks/action-icons-PVfIvcuG.js +0 -1
- package/dist/elements/chunks/attachments-Dp6vqtrc.js +0 -1
- package/dist/elements/chunks/button-CKyYD9G4.js +0 -1
- package/dist/elements/chunks/card-Cjho-PYk.js +0 -1
- package/dist/elements/chunks/chat-thread-RT808iPf.js +0 -1
- package/dist/elements/chunks/check-CDYaMYrM.js +0 -1
- package/dist/elements/chunks/chevron-down-3SBiq8HF.js +0 -1
- package/dist/elements/chunks/chevron-right-k2UFlIVK.js +0 -1
- package/dist/elements/chunks/cn-Dogu6PbV.js +0 -1
- package/dist/elements/chunks/code-block-BYUmfFSd.js +0 -1
- package/dist/elements/chunks/collapsible-BiNwdOn6.js +0 -1
- package/dist/elements/chunks/context-18g6oi4J.js +0 -1
- package/dist/elements/chunks/conversation-list-D9Y0NVdo.js +0 -1
- package/dist/elements/chunks/default-input-CSAoYYMd.js +0 -1
- package/dist/elements/chunks/download-D8K0Je8r.js +0 -1
- package/dist/elements/chunks/dropdown-bUs2iTia.js +0 -1
- package/dist/elements/chunks/external-link-6mA0wxab.js +0 -1
- package/dist/elements/chunks/file-text-DnaYk3Dm.js +0 -1
- package/dist/elements/chunks/file-tree-CgtRLlxK.js +0 -1
- package/dist/elements/chunks/hover-card-CIGw62gP.js +0 -1
- package/dist/elements/chunks/link-BlGSeoPy.js +0 -1
- package/dist/elements/chunks/loader-DvhR4qa0.js +0 -1
- package/dist/elements/chunks/message-CDZwXjhL.js +0 -1
- package/dist/elements/chunks/message-feedback-CYx81QiA.js +0 -1
- package/dist/elements/chunks/model-switcher-O_tUhoOT.js +0 -1
- package/dist/elements/chunks/overlay-DydXYMQW.js +0 -1
- package/dist/elements/chunks/prompt-suggestion-ldlWV5kd.js +0 -1
- package/dist/elements/chunks/reasoning-2PUnHlmr.js +0 -1
- package/dist/elements/chunks/resizable-B5WNbSeb.js +0 -1
- package/dist/elements/chunks/star-t9tI-P0q.js +0 -1
- package/dist/elements/chunks/store-C6rIooZz.js +0 -1
- package/dist/elements/chunks/text-shimmer-uh9V_KUh.js +0 -1
- package/dist/elements/chunks/textarea-3nm6Ia9U.js +0 -1
- package/dist/elements/chunks/thumbs-up-BBtguGld.js +0 -1
- package/dist/elements/chunks/toast-store-D8cL3fWl.js +0 -1
- package/dist/elements/chunks/tool-GJ3vwp1U.js +0 -1
- package/dist/elements/chunks/tooltip-DwKAz4XR.js +0 -1
- package/dist/elements/chunks/triangle-alert-Ct1zt2JL.js +0 -1
- package/dist/elements/chunks/use-card-resolution-D-_0Alzy.js +0 -1
- package/dist/elements/chunks/video-mVYiM99-.js +0 -1
- package/dist/elements/chunks/x-CzxL27Ch.js +0 -1
- package/dist/kitn-chat.es.js +0 -1
- package/dist/register-JyTglR6m.js +0 -1
- package/dist/register-impl-C6wlSsts.js +0 -77
- package/src/components/slash-command.tsx +0 -232
- package/src/elements/framework-usage.json +0 -588
- /package/dist/{kitn-chat-provider.d.ts → kai-provider.d.ts} +0 -0
- /package/dist/{kitn-chat-provider.es.js → kai-provider.es.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as T,a as p,p as x,c as s,x as C,P as z,z as u,u as P,i as k,h as H,j as m,G as $,g as f,k as E,S as F,v as R,w as j,t as A,s as G}from"./cn-Dogu6PbV.js";import{A as I,c as L,u as M,a as O}from"./overlay-DydXYMQW.js";var S=A("<div data-hovercard-content class=z-50 style=position:fixed;background:transparent><div>");const h=R(),y=()=>{const r=j(h);if(!r)throw new Error("HoverCard parts must be used within <HoverCardRoot>");return r};function b(r){const[e,o]=p(!1),[a,i]=p(),[n,c]=p();let t;const g=()=>{clearTimeout(t),t=window.setTimeout(()=>o(!0),r.openDelay??0)},l=()=>{clearTimeout(t),t=window.setTimeout(()=>o(!1),r.closeDelay??300)},d=()=>{clearTimeout(t),o(!1)};return x(()=>clearTimeout(t)),s(h.Provider,{value:{open:e,enter:g,leave:l,close:d,setTrigger:i,setContent:c,trigger:a,content:n},get children(){return r.children}})}function w(r){const e=y();return s(I,{as:"span",get class(){return r.class},ref(o){var a=e.setTrigger;typeof a=="function"?a(o):e.setTrigger=o},get onPointerEnter(){return e.enter},get onPointerLeave(){return e.leave},get onFocusIn(){return e.enter},get onFocusOut(){return e.leave},get children(){return r.children}})}const J=8;function N(r,e){const o=r.split("-")[0];return{[{bottom:"padding-top",top:"padding-bottom",left:"padding-right",right:"padding-left"}[o]??"padding-top"]:`${e}px`}}function D(r){const e=y(),o=C(),a=L(e.open),i=M(e.trigger,e.content,{placement:r.placement??"bottom",gutter:0});return O({enabled:e.open,onDismiss:n=>n==="escape"?e.close():e.leave(),refs:()=>[e.trigger(),e.content()]}),s(F,{get when(){return a.present()},get children(){return s(z,{get mount(){return o.portalMount()},get children(){var n=S(),c=n.firstChild;return u(n,"focusout",e.leave,!0),u(n,"focusin",e.enter,!0),u(n,"pointerleave",e.leave),u(n,"pointerenter",e.enter),P(t=>{e.setContent(t),a.setRef(t)},n),k(c,()=>r.children),H(t=>{var g={left:`${i.pos().x}px`,top:`${i.pos().y}px`,visibility:i.hidden()?"hidden":"visible",...N(i.pos().placement,J)},l=a.state()==="open"?"":void 0,d=a.state()==="closed"?"":void 0,v=m("rounded-lg bg-card kai-elevation","animate-in fade-in-0 zoom-in-95 data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:zoom-out-95",r.class);return t.e=$(n,g,t.e),l!==t.t&&f(c,"data-expanded",t.t=l),d!==t.a&&f(c,"data-closed",t.a=d),v!==t.o&&E(c,t.o=v),t},{e:void 0,t:void 0,a:void 0,o:void 0}),n}})}})}function U(r){const[e]=G(r,["trigger","children","class","openDelay","closeDelay","placement"]);return s(b,{get openDelay(){return e.openDelay},get closeDelay(){return e.closeDelay},get children(){return[s(w,{get children(){return e.trigger}}),s(D,{get class(){return m("w-64 p-4",e.class)},get placement(){return e.placement},get children(){return e.children}})]}})}T(["focusin","focusout"]);export{U as H,b as a,w as b,D as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as o}from"./Icon-D_Zmwmwh.js";import{c as e,m as r}from"./cn-Dogu6PbV.js";var l=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],m=a=>e(o,r(a,{name:"Link",iconNode:l})),p=m;export{p as l};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as n,M as o,B as $,h as c,k as d,j as g,i as f,A as p,F as b,t as z}from"./cn-Dogu6PbV.js";var _=z("<div><span class=sr-only>Loading"),C=z('<div><div class="absolute h-full w-full"></div><span class=sr-only>Loading'),L=z('<div class="bg-primary absolute animate-[spinner-fade_1.2s_linear_infinite] rounded-full"style=top:0;left:50%;opacity:0>'),T=z('<div><div class="border-primary absolute inset-0 animate-[thin-pulse_1.5s_ease-in-out_infinite] rounded-full border-2"></div><span class=sr-only>Loading'),w=z("<div>"),A=z("<div><span>></span><div></div><span class=sr-only>Loading"),j=z('<div><span></span><span class=inline-flex><span class="text-primary animate-[loading-dots_1.4s_infinite_0.2s]">.</span><span class="text-primary animate-[loading-dots_1.4s_infinite_0.4s]">.</span><span class="text-primary animate-[loading-dots_1.4s_infinite_0.6s]">.');function k(t){const e=()=>t.size??"md",a={sm:"size-4",md:"size-5",lg:"size-6"};return(()=>{var r=_();return c(()=>d(r,g("border-primary animate-spin rounded-full border-2 border-t-transparent",a[e()],t.class))),r})()}function B(t){const e=()=>t.size??"md",a={sm:"size-4",md:"size-5",lg:"size-6"},r={sm:{height:"6px",width:"1.5px"},md:{height:"8px",width:"2px"},lg:{height:"10px",width:"2.5px"}};return(()=>{var i=C(),l=i.firstChild;return f(l,n(b,{get each(){return Array.from({length:12},(m,s)=>s)},children:m=>(()=>{var s=L();return p(s,"transform",`rotate(${m*30}deg)`),p(s,"animation-delay",`${m*.1}s`),c(u=>{var h=e()==="sm"?"-0.75px":e()==="lg"?"-1.25px":"-1px",x=`${e()==="sm"?"0.75px":e()==="lg"?"1.25px":"1px"} ${e()==="sm"?"10px":e()==="lg"?"14px":"12px"}`,v=r[e()].height,y=r[e()].width;return h!==u.e&&p(s,"margin-left",u.e=h),x!==u.t&&p(s,"transform-origin",u.t=x),v!==u.a&&p(s,"height",u.a=v),y!==u.o&&p(s,"width",u.o=y),u},{e:void 0,t:void 0,a:void 0,o:void 0}),s})()})),c(()=>d(i,g("relative",a[e()],t.class))),i})()}function F(t){const e=()=>t.size??"md",a={sm:"size-4",md:"size-5",lg:"size-6"};return(()=>{var r=T();return c(()=>d(r,g("relative",a[e()],t.class))),r})()}function M(t){const e=()=>t.size??"md",a={sm:"size-1",md:"size-2",lg:"size-3"};return(()=>{var r=_();return c(()=>d(r,g("bg-primary animate-[pulse-dot_1.2s_ease-in-out_infinite] rounded-full",a[e()],t.class))),r})()}function S(t){const e=()=>t.size??"md",a={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2.5 w-2.5"},r={sm:"h-4",md:"h-5",lg:"h-6"};return(()=>{var i=_(),l=i.firstChild;return f(i,n(b,{each:[0,1,2],children:m=>(()=>{var s=w();return p(s,"animation-delay",`${m*160}ms`),c(()=>d(s,g("bg-primary animate-[bounce-dots_1.4s_ease-in-out_infinite] rounded-full",a[e()]))),s})()}),l),c(()=>d(i,g("flex items-center space-x-1",r[e()],t.class))),i})()}function q(t){const e=()=>t.size??"md",a={sm:"h-1 w-1",md:"h-1.5 w-1.5",lg:"h-2 w-2"},r={sm:"h-4",md:"h-5",lg:"h-6"};return(()=>{var i=_(),l=i.firstChild;return f(i,n(b,{each:[0,1,2],children:m=>(()=>{var s=w();return p(s,"animation-delay",`${m*250}ms`),c(()=>d(s,g("bg-primary animate-[typing_1s_infinite] rounded-full",a[e()]))),s})()}),l),c(()=>d(i,g("flex items-center space-x-1",r[e()],t.class))),i})()}function D(t){const e=()=>t.size??"md",a={sm:"w-0.5",md:"w-0.5",lg:"w-1"},r={sm:"h-4",md:"h-5",lg:"h-6"},i={sm:["6px","9px","12px","9px","6px"],md:["8px","12px","16px","12px","8px"],lg:["10px","15px","20px","15px","10px"]};return(()=>{var l=_(),m=l.firstChild;return f(l,n(b,{each:[0,1,2,3,4],children:s=>(()=>{var u=w();return p(u,"animation-delay",`${s*100}ms`),c(h=>{var x=g("bg-primary animate-[wave_1s_ease-in-out_infinite] rounded-full",a[e()]),v=i[e()][s];return x!==h.e&&d(u,h.e=x),v!==h.t&&p(u,"height",h.t=v),h},{e:void 0,t:void 0}),u})()}),m),c(()=>d(l,g("flex items-center gap-0.5",r[e()],t.class))),l})()}function E(t){const e=()=>t.size??"md",a={sm:"w-1",md:"w-1.5",lg:"w-2"},r={sm:"h-4 gap-1",md:"h-5 gap-1.5",lg:"h-6 gap-2"};return(()=>{var i=_(),l=i.firstChild;return f(i,n(b,{each:[0,1,2],children:m=>(()=>{var s=w();return p(s,"animation-delay",`${m*.2}s`),c(()=>d(s,g("bg-primary h-full animate-[wave-bars_1.2s_ease-in-out_infinite]",a[e()]))),s})()}),l),c(()=>d(i,g("flex",r[e()],t.class))),i})()}function G(t){const e=()=>t.size??"md",a={sm:"h-3 w-1.5",md:"h-4 w-2",lg:"h-5 w-2.5"},r={sm:"text-xs",md:"text-sm",lg:"text-base"},i={sm:"h-4",md:"h-5",lg:"h-6"};return(()=>{var l=A(),m=l.firstChild,s=m.nextSibling;return c(u=>{var h=g("flex items-center space-x-1",i[e()],t.class),x=g("text-primary font-mono",r[e()]),v=g("bg-primary animate-[blink_1s_step-end_infinite]",a[e()]);return h!==u.e&&d(l,u.e=h),x!==u.t&&d(m,u.t=x),v!==u.a&&d(s,u.a=v),u},{e:void 0,t:void 0,a:void 0}),l})()}function I(t){const e=()=>t.size??"md",a={sm:"text-xs",md:"text-sm",lg:"text-base"};return(()=>{var r=w();return f(r,()=>t.text??"Thinking"),c(()=>d(r,g("animate-[text-blink_2s_ease-in-out_infinite] font-medium",a[e()],t.class))),r})()}function N(t){const e=()=>t.size??"md",a={sm:"text-xs",md:"text-sm",lg:"text-base"};return(()=>{var r=w();return f(r,()=>t.text??"Thinking"),c(()=>d(r,g("bg-[linear-gradient(to_right,var(--color-muted-foreground)_40%,var(--color-foreground)_60%,var(--color-muted-foreground)_80%)]","bg-size-[200%_auto] bg-clip-text font-medium text-transparent","animate-[shimmer_4s_infinite_linear]",a[e()],t.class))),r})()}function P(t){const e=()=>t.size??"md",a={sm:"text-xs",md:"text-sm",lg:"text-base"};return(()=>{var r=j(),i=r.firstChild;return f(i,()=>t.text??"Thinking"),c(l=>{var m=g("inline-flex items-center",t.class),s=g("text-primary font-medium",a[e()]);return m!==l.e&&d(r,l.e=m),s!==l.t&&d(i,l.t=s),l},{e:void 0,t:void 0}),r})()}function R(t){return n($,{get fallback(){return n(k,{get size(){return t.size},get class(){return t.class}})},get children(){return[n(o,{get when(){return t.variant==="circular"},get children(){return n(k,{get size(){return t.size},get class(){return t.class}})}}),n(o,{get when(){return t.variant==="classic"},get children(){return n(B,{get size(){return t.size},get class(){return t.class}})}}),n(o,{get when(){return t.variant==="pulse"},get children(){return n(F,{get size(){return t.size},get class(){return t.class}})}}),n(o,{get when(){return t.variant==="pulse-dot"},get children(){return n(M,{get size(){return t.size},get class(){return t.class}})}}),n(o,{get when(){return t.variant==="dots"},get children(){return n(S,{get size(){return t.size},get class(){return t.class}})}}),n(o,{get when(){return t.variant==="typing"},get children(){return n(q,{get size(){return t.size},get class(){return t.class}})}}),n(o,{get when(){return t.variant==="wave"},get children(){return n(D,{get size(){return t.size},get class(){return t.class}})}}),n(o,{get when(){return t.variant==="bars"},get children(){return n(E,{get size(){return t.size},get class(){return t.class}})}}),n(o,{get when(){return t.variant==="terminal"},get children(){return n(G,{get size(){return t.size},get class(){return t.class}})}}),n(o,{get when(){return t.variant==="text-blink"},get children(){return n(I,{get text(){return t.text},get size(){return t.size},get class(){return t.class}})}}),n(o,{get when(){return t.variant==="text-shimmer"},get children(){return n(N,{get text(){return t.text},get size(){return t.size},get class(){return t.class}})}}),n(o,{get when(){return t.variant==="loading-dots"},get children(){return n(P,{get text(){return t.text},get size(){return t.size},get class(){return t.class}})}})]}})}export{R as L};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as B,c as t,S as c,F as m,s as v,f as p,m as b,j as s,i as u,h as w,g as k,k as A,x as M,t as h,H as S,n as T}from"./cn-Dogu6PbV.js";import{T as U}from"./tooltip-DwKAz4XR.js";import{M as H}from"./markdown-CMTGx9r8.js";import{B as P}from"./button-CKyYD9G4.js";import{B as q,a as I}from"./action-icons-PVfIvcuG.js";import{R as D,a as E,b as G}from"./reasoning-2PUnHlmr.js";import{T as J}from"./tool-GJ3vwp1U.js";import{A as K,a as L,d as N,e as O}from"./attachments-Dp6vqtrc.js";import{c as Q}from"./check-CDYaMYrM.js";var f=h("<div>"),V=h('<img class="h-full w-full object-cover">'),W=h('<div class="flex h-full w-full items-center justify-center bg-muted text-xs font-medium text-muted-foreground">'),X=h('<span class="px-1 text-xs">'),Y=h('<span><span class="min-w-0 overflow-hidden">');function Z(r){const[e,n]=v(r,["children","class"]);return(()=>{var a=f();return p(a,b({get class(){return s("flex items-start gap-3",e.class)}},n),!1,!0),u(a,()=>e.children),a})()}function _(r){return(()=>{var e=f();return u(e,t(c,{get when(){return r.src},get fallback(){return t(c,{get when(){return r.fallback},get children(){var n=W();return u(n,()=>r.fallback),n}})},get children(){var n=V();return w(a=>{var l=r.src,i=r.alt;return l!==a.e&&k(n,"src",a.e=l),i!==a.t&&k(n,"alt",a.t=i),a},{e:void 0,t:void 0}),n}})),w(()=>A(e,s("h-8 w-8 shrink-0 overflow-hidden rounded-full",r.class))),e})()}function $(r){const[e,n]=v(r,["children","markdown","class"]),a=M(),l=()=>s("min-w-0 rounded-lg p-2 text-foreground bg-secondary max-w-none break-words whitespace-normal",S(a.proseSize()),e.class);return t(c,{get when(){return e.markdown},get fallback(){return(()=>{var i=f();return p(i,b({get class(){return l()}},n),!1,!0),u(i,()=>e.children),i})()},get children(){return t(H,{get content(){return e.children},get class(){return l()}})}})}function rr(r){const[e,n]=v(r,["children","class"]);return(()=>{var a=f();return p(a,b({get class(){return s("flex items-center gap-0.5 mt-0.5",e.class)}},n),!1,!0),u(a,()=>e.children),a})()}function er(r){return typeof r=="string"?{id:r,label:q[r],Icon:I(r)}:{id:r.id,label:r.label,Icon:I(r.icon)}}function tr(r){return r==="like"||r==="dislike"?r:void 0}function nr(r){return t(rr,{get class(){return s("mt-1 flex gap-0",r.reveal==="hover"&&"opacity-0 transition-opacity group-hover:opacity-100",r.class)},get children(){return t(m,{get each(){return r.actions},children:e=>{const n=er(e),a=()=>typeof e!="string"&&e.tooltip?e.tooltip:n.label,l=tr(e),i=()=>l!==void 0&&r.activeFeedback===l,C=n.id==="copy",x=()=>C&&r.copied===!0,y=()=>t(P,{variant:"ghost",size:"icon-sm",get class(){return s("rounded-full",i()&&"text-primary")},get"data-action"(){return n.id},get"aria-label"(){return T(()=>!!x())()?"Copied":n.label},get"aria-pressed"(){return l!==void 0?i():void 0},onClick:()=>r.onAction(n.id),get children(){return t(c,{get when(){return x()},get fallback(){return t(c,{get when(){return n.Icon},get fallback(){return(()=>{var o=X();return u(o,()=>n.label),o})()},children:o=>{const d=o();return t(d,{get class(){return s("size-3.5",i()&&"fill-current")}})}})},get children(){return t(Q,{class:"size-3.5 text-emerald-400"})}})}}),F=()=>t(c,{get when(){return n.Icon},get fallback(){return y()},get children(){return t(U,{get content(){return a()},get children(){return y()}})}});return t(c,{when:l!==void 0,get fallback(){return F()},get children(){return(()=>{const o=()=>r.activeFeedback===void 0||r.activeFeedback===l;return(()=>{var d=Y(),R=d.firstChild;return u(R,F),w(g=>{var j=o()?void 0:"",z=s("grid transition-[grid-template-columns,opacity] duration-300 ease-out",o()?"grid-cols-[1fr] opacity-100":"grid-cols-[0fr] opacity-0");return j!==g.e&&k(d,"data-feedback-collapsed",g.e=j),z!==g.t&&A(d,g.t=z),g},{e:void 0,t:void 0}),d})()})()}})}})}})}function ar(r){return[t(c,{get when(){return r.reasoning},children:e=>t(D,{class:"mb-2 w-full",get children(){return[t(E,{get children(){return e().label??"Reasoning"}}),t(G,{markdown:!0,get children(){return e().text}})]}})}),t(m,{get each(){return r.tools??[]},children:e=>t(J,{toolPart:e,class:"mb-2 w-full"})}),t(c,{get when(){var e;return(e=r.attachments)==null?void 0:e.length},get children(){return t(K,{variant:"inline",get class(){return r.isUser?"mb-2 justify-end":"mb-2"},get children(){return t(m,{get each(){return r.attachments},children:e=>t(L,{data:e,get children(){return[t(N,{}),t(O,{})]}})})}})}}),t($,{get markdown(){return r.markdown},get class(){return r.isUser?"bg-muted text-primary max-w-[85%] rounded-2xl px-4 py-2":"bg-transparent p-0"},get children(){return r.content}}),t(c,{get when(){var e;return(((e=r.actions)==null?void 0:e.length)??0)>0},get children(){return t(nr,{get actions(){return r.actions},get reveal(){return r.actionsReveal==="hover"?"hover":"always"},get activeFeedback(){return r.activeFeedback},get copied(){return r.copied},onAction:e=>{var n;return(n=r.onAction)==null?void 0:n.call(r,e)}})}})]}B(["click"]);export{ar as M,Z as a,_ as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as l,p as v}from"./cn-Dogu6PbV.js";import{t as u}from"./toast-store-D8cL3fWl.js";const b=2e3;function T(r){const[m,f]=l({}),[g,a]=l(new Set),p=r.copiedDuration??b,n=new Map;v(()=>{n.forEach(e=>clearTimeout(e)),n.clear()});const d=e=>e.feedback??m()[e.id],h=e=>g().has(e),k=e=>{a(o=>{const i=new Set(o);return i.add(e),i});const t=n.get(e);t&&clearTimeout(t),n.set(e,setTimeout(()=>{n.delete(e),a(o=>{if(!o.has(e))return o;const i=new Set(o);return i.delete(e),i})},p))},c=(e,t)=>{f(o=>{const i={...o};return t===void 0?delete i[e]:i[e]=t,i})};return{resolveFeedback:d,isCopied:h,handleAction:(e,t)=>{var o,i,s;if(t==="copy"){try{(o=navigator.clipboard)==null||o.writeText(e.content)}catch{}k(e.id),u("Copied to clipboard",{target:(i=r.target)==null?void 0:i.call(r)}),r.emit({messageId:e.id,action:t});return}if(t==="like"||t==="dislike"){d(e)===t?(c(e.id,void 0),r.emit({messageId:e.id,action:t,state:"off"})):(c(e.id,t),u("Thanks for your feedback",{target:(s=r.target)==null?void 0:s.call(r)}),r.emit({messageId:e.id,action:t,state:"on"}));return}r.emit({messageId:e.id,action:t})}}}export{T as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as b,s as I,c as r,m as y,n as k,j as m,F as h,a as j,i as d,S as p,h as f,g as M,k as B,t as a}from"./cn-Dogu6PbV.js";import{c as S,D as z,a as D,b as F}from"./dropdown-bUs2iTia.js";import{B as $}from"./button-CKyYD9G4.js";var A=a('<svg width=12 height=12 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2><polyline points="6 9 12 15 18 9">'),E=a('<span class="text-caption text-muted-foreground">'),P=a('<div class="flex flex-col"><span>'),R=a("<div class=pl-2>"),T=a('<div><button type=button class="flex w-full items-center justify-between rounded-md px-2 py-1.5 text-body outline-none transition-colors hover:bg-muted focus:bg-muted">');const x=o=>(()=>{var e=A();return f(()=>M(e,"class",o.class)),e})();function w(o){const e=()=>o.model.description??o.model.provider;return r(F,{onSelect:()=>o.onModelChange(o.model.id),get children(){var s=P(),u=s.firstChild;return d(u,()=>o.model.name),d(s,r(p,{get when(){return e()},get children(){var c=E();return d(c,e),c}}),null),f(()=>B(u,m("text-body",o.model.id===o.currentModelId&&"font-medium text-foreground"))),s}})}function _(o){const[e]=I(o,["models","currentModelId","onModelChange","class"]),s=()=>e.models.find(t=>t.id===e.currentModelId),u=()=>e.models.filter(t=>!t.group),c=()=>{const t=[],n=new Map;for(const l of e.models)l.group&&(n.has(l.group)||(n.set(l.group,[]),t.push(l.group)),n.get(l.group).push(l));return t.map(l=>({name:l,models:n.get(l)}))};return r(p,{get when(){return e.models.length>1},get children(){return r(S,{get children(){return[r(z,{as:t=>r($,y({variant:"ghost",size:"sm",get class(){return m("gap-1 text-meta text-muted-foreground",e.class)}},t,{get children(){return[k(()=>{var n;return((n=s())==null?void 0:n.name)??e.currentModelId}),r(x,{})]}}))}),r(D,{get children(){return[r(h,{get each(){return u()},children:t=>r(w,{model:t,get currentModelId(){return e.currentModelId},get onModelChange(){return e.onModelChange}})}),r(h,{get each(){return c()},children:t=>{const[n,l]=j(!1);return(()=>{var g=T(),i=g.firstChild;return i.$$click=()=>l(!n()),d(i,()=>t.name,null),d(i,r(x,{get class(){return m("transition-transform",n()&&"rotate-180")}}),null),d(g,r(p,{get when(){return n()},get children(){var v=R();return d(v,r(h,{get each(){return t.models},children:C=>r(w,{model:C,get currentModelId(){return e.currentModelId},get onModelChange(){return e.onModelChange}})})),v}}),null),f(()=>M(i,"aria-expanded",n())),g})()}})]}})]}})}})}b(["click"]);export{_ as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as It,c as _t,m as jt,D as Xt,a as Q,b as ut,p as dt}from"./cn-Dogu6PbV.js";const Yt=["top","right","bottom","left"],j=Math.min,$=Math.max,ot=Math.round,it=Math.floor,A=t=>({x:t,y:t}),Gt={left:"right",right:"left",bottom:"top",top:"bottom"};function mt(t,e,n){return $(t,j(e,n))}function X(t,e){return typeof t=="function"?t(e):t}function q(t){return t.split("-")[0]}function tt(t){return t.split("-")[1]}function Et(t){return t==="x"?"y":"x"}function ht(t){return t==="y"?"height":"width"}function W(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function pt(t){return Et(W(t))}function Kt(t,e,n){n===void 0&&(n=!1);const o=tt(t),i=pt(t),c=ht(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[c]>e.floating[c]&&(r=rt(r)),[r,rt(r)]}function Ut(t){const e=rt(t);return[gt(t),e,gt(e)]}function gt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Lt=["left","right"],Ot=["right","left"],Zt=["top","bottom"],Jt=["bottom","top"];function Qt(t,e,n){switch(t){case"top":case"bottom":return n?e?Ot:Lt:e?Lt:Ot;case"left":case"right":return e?Zt:Jt;default:return[]}}function te(t,e,n,o){const i=tt(t);let c=Qt(q(t),n==="start",o);return i&&(c=c.map(r=>r+"-"+i),e&&(c=c.concat(c.map(gt)))),c}function rt(t){const e=q(t);return Gt[e]+t.slice(e.length)}function ee(t){return{top:0,right:0,bottom:0,left:0,...t}}function Tt(t){return typeof t!="number"?ee(t):{top:t,right:t,bottom:t,left:t}}function ct(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function At(t,e,n){let{reference:o,floating:i}=t;const c=W(e),r=pt(e),l=ht(r),s=q(e),a=c==="y",u=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,m=o[l]/2-i[l]/2;let f;switch(s){case"top":f={x:u,y:o.y-i.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-i.width,y:d};break;default:f={x:o.x,y:o.y}}switch(tt(e)){case"start":f[r]-=m*(n&&a?-1:1);break;case"end":f[r]+=m*(n&&a?-1:1);break}return f}async function ne(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:c,rects:r,elements:l,strategy:s}=t,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:m=!1,padding:f=0}=X(e,t),h=Tt(f),p=l[m?d==="floating"?"reference":"floating":d],w=ct(await c.getClippingRect({element:(n=await(c.isElement==null?void 0:c.isElement(p)))==null||n?p:p.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(l.floating)),boundary:a,rootBoundary:u,strategy:s})),y=d==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,g=await(c.getOffsetParent==null?void 0:c.getOffsetParent(l.floating)),x=await(c.isElement==null?void 0:c.isElement(g))?await(c.getScale==null?void 0:c.getScale(g))||{x:1,y:1}:{x:1,y:1},v=ct(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:g,strategy:s}):y);return{top:(w.top-v.top+h.top)/x.y,bottom:(v.bottom-w.bottom+h.bottom)/x.y,left:(w.left-v.left+h.left)/x.x,right:(v.right-w.right+h.right)/x.x}}const oe=50,ie=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:c=[],platform:r}=n,l=r.detectOverflow?r:{...r,detectOverflow:ne},s=await(r.isRTL==null?void 0:r.isRTL(e));let a=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:d}=At(a,o,s),m=o,f=0;const h={};for(let p=0;p<c.length;p++){const w=c[p];if(!w)continue;const{name:y,fn:g}=w,{x,y:v,data:F,reset:b}=await g({x:u,y:d,initialPlacement:o,placement:m,strategy:i,middlewareData:h,rects:a,platform:l,elements:{reference:t,floating:e}});u=x??u,d=v??d,h[y]={...h[y],...F},b&&f<oe&&(f++,typeof b=="object"&&(b.placement&&(m=b.placement),b.rects&&(a=b.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):b.rects),{x:u,y:d}=At(a,m,s)),p=-1)}return{x:u,y:d,placement:m,strategy:i,middlewareData:h}},re=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:c,platform:r,elements:l,middlewareData:s}=e,{element:a,padding:u=0}=X(t,e)||{};if(a==null)return{};const d=Tt(u),m={x:n,y:o},f=pt(i),h=ht(f),p=await r.getDimensions(a),w=f==="y",y=w?"top":"left",g=w?"bottom":"right",x=w?"clientHeight":"clientWidth",v=c.reference[h]+c.reference[f]-m[f]-c.floating[h],F=m[f]-c.reference[f],b=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a));let M=b?b[x]:0;(!M||!await(r.isElement==null?void 0:r.isElement(b)))&&(M=l.floating[x]||c.floating[h]);const U=v/2-F/2,V=M/2-p[h]/2-1,C=j(d[y],V),Z=j(d[g],V),N=C,J=M-p[h]-Z,R=M/2-p[h]/2+U,z=mt(N,R,J),S=!s.arrow&&tt(i)!=null&&R!==z&&c.reference[h]/2-(R<N?C:Z)-p[h]/2<0,E=S?R<N?R-N:R-J:0;return{[f]:m[f]+E,data:{[f]:z,centerOffset:R-z-E,...S&&{alignmentOffset:E}},reset:S}}}),ce=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:c,rects:r,initialPlacement:l,platform:s,elements:a}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:p=!0,...w}=X(t,e);if((n=c.arrow)!=null&&n.alignmentOffset)return{};const y=q(i),g=W(l),x=q(l)===l,v=await(s.isRTL==null?void 0:s.isRTL(a.floating)),F=m||(x||!p?[rt(l)]:Ut(l)),b=h!=="none";!m&&b&&F.push(...te(l,p,h,v));const M=[l,...F],U=await s.detectOverflow(e,w),V=[];let C=((o=c.flip)==null?void 0:o.overflows)||[];if(u&&V.push(U[y]),d){const R=Kt(i,r,v);V.push(U[R[0]],U[R[1]])}if(C=[...C,{placement:i,overflows:V}],!V.every(R=>R<=0)){var Z,N;const R=(((Z=c.flip)==null?void 0:Z.index)||0)+1,z=M[R];if(z&&(!(d==="alignment"&&g!==W(z))||C.every(E=>W(E.placement)===g?E.overflows[0]>0:!0)))return{data:{index:R,overflows:C},reset:{placement:z}};let S=(N=C.filter(E=>E.overflows[0]<=0).sort((E,P)=>E.overflows[1]-P.overflows[1])[0])==null?void 0:N.placement;if(!S)switch(f){case"bestFit":{var J;const E=(J=C.filter(P=>{if(b){const H=W(P.placement);return H===g||H==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(H=>H>0).reduce((H,qt)=>H+qt,0)]).sort((P,H)=>P[1]-H[1])[0])==null?void 0:J[0];E&&(S=E);break}case"initialPlacement":S=l;break}if(i!==S)return{reset:{placement:S}}}return{}}}};function Dt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ct(t){return Yt.some(e=>t[e]>=0)}const le=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:i="referenceHidden",...c}=X(t,e);switch(i){case"referenceHidden":{const r=await o.detectOverflow(e,{...c,elementContext:"reference"}),l=Dt(r,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Ct(l)}}}case"escaped":{const r=await o.detectOverflow(e,{...c,altBoundary:!0}),l=Dt(r,n.floating);return{data:{escapedOffsets:l,escaped:Ct(l)}}}default:return{}}}}},se=new Set(["left","top"]);async function ae(t,e){const{placement:n,platform:o,elements:i}=t,c=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=q(n),l=tt(n),s=W(n)==="y",a=se.has(r)?-1:1,u=c&&s?-1:1,d=X(e,t);let{mainAxis:m,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof h=="number"&&(f=l==="end"?h*-1:h),s?{x:f*u,y:m*a}:{x:m*a,y:f*u}}const fe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:c,placement:r,middlewareData:l}=e,s=await ae(e,t);return r===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+s.x,y:c+s.y,data:{...s,placement:r}}}}},ue=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:c}=e,{mainAxis:r=!0,crossAxis:l=!1,limiter:s={fn:y=>{let{x:g,y:x}=y;return{x:g,y:x}}},...a}=X(t,e),u={x:n,y:o},d=await c.detectOverflow(e,a),m=W(q(i)),f=Et(m);let h=u[f],p=u[m];if(r){const y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",x=h+d[y],v=h-d[g];h=mt(x,h,v)}if(l){const y=m==="y"?"top":"left",g=m==="y"?"bottom":"right",x=p+d[y],v=p-d[g];p=mt(x,p,v)}const w=s.fn({...e,[f]:h,[m]:p});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[f]:r,[m]:l}}}}}};function lt(){return typeof window<"u"}function Y(t){return St(t)?(t.nodeName||"").toLowerCase():"#document"}function L(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function D(t){var e;return(e=(St(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function St(t){return lt()?t instanceof Node||t instanceof L(t).Node:!1}function O(t){return lt()?t instanceof Element||t instanceof L(t).Element:!1}function k(t){return lt()?t instanceof HTMLElement||t instanceof L(t).HTMLElement:!1}function kt(t){return!lt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof L(t).ShadowRoot}function et(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&i!=="inline"&&i!=="contents"}function de(t){return/^(table|td|th)$/.test(Y(t))}function st(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const me=/transform|translate|scale|rotate|perspective|filter/,he=/paint|layout|strict|content/,I=t=>!!t&&t!=="none";let yt;function wt(t){const e=O(t)?T(t):t;return I(e.transform)||I(e.translate)||I(e.scale)||I(e.rotate)||I(e.perspective)||!xt()&&(I(e.backdropFilter)||I(e.filter))||me.test(e.willChange||"")||he.test(e.contain||"")}function pe(t){let e=B(t);for(;k(e)&&!G(e);){if(wt(e))return e;if(st(e))return null;e=B(e)}return null}function xt(){return yt==null&&(yt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),yt}function G(t){return/^(html|body|#document)$/.test(Y(t))}function T(t){return L(t).getComputedStyle(t)}function at(t){return O(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function B(t){if(Y(t)==="html")return t;const e=t.assignedSlot||t.parentNode||kt(t)&&t.host||D(t);return kt(e)?e.host:e}function Ft(t){const e=B(t);return G(e)?t.ownerDocument?t.ownerDocument.body:t.body:k(e)&&et(e)?e:Ft(e)}function nt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Ft(t),c=i===((o=t.ownerDocument)==null?void 0:o.body),r=L(i);if(c){const l=vt(r);return e.concat(r,r.visualViewport||[],et(i)?i:[],l&&n?nt(l):[])}else return e.concat(i,nt(i,[],n))}function vt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Pt(t){const e=T(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=k(t),c=i?t.offsetWidth:n,r=i?t.offsetHeight:o,l=ot(n)!==c||ot(o)!==r;return l&&(n=c,o=r),{width:n,height:o,$:l}}function bt(t){return O(t)?t:t.contextElement}function K(t){const e=bt(t);if(!k(e))return A(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:c}=Pt(e);let r=(c?ot(n.width):n.width)/o,l=(c?ot(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const ge=A(0);function Ht(t){const e=L(t);return!xt()||!e.visualViewport?ge:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ye(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==L(t)?!1:e}function _(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),c=bt(t);let r=A(1);e&&(o?O(o)&&(r=K(o)):r=K(t));const l=ye(c,n,o)?Ht(c):A(0);let s=(i.left+l.x)/r.x,a=(i.top+l.y)/r.y,u=i.width/r.x,d=i.height/r.y;if(c){const m=L(c),f=o&&O(o)?L(o):o;let h=m,p=vt(h);for(;p&&o&&f!==h;){const w=K(p),y=p.getBoundingClientRect(),g=T(p),x=y.left+(p.clientLeft+parseFloat(g.paddingLeft))*w.x,v=y.top+(p.clientTop+parseFloat(g.paddingTop))*w.y;s*=w.x,a*=w.y,u*=w.x,d*=w.y,s+=x,a+=v,h=L(p),p=vt(h)}}return ct({width:u,height:d,x:s,y:a})}function ft(t,e){const n=at(t).scrollLeft;return e?e.left+n:_(D(t)).left+n}function Wt(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-ft(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function we(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const c=i==="fixed",r=D(o),l=e?st(e.floating):!1;if(o===r||l&&c)return n;let s={scrollLeft:0,scrollTop:0},a=A(1);const u=A(0),d=k(o);if((d||!d&&!c)&&((Y(o)!=="body"||et(r))&&(s=at(o)),d)){const f=_(o);a=K(o),u.x=f.x+o.clientLeft,u.y=f.y+o.clientTop}const m=r&&!d&&!c?Wt(r,s):A(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-s.scrollLeft*a.x+u.x+m.x,y:n.y*a.y-s.scrollTop*a.y+u.y+m.y}}function xe(t){return Array.from(t.getClientRects())}function ve(t){const e=D(t),n=at(t),o=t.ownerDocument.body,i=$(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),c=$(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+ft(t);const l=-n.scrollTop;return T(o).direction==="rtl"&&(r+=$(e.clientWidth,o.clientWidth)-i),{width:i,height:c,x:r,y:l}}const Bt=25;function be(t,e){const n=L(t),o=D(t),i=n.visualViewport;let c=o.clientWidth,r=o.clientHeight,l=0,s=0;if(i){c=i.width,r=i.height;const u=xt();(!u||u&&e==="fixed")&&(l=i.offsetLeft,s=i.offsetTop)}const a=ft(o);if(a<=0){const u=o.ownerDocument,d=u.body,m=getComputedStyle(d),f=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(o.clientWidth-d.clientWidth-f);h<=Bt&&(c-=h)}else a<=Bt&&(c+=a);return{width:c,height:r,x:l,y:s}}function Re(t,e){const n=_(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,c=k(t)?K(t):A(1),r=t.clientWidth*c.x,l=t.clientHeight*c.y,s=i*c.x,a=o*c.y;return{width:r,height:l,x:s,y:a}}function Mt(t,e,n){let o;if(e==="viewport")o=be(t,n);else if(e==="document")o=ve(D(t));else if(O(e))o=Re(e,n);else{const i=Ht(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return ct(o)}function Vt(t,e){const n=B(t);return n===e||!O(n)||G(n)?!1:T(n).position==="fixed"||Vt(n,e)}function Ee(t,e){const n=e.get(t);if(n)return n;let o=nt(t,[],!1).filter(l=>O(l)&&Y(l)!=="body"),i=null;const c=T(t).position==="fixed";let r=c?B(t):t;for(;O(r)&&!G(r);){const l=T(r),s=wt(r);!s&&l.position==="fixed"&&(i=null),(c?!s&&!i:!s&&l.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||et(r)&&!s&&Vt(t,r))?o=o.filter(a=>a!==r):i=l,r=B(r)}return e.set(t,o),o}function Le(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const c=[...n==="clippingAncestors"?st(e)?[]:Ee(e,this._c):[].concat(n),o],r=Mt(e,c[0],i);let l=r.top,s=r.right,a=r.bottom,u=r.left;for(let d=1;d<c.length;d++){const m=Mt(e,c[d],i);l=$(m.top,l),s=j(m.right,s),a=j(m.bottom,a),u=$(m.left,u)}return{width:s-u,height:a-l,x:u,y:l}}function Oe(t){const{width:e,height:n}=Pt(t);return{width:e,height:n}}function Te(t,e,n){const o=k(e),i=D(e),c=n==="fixed",r=_(t,!0,c,e);let l={scrollLeft:0,scrollTop:0};const s=A(0);function a(){s.x=ft(i)}if(o||!o&&!c)if((Y(e)!=="body"||et(i))&&(l=at(e)),o){const f=_(e,!0,c,e);s.x=f.x+e.clientLeft,s.y=f.y+e.clientTop}else i&&a();c&&!o&&i&&a();const u=i&&!o&&!c?Wt(i,l):A(0),d=r.left+l.scrollLeft-s.x-u.x,m=r.top+l.scrollTop-s.y-u.y;return{x:d,y:m,width:r.width,height:r.height}}function Rt(t){return T(t).position==="static"}function Nt(t,e){if(!k(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return D(t)===n&&(n=n.ownerDocument.body),n}function zt(t,e){const n=L(t);if(st(t))return n;if(!k(t)){let i=B(t);for(;i&&!G(i);){if(O(i)&&!Rt(i))return i;i=B(i)}return n}let o=Nt(t,e);for(;o&&de(o)&&Rt(o);)o=Nt(o,e);return o&&G(o)&&Rt(o)&&!wt(o)?n:o||pe(t)||n}const Ae=async function(t){const e=this.getOffsetParent||zt,n=this.getDimensions,o=await n(t.floating);return{reference:Te(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function De(t){return T(t).direction==="rtl"}const Ce={convertOffsetParentRelativeRectToViewportRelativeRect:we,getDocumentElement:D,getClippingRect:Le,getOffsetParent:zt,getElementRects:Ae,getClientRects:xe,getDimensions:Oe,getScale:K,isElement:O,isRTL:De};function $t(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Se(t,e){let n=null,o;const i=D(t);function c(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function r(l,s){l===void 0&&(l=!1),s===void 0&&(s=1),c();const a=t.getBoundingClientRect(),{left:u,top:d,width:m,height:f}=a;if(l||e(),!m||!f)return;const h=it(d),p=it(i.clientWidth-(u+m)),w=it(i.clientHeight-(d+f)),y=it(u),g={rootMargin:-h+"px "+-p+"px "+-w+"px "+-y+"px",threshold:$(0,j(1,s))||1};let x=!0;function v(F){const b=F[0].intersectionRatio;if(b!==s){if(!x)return r();b?r(!1,b):o=setTimeout(()=>{r(!1,1e-7)},1e3)}b===1&&!$t(a,t.getBoundingClientRect())&&r(),x=!1}try{n=new IntersectionObserver(v,{...g,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,g)}n.observe(t)}return r(!0),c}function ke(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:s=!1}=o,a=bt(t),u=i||c?[...a?nt(a):[],...e?nt(e):[]]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),c&&y.addEventListener("resize",n)});const d=a&&l?Se(a,n):null;let m=-1,f=null;r&&(f=new ResizeObserver(y=>{let[g]=y;g&&g.target===a&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(e)})),n()}),a&&!s&&f.observe(a),e&&f.observe(e));let h,p=s?_(t):null;s&&w();function w(){const y=_(t);p&&!$t(p,y)&&n(),p=y,h=requestAnimationFrame(w)}return n(),()=>{var y;u.forEach(g=>{i&&g.removeEventListener("scroll",n),c&&g.removeEventListener("resize",n)}),d?.(),(y=f)==null||y.disconnect(),f=null,s&&cancelAnimationFrame(h)}}const Fe=fe,Pe=ue,He=ce,We=le,Be=re,Me=(t,e,n)=>{const o=new Map,i={platform:Ce,...n},c={...i.platform,_c:o};return ie(t,e,{...i,platform:c})};function Ve(t){const[e,n]=Q(t()),[o,i]=Q(t()?"open":"closed");let c,r=0;const l=s=>{c=s};return ut(s=>{const a=t();if(a)r++,n(!0),i("open");else if(s){i("closed");const u=c,d=u&&(()=>{const h=getComputedStyle(u);return h.animationName!=="none"&&parseFloat(h.animationDuration||"0")>0})();if(!u||!d){const h=++r;return queueMicrotask(()=>{h===r&&n(!1)}),a}const m=u,f=h=>{h.target===m&&(m.removeEventListener("animationend",f),n(!1))};m.addEventListener("animationend",f),dt(()=>m.removeEventListener("animationend",f))}return a}),{present:e,state:o,setRef:l}}function Ne(t){const[e,n]=It(t,["as"]);return typeof e.as=="function"?e.as(n):_t(Xt,jt({get component(){return e.as??"span"}},n))}function ze(t,e,n={}){const[o,i]=Q({x:0,y:0,placement:n.placement??"bottom"}),[c,r]=Q({}),[l,s]=Q(!1);return ut(()=>{const a=t(),u=e();if(!a||!u)return;const d=ke(a,u,()=>{var m;const f=[Fe(n.gutter??8),He(),Pe({padding:8})],h=(m=n.arrowEl)==null?void 0:m.call(n);h&&f.push(Be({element:h})),f.push(We()),Me(a,u,{placement:n.placement??"bottom",strategy:"fixed",middleware:f}).then(({x:p,y:w,placement:y,middlewareData:g})=>{var x;i({x:p,y:w,placement:y}),g.arrow&&r({x:g.arrow.x,y:g.arrow.y}),s(!!((x=g.hide)!=null&&x.referenceHidden))})});dt(d)}),{pos:o,arrowPos:c,hidden:l}}function $e(t){ut(()=>{if(!t.enabled())return;const e=o=>{o.key==="Escape"&&t.onDismiss("escape")},n=o=>{const i=o.target;t.refs().some(c=>c&&c.contains(i))||t.onDismiss("outside")};document.addEventListener("keydown",e),document.addEventListener("pointerdown",n,!0),dt(()=>{document.removeEventListener("keydown",e),document.removeEventListener("pointerdown",n,!0)})})}export{Ne as A,$e as a,Ve as c,ze as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as w,c as e,S as l,m as u,j as g,i as c,t as m}from"./cn-Dogu6PbV.js";import{B as h}from"./button-CKyYD9G4.js";var d=m('<span class="text-foreground/70 whitespace-pre-wrap">'),x=m('<span class="text-primary font-medium whitespace-pre-wrap">');function b(n){const[r,s]=w(n,["children","variant","size","class","highlight","block"]),o=()=>r.highlight!==void 0&&r.highlight.trim()!=="",i=()=>typeof r.children=="string"?r.children:"";return e(l,{get when(){return o()},get fallback(){return e(l,{get when(){return r.block},get fallback(){return e(h,u({get variant(){return r.variant??"outline"},get size(){return r.size??"lg"},get class(){return g("rounded-full",r.class)}},s,{get children(){return r.children}}))},get children(){return e(h,u({get variant(){return r.variant??"outline"},get size(){return r.size??"md"},get class(){return g("h-auto w-full cursor-pointer justify-start rounded-xl px-4 py-2.5","text-left text-sm leading-snug whitespace-normal text-pretty",r.class)}},s,{get children(){return r.children}}))}})},get children(){return e(l,{get when(){return i()},get fallback(){return e(h,u({get variant(){return r.variant??"ghost"},get size(){return r.size??"sm"},get class(){return g("w-full cursor-pointer justify-start rounded-xl py-2","hover:bg-accent",r.class)}},s,{get children(){return r.children}}))},get children(){return e(h,u({get variant(){return r.variant??"ghost"},get size(){return r.size??"sm"},get class(){return g("w-full cursor-pointer justify-start gap-0 rounded-xl py-2","hover:bg-accent",r.class)}},s,{get children(){return y(i(),r.highlight)}}))}})}})}function y(n,r){const s=r.trim(),o=n.toLowerCase(),i=s.toLowerCase(),a=o.indexOf(i);if(a===-1)return(()=>{var t=d();return c(t,n),t})();const p=n.substring(0,a),f=n.substring(a,a+i.length),v=n.substring(a+f.length);return[e(l,{when:p,get children(){var t=d();return c(t,p),t}}),(()=>{var t=x();return c(t,f),t})(),e(l,{when:v,get children(){var t=d();return c(t,v),t}})]}export{b as P};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as R,s as g,a as x,b,c as u,i as h,h as p,k as f,f as C,m as w,j as d,S as H,t as m,v as S,w as $,p as z,u as y}from"./cn-Dogu6PbV.js";import{M}from"./markdown-CMTGx9r8.js";import{c as j}from"./chevron-down-3SBiq8HF.js";const E=1;function P(i,e){let o=-1;const s=new ResizeObserver(r=>{var t;const n=((t=r[r.length-1])==null?void 0:t.contentRect.height)??i.getBoundingClientRect().height;(o<0||Math.abs(n-o)>E)&&(o=n,e(n))});return s.observe(i),()=>s.disconnect()}var A=m("<div>"),B=m("<button><span class=text-primary></span><div>"),L=m("<div style=max-height:0px><div>");const O=S();function k(){const i=$(O);if(!i)throw new Error("useReasoningContext must be used within a Reasoning provider");return i}function N(i){const[e]=g(i,["children","class","open","onOpenChange","isStreaming"]),[o,s]=x(!1),[r,t]=x(!1),n=()=>e.open!==void 0,c=()=>n()?e.open:o(),l=a=>{var v;n()||s(a),(v=e.onOpenChange)==null||v.call(e,a)};return b(()=>{const a=e.isStreaming;a&&!r()&&(n()||s(!0),t(!0)),!a&&r()&&(n()||s(!1),t(!1))}),u(O.Provider,{value:{isOpen:c,onOpenChange:l},get children(){var a=A();return h(a,()=>e.children),p(()=>f(a,e.class)),a}})}function T(i){const[e,o]=g(i,["children","class"]),{isOpen:s,onOpenChange:r}=k();return(()=>{var t=B(),n=t.firstChild,c=n.nextSibling;return t.$$click=()=>r(!s()),C(t,w({get class(){return d("flex cursor-pointer items-center gap-2 text-meta",e.class)}},o),!1,!0),h(n,()=>e.children),h(c,u(j,{class:"size-4"})),p(()=>f(c,d("transform transition-transform",s()?"rotate-180":""))),t})()}function W(i){const[e,o]=g(i,["children","class","contentClass","markdown"]),{isOpen:s}=k();let r,t;return b(()=>{if(!r||!t)return;const n=P(t,()=>{r&&t&&s()&&(r.style.maxHeight=`${t.scrollHeight}px`)});s()?r.style.maxHeight=`${t.scrollHeight}px`:r.style.maxHeight="0px",z(n)}),(()=>{var n=L(),c=n.firstChild,l=r;typeof l=="function"?y(l,n):r=n,C(n,w({get class(){return d("overflow-hidden transition-[max-height] duration-150 ease-out",e.class)}},o),!1,!0);var a=t;return typeof a=="function"?y(a,c):t=c,h(c,u(H,{get when(){return e.markdown},get fallback(){return e.children},get children(){return u(M,{get content(){return e.children}})}})),p(()=>f(c,d("text-muted-foreground text-body",e.contentClass))),n})()}R(["click"]);export{N as R,T as a,W as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as _,s as E,c as A,f as F,m as P,j as B,i as M,w as ee,a as D,h as te,k as ne,g as ie,S as re,t as N,v as le}from"./cn-Dogu6PbV.js";var W=N("<div>"),oe=N('<div><svg viewBox="0 0 4 8"fill=currentColor><circle cx=1 cy=1.5 r=0.6></circle><circle cx=3 cy=1.5 r=0.6></circle><circle cx=1 cy=4 r=0.6></circle><circle cx=3 cy=4 r=0.6></circle><circle cx=1 cy=6.5 r=0.6></circle><circle cx=3 cy=6.5 r=0.6>'),ae=N("<div role=separator aria-valuemin=0 aria-valuemax=100>");const H=le();function T(s){if(s==null||s==="")return;if(typeof s=="number")return Number.isFinite(s)?`${s}%`:void 0;const t=s.trim();if(t==="")return;if(t.endsWith("%")||t.endsWith("px"))return t;const m=Number(t);return Number.isFinite(m)?`${m}%`:void 0}function se(s){const[t,m]=E(s,["orientation","children","class"]),g=()=>t.orientation??"horizontal";return A(H.Provider,{get value(){return{orientation:g()}},get children(){var c=W();return F(c,P({get class(){return B("flex h-full w-full",g()==="vertical"?"flex-col":"flex-row",t.class)},get"data-orientation"(){return g()}},m),!1,!0),M(c,()=>t.children),c}})}function ce(s){const[t,m]=E(s,["defaultSize","minSize","maxSize","locked","hidden","children","class","style"]),g=()=>{const l=T(t.defaultSize);return{...l!==void 0?{"flex-basis":l,"flex-grow":"0","flex-shrink":"0"}:{flex:"1 1 0%"},display:"grid","grid-template-rows":"minmax(0, 1fr)","grid-template-columns":"minmax(0, 1fr)","min-width":"0","min-height":"0"}},c=()=>{const l={},u=(d,$,n)=>{if(d==null||d==="")return;if(typeof d=="number"){l[n]=String(d);return}const r=d.trim();r.endsWith("px")?l[$]=String(parseFloat(r)):r.endsWith("%")?l[n]=String(parseFloat(r)):Number.isFinite(Number(r))&&(l[n]=r)};return u(t.minSize,"data-min-size","data-min-size-pct"),u(t.maxSize,"data-max-size","data-max-size-pct"),u(t.defaultSize,"data-default-size","data-default-size-pct"),l};return(()=>{var l=W();return F(l,P({get class(){return B("overflow-hidden",t.class)},get style(){return{...g(),...typeof t.style=="object"?t.style:{}}},get"data-locked"(){return t.locked?"":void 0},get hidden(){return t.hidden||void 0}},c,m),!1,!0),M(l,()=>t.children),l})()}function b(s,t,m,g){const c=s.dataset[t==="min"?"minSize":"maxSize"];if(c!==void 0&&c!==""){const u=parseFloat(c);if(Number.isFinite(u))return u}const l=s.dataset[t==="min"?"minSizePct":"maxSizePct"];if(l!==void 0&&l!==""){const u=parseFloat(l);if(Number.isFinite(u))return u/100*m}return g}function ue(s){const[t,m]=E(s,["withHandle","onPanelResize","class","keyboardStep","static","orientation"]),g=ee(H),c=()=>t.orientation??g?.orientation??"horizontal",[l,u]=D(!1),d=()=>!!t.static;let $=0,n=null,r=null,w=0,k=0;const p=()=>c()==="horizontal",f=()=>p()?"width":"height",I=e=>{if(d())return;const i=e.currentTarget;n=i.previousElementSibling,r=i.nextElementSibling,!(!n||!r)&&(e.preventDefault(),u(!0),i.setPointerCapture(e.pointerId),$=p()?e.clientX:e.clientY,w=n.getBoundingClientRect()[f()],k=r.getBoundingClientRect()[f()])},X=e=>{if(!l()||!n||!r)return;const i=(p()?e.clientX:e.clientY)-$;R(i)};function R(e){var i;if(!n||!r)return!1;const o=n.parentElement,a=o?o.getBoundingClientRect()[f()]:0,v=b(n,"min",a,0),z=b(n,"max",a,999999),y=b(r,"min",a,0),S=b(r,"max",a,999999);let x=-1/0,h=1/0;if(x=Math.max(x,v-w),h=Math.min(h,z-w),x=Math.max(x,k-S),h=Math.min(h,k-y),x>h)return!1;const C=Math.max(x,Math.min(h,e)),V=w+C,Z=k-C;return n.style.flexBasis=`${V}px`,n.style.flexGrow="0",n.style.flexShrink="0",r.style.flexBasis=`${Z}px`,r.style.flexGrow="0",r.style.flexShrink="0",(i=t.onPanelResize)==null||i.call(t,C),!0}function G(){if(!n||!r)return;const e=n.parentElement;if(!e)return;const i=e.getBoundingClientRect()[f()];if(i<=0)return;const o=n.getBoundingClientRect()[f()]/i*100,a=r.getBoundingClientRect()[f()]/i*100;n.style.flexBasis=`${o}%`,r.style.flexBasis=`${a}%`}const Y=()=>{G(),u(!1),n=null,r=null};function j(e){const i=e.dataset.defaultSize,o=e.dataset.defaultSizePct;i!==void 0&&i!==""?(e.style.flexBasis=`${i}px`,e.style.flexGrow="0",e.style.flexShrink="0"):o!==void 0&&o!==""?(e.style.flexBasis=`${o}%`,e.style.flexGrow="0",e.style.flexShrink="0"):(e.style.flexBasis="",e.style.flexGrow="1",e.style.flexShrink="1")}const L=e=>{var i;if(d())return;const o=e.currentTarget,a=o.previousElementSibling,v=o.nextElementSibling;!a||!v||(e.preventDefault(),j(a),j(v),(i=t.onPanelResize)==null||i.call(t,0))},U=D(50),[q,J]=U;function K(e){return n=e.previousElementSibling,r=e.nextElementSibling,!n||!r?!1:(w=n.getBoundingClientRect()[f()],k=r.getBoundingClientRect()[f()],!0)}function O(){if(!n)return;const e=n.parentElement;if(!e)return;const i=e.getBoundingClientRect()[f()];if(i<=0)return;const o=n.getBoundingClientRect()[f()]/i*100;J(Math.round(o))}const Q=e=>{if(d())return;const i=e.currentTarget,o=t.keyboardStep??16,a=p(),v=a?"ArrowLeft":"ArrowUp",z=a?"ArrowRight":"ArrowDown";let y=null;if(e.key===v)y=-o;else if(e.key===z)y=o;else if(e.key==="Home")y="min";else if(e.key==="End")y="max";else return;if(e.preventDefault(),!!K(i)){if(y==="min"){const S=n.parentElement,x=S?S.getBoundingClientRect()[f()]:0,h=b(n,"min",x,0);R(h-w)}else if(y==="max"){const S=n.parentElement,x=S?S.getBoundingClientRect()[f()]:0,h=b(n,"max",x,999999);R(h-w)}else R(y);O(),G(),n=null,r=null}};return(()=>{var e=ae();return e.$$keydown=Q,e.$$dblclick=L,e.$$pointerup=Y,e.$$pointermove=X,e.$$pointerdown=I,F(e,P({get class(){return B("relative flex items-center justify-center",t.class)},get style(){return{cursor:d()?"default":p()?"col-resize":"row-resize",[p()?"width":"height"]:"8px",background:l()?"var(--color-muted-foreground, #98989f)":"transparent",opacity:l()?"0.3":"1"}},get tabIndex(){return d()?void 0:0},get"data-orientation"(){return c()},get"data-static"(){return d()?"":void 0},get"aria-orientation"(){return p()?"vertical":"horizontal"},get"aria-valuenow"(){return q()}},m),!1,!0),M(e,A(re,{get when(){return t.withHandle},get children(){var i=oe(),o=i.firstChild;return te(a=>{var v=B("z-10 flex items-center justify-center",p()?"h-6 w-3 flex-col":"h-3 w-6 flex-row"),z=B("text-muted-foreground/40",p()?"h-3 w-2":"h-2 w-3 rotate-90");return v!==a.e&&ne(i,a.e=v),z!==a.t&&ie(o,"class",a.t=z),a},{e:void 0,t:void 0}),i}})),e})()}_(["pointerdown","pointermove","pointerup","dblclick","keydown"]);export{se as R,ce as a,ue as b,T as n};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as r}from"./Icon-D_Zmwmwh.js";import{c as a,m}from"./cn-Dogu6PbV.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 +0,0 @@
|
|
|
1
|
-
import{$ as u,L as z,N as P,O as w,a as F}from"./cn-Dogu6PbV.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,L)}),!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]=F(o,{equals:!1,internal:!0});return e.$=c,t[r]=e}function K(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 L={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:K};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 M(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 N(...[t,r]){const o=a(t||{}),e=Array.isArray(o),c=v(o);function n(...i){z(()=>{e&&i.length===1?M(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 W(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{N as c,W as p,a as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as o,c as s,m as i,j as u,D as c}from"./cn-Dogu6PbV.js";function d(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 s(c,i({get component(){return n()},get class(){return u("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{d as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as o,s as a,u,f as l,m as f,j as g,t as c}from"./cn-Dogu6PbV.js";function h(i={}){let e;function s(){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",s),requestAnimationFrame(s),o(()=>t.removeEventListener("input",s))}return{ref:n,resize:s}}var m=c("<textarea rows=1>");function x(i){const[e,s]=a(i,["class","maxHeight","autoResize"]),{ref:n}=h({maxHeight:e.maxHeight});return(()=>{var t=m(),r=e.autoResize!==!1?n:void 0;return typeof r=="function"&&u(r,t),l(t,f({get class(){return g("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)}},s),!1,!1),t})()}export{x as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as m}from"./Icon-D_Zmwmwh.js";import{c as e,m as o}from"./cn-Dogu6PbV.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 +0,0 @@
|
|
|
1
|
-
import{R as m,a as f}from"./cn-Dogu6PbV.js";import{c as p,p as v}from"./store-C6rIooZz.js";let e={};function g(s){e.stack&&s.setAttribute("stack",e.stack),e.position&&s.setAttribute("position",e.position),e.max!==void 0&&s.setAttribute("max",String(e.max))}const b=5e3,x=7e3,{toasts:a,setToasts:o,mounted:R,setMounted:k}=m(()=>{const[s,t]=p([]),[i,n]=f(!1);return{toasts:s,setToasts:t,mounted:i,setMounted:n}});let u=0;function M(){return u+=1,`toast-${u}`}function h(s){const t=s.duration??b;return t===0?0:s.action?Math.max(t,x):t}const r=new Map;function A(s=null){if(typeof document>"u")return;const t=r.get(s);if(t&&t.isConnected)return t;const i=document.createElement("kai-toast-region");return document.body.appendChild(i),i.toasts=a,s&&(i.target=s),g(i),r.set(s,i),k(!0),i}function I(s){const t=a.findIndex(i=>i.id===s.id);t>=0?o(t,s):o(v(i=>{i.push(s)}))}function d(s){o(t=>t.filter(i=>i.id!==s))}function T(s){return{id:s,dismiss:()=>d(s),update:t=>{const i=a.findIndex(n=>n.id===s);i>=0&&o(i,n=>({...n,...t}))}}}function c(s,t,i){A(t?.target??null);const n=t?.id??M(),l={id:n,message:s,variant:t?.variant??i,action:t?.action,duration:t?.duration,dismissible:t?.dismissible,target:t?.target};return I(l),T(n)}const y=Object.assign((s,t)=>c(s,t,"neutral"),{success:(s,t)=>c(s,t,"success"),dismiss:d,clear:()=>o([])});export{h as r,y as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,m as c,s as M,a as V,i as n,j as z,S as l,F as B,n as P,h as p,k as E,t as o,G as g}from"./cn-Dogu6PbV.js";import{a as L,b as T,C as $}from"./collapsible-BiNwdOn6.js";import{B as D}from"./button-CKyYD9G4.js";import{c as F}from"./chevron-down-3SBiq8HF.js";import{I as h}from"./Icon-D_Zmwmwh.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"}]],J=t=>e(h,c(t,{name:"CircleCheckBig",iconNode:G})),R=J,X=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],A=t=>e(h,c(t,{name:"CircleX",iconNode:X})),H=A,K=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Q=t=>e(h,c(t,{name:"LoaderCircle",iconNode:K})),U=Q,W=[["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"}]],Y=t=>e(h,c(t,{name:"Settings",iconNode:W})),Z=Y,_=o('<span class="px-2 py-1 rounded-full text-xs font-medium">Processing'),tt=o('<span class="px-2 py-1 rounded-full text-xs font-medium">Ready'),et=o('<span class="px-2 py-1 rounded-full text-xs font-medium">Completed'),rt=o('<span class="px-2 py-1 rounded-full text-xs font-medium">Error'),at=o('<div><h4 class="text-muted-foreground mb-2 text-sm font-medium">Input</h4><div class="rounded bg-muted/50 p-2 font-mono text-sm">'),nt=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-muted/50 p-2 font-mono text-sm"><pre class=whitespace-pre-wrap>'),lt=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">'),ot=o('<div class="text-muted-foreground text-sm">Processing tool call...'),st=o('<div class="text-muted-foreground pt-2 text-xs"><span class=font-mono>Call ID: '),it=o('<div class="space-y-3 p-3">'),ut=o("<div>"),dt=o('<div class="flex items-center gap-2"><span class="font-mono text-sm font-medium">'),ct=o("<div class=mb-1><span class=text-muted-foreground>:</span> <span>");function S(t){return t===null?"null":t===void 0?"undefined":typeof t=="string"?t:typeof t=="object"?JSON.stringify(t,null,2):String(t)}function pt(t){return[e(l,{get when(){return t.state==="input-streaming"},get children(){return e(U,{class:"size-4 animate-spin text-blue-500"})}}),e(l,{get when(){return t.state==="input-available"},get children(){return e(Z,{class:"size-4 text-orange-500"})}}),e(l,{get when(){return t.state==="output-available"},get children(){return e(R,{class:"size-4 text-green-500"})}}),e(l,{get when(){return t.state==="output-error"},get children(){return e(H,{class:"size-4 text-red-500"})}})]}const mt={"input-streaming":"var(--color-tool-blue)","input-available":"var(--color-tool-amber)","output-available":"var(--color-tool-green)","output-error":"var(--color-tool-red)"},gt={"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(t){return{color:mt[t],background:`color-mix(in oklab, ${gt[t]} 15%, transparent)`}}function ht(t){return[e(l,{get when(){return t.state==="input-streaming"},get children(){var r=_();return p(i=>g(r,f("input-streaming"),i)),r}}),e(l,{get when(){return t.state==="input-available"},get children(){var r=tt();return p(i=>g(r,f("input-available"),i)),r}}),e(l,{get when(){return t.state==="output-available"},get children(){var r=et();return p(i=>g(r,f("output-available"),i)),r}}),e(l,{get when(){return t.state==="output-error"},get children(){var r=rt();return p(i=>g(r,f("output-error"),i)),r}})]}function ft(t){const[r,i]=M(t,["toolPart","defaultOpen","class"]),[w,O]=V(r.defaultOpen??!1),m=()=>r.toolPart.state,v=()=>r.toolPart.input,C=()=>r.toolPart.output;return(()=>{var x=ut();return n(x,e($,{get open(){return w()},onOpenChange:O,get children(){return[e(L,{as:u=>e(D,c({variant:"ghost",class:"h-auto w-full justify-between rounded-b-none px-3 py-2 font-normal"},u,{get children(){return[(()=>{var a=dt(),s=a.firstChild;return n(a,e(pt,{get state(){return m()}}),s),n(s,()=>r.toolPart.type),n(a,e(ht,{get state(){return m()}}),null),a})(),e(F,{get class(){return z("size-4 transition-transform",w()&&"rotate-180")}})]}}))}),e(T,{class:"data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down overflow-hidden",get children(){var u=it();return n(u,e(l,{get when(){return P(()=>!!v())()&&Object.keys(v()).length>0},get children(){var a=at(),s=a.firstChild,d=s.nextSibling;return n(d,e(B,{get each(){return Object.entries(v())},children:([b,j])=>(()=>{var k=ct(),y=k.firstChild,I=y.firstChild,N=y.nextSibling,q=N.nextSibling;return n(y,b,I),n(q,()=>S(j)),k})()})),a}}),null),n(u,e(l,{get when(){return C()},get children(){var a=nt(),s=a.firstChild,d=s.nextSibling,b=d.firstChild;return n(b,()=>S(C())),a}}),null),n(u,e(l,{get when(){return P(()=>m()==="output-error")()&&r.toolPart.errorText},get children(){var a=lt(),s=a.firstChild,d=s.nextSibling;return n(d,()=>r.toolPart.errorText),a}}),null),n(u,e(l,{get when(){return m()==="input-streaming"},get children(){return ot()}}),null),n(u,e(l,{get when(){return r.toolPart.toolCallId},get children(){var a=st(),s=a.firstChild;return s.firstChild,n(s,()=>r.toolPart.toolCallId,null),a}}),null),u}})]}})),p(()=>E(x,z("mt-3 overflow-hidden rounded-lg bg-muted/30",r.class))),x})()}export{ft as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as E,x as I,y as L,a as n,p as M,c as m,P as R,u as S,g as v,i as q,h as B,j as G,A as g,k as H,S as J,t as K}from"./cn-Dogu6PbV.js";import{c as N,u as Q,a as U,A as V}from"./overlay-DydXYMQW.js";var W=K("<div role=tooltip style=position:fixed;pointer-events:none>");function X(C){const[o]=E(C,["content","children","class","openDelay","dismissOnClick"]),O=I(),f=L(),[i,r]=n(!1),[d,A]=n(),[x,F]=n();let a;const[$,c]=n(!1),[j,l]=n(!1),h=(e=0)=>{clearTimeout(a),e?a=window.setTimeout(()=>r(!0),e):r(!0)},u=()=>{clearTimeout(a),r(!1)},y=()=>{!$()&&!j()&&u()},b=()=>{o.dismissOnClick!==!1&&(c(!1),l(!1),u())};M(()=>clearTimeout(a));const s=N(i),p=Q(d,x,{placement:"top",gutter:6});return U({enabled:i,onDismiss:u,refs:()=>[d(),x()]}),[m(V,{as:"span",ref:A,get"aria-describedby"(){return i()?f:void 0},onPointerEnter:()=>{c(!0),h(o.openDelay??600)},onPointerLeave:()=>{c(!1),y()},onPointerDown:b,onClick:b,onFocusIn:()=>{l(!0),h()},onFocusOut:e=>{const t=d();t&&t.contains(e.relatedTarget)||(l(!1),y())},get children(){return o.children}}),m(J,{get when(){return s.present()},get children(){return m(R,{get mount(){return O.portalMount()},get children(){var e=W();return S(t=>{F(t),s.setRef(t)},e),v(e,"id",f),q(e,()=>o.content),B(t=>{var T=s.state()==="open"?"":void 0,w=s.state()==="closed"?"":void 0,k=`${p.pos().x}px`,D=`${p.pos().y}px`,P=p.hidden()?"hidden":"visible",z=G("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",o.class);return T!==t.e&&v(e,"data-expanded",t.e=T),w!==t.t&&v(e,"data-closed",t.t=w),k!==t.a&&g(e,"left",t.a=k),D!==t.o&&g(e,"top",t.o=D),P!==t.i&&g(e,"visibility",t.i=P),z!==t.n&&H(e,t.n=z),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),e}})}})]}export{X as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as e}from"./Icon-D_Zmwmwh.js";import{c as p,m as o}from"./cn-Dogu6PbV.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 +0,0 @@
|
|
|
1
|
-
import{c as o,m,i as p,S as f,j as g,h,g as v,t as x,w as C,v as b,a as k,b as w,o as $,e as i}from"./cn-Dogu6PbV.js";import{B as y}from"./button-CKyYD9G4.js";import{C as R}from"./card-Cjho-PYk.js";import{I as S}from"./Icon-D_Zmwmwh.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"}]],D=s=>o(S,m(s,{name:"RotateCcw",iconNode:L})),M=D,T=x('<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 j={confirm:"Proposed",choice:"Choose",form:"Form",tasks:"Tasks"};function q(s){const t=j[s];return t?`${t}:`:s.length===0?"Card:":`${s.charAt(0).toUpperCase()}${s.slice(1)}:`}function z(s){const t=()=>q(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=T(),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 g("ml-auto gap-1.5")},onClick:()=>s.onReopen(),get children(){return[o(M,{size:14,"aria-hidden":"true"}),o(f,{get when(){return e()},get children(){return e()}})]}}),null),h(()=>v(n,"aria-label",c())),n}})}const A=b();function I(){return C(A)}const N=new Set(["action","submit","expired"]);function P(s){const[t,a]=k(void 0);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&&N.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{z as D,P as a,I as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as e}from"./Icon-D_Zmwmwh.js";import{c as m,m as o}from"./cn-Dogu6PbV.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 +0,0 @@
|
|
|
1
|
-
import{I as m}from"./Icon-D_Zmwmwh.js";import{c as o,m as r}from"./cn-Dogu6PbV.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};
|
package/dist/kitn-chat.es.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as s,B as a,q as i,v as o}from"./register-JyTglR6m.js";export{s as configureCodeHighlighting,a as configureToasts,i as isCodeHighlightingEnabled,o as toast};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const un={bash:()=>import("./bash-InADTalH.js"),javascript:()=>import("./javascript-C25yR2R2.js"),typescript:()=>import("./typescript-RycA9KXf.js"),tsx:()=>import("./tsx-B8rCNbgL.js"),html:()=>import("./html-CPZ3oZQ7.js"),css:()=>import("./css-M7EaDHN_.js"),json:()=>import("./json-DxJze_jm.js"),vue:()=>import("./vue-BmIZj4XD.js"),svelte:()=>import("./svelte--5p79yCD.js")},ln={"github-dark-dimmed":()=>import("./github-dark-dimmed-DUshB20C.js"),"github-light":()=>import("./github-light-JYsPkUQd.js")},cn={js:"javascript",ts:"typescript",jsx:"tsx",sh:"bash",shell:"bash"},qt="github-dark-dimmed";let gt=!0,yt={...un},vt={...ln},bt={...cn},wt=null;const $t=new Set,Mt=new Set;function an(){return wt||(wt=(async()=>{const[{createHighlighterCore:t},{createJavaScriptRegexEngine:n}]=await Promise.all([import("./core-AYMC6_lb.js"),import("./engine-javascript-vq0WuIJl.js")]);return t({themes:[],langs:[],engine:n()})})()),wt}function Dt(t){return bt[t]??t}async function fn(t,n){const e=Dt(n);if($t.has(e))return!0;const r=yt[e];return r?(await t.loadLanguage(r()),$t.add(e),!0):!1}async function Et(t,n){if(Mt.has(n))return!0;const e=vt[n];return e?(await t.loadTheme(e()),Mt.add(n),!0):!1}function dn(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function tt(t){return`<pre><code>${dn(t)}</code></pre>`}async function pn(t,n,e){if(!gt||!t)return tt(t);try{const r=await an();if(!await fn(r,n))return tt(t);const o=await Et(r,e)?e:await Et(r,qt)?qt:null;return o?r.codeToHtml(t,{lang:Dt(n),theme:o}):tt(t)}catch{return tt(t)}}function hn(t){t.enabled!==void 0&&(gt=t.enabled),t.languages&&(yt={...yt,...t.languages}),t.themes&&(vt={...vt,...t.themes}),t.aliases&&(bt={...bt,...t.aliases})}function gn(){return gt}const ue=!1,yn=(t,n)=>t===n,P=Symbol("solid-proxy"),Ct=typeof Proxy=="function",L=Symbol("solid-track"),nt={equals:yn};let U=null,Ft=Rt;const $=1,et=2,Ht={owned:null,cleanups:null,context:null,owner:null},mt={};var f=null;let Ot=null,ie=null,p=null,b=null,S=null,rt=0;function H(t,n){const e=p,r=f,o=t.length===0,u=n===void 0?r:n,s=o?Ht:{owned:null,cleanups:null,context:u?u.context:null,owner:u},i=o?t:()=>t(()=>w(()=>G(s)));f=s,p=null;try{return E(i,!0)}finally{p=e,f=r}}function _(t,n){n=n?Object.assign({},nt,n):nt;const e={value:t,observers:null,observerSlots:null,comparator:n.equals||void 0},r=o=>(typeof o=="function"&&(o=o(e.value)),Nt(e,o));return[Kt.bind(e),r]}function vn(t,n,e){const r=W(t,n,!0,$);I(r)}function Tt(t,n,e){const r=W(t,n,!1,$);I(r)}function Vt(t,n,e){Ft=$n;const r=W(t,n,!1,$);(!e||!e.render)&&(r.user=!0),S?S.push(r):I(r)}function O(t,n,e){e=e?Object.assign({},nt,e):nt;const r=W(t,n,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=e.equals||void 0,I(r),Kt.bind(r)}function bn(t){return t&&typeof t=="object"&&"then"in t}function wn(t,n,e){let r,o,u;typeof n=="function"?(r=t,o=n,u={}):(r=!0,o=t,u=n||{});let s=null,i=mt,l=!1,a="initialValue"in u,d=typeof r=="function"&&O(r);const c=new Set,[g,A]=(u.storage||_)(u.initialValue),[x,D]=_(void 0),[R,z]=_(void 0,{equals:!1}),[j,k]=_(a?"ready":"unresolved");function y(v,h,q,m){return s===v&&(s=null,m!==void 0&&(a=!0),(v===i||h===i)&&u.onHydrated&&queueMicrotask(()=>u.onHydrated(m,{value:h})),i=mt,C(h,q)),h}function C(v,h){E(()=>{h===void 0&&A(()=>v),k(h!==void 0?"errored":a?"ready":"unresolved"),D(h);for(const q of c.keys())q.decrement();c.clear()},!1)}function B(){const v=Sn,h=g(),q=x();if(q!==void 0&&!s)throw q;return p&&p.user,h}function ht(v=!0){if(v!==!1&&l)return;l=!1;const h=d?d():r;if(h==null||h===!1){y(s,w(g));return}let q;const m=i!==mt?i:w(()=>{try{return o(h,{value:g(),refetching:v})}catch(J){q=J}});if(q!==void 0){y(s,void 0,it(q),h);return}else if(!bn(m))return y(s,m,void 0,h),m;return s=m,"v"in m?(m.s===1?y(s,m.v,void 0,h):y(s,void 0,it(m.v),h),m):(l=!0,queueMicrotask(()=>l=!1),E(()=>{k(a?"refreshing":"pending"),z()},!1),m.then(J=>y(m,J,void 0,h),J=>y(m,void 0,it(J),h)))}Object.defineProperties(B,{state:{get:()=>j()},error:{get:()=>x()},loading:{get(){const v=j();return v==="pending"||v==="refreshing"}},latest:{get(){if(!a)return B();const v=x();if(v&&!s)throw v;return g()}}});let _t=f;return d?vn(()=>(_t=f,ht(!1))):ht(!1),[B,{refetch:v=>zt(_t,()=>ht(v)),mutate:A}]}function mn(t){return E(t,!1)}function w(t){if(p===null)return t();const n=p;p=null;try{return t()}finally{p=n}}function On(t,n,e){const r=Array.isArray(t);let o,u=e&&e.defer;return s=>{let i;if(r){i=Array(t.length);for(let a=0;a<t.length;a++)i[a]=t[a]()}else i=t();if(u)return u=!1,s;const l=w(()=>n(i,o,s));return o=i,l}}function An(t){Vt(()=>w(t))}function ot(t){return f===null||(f.cleanups===null?f.cleanups=[t]:f.cleanups.push(t)),t}function jn(t,n){U||(U=Symbol("error")),f=W(void 0,void 0,!0),f.context={...f.context,[U]:[n]};try{return t()}catch(e){Q(e)}finally{f=f.owner}}function At(){return p}function kn(){return f}function zt(t,n){const e=f,r=p;f=t,p=null;try{return E(n,!0)}catch(o){Q(o)}finally{f=e,p=r}}const[le,ce]=_(!1);function Pn(t,n){const e=Symbol("context");return{id:e,Provider:Mn(e),defaultValue:t}}function xn(t){let n;return f&&f.context&&(n=f.context[t.id])!==void 0?n:t.defaultValue}function It(t){const n=O(t),e=O(()=>jt(n()));return e.toArray=()=>{const r=e();return Array.isArray(r)?r:r!=null?[r]:[]},e}let Sn;function Kt(){if(this.sources&&this.state)if(this.state===$)I(this);else{const t=b;b=null,E(()=>ut(this),!1),b=t}if(p){const t=this.observers;if(!t||t[t.length-1]!==p){const n=t?t.length:0;p.sources?(p.sources.push(this),p.sourceSlots.push(n)):(p.sources=[this],p.sourceSlots=[n]),t?(t.push(p),this.observerSlots.push(p.sources.length-1)):(this.observers=[p],this.observerSlots=[p.sources.length-1])}}return this.value}function Nt(t,n,e){let r=t.value;return(!t.comparator||!t.comparator(r,n))&&(t.value=n,t.observers&&t.observers.length&&E(()=>{for(let o=0;o<t.observers.length;o+=1){const u=t.observers[o],s=Ot&&Ot.running;s&&Ot.disposed.has(u),(s?!u.tState:!u.state)&&(u.pure?b.push(u):S.push(u),u.observers&&Bt(u)),s||(u.state=$)}if(b.length>1e6)throw b=[],new Error},!1)),n}function I(t){if(!t.fn)return;G(t);const n=rt;_n(t,t.value,n)}function _n(t,n,e){let r;const o=f,u=p;p=f=t;try{r=t.fn(n)}catch(s){return t.pure&&(t.state=$,t.owned&&t.owned.forEach(G),t.owned=null),t.updatedAt=e+1,Q(s)}finally{p=u,f=o}(!t.updatedAt||t.updatedAt<=e)&&(t.updatedAt!=null&&"observers"in t?Nt(t,r):t.value=r,t.updatedAt=e)}function W(t,n,e,r=$,o){const u={fn:t,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:n,owner:f,context:f?f.context:null,pure:e};return f===null||f!==Ht&&(f.owned?f.owned.push(u):f.owned=[u]),u}function st(t){if(t.state===0)return;if(t.state===et)return ut(t);if(t.suspense&&w(t.suspense.inFallback))return t.suspense.effects.push(t);const n=[t];for(;(t=t.owner)&&(!t.updatedAt||t.updatedAt<rt);)t.state&&n.push(t);for(let e=n.length-1;e>=0;e--)if(t=n[e],t.state===$)I(t);else if(t.state===et){const r=b;b=null,E(()=>ut(t,n[0]),!1),b=r}}function E(t,n){if(b)return t();let e=!1;n||(b=[]),S?e=!0:S=[],rt++;try{const r=t();return qn(e),r}catch(r){e||(S=null),b=null,Q(r)}}function qn(t){if(b&&(Rt(b),b=null),t)return;const n=S;S=null,n.length&&E(()=>Ft(n),!1)}function Rt(t){for(let n=0;n<t.length;n++)st(t[n])}function $n(t){let n,e=0;for(n=0;n<t.length;n++){const r=t[n];r.user?t[e++]=r:st(r)}for(n=0;n<e;n++)st(t[n])}function ut(t,n){t.state=0;for(let e=0;e<t.sources.length;e+=1){const r=t.sources[e];if(r.sources){const o=r.state;o===$?r!==n&&(!r.updatedAt||r.updatedAt<rt)&&st(r):o===et&&ut(r,n)}}}function Bt(t){for(let n=0;n<t.observers.length;n+=1){const e=t.observers[n];e.state||(e.state=et,e.pure?b.push(e):S.push(e),e.observers&&Bt(e))}}function G(t){let n;if(t.sources)for(;t.sources.length;){const e=t.sources.pop(),r=t.sourceSlots.pop(),o=e.observers;if(o&&o.length){const u=o.pop(),s=e.observerSlots.pop();r<o.length&&(u.sourceSlots[s]=r,o[r]=u,e.observerSlots[r]=s)}}if(t.tOwned){for(n=t.tOwned.length-1;n>=0;n--)G(t.tOwned[n]);delete t.tOwned}if(t.owned){for(n=t.owned.length-1;n>=0;n--)G(t.owned[n]);t.owned=null}if(t.cleanups){for(n=t.cleanups.length-1;n>=0;n--)t.cleanups[n]();t.cleanups=null}t.state=0}function it(t){return t instanceof Error?t:new Error(typeof t=="string"?t:"Unknown error",{cause:t})}function Jt(t,n,e){try{for(const r of n)r(t)}catch(r){Q(r,e&&e.owner||null)}}function Q(t,n=f){const e=U&&n&&n.context&&n.context[U],r=it(t);if(!e)throw r;S?S.push({fn(){Jt(r,e,n)},state:$}):Jt(r,e,n)}function jt(t){if(typeof t=="function"&&!t.length)return jt(t());if(Array.isArray(t)){const n=[];for(let e=0;e<t.length;e++){const r=jt(t[e]);if(Array.isArray(r))if(r.length<32768)n.push.apply(n,r);else for(let o=0;o<r.length;o++)n.push(r[o]);else n.push(r)}return n}return t}function Mn(t,n){return function(e){let r;return Tt(()=>r=w(()=>(f.context={...f.context,[t]:e.value},It(()=>e.children))),void 0),r}}const kt=Symbol("fallback");function lt(t){for(let n=0;n<t.length;n++)t[n]()}function Dn(t,n,e={}){let r=[],o=[],u=[],s=0,i=n.length>1?[]:null;return ot(()=>lt(u)),()=>{let l=t()||[],a=l.length,d,c;return l[L],w(()=>{let A,x,D,R,z,j,k,y,C;if(a===0)s!==0&&(lt(u),u=[],r=[],o=[],s=0,i&&(i=[])),e.fallback&&(r=[kt],o[0]=H(B=>(u[0]=B,e.fallback())),s=1);else if(s===0){for(o=new Array(a),c=0;c<a;c++)r[c]=l[c],o[c]=H(g);s=a}else{for(D=new Array(a),R=new Array(a),i&&(z=new Array(a)),j=0,k=Math.min(s,a);j<k&&r[j]===l[j];j++);for(k=s-1,y=a-1;k>=j&&y>=j&&r[k]===l[y];k--,y--)D[y]=o[k],R[y]=u[k],i&&(z[y]=i[k]);for(A=new Map,x=new Array(y+1),c=y;c>=j;c--)C=l[c],d=A.get(C),x[c]=d===void 0?-1:d,A.set(C,c);for(d=j;d<=k;d++)C=r[d],c=A.get(C),c!==void 0&&c!==-1?(D[c]=o[d],R[c]=u[d],i&&(z[c]=i[d]),c=x[c],A.set(C,c)):u[d]();for(c=j;c<a;c++)c in D?(o[c]=D[c],u[c]=R[c],i&&(i[c]=z[c],i[c](c))):o[c]=H(g);o=o.slice(0,s=a),r=l.slice(0)}return o});function g(A){if(u[c]=A,i){const[x,D]=_(c);return i[c]=D,n(l[c],x)}return n(l[c])}}}function En(t,n,e={}){let r=[],o=[],u=[],s=[],i=0,l;return ot(()=>lt(u)),()=>{const a=t()||[],d=a.length;return a[L],w(()=>{if(d===0)return i!==0&&(lt(u),u=[],r=[],o=[],i=0,s=[]),e.fallback&&(r=[kt],o[0]=H(g=>(u[0]=g,e.fallback())),i=1),o;for(r[0]===kt&&(u[0](),u=[],r=[],o=[],i=0),l=0;l<d;l++)l<r.length&&r[l]!==a[l]?s[l](()=>a[l]):l>=r.length&&(o[l]=H(c));for(;l<r.length;l++)u[l]();return i=s.length=u.length=d,r=a.slice(0),o=o.slice(0,i)});function c(g){u[l]=g;const[A,x]=_(a[l]);return s[l]=x,n(A,l)}}}function Cn(t,n){return w(()=>t(n||{}))}function ct(){return!0}const Pt={get(t,n,e){return n===P?e:t.get(n)},has(t,n){return n===P?!0:t.has(n)},set:ct,deleteProperty:ct,getOwnPropertyDescriptor(t,n){return{configurable:!0,enumerable:!0,get(){return t.get(n)},set:ct,deleteProperty:ct}},ownKeys(t){return t.keys()}};function xt(t){return(t=typeof t=="function"?t():t)?t:{}}function Fn(){for(let t=0,n=this.length;t<n;++t){const e=this[t]();if(e!==void 0)return e}}function Hn(...t){let n=!1;for(let s=0;s<t.length;s++){const i=t[s];n=n||!!i&&P in i,t[s]=typeof i=="function"?(n=!0,O(i)):i}if(Ct&&n)return new Proxy({get(s){for(let i=t.length-1;i>=0;i--){const l=xt(t[i])[s];if(l!==void 0)return l}},has(s){for(let i=t.length-1;i>=0;i--)if(s in xt(t[i]))return!0;return!1},keys(){const s=[];for(let i=0;i<t.length;i++)s.push(...Object.keys(xt(t[i])));return[...new Set(s)]}},Pt);const e={},r=Object.create(null);for(let s=t.length-1;s>=0;s--){const i=t[s];if(!i)continue;const l=Object.getOwnPropertyNames(i);for(let a=l.length-1;a>=0;a--){const d=l[a];if(d==="__proto__"||d==="constructor")continue;const c=Object.getOwnPropertyDescriptor(i,d);if(!r[d])r[d]=c.get?{enumerable:!0,configurable:!0,get:Fn.bind(e[d]=[c.get.bind(i)])}:c.value!==void 0?c:void 0;else{const g=e[d];g&&(c.get?g.push(c.get.bind(i)):c.value!==void 0&&g.push(()=>c.value))}}}const o={},u=Object.keys(r);for(let s=u.length-1;s>=0;s--){const i=u[s],l=r[i];l&&l.get?Object.defineProperty(o,i,l):o[i]=l?l.value:void 0}return o}function Tn(t,...n){const e=n.length;if(Ct&&P in t){const o=e>1?n.flat():n[0],u=n.map(s=>new Proxy({get(i){return s.includes(i)?t[i]:void 0},has(i){return s.includes(i)&&i in t},keys(){return s.filter(i=>i in t)}},Pt));return u.push(new Proxy({get(s){return o.includes(s)?void 0:t[s]},has(s){return o.includes(s)?!1:s in t},keys(){return Object.keys(t).filter(s=>!o.includes(s))}},Pt)),u}const r=[];for(let o=0;o<=e;o++)r[o]={};for(const o of Object.getOwnPropertyNames(t)){let u=e;for(let i=0;i<n.length;i++)if(n[i].includes(o)){u=i;break}const s=Object.getOwnPropertyDescriptor(t,o);!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable?r[u][o]=s.value:Object.defineProperty(r[u],o,s)}return r}let Vn=0;function zn(){return`cl-${Vn++}`}const Lt=t=>`Stale read from <${t}>.`;function In(t){const n="fallback"in t&&{fallback:()=>t.fallback};return O(Dn(()=>t.each,t.children,n||void 0))}function Kn(t){const n="fallback"in t&&{fallback:()=>t.fallback};return O(En(()=>t.each,t.children,n||void 0))}function Nn(t){const n=t.keyed,e=O(()=>t.when,void 0,void 0),r=n?e:O(e,void 0,{equals:(o,u)=>!o==!u});return O(()=>{const o=r();if(o){const u=t.children;return typeof u=="function"&&u.length>0?w(()=>u(n?o:()=>{if(!w(r))throw Lt("Show");return e()})):u}return t.fallback},void 0,void 0)}function Rn(t){const n=It(()=>t.children),e=O(()=>{const r=n(),o=Array.isArray(r)?r:[r];let u=()=>{};for(let s=0;s<o.length;s++){const i=s,l=o[s],a=u,d=O(()=>a()?void 0:l.when,void 0,void 0),c=l.keyed?d:O(d,void 0,{equals:(g,A)=>!g==!A});u=()=>a()||(c()?[i,d,l]:void 0)}return u});return O(()=>{const r=e()();if(!r)return t.fallback;const[o,u,s]=r,i=s.children;return typeof i=="function"&&i.length>0?w(()=>i(s.keyed?u():()=>{var l;if(((l=w(e)())==null?void 0:l[0])!==o)throw Lt("Match");return u()})):i},void 0,void 0)}function Bn(t){return t}let at;function Jn(t){let n;const[e,r]=_(n,void 0);return at||(at=new Set),at.add(r),ot(()=>at.delete(r)),O(()=>{let o;if(o=e()){const u=t.fallback;return typeof u=="function"&&u.length?w(()=>u(o,()=>r())):u}return jn(()=>t.children,r)},void 0,void 0)}const ft=Symbol("store-raw"),T=Symbol("store-node"),M=Symbol("store-has"),Ut=Symbol("store-self");function Wt(t){let n=t[P];if(!n&&(Object.defineProperty(t,P,{value:n=new Proxy(t,Wn)}),!Array.isArray(t))){const e=Object.keys(t),r=Object.getOwnPropertyDescriptors(t),o=Object.getPrototypeOf(t),u=o!==null&&t!==null&&typeof t=="object"&&!Array.isArray(t)&&o!==Object.prototype;if(u){const s=Object.getOwnPropertyDescriptors(o);e.push(...Object.keys(s)),Object.assign(r,s)}for(let s=0,i=e.length;s<i;s++){const l=e[s];u&&l==="constructor"||r[l].get&&Object.defineProperty(t,l,{configurable:!0,enumerable:r[l].enumerable,get:r[l].get.bind(n)})}}return n}function K(t){let n;return t!=null&&typeof t=="object"&&(t[P]||!(n=Object.getPrototypeOf(t))||n===Object.prototype||Array.isArray(t))}function V(t,n=new Set){let e,r,o,u;if(e=t!=null&&t[ft])return e;if(!K(t)||n.has(t))return t;if(Array.isArray(t)){Object.isFrozen(t)?t=t.slice(0):n.add(t);for(let s=0,i=t.length;s<i;s++)o=t[s],(r=V(o,n))!==o&&(t[s]=r)}else{Object.isFrozen(t)?t=Object.assign({},t):n.add(t);const s=Object.keys(t),i=Object.getOwnPropertyDescriptors(t);for(let l=0,a=s.length;l<a;l++)u=s[l],!i[u].get&&(o=t[u],(r=V(o,n))!==o&&(t[u]=r))}return t}function dt(t,n){let e=t[n];return e||Object.defineProperty(t,n,{value:e=Object.create(null)}),e}function X(t,n,e){if(t[n])return t[n];const[r,o]=_(e,{equals:!1,internal:!0});return r.$=o,t[n]=r}function Ln(t,n){const e=Reflect.getOwnPropertyDescriptor(t,n);return!e||e.get||!e.configurable||n===P||n===T||(delete e.value,delete e.writable,e.get=()=>t[P][n]),e}function Gt(t){At()&&X(dt(t,T),Ut)()}function Un(t){return Gt(t),Reflect.ownKeys(t)}const Wn={get(t,n,e){if(n===ft)return t;if(n===P)return e;if(n===L)return Gt(t),e;const r=dt(t,T),o=r[n];let u=o?o():t[n];if(n===T||n===M||n==="__proto__")return u;if(!o){const s=Object.getOwnPropertyDescriptor(t,n);At()&&(typeof u!="function"||t.hasOwnProperty(n))&&!(s&&s.get)&&(u=X(r,n,u)())}return K(u)?Wt(u):u},has(t,n){return n===ft||n===P||n===L||n===T||n===M||n==="__proto__"?!0:(At()&&X(dt(t,M),n)(),n in t)},set(){return!0},deleteProperty(){return!0},ownKeys:Un,getOwnPropertyDescriptor:Ln};function N(t,n,e,r=!1){if(n==="__proto__"||!r&&t[n]===e)return;const o=t[n],u=t.length;e===void 0?(delete t[n],t[M]&&t[M][n]&&o!==void 0&&t[M][n].$()):(t[n]=e,t[M]&&t[M][n]&&o===void 0&&t[M][n].$());let s=dt(t,T),i;if((i=X(s,n,o))&&i.$(()=>e),Array.isArray(t)&&t.length!==u){for(let l=t.length;l<u;l++)(i=s[l])&&i.$();(i=X(s,"length",u))&&i.$(t.length)}(i=s[Ut])&&i.$()}function Qt(t,n){const e=Object.keys(n);for(let r=0;r<e.length;r+=1){const o=e[r];Xt(o)||N(t,o,n[o])}}function Xt(t){return t==="__proto__"||t==="constructor"||t==="prototype"}function Gn(t,n){if(typeof n=="function"&&(n=n(t)),n=V(n),Array.isArray(n)){if(t===n)return;let e=0,r=n.length;for(;e<r;e++){const o=n[e];t[e]!==o&&N(t,e,o)}N(t,"length",r)}else Qt(t,n)}function Y(t,n,e=[]){let r,o=t;if(n.length>1){r=n.shift();const s=typeof r,i=Array.isArray(t);if(s==="string"&&(r==="__proto__"||n.length>1&&Xt(r)))return;if(Array.isArray(r)){for(let l=0;l<r.length;l++)Y(t,[r[l]].concat(n),e);return}else if(i&&s==="function"){for(let l=0;l<t.length;l++)r(t[l],l)&&Y(t,[l].concat(n),e);return}else if(i&&s==="object"){const{from:l=0,to:a=t.length-1,by:d=1}=r;for(let c=l;c<=a;c+=d)Y(t,[c].concat(n),e);return}else if(n.length>1){Y(t[r],n,[r].concat(e));return}o=t[r],e=[r].concat(e)}let u=n[0];typeof u=="function"&&(u=u(o,e),u===o)||r===void 0&&u==null||(u=V(u),r===void 0||K(o)&&K(u)&&!Array.isArray(u)?Qt(o,u):N(t,r,u))}function Yt(...[t,n]){const e=V(t||{}),r=Array.isArray(e),o=Wt(e);function u(...s){mn(()=>{r&&s.length===1?Gn(e,s[0]):Y(e,s)})}return[o,u]}const pt=new WeakMap,Zt={get(t,n){if(n===ft)return t;const e=t[n];if(n===P||n===L||n===T||n===M||n==="__proto__")return e;let r;return K(e)?pt.get(e)||(pt.set(e,r=new Proxy(e,Zt)),r):e},set(t,n,e){return N(t,n,V(e)),!0},deleteProperty(t,n){return N(t,n,void 0,!0),!0}};function tn(t){return n=>{if(K(n)){let e;(e=pt.get(n))||pt.set(n,e=new Proxy(n,Zt)),t(e)}return n}}let F={};function nn(t){F.stack&&t.setAttribute("stack",F.stack),F.position&&t.setAttribute("position",F.position),F.max!==void 0&&t.setAttribute("max",String(F.max))}function Qn(t){F={...F,...t},!(typeof document>"u")&&document.querySelectorAll("kai-toast-region").forEach(n=>nn(n))}const Xn=5e3,Yn=7e3,{toasts:St,setToasts:Z,mounted:ae,setMounted:Zn}=H(()=>{const[t,n]=Yt([]),[e,r]=_(!1);return{toasts:t,setToasts:n,mounted:e,setMounted:r}});let en=0;function te(){return en+=1,`toast-${en}`}function ne(t){const n=t.duration??Xn;return n===0?0:t.action?Math.max(n,Yn):n}const rn=new Map;function ee(t=null){if(typeof document>"u")return;const n=rn.get(t);if(n&&n.isConnected)return n;const e=document.createElement("kai-toast-region");return document.body.appendChild(e),e.toasts=St,t&&(e.target=t),nn(e),rn.set(t,e),Zn(!0),e}function re(t){const n=St.findIndex(e=>e.id===t.id);n>=0?Z(n,t):Z(tn(e=>{e.push(t)}))}function on(t){Z(n=>n.filter(e=>e.id!==t))}function oe(t){return{id:t,dismiss:()=>on(t),update:n=>{const e=St.findIndex(r=>r.id===t);e>=0&&Z(e,r=>({...r,...n}))}}}function sn(t,n,e){ee(n?.target??null);const r=n?.id??te(),o={id:r,message:t,variant:n?.variant??e,action:n?.action,duration:n?.duration,dismissible:n?.dismissible,target:n?.target};return re(o),oe(r)}const se=Object.assign((t,n)=>sn(t,n,"neutral"),{success:(t,n)=>sn(t,n,"success"),dismiss:on,clear:()=>Z([])});typeof window<"u"&&typeof customElements<"u"&&import("./register-impl-C6wlSsts.js");export{hn as A,Qn as B,Jn as E,In as F,Kn as I,Bn as M,Nn as S,O as a,Vt as b,Tt as c,_ as d,H as e,Cn as f,kn as g,Pn as h,xn as i,An as j,zn as k,On as l,Hn as m,wn as n,ot as o,pn as p,gn as q,zt as r,Tn as s,Rn as t,w as u,se as v,ne as w,Yt as x,tn as y,V as z};
|