@8wave/ai-elements 0.125.0-beta.42 → 0.125.0-beta.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/README.md +9 -4
  2. package/dist/_chunks/Chart-1vt0m6l_.js +87 -0
  3. package/dist/_chunks/Chart-1vt0m6l_.js.map +1 -0
  4. package/dist/_chunks/{PkChart-CbtMRGWc.js → PkChart-CYFx_UDq.js} +741 -623
  5. package/dist/_chunks/PkChart-CYFx_UDq.js.map +1 -0
  6. package/dist/_chunks/PkFilePreview-DfYzaj3Y.js +1745 -0
  7. package/dist/_chunks/PkFilePreview-DfYzaj3Y.js.map +1 -0
  8. package/dist/_chunks/{PkFilePreviewDialog-bcTkTcYk.js → PkFilePreviewDialog-COkwyLq6.js} +2 -2
  9. package/dist/_chunks/{PkFilePreviewDialog-bcTkTcYk.js.map → PkFilePreviewDialog-COkwyLq6.js.map} +1 -1
  10. package/dist/_chunks/{PkImageEditorDialog-FpbyhV3t.js → PkImageEditorDialog-Ceas-HZA.js} +2 -2
  11. package/dist/_chunks/{PkImageEditorDialog-FpbyhV3t.js.map → PkImageEditorDialog-Ceas-HZA.js.map} +1 -1
  12. package/dist/_chunks/{PkSelectionActions-BbfVZY0R.js → PkSelectionActions-Dl3cKb7x.js} +2 -2
  13. package/dist/_chunks/PkSelectionActions-Dl3cKb7x.js.map +1 -0
  14. package/dist/_chunks/{PkStreamingMarkdown-COSOOhCg.js → PkStreamingMarkdown-DZvLHy2l.js} +2 -2
  15. package/dist/_chunks/{PkStreamingMarkdown-COSOOhCg.js.map → PkStreamingMarkdown-DZvLHy2l.js.map} +1 -1
  16. package/dist/_chunks/{PkToolChatFile-C_gS0X1j.js → PkToolChatFile-D4ukZ9g6.js} +3 -3
  17. package/dist/_chunks/{PkToolChatFile-C_gS0X1j.js.map → PkToolChatFile-D4ukZ9g6.js.map} +1 -1
  18. package/dist/_chunks/{PkToolShowArtifact-fpFtKrZo.js → PkToolShowArtifact-wIAxyXrL.js} +2 -2
  19. package/dist/_chunks/{PkToolShowArtifact-fpFtKrZo.js.map → PkToolShowArtifact-wIAxyXrL.js.map} +1 -1
  20. package/dist/_chunks/PkToolShowChart-D3E_xBJv.js +138 -0
  21. package/dist/_chunks/PkToolShowChart-D3E_xBJv.js.map +1 -0
  22. package/dist/_chunks/{PkToolShowContactForm-BAM772bm.js → PkToolShowContactForm-BhcM-Z6m.js} +2 -2
  23. package/dist/_chunks/{PkToolShowContactForm-BAM772bm.js.map → PkToolShowContactForm-BhcM-Z6m.js.map} +1 -1
  24. package/dist/_chunks/{PkToolShowForm-DJcL0bgw.js → PkToolShowForm-D6k7_QLF.js} +3 -3
  25. package/dist/_chunks/{PkToolShowForm-DJcL0bgw.js.map → PkToolShowForm-D6k7_QLF.js.map} +1 -1
  26. package/dist/_chunks/{PkToolShowSources-GeWAMHYC.js → PkToolShowSources-Cw1ofky2.js} +2 -2
  27. package/dist/_chunks/{PkToolShowSources-GeWAMHYC.js.map → PkToolShowSources-Cw1ofky2.js.map} +1 -1
  28. package/dist/_chunks/chartFormat-B1T7y-16.js +27 -0
  29. package/dist/_chunks/chartFormat-B1T7y-16.js.map +1 -0
  30. package/dist/_chunks/{excelNumberFormat-BhQjife9.js → excelNumberFormat-CcXF_wJK.js} +101 -88
  31. package/dist/_chunks/excelNumberFormat-CcXF_wJK.js.map +1 -0
  32. package/dist/_chunks/{utils-DMvy5QRR.js → utils-C2aFWWye.js} +132 -110
  33. package/dist/_chunks/utils-C2aFWWye.js.map +1 -0
  34. package/dist/ai-elements.es.js +2939 -2882
  35. package/dist/ai-elements.es.js.map +1 -1
  36. package/dist-vue/PkChatbot.js +1 -1
  37. package/dist-vue/PkChatbotEmptyState.js +1 -1
  38. package/dist-vue/PkChatbotInput.js +1 -1
  39. package/dist-vue/PkChatbotMessages.js +1 -1
  40. package/dist-vue/PkChatbotStepPayload.js +1 -1
  41. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  42. package/dist-vue/PkChatbotSteps.js +1 -1
  43. package/dist-vue/PkChatbotViewChat.js +1 -1
  44. package/dist-vue/PkChatbotViewConversations.js +1 -1
  45. package/dist-vue/_chunks/Chart-DsBNs5rS.js +87 -0
  46. package/dist-vue/_chunks/Chart-DsBNs5rS.js.map +1 -0
  47. package/dist-vue/_chunks/{PkChart-D-K7nc0g.js → PkChart-CrZqhEpp.js} +112 -74
  48. package/dist-vue/_chunks/PkChart-CrZqhEpp.js.map +1 -0
  49. package/dist-vue/_chunks/{PkChatbot-DVQ-Bb7n.js → PkChatbot-CBSe9MOB.js} +6 -6
  50. package/dist-vue/_chunks/{PkChatbot-DVQ-Bb7n.js.map → PkChatbot-CBSe9MOB.js.map} +1 -1
  51. package/dist-vue/_chunks/{PkChatbotEmptyState-OlgewA4_.js → PkChatbotEmptyState-DfyYZXHQ.js} +2 -2
  52. package/dist-vue/_chunks/{PkChatbotEmptyState-OlgewA4_.js.map → PkChatbotEmptyState-DfyYZXHQ.js.map} +1 -1
  53. package/dist-vue/_chunks/{PkChatbotInput-D_I0Gf_u.js → PkChatbotInput-CBalSveL.js} +4 -4
  54. package/dist-vue/_chunks/{PkChatbotInput-D_I0Gf_u.js.map → PkChatbotInput-CBalSveL.js.map} +1 -1
  55. package/dist-vue/_chunks/{PkChatbotMessages-CAXnEfXK.js → PkChatbotMessages-C2AUTqk4.js} +307 -307
  56. package/dist-vue/_chunks/{PkChatbotMessages-CAXnEfXK.js.map → PkChatbotMessages-C2AUTqk4.js.map} +1 -1
  57. package/dist-vue/_chunks/{PkChatbotStepPayload-EBri1L10.js → PkChatbotStepPayload-Bb3Y6kuL.js} +2 -2
  58. package/dist-vue/_chunks/{PkChatbotStepPayload-EBri1L10.js.map → PkChatbotStepPayload-Bb3Y6kuL.js.map} +1 -1
  59. package/dist-vue/_chunks/{PkChatbotStepToolDetail-DiQEa0UV.js → PkChatbotStepToolDetail-CwOxzYOe.js} +16 -16
  60. package/dist-vue/_chunks/{PkChatbotStepToolDetail-DiQEa0UV.js.map → PkChatbotStepToolDetail-CwOxzYOe.js.map} +1 -1
  61. package/dist-vue/_chunks/{PkChatbotSteps-BgLnv2J1.js → PkChatbotSteps-FduD9X9i.js} +38 -38
  62. package/dist-vue/_chunks/{PkChatbotSteps-BgLnv2J1.js.map → PkChatbotSteps-FduD9X9i.js.map} +1 -1
  63. package/dist-vue/_chunks/{PkChatbotViewChat-CmjD1IXf.js → PkChatbotViewChat-jl3ZbK7H.js} +22 -22
  64. package/dist-vue/_chunks/{PkChatbotViewChat-CmjD1IXf.js.map → PkChatbotViewChat-jl3ZbK7H.js.map} +1 -1
  65. package/dist-vue/_chunks/{PkChatbotViewConversations-CVZH5dXx.js → PkChatbotViewConversations-BtwTWqmM.js} +2 -2
  66. package/dist-vue/_chunks/{PkChatbotViewConversations-CVZH5dXx.js.map → PkChatbotViewConversations-BtwTWqmM.js.map} +1 -1
  67. package/dist-vue/_chunks/{PkFilePreview-k5gEl3n8.js → PkFilePreview-CRfDEYYo.js} +701 -624
  68. package/dist-vue/_chunks/PkFilePreview-CRfDEYYo.js.map +1 -0
  69. package/dist-vue/_chunks/{PkFilePreviewDialog-DUwZPErE.js → PkFilePreviewDialog-u-0rhuRx.js} +2 -2
  70. package/dist-vue/_chunks/{PkFilePreviewDialog-DUwZPErE.js.map → PkFilePreviewDialog-u-0rhuRx.js.map} +1 -1
  71. package/dist-vue/_chunks/{PkImageEditorDialog-DQPXePae.js → PkImageEditorDialog-CjMwpb-a.js} +2 -2
  72. package/dist-vue/_chunks/{PkImageEditorDialog-DQPXePae.js.map → PkImageEditorDialog-CjMwpb-a.js.map} +1 -1
  73. package/dist-vue/_chunks/{PkStreamingMarkdown-ZasabxE0.js → PkStreamingMarkdown-7Kl_VBH-.js} +2 -2
  74. package/dist-vue/_chunks/{PkStreamingMarkdown-ZasabxE0.js.map → PkStreamingMarkdown-7Kl_VBH-.js.map} +1 -1
  75. package/dist-vue/_chunks/{PkToolChatFile-CD26Q2xp.js → PkToolChatFile-DcNRCVXy.js} +3 -3
  76. package/dist-vue/_chunks/{PkToolChatFile-CD26Q2xp.js.map → PkToolChatFile-DcNRCVXy.js.map} +1 -1
  77. package/dist-vue/_chunks/{PkToolShowArtifact-BhVd_ZQ8.js → PkToolShowArtifact-C7CxCqVO.js} +2 -2
  78. package/dist-vue/_chunks/{PkToolShowArtifact-BhVd_ZQ8.js.map → PkToolShowArtifact-C7CxCqVO.js.map} +1 -1
  79. package/dist-vue/_chunks/PkToolShowChart-DULlrMjq.js +133 -0
  80. package/dist-vue/_chunks/PkToolShowChart-DULlrMjq.js.map +1 -0
  81. package/dist-vue/_chunks/{PkToolShowContactForm-CackCDGD.js → PkToolShowContactForm-472d-SAE.js} +2 -2
  82. package/dist-vue/_chunks/{PkToolShowContactForm-CackCDGD.js.map → PkToolShowContactForm-472d-SAE.js.map} +1 -1
  83. package/dist-vue/_chunks/{PkToolShowDiagram-CABPsFi8.js → PkToolShowDiagram-RrqVpOaX.js} +2 -2
  84. package/dist-vue/_chunks/{PkToolShowDiagram-CABPsFi8.js.map → PkToolShowDiagram-RrqVpOaX.js.map} +1 -1
  85. package/dist-vue/_chunks/{PkToolShowForm-BStbk4Iu.js → PkToolShowForm-CgyszDEI.js} +3 -3
  86. package/dist-vue/_chunks/{PkToolShowForm-BStbk4Iu.js.map → PkToolShowForm-CgyszDEI.js.map} +1 -1
  87. package/dist-vue/_chunks/{PkToolShowImageGallery-BeeHsdTp.js → PkToolShowImageGallery-LBx9JE6p.js} +2 -2
  88. package/dist-vue/_chunks/{PkToolShowImageGallery-BeeHsdTp.js.map → PkToolShowImageGallery-LBx9JE6p.js.map} +1 -1
  89. package/dist-vue/_chunks/{PkToolShowProductList-BfUiap9U.js → PkToolShowProductList-THiH4EzZ.js} +2 -2
  90. package/dist-vue/_chunks/{PkToolShowProductList-BfUiap9U.js.map → PkToolShowProductList-THiH4EzZ.js.map} +1 -1
  91. package/dist-vue/_chunks/{PkToolShowSources-CgEkcyRg.js → PkToolShowSources-CEqGXOOt.js} +2 -2
  92. package/dist-vue/_chunks/{PkToolShowSources-CgEkcyRg.js.map → PkToolShowSources-CEqGXOOt.js.map} +1 -1
  93. package/dist-vue/_chunks/{PkToolShowVideo-CqSRnDNC.js → PkToolShowVideo-8Gi3vOer.js} +2 -2
  94. package/dist-vue/_chunks/{PkToolShowVideo-CqSRnDNC.js.map → PkToolShowVideo-8Gi3vOer.js.map} +1 -1
  95. package/dist-vue/_chunks/{PkToolShowWebPages-B-qIS8qY.js → PkToolShowWebPages-xjUPdfOU.js} +2 -2
  96. package/dist-vue/_chunks/{PkToolShowWebPages-B-qIS8qY.js.map → PkToolShowWebPages-xjUPdfOU.js.map} +1 -1
  97. package/dist-vue/_chunks/chartFormat-B1T7y-16.js +27 -0
  98. package/dist-vue/_chunks/chartFormat-B1T7y-16.js.map +1 -0
  99. package/dist-vue/_chunks/{excelNumberFormat-C1sCQrOz.js → excelNumberFormat-BxRi0Y3e.js} +101 -88
  100. package/dist-vue/_chunks/excelNumberFormat-BxRi0Y3e.js.map +1 -0
  101. package/dist-vue/_chunks/{utils-KBB6SDPn.js → utils-VVbH-Liq.js} +30 -30
  102. package/dist-vue/_chunks/utils-VVbH-Liq.js.map +1 -0
  103. package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +6 -6
  104. package/dist-vue/apps/web-component/src/composables/useSelectionActions.d.ts +14 -4
  105. package/dist-vue/composables.js +9 -3
  106. package/dist-vue/composables.js.map +1 -1
  107. package/dist-vue/index.js +42 -42
  108. package/dist-vue/index.js.map +1 -1
  109. package/dist-vue/locales.js +6 -0
  110. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -6
  111. package/dist-vue/packages/components/src/chat/PkChart.d.ts +8 -0
  112. package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +1 -1
  113. package/dist-vue/packages/components/src/chat/PkFileChart.d.ts +14 -0
  114. package/dist-vue/packages/components/src/chat/PkSelectionActionIconPicker.d.ts +2 -2
  115. package/dist-vue/packages/components/src/chat/PkSelectionAnswerCard.d.ts +6 -0
  116. package/dist-vue/packages/components/src/chat/PkWordPreviewRuns.d.ts +4 -1
  117. package/dist-vue/packages/components/src/chat/selectionActionEdits.d.ts +1 -1
  118. package/dist-vue/packages/components/src/chat/useChatFilePreview.d.ts +240 -0
  119. package/dist-vue/packages/components/src/chat/utils.d.ts +57 -5
  120. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +18 -18
  121. package/dist-vue/packages/composable/src/useSettledSelection.d.ts +2 -2
  122. package/dist-vue/packages/models/src/schema/Agent.d.ts +21 -21
  123. package/dist-vue/packages/models/src/schema/Chart.d.ts +91 -0
  124. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +6 -6
  125. package/dist-vue/packages/models/src/schema/SelectionAction.d.ts +11 -11
  126. package/dist-vue/packages/models/src/schema/SelectionActionPreview.d.ts +3 -3
  127. package/dist-vue/packages/models/src/schema/SpreadsheetPreview.d.ts +381 -0
  128. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +6 -6
  129. package/dist-vue/packages/models/src/schema/WordPreview.d.ts +304 -0
  130. package/dist-vue/style.css +1 -1
  131. package/package.json +1 -1
  132. package/dist/_chunks/PkChart-CbtMRGWc.js.map +0 -1
  133. package/dist/_chunks/PkFilePreview-DC4iX7Yc.js +0 -1665
  134. package/dist/_chunks/PkFilePreview-DC4iX7Yc.js.map +0 -1
  135. package/dist/_chunks/PkSelectionActions-BbfVZY0R.js.map +0 -1
  136. package/dist/_chunks/PkToolShowChart-DZWu3Yuo.js +0 -224
  137. package/dist/_chunks/PkToolShowChart-DZWu3Yuo.js.map +0 -1
  138. package/dist/_chunks/excelNumberFormat-BhQjife9.js.map +0 -1
  139. package/dist/_chunks/utils-DMvy5QRR.js.map +0 -1
  140. package/dist-vue/_chunks/PkChart-D-K7nc0g.js.map +0 -1
  141. package/dist-vue/_chunks/PkFilePreview-k5gEl3n8.js.map +0 -1
  142. package/dist-vue/_chunks/PkToolShowChart-BQXxaPIO.js +0 -217
  143. package/dist-vue/_chunks/PkToolShowChart-BQXxaPIO.js.map +0 -1
  144. package/dist-vue/_chunks/excelNumberFormat-C1sCQrOz.js.map +0 -1
  145. package/dist-vue/_chunks/utils-KBB6SDPn.js.map +0 -1
