@flamingo-stack/openframe-frontend-core 0.0.719 → 0.0.721

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 (228) hide show
  1. package/dist/assets/index.cjs +6 -0
  2. package/dist/assets/index.d.ts +1 -0
  3. package/dist/assets/index.d.ts.map +1 -1
  4. package/dist/assets/index.js +5 -1
  5. package/dist/assets/mobile-app-qr.d.ts +17 -0
  6. package/dist/assets/mobile-app-qr.d.ts.map +1 -0
  7. package/dist/{chunk-2JLP2X2M.js → chunk-2P2M27EW.js} +2396 -2369
  8. package/dist/{chunk-IWCPXJEE.js → chunk-2TXGR7IK.js} +138 -63
  9. package/dist/{chunk-FVQJBII6.js → chunk-3LY7V3RF.js} +3 -3
  10. package/dist/{chunk-HCFNEKO3.cjs → chunk-3R32ZNA2.cjs} +46 -46
  11. package/dist/{chunk-WSDT7LYL.js → chunk-3UBWDR65.js} +1 -1
  12. package/dist/{chunk-NZ5BHDFZ.js → chunk-44Q6MV7C.js} +2 -2
  13. package/dist/{chunk-CMZ3QTFQ.js → chunk-4I3K6LEH.js} +24 -0
  14. package/dist/{chunk-ZXCZYMN4.cjs → chunk-4LY6R4TN.cjs} +137 -62
  15. package/dist/{chunk-EAHOB64X.js → chunk-57UTI7ZH.js} +106 -42
  16. package/dist/{chunk-XGHGGBM3.js → chunk-5QXE5HMV.js} +4 -4
  17. package/dist/{chunk-NYWESHOQ.cjs → chunk-6AJIOW3S.cjs} +57 -57
  18. package/dist/{chunk-4QFWGLZO.js → chunk-6YBUQAOH.js} +1 -1
  19. package/dist/{chunk-JHQ334WS.js → chunk-742BGXNX.js} +2 -0
  20. package/dist/{chunk-D6PMVWDI.js → chunk-74N742ZG.js} +6 -6
  21. package/dist/{chunk-AECTRMGQ.cjs → chunk-7GRPR7XA.cjs} +13 -1
  22. package/dist/{chunk-4HJRHEXD.cjs → chunk-7Z5FMQYR.cjs} +22 -22
  23. package/dist/chunk-AFTRPEXO.js +13 -0
  24. package/dist/{chunk-WBNAEYTQ.cjs → chunk-BYUIFT7Q.cjs} +6 -6
  25. package/dist/{chunk-LCLDFMDF.cjs → chunk-BYVVE7HP.cjs} +58 -58
  26. package/dist/{chunk-JPD4NXH6.js → chunk-CO3FOZIH.js} +1 -1
  27. package/dist/{chunk-E7YCPY7K.cjs → chunk-D2DH6VZL.cjs} +3 -3
  28. package/dist/{chunk-HWVUR735.cjs → chunk-DFM572VH.cjs} +2 -2
  29. package/dist/{chunk-YDPKUAP4.js → chunk-DJ4IFQNQ.js} +2 -0
  30. package/dist/{chunk-5U3KWQXP.js → chunk-E6SMMMKV.js} +13 -13
  31. package/dist/chunk-EWPR7662.cjs +13 -0
  32. package/dist/{chunk-SWAVO7BB.cjs → chunk-F7ORKKEF.cjs} +108 -108
  33. package/dist/{chunk-AGVXKD4K.js → chunk-FSQQZFVG.js} +12 -0
  34. package/dist/{chunk-ETYLOZOB.cjs → chunk-GCK75D7F.cjs} +109 -22
  35. package/dist/{chunk-ZKNZ2CXW.cjs → chunk-GGBYZKMS.cjs} +11 -11
  36. package/dist/{chunk-Y4MB25KW.js → chunk-GYAXV3MZ.js} +3 -3
  37. package/dist/{chunk-UWQWMGJ7.cjs → chunk-HJMSNOBT.cjs} +1040 -696
  38. package/dist/{chunk-DFQYAYBH.cjs → chunk-HQIOMFJH.cjs} +2 -0
  39. package/dist/{chunk-JH2SIWPQ.js → chunk-HXB7SEYG.js} +1611 -1267
  40. package/dist/{chunk-LE5WKGJV.cjs → chunk-I2254QN6.cjs} +16 -16
  41. package/dist/{chunk-PSVSEN4J.cjs → chunk-IMTY3GRR.cjs} +2 -0
  42. package/dist/{chunk-ILNN6QRW.js → chunk-JDBZ4ZHU.js} +3 -3
  43. package/dist/{chunk-GQ7JJUIT.cjs → chunk-K2JUJ37D.cjs} +25 -1
  44. package/dist/{chunk-6YPTUHM7.js → chunk-K76ACBR3.js} +3 -3
  45. package/dist/{chunk-2NASBO7O.js → chunk-KFOAV77K.js} +2 -2
  46. package/dist/{chunk-CU6NWO2M.js → chunk-LAXKEBDD.js} +14 -18
  47. package/dist/{chunk-5YAGX5DY.js → chunk-LGKMR7NZ.js} +7 -7
  48. package/dist/{chunk-E2V2EH2G.cjs → chunk-LODMNSQY.cjs} +16 -16
  49. package/dist/{chunk-4D6NMPOO.js → chunk-NJ5TBTJG.js} +7 -7
  50. package/dist/{chunk-TDZ76NCB.cjs → chunk-NMPVK53I.cjs} +29 -29
  51. package/dist/{chunk-TTVOLEUS.js → chunk-NPSJE7J3.js} +90 -3
  52. package/dist/{chunk-H5VIMBRN.cjs → chunk-O5EHOJZD.cjs} +4 -4
  53. package/dist/{chunk-KT3U3ZRP.cjs → chunk-OKE5BIQH.cjs} +8 -8
  54. package/dist/{chunk-DC4RTYWK.cjs → chunk-QLTXT562.cjs} +5 -5
  55. package/dist/{chunk-H5V7GRN5.js → chunk-QQCFPMAA.js} +5 -7
  56. package/dist/{chunk-7BREFV7G.cjs → chunk-QYS4YVEP.cjs} +34 -36
  57. package/dist/{chunk-7BCY77W6.js → chunk-RCI3PALX.js} +8 -10
  58. package/dist/{chunk-P3JMAMHP.js → chunk-REETLEL5.js} +1 -1
  59. package/dist/{chunk-4JIGEK7C.cjs → chunk-RJMWJAJO.cjs} +97 -33
  60. package/dist/{chunk-WS7WRR5Z.cjs → chunk-RQZQHLNS.cjs} +86 -90
  61. package/dist/{chunk-FFT56TYB.cjs → chunk-RUZIICXT.cjs} +2 -2
  62. package/dist/{chunk-AJHSQ5XK.js → chunk-S63QBBT7.js} +6 -6
  63. package/dist/{chunk-TELAANY6.js → chunk-UXU7Y5BH.js} +2 -2
  64. package/dist/{chunk-NQVS4G7G.cjs → chunk-UZTOI6FJ.cjs} +773 -746
  65. package/dist/{chunk-DFEPUYTF.cjs → chunk-VFICDEYJ.cjs} +45 -47
  66. package/dist/{chunk-LOZLHG2U.cjs → chunk-XE2K53GH.cjs} +20 -20
  67. package/dist/{chunk-QBCDSTLE.cjs → chunk-XXO52RZR.cjs} +26 -26
  68. package/dist/{chunk-TTEFN6VO.js → chunk-ZLUFEWZZ.js} +10 -10
  69. package/dist/{chunk-MA4Q5RBP.cjs → chunk-ZSOFLPQN.cjs} +9 -9
  70. package/dist/{chunk-KBJJQFYU.js → chunk-ZZEKXGFS.js} +2 -2
  71. package/dist/{cloud-tenants-FBUO66GW.cjs → cloud-tenants-HZHKRUIW.cjs} +16 -16
  72. package/dist/{cloud-tenants-DNBPNQNP.js → cloud-tenants-Q4TCJS5Y.js} +15 -15
  73. package/dist/components/calendar.cjs +4 -4
  74. package/dist/components/calendar.js +1 -1
  75. package/dist/components/case-studies/index.cjs +30 -30
  76. package/dist/components/case-studies/index.js +16 -16
  77. package/dist/components/chat/ask-prompts.d.ts +10 -2
  78. package/dist/components/chat/ask-prompts.d.ts.map +1 -1
  79. package/dist/components/chat/assistant-ask-prompts.d.ts +27 -0
  80. package/dist/components/chat/assistant-ask-prompts.d.ts.map +1 -0
  81. package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
  82. package/dist/components/chat/hooks/index.d.ts +1 -0
  83. package/dist/components/chat/hooks/index.d.ts.map +1 -1
  84. package/dist/components/chat/hooks/use-ask-prompts.d.ts +63 -0
  85. package/dist/components/chat/hooks/use-ask-prompts.d.ts.map +1 -0
  86. package/dist/components/chat/index.cjs +27 -10
  87. package/dist/components/chat/index.d.ts +1 -0
  88. package/dist/components/chat/index.d.ts.map +1 -1
  89. package/dist/components/chat/index.js +26 -9
  90. package/dist/components/chat/utils/icon-library.d.ts.map +1 -1
  91. package/dist/components/contact/index.cjs +17 -17
  92. package/dist/components/contact/index.js +16 -16
  93. package/dist/components/docs/index.cjs +20 -20
  94. package/dist/components/docs/index.js +19 -19
  95. package/dist/components/embeds/index.cjs +17 -17
  96. package/dist/components/embeds/index.js +16 -16
  97. package/dist/components/faq/faq-ask-card.d.ts +44 -0
  98. package/dist/components/faq/faq-ask-card.d.ts.map +1 -0
  99. package/dist/components/faq/faq-document-page.d.ts +5 -1
  100. package/dist/components/faq/faq-document-page.d.ts.map +1 -1
  101. package/dist/components/faq/faq-section.d.ts +18 -5
  102. package/dist/components/faq/faq-section.d.ts.map +1 -1
  103. package/dist/components/faq/index.cjs +19 -18
  104. package/dist/components/faq/index.d.ts +1 -0
  105. package/dist/components/faq/index.d.ts.map +1 -1
  106. package/dist/components/faq/index.js +18 -17
  107. package/dist/components/features/auth/auth-benefits-panel.d.ts.map +1 -1
  108. package/dist/components/features/index.cjs +16 -16
  109. package/dist/components/features/index.js +15 -15
  110. package/dist/components/help-center-pages/download-apps-page.d.ts +55 -0
  111. package/dist/components/help-center-pages/download-apps-page.d.ts.map +1 -0
  112. package/dist/components/help-center-pages/index.cjs +333 -119
  113. package/dist/components/help-center-pages/index.d.ts +1 -0
  114. package/dist/components/help-center-pages/index.d.ts.map +1 -1
  115. package/dist/components/help-center-pages/index.js +251 -37
  116. package/dist/components/help-center-pages/trust-center-page.d.ts +4 -1
  117. package/dist/components/help-center-pages/trust-center-page.d.ts.map +1 -1
  118. package/dist/components/index.cjs +131 -217
  119. package/dist/components/index.js +236 -322
  120. package/dist/components/meeting-scheduler/index.cjs +61 -62
  121. package/dist/components/meeting-scheduler/index.js +18 -19
  122. package/dist/components/navigation/index.cjs +19 -19
  123. package/dist/components/navigation/index.js +18 -18
  124. package/dist/components/navigation/mingo-ai-button.d.ts +1 -1
  125. package/dist/components/navigation/mingo-ai-button.d.ts.map +1 -1
  126. package/dist/components/onboarding-guides/index.cjs +19 -20
  127. package/dist/components/onboarding-guides/index.js +18 -19
  128. package/dist/components/product-demo/index.cjs +8 -8
  129. package/dist/components/product-demo/index.js +8 -8
  130. package/dist/components/related-content/index.cjs +7 -9
  131. package/dist/components/related-content/index.js +6 -8
  132. package/dist/components/tickets/index.cjs +21 -21
  133. package/dist/components/tickets/index.js +20 -20
  134. package/dist/components/ui/button/button.d.ts.map +1 -1
  135. package/dist/components/ui/file-manager/index.cjs +11 -11
  136. package/dist/components/ui/file-manager/index.js +1 -1
  137. package/dist/components/ui/index.cjs +34 -16
  138. package/dist/components/ui/index.d.ts +1 -0
  139. package/dist/components/ui/index.d.ts.map +1 -1
  140. package/dist/components/ui/index.js +33 -15
  141. package/dist/components/ui/mobile-app-qr.d.ts +23 -0
  142. package/dist/components/ui/mobile-app-qr.d.ts.map +1 -0
  143. package/dist/components/ui/store-badges.d.ts +7 -4
  144. package/dist/components/ui/store-badges.d.ts.map +1 -1
  145. package/dist/contexts/assistant-runtime-context.d.ts +74 -0
  146. package/dist/contexts/assistant-runtime-context.d.ts.map +1 -0
  147. package/dist/contexts/index.cjs +7 -1
  148. package/dist/contexts/index.d.ts +1 -0
  149. package/dist/contexts/index.d.ts.map +1 -1
  150. package/dist/contexts/index.js +6 -0
  151. package/dist/{devices-5A5TY4JD.cjs → devices-6XHUFIC6.cjs} +17 -17
  152. package/dist/{devices-PLDAEUSL.js → devices-NOUGVTES.js} +15 -15
  153. package/dist/hooks/index.cjs +10 -5
  154. package/dist/hooks/index.d.ts +1 -0
  155. package/dist/hooks/index.d.ts.map +1 -1
  156. package/dist/hooks/index.js +9 -4
  157. package/dist/hooks/use-downloads.d.ts +41 -0
  158. package/dist/hooks/use-downloads.d.ts.map +1 -0
  159. package/dist/index.cjs +80 -20
  160. package/dist/index.js +79 -19
  161. package/dist/{knowledge-G6Q5KRWV.js → knowledge-2YTUXQ2Z.js} +15 -15
  162. package/dist/{knowledge-FKTJ723Z.cjs → knowledge-ANEKPMO2.cjs} +17 -17
  163. package/dist/{logs-CJCXUBU6.cjs → logs-U3IB3HUM.cjs} +25 -25
  164. package/dist/{logs-QMV6XIC4.js → logs-WVQIONUT.js} +15 -15
  165. package/dist/{policies-G6D7AX6F.js → policies-66EGDW2H.js} +15 -15
  166. package/dist/{policies-QMRTK3CY.cjs → policies-UFRN2EQF.cjs} +20 -20
  167. package/dist/{remote-session-DBD6OSTX.js → remote-session-6WEUJZDC.js} +5 -5
  168. package/dist/{remote-session-2JVI7RVA.cjs → remote-session-A75X5NPC.cjs} +7 -7
  169. package/dist/{software-update-PNZMRDBT.cjs → software-update-2MHKL76D.cjs} +20 -20
  170. package/dist/{software-update-6BQM6BKH.js → software-update-3ZD3MXF3.js} +15 -15
  171. package/dist/{tickets-board-BHLPAVNJ.cjs → tickets-board-IFWMIZ35.cjs} +9 -9
  172. package/dist/{tickets-board-PYDNELSK.js → tickets-board-MYXG3V72.js} +4 -4
  173. package/dist/types/downloads.d.ts +67 -0
  174. package/dist/types/downloads.d.ts.map +1 -0
  175. package/dist/types/index.cjs +24 -0
  176. package/dist/types/index.d.ts +1 -0
  177. package/dist/types/index.d.ts.map +1 -1
  178. package/dist/types/index.js +16 -1
  179. package/dist/utils/index.cjs +46 -2
  180. package/dist/utils/index.d.ts +2 -0
  181. package/dist/utils/index.d.ts.map +1 -1
  182. package/dist/utils/index.js +40 -3
  183. package/dist/utils/list-url.d.ts.map +1 -1
  184. package/dist/utils/mobile-app.cjs +46 -0
  185. package/dist/utils/mobile-app.d.ts +40 -0
  186. package/dist/utils/mobile-app.d.ts.map +1 -0
  187. package/dist/utils/mobile-app.js +40 -0
  188. package/dist/utils/source-icons.d.ts.map +1 -1
  189. package/dist/utils/trial.d.ts +18 -0
  190. package/dist/utils/trial.d.ts.map +1 -0
  191. package/package.json +7 -1
  192. package/src/assets/index.ts +1 -0
  193. package/src/assets/mobile-app-qr.ts +19 -0
  194. package/src/components/chat/ask-prompts.tsx +25 -3
  195. package/src/components/chat/assistant-ask-prompts.tsx +78 -0
  196. package/src/components/chat/entity-cards/dispatch.tsx +38 -4
  197. package/src/components/chat/hooks/index.ts +12 -0
  198. package/src/components/chat/hooks/use-ask-prompts.ts +188 -0
  199. package/src/components/chat/index.ts +1 -0
  200. package/src/components/chat/utils/icon-library.tsx +6 -0
  201. package/src/components/faq/faq-ask-card.tsx +115 -0
  202. package/src/components/faq/faq-document-page.tsx +6 -1
  203. package/src/components/faq/faq-section.tsx +27 -5
  204. package/src/components/faq/index.ts +1 -0
  205. package/src/components/features/auth/auth-benefits-panel.tsx +5 -4
  206. package/src/components/help-center-pages/download-apps-page.tsx +364 -0
  207. package/src/components/help-center-pages/index.ts +1 -0
  208. package/src/components/help-center-pages/trust-center-page.tsx +5 -2
  209. package/src/components/navigation/mingo-ai-button.tsx +27 -6
  210. package/src/components/ui/button/button.tsx +3 -0
  211. package/src/components/ui/index.ts +1 -0
  212. package/src/components/ui/mobile-app-qr.tsx +40 -0
  213. package/src/components/ui/store-badges.tsx +17 -9
  214. package/src/contexts/assistant-runtime-context.tsx +84 -0
  215. package/src/contexts/index.ts +9 -0
  216. package/src/hooks/index.ts +1 -0
  217. package/src/hooks/use-downloads.ts +138 -0
  218. package/src/types/downloads.ts +82 -0
  219. package/src/types/index.ts +1 -0
  220. package/src/utils/index.ts +3 -0
  221. package/src/utils/list-url.ts +4 -0
  222. package/src/utils/mobile-app.ts +57 -0
  223. package/src/utils/source-icons.ts +10 -2
  224. package/src/utils/trial.ts +19 -0
  225. package/dist/chunk-6X3O67OL.cjs +0 -89
  226. package/dist/chunk-AUMKE74M.cjs +0 -16
  227. package/dist/chunk-G3GRYDMS.js +0 -16
  228. package/dist/chunk-RR6PY34K.js +0 -89
