@tekibo/feedpulse-sdk 0.7.3 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -83
- package/dist/core/cookies.d.ts +37 -0
- package/dist/core/struggle-detector.d.ts +33 -0
- package/dist/core/tracker.d.ts +38 -0
- package/dist/core/types.d.ts +59 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +127 -176
- package/dist/nuxt/BotPanel.vue.d.ts +17 -0
- package/dist/nuxt/FeedPulseBot.vue.d.ts +24 -0
- package/dist/nuxt/FeedPulseProvider.vue.d.ts +21 -0
- package/dist/nuxt/FeedPulseWidget.vue.d.ts +10 -0
- package/dist/nuxt/composables.d.ts +4 -0
- package/dist/nuxt/consent-banner.vue.d.ts +16 -0
- package/dist/nuxt/index.d.ts +5 -0
- package/dist/nuxt.d.ts +2 -0
- package/dist/nuxt.js +2 -2
- package/dist/nuxt.mjs +283 -336
- package/dist/react/FeedPulseBot.d.ts +21 -0
- package/dist/react/FeedPulseProvider.d.ts +13 -0
- package/dist/react/FeedPulseWidget.d.ts +8 -0
- package/dist/react/consent-banner.d.ts +11 -0
- package/dist/react/hooks.d.ts +1 -0
- package/dist/react/index.d.ts +4 -0
- package/dist/react.d.ts +2 -0
- package/dist/react.js +3 -3
- package/dist/react.mjs +275 -315
- package/dist/struggle-detector-CT3YShuG.js +1 -0
- package/dist/{struggle-detector-BqTHgw95.mjs → struggle-detector-Cwe3PD9s.mjs} +40 -25
- package/package.json +4 -11
- package/templates/nextjs-proxy.ts +36 -36
- package/templates/nuxt-bot-proxy.ts +60 -93
- package/templates/nuxt-proxy.ts +44 -44
- package/bin/feedpulse-bot-build.mjs +0 -121
- package/dist/server.js +0 -1
- package/dist/server.mjs +0 -18
- package/dist/struggle-detector-DV52qDLp.js +0 -1
- package/templates/nuxt-config-id-route.ts +0 -15
package/dist/nuxt.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import {
|
|
3
|
-
import { S as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
return
|
|
1
|
+
import { inject as V, defineComponent as D, ref as x, computed as B, watch as U, openBlock as r, createElementBlock as g, createElementVNode as t, Fragment as _, renderList as L, normalizeStyle as T, toDisplayString as I, createCommentVNode as w, withDirectives as R, vModelText as O, onMounted as M, onBeforeUnmount as F, createTextVNode as A, createStaticVNode as W, createBlock as N, Teleport as J, vModelCheckbox as j, provide as G, renderSlot as K } from "vue";
|
|
2
|
+
import { CookieManager as Y, FeedPulseTracker as Q } from "./index.mjs";
|
|
3
|
+
import { S as X } from "./struggle-detector-Cwe3PD9s.mjs";
|
|
4
|
+
const q = /* @__PURE__ */ Symbol("feedpulse");
|
|
5
|
+
function Z() {
|
|
6
|
+
return V(q, null);
|
|
7
7
|
}
|
|
8
|
-
const
|
|
8
|
+
const ee = { style: {
|
|
9
9
|
width: "360px",
|
|
10
10
|
height: "520px",
|
|
11
11
|
background: "#111827",
|
|
@@ -17,20 +17,20 @@ const ne = { style: {
|
|
|
17
17
|
flexDirection: "column",
|
|
18
18
|
overflow: "hidden",
|
|
19
19
|
animation: "fp-panel-open 300ms ease-out"
|
|
20
|
-
} },
|
|
20
|
+
} }, te = { style: {
|
|
21
21
|
display: "flex",
|
|
22
22
|
justifyContent: "space-between",
|
|
23
23
|
alignItems: "center",
|
|
24
24
|
padding: "12px 14px",
|
|
25
25
|
borderBottom: "1px solid #374151",
|
|
26
26
|
background: "#0f172a"
|
|
27
|
-
} },
|
|
27
|
+
} }, oe = { style: { flex: 1, overflowY: "auto", padding: "12px", display: "grid", gap: "10px" } }, ne = {
|
|
28
28
|
key: 0,
|
|
29
29
|
style: { display: "flex", gap: "8px" }
|
|
30
|
-
},
|
|
30
|
+
}, ae = ["onClick"], ie = ["onClick"], se = {
|
|
31
31
|
key: 0,
|
|
32
32
|
style: { display: "flex", alignItems: "center", gap: "5px", padding: "4px 0" }
|
|
33
|
-
},
|
|
33
|
+
}, le = {
|
|
34
34
|
key: 1,
|
|
35
35
|
style: {
|
|
36
36
|
border: "1px solid #f59e0b",
|
|
@@ -40,125 +40,89 @@ const ne = { style: {
|
|
|
40
40
|
padding: "10px",
|
|
41
41
|
fontSize: "12px"
|
|
42
42
|
}
|
|
43
|
-
}, pe = {
|
|
44
|
-
key: 2,
|
|
45
|
-
style: {
|
|
46
|
-
margin: "8px 0",
|
|
47
|
-
padding: "12px",
|
|
48
|
-
background: "#f0f0ff",
|
|
49
|
-
border: "1px solid #c7d2fe",
|
|
50
|
-
borderRadius: "10px",
|
|
51
|
-
fontSize: "13px",
|
|
52
|
-
color: "#111827"
|
|
53
|
-
}
|
|
54
|
-
}, ce = { style: { margin: "0 0 8px", fontWeight: "600" } }, fe = { style: { display: "flex", gap: "8px" } }, xe = {
|
|
55
|
-
key: 3,
|
|
56
|
-
style: {
|
|
57
|
-
margin: "0 0 8px",
|
|
58
|
-
padding: "10px",
|
|
59
|
-
background: "#ecfdf5",
|
|
60
|
-
border: "1px solid #6ee7b7",
|
|
61
|
-
borderRadius: "8px",
|
|
62
|
-
fontSize: "13px",
|
|
63
|
-
color: "#065f46"
|
|
64
|
-
}
|
|
65
|
-
}, ge = { style: { display: "flex", gap: "8px" } }, ve = ["disabled"], be = ["disabled"], ye = ["href"], me = /* @__PURE__ */ E({
|
|
43
|
+
}, re = { style: { display: "flex", gap: "8px" } }, de = ["disabled"], ue = ["disabled"], pe = ["href"], ce = /* @__PURE__ */ D({
|
|
66
44
|
__name: "BotPanel",
|
|
67
45
|
props: {
|
|
68
46
|
botSessionId: {},
|
|
69
47
|
config: {},
|
|
70
|
-
configId: {},
|
|
71
|
-
page: {},
|
|
72
48
|
unavailable: { type: Boolean }
|
|
73
49
|
},
|
|
74
50
|
emits: ["close", "helpful", "escalated"],
|
|
75
|
-
setup(
|
|
76
|
-
const
|
|
77
|
-
function
|
|
78
|
-
return
|
|
79
|
-
role:
|
|
80
|
-
content:
|
|
51
|
+
setup(d, { emit: a }) {
|
|
52
|
+
const l = d, o = a, i = x({}), e = x([]), n = x(""), u = x(!1), y = x(!1), m = B(() => n.value.trim().length > 0 && !u.value && !l.unavailable && !y.value);
|
|
53
|
+
function v() {
|
|
54
|
+
return e.value.map((s) => ({
|
|
55
|
+
role: s.role,
|
|
56
|
+
content: s.content
|
|
81
57
|
}));
|
|
82
58
|
}
|
|
83
|
-
async function
|
|
84
|
-
if (
|
|
59
|
+
async function b(s) {
|
|
60
|
+
if (s.preventDefault(), !m.value)
|
|
85
61
|
return;
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
{
|
|
89
|
-
role: "user",
|
|
90
|
-
content: c
|
|
91
|
-
}
|
|
92
|
-
];
|
|
93
|
-
i.value = "", t.value.push({
|
|
62
|
+
const p = n.value.trim();
|
|
63
|
+
n.value = "", e.value.push({
|
|
94
64
|
id: `user-${Date.now()}`,
|
|
95
65
|
role: "user",
|
|
96
|
-
content:
|
|
66
|
+
content: p
|
|
97
67
|
});
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
id:
|
|
68
|
+
const c = `assistant-${Date.now()}`;
|
|
69
|
+
e.value.push({
|
|
70
|
+
id: c,
|
|
101
71
|
role: "assistant",
|
|
102
72
|
content: ""
|
|
103
|
-
}),
|
|
73
|
+
}), u.value = !0, y.value = !1;
|
|
104
74
|
try {
|
|
105
|
-
const
|
|
75
|
+
const S = await fetch("/api/bot/chat-proxy", {
|
|
106
76
|
method: "POST",
|
|
107
77
|
headers: { "content-type": "application/json" },
|
|
108
78
|
body: JSON.stringify({
|
|
109
|
-
botSessionId:
|
|
110
|
-
config: JSON.parse(JSON.stringify(
|
|
111
|
-
|
|
112
|
-
page: a.page,
|
|
113
|
-
messages: n
|
|
79
|
+
botSessionId: l.botSessionId,
|
|
80
|
+
config: JSON.parse(JSON.stringify(l.config)),
|
|
81
|
+
messages: v()
|
|
114
82
|
})
|
|
115
83
|
});
|
|
116
|
-
if (
|
|
84
|
+
if (S.status === 402) {
|
|
117
85
|
y.value = !0;
|
|
118
|
-
const
|
|
119
|
-
|
|
86
|
+
const k = e.value.find((z) => z.id === c);
|
|
87
|
+
k && (k.content = "Service temporarily unavailable.");
|
|
120
88
|
return;
|
|
121
89
|
}
|
|
122
|
-
if (!
|
|
90
|
+
if (!S.ok)
|
|
123
91
|
throw new Error("Chat request failed");
|
|
124
|
-
const
|
|
125
|
-
|
|
92
|
+
const $ = S.body?.getReader();
|
|
93
|
+
if (!$)
|
|
94
|
+
throw new Error("Missing stream");
|
|
95
|
+
const h = new TextDecoder();
|
|
96
|
+
let f = !1;
|
|
97
|
+
for (; !f; ) {
|
|
98
|
+
const k = await $.read();
|
|
99
|
+
if (f = k.done, k.value) {
|
|
100
|
+
const z = h.decode(k.value, { stream: !f }), E = e.value.find((H) => H.id === c);
|
|
101
|
+
E && (E.content += z);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
126
104
|
} catch {
|
|
127
|
-
const
|
|
128
|
-
|
|
105
|
+
const S = e.value.find(($) => $.id === c);
|
|
106
|
+
S && !S.content && (S.content = "Sorry, I couldn't process that. Please try again.");
|
|
129
107
|
} finally {
|
|
130
|
-
|
|
108
|
+
u.value = !1;
|
|
131
109
|
}
|
|
132
110
|
}
|
|
133
|
-
function
|
|
134
|
-
|
|
111
|
+
function C(s, p) {
|
|
112
|
+
i.value[s] = p, o("helpful", p);
|
|
135
113
|
}
|
|
136
|
-
function
|
|
114
|
+
function P() {
|
|
137
115
|
o("escalated");
|
|
138
116
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
const c = g.value;
|
|
147
|
-
g.value = null;
|
|
148
|
-
const n = await m.perform(c);
|
|
149
|
-
x.value = n.message, setTimeout(() => {
|
|
150
|
-
x.value = null;
|
|
151
|
-
}, 3e3);
|
|
152
|
-
}
|
|
153
|
-
return J(() => a.botSessionId, () => {
|
|
154
|
-
l.value = {}, t.value = [], i.value = "", y.value = !1, g.value = null, x.value = null;
|
|
155
|
-
}), (S, c) => (r(), f("div", ne, [
|
|
156
|
-
e("div", ae, [
|
|
157
|
-
c[4] || (c[4] = e("div", { style: { display: "grid", gap: "2px" } }, [
|
|
158
|
-
e("strong", { style: { fontSize: "14px", color: "#fff" } }, "Pulse Bot"),
|
|
159
|
-
e("span", { style: { fontSize: "11px", color: "#94a3b8" } }, "Powered by FeedPulse AI")
|
|
117
|
+
return U(() => l.botSessionId, () => {
|
|
118
|
+
i.value = {}, e.value = [], n.value = "", y.value = !1;
|
|
119
|
+
}), (s, p) => (r(), g("div", ee, [
|
|
120
|
+
t("div", te, [
|
|
121
|
+
p[2] || (p[2] = t("div", { style: { display: "grid", gap: "2px" } }, [
|
|
122
|
+
t("strong", { style: { fontSize: "14px", color: "#fff" } }, "Pulse Bot"),
|
|
123
|
+
t("span", { style: { fontSize: "11px", color: "#94a3b8" } }, "Powered by FeedPulse AI")
|
|
160
124
|
], -1)),
|
|
161
|
-
|
|
125
|
+
t("button", {
|
|
162
126
|
style: {
|
|
163
127
|
border: "none",
|
|
164
128
|
background: "transparent",
|
|
@@ -167,86 +131,72 @@ const ne = { style: {
|
|
|
167
131
|
fontSize: "18px",
|
|
168
132
|
lineHeight: "1"
|
|
169
133
|
},
|
|
170
|
-
onClick:
|
|
134
|
+
onClick: p[0] || (p[0] = (c) => o("close"))
|
|
171
135
|
}, " × ")
|
|
172
136
|
]),
|
|
173
|
-
|
|
174
|
-
(r(!0),
|
|
175
|
-
key:
|
|
176
|
-
style:
|
|
137
|
+
t("div", oe, [
|
|
138
|
+
(r(!0), g(_, null, L(e.value, (c) => (r(), g("div", {
|
|
139
|
+
key: c.id,
|
|
140
|
+
style: T({
|
|
177
141
|
display: "grid",
|
|
178
|
-
justifyItems:
|
|
142
|
+
justifyItems: c.role === "user" ? "end" : "start",
|
|
179
143
|
gap: "6px"
|
|
180
144
|
})
|
|
181
145
|
}, [
|
|
182
|
-
|
|
183
|
-
style:
|
|
146
|
+
t("div", {
|
|
147
|
+
style: T({
|
|
184
148
|
maxWidth: "85%",
|
|
185
149
|
padding: "9px 11px",
|
|
186
|
-
borderRadius:
|
|
187
|
-
background:
|
|
150
|
+
borderRadius: c.role === "user" ? "14px 14px 2px 14px" : "14px 14px 14px 2px",
|
|
151
|
+
background: c.role === "user" ? "#4f46e5" : "#1f2937",
|
|
188
152
|
color: "#fff",
|
|
189
153
|
fontSize: "13px",
|
|
190
154
|
lineHeight: "1.4",
|
|
191
155
|
whiteSpace: "pre-wrap"
|
|
192
156
|
})
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
style:
|
|
157
|
+
}, I(c.content), 5),
|
|
158
|
+
c.role === "assistant" ? (r(), g("div", ne, [
|
|
159
|
+
t("button", {
|
|
160
|
+
style: T({
|
|
197
161
|
border: "1px solid #334155",
|
|
198
|
-
background:
|
|
162
|
+
background: i.value[c.id] === !0 ? "#16a34a" : "#0f172a",
|
|
199
163
|
color: "#e2e8f0",
|
|
200
164
|
borderRadius: "8px",
|
|
201
165
|
fontSize: "12px",
|
|
202
166
|
padding: "4px 8px",
|
|
203
167
|
cursor: "pointer"
|
|
204
168
|
}),
|
|
205
|
-
onClick: (
|
|
206
|
-
}, " 👍 ", 12,
|
|
207
|
-
|
|
208
|
-
style:
|
|
169
|
+
onClick: (S) => C(c.id, !0)
|
|
170
|
+
}, " 👍 ", 12, ae),
|
|
171
|
+
t("button", {
|
|
172
|
+
style: T({
|
|
209
173
|
border: "1px solid #334155",
|
|
210
|
-
background:
|
|
174
|
+
background: i.value[c.id] === !1 ? "#dc2626" : "#0f172a",
|
|
211
175
|
color: "#e2e8f0",
|
|
212
176
|
borderRadius: "8px",
|
|
213
177
|
fontSize: "12px",
|
|
214
178
|
padding: "4px 8px",
|
|
215
179
|
cursor: "pointer"
|
|
216
180
|
}),
|
|
217
|
-
onClick: (
|
|
218
|
-
}, " 👎 ", 12,
|
|
219
|
-
])) :
|
|
181
|
+
onClick: (S) => C(c.id, !1)
|
|
182
|
+
}, " 👎 ", 12, ie)
|
|
183
|
+
])) : w("", !0)
|
|
220
184
|
], 4))), 128)),
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
])])) :
|
|
226
|
-
|
|
227
|
-
g.value ? (r(), f("div", pe, [
|
|
228
|
-
e("p", ce, " Want me to " + T(g.value.type) + ' "' + T(g.value.label) + '"? ', 1),
|
|
229
|
-
e("div", fe, [
|
|
230
|
-
e("button", {
|
|
231
|
-
style: { padding: "6px 16px", background: "#6366f1", color: "#fff", border: "none", borderRadius: "6px", cursor: "pointer", fontSize: "12px" },
|
|
232
|
-
onClick: c[1] || (c[1] = (n) => R(!0))
|
|
233
|
-
}, " ✓ Yes, do it "),
|
|
234
|
-
e("button", {
|
|
235
|
-
style: { padding: "6px 16px", background: "transparent", border: "1px solid #c7d2fe", borderRadius: "6px", cursor: "pointer", fontSize: "12px", color: "#111827" },
|
|
236
|
-
onClick: c[2] || (c[2] = (n) => R(!1))
|
|
237
|
-
}, " No thanks ")
|
|
238
|
-
])
|
|
239
|
-
])) : h("", !0),
|
|
240
|
-
x.value ? (r(), f("div", xe, T(x.value), 1)) : h("", !0)
|
|
185
|
+
u.value ? (r(), g("div", se, [...p[3] || (p[3] = [
|
|
186
|
+
t("span", { style: { width: "8px", height: "8px", borderRadius: "999px", background: "#94a3b8", animation: "fp-dot 1s infinite 0ms" } }, null, -1),
|
|
187
|
+
t("span", { style: { width: "8px", height: "8px", borderRadius: "999px", background: "#94a3b8", animation: "fp-dot 1s infinite 160ms" } }, null, -1),
|
|
188
|
+
t("span", { style: { width: "8px", height: "8px", borderRadius: "999px", background: "#94a3b8", animation: "fp-dot 1s infinite 320ms" } }, null, -1)
|
|
189
|
+
])])) : w("", !0),
|
|
190
|
+
d.unavailable || y.value ? (r(), g("div", le, " Service temporarily unavailable. ")) : w("", !0)
|
|
241
191
|
]),
|
|
242
|
-
|
|
192
|
+
t("form", {
|
|
243
193
|
style: { padding: "10px", borderTop: "1px solid #374151", display: "grid", gap: "8px" },
|
|
244
|
-
onSubmit:
|
|
194
|
+
onSubmit: b
|
|
245
195
|
}, [
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
"onUpdate:modelValue":
|
|
249
|
-
disabled:
|
|
196
|
+
t("div", re, [
|
|
197
|
+
R(t("input", {
|
|
198
|
+
"onUpdate:modelValue": p[1] || (p[1] = (c) => n.value = c),
|
|
199
|
+
disabled: u.value || d.unavailable,
|
|
250
200
|
style: {
|
|
251
201
|
flex: 1,
|
|
252
202
|
borderRadius: "10px",
|
|
@@ -258,34 +208,34 @@ const ne = { style: {
|
|
|
258
208
|
outline: "none"
|
|
259
209
|
},
|
|
260
210
|
placeholder: "Ask a question..."
|
|
261
|
-
}, null, 8,
|
|
262
|
-
[
|
|
211
|
+
}, null, 8, de), [
|
|
212
|
+
[O, n.value]
|
|
263
213
|
]),
|
|
264
|
-
|
|
214
|
+
t("button", {
|
|
265
215
|
type: "submit",
|
|
266
|
-
disabled: !
|
|
267
|
-
style:
|
|
216
|
+
disabled: !m.value,
|
|
217
|
+
style: T({
|
|
268
218
|
border: "none",
|
|
269
219
|
borderRadius: "10px",
|
|
270
|
-
background:
|
|
220
|
+
background: m.value ? "#6366f1" : "#334155",
|
|
271
221
|
color: "#fff",
|
|
272
222
|
fontWeight: "600",
|
|
273
223
|
fontSize: "12px",
|
|
274
224
|
padding: "0 14px",
|
|
275
|
-
cursor:
|
|
225
|
+
cursor: m.value ? "pointer" : "not-allowed"
|
|
276
226
|
})
|
|
277
|
-
}, " Send ", 12,
|
|
227
|
+
}, " Send ", 12, ue)
|
|
278
228
|
]),
|
|
279
|
-
|
|
229
|
+
d.config.escalateTo ? (r(), g("a", {
|
|
280
230
|
key: 0,
|
|
281
|
-
href:
|
|
231
|
+
href: d.config.escalateTo.url,
|
|
282
232
|
style: { color: "#c4b5fd", fontSize: "12px", textDecoration: "none" },
|
|
283
|
-
onClick:
|
|
284
|
-
},
|
|
233
|
+
onClick: P
|
|
234
|
+
}, I(d.config.escalateTo.label), 9, pe)) : w("", !0)
|
|
285
235
|
], 32)
|
|
286
236
|
]));
|
|
287
237
|
}
|
|
288
|
-
}),
|
|
238
|
+
}), $e = /* @__PURE__ */ D({
|
|
289
239
|
__name: "FeedPulseBot",
|
|
290
240
|
props: {
|
|
291
241
|
faq: {},
|
|
@@ -299,34 +249,33 @@ const ne = { style: {
|
|
|
299
249
|
escalateTo: {},
|
|
300
250
|
initialMessage: { default: "👋 Need help?" },
|
|
301
251
|
position: { default: "bottom-right" },
|
|
302
|
-
config: {}
|
|
303
|
-
configId: {}
|
|
252
|
+
config: {}
|
|
304
253
|
},
|
|
305
|
-
setup(
|
|
306
|
-
const
|
|
307
|
-
let
|
|
308
|
-
const C =
|
|
309
|
-
pageContext:
|
|
310
|
-
systemPrompt:
|
|
311
|
-
faq:
|
|
312
|
-
canNavigate:
|
|
313
|
-
navigableElements:
|
|
314
|
-
canHelpForms:
|
|
315
|
-
formGuide:
|
|
316
|
-
features:
|
|
317
|
-
escalateTo:
|
|
318
|
-
initialMessage:
|
|
319
|
-
}),
|
|
254
|
+
setup(d) {
|
|
255
|
+
const a = d, l = new Y(), o = x(!1), i = x(!1), e = x(!1), n = x(!1), u = x(""), y = x(null), m = x(!1);
|
|
256
|
+
let v = null, b = null;
|
|
257
|
+
const C = B(() => a.config ?? {
|
|
258
|
+
pageContext: a.pageContext,
|
|
259
|
+
systemPrompt: a.systemPrompt,
|
|
260
|
+
faq: a.faq,
|
|
261
|
+
canNavigate: a.canNavigate,
|
|
262
|
+
navigableElements: a.navigableElements,
|
|
263
|
+
canHelpForms: a.canHelpForms,
|
|
264
|
+
formGuide: a.formGuide,
|
|
265
|
+
features: a.features,
|
|
266
|
+
escalateTo: a.escalateTo,
|
|
267
|
+
initialMessage: a.initialMessage
|
|
268
|
+
}), P = B(() => ({
|
|
320
269
|
position: "fixed",
|
|
321
270
|
bottom: "24px",
|
|
322
271
|
zIndex: "10000",
|
|
323
|
-
...
|
|
272
|
+
...a.position === "bottom-left" ? { left: "24px" } : { right: "24px" }
|
|
324
273
|
}));
|
|
325
|
-
function
|
|
274
|
+
function s() {
|
|
326
275
|
if (typeof document > "u" || document.getElementById("fp-bot-animations"))
|
|
327
276
|
return;
|
|
328
|
-
const
|
|
329
|
-
|
|
277
|
+
const h = document.createElement("style");
|
|
278
|
+
h.id = "fp-bot-animations", h.textContent = `
|
|
330
279
|
@keyframes fp-bubble-in {
|
|
331
280
|
0% { opacity: 0; transform: scale(0.8) translateY(6px); }
|
|
332
281
|
100% { opacity: 1; transform: scale(1) translateY(0); }
|
|
@@ -345,73 +294,73 @@ const ne = { style: {
|
|
|
345
294
|
50% { opacity: 1; transform: translateY(-3px); }
|
|
346
295
|
100% { opacity: 0.2; transform: translateY(0); }
|
|
347
296
|
}
|
|
348
|
-
`, document.head.appendChild(
|
|
297
|
+
`, document.head.appendChild(h);
|
|
349
298
|
}
|
|
350
|
-
async function
|
|
351
|
-
const
|
|
299
|
+
async function p(h, f) {
|
|
300
|
+
const k = l.getAllData(!0);
|
|
352
301
|
try {
|
|
353
|
-
const
|
|
302
|
+
const z = await fetch("/api/bot/session-proxy", {
|
|
354
303
|
method: "POST",
|
|
355
304
|
headers: { "content-type": "application/json" },
|
|
356
305
|
body: JSON.stringify({
|
|
357
306
|
page: window.location.pathname,
|
|
358
|
-
triggerScore:
|
|
359
|
-
triggerReasons:
|
|
360
|
-
sessionId:
|
|
361
|
-
visitorId:
|
|
307
|
+
triggerScore: h,
|
|
308
|
+
triggerReasons: f,
|
|
309
|
+
sessionId: k.sessionId,
|
|
310
|
+
visitorId: k.userId,
|
|
362
311
|
device: navigator.userAgent
|
|
363
312
|
})
|
|
364
313
|
});
|
|
365
|
-
if (!
|
|
366
|
-
|
|
314
|
+
if (!z.ok) {
|
|
315
|
+
z.status === 402 && (n.value = !0);
|
|
367
316
|
return;
|
|
368
317
|
}
|
|
369
|
-
const
|
|
370
|
-
|
|
318
|
+
const E = await z.json().catch(() => null);
|
|
319
|
+
E?.botSessionId && (u.value = E.botSessionId);
|
|
371
320
|
} catch {
|
|
372
321
|
}
|
|
373
322
|
}
|
|
374
|
-
function
|
|
375
|
-
|
|
323
|
+
function c(h, f) {
|
|
324
|
+
i.value = !0, o.value = !0, n.value = !1, y.value = null, m.value = !1, p(h, f), b && clearTimeout(b), b = setTimeout(() => {
|
|
376
325
|
o.value = !1;
|
|
377
326
|
}, 8e3);
|
|
378
327
|
}
|
|
379
328
|
function S() {
|
|
380
|
-
|
|
329
|
+
e.value = !0, o.value = !1;
|
|
381
330
|
}
|
|
382
|
-
async function
|
|
383
|
-
if (
|
|
331
|
+
async function $() {
|
|
332
|
+
if (e.value = !1, !!u.value)
|
|
384
333
|
try {
|
|
385
334
|
await fetch("/api/bot/session-end-proxy", {
|
|
386
335
|
method: "POST",
|
|
387
336
|
headers: { "content-type": "application/json" },
|
|
388
337
|
body: JSON.stringify({
|
|
389
|
-
botSessionId:
|
|
390
|
-
wasHelpful:
|
|
391
|
-
escalated:
|
|
338
|
+
botSessionId: u.value,
|
|
339
|
+
wasHelpful: y.value,
|
|
340
|
+
escalated: m.value
|
|
392
341
|
})
|
|
393
342
|
});
|
|
394
343
|
} catch {
|
|
395
344
|
}
|
|
396
345
|
}
|
|
397
|
-
return
|
|
398
|
-
|
|
399
|
-
onTrigger: (
|
|
400
|
-
|
|
346
|
+
return M(() => {
|
|
347
|
+
s(), v = new X({
|
|
348
|
+
onTrigger: (h, f) => {
|
|
349
|
+
c(h, f);
|
|
401
350
|
}
|
|
402
|
-
}),
|
|
403
|
-
}),
|
|
404
|
-
|
|
405
|
-
}), (
|
|
406
|
-
style:
|
|
351
|
+
}), v.start();
|
|
352
|
+
}), F(() => {
|
|
353
|
+
v?.stop(), b && clearTimeout(b);
|
|
354
|
+
}), (h, f) => (r(), g("div", {
|
|
355
|
+
style: T(P.value)
|
|
407
356
|
}, [
|
|
408
|
-
o.value && !
|
|
357
|
+
o.value && !e.value ? (r(), g("div", {
|
|
409
358
|
key: 0,
|
|
410
|
-
style:
|
|
359
|
+
style: T({
|
|
411
360
|
position: "absolute",
|
|
412
361
|
bottom: "62px",
|
|
413
|
-
right:
|
|
414
|
-
left:
|
|
362
|
+
right: d.position === "bottom-right" ? "0" : "auto",
|
|
363
|
+
left: d.position === "bottom-left" ? "0" : "auto",
|
|
415
364
|
background: "#fff",
|
|
416
365
|
border: "2px solid #6366f1",
|
|
417
366
|
color: "#1f2937",
|
|
@@ -423,8 +372,8 @@ const ne = { style: {
|
|
|
423
372
|
animation: "fp-bubble-in 300ms ease-out"
|
|
424
373
|
})
|
|
425
374
|
}, [
|
|
426
|
-
A(
|
|
427
|
-
|
|
375
|
+
A(I(C.value.initialMessage || d.initialMessage) + " ", 1),
|
|
376
|
+
f[2] || (f[2] = t("span", { style: {
|
|
428
377
|
position: "absolute",
|
|
429
378
|
right: "10px",
|
|
430
379
|
bottom: "-12px",
|
|
@@ -433,7 +382,7 @@ const ne = { style: {
|
|
|
433
382
|
borderLeft: "10px solid transparent",
|
|
434
383
|
borderTop: "12px solid #6366f1"
|
|
435
384
|
} }, null, -1)),
|
|
436
|
-
|
|
385
|
+
f[3] || (f[3] = t("span", { style: {
|
|
437
386
|
position: "absolute",
|
|
438
387
|
right: "11px",
|
|
439
388
|
bottom: "-9px",
|
|
@@ -442,8 +391,8 @@ const ne = { style: {
|
|
|
442
391
|
borderLeft: "9px solid transparent",
|
|
443
392
|
borderTop: "11px solid #fff"
|
|
444
393
|
} }, null, -1))
|
|
445
|
-
], 4)) :
|
|
446
|
-
|
|
394
|
+
], 4)) : w("", !0),
|
|
395
|
+
i.value && !e.value ? (r(), g("button", {
|
|
447
396
|
key: 1,
|
|
448
397
|
style: {
|
|
449
398
|
width: "48px",
|
|
@@ -458,214 +407,212 @@ const ne = { style: {
|
|
|
458
407
|
animation: "fp-bounce 600ms ease-out"
|
|
459
408
|
},
|
|
460
409
|
onClick: S
|
|
461
|
-
}, [...
|
|
462
|
-
|
|
463
|
-
])])) :
|
|
464
|
-
|
|
410
|
+
}, [...f[4] || (f[4] = [
|
|
411
|
+
W('<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2"><rect x="3" y="8" width="18" height="13" rx="2"></rect><path d="M12 8V5"></path><circle cx="12" cy="4" r="1"></circle><circle cx="8" cy="13" r="1.5" fill="white" stroke="none"></circle><circle cx="16" cy="13" r="1.5" fill="white" stroke="none"></circle><path d="M9 17h6" stroke-linecap="round"></path></svg>', 1)
|
|
412
|
+
])])) : w("", !0),
|
|
413
|
+
e.value && u.value ? (r(), N(ce, {
|
|
465
414
|
key: 2,
|
|
466
|
-
"bot-session-id":
|
|
415
|
+
"bot-session-id": u.value,
|
|
467
416
|
config: C.value,
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
onEscalated: d[1] || (d[1] = (w) => x.value = !0)
|
|
474
|
-
}, null, 8, ["bot-session-id", "config", "config-id", "page", "unavailable"])) : h("", !0)
|
|
417
|
+
unavailable: n.value,
|
|
418
|
+
onClose: $,
|
|
419
|
+
onHelpful: f[0] || (f[0] = (k) => y.value = k),
|
|
420
|
+
onEscalated: f[1] || (f[1] = (k) => m.value = !0)
|
|
421
|
+
}, null, 8, ["bot-session-id", "config", "unavailable"])) : w("", !0)
|
|
475
422
|
], 4));
|
|
476
423
|
}
|
|
477
|
-
}),
|
|
424
|
+
}), fe = {
|
|
478
425
|
key: 0,
|
|
479
426
|
style: { position: "fixed", bottom: "0", left: "0", right: "0", "z-index": "99999", background: "#1a1a1a", color: "#fff", padding: "20px 24px", "border-top": "1px solid #333", "font-family": "sans-serif" }
|
|
480
|
-
},
|
|
427
|
+
}, xe = { style: { "max-width": "900px", margin: "0 auto" } }, ge = {
|
|
481
428
|
key: 0,
|
|
482
429
|
style: { "margin-bottom": "12px", "font-size": "13px" }
|
|
483
|
-
},
|
|
430
|
+
}, be = { style: { display: "flex", "align-items": "center", gap: "8px", "margin-bottom": "6px" } }, ye = { style: { display: "flex", "align-items": "center", gap: "8px" } }, ve = { style: { display: "flex", gap: "8px", "flex-wrap": "wrap", "align-items": "center" } }, me = /* @__PURE__ */ D({
|
|
484
431
|
__name: "consent-banner",
|
|
485
432
|
emits: ["consent"],
|
|
486
|
-
setup(
|
|
487
|
-
const
|
|
433
|
+
setup(d, { emit: a }) {
|
|
434
|
+
const l = a, o = new Y(), i = x(!1), e = x(!1), n = x(!1), u = x(!1);
|
|
488
435
|
function y() {
|
|
489
|
-
|
|
436
|
+
i.value = !0, e.value = !0;
|
|
490
437
|
}
|
|
491
|
-
|
|
492
|
-
const
|
|
493
|
-
|
|
438
|
+
M(() => {
|
|
439
|
+
const P = o.getConsent();
|
|
440
|
+
i.value = !P || o.isConsentExpired(), P && (n.value = P.analytics, u.value = P.marketing), typeof window < "u" && (window.addEventListener("feedpulse:open-consent", y), window.addEventListener("feedpulse:withdraw-consent", C));
|
|
494
441
|
});
|
|
495
|
-
function
|
|
496
|
-
o.setConsent({ analytics: !0, marketing: !0, version: "1.0" }),
|
|
442
|
+
function m() {
|
|
443
|
+
o.setConsent({ analytics: !0, marketing: !0, version: "1.0" }), l("consent", { analytics: !0, marketing: !0, action: "accept_all" }), i.value = !1;
|
|
497
444
|
}
|
|
498
|
-
function
|
|
499
|
-
o.setConsent({ analytics: !1, marketing: !1, version: "1.0" }), o.clearAnalyticsCookies(),
|
|
445
|
+
function v() {
|
|
446
|
+
o.setConsent({ analytics: !1, marketing: !1, version: "1.0" }), o.clearAnalyticsCookies(), l("consent", { analytics: !1, marketing: !1, action: "reject_all" }), i.value = !1;
|
|
500
447
|
}
|
|
501
|
-
function
|
|
502
|
-
o.setConsent({ analytics:
|
|
448
|
+
function b() {
|
|
449
|
+
o.setConsent({ analytics: n.value, marketing: u.value, version: "1.0" }), n.value || o.clearAnalyticsCookies(), l("consent", { analytics: n.value, marketing: u.value, action: "custom" }), i.value = !1;
|
|
503
450
|
}
|
|
504
|
-
function
|
|
505
|
-
o.setConsent({ analytics: !1, marketing: !1, version: "1.0" }), o.clearAnalyticsCookies(),
|
|
451
|
+
function C() {
|
|
452
|
+
o.setConsent({ analytics: !1, marketing: !1, version: "1.0" }), o.clearAnalyticsCookies(), n.value = !1, u.value = !1, l("consent", { analytics: !1, marketing: !1, action: "withdraw" }), i.value = !0;
|
|
506
453
|
}
|
|
507
|
-
return
|
|
508
|
-
typeof window < "u" && (window.removeEventListener("feedpulse:open-consent", y), window.removeEventListener("feedpulse:withdraw-consent",
|
|
509
|
-
}), (
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
454
|
+
return F(() => {
|
|
455
|
+
typeof window < "u" && (window.removeEventListener("feedpulse:open-consent", y), window.removeEventListener("feedpulse:withdraw-consent", C));
|
|
456
|
+
}), (P, s) => (r(), N(J, { to: "body" }, [
|
|
457
|
+
i.value ? (r(), g("div", fe, [
|
|
458
|
+
t("div", xe, [
|
|
459
|
+
s[6] || (s[6] = t("p", { style: { margin: "0 0 12px", "font-size": "14px", "line-height": "1.5" } }, [
|
|
513
460
|
A(" We use cookies to improve reliability and understand usage. "),
|
|
514
|
-
|
|
461
|
+
t("a", {
|
|
515
462
|
href: "/privacy",
|
|
516
463
|
style: { color: "#818cf8" }
|
|
517
464
|
}, "Privacy Policy")
|
|
518
465
|
], -1)),
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
466
|
+
e.value ? (r(), g("div", ge, [
|
|
467
|
+
s[5] || (s[5] = t("label", { style: { display: "flex", "align-items": "center", gap: "8px", "margin-bottom": "6px", opacity: "0.75" } }, [
|
|
468
|
+
t("input", {
|
|
522
469
|
type: "checkbox",
|
|
523
470
|
checked: "",
|
|
524
471
|
disabled: ""
|
|
525
472
|
}),
|
|
526
473
|
A(" Necessary (always on) ")
|
|
527
474
|
], -1)),
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
"onUpdate:modelValue":
|
|
475
|
+
t("label", be, [
|
|
476
|
+
R(t("input", {
|
|
477
|
+
"onUpdate:modelValue": s[0] || (s[0] = (p) => n.value = p),
|
|
531
478
|
type: "checkbox"
|
|
532
479
|
}, null, 512), [
|
|
533
|
-
[
|
|
480
|
+
[j, n.value]
|
|
534
481
|
]),
|
|
535
|
-
|
|
482
|
+
s[3] || (s[3] = A(" Analytics ", -1))
|
|
536
483
|
]),
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
"onUpdate:modelValue":
|
|
484
|
+
t("label", ye, [
|
|
485
|
+
R(t("input", {
|
|
486
|
+
"onUpdate:modelValue": s[1] || (s[1] = (p) => u.value = p),
|
|
540
487
|
type: "checkbox"
|
|
541
488
|
}, null, 512), [
|
|
542
|
-
[
|
|
489
|
+
[j, u.value]
|
|
543
490
|
]),
|
|
544
|
-
|
|
491
|
+
s[4] || (s[4] = A(" Marketing ", -1))
|
|
545
492
|
])
|
|
546
|
-
])) :
|
|
547
|
-
|
|
548
|
-
|
|
493
|
+
])) : w("", !0),
|
|
494
|
+
t("div", ve, [
|
|
495
|
+
t("button", {
|
|
549
496
|
style: { width: "130px", padding: "9px 12px", background: "#4f46e5", color: "#fff", border: "1px solid #4f46e5", "border-radius": "6px", "font-size": "13px", "font-weight": "600", cursor: "pointer" },
|
|
550
|
-
onClick:
|
|
497
|
+
onClick: m
|
|
551
498
|
}, " Accept All "),
|
|
552
|
-
|
|
499
|
+
t("button", {
|
|
553
500
|
style: { width: "130px", padding: "9px 12px", background: "transparent", color: "#fff", border: "1px solid #555", "border-radius": "6px", "font-size": "13px", "font-weight": "600", cursor: "pointer" },
|
|
554
|
-
onClick:
|
|
501
|
+
onClick: v
|
|
555
502
|
}, " Reject All "),
|
|
556
|
-
|
|
503
|
+
t("button", {
|
|
557
504
|
style: { padding: "9px 16px", background: "transparent", color: "#aaa", border: "1px solid #333", "border-radius": "6px", "font-size": "13px", cursor: "pointer" },
|
|
558
|
-
onClick:
|
|
559
|
-
},
|
|
505
|
+
onClick: s[2] || (s[2] = (p) => e.value ? b() : e.value = !0)
|
|
506
|
+
}, I(e.value ? "Save Preferences" : "Customize"), 1)
|
|
560
507
|
])
|
|
561
508
|
])
|
|
562
|
-
])) :
|
|
509
|
+
])) : w("", !0)
|
|
563
510
|
]));
|
|
564
511
|
}
|
|
565
|
-
}),
|
|
512
|
+
}), Ee = /* @__PURE__ */ D({
|
|
566
513
|
__name: "FeedPulseProvider",
|
|
567
514
|
props: {
|
|
568
515
|
proxyEndpoint: { default: "/api/fp-proxy" },
|
|
569
516
|
debug: { type: Boolean },
|
|
570
517
|
consentRequired: { type: Boolean, default: !0 }
|
|
571
518
|
},
|
|
572
|
-
setup(
|
|
573
|
-
const
|
|
574
|
-
proxyEndpoint:
|
|
575
|
-
debug:
|
|
519
|
+
setup(d) {
|
|
520
|
+
const a = d, l = new Y(), o = new Q({
|
|
521
|
+
proxyEndpoint: a.proxyEndpoint,
|
|
522
|
+
debug: a.debug
|
|
576
523
|
});
|
|
577
|
-
|
|
578
|
-
function
|
|
579
|
-
const
|
|
580
|
-
analytics:
|
|
581
|
-
marketing:
|
|
524
|
+
G(q, o);
|
|
525
|
+
function i(e) {
|
|
526
|
+
const n = l.setConsent({
|
|
527
|
+
analytics: e.analytics,
|
|
528
|
+
marketing: e.marketing,
|
|
582
529
|
version: "1.0"
|
|
583
530
|
});
|
|
584
|
-
|
|
585
|
-
analytics:
|
|
586
|
-
marketing:
|
|
587
|
-
action:
|
|
531
|
+
e.analytics || l.clearAnalyticsCookies(), o.updateCookieData(l.getAllData(e.analytics)), o.track("consent", "__consent__", {
|
|
532
|
+
analytics: e.analytics,
|
|
533
|
+
marketing: e.marketing,
|
|
534
|
+
action: e.action,
|
|
588
535
|
userAgent: navigator.userAgent,
|
|
589
|
-
version:
|
|
536
|
+
version: n.version
|
|
590
537
|
});
|
|
591
538
|
}
|
|
592
|
-
return
|
|
593
|
-
const
|
|
594
|
-
|
|
595
|
-
}),
|
|
596
|
-
|
|
597
|
-
|
|
539
|
+
return M(() => {
|
|
540
|
+
const e = l.getConsent();
|
|
541
|
+
a.consentRequired === !1 ? (l.setConsent({ analytics: !0, marketing: !0, version: "1.0" }), o.updateCookieData(l.getAllData(!0))) : e && !l.isConsentExpired() ? o.updateCookieData(l.getAllData(e.analytics)) : o.updateCookieData(l.getAllData(!1)), o.init();
|
|
542
|
+
}), F(() => o.destroy()), (e, n) => (r(), g(_, null, [
|
|
543
|
+
K(e.$slots, "default"),
|
|
544
|
+
d.consentRequired !== !1 ? (r(), N(me, {
|
|
598
545
|
key: 0,
|
|
599
|
-
onConsent:
|
|
600
|
-
})) :
|
|
546
|
+
onConsent: i
|
|
547
|
+
})) : w("", !0)
|
|
601
548
|
], 64));
|
|
602
549
|
}
|
|
603
|
-
}),
|
|
550
|
+
}), he = {
|
|
604
551
|
key: 1,
|
|
605
552
|
style: { background: "#fff", border: "1px solid #e5e7eb", "border-radius": "12px", padding: "16px", width: "280px", "box-shadow": "0 10px 25px rgba(0,0,0,0.15)" }
|
|
606
|
-
},
|
|
553
|
+
}, ke = { style: { margin: "0 0 12px", "font-weight": "600", color: "#111" } }, we = { style: { display: "flex", gap: "6px", "margin-bottom": "12px" } }, Se = ["onClick"], Ce = {
|
|
607
554
|
key: 1,
|
|
608
555
|
style: { "text-align": "center", padding: "16px", color: "#111" }
|
|
609
|
-
},
|
|
556
|
+
}, Ae = /* @__PURE__ */ D({
|
|
610
557
|
__name: "FeedPulseWidget",
|
|
611
558
|
props: {
|
|
612
559
|
id: {},
|
|
613
560
|
placeholder: {},
|
|
614
561
|
position: { default: "bottom-right" }
|
|
615
562
|
},
|
|
616
|
-
setup(
|
|
617
|
-
const
|
|
618
|
-
function
|
|
619
|
-
|
|
563
|
+
setup(d) {
|
|
564
|
+
const a = d, l = Z(), o = x(a.position === "inline"), i = x(null), e = x(""), n = x(!1);
|
|
565
|
+
function u(m) {
|
|
566
|
+
i.value = m;
|
|
620
567
|
}
|
|
621
568
|
function y() {
|
|
622
|
-
!
|
|
623
|
-
o.value =
|
|
569
|
+
!i.value && !e.value.trim() || (l?.trackFeedback(a.id ?? null, i.value, e.value || null), n.value = !0, setTimeout(() => {
|
|
570
|
+
o.value = a.position === "inline", n.value = !1, i.value = null, e.value = "";
|
|
624
571
|
}, 2e3));
|
|
625
572
|
}
|
|
626
|
-
return (
|
|
573
|
+
return (m, v) => (r(), g("div", {
|
|
627
574
|
class: "feedpulse-widget",
|
|
628
|
-
style:
|
|
575
|
+
style: T(d.position !== "inline" ? `position:fixed; ${d.position === "bottom-right" ? "right:24px" : "left:24px"}; bottom:24px; z-index:9999;` : "")
|
|
629
576
|
}, [
|
|
630
|
-
|
|
577
|
+
d.position !== "inline" ? (r(), g("button", {
|
|
631
578
|
key: 0,
|
|
632
579
|
style: { background: "#6366f1", color: "#fff", border: "none", "border-radius": "50%", width: "48px", height: "48px", "font-size": "20px", cursor: "pointer" },
|
|
633
|
-
onClick:
|
|
634
|
-
}, " 💬 ")) :
|
|
635
|
-
o.value ? (r(),
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
])])) : (r(),
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
(r(),
|
|
643
|
-
key:
|
|
644
|
-
style:
|
|
645
|
-
onClick: (
|
|
646
|
-
}, " ⭐ ", 12,
|
|
580
|
+
onClick: v[0] || (v[0] = (b) => o.value = !o.value)
|
|
581
|
+
}, " 💬 ")) : w("", !0),
|
|
582
|
+
o.value ? (r(), g("div", he, [
|
|
583
|
+
n.value ? (r(), g("div", Ce, [...v[2] || (v[2] = [
|
|
584
|
+
t("p", { style: { "font-size": "28px", margin: "0" } }, " 🎉 ", -1),
|
|
585
|
+
t("p", { style: { margin: "8px 0 0", "font-weight": "600" } }, " Thanks for your feedback! ", -1)
|
|
586
|
+
])])) : (r(), g(_, { key: 0 }, [
|
|
587
|
+
t("p", ke, I(d.placeholder ?? "How was your experience?"), 1),
|
|
588
|
+
t("div", we, [
|
|
589
|
+
(r(), g(_, null, L(5, (b) => t("button", {
|
|
590
|
+
key: b,
|
|
591
|
+
style: T({ background: "none", border: "none", cursor: "pointer", fontSize: "24px", opacity: i.value !== null && b <= i.value ? 1 : 0.3 }),
|
|
592
|
+
onClick: (C) => u(b)
|
|
593
|
+
}, " ⭐ ", 12, Se)), 64))
|
|
647
594
|
]),
|
|
648
|
-
|
|
649
|
-
"onUpdate:modelValue":
|
|
595
|
+
R(t("textarea", {
|
|
596
|
+
"onUpdate:modelValue": v[1] || (v[1] = (b) => e.value = b),
|
|
650
597
|
placeholder: "Tell us more (optional)...",
|
|
651
598
|
rows: "3",
|
|
652
599
|
style: { width: "100%", padding: "8px", border: "1px solid #d1d5db", "border-radius": "8px", resize: "none", "font-size": "14px" }
|
|
653
600
|
}, null, 512), [
|
|
654
|
-
[
|
|
601
|
+
[O, e.value]
|
|
655
602
|
]),
|
|
656
|
-
|
|
603
|
+
t("button", {
|
|
657
604
|
style: { "margin-top": "10px", width: "100%", background: "#6366f1", color: "#fff", border: "none", "border-radius": "8px", padding: "10px", "font-weight": "600", cursor: "pointer" },
|
|
658
605
|
onClick: y
|
|
659
606
|
}, " Submit Feedback ")
|
|
660
607
|
], 64))
|
|
661
|
-
])) :
|
|
608
|
+
])) : w("", !0)
|
|
662
609
|
], 4));
|
|
663
610
|
}
|
|
664
611
|
});
|
|
665
612
|
export {
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
613
|
+
me as ConsentBanner,
|
|
614
|
+
$e as FeedPulseBot,
|
|
615
|
+
Ee as FeedPulseProvider,
|
|
616
|
+
Ae as FeedPulseWidget,
|
|
617
|
+
Z as useFeedPulse
|
|
671
618
|
};
|