@@ -49,16 +49,16 @@ function m(e, t) {
49
49
  function h(e) {
50
50
  return e ? e.type === "reasoning" : !1;
51
51
  }
52
- function ee(e) {
52
+ function g(e) {
53
53
  return e ? e.parts.some((e) => c(e)) : !1;
54
54
  }
55
- function te(e) {
55
+ function _(e) {
56
56
  if (!e) return;
57
57
  let t = e.parts;
58
58
  if (Array.isArray(t)) return t.find((e) => c(e))?.text;
59
59
  }
60
60
  // ../../packages/components/src/chat/utils.ts
61
- function ne(e) {
61
+ function v(e) {
62
62
  let t = [];
63
63
  for (let n of e) {
64
64
  if (!c(n)) {
@@ -73,31 +73,31 @@ function ne(e) {
73
73
  }
74
74
  return t;
75
75
  }
76
- var g = (e) => l(e) && t(u(e));
77
- function _(e) {
76
+ var y = (e) => l(e) && t(u(e));
77
+ function b(e) {
78
78
  let t = /* @__PURE__ */ new Map();
79
- for (let [n, r] of e.entries()) g(r) && r.state !== "output-error" && !S(r) && t.set(r.type, n);
80
- return e.filter((e, n) => !(g(e) && e.state === "output-error" && (t.get(e.type) ?? -1) > n));
79
+ for (let [n, r] of e.entries()) y(r) && r.state !== "output-error" && !D(r) && t.set(r.type, n);
80
+ return e.filter((e, n) => !(y(e) && e.state === "output-error" && (t.get(e.type) ?? -1) > n));
81
81
  }
82
- var v = /* @__PURE__ */ new Set([
82
+ var x = /* @__PURE__ */ new Set([
83
83
  "tool-editSpreadsheet",
84
84
  "tool-shareDocument",
85
85
  "tool-editWordDocument",
86
86
  "tool-createSpreadsheet",
87
87
  "tool-createWordDocument"
88
88
  ]);
89
- function y(e) {
90
- let t = e.filter((e) => v.has(e.type));
91
- return t.length > 0 ? [...e.filter((e) => !v.has(e.type)), ...t] : e;
89
+ function ee(e) {
90
+ let t = e.filter((e) => x.has(e.type));
91
+ return t.length > 0 ? [...e.filter((e) => !x.has(e.type)), ...t] : e;
92
92
  }
93
- function re(e, t) {
93
+ function te(e, t) {
94
94
  let n = e.toolCallId;
95
- return v.has(e.type) && n ? `file-${n}` : t;
95
+ return x.has(e.type) && n ? `file-${n}` : t;
96
96
  }
97
- function b(t) {
97
+ function S(t) {
98
98
  return e(t) ? t : void 0;
99
99
  }
100
- var ie = {
100
+ var C = {
101
101
  page_snapshot: {
102
102
  icon: "ri:pages-line",
103
103
  label: "messagePart.pageTool.snapshot"
@@ -142,21 +142,21 @@ var ie = {
142
142
  icon: "ri:links-line",
143
143
  label: "messagePart.pageTool.navigate"
144
144
  }
145
- }, ae = Symbol("hostStepTitles"), oe = Symbol("hostStepChanges"), se = {
145
+ }, w = Symbol("hostStepTitles"), T = Symbol("hostStepChanges"), ne = {
146
146
  icon: "ri:survey-line",
147
147
  label: "messagePart.pageTool.form"
148
- }, x = (e) => e.toolMetadata?.provider === "page" ? ie[e.toolName] ?? (e.toolName.startsWith("form_") ? se : void 0) : void 0;
149
- function ce(e) {
150
- return b(e)?.toolMetadata?.readOnly === !1;
148
+ }, E = (e) => e.toolMetadata?.provider === "page" ? C[e.toolName] ?? (e.toolName.startsWith("form_") ? ne : void 0) : void 0;
149
+ function re(e) {
150
+ return S(e)?.toolMetadata?.readOnly === !1;
151
151
  }
152
- function S(e) {
152
+ function D(e) {
153
153
  return e && "state" in e ? e.state === "streaming" || e.state === "input-streaming" : !1;
154
154
  }
155
- var C = 4e3, w = /^[ \t]*(?:(?:[-*+]|\d{1,9}[.)])[ \t]+|>[ \t]?)*(`{3,}|~{3,})(.*)$/gm;
156
- function T(e, t) {
155
+ var ie = 4e3, ae = /^[ \t]*(?:(?:[-*+]|\d{1,9}[.)])[ \t]+|>[ \t]?)*(`{3,}|~{3,})(.*)$/gm;
156
+ function oe(e, t) {
157
157
  if (e.length <= t) return e;
158
158
  let n = e.length - t, r = n + t / 2, i = (e, t) => e !== -1 && e < r ? e + t : void 0, a = i(e.indexOf("\n\n", n), 2) ?? i(e.indexOf("\n", n), 1) ?? n, o;
159
- for (let t of e.matchAll(w)) {
159
+ for (let t of e.matchAll(ae)) {
160
160
  if (t.index >= a) break;
161
161
  let [, e, n] = t;
162
162
  if (o) e[0] === o[0] && e.length >= o.length && !n.trim() && (o = void 0);
@@ -167,34 +167,34 @@ function T(e, t) {
167
167
  }
168
168
  return `…\n\n${o ? `${o}\n` : ""}${e.slice(a)}`;
169
169
  }
170
- var E = /* @__PURE__ */ new Set([
170
+ var se = /* @__PURE__ */ new Set([
171
171
  "approval-requested",
172
172
  "approval-responded",
173
173
  "output-denied"
174
174
  ]);
175
- function D(e) {
176
- return l(e) ? E.has(e.state) ? !0 : e.approval != null : !1;
175
+ function ce(e) {
176
+ return l(e) ? se.has(e.state) ? !0 : e.approval != null : !1;
177
177
  }
178
- var O = "requestConfirm";
179
- function k(e) {
178
+ var le = "requestConfirm";
179
+ function O(e) {
180
180
  return l(e) && e.type === "tool-requestConfirm";
181
181
  }
182
- function A(e) {
183
- return D(e) || k(e);
182
+ function k(e) {
183
+ return ce(e) || O(e);
184
184
  }
185
- function j(e) {
185
+ function A(e) {
186
186
  if (l(e)) return e.approval?.id;
187
187
  }
188
- function M(e) {
188
+ function j(e) {
189
189
  if (e && "state" in e) return e.state;
190
190
  }
191
- function N(e = "000000") {
191
+ function M(e = "000000") {
192
192
  let t = e.replace("#", "");
193
193
  t.length === 3 && (t = t.split("").map((e) => e + e).join(""));
194
194
  let n = parseInt(t.substring(0, 2), 16) / 255, r = parseInt(t.substring(2, 4), 16) / 255, i = parseInt(t.substring(4, 6), 16) / 255, a = (e) => e <= .03928 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
195
195
  return .2126 * a(n) + .7152 * a(r) + .0722 * a(i) > .179 ? "black" : "white";
196
196
  }
197
- function P(e) {
197
+ function N(e) {
198
198
  let t = e?.trim().replace("#", "") ?? "";
199
199
  if (/^[0-9a-f]{3}$/i.test(t) && (t = t.split("").map((e) => e + e).join("")), !/^[0-9a-f]{6}$/i.test(t)) return !1;
200
200
  let n = [
@@ -204,8 +204,8 @@ function P(e) {
204
204
  ].map((e) => parseInt(t.substring(e, e + 2), 16));
205
205
  return Math.max(...n) - Math.min(...n) < 32;
206
206
  }
207
- var F = (e) => `#${e.map((e) => e.toString(16).padStart(2, "0")).join("")}`;
208
- function I(e, t) {
207
+ var P = (e) => `#${e.map((e) => e.toString(16).padStart(2, "0")).join("")}`;
208
+ function F(e, t) {
209
209
  e.style.color = CSS.supports("color", "color-mix(in srgb, red 100%, transparent)") ? `color-mix(in srgb, ${t} 100%, transparent)` : t;
210
210
  let n = getComputedStyle(e).color;
211
211
  e.style.color = "";
@@ -220,11 +220,11 @@ function I(e, t) {
220
220
  i[3]
221
221
  ].map((e) => Math.round(Number(e))) : null;
222
222
  }
223
- function L(e, { mainColor: t, tones: n = "auto", secondColor: r }) {
223
+ function I(e, { mainColor: t, tones: n = "auto", secondColor: r }) {
224
224
  let i = document.createElement("span");
225
225
  i.hidden = !0, e.append(i);
226
226
  try {
227
- return R(i, {
227
+ return L(i, {
228
228
  mainColor: t,
229
229
  tones: n,
230
230
  secondColor: r
@@ -233,20 +233,20 @@ function L(e, { mainColor: t, tones: n = "auto", secondColor: r }) {
233
233
  i.remove();
234
234
  }
235
235
  }
236
- function R(e, { mainColor: t, tones: n, secondColor: r }) {
237
- let i = I(e, t ?? "currentcolor");
236
+ function L(e, { mainColor: t, tones: n, secondColor: r }) {
237
+ let i = F(e, t ?? "currentcolor");
238
238
  if (!i) return null;
239
- let a = F(i), o = P(a), s = (e, t = 0) => CSS.supports("color", "oklch(from red l c h)") ? `oklch(from ${e} clamp(0.55, l, 0.75) c calc(h + ${t}))` : e, c = I(e, s(o ? "var(--color-accent)" : a)), l = I(e, r ? s(r) : o ? s("var(--color-info)") : s(a, 40));
239
+ let a = P(i), o = N(a), s = (e, t = 0) => CSS.supports("color", "oklch(from red l c h)") ? `oklch(from ${e} clamp(0.55, l, 0.75) c calc(h + ${t}))` : e, c = F(e, s(o ? "var(--color-accent)" : a)), l = F(e, r ? s(r) : o ? s("var(--color-info)") : s(a, 40));
240
240
  return !c || !l ? null : {
241
241
  first: c,
242
242
  second: l,
243
243
  duo: n === "two" || n === "auto" && o
244
244
  };
245
245
  }
246
- function z(e, t) {
247
- return e === "white" || e === "black" ? e : N(t);
246
+ function R(e, t) {
247
+ return e === "white" || e === "black" ? e : M(t);
248
248
  }
249
- function B(e, t) {
249
+ function z(e, t) {
250
250
  if (e) return {
251
251
  "--chatbot-main-color": e,
252
252
  "--chatbot-contrast-color": t,
@@ -255,10 +255,10 @@ function B(e, t) {
255
255
  "--input-focus-color": "var(--color-brand-graphic)"
256
256
  };
257
257
  }
258
- function V(e, t) {
258
+ function B(e, t) {
259
259
  if (!(t === void 0 || t < 50)) return e(t / 1e3, "seconds");
260
260
  }
261
- function H(e) {
261
+ function V(e) {
262
262
  if (e !== void 0) {
263
263
  if (typeof e == "string") return e.trim() || void 0;
264
264
  try {
@@ -269,10 +269,10 @@ function H(e) {
269
269
  }
270
270
  }
271
271
  }
272
- function U(e) {
273
- return H(e) !== void 0;
272
+ function H(e) {
273
+ return V(e) !== void 0;
274
274
  }
275
- function W(e, t) {
275
+ function U(e, t) {
276
276
  let n = e?.input;
277
277
  if (typeof t == "string") {
278
278
  let e = n?.question ?? n?.steps?.[0]?.question;
@@ -284,14 +284,14 @@ function W(e, t) {
284
284
  return i ? `${i} ${n}` : n;
285
285
  }).join(". ");
286
286
  }
287
- function G(e) {
287
+ function W(e) {
288
288
  return e?.options ? e.options.map((e) => ({
289
289
  label: e.label,
290
290
  value: e.label,
291
291
  description: e.description
292
292
  })) : [];
293
293
  }
294
- function le(e, t) {
294
+ function ue(e, t) {
295
295
  let n = {};
296
296
  if (t == null) return n;
297
297
  if (typeof t == "string") return e.length === 1 && (n[0] = t), n;
@@ -307,7 +307,7 @@ function le(e, t) {
307
307
  for (let [e, n] of Object.entries(t)) n !== void 0 && r(e, n);
308
308
  return n;
309
309
  }
310
- var K = a.map((e) => `tool-${e}`), ue = /* @__PURE__ */ new Set([
310
+ var G = a.map((e) => `tool-${e}`), de = /* @__PURE__ */ new Set([
311
311
  "tool-searchInKnowledgeBase",
312
312
  "tool-retrieveRevisedAnswers",
313
313
  "tool-expandChunkContext",
@@ -316,63 +316,63 @@ var K = a.map((e) => `tool-${e}`), ue = /* @__PURE__ */ new Set([
316
316
  "tool-geocode",
317
317
  "tool-recallUserMemory",
318
318
  "tool-saveUserMemory",
319
- ...K
319
+ ...G
320
320
  ]);
321
- function de(e) {
322
- return l(e) && ue.has(e.type);
321
+ function fe(e) {
322
+ return l(e) && de.has(e.type);
323
323
  }
324
- var q = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, J = (e, ...t) => {
324
+ var K = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, q = (e, ...t) => {
325
325
  for (let n of t) {
326
326
  let t = e?.[n];
327
327
  if (typeof t == "string" && t.trim()) return t;
328
328
  }
329
329
  };
330
- function fe(e) {
330
+ function pe(e) {
331
331
  if (!l(e)) return;
332
- let t = q("input" in e ? e.input : void 0), n = q("output" in e ? e.output : void 0);
333
- if (e.type === "tool-searchInKnowledgeBase" || K.includes(e.type)) {
332
+ let t = K("input" in e ? e.input : void 0), n = K("output" in e ? e.output : void 0);
333
+ if (e.type === "tool-searchInKnowledgeBase" || G.includes(e.type)) {
334
334
  let e = t?.queries;
335
335
  if (Array.isArray(e)) {
336
336
  let t = e.filter((e) => typeof e == "string" && !!e.trim());
337
337
  return t.length ? t.join(" · ") : void 0;
338
338
  }
339
- return J(t, "query", "objective");
339
+ return q(t, "query", "objective");
340
340
  }
341
- if (e.type === "tool-retrieveRevisedAnswers") return J(t, "query");
342
- if (e.type === "tool-getWeather") return J(n, "location") ?? J(t, "locationName");
343
- if (e.type === "tool-geocode") return J(t, "locationName");
344
- if (e.type === "tool-expandChunkContext") return J(n, "documentName");
345
- if (e.type === "tool-readDocumentFile" || e.type === "tool-readChatAttachment" || e.type === "tool-sendChatFile" || e.type === "tool-shareDocument") return J(n, "name");
341
+ if (e.type === "tool-retrieveRevisedAnswers") return q(t, "query");
342
+ if (e.type === "tool-getWeather") return q(n, "location") ?? q(t, "locationName");
343
+ if (e.type === "tool-geocode") return q(t, "locationName");
344
+ if (e.type === "tool-expandChunkContext") return q(n, "documentName");
345
+ if (e.type === "tool-readDocumentFile" || e.type === "tool-readChatAttachment" || e.type === "tool-sendChatFile" || e.type === "tool-shareDocument") return q(n, "name");
346
346
  if (e.type === "tool-readSpreadsheet") {
347
- let e = J(t, "sheet"), n = J(t, "range");
347
+ let e = q(t, "sheet"), n = q(t, "range");
348
348
  return e && n ? `${e}!${n}` : e;
349
349
  }
350
- if (e.type === "tool-editSpreadsheet") return J(n, "filename");
351
- if (e.type === "tool-readWordDocument") return J(t, "search") ?? J(t, "from");
352
- if (e.type === "tool-editWordDocument") return J(n, "filename");
353
- if (e.type === "tool-createSpreadsheet" || e.type === "tool-createWordDocument") return J(n, "filename") ?? J(t, "filename");
354
- if (e.type === "tool-querySpreadsheet") return J(n, "file");
355
- if (e.type === "tool-recallUserMemory") return J(t, "query");
356
- if (e.type === "tool-saveUserMemory") return J(t, "content", "query");
357
- }
358
- function pe(e) {
359
- let t = b(e);
360
- if (t) return x(t)?.icon ?? "ri:apps-line";
361
- if (l(e)) return e.type.includes("tool-subagent") ? "ri:robot-2-line" : e.type === "tool-runWorker" ? "ri:flow-chart" : e.type === "tool-scheduleWakeup" ? "ri:alarm-line" : e.type === "tool-fetchTeamsChannelHistory" ? "ri:chat-history-line" : e.type === "tool-readEarlierMessages" ? "ri:history-line" : e.type === "tool-readChatAttachment" ? "ri:attachment-line" : e.type === "tool-sendChatFile" ? "ri:send-plane-line" : e.type === "tool-enableTools" ? "ri:toggle-line" : e.type.includes("tool-mcp") ? "mcp" : e.type === "tool-retrieveRevisedAnswers" ? "ri:file-edit-line" : e.type === "tool-searchInKnowledgeBase" ? "ri:search-line" : e.type === "tool-expandChunkContext" ? "ri:file-search-line" : e.type === "tool-readDocumentFile" ? "ri:file-text-line" : e.type === "tool-readSpreadsheet" ? "ri:table-line" : e.type === "tool-editSpreadsheet" || e.type === "tool-createSpreadsheet" ? "ri:file-excel-2-line" : e.type === "tool-shareDocument" ? "ri:file-download-line" : e.type === "tool-readWordDocument" ? "ri:file-text-line" : e.type === "tool-editWordDocument" || e.type === "tool-createWordDocument" ? "ri:file-word-2-line" : e.type === "tool-querySpreadsheet" ? "ri:database-2-line" : e.type === "tool-geocode" ? "ri:map-2-line" : e.type === "tool-getWeather" ? "ri:sun-cloudy-line" : e.type === "tool-recallUserMemory" ? "ri:brain-line" : e.type === "tool-saveUserMemory" ? "ri:save-3-line" : e.type === "tool-showWeather" ? "ri:sun-line" : e.type === "tool-showChart" ? "ri:bar-chart-2-line" : e.type === "tool-showDiagram" ? "ri:flow-chart" : e.type === "tool-showSources" ? "ri:book-2-line" : e.type === "tool-showForm" ? "ri:survey-line" : e.type === "tool-showMultipleChoice" ? "ri:checkbox-multiple-line" : e.type === "tool-showArtifact" ? "ri:file-code-line" : e.type === "tool-showEmail" ? "ri:mail-line" : e.type === "tool-showMessage" ? "ri:chat-1-line" : e.type === "tool-showWebPages" ? "ri:pages-line" : e.type === "tool-showProductList" ? "ri:shopping-bag-line" : e.type === "tool-showContactForm" ? "ri:send-plane-2-line" : e.type === "tool-showCalendarEvent" ? "ri:calendar-event-line" : e.type === "tool-showComparison" ? "ri:scales-line" : e.type === "tool-showLocation" ? "ri:map-pin-line" : e.type === "tool-showQrCode" ? "ri:qr-code-line" : e.type === "tool-showImageGallery" ? "ri:image-line" : e.type === "tool-showVideo" ? "ri:film-line" : e.type === "tool-showSuggestedReply" ? "ri:corner-down-right-line" : e.type === "tool-requestGeolocation" ? "ri:map-pin-user-line" : e.type === "tool-disconnectOAuthConnection" ? "ri:link-unlink" : e.type === "tool-requestAccountLink" ? "ri:link" : e.type === "tool-unlinkAccount" ? "ri:link-unlink" : K.includes(e.type) ? "ri:global-line" : "ri:tools-line";
350
+ if (e.type === "tool-editSpreadsheet") return q(n, "filename");
351
+ if (e.type === "tool-readWordDocument") return q(t, "search") ?? q(t, "from");
352
+ if (e.type === "tool-editWordDocument") return q(n, "filename");
353
+ if (e.type === "tool-createSpreadsheet" || e.type === "tool-createWordDocument") return q(n, "filename") ?? q(t, "filename");
354
+ if (e.type === "tool-querySpreadsheet") return q(n, "file");
355
+ if (e.type === "tool-recallUserMemory") return q(t, "query");
356
+ if (e.type === "tool-saveUserMemory") return q(t, "content", "query");
357
+ }
358
+ function me(e) {
359
+ let t = S(e);
360
+ if (t) return E(t)?.icon ?? "ri:apps-line";
361
+ if (l(e)) return e.type.includes("tool-subagent") ? "ri:robot-2-line" : e.type === "tool-runWorker" ? "ri:flow-chart" : e.type === "tool-scheduleWakeup" ? "ri:alarm-line" : e.type === "tool-fetchTeamsChannelHistory" ? "ri:chat-history-line" : e.type === "tool-readEarlierMessages" ? "ri:history-line" : e.type === "tool-readChatAttachment" ? "ri:attachment-line" : e.type === "tool-sendChatFile" ? "ri:send-plane-line" : e.type === "tool-enableTools" ? "ri:toggle-line" : e.type.includes("tool-mcp") ? "mcp" : e.type === "tool-retrieveRevisedAnswers" ? "ri:file-edit-line" : e.type === "tool-searchInKnowledgeBase" ? "ri:search-line" : e.type === "tool-expandChunkContext" ? "ri:file-search-line" : e.type === "tool-readDocumentFile" ? "ri:file-text-line" : e.type === "tool-readSpreadsheet" ? "ri:table-line" : e.type === "tool-editSpreadsheet" || e.type === "tool-createSpreadsheet" ? "ri:file-excel-2-line" : e.type === "tool-shareDocument" ? "ri:file-download-line" : e.type === "tool-readWordDocument" ? "ri:file-text-line" : e.type === "tool-editWordDocument" || e.type === "tool-createWordDocument" ? "ri:file-word-2-line" : e.type === "tool-querySpreadsheet" ? "ri:database-2-line" : e.type === "tool-geocode" ? "ri:map-2-line" : e.type === "tool-getWeather" ? "ri:sun-cloudy-line" : e.type === "tool-recallUserMemory" ? "ri:brain-line" : e.type === "tool-saveUserMemory" ? "ri:save-3-line" : e.type === "tool-showWeather" ? "ri:sun-line" : e.type === "tool-showChart" ? "ri:bar-chart-2-line" : e.type === "tool-showDiagram" ? "ri:flow-chart" : e.type === "tool-showSources" ? "ri:book-2-line" : e.type === "tool-showForm" ? "ri:survey-line" : e.type === "tool-showMultipleChoice" ? "ri:checkbox-multiple-line" : e.type === "tool-showArtifact" ? "ri:file-code-line" : e.type === "tool-showEmail" ? "ri:mail-line" : e.type === "tool-showMessage" ? "ri:chat-1-line" : e.type === "tool-showWebPages" ? "ri:pages-line" : e.type === "tool-showProductList" ? "ri:shopping-bag-line" : e.type === "tool-showContactForm" ? "ri:send-plane-2-line" : e.type === "tool-showCalendarEvent" ? "ri:calendar-event-line" : e.type === "tool-showComparison" ? "ri:scales-line" : e.type === "tool-showLocation" ? "ri:map-pin-line" : e.type === "tool-showQrCode" ? "ri:qr-code-line" : e.type === "tool-showImageGallery" ? "ri:image-line" : e.type === "tool-showVideo" ? "ri:film-line" : e.type === "tool-showSuggestedReply" ? "ri:corner-down-right-line" : e.type === "tool-requestGeolocation" ? "ri:map-pin-user-line" : e.type === "tool-disconnectOAuthConnection" ? "ri:link-unlink" : e.type === "tool-requestAccountLink" ? "ri:link" : e.type === "tool-unlinkAccount" ? "ri:link-unlink" : G.includes(e.type) ? "ri:global-line" : "ri:tools-line";
362
362
  if (h(e)) return "ri:lightbulb-line";
363
363
  if (c(e)) return "ri:double-quotes-r";
364
364
  }
365
- var me = [
365
+ var he = [
366
366
  i,
367
367
  n,
368
368
  r
369
369
  ];
370
- function Y(e, { t, te: n }) {
370
+ function J(e, { t, te: n }) {
371
371
  if (n(`agent.tool.${e}`)) return t(`agent.tool.${e}`);
372
- let r = me.find((t) => e.startsWith(t)), i = r ? e.slice(r.length) : e;
372
+ let r = he.find((t) => e.startsWith(t)), i = r ? e.slice(r.length) : e;
373
373
  return s(o(i).trim().toLowerCase());
374
374
  }
375
- var he = {
375
+ var ge = {
376
376
  custom: (e) => e("messagePart.type.custom"),
377
377
  data: (e) => e("messagePart.type.data"),
378
378
  file: (e) => e("messagePart.type.file"),
@@ -382,13 +382,13 @@ var he = {
382
382
  "step-start": (e) => e("messagePart.type.stepStart"),
383
383
  text: (e) => e("messagePart.type.text")
384
384
  };
385
- function ge(e, t) {
386
- if (l(e)) return Y(u(e), t);
387
- if (e.type === "dynamic-tool") return Y(e.toolName, t);
388
- let n = he[e.type.startsWith("data-") ? "data" : e.type];
385
+ function _e(e, t) {
386
+ if (l(e)) return J(u(e), t);
387
+ if (e.type === "dynamic-tool") return J(e.toolName, t);
388
+ let n = ge[e.type.startsWith("data-") ? "data" : e.type];
389
389
  return n ? n(t.t) : s(o(e.type));
390
390
  }
391
- function _e(e, t) {
391
+ function ve(e, t) {
392
392
  if (!e) return e;
393
393
  let n = {
394
394
  Intent: t("conversationSummary.intent"),
@@ -398,17 +398,17 @@ function _e(e, t) {
398
398
  };
399
399
  return e.replace(/\*\*(Intent|Topics covered|Key facts|Open questions)(:?)\*\*/g, (e, t, r) => `**${n[t]}${r}**`);
400
400
  }
401
- function ve(e, t, n) {
402
- let r = b(t);
401
+ function ye(e, t, n) {
402
+ let r = S(t);
403
403
  if (r) {
404
404
  let t = r.toolCallId ? n?.[r.toolCallId] : void 0;
405
405
  if (t) return t;
406
- let i = x(r);
406
+ let i = E(r);
407
407
  return i ? e(i.label) : r.title || r.toolName;
408
408
  }
409
- return l(t) ? t.type.includes("tool-subagent") ? e("messagePart.runSubagent") : t.type === "tool-runWorker" ? e("messagePart.runWorker") : t.type === "tool-scheduleWakeup" ? e("messagePart.scheduleWakeup") : t.type === "tool-fetchTeamsChannelHistory" ? e("messagePart.fetchTeamsChannelHistory") : t.type === "tool-readEarlierMessages" ? e("messagePart.readEarlierMessages") : t.type === "tool-readChatAttachment" ? e("messagePart.readChatAttachment") : t.type === "tool-sendChatFile" ? e("messagePart.sendChatFile") : t.type === "tool-enableTools" ? e("messagePart.enableTools") : t.type === "tool-retrieveRevisedAnswers" ? e("messagePart.revisedAnswers") : t.type === "tool-searchInKnowledgeBase" ? e("messagePart.searchingDocuments") : t.type === "tool-expandChunkContext" ? e("messagePart.expandChunkContext") : t.type === "tool-readDocumentFile" ? e("messagePart.readDocumentFile") : t.type === "tool-readSpreadsheet" ? e("messagePart.readSpreadsheet") : t.type === "tool-editSpreadsheet" ? e("messagePart.editSpreadsheet") : t.type === "tool-shareDocument" ? e("messagePart.shareDocument") : t.type === "tool-readWordDocument" ? e("messagePart.readWordDocument") : t.type === "tool-editWordDocument" ? e("messagePart.editWordDocument") : t.type === "tool-createSpreadsheet" ? e("messagePart.createSpreadsheet") : t.type === "tool-createWordDocument" ? e("messagePart.createWordDocument") : t.type === "tool-querySpreadsheet" ? e("messagePart.querySpreadsheet") : t.type === "tool-geocode" ? e("messagePart.geocode") : t.type === "tool-getWeather" ? e("messagePart.getWeather") : t.type === "tool-recallUserMemory" ? e("messagePart.recallUserMemory") : t.type === "tool-saveUserMemory" ? e("messagePart.saveUserMemory") : t.type === "tool-showWeather" ? e("messagePart.showWeather") : t.type === "tool-showForm" ? e("messagePart.showForm") : t.type === "tool-showChart" ? e("messagePart.showChart") : t.type === "tool-showDiagram" ? e("messagePart.showDiagram") : t.type === "tool-showSources" ? e("messagePart.showSources") : t.type === "tool-showMultipleChoice" ? e("messagePart.showMultipleChoice") : t.type === "tool-showArtifact" ? e("messagePart.showArtifact") : t.type === "tool-showEmail" ? e("messagePart.showEmail") : t.type === "tool-showMessage" ? e("messagePart.showMessage") : t.type === "tool-showWebPages" ? e("messagePart.showWebPages") : t.type === "tool-showProducts" ? e("messagePart.showProducts") : t.type === "tool-showContactForm" ? e("messagePart.showContactForm") : t.type === "tool-showCalendarEvent" ? e("messagePart.showCalendarEvent") : t.type === "tool-showComparison" ? e("messagePart.showComparison") : t.type === "tool-showLocation" ? e("messagePart.showLocation") : t.type === "tool-showQrCode" ? e("messagePart.showQrCode") : t.type === "tool-showImageGallery" ? e("messagePart.showImageGallery") : t.type === "tool-showVideo" ? e("messagePart.showVideo") : t.type === "tool-showSuggestedReply" ? e("messagePart.showSuggestedReply") : t.type === "tool-requestGeolocation" ? e("messagePart.requestGeolocation") : t.type === "tool-disconnectOAuthConnection" ? e("messagePart.disconnectOAuthConnection") : t.type === "tool-requestAccountLink" ? e("messagePart.requestAccountLink") : t.type === "tool-unlinkAccount" ? e("messagePart.unlinkAccount") : K.includes(t.type) ? e("messagePart.webSearch") : e("messagePart.tool") : h(t) ? e("messagePart.reasoning") : e("messagePart.streaming");
409
+ return l(t) ? t.type.includes("tool-subagent") ? e("messagePart.runSubagent") : t.type === "tool-runWorker" ? e("messagePart.runWorker") : t.type === "tool-scheduleWakeup" ? e("messagePart.scheduleWakeup") : t.type === "tool-fetchTeamsChannelHistory" ? e("messagePart.fetchTeamsChannelHistory") : t.type === "tool-readEarlierMessages" ? e("messagePart.readEarlierMessages") : t.type === "tool-readChatAttachment" ? e("messagePart.readChatAttachment") : t.type === "tool-sendChatFile" ? e("messagePart.sendChatFile") : t.type === "tool-enableTools" ? e("messagePart.enableTools") : t.type === "tool-retrieveRevisedAnswers" ? e("messagePart.revisedAnswers") : t.type === "tool-searchInKnowledgeBase" ? e("messagePart.searchingDocuments") : t.type === "tool-expandChunkContext" ? e("messagePart.expandChunkContext") : t.type === "tool-readDocumentFile" ? e("messagePart.readDocumentFile") : t.type === "tool-readSpreadsheet" ? e("messagePart.readSpreadsheet") : t.type === "tool-editSpreadsheet" ? e("messagePart.editSpreadsheet") : t.type === "tool-shareDocument" ? e("messagePart.shareDocument") : t.type === "tool-readWordDocument" ? e("messagePart.readWordDocument") : t.type === "tool-editWordDocument" ? e("messagePart.editWordDocument") : t.type === "tool-createSpreadsheet" ? e("messagePart.createSpreadsheet") : t.type === "tool-createWordDocument" ? e("messagePart.createWordDocument") : t.type === "tool-querySpreadsheet" ? e("messagePart.querySpreadsheet") : t.type === "tool-geocode" ? e("messagePart.geocode") : t.type === "tool-getWeather" ? e("messagePart.getWeather") : t.type === "tool-recallUserMemory" ? e("messagePart.recallUserMemory") : t.type === "tool-saveUserMemory" ? e("messagePart.saveUserMemory") : t.type === "tool-showWeather" ? e("messagePart.showWeather") : t.type === "tool-showForm" ? e("messagePart.showForm") : t.type === "tool-showChart" ? e("messagePart.showChart") : t.type === "tool-showDiagram" ? e("messagePart.showDiagram") : t.type === "tool-showSources" ? e("messagePart.showSources") : t.type === "tool-showMultipleChoice" ? e("messagePart.showMultipleChoice") : t.type === "tool-showArtifact" ? e("messagePart.showArtifact") : t.type === "tool-showEmail" ? e("messagePart.showEmail") : t.type === "tool-showMessage" ? e("messagePart.showMessage") : t.type === "tool-showWebPages" ? e("messagePart.showWebPages") : t.type === "tool-showProducts" ? e("messagePart.showProducts") : t.type === "tool-showContactForm" ? e("messagePart.showContactForm") : t.type === "tool-showCalendarEvent" ? e("messagePart.showCalendarEvent") : t.type === "tool-showComparison" ? e("messagePart.showComparison") : t.type === "tool-showLocation" ? e("messagePart.showLocation") : t.type === "tool-showQrCode" ? e("messagePart.showQrCode") : t.type === "tool-showImageGallery" ? e("messagePart.showImageGallery") : t.type === "tool-showVideo" ? e("messagePart.showVideo") : t.type === "tool-showSuggestedReply" ? e("messagePart.showSuggestedReply") : t.type === "tool-requestGeolocation" ? e("messagePart.requestGeolocation") : t.type === "tool-disconnectOAuthConnection" ? e("messagePart.disconnectOAuthConnection") : t.type === "tool-requestAccountLink" ? e("messagePart.requestAccountLink") : t.type === "tool-unlinkAccount" ? e("messagePart.unlinkAccount") : G.includes(t.type) ? e("messagePart.webSearch") : e("messagePart.tool") : h(t) ? e("messagePart.reasoning") : e("messagePart.streaming");
410
410
  }
411
- var ye = {
411
+ var be = {
412
412
  calibri: "Calibri, Carlito, \"Segoe UI\", Arial, sans-serif",
413
413
  "calibri light": "\"Calibri Light\", Calibri, Carlito, \"Segoe UI\", sans-serif",
414
414
  aptos: "Aptos, Calibri, Carlito, \"Segoe UI\", Arial, sans-serif",
@@ -422,7 +422,7 @@ var ye = {
422
422
  georgia: "Georgia, serif",
423
423
  verdana: "Verdana, \"DejaVu Sans\", sans-serif",
424
424
  tahoma: "Tahoma, Verdana, sans-serif"
425
- }, be = {
425
+ }, xe = {
426
426
  calibri: 1.22,
427
427
  "calibri light": 1.22,
428
428
  cambria: 1.17,
@@ -433,10 +433,10 @@ var ye = {
433
433
  georgia: 1.14,
434
434
  verdana: 1.22,
435
435
  tahoma: 1.21
436
- }, xe = (e) => be[e.toLowerCase()] ?? 1.17, Se = (e) => ye[e.toLowerCase()] ?? `"${e.replace(/"/g, "")}", ${/roman|garamond|cambria|georgia|serif|book|times/i.test(e) ? "Georgia, serif" : "Calibri, Carlito, \"Segoe UI\", Arial, sans-serif"}`, Ce = Symbol("wordPreviewImages"), X = (e, t) => {
436
+ }, Se = (e) => xe[e.toLowerCase()] ?? 1.17, Ce = (e) => be[e.toLowerCase()] ?? `"${e.replace(/"/g, "")}", ${/roman|garamond|cambria|georgia|serif|book|times/i.test(e) ? "Georgia, serif" : "Calibri, Carlito, \"Segoe UI\", Arial, sans-serif"}`, we = Symbol("wordPreviewImages"), Te = Symbol("wordPreviewCharts"), Ee = (e, t) => {
437
437
  let n = e?.[t];
438
438
  return n?.startsWith("data:image/webp;base64,") ? n : void 0;
439
- }, we = (e, t) => {
439
+ }, De = (e, t) => {
440
440
  let n = e.anchor;
441
441
  return {
442
442
  left: `${n.xFrom === "page" ? n.x : t.margins.left + n.x}pt`,
@@ -445,10 +445,10 @@ var ye = {
445
445
  height: `${e.height}pt`,
446
446
  zIndex: n.wrap === "behind" ? -1 : 1
447
447
  };
448
- }, Z = (e) => {
448
+ }, Y = (e) => {
449
449
  let t = e.anchor;
450
450
  return t ? t.wrap === "around" ? "around" : t.wrap === "block" ? "block" : t.yFrom === "paragraph" ? "paragraph" : "page" : "inline";
451
- }, Q = (e, t) => e.filter((e) => t === "accepted" ? e.change !== "deleted" : t !== "original" || e.change !== "inserted"), $ = (e) => e.some((e) => e.image || e.text.trim()), Te = (e, t) => {
451
+ }, X = (e, t) => e.filter((e) => t === "accepted" ? e.change !== "deleted" : t !== "original" || e.change !== "inserted"), Z = (e) => e.some((e) => e.image || e.text.trim()), Oe = (e, t) => {
452
452
  let n = [], r = !1, i, a = (e, t, a, o, s, c) => {
453
453
  let l = s ?? i;
454
454
  n.push({
@@ -466,33 +466,55 @@ var ye = {
466
466
  if (e.kind === "table") {
467
467
  let r = !!e.pageBreakBefore, i = e.section;
468
468
  e.rows.forEach((e, o) => {
469
- (!e.some((e) => e.runs.length) || e.some((e) => $(Q(e.runs, t)))) && (a(`${n}:${o}`, n, o, r, i, e.some((e) => e.keepNext)), r = !1, i = void 0);
469
+ (!e.some((e) => e.runs.length) || e.some((e) => Z(X(e.runs, t)))) && (a(`${n}:${o}`, n, o, r, i, e.some((e) => e.keepNext)), r = !1, i = void 0);
470
470
  }), o(r, i);
471
- } else !e.runs.length || $(Q(e.runs, t)) ? a(`${n}`, n, void 0, !!e.style?.pageBreakBefore, e.section, !!e.style?.keepNext) : o(!!e.style?.pageBreakBefore, e.section);
471
+ } else !e.runs.length || Z(X(e.runs, t)) ? a(`${n}`, n, void 0, !!e.style?.pageBreakBefore, e.section, !!e.style?.keepNext) : o(!!e.style?.pageBreakBefore, e.section);
472
472
  }), n;
473
- }, Ee = (e, t) => e.flatMap((e) => e.kind === "table" ? [] : Q(e.runs, t).flatMap((e) => e.picture && Z(e.picture) === "page" ? [e.picture] : [])), De = (e, t) => t ? e.replace(RegExp(` \\(v${t}\\)(\\.\\w+)$`), "$1") : e, Oe = /* @__PURE__ */ new Set([
473
+ }, ke = (e, t) => e.flatMap((e) => e.kind === "table" ? [] : X(e.runs, t).flatMap((e) => e.picture && Y(e.picture) === "page" ? [e.picture] : [])), Ae = (e, t) => t ? e.replace(RegExp(` \\(v${t}\\)(\\.\\w+)$`), "$1") : e, je = /* @__PURE__ */ new Set([
474
474
  "image/jpeg",
475
475
  "image/png",
476
476
  "image/webp"
477
477
  ]);
478
- function ke(e) {
479
- return Oe.has(e);
478
+ function Q(e) {
479
+ return je.has(e);
480
480
  }
481
- function Ae(e) {
481
+ function Me(e) {
482
482
  return e.isComposing || e.keyCode === 229;
483
483
  }
484
- function je(e, t) {
484
+ function Ne(e, t) {
485
485
  let n = t / 2;
486
486
  return e.left <= n && e.right >= n && e.top <= 92 && e.bottom >= 48;
487
487
  }
488
- function Me({ start: e, bottom: t, bar: n, bounds: r, touch: i = !1, gap: a = 8, margin: o = 8 }) {
489
- let s = e.top - a - n.height, c = !i && s >= r.top + o ? "above" : "below";
488
+ function $({ start: e, bottom: t, bar: n, bounds: r, touch: i = !1, gap: a = 8, margin: o = 8 }) {
489
+ let s = r.top + r.height - o - n.height, c = t + (i ? Math.max(a, 28) : a), l = Math.max(r.top + o, Math.min(c, s)), u = e.top - a - n.height - (i ? 56 : 0), d = u >= r.top + o, f = (i ? c > s && d : d) ? "above" : "below";
490
490
  return {
491
- top: c === "above" ? s : Math.max(r.top + o, Math.min(t + a, r.top + r.height - o - n.height)),
491
+ top: f === "above" ? u : l,
492
492
  left: Math.max(r.left + o, Math.min(e.left, r.left + r.width - o - n.width)),
493
- placement: c
493
+ placement: f
494
+ };
495
+ }
496
+ function Pe({ start: e, bottom: t, bounds: n, card: r, tallest: i, shortest: a, touch: o = !1, gap: s = 8, margin: c = 8 }) {
497
+ let l = o ? 56 : 0, u = o ? Math.max(s, 28) : s, d = {
498
+ above: e.top - s - l - (n.top + c),
499
+ below: n.top + n.height - c - (t + u)
500
+ }, [f, p] = o ? ["below", "above"] : ["above", "below"], m = d[f] >= i || d[p] < i && d[p] <= d[f] ? f : p, h = Math.min(i, n.height - 2 * c, Math.max(a, d[m])), g = Math.min(r.height, h), _ = Math.max(n.top + c, Math.min(m === "above" ? e.top - s - l - g : t + u, n.top + n.height - c - g)), { left: v } = $({
501
+ start: e,
502
+ bottom: t,
503
+ bounds: n,
504
+ bar: {
505
+ width: r.width,
506
+ height: g
507
+ },
508
+ gap: s,
509
+ margin: c
510
+ });
511
+ return {
512
+ top: _,
513
+ left: v,
514
+ maxHeight: h,
515
+ maxWidth: n.width - 2 * c
494
516
  };
495
517
  }
496
- export { ee as $, Ae as A, Y as B, fe as C, A as D, P as E, y as F, we as G, Se as H, z as I, X as J, Ee as K, L, k as M, _e as N, ke as O, ne as P, u as Q, Me as R, ve as S, de as T, Q as U, Te as V, xe as W, p as X, f as Y, te as Z, T as _, K as a, ge as b, je as c, re as d, d as et, W as f, b as g, V as h, C as i, m as it, S as j, ce as k, De as l, G as m, oe as n, c as nt, Ce as o, le as p, Z as q, ae as r, l as rt, B as s, O as t, h as tt, _ as u, pe as v, U as w, j as x, M as y, H as z };
518
+ export { _ as $, re as A, Pe as B, ye as C, N as D, fe as E, v as F, X as G, J as H, ee as I, ke as J, Se as K, R as L, D as M, O as N, k as O, ve as P, p as Q, I as R, A as S, H as T, Oe as U, V, Ce as W, Ee as X, Y, f as Z, S as _, G as a, l as at, j as b, z as c, b as d, u as et, te as f, B as g, W as h, ie as i, c as it, Me as j, Q as k, Ne as l, ue as m, T as n, d as nt, Te as o, m as ot, U as p, De as q, w as r, h as rt, we as s, le as t, g as tt, Ae as u, oe as v, pe as w, _e as x, me as y, $ as z };
497
519
 
498
- //# sourceMappingURL=utils-DMvy5QRR.js.map
520
+ //# sourceMappingURL=utils-C2aFWWye.js.map