@@ -1,25 +1,33 @@
1
1
  "use client";
2
- import {
3
- useSelfFetch
4
- } from "./chunk-RR6PY34K.js";
5
2
  import {
6
3
  PageShell
7
- } from "./chunk-2JLP2X2M.js";
4
+ } from "./chunk-2P2M27EW.js";
8
5
  import {
9
6
  PageLayout
10
- } from "./chunk-Y4MB25KW.js";
7
+ } from "./chunk-GYAXV3MZ.js";
11
8
  import {
12
9
  useScrollToHash
13
- } from "./chunk-IWCPXJEE.js";
10
+ } from "./chunk-2TXGR7IK.js";
14
11
  import {
12
+ ASK_PROMPTS_DEFAULT_COUNT,
13
+ AskCard,
14
+ assistantAvailable,
15
15
  faqItemAnchor,
16
16
  faqSectionSlug,
17
- parseFaqHash
18
- } from "./chunk-JH2SIWPQ.js";
17
+ parseFaqHash,
18
+ useAskPrompts,
19
+ useAssistantOpen,
20
+ useShownAskPromptIds
21
+ } from "./chunk-HXB7SEYG.js";
22
+ import {
23
+ AssistantRuntimeContext,
24
+ useAssistantRuntime
25
+ } from "./chunk-AFTRPEXO.js";
19
26
  import {
20
27
  STICKY_HEADER_OFFSET_PX,
21
- navigateSamePageHash
22
- } from "./chunk-CMZ3QTFQ.js";
28
+ navigateSamePageHash,
29
+ useInView
30
+ } from "./chunk-4I3K6LEH.js";
23
31
  import {
24
32
  serializeJsonLd
25
33
  } from "./chunk-34I6XI3N.js";
