@axos-web-dev/shared-components 1.0.100-dev.34 → 1.0.100-dev.35-chatbot-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.
Files changed (72) hide show
  1. package/dist/ATMLocator/ATMLocator.js +1 -0
  2. package/dist/Auth/ErrorAlert.js +1 -0
  3. package/dist/Avatar/Avatar.module.js +7 -7
  4. package/dist/Blockquote/Blockquote.module.js +3 -3
  5. package/dist/Button/Button.js +1 -0
  6. package/dist/Calculators/Calculator.js +2 -1
  7. package/dist/Carousel/index.js +1 -0
  8. package/dist/Chatbot/Bubble.d.ts +3 -1
  9. package/dist/Chatbot/Bubble.js +6 -3
  10. package/dist/Chatbot/ChatWindow.css.js +1 -0
  11. package/dist/Chatbot/ChatWindow.d.ts +2 -6
  12. package/dist/Chatbot/Chatbot.css.js +0 -1
  13. package/dist/Chatbot/Chatbot.d.ts +6 -1
  14. package/dist/Chatbot/Chatbot.js +192 -22
  15. package/dist/Chatbot/index.d.ts +0 -1
  16. package/dist/Chatbot/index.js +0 -2
  17. package/dist/Chatbot/store/chat.d.ts +1 -0
  18. package/dist/Chatbot/store/chat.js +10 -3
  19. package/dist/Chevron/index.js +1 -0
  20. package/dist/Comparison/Comparison.js +1 -0
  21. package/dist/ExecutiveBio/ExecutiveBio.js +1 -0
  22. package/dist/FaqAccordion/index.js +1 -0
  23. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +1 -0
  24. package/dist/Forms/ApplyNow.js +1 -0
  25. package/dist/Forms/ContactUsBusiness.js +1 -0
  26. package/dist/Forms/ContactUsBusinessNameEmail.js +1 -0
  27. package/dist/Forms/ContactUsNMLSId.js +1 -0
  28. package/dist/Forms/CraPublicFile.js +1 -0
  29. package/dist/Forms/EmailOnly.js +1 -0
  30. package/dist/Forms/MortgageRate/MortgageRateForm.js +1 -0
  31. package/dist/Forms/MortgageRate/MortgageRateWatch.js +1 -0
  32. package/dist/Forms/MortgageWarehouseLending.js +1 -0
  33. package/dist/Forms/SuccesForm.js +2 -1
  34. package/dist/Hyperlink/index.js +1 -0
  35. package/dist/ImageLink/ImageLink.js +1 -0
  36. package/dist/ImageLink/ImageLinkSet.js +1 -0
  37. package/dist/ImageLink/index.js +1 -0
  38. package/dist/Insight/Featured/CategorySelector.js +1 -0
  39. package/dist/Insight/Featured/Featured.js +1 -0
  40. package/dist/Insight/Featured/Header.js +1 -0
  41. package/dist/Modal/Modal.js +1 -0
  42. package/dist/NavigationMenu/AxosALTS/NavData.js +1 -0
  43. package/dist/NavigationMenu/AxosALTS/index.js +1 -0
  44. package/dist/NavigationMenu/AxosAdvisor/NavBar.module.js +52 -52
  45. package/dist/NavigationMenu/AxosAdvisorServices/NavBar.module.js +53 -53
  46. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.module.js +16 -16
  47. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +1 -0
  48. package/dist/NavigationMenu/AxosBank/NavBar.module.js +39 -39
  49. package/dist/NavigationMenu/AxosBank/NavData.js +1 -0
  50. package/dist/NavigationMenu/AxosBank/SubNavBar.js +1 -0
  51. package/dist/NavigationMenu/AxosBank/index.js +1 -0
  52. package/dist/NavigationMenu/AxosClearing/NavBar.module.js +37 -37
  53. package/dist/NavigationMenu/AxosFiduciary/NavBar.module.js +41 -41
  54. package/dist/NavigationMenu/LaVictoire/NavData.js +1 -0
  55. package/dist/NavigationMenu/LaVictoire/index.js +1 -0
  56. package/dist/NavigationMenu/NavDataJson.js +1 -0
  57. package/dist/NavigationMenu/Navbar.js +1 -0
  58. package/dist/NavigationMenu/SignInNavButton.js +1 -0
  59. package/dist/SetContainer/SetContainer.js +1 -0
  60. package/dist/SocialMediaBar/iconsRepository.js +1 -0
  61. package/dist/VideoTile/VideoTile.js +1 -0
  62. package/dist/VideoWrapper/index.js +1 -0
  63. package/dist/assets/Avatar/Avatar.css.css +59 -59
  64. package/dist/assets/Blockquote/Blockquote.css.css +72 -72
  65. package/dist/assets/NavigationMenu/AxosAdvisor/NavBar.css.css +609 -609
  66. package/dist/assets/NavigationMenu/AxosAdvisorServices/NavBar.css.css +630 -630
  67. package/dist/assets/NavigationMenu/AxosBank/MobileMenu/MobileMenu.css.css +192 -192
  68. package/dist/assets/NavigationMenu/AxosBank/NavBar.css.css +445 -445
  69. package/dist/assets/NavigationMenu/AxosClearing/NavBar.css.css +484 -484
  70. package/dist/assets/NavigationMenu/AxosFiduciary/NavBar.css.css +427 -427
  71. package/dist/main.js +0 -2
  72. package/package.json +136 -136
@@ -73,6 +73,7 @@ import "../Chatbot/authenticate.js";
73
73
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
74
74
  /* empty css */
75
75
  import "../Chatbot/store/messages.js";
76
+ import "@ujet/websdk-headless";
76
77
  /* empty css */
77
78
  import "../Comparison/Comparison.css.js";
78
79
  import "next/image.js";
@@ -65,6 +65,7 @@ import "../Chatbot/authenticate.js";
65
65
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
66
66
  /* empty css */
67
67
  import "../Chatbot/store/messages.js";
68
+ import "@ujet/websdk-headless";
68
69
  import { Hyperlink } from "../Hyperlink/index.js";
69
70
  /* empty css */
70
71
  import "../Comparison/Comparison.css.js";
@@ -1,10 +1,10 @@
1
- import '../assets/Avatar/Avatar.css.css';const avatar_sec = "_avatar_sec_q4a8z_1";
2
- const container = "_container_q4a8z_9";
3
- const image = "_image_q4a8z_27";
4
- const text = "_text_q4a8z_45";
5
- const name = "_name_q4a8z_57";
6
- const title = "_title_q4a8z_73";
7
- const description = "_description_q4a8z_87";
1
+ import '../assets/Avatar/Avatar.css.css';const avatar_sec = "_avatar_sec_1clr6_1";
2
+ const container = "_container_1clr6_5";
3
+ const image = "_image_1clr6_14";
4
+ const text = "_text_1clr6_23";
5
+ const name = "_name_1clr6_29";
6
+ const title = "_title_1clr6_37";
7
+ const description = "_description_1clr6_44";
8
8
  const css = {
9
9
  avatar_sec,
10
10
  container,
@@ -1,6 +1,6 @@
1
- import '../assets/Blockquote/Blockquote.css.css';const quote_spacer = "_quote_spacer_lqs2u_1";
2
- const author = "_author_lqs2u_13";
3
- const quote = "_quote_lqs2u_1";
1
+ import '../assets/Blockquote/Blockquote.css.css';const quote_spacer = "_quote_spacer_ovx4r_1";
2
+ const author = "_author_ovx4r_7";
3
+ const quote = "_quote_ovx4r_1";
4
4
  const css = {
5
5
  quote_spacer,
6
6
  author,
@@ -76,6 +76,7 @@ import "../Chatbot/authenticate.js";
76
76
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
77
77
  /* empty css */
78
78
  import "../Chatbot/store/messages.js";
79
+ import "@ujet/websdk-headless";
79
80
  /* empty css */
80
81
  import "../Comparison/Comparison.css.js";
81
82
  import "next/image.js";
@@ -52,10 +52,11 @@ import "../Carousel/index.js";
52
52
  /* empty css */
53
53
  import "../Chatbot/store/chat.js";
54
54
  import "../Chatbot/authenticate.js";
55
- import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
56
55
  import "react-use";
56
+ import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
57
57
  /* empty css */
58
58
  import "../Chatbot/store/messages.js";
59
+ import "@ujet/websdk-headless";
59
60
  /* empty css */
60
61
  import "../Comparison/Comparison.css.js";
61
62
  import "next/image.js";
@@ -78,6 +78,7 @@ import "../Chatbot/authenticate.js";
78
78
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
79
79
  /* empty css */
80
80
  import "../Chatbot/store/messages.js";
81
+ import "@ujet/websdk-headless";
81
82
  /* empty css */
82
83
  import "../Comparison/Comparison.css.js";
83
84
  import "next/image.js";
@@ -1,3 +1,5 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
 
3
- export declare const Bubble: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const Bubble: ({ children, onClick, }: PropsWithChildren & {
4
+ onClick?: () => void;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -3,10 +3,13 @@ import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import { AnimatePresence, motion } from "framer-motion";
4
4
  import { bubbleWrapper, svgFill } from "./Bubble.css.js";
5
5
  import { useOpenChat } from "./store/chat.js";
6
- const Bubble = ({ children }) => {
6
+ const Bubble = ({
7
+ children,
8
+ onClick = () => {
9
+ }
10
+ }) => {
7
11
  const isOpen = useOpenChat((state) => state.isOpen);
8
- const toggle = useOpenChat((state) => state.toggle);
9
- return /* @__PURE__ */ jsxs("div", { className: bubbleWrapper, onClick: toggle, children: [
12
+ return /* @__PURE__ */ jsxs("div", { className: bubbleWrapper, onClick, children: [
10
13
  /* @__PURE__ */ jsx("div", { className: "bubble-circle flex", children: /* @__PURE__ */ jsx(AnimatePresence, { children: !isOpen ? /* @__PURE__ */ jsxs(
11
14
  motion.svg,
12
15
  {
@@ -1,3 +1,4 @@
1
+ import "./Chatbot.css.ts.vanilla.css.js";
1
2
  import '../assets/Chatbot/ChatWindow.css';/* empty css */
2
3
  var windowStyle = "_13n1jqk0";
3
4
  var windowOpenStyle = "_13n1jqk1";
@@ -1,4 +1,4 @@
1
- import { MessageResponse as BaseMessageResponse, HumanAgent } from '@ujet/websdk-headless';
1
+ import { MessageResponse as BaseMessageResponse, HumanAgent, VirtualAgent } from '@ujet/websdk-headless';
2
2
  import { default as React } from 'react';
3
3
 
4
4
  interface MessageResponse extends BaseMessageResponse {
@@ -19,11 +19,7 @@ interface ChatWindowProps {
19
19
  onClose?: () => void;
20
20
  endChat?: () => void;
21
21
  showReconnect?: boolean;
22
- virtualAgent?: {
23
- avatar_url: string;
24
- name: string;
25
- id: string;
26
- };
22
+ virtualAgent?: VirtualAgent | null;
27
23
  showAvatar?: boolean;
28
24
  }
29
25
  export declare const ChatWindow: React.FC<ChatWindowProps>;
@@ -1,4 +1,3 @@
1
- import "./Chatbot.css.ts.vanilla.css.js";
2
1
  var chatbotAXB = "_1hpv6vm0";
3
2
  var chatbotUFB = "_1hpv6vm1";
4
3
  export {
@@ -2,4 +2,9 @@ export type ChatbotProps = {
2
2
  project?: "axos" | "ufb";
3
3
  debug?: boolean;
4
4
  };
5
- export declare const Chatbot: (props: ChatbotProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const Chatbot: ({ project, projectEnv, menuOption, }: {
6
+ project?: "axos" | "ufb";
7
+ projectEnv?: "dev" | "qa" | "uat" | "stg" | "prod";
8
+ menuOption?: "Support Virtual Agent" | string;
9
+ debug?: boolean;
10
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -2,37 +2,207 @@
2
2
  import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import { authenticate } from "./authenticate.js";
4
4
  import { Bubble } from "./Bubble.js";
5
- import { chatbotUFB, chatbotAXB } from "./Chatbot.css.js";
6
5
  import { ChatWindow } from "./ChatWindow.js";
7
6
  import { useOpenChat } from "./store/chat.js";
8
7
  import { useMessages } from "./store/messages.js";
9
- import { useHeadlessChat } from "./useHeadlessChat.js";
10
- const Chatbot = (props) => {
11
- const messages = useMessages((state) => state.messages);
12
- const close = useOpenChat((state) => state.close);
13
- const { status, sendMessage, showReconnect, endChat, virtualAgent } = useHeadlessChat({
14
- companyId: process.env.CCAI_COMPANY_ID || "",
15
- tenant: process.env.CCAI_TENANT_NAME || "",
16
- host: process.env.CCAI_HOST || "",
17
- // or your region
18
- projectId: process.env.CCAI_PROJECT_ID || props.project || "axos",
19
- getToken: authenticate,
20
- debug: props.debug || process.env.NODE_ENV === "development"
8
+ import { Logger, consoleLoggerHandler, Client } from "@ujet/websdk-headless";
9
+ import { useRef, useState } from "react";
10
+ import { useMount, useUnmount } from "react-use";
11
+ const Chatbot = ({
12
+ project = "axos",
13
+ projectEnv = "dev",
14
+ menuOption = "Support Virtual Agent"
15
+ }) => {
16
+ const { hasOpenedOnce, toggle, reset } = useOpenChat();
17
+ const { addMessage, addMessages, clearMessages, messages } = useMessages();
18
+ const clientRef = useRef(null);
19
+ const menuRef = useRef(null);
20
+ const isMountedRef = useRef(false);
21
+ const chatRef = useRef(null);
22
+ const agent_virtual = useRef(null);
23
+ const [status, setStatus] = useState("idle");
24
+ const [hasStarted, setHasStarted] = useState(false);
25
+ const brandMap = /* @__PURE__ */ new Map([
26
+ ["axos", 1],
27
+ ["ufb", 3]
28
+ ]);
29
+ const custom_data = {
30
+ unsigned: {
31
+ facingBrandId: {
32
+ label: "facingBrandId",
33
+ value: `${brandMap.get(project) || 1}`
34
+ },
35
+ channel: {
36
+ label: "channel",
37
+ value: "in_web"
38
+ },
39
+ user_auth: {
40
+ label: "user_auth",
41
+ value: "false"
42
+ },
43
+ env: {
44
+ label: "env",
45
+ value: projectEnv
46
+ }
47
+ }
48
+ };
49
+ if (projectEnv !== "prod") {
50
+ Logger.addHandler(consoleLoggerHandler);
51
+ }
52
+ const onReadyHandler = async () => {
53
+ console.log("Chat client is ready");
54
+ };
55
+ const onAuthenticatedHandler = async () => {
56
+ console.log("Chat client is authenticated");
57
+ };
58
+ const onChatOngoingHandler = async (chat) => {
59
+ console.log("Ongoing chat:", chat);
60
+ };
61
+ const onChatMessageHandler = async (message) => {
62
+ console.log("Received message:", message);
63
+ addMessage(message);
64
+ };
65
+ const onChatTypingStartedHandler = async (identity) => {
66
+ console.log("Typing started by:", identity);
67
+ };
68
+ const onChatDisconnectedHandler = async () => {
69
+ console.log("Chat disconnected");
70
+ setStatus("idle");
71
+ };
72
+ const onDismissedHandler = async () => {
73
+ console.log("Chat dismissed");
74
+ };
75
+ const onTimeoutHandler = async () => {
76
+ console.log("Chat timeout");
77
+ };
78
+ const onEndedHandler = async () => {
79
+ console.log("Chat ended");
80
+ setStatus("finished");
81
+ };
82
+ const onDestroyedHandler = async () => {
83
+ console.log("Chat destroyed");
84
+ };
85
+ const onChatMemberLeftHandler = async (identity) => {
86
+ console.log("Chat member left:", identity);
87
+ };
88
+ const registerEventHandlers = () => {
89
+ clientRef.current?.on("ready", onReadyHandler);
90
+ clientRef.current?.on("authenticated", onAuthenticatedHandler);
91
+ clientRef.current?.on("chat.ongoing", onChatOngoingHandler);
92
+ clientRef.current?.on("chat.message", onChatMessageHandler);
93
+ clientRef.current?.on("chat.typingStarted", onChatTypingStartedHandler);
94
+ clientRef.current?.on("chat.disconnected", onChatDisconnectedHandler);
95
+ clientRef.current?.on("chat.dismissed", onDismissedHandler);
96
+ clientRef.current?.on("chat.timeout", onTimeoutHandler);
97
+ clientRef.current?.on("chat.ended", onEndedHandler);
98
+ clientRef.current?.on("chat.destroyed", onDestroyedHandler);
99
+ clientRef.current?.on("chat.memberLeft", onChatMemberLeftHandler);
100
+ };
101
+ const deregisterEventHandlers = () => {
102
+ clientRef.current?.off("ready", onReadyHandler);
103
+ clientRef.current?.off("authenticated", onAuthenticatedHandler);
104
+ clientRef.current?.off("chat.ongoing", onDismissedHandler);
105
+ clientRef.current?.off("chat.message", onChatMessageHandler);
106
+ clientRef.current?.off("chat.typingStarted", onChatTypingStartedHandler);
107
+ clientRef.current?.off("chat.disconnected", onChatDisconnectedHandler);
108
+ clientRef.current?.off("chat.dismissed", onDismissedHandler);
109
+ clientRef.current?.off("chat.timeout", onTimeoutHandler);
110
+ clientRef.current?.off("chat.ended", onEndedHandler);
111
+ clientRef.current?.off("chat.destroyed", onDestroyedHandler);
112
+ clientRef.current?.off("chat.memberLeft", onChatMemberLeftHandler);
113
+ };
114
+ const createClient = async () => {
115
+ const client = new Client({
116
+ companyId: process.env.CCAI_COMPANY_ID || "",
117
+ tenant: process.env.CCAI_TENANT_NAME || "",
118
+ host: process.env.CCAI_HOST || "",
119
+ // or your region
120
+ authenticate
121
+ });
122
+ clientRef.current = client;
123
+ menuRef.current = await client.getMenus();
124
+ console.log("menus:", menuRef.current);
125
+ registerEventHandlers();
126
+ return;
127
+ };
128
+ const startChat = async () => {
129
+ console.log("Starting chat");
130
+ const client = clientRef.current;
131
+ if (!client) return;
132
+ try {
133
+ const ongoingChat = await client.loadOngoingChat();
134
+ if (ongoingChat) {
135
+ console.log("Ongoing chat found:", ongoingChat);
136
+ console.log("Resuming chat:", ongoingChat.id);
137
+ chatRef.current = await client.resumeChat(ongoingChat.id);
138
+ agent_virtual.current = ongoingChat.agent;
139
+ clientRef?.current?.on("chat.connected", async () => {
140
+ setStatus("connected");
141
+ console.log("connected");
142
+ const messages2 = await clientRef.current?.fetchMessages();
143
+ if (messages2) {
144
+ addMessages(messages2);
145
+ }
146
+ });
147
+ return;
148
+ }
149
+ const foundMenu = menuRef.current.menus.find(
150
+ (menu) => menu.name === menuOption
151
+ );
152
+ const menuId = foundMenu && foundMenu.id;
153
+ console.log("Creating new chat with menu ID:", menuId);
154
+ const newChat = await client.createChat(menuId, { custom_data });
155
+ if (newChat !== null) {
156
+ chatRef.current = newChat;
157
+ console.log("Chat created id:", newChat.id);
158
+ }
159
+ } catch (err) {
160
+ console.error("Error creating chat:", err);
161
+ }
162
+ };
163
+ const handleClick = async () => {
164
+ toggle();
165
+ if (hasStarted) return;
166
+ if (!hasOpenedOnce) {
167
+ await startChat();
168
+ setHasStarted(true);
169
+ }
170
+ };
171
+ const onSendMessage = (msg) => {
172
+ console.log("Sending message:", msg);
173
+ clientRef.current?.sendTextMessage(msg);
174
+ };
175
+ const onEndChat = async () => {
176
+ console.log("Ending chat");
177
+ if (chatRef.current) {
178
+ await clientRef.current?.finishChat();
179
+ clearMessages();
180
+ chatRef.current = null;
181
+ console.log("Chat ended");
182
+ reset();
183
+ }
184
+ };
185
+ useMount(async () => {
186
+ console.log("Chatbot mounted");
187
+ if (isMountedRef.current) return;
188
+ isMountedRef.current = true;
189
+ await createClient();
190
+ });
191
+ useUnmount(() => {
192
+ console.log("Chatbot unmounted");
193
+ deregisterEventHandlers();
194
+ isMountedRef.current = false;
21
195
  });
22
- return /* @__PURE__ */ jsxs("div", { className: props.project === "ufb" ? chatbotUFB : chatbotAXB, children: [
23
- /* @__PURE__ */ jsx(Bubble, {}),
196
+ return /* @__PURE__ */ jsxs("div", { children: [
197
+ /* @__PURE__ */ jsx(Bubble, { onClick: handleClick }),
24
198
  /* @__PURE__ */ jsx(
25
199
  ChatWindow,
26
200
  {
27
201
  status,
28
- onClose: close,
202
+ virtualAgent: agent_virtual.current,
29
203
  messages,
30
- onSend: function(msg) {
31
- sendMessage(msg);
32
- },
33
- endChat,
34
- virtualAgent,
35
- showReconnect
204
+ onSend: onSendMessage,
205
+ endChat: onEndChat
36
206
  }
37
207
  )
38
208
  ] });
@@ -6,4 +6,3 @@ export * from './ChatWindow';
6
6
  export * from './ChatWindow.css';
7
7
  export * from './store/chat';
8
8
  export * from './store/messages';
9
- export * from './useHeadlessChat';
@@ -7,7 +7,6 @@ import { ChatWindow } from "./ChatWindow.js";
7
7
  import { arrowFill, button_reset, chatFinishDialog, chatNetworkStatus, chat_title, chatbotMenu, chatbotMenuItem, endChatButtonStyle, inline_button, inline_button_wrapper, inputStyle, messageStyle, messagesContainerStyle, notificationStyle, sendButtonStyle, windowBarStyle, windowOpenStyle, windowStyle } from "./ChatWindow.css.js";
8
8
  import { useOpenChat } from "./store/chat.js";
9
9
  import { useMessages } from "./store/messages.js";
10
- import { useHeadlessChat } from "./useHeadlessChat.js";
11
10
  export {
12
11
  Bubble,
13
12
  ChatWindow,
@@ -31,7 +30,6 @@ export {
31
30
  notificationStyle,
32
31
  sendButtonStyle,
33
32
  svgFill,
34
- useHeadlessChat,
35
33
  useMessages,
36
34
  useOpenChat,
37
35
  windowBarStyle,
@@ -1,5 +1,6 @@
1
1
  interface OpenChatState {
2
2
  isOpen: boolean;
3
+ hasOpenedOnce: boolean;
3
4
  toggle: () => void;
4
5
  open: () => void;
5
6
  close: () => void;
@@ -1,10 +1,17 @@
1
1
  import { create } from "zustand";
2
- const useOpenChat = create((set) => ({
2
+ const useOpenChat = create((set, get) => ({
3
3
  isOpen: false,
4
+ hasOpenedOnce: false,
4
5
  toggle: () => set((state) => ({ isOpen: !state.isOpen })),
5
- open: () => set({ isOpen: true }),
6
+ open: () => {
7
+ const alreadyOpened = get().hasOpenedOnce;
8
+ set({
9
+ isOpen: true,
10
+ hasOpenedOnce: alreadyOpened ? true : true
11
+ });
12
+ },
6
13
  close: () => set({ isOpen: false }),
7
- reset: () => set({ isOpen: false })
14
+ reset: () => set({ hasOpenedOnce: false, isOpen: false })
8
15
  }));
9
16
  export {
10
17
  useOpenChat
@@ -78,6 +78,7 @@ import "../Chatbot/authenticate.js";
78
78
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
79
79
  /* empty css */
80
80
  import "../Chatbot/store/messages.js";
81
+ import "@ujet/websdk-headless";
81
82
  /* empty css */
82
83
  import "../Comparison/Comparison.css.js";
83
84
  import "next/image.js";
@@ -78,6 +78,7 @@ import "../Chatbot/authenticate.js";
78
78
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
79
79
  /* empty css */
80
80
  import "../Chatbot/store/messages.js";
81
+ import "@ujet/websdk-headless";
81
82
  /* empty css */
82
83
  import { comparison_layout, comparison_content, headerComparison, feature_header, feature_title, comparison_feature, comparison_list, comparison_buttons, comparison } from "./Comparison.css.js";
83
84
  import "next/image.js";
@@ -78,6 +78,7 @@ import "../Chatbot/authenticate.js";
78
78
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
79
79
  /* empty css */
80
80
  import "../Chatbot/store/messages.js";
81
+ import "@ujet/websdk-headless";
81
82
  /* empty css */
82
83
  import "../Comparison/Comparison.css.js";
83
84
  import "next/image.js";
@@ -79,6 +79,7 @@ import "../Chatbot/authenticate.js";
79
79
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
80
80
  /* empty css */
81
81
  import "../Chatbot/store/messages.js";
82
+ import "@ujet/websdk-headless";
82
83
  /* empty css */
83
84
  import "../Comparison/Comparison.css.js";
84
85
  import "next/image.js";
@@ -74,6 +74,7 @@ import "../../Chatbot/authenticate.js";
74
74
  import "../../Chatbot/Chatbot.css.ts.vanilla.css.js";
75
75
  /* empty css */
76
76
  import "../../Chatbot/store/messages.js";
77
+ import "@ujet/websdk-headless";
77
78
  /* empty css */
78
79
  import "../../Comparison/Comparison.css.js";
79
80
  import "next/image.js";
@@ -79,6 +79,7 @@ import "../Chatbot/authenticate.js";
79
79
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
80
80
  /* empty css */
81
81
  import "../Chatbot/store/messages.js";
82
+ import "@ujet/websdk-headless";
82
83
  /* empty css */
83
84
  import "../Comparison/Comparison.css.js";
84
85
  import "next/image.js";
@@ -80,6 +80,7 @@ import "../Chatbot/authenticate.js";
80
80
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
81
81
  /* empty css */
82
82
  import "../Chatbot/store/messages.js";
83
+ import "@ujet/websdk-headless";
83
84
  /* empty css */
84
85
  import "../Comparison/Comparison.css.js";
85
86
  import "next/image.js";
@@ -80,6 +80,7 @@ import "../Chatbot/authenticate.js";
80
80
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
81
81
  /* empty css */
82
82
  import "../Chatbot/store/messages.js";
83
+ import "@ujet/websdk-headless";
83
84
  /* empty css */
84
85
  import "../Comparison/Comparison.css.js";
85
86
  import "next/image.js";
@@ -80,6 +80,7 @@ import "../Chatbot/authenticate.js";
80
80
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
81
81
  /* empty css */
82
82
  import "../Chatbot/store/messages.js";
83
+ import "@ujet/websdk-headless";
83
84
  /* empty css */
84
85
  import "../Comparison/Comparison.css.js";
85
86
  import "next/image.js";
@@ -80,6 +80,7 @@ import "../Chatbot/authenticate.js";
80
80
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
81
81
  /* empty css */
82
82
  import "../Chatbot/store/messages.js";
83
+ import "@ujet/websdk-headless";
83
84
  /* empty css */
84
85
  import "../Comparison/Comparison.css.js";
85
86
  import "next/image.js";
@@ -81,6 +81,7 @@ import "../Chatbot/authenticate.js";
81
81
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
82
82
  /* empty css */
83
83
  import "../Chatbot/store/messages.js";
84
+ import "@ujet/websdk-headless";
84
85
  /* empty css */
85
86
  import "../Comparison/Comparison.css.js";
86
87
  import "next/image.js";
@@ -81,6 +81,7 @@ import "../../Chatbot/authenticate.js";
81
81
  import "../../Chatbot/Chatbot.css.ts.vanilla.css.js";
82
82
  /* empty css */
83
83
  import "../../Chatbot/store/messages.js";
84
+ import "@ujet/websdk-headless";
84
85
  /* empty css */
85
86
  import "../../Comparison/Comparison.css.js";
86
87
  import "next/image.js";
@@ -77,6 +77,7 @@ import "../../Chatbot/authenticate.js";
77
77
  import "../../Chatbot/Chatbot.css.ts.vanilla.css.js";
78
78
  /* empty css */
79
79
  import "../../Chatbot/store/messages.js";
80
+ import "@ujet/websdk-headless";
80
81
  /* empty css */
81
82
  import "../../Comparison/Comparison.css.js";
82
83
  import "next/image.js";
@@ -80,6 +80,7 @@ import "../Chatbot/authenticate.js";
80
80
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
81
81
  /* empty css */
82
82
  import "../Chatbot/store/messages.js";
83
+ import "@ujet/websdk-headless";
83
84
  /* empty css */
84
85
  import "../Comparison/Comparison.css.js";
85
86
  import "next/image.js";
@@ -61,10 +61,11 @@ import "../Carousel/index.js";
61
61
  /* empty css */
62
62
  import "../Chatbot/store/chat.js";
63
63
  import "../Chatbot/authenticate.js";
64
- import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
65
64
  import "react-use";
65
+ import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
66
66
  /* empty css */
67
67
  import "../Chatbot/store/messages.js";
68
+ import "@ujet/websdk-headless";
68
69
  /* empty css */
69
70
  import "../Comparison/Comparison.css.js";
70
71
  import "next/image.js";
@@ -73,6 +73,7 @@ import "../Chatbot/authenticate.js";
73
73
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
74
74
  /* empty css */
75
75
  import "../Chatbot/store/messages.js";
76
+ import "@ujet/websdk-headless";
76
77
  /* empty css */
77
78
  import "../Comparison/Comparison.css.js";
78
79
  import "next/image.js";
@@ -72,6 +72,7 @@ import "../Chatbot/authenticate.js";
72
72
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
73
73
  /* empty css */
74
74
  import "../Chatbot/store/messages.js";
75
+ import "@ujet/websdk-headless";
75
76
  /* empty css */
76
77
  import "../Comparison/Comparison.css.js";
77
78
  import "../Tab/Tab.css.js";
@@ -79,6 +79,7 @@ import "../Chatbot/authenticate.js";
79
79
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
80
80
  /* empty css */
81
81
  import "../Chatbot/store/messages.js";
82
+ import "@ujet/websdk-headless";
82
83
  /* empty css */
83
84
  import "../Comparison/Comparison.css.js";
84
85
  import "../Tab/Tab.css.js";
@@ -71,6 +71,7 @@ import "../Chatbot/authenticate.js";
71
71
  import "../Chatbot/Chatbot.css.ts.vanilla.css.js";
72
72
  /* empty css */
73
73
  import "../Chatbot/store/messages.js";
74
+ import "@ujet/websdk-headless";
74
75
  /* empty css */
75
76
  import "../Comparison/Comparison.css.js";
76
77
  import "next/image.js";
@@ -75,6 +75,7 @@ import "../../Chatbot/authenticate.js";
75
75
  import "../../Chatbot/Chatbot.css.ts.vanilla.css.js";
76
76
  /* empty css */
77
77
  import "../../Chatbot/store/messages.js";
78
+ import "@ujet/websdk-headless";
78
79
  /* empty css */
79
80
  import "../../Comparison/Comparison.css.js";
80
81
  import "next/image.js";
@@ -76,6 +76,7 @@ import "../../Chatbot/authenticate.js";
76
76
  import "../../Chatbot/Chatbot.css.ts.vanilla.css.js";
77
77
  /* empty css */
78
78
  import "../../Chatbot/store/messages.js";
79
+ import "@ujet/websdk-headless";
79
80
  /* empty css */
80
81
  import "../../Comparison/Comparison.css.js";
81
82
  import Image from "next/image.js";