@@ -28,8 +36,9 @@ import {
28
36
  } from "./chunk-GY4IZG22.js";
29
37
  import {
30
38
  SECTION_HEADING_CLASS,
31
- buildSuggestionUrl
32
- } from "./chunk-TTVOLEUS.js";
39
+ buildSuggestionUrl,
40
+ useSelfFetch
41
+ } from "./chunk-NPSJE7J3.js";
33
42
  import {
34
43
  Chevron02DownIcon
35
44
  } from "./chunk-NCPTID44.js";
@@ -41,7 +50,7 @@ import {
41
50
  } from "./chunk-7RXWKTAP.js";
42
51
 
43
52
  // src/components/faq/faq-section.tsx
44
- import { useCallback, useEffect, useMemo, useRef, useState as useState2 } from "react";
53
+ import { useCallback, useEffect, useMemo as useMemo2, useRef, useState as useState3 } from "react";
45
54
 
46
55
  // src/components/faq-accordion.tsx
47
56
  import { useState } from "react";
@@ -109,6 +118,54 @@ function FaqAccordion({ items, defaultOpenIds = [] }) {
109
118
  }) });
110
119
  }
111
120
 
121
+ // src/components/faq/faq-ask-card.tsx
122
+ import { useMemo, useState as useState2 } from "react";
123
+ import { jsx as jsx2 } from "react/jsx-runtime";
124
+ var DEFAULT_ASK_CARD = {
125
+ title: "Still deciding?",
126
+ description: "{assistant} answers from our docs and customer stories."
127
+ };
128
+ var PICK_ROOT_MARGIN = "600px";
129
+ var fillAssistant = (text, name) => text.split("{assistant}").join(name);
130
+ function faqAskCardShown(assistant) {
131
+ return assistantAvailable(assistant) && !!assistant.name;
132
+ }
133
+ function FaqAskCard({ topic, exclude, count, title, description, onOpen }) {
134
+ const assistant = useAssistantRuntime();
135
+ const { ref, inView } = useInView({ rootMargin: PICK_ROOT_MARGIN });
136
+ const [reached, setReached] = useState2(false);
137
+ if (inView && !reached) setReached(true);
138
+ const shownElsewhere = useShownAskPromptIds();
139
+ const excluded = exclude === void 0 ? shownElsewhere : exclude;
140
+ const slots = count ?? assistant?.askCard?.count ?? ASK_PROMPTS_DEFAULT_COUNT;
141
+ const { prompts, isLoading, supported } = useAskPrompts({
142
+ topic,
143
+ count: slots,
144
+ exclude: excluded ?? void 0,
145
+ enabled: reached && excluded !== null
146
+ });
147
+ const open = useAssistantOpen(topic, onOpen);
148
+ const scoped = useMemo(() => assistant ? { ...assistant, open } : null, [assistant, open]);
149
+ if (!faqAskCardShown(assistant) || !assistant.name) return null;
150
+ const name = assistant.name;
151
+ const cardDescription = description ?? assistant.askCard?.description ?? DEFAULT_ASK_CARD.description;
152
+ return /* @__PURE__ */ jsx2(AssistantRuntimeContext.Provider, { value: scoped, children: /* @__PURE__ */ jsx2("div", { ref, children: /* @__PURE__ */ jsx2(
153
+ AskCard,
154
+ {
155
+ title: fillAssistant(title ?? assistant.askCard?.title ?? DEFAULT_ASK_CARD.title, name),
156
+ description: cardDescription ? fillAssistant(cardDescription, name) : void 0,
157
+ prompts,
158
+ count: supported ? slots : 0,
159
+ loading: isLoading,
160
+ source: assistant.source,
161
+ label: name,
162
+ icon: assistant.icon,
163
+ onOpen: open,
164
+ onAsk: (prompt) => assistant.onAsk?.({ promptId: prompt.id, topic })
165
+ }
166
+ ) }) });
167
+ }
168
+
112
169
  // src/components/faq/json-ld.ts
113
170
  var DEFAULT_NAME = "Frequently Asked Questions";
114
171
  var DEFAULT_DESCRIPTION = "Answers to common questions.";
@@ -136,7 +193,7 @@ function buildFaqJsonLdFromFaqs(faqs, opts = {}) {
136
193
  }
137
194
 
138
195
  // src/components/faq/faq-section.tsx
139
- import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
196
+ import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
140
197
  var DEFAULT_HEADING_TEXT = "Frequently Asked Questions";
141
198
  function buildFaqsUrl(entityType, entityId, minResults, apiBaseUrl = "") {
142
199
  return buildSuggestionUrl("/api/faqs", { apiBaseUrl, entityType, entityId, count: minResults });
@@ -172,8 +229,8 @@ function GroupedFaqList({
172
229
  aside
173
230
  }) {
174
231
  const CategoryHeading = categoryHeadingAs;
175
- const navGroups = useMemo(() => groups.filter((g) => g.slug), [groups]);
176
- const [activeSlug, setActiveSlug] = useState2(navGroups[0]?.slug ?? null);
232
+ const navGroups = useMemo2(() => groups.filter((g) => g.slug), [groups]);
233
+ const [activeSlug, setActiveSlug] = useState3(navGroups[0]?.slug ?? null);
177
234
  const slugKey = navGroups.map((g) => g.slug).join("|");
178
235
  const navGroupsRef = useRef(navGroups);
179
236
  useEffect(() => {
@@ -207,14 +264,14 @@ function GroupedFaqList({
207
264
  }
208
265
  return () => observer.disconnect();
209
266
  }, [slugKey]);
210
- const [hashTarget, setHashTarget] = useState2(null);
267
+ const [hashTarget, setHashTarget] = useState3(null);
211
268
  useEffect(() => {
212
269
  const refresh = () => setHashTarget(parseFaqHash(window.location.hash));
213
270
  refresh();
214
271
  window.addEventListener("hashchange", refresh);
215
272
  return () => window.removeEventListener("hashchange", refresh);
216
273
  }, []);
217
- const defaultOpenByGroupKey = useMemo(() => {
274
+ const defaultOpenByGroupKey = useMemo2(() => {
218
275
  if (hashTarget?.kind !== "item") return null;
219
276
  const targetId = hashTarget.rawId;
220
277
  const result = /* @__PURE__ */ new Map();
@@ -227,7 +284,7 @@ function GroupedFaqList({
227
284
  const accordionKeySuffix = hashTarget?.kind === "item" ? `item:${hashTarget.rawId}` : "default";
228
285
  const scrollDep = `${groups.length}|` + (hashTarget?.kind === "item" ? `item:${hashTarget.rawId}` : hashTarget?.kind === "section" ? `section:${hashTarget.slug}` : "none");
229
286
  useScrollToHash(scrollDep, { headerOffset: STICKY_HEADER_OFFSET_PX });
230
- const [pillSyncedHash, setPillSyncedHash] = useState2(hashTarget);
287
+ const [pillSyncedHash, setPillSyncedHash] = useState3(hashTarget);
231
288
  if (pillSyncedHash !== hashTarget) {
232
289
  setPillSyncedHash(hashTarget);
233
290
  if (hashTarget?.kind === "section") setActiveSlug(hashTarget.slug);
@@ -239,9 +296,9 @@ function GroupedFaqList({
239
296
  history: "replace"
240
297
  });
241
298
  }, []);
242
- const categoryNav = navGroups.length > 1 && /* @__PURE__ */ jsx2("nav", { "aria-label": "FAQ categories", className: "flex flex-wrap gap-2", children: navGroups.map((group) => {
299
+ const categoryNav = navGroups.length > 1 && /* @__PURE__ */ jsx3("nav", { "aria-label": "FAQ categories", className: "flex flex-wrap gap-2", children: navGroups.map((group) => {
243
300
  const isActive = group.slug === activeSlug;
244
- return /* @__PURE__ */ jsx2(
301
+ return /* @__PURE__ */ jsx3(
245
302
  next_link_default,
246
303
  {
247
304
  href: `#${group.slug}`,
@@ -256,11 +313,11 @@ function GroupedFaqList({
256
313
  group.slug
257
314
  );
258
315
  }) });
259
- const questions = /* @__PURE__ */ jsx2("div", { className: "space-y-10", children: groups.map((group) => {
316
+ const questions = /* @__PURE__ */ jsx3("div", { className: "space-y-10", children: groups.map((group) => {
260
317
  const key = groupKey(group);
261
318
  return /* @__PURE__ */ jsxs2("section", { id: group.slug ?? void 0, className: "scroll-mt-24 space-y-4", children: [
262
- group.section && /* @__PURE__ */ jsx2(CategoryHeading, { className: SECTION_HEADING_CLASS, children: group.section }),
263
- /* @__PURE__ */ jsx2(
319
+ group.section && /* @__PURE__ */ jsx3(CategoryHeading, { className: SECTION_HEADING_CLASS, children: group.section }),
320
+ /* @__PURE__ */ jsx3(
264
321
  FaqAccordion,
265
322
  {
266
323
  items: group.items,
@@ -281,16 +338,16 @@ function GroupedFaqList({
281
338
  heading,
282
339
  categoryNav
283
340
  ] }),
284
- /* @__PURE__ */ jsx2("div", { className: "content-lg:col-start-2 content-lg:row-span-2 content-lg:row-start-1", children: questions }),
285
- /* @__PURE__ */ jsx2("div", { className: "content-lg:col-start-1 content-lg:row-start-2", children: aside })
341
+ /* @__PURE__ */ jsx3("div", { className: "content-lg:col-start-2 content-lg:row-span-2 content-lg:row-start-1", children: questions }),
342
+ /* @__PURE__ */ jsx3("div", { className: "content-lg:col-start-1 content-lg:row-start-2", children: aside })
286
343
  ] });
287
344
  }
288
345
  function FaqSkeleton() {
289
346
  return /* @__PURE__ */ jsxs2("div", { className: "animate-pulse space-y-8", children: [
290
- /* @__PURE__ */ jsx2("div", { className: "h-12 w-2/3 rounded bg-ods-border content-md:h-14" }),
291
- /* @__PURE__ */ jsx2("div", { className: "w-full divide-y divide-ods-border overflow-hidden rounded-md border border-ods-border bg-transparent", children: Array.from({ length: 8 }).map((_, idx) => /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between gap-6 px-6 py-4 content-md:gap-10", children: [
292
- /* @__PURE__ */ jsx2("div", { className: "h-6 w-5/6 rounded bg-ods-border" }),
293
- /* @__PURE__ */ jsx2("div", { className: "size-6 rounded bg-ods-border" })
347
+ /* @__PURE__ */ jsx3("div", { className: "h-12 w-2/3 rounded bg-ods-border content-md:h-14" }),
348
+ /* @__PURE__ */ jsx3("div", { className: "w-full divide-y divide-ods-border overflow-hidden rounded-md border border-ods-border bg-transparent", children: Array.from({ length: 8 }).map((_, idx) => /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between gap-6 px-6 py-4 content-md:gap-10", children: [
349
+ /* @__PURE__ */ jsx3("div", { className: "h-6 w-5/6 rounded bg-ods-border" }),
350
+ /* @__PURE__ */ jsx3("div", { className: "size-6 rounded bg-ods-border" })
294
351
  ] }, idx)) })
295
352
  ] });
296
353
  }
@@ -304,27 +361,31 @@ function FaqSection({
304
361
  className,
305
362
  minResults,
306
363
  apiBaseUrl = "",
307
- aside
364
+ aside: asideProp,
365
+ ask
308
366
  }) {
367
+ const assistant = useAssistantRuntime();
368
+ const askTopic = ask === false ? void 0 : ask?.topic || entityType;
369
+ const aside = asideProp ?? (ask !== false && askTopic && faqAskCardShown(assistant) ? /* @__PURE__ */ jsx3(FaqAskCard, { ...ask, topic: askTopic }) : void 0);
309
370
  const url = buildFaqsUrl(entityType, entityId, minResults, apiBaseUrl);
310
- const initialData = useMemo(
371
+ const initialData = useMemo2(
311
372
  () => initialFaqs ? { faqs: initialFaqs } : void 0,
312
373
  [initialFaqs]
313
374
  );
314
375
  const { data, isLoading, error } = useSelfFetch(url, { initialData });
315
- const faqs = useMemo(() => data?.faqs ?? [], [data?.faqs]);
316
- const groups = useMemo(() => faqs.length > 0 ? groupFaqsBySection(faqs) : [], [faqs]);
317
- const headingNode = heading === void 0 ? /* @__PURE__ */ jsx2("h2", { className: SECTION_HEADING_CLASS, children: DEFAULT_HEADING_TEXT }) : heading;
376
+ const faqs = useMemo2(() => data?.faqs ?? [], [data?.faqs]);
377
+ const groups = useMemo2(() => faqs.length > 0 ? groupFaqsBySection(faqs) : [], [faqs]);
378
+ const headingNode = heading === void 0 ? /* @__PURE__ */ jsx3("h2", { className: SECTION_HEADING_CLASS, children: DEFAULT_HEADING_TEXT }) : heading;
318
379
  if (error) return null;
319
380
  if (!isLoading && faqs.length === 0) return null;
320
381
  if (isLoading && faqs.length === 0) {
321
- return /* @__PURE__ */ jsx2("div", { className, children: /* @__PURE__ */ jsx2(FaqSkeleton, {}) });
382
+ return /* @__PURE__ */ jsx3("div", { className, children: /* @__PURE__ */ jsx3(FaqSkeleton, {}) });
322
383
  }
323
384
  const schema = emitJsonLd ? buildFaqJsonLdFromFaqs(faqs, jsonLd) : null;
324
385
  return /* @__PURE__ */ jsxs2(Fragment, { children: [
325
386
  /* @__PURE__ */ jsxs2("section", { className: className ?? "space-y-10", children: [
326
387
  !aside && headingNode,
327
- /* @__PURE__ */ jsx2(
388
+ /* @__PURE__ */ jsx3(
328
389
  GroupedFaqList,
329
390
  {
330
391
  groups,
@@ -334,7 +395,7 @@ function FaqSection({
334
395
  }
335
396
  )
336
397
  ] }),
337
- schema && /* @__PURE__ */ jsx2(
398
+ schema && /* @__PURE__ */ jsx3(
338
399
  "script",
339
400
  {
340
401
  type: "application/ld+json",
@@ -345,7 +406,7 @@ function FaqSection({
345
406
  }
346
407
 
347
408
  // src/components/faq/faq-document-page.tsx
348
- import { jsx as jsx3 } from "react/jsx-runtime";
409
+ import { jsx as jsx4 } from "react/jsx-runtime";
349
410
  function FaqDocumentPage({
350
411
  title = "Frequently Asked Questions",
351
412
  subtitle,
@@ -357,6 +418,7 @@ function FaqDocumentPage({
357
418
  entityType,
358
419
  entityId,
359
420
  minResults,
421
+ ask,
360
422
  shell = true
361
423
  }) {
362
424
  const router = useRouter();
@@ -364,7 +426,7 @@ function FaqDocumentPage({
364
426
  label: backButton?.label ?? "Back to home",
365
427
  onClick: () => router.push(backButton?.href ?? "/")
366
428
  };
367
- const inner = /* @__PURE__ */ jsx3(PageLayout, { title, subtitle, backButton: backCfg, titleSize: "h1", titleWrap: true, children: /* @__PURE__ */ jsx3(
429
+ const inner = /* @__PURE__ */ jsx4(PageLayout, { title, subtitle, backButton: backCfg, titleSize: "h1", titleWrap: true, children: /* @__PURE__ */ jsx4(
368
430
  FaqSection,
369
431
  {
370
432
  initialFaqs,
@@ -374,14 +436,16 @@ function FaqDocumentPage({
374
436
  apiBaseUrl,
375
437
  entityType,
376
438
  entityId,
377
- minResults
439
+ minResults,
440
+ ask
378
441
  }
379
442
  ) });
380
- return shell ? /* @__PURE__ */ jsx3(PageShell, { children: inner }) : /* @__PURE__ */ jsx3("div", { className: "page-shell-content", children: inner });
443
+ return shell ? /* @__PURE__ */ jsx4(PageShell, { children: inner }) : /* @__PURE__ */ jsx4("div", { className: "page-shell-content", children: inner });
381
444
  }
382
445
 
383
446
  export {
384
447
  FaqAccordion,
448
+ FaqAskCard,
385
449
  FaqSection,
386
450
  FaqDocumentPage
387
451
  };
@@ -1,18 +1,18 @@
1
1
  "use client";
2
2
  import {
3
3
  useOnboardingState
4
- } from "./chunk-IWCPXJEE.js";
4
+ } from "./chunk-2TXGR7IK.js";
5
5
  import {
6
6
  ShellTypeValues,
7
7
  getOSLabel,
8
8
  getShellLabel
9
- } from "./chunk-JH2SIWPQ.js";
9
+ } from "./chunk-HXB7SEYG.js";
10
10
  import {
11
11
  InteractiveCard,
12
12
  SECTION_HEADING_CLASS,
13
13
  StatusBadge,
14
14
  accentSentenceMarks
15
- } from "./chunk-TTVOLEUS.js";
15
+ } from "./chunk-NPSJE7J3.js";
16
16
  import {
17
17
  nameInitials
18
18
  } from "./chunk-IYVFSLWJ.js";
@@ -43,7 +43,7 @@ import {
43
43
  } from "./chunk-CMGFZHCN.js";
44
44
  import {
45
45
  Button
46
- } from "./chunk-YDPKUAP4.js";
46
+ } from "./chunk-DJ4IFQNQ.js";
47
47
  import {
48
48
  cn
49
49
  } from "./chunk-7RXWKTAP.js";