blocfeed 0.17.3 → 0.19.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/CHANGELOG.md +31 -0
- package/dist/chunk-XVMFV46F.js +884 -0
- package/dist/chunk-ZQDABCPT.cjs +884 -0
- package/dist/{controller-09cYt2qm.d.cts → controller-C5mxpGk4.d.cts} +2 -0
- package/dist/{controller-09cYt2qm.d.ts → controller-C5mxpGk4.d.ts} +2 -0
- package/dist/engine.cjs +1 -1
- package/dist/engine.d.cts +2 -2
- package/dist/engine.d.ts +2 -2
- package/dist/engine.js +1 -1
- package/dist/main.cjs +1 -884
- package/dist/main.d.cts +68 -3
- package/dist/main.d.ts +68 -3
- package/dist/main.js +1 -884
- package/package.json +1 -1
- package/dist/chunk-4VWH5ZG6.cjs +0 -2
- package/dist/chunk-CS63UWFR.js +0 -2
package/dist/main.cjs
CHANGED
|
@@ -1,885 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var
|
|
3
|
-
:where([data-blocfeed-ui-root]),
|
|
4
|
-
:where([data-blocfeed-ui-root]) * {
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
:where([data-blocfeed-ui-root]) {
|
|
9
|
-
--bf-z: 2147483647;
|
|
10
|
-
--bf-font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
|
|
11
|
-
--bf-panel-bg: rgba(17, 24, 39, 0.98);
|
|
12
|
-
--bf-panel-fg: rgb(243, 244, 246);
|
|
13
|
-
--bf-muted: rgba(243, 244, 246, 0.72);
|
|
14
|
-
--bf-border: rgba(255, 255, 255, 0.14);
|
|
15
|
-
--bf-accent: rgb(99, 102, 241);
|
|
16
|
-
--bf-danger: rgb(239, 68, 68);
|
|
17
|
-
--bf-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
|
|
18
|
-
|
|
19
|
-
/* Ensure widget always floats above customer modals/sidepanels/overlays */
|
|
20
|
-
position: fixed;
|
|
21
|
-
top: 0;
|
|
22
|
-
left: 0;
|
|
23
|
-
width: 0;
|
|
24
|
-
height: 0;
|
|
25
|
-
overflow: visible;
|
|
26
|
-
z-index: var(--bf-z);
|
|
27
|
-
isolation: isolate;
|
|
28
|
-
pointer-events: none;
|
|
29
|
-
|
|
30
|
-
font-family: var(--bf-font);
|
|
31
|
-
color: var(--bf-panel-fg);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/* ------------------------------------------------------------------ */
|
|
35
|
-
/* Light theme */
|
|
36
|
-
/* ------------------------------------------------------------------ */
|
|
37
|
-
|
|
38
|
-
:where([data-blocfeed-ui-root][data-bf-theme="light"]) {
|
|
39
|
-
--bf-panel-bg: rgba(255, 255, 255, 0.98);
|
|
40
|
-
--bf-panel-fg: rgb(17, 24, 39);
|
|
41
|
-
--bf-muted: rgba(17, 24, 39, 0.6);
|
|
42
|
-
--bf-border: rgba(0, 0, 0, 0.12);
|
|
43
|
-
--bf-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
:where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-textarea {
|
|
47
|
-
border-color: rgba(0, 0, 0, 0.14);
|
|
48
|
-
background: rgba(0, 0, 0, 0.04);
|
|
49
|
-
color: var(--bf-panel-fg);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
:where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-panelHeader {
|
|
53
|
-
border-bottom-color: rgba(0, 0, 0, 0.08);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
:where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-title {
|
|
57
|
-
color: rgba(17, 24, 39, 0.85);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
:where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-error {
|
|
61
|
-
color: rgb(185, 28, 28);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
:where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-watermark a {
|
|
65
|
-
color: rgba(17, 24, 39, 0.35);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
:where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-watermark {
|
|
69
|
-
border-top-color: rgba(0, 0, 0, 0.06);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
:where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-highlight {
|
|
73
|
-
box-shadow: 0 0 0 9999px rgba(255, 255, 255, 0.42);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
:where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-blocker {
|
|
77
|
-
background: rgba(255, 255, 255, 0.35);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/* ------------------------------------------------------------------ */
|
|
81
|
-
/* Trigger button \u2014 default bottom-right */
|
|
82
|
-
/* ------------------------------------------------------------------ */
|
|
83
|
-
|
|
84
|
-
:where([data-blocfeed-ui-root]) .bf-trigger {
|
|
85
|
-
position: fixed;
|
|
86
|
-
right: 18px;
|
|
87
|
-
bottom: 18px;
|
|
88
|
-
z-index: var(--bf-z);
|
|
89
|
-
pointer-events: auto;
|
|
90
|
-
|
|
91
|
-
display: inline-flex;
|
|
92
|
-
align-items: center;
|
|
93
|
-
gap: 10px;
|
|
94
|
-
padding: 10px 12px;
|
|
95
|
-
border-radius: 999px;
|
|
96
|
-
border: 1px solid var(--bf-border);
|
|
97
|
-
background: var(--bf-panel-bg);
|
|
98
|
-
color: var(--bf-panel-fg);
|
|
99
|
-
box-shadow: var(--bf-shadow);
|
|
100
|
-
cursor: pointer;
|
|
101
|
-
user-select: none;
|
|
102
|
-
-webkit-tap-highlight-color: transparent;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
:where([data-blocfeed-ui-root]) .bf-trigger:hover {
|
|
106
|
-
border-color: var(--bf-accent);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
:where([data-blocfeed-ui-root]) .bf-trigger:focus-visible {
|
|
110
|
-
outline: 2px solid var(--bf-accent);
|
|
111
|
-
outline-offset: 2px;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/* Position variants (item 9) */
|
|
115
|
-
:where([data-blocfeed-ui-root]) .bf-trigger-bl {
|
|
116
|
-
left: 18px; bottom: 18px; right: auto; top: auto;
|
|
117
|
-
}
|
|
118
|
-
:where([data-blocfeed-ui-root]) .bf-trigger-tr {
|
|
119
|
-
right: 18px; top: 18px; bottom: auto; left: auto;
|
|
120
|
-
}
|
|
121
|
-
:where([data-blocfeed-ui-root]) .bf-trigger-tl {
|
|
122
|
-
left: 18px; top: 18px; right: auto; bottom: auto;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
:where([data-blocfeed-ui-root]) .bf-dot {
|
|
126
|
-
width: 10px;
|
|
127
|
-
height: 10px;
|
|
128
|
-
border-radius: 999px;
|
|
129
|
-
background: var(--bf-accent);
|
|
130
|
-
box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/* ------------------------------------------------------------------ */
|
|
134
|
-
/* Overlay, blocker, highlight */
|
|
135
|
-
/* ------------------------------------------------------------------ */
|
|
136
|
-
|
|
137
|
-
:where([data-blocfeed-ui-root]) .bf-overlay {
|
|
138
|
-
position: fixed;
|
|
139
|
-
inset: 0;
|
|
140
|
-
z-index: var(--bf-z);
|
|
141
|
-
pointer-events: none;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
:where([data-blocfeed-ui-root]) .bf-blocker {
|
|
145
|
-
position: fixed;
|
|
146
|
-
inset: 0;
|
|
147
|
-
background: rgba(0, 0, 0, 0.35);
|
|
148
|
-
pointer-events: auto;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
:where([data-blocfeed-ui-root]) .bf-highlight {
|
|
152
|
-
position: fixed;
|
|
153
|
-
border: 2px solid var(--bf-accent);
|
|
154
|
-
border-radius: 10px;
|
|
155
|
-
box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.42);
|
|
156
|
-
pointer-events: none;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/* ------------------------------------------------------------------ */
|
|
160
|
-
/* Hint bar */
|
|
161
|
-
/* ------------------------------------------------------------------ */
|
|
162
|
-
|
|
163
|
-
:where([data-blocfeed-ui-root]) .bf-hint {
|
|
164
|
-
position: fixed;
|
|
165
|
-
top: 16px;
|
|
166
|
-
left: 50%;
|
|
167
|
-
transform: translateX(-50%);
|
|
168
|
-
max-width: min(640px, calc(100vw - 24px));
|
|
169
|
-
padding: 10px 12px;
|
|
170
|
-
border-radius: 12px;
|
|
171
|
-
border: 1px solid var(--bf-border);
|
|
172
|
-
background: var(--bf-panel-bg);
|
|
173
|
-
box-shadow: var(--bf-shadow);
|
|
174
|
-
pointer-events: auto;
|
|
175
|
-
display: flex;
|
|
176
|
-
align-items: center;
|
|
177
|
-
justify-content: space-between;
|
|
178
|
-
gap: 12px;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
:where([data-blocfeed-ui-root]) .bf-hint p {
|
|
182
|
-
margin: 0;
|
|
183
|
-
font-size: 13px;
|
|
184
|
-
color: var(--bf-muted);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/* ------------------------------------------------------------------ */
|
|
188
|
-
/* Buttons */
|
|
189
|
-
/* ------------------------------------------------------------------ */
|
|
190
|
-
|
|
191
|
-
:where([data-blocfeed-ui-root]) .bf-btn {
|
|
192
|
-
border: 1px solid var(--bf-border);
|
|
193
|
-
background: transparent;
|
|
194
|
-
color: var(--bf-panel-fg);
|
|
195
|
-
padding: 8px 10px;
|
|
196
|
-
border-radius: 10px;
|
|
197
|
-
cursor: pointer;
|
|
198
|
-
user-select: none;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
:where([data-blocfeed-ui-root]) .bf-btn:focus-visible {
|
|
202
|
-
outline: 2px solid var(--bf-accent);
|
|
203
|
-
outline-offset: 2px;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
:where([data-blocfeed-ui-root]) .bf-btn[disabled] {
|
|
207
|
-
opacity: 0.6;
|
|
208
|
-
cursor: not-allowed;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
:where([data-blocfeed-ui-root]) .bf-btnPrimary {
|
|
212
|
-
background: var(--bf-accent);
|
|
213
|
-
border-color: rgba(99, 102, 241, 0.6);
|
|
214
|
-
color: white;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/* ------------------------------------------------------------------ */
|
|
218
|
-
/* Panel */
|
|
219
|
-
/* ------------------------------------------------------------------ */
|
|
220
|
-
|
|
221
|
-
:where([data-blocfeed-ui-root]) .bf-panel {
|
|
222
|
-
position: fixed;
|
|
223
|
-
width: 360px;
|
|
224
|
-
max-width: calc(100vw - 24px);
|
|
225
|
-
border-radius: 14px;
|
|
226
|
-
border: 1px solid var(--bf-border);
|
|
227
|
-
background: var(--bf-panel-bg);
|
|
228
|
-
box-shadow: var(--bf-shadow);
|
|
229
|
-
pointer-events: auto;
|
|
230
|
-
overflow: hidden;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
:where([data-blocfeed-ui-root]) .bf-panelHeader {
|
|
234
|
-
display: flex;
|
|
235
|
-
align-items: center;
|
|
236
|
-
justify-content: space-between;
|
|
237
|
-
gap: 8px;
|
|
238
|
-
padding: 12px 12px 10px;
|
|
239
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
:where([data-blocfeed-ui-root]) .bf-title {
|
|
243
|
-
font-size: 13px;
|
|
244
|
-
letter-spacing: 0.3px;
|
|
245
|
-
text-transform: uppercase;
|
|
246
|
-
color: rgba(243, 244, 246, 0.85);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
:where([data-blocfeed-ui-root]) .bf-panelBody {
|
|
250
|
-
padding: 12px;
|
|
251
|
-
display: grid;
|
|
252
|
-
gap: 10px;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/* ------------------------------------------------------------------ */
|
|
256
|
-
/* Form elements */
|
|
257
|
-
/* ------------------------------------------------------------------ */
|
|
258
|
-
|
|
259
|
-
:where([data-blocfeed-ui-root]) .bf-textarea {
|
|
260
|
-
width: 100%;
|
|
261
|
-
min-height: 96px;
|
|
262
|
-
resize: vertical;
|
|
263
|
-
padding: 10px 10px;
|
|
264
|
-
border-radius: 12px;
|
|
265
|
-
border: 1px solid rgba(255, 255, 255, 0.14);
|
|
266
|
-
background: rgba(0, 0, 0, 0.18);
|
|
267
|
-
color: var(--bf-panel-fg);
|
|
268
|
-
font-size: 14px;
|
|
269
|
-
line-height: 1.4;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
:where([data-blocfeed-ui-root]) .bf-textarea:focus-visible {
|
|
273
|
-
outline: 2px solid rgba(99, 102, 241, 0.9);
|
|
274
|
-
outline-offset: 2px;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
:where([data-blocfeed-ui-root]) .bf-row {
|
|
278
|
-
display: flex;
|
|
279
|
-
align-items: center;
|
|
280
|
-
justify-content: space-between;
|
|
281
|
-
gap: 10px;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
:where([data-blocfeed-ui-root]) .bf-row label {
|
|
285
|
-
font-size: 13px;
|
|
286
|
-
color: var(--bf-muted);
|
|
287
|
-
display: inline-flex;
|
|
288
|
-
align-items: center;
|
|
289
|
-
gap: 8px;
|
|
290
|
-
user-select: none;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
:where([data-blocfeed-ui-root]) .bf-actions {
|
|
294
|
-
display: flex;
|
|
295
|
-
gap: 10px;
|
|
296
|
-
justify-content: flex-end;
|
|
297
|
-
padding-top: 4px;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
/* ------------------------------------------------------------------ */
|
|
301
|
-
/* Status, errors, toast */
|
|
302
|
-
/* ------------------------------------------------------------------ */
|
|
303
|
-
|
|
304
|
-
:where([data-blocfeed-ui-root]) .bf-status {
|
|
305
|
-
font-size: 12px;
|
|
306
|
-
color: var(--bf-muted);
|
|
307
|
-
display: flex;
|
|
308
|
-
align-items: center;
|
|
309
|
-
gap: 8px;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
:where([data-blocfeed-ui-root]) .bf-error {
|
|
313
|
-
font-size: 12px;
|
|
314
|
-
color: rgb(254, 202, 202);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
:where([data-blocfeed-ui-root]) .bf-toast {
|
|
318
|
-
position: fixed;
|
|
319
|
-
left: 50%;
|
|
320
|
-
bottom: 18px;
|
|
321
|
-
transform: translateX(-50%);
|
|
322
|
-
z-index: var(--bf-z);
|
|
323
|
-
padding: 10px 12px;
|
|
324
|
-
border-radius: 12px;
|
|
325
|
-
border: 1px solid var(--bf-border);
|
|
326
|
-
background: var(--bf-panel-bg);
|
|
327
|
-
box-shadow: var(--bf-shadow);
|
|
328
|
-
pointer-events: none;
|
|
329
|
-
font-size: 13px;
|
|
330
|
-
color: rgba(243, 244, 246, 0.9);
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
/* ------------------------------------------------------------------ */
|
|
334
|
-
/* Category pills */
|
|
335
|
-
/* ------------------------------------------------------------------ */
|
|
336
|
-
|
|
337
|
-
:where([data-blocfeed-ui-root]) .bf-pills {
|
|
338
|
-
display: flex;
|
|
339
|
-
flex-wrap: wrap;
|
|
340
|
-
gap: 6px;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
:where([data-blocfeed-ui-root]) .bf-pill {
|
|
344
|
-
padding: 4px 10px;
|
|
345
|
-
border-radius: 999px;
|
|
346
|
-
border: 1px solid var(--bf-border);
|
|
347
|
-
background: transparent;
|
|
348
|
-
color: var(--bf-muted);
|
|
349
|
-
font-size: 12px;
|
|
350
|
-
font-family: var(--bf-font);
|
|
351
|
-
cursor: pointer;
|
|
352
|
-
user-select: none;
|
|
353
|
-
transition: border-color 0.15s, color 0.15s, background 0.15s;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
:where([data-blocfeed-ui-root]) .bf-pill:hover {
|
|
357
|
-
border-color: var(--bf-accent);
|
|
358
|
-
color: var(--bf-panel-fg);
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
:where([data-blocfeed-ui-root]) .bf-pill-active {
|
|
362
|
-
border-color: var(--bf-accent);
|
|
363
|
-
background: var(--bf-accent);
|
|
364
|
-
color: white;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
:where([data-blocfeed-ui-root]) .bf-pill[disabled] {
|
|
368
|
-
opacity: 0.6;
|
|
369
|
-
cursor: not-allowed;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
/* ------------------------------------------------------------------ */
|
|
373
|
-
/* Capture spinner (item 12) */
|
|
374
|
-
/* ------------------------------------------------------------------ */
|
|
375
|
-
|
|
376
|
-
:where([data-blocfeed-ui-root]) .bf-spinner {
|
|
377
|
-
display: inline-block;
|
|
378
|
-
width: 10px;
|
|
379
|
-
height: 10px;
|
|
380
|
-
border-radius: 50%;
|
|
381
|
-
background: var(--bf-accent);
|
|
382
|
-
animation: bf-pulse 1s ease-in-out infinite;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
@keyframes bf-pulse {
|
|
386
|
-
0%, 100% { opacity: 0.4; transform: scale(0.8); }
|
|
387
|
-
50% { opacity: 1; transform: scale(1.2); }
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
/* ------------------------------------------------------------------ */
|
|
391
|
-
/* Trigger variant: edge-tab */
|
|
392
|
-
/* ------------------------------------------------------------------ */
|
|
393
|
-
|
|
394
|
-
:where([data-blocfeed-ui-root]) .bf-trigger-edge {
|
|
395
|
-
position: fixed;
|
|
396
|
-
z-index: var(--bf-z);
|
|
397
|
-
pointer-events: auto;
|
|
398
|
-
display: flex;
|
|
399
|
-
align-items: center;
|
|
400
|
-
justify-content: center;
|
|
401
|
-
border: 1px solid var(--bf-border);
|
|
402
|
-
background: var(--bf-panel-bg);
|
|
403
|
-
color: var(--bf-panel-fg);
|
|
404
|
-
box-shadow: var(--bf-shadow);
|
|
405
|
-
cursor: pointer;
|
|
406
|
-
user-select: none;
|
|
407
|
-
-webkit-tap-highlight-color: transparent;
|
|
408
|
-
overflow: hidden;
|
|
409
|
-
padding: 0;
|
|
410
|
-
font-family: var(--bf-font);
|
|
411
|
-
font-size: 12px;
|
|
412
|
-
letter-spacing: 0.5px;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
:where([data-blocfeed-ui-root]) .bf-trigger-edge:focus-visible {
|
|
416
|
-
outline: 2px solid var(--bf-accent);
|
|
417
|
-
outline-offset: 2px;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
:where([data-blocfeed-ui-root]) .bf-trigger-edge-left {
|
|
421
|
-
left: 0;
|
|
422
|
-
right: auto;
|
|
423
|
-
border-radius: 0 6px 6px 0;
|
|
424
|
-
border-left: none;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
:where([data-blocfeed-ui-root]) .bf-trigger-edge-right {
|
|
428
|
-
right: 0;
|
|
429
|
-
left: auto;
|
|
430
|
-
border-radius: 6px 0 0 6px;
|
|
431
|
-
border-right: none;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
/* ------------------------------------------------------------------ */
|
|
435
|
-
/* Trigger variant: minimal */
|
|
436
|
-
/* ------------------------------------------------------------------ */
|
|
437
|
-
|
|
438
|
-
:where([data-blocfeed-ui-root]) .bf-trigger-minimal {
|
|
439
|
-
position: fixed;
|
|
440
|
-
right: 18px;
|
|
441
|
-
bottom: 18px;
|
|
442
|
-
z-index: var(--bf-z);
|
|
443
|
-
pointer-events: auto;
|
|
444
|
-
display: inline-flex;
|
|
445
|
-
align-items: center;
|
|
446
|
-
background: transparent;
|
|
447
|
-
border: none;
|
|
448
|
-
box-shadow: none;
|
|
449
|
-
padding: 8px 4px;
|
|
450
|
-
font-family: var(--bf-font);
|
|
451
|
-
font-size: 13px;
|
|
452
|
-
color: var(--bf-panel-fg);
|
|
453
|
-
cursor: pointer;
|
|
454
|
-
user-select: none;
|
|
455
|
-
-webkit-tap-highlight-color: transparent;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
:where([data-blocfeed-ui-root]) .bf-trigger-minimal.bf-trigger-bl {
|
|
459
|
-
left: 18px; bottom: 18px; right: auto; top: auto;
|
|
460
|
-
}
|
|
461
|
-
:where([data-blocfeed-ui-root]) .bf-trigger-minimal.bf-trigger-tr {
|
|
462
|
-
right: 18px; top: 18px; bottom: auto; left: auto;
|
|
463
|
-
}
|
|
464
|
-
:where([data-blocfeed-ui-root]) .bf-trigger-minimal.bf-trigger-tl {
|
|
465
|
-
left: 18px; top: 18px; right: auto; bottom: auto;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
:where([data-blocfeed-ui-root]) .bf-trigger-minimal:focus-visible {
|
|
469
|
-
outline: 2px solid var(--bf-accent);
|
|
470
|
-
outline-offset: 2px;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
/* ------------------------------------------------------------------ */
|
|
474
|
-
/* Screen reader only */
|
|
475
|
-
/* ------------------------------------------------------------------ */
|
|
476
|
-
|
|
477
|
-
:where([data-blocfeed-ui-root]) .bf-sr-only {
|
|
478
|
-
position: absolute;
|
|
479
|
-
width: 1px;
|
|
480
|
-
height: 1px;
|
|
481
|
-
padding: 0;
|
|
482
|
-
margin: -1px;
|
|
483
|
-
overflow: hidden;
|
|
484
|
-
clip: rect(0, 0, 0, 0);
|
|
485
|
-
white-space: nowrap;
|
|
486
|
-
border: 0;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
/* ------------------------------------------------------------------ */
|
|
490
|
-
/* Queue badge */
|
|
491
|
-
/* ------------------------------------------------------------------ */
|
|
492
|
-
|
|
493
|
-
:where([data-blocfeed-ui-root]) .bf-badge {
|
|
494
|
-
display: inline-flex;
|
|
495
|
-
align-items: center;
|
|
496
|
-
justify-content: center;
|
|
497
|
-
min-width: 16px;
|
|
498
|
-
height: 16px;
|
|
499
|
-
padding: 0 4px;
|
|
500
|
-
border-radius: 999px;
|
|
501
|
-
background: var(--bf-danger);
|
|
502
|
-
color: white;
|
|
503
|
-
font-size: 10px;
|
|
504
|
-
font-weight: 600;
|
|
505
|
-
line-height: 1;
|
|
506
|
-
flex-shrink: 0;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
:where([data-blocfeed-ui-root]) .bf-badge-float {
|
|
510
|
-
position: absolute;
|
|
511
|
-
top: -4px;
|
|
512
|
-
right: -4px;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
/* ------------------------------------------------------------------ */
|
|
516
|
-
/* Typewriter cursor */
|
|
517
|
-
/* ------------------------------------------------------------------ */
|
|
518
|
-
|
|
519
|
-
:where([data-blocfeed-ui-root]) .bf-cursor {
|
|
520
|
-
display: inline-block;
|
|
521
|
-
width: 1px;
|
|
522
|
-
height: 1em;
|
|
523
|
-
background: var(--bf-panel-fg);
|
|
524
|
-
margin-left: 1px;
|
|
525
|
-
vertical-align: text-bottom;
|
|
526
|
-
animation: bf-blink 1s steps(2) infinite;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
@keyframes bf-blink {
|
|
530
|
-
0% { opacity: 1; }
|
|
531
|
-
50% { opacity: 0; }
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
/* ------------------------------------------------------------------ */
|
|
535
|
-
/* Panel / toast / hint entrance animations */
|
|
536
|
-
/* ------------------------------------------------------------------ */
|
|
537
|
-
|
|
538
|
-
:where([data-blocfeed-ui-root]) .bf-panel {
|
|
539
|
-
animation: bf-panel-in 0.2s ease-out;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
@keyframes bf-panel-in {
|
|
543
|
-
from { opacity: 0; transform: translateY(8px); }
|
|
544
|
-
to { opacity: 1; transform: translateY(0); }
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
:where([data-blocfeed-ui-root]) .bf-toast {
|
|
548
|
-
animation: bf-toast-in 0.25s ease-out;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
@keyframes bf-toast-in {
|
|
552
|
-
from { opacity: 0; transform: translateX(-50%) translateY(12px); }
|
|
553
|
-
to { opacity: 1; transform: translateX(-50%) translateY(0); }
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
:where([data-blocfeed-ui-root]) .bf-hint {
|
|
557
|
-
animation: bf-hint-in 0.2s ease-out;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
@keyframes bf-hint-in {
|
|
561
|
-
from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
|
|
562
|
-
to { opacity: 1; transform: translateX(-50%) translateY(0); }
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
/* ------------------------------------------------------------------ */
|
|
566
|
-
/* Security warning banner */
|
|
567
|
-
/* ------------------------------------------------------------------ */
|
|
568
|
-
|
|
569
|
-
:where([data-blocfeed-ui-root]) .bf-security-banner {
|
|
570
|
-
position: fixed;
|
|
571
|
-
top: 8px;
|
|
572
|
-
right: 8px;
|
|
573
|
-
z-index: var(--bf-z);
|
|
574
|
-
max-width: 360px;
|
|
575
|
-
padding: 10px 14px;
|
|
576
|
-
border-radius: 10px;
|
|
577
|
-
border-left: 3px solid var(--bf-danger);
|
|
578
|
-
background: rgba(239, 68, 68, 0.12);
|
|
579
|
-
color: rgb(254, 202, 202);
|
|
580
|
-
font-family: var(--bf-font);
|
|
581
|
-
font-size: 12px;
|
|
582
|
-
line-height: 1.5;
|
|
583
|
-
pointer-events: auto;
|
|
584
|
-
animation: bf-panel-in 0.2s ease-out;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
:where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-security-banner {
|
|
588
|
-
background: rgba(239, 68, 68, 0.08);
|
|
589
|
-
color: rgb(185, 28, 28);
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
:where([data-blocfeed-ui-root]) .bf-security-banner strong {
|
|
593
|
-
display: block;
|
|
594
|
-
margin-bottom: 4px;
|
|
595
|
-
font-size: 13px;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
:where([data-blocfeed-ui-root]) .bf-security-banner-dismiss {
|
|
599
|
-
position: absolute;
|
|
600
|
-
top: 6px;
|
|
601
|
-
right: 6px;
|
|
602
|
-
background: none;
|
|
603
|
-
border: none;
|
|
604
|
-
color: inherit;
|
|
605
|
-
opacity: 0.6;
|
|
606
|
-
cursor: pointer;
|
|
607
|
-
padding: 2px 4px;
|
|
608
|
-
font-size: 14px;
|
|
609
|
-
line-height: 1;
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
:where([data-blocfeed-ui-root]) .bf-security-banner-dismiss:hover {
|
|
613
|
-
opacity: 1;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
/* ------------------------------------------------------------------ */
|
|
617
|
-
/* Reduced motion */
|
|
618
|
-
/* ------------------------------------------------------------------ */
|
|
619
|
-
|
|
620
|
-
/* ------------------------------------------------------------------ */
|
|
621
|
-
/* Video recording */
|
|
622
|
-
/* ------------------------------------------------------------------ */
|
|
623
|
-
|
|
624
|
-
:where([data-blocfeed-ui-root]) .bf-record-btn {
|
|
625
|
-
display: inline-flex;
|
|
626
|
-
align-items: center;
|
|
627
|
-
gap: 6px;
|
|
628
|
-
padding: 6px 10px;
|
|
629
|
-
border-radius: 10px;
|
|
630
|
-
border: 1px solid var(--bf-border);
|
|
631
|
-
background: transparent;
|
|
632
|
-
color: var(--bf-panel-fg);
|
|
633
|
-
font-size: 13px;
|
|
634
|
-
font-family: var(--bf-font);
|
|
635
|
-
cursor: pointer;
|
|
636
|
-
user-select: none;
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
:where([data-blocfeed-ui-root]) .bf-record-btn:hover {
|
|
640
|
-
border-color: var(--bf-danger);
|
|
641
|
-
color: var(--bf-danger);
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
:where([data-blocfeed-ui-root]) .bf-record-btn:focus-visible {
|
|
645
|
-
outline: 2px solid var(--bf-accent);
|
|
646
|
-
outline-offset: 2px;
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
:where([data-blocfeed-ui-root]) .bf-record-btn[disabled] {
|
|
650
|
-
opacity: 0.6;
|
|
651
|
-
cursor: not-allowed;
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
/* ---- Voice feedback button ---- */
|
|
655
|
-
|
|
656
|
-
:where([data-blocfeed-ui-root]) .bf-voice-btn {
|
|
657
|
-
display: inline-flex;
|
|
658
|
-
align-items: center;
|
|
659
|
-
gap: 6px;
|
|
660
|
-
padding: 6px 12px;
|
|
661
|
-
border-radius: 6px;
|
|
662
|
-
border: 1px solid var(--bf-border);
|
|
663
|
-
background: transparent;
|
|
664
|
-
color: var(--bf-panel-fg);
|
|
665
|
-
font-size: 13px;
|
|
666
|
-
cursor: pointer;
|
|
667
|
-
transition: background 0.15s, border-color 0.15s;
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
:where([data-blocfeed-ui-root]) .bf-voice-btn:hover {
|
|
671
|
-
background: rgba(128,128,128,0.1);
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
:where([data-blocfeed-ui-root]) .bf-voice-btn:focus-visible {
|
|
675
|
-
outline: 2px solid var(--bf-accent);
|
|
676
|
-
outline-offset: 2px;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
:where([data-blocfeed-ui-root]) .bf-voice-btn[disabled] {
|
|
680
|
-
opacity: 0.6;
|
|
681
|
-
cursor: not-allowed;
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
:where([data-blocfeed-ui-root]) .bf-voice-btn-active {
|
|
685
|
-
border-color: var(--bf-danger);
|
|
686
|
-
color: var(--bf-danger);
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
:where([data-blocfeed-ui-root]) .bf-mic-icon {
|
|
690
|
-
flex-shrink: 0;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
:where([data-blocfeed-ui-root]) .bf-recording-indicator {
|
|
694
|
-
display: flex;
|
|
695
|
-
align-items: center;
|
|
696
|
-
gap: 8px;
|
|
697
|
-
font-size: 12px;
|
|
698
|
-
color: var(--bf-danger);
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
:where([data-blocfeed-ui-root]) .bf-rec-dot {
|
|
702
|
-
width: 8px;
|
|
703
|
-
height: 8px;
|
|
704
|
-
border-radius: 50%;
|
|
705
|
-
background: var(--bf-danger);
|
|
706
|
-
flex-shrink: 0;
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
:where([data-blocfeed-ui-root]) .bf-rec-dot-pulse {
|
|
710
|
-
animation: bf-rec-pulse 1s ease-in-out infinite;
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
@keyframes bf-rec-pulse {
|
|
714
|
-
0%, 100% { opacity: 1; }
|
|
715
|
-
50% { opacity: 0.3; }
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
:where([data-blocfeed-ui-root]) .bf-video-preview {
|
|
719
|
-
position: relative;
|
|
720
|
-
border-radius: 8px;
|
|
721
|
-
overflow: hidden;
|
|
722
|
-
border: 1px solid var(--bf-border);
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
:where([data-blocfeed-ui-root]) .bf-video-preview video {
|
|
726
|
-
width: 100%;
|
|
727
|
-
max-height: 120px;
|
|
728
|
-
object-fit: contain;
|
|
729
|
-
display: block;
|
|
730
|
-
background: black;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
:where([data-blocfeed-ui-root]) .bf-video-remove {
|
|
734
|
-
position: absolute;
|
|
735
|
-
top: 4px;
|
|
736
|
-
right: 4px;
|
|
737
|
-
background: rgba(0, 0, 0, 0.7);
|
|
738
|
-
border: none;
|
|
739
|
-
color: white;
|
|
740
|
-
border-radius: 50%;
|
|
741
|
-
width: 20px;
|
|
742
|
-
height: 20px;
|
|
743
|
-
font-size: 12px;
|
|
744
|
-
cursor: pointer;
|
|
745
|
-
display: flex;
|
|
746
|
-
align-items: center;
|
|
747
|
-
justify-content: center;
|
|
748
|
-
line-height: 1;
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
:where([data-blocfeed-ui-root]) .bf-video-remove:hover {
|
|
752
|
-
background: rgba(0, 0, 0, 0.9);
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
:where([data-blocfeed-ui-root]) .bf-video-meta {
|
|
756
|
-
font-size: 11px;
|
|
757
|
-
color: var(--bf-muted);
|
|
758
|
-
padding: 4px 8px;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
/* ------------------------------------------------------------------ */
|
|
762
|
-
/* Floating recording bar (shown during active recording) */
|
|
763
|
-
/* ------------------------------------------------------------------ */
|
|
764
|
-
|
|
765
|
-
:where([data-blocfeed-ui-root]) .bf-recording-bar {
|
|
766
|
-
position: fixed;
|
|
767
|
-
z-index: var(--bf-z);
|
|
768
|
-
display: flex;
|
|
769
|
-
align-items: center;
|
|
770
|
-
gap: 10px;
|
|
771
|
-
padding: 8px 14px;
|
|
772
|
-
border-radius: 20px;
|
|
773
|
-
background: var(--bf-bg);
|
|
774
|
-
border: 1px solid var(--bf-danger);
|
|
775
|
-
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(239, 68, 68, 0.25);
|
|
776
|
-
font-size: 13px;
|
|
777
|
-
color: var(--bf-fg);
|
|
778
|
-
pointer-events: auto;
|
|
779
|
-
animation: bf-slideUp 0.2s ease-out;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
:where([data-blocfeed-ui-root]) .bf-recording-bar.bf-pos-bottom-right {
|
|
783
|
-
bottom: 24px;
|
|
784
|
-
right: 24px;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
:where([data-blocfeed-ui-root]) .bf-recording-bar.bf-pos-bottom-left {
|
|
788
|
-
bottom: 24px;
|
|
789
|
-
left: 24px;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
:where([data-blocfeed-ui-root]) .bf-recording-bar.bf-pos-top-right {
|
|
793
|
-
top: 24px;
|
|
794
|
-
right: 24px;
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
:where([data-blocfeed-ui-root]) .bf-recording-bar.bf-pos-top-left {
|
|
798
|
-
top: 24px;
|
|
799
|
-
left: 24px;
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
:where([data-blocfeed-ui-root]) .bf-recording-bar-timer {
|
|
803
|
-
color: var(--bf-danger);
|
|
804
|
-
font-weight: 500;
|
|
805
|
-
font-variant-numeric: tabular-nums;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
:where([data-blocfeed-ui-root]) .bf-recording-bar-stop {
|
|
809
|
-
padding: 4px 12px;
|
|
810
|
-
border-radius: 12px;
|
|
811
|
-
border: 1px solid var(--bf-danger);
|
|
812
|
-
background: transparent;
|
|
813
|
-
color: var(--bf-danger);
|
|
814
|
-
font-size: 12px;
|
|
815
|
-
font-weight: 600;
|
|
816
|
-
cursor: pointer;
|
|
817
|
-
transition: background 0.15s, color 0.15s;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
:where([data-blocfeed-ui-root]) .bf-recording-bar-stop:hover {
|
|
821
|
-
background: var(--bf-danger);
|
|
822
|
-
color: #fff;
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
/* ------------------------------------------------------------------ */
|
|
826
|
-
/* Watermark */
|
|
827
|
-
/* ------------------------------------------------------------------ */
|
|
828
|
-
|
|
829
|
-
:where([data-blocfeed-ui-root]) .bf-watermark {
|
|
830
|
-
padding: 6px 12px;
|
|
831
|
-
border-top: 1px solid rgba(255, 255, 255, 0.06);
|
|
832
|
-
text-align: center;
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
:where([data-blocfeed-ui-root]) .bf-watermark a {
|
|
836
|
-
font-size: 10px;
|
|
837
|
-
color: rgba(243, 244, 246, 0.35);
|
|
838
|
-
text-decoration: none;
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
:where([data-blocfeed-ui-root]) .bf-watermark a:hover {
|
|
842
|
-
color: var(--bf-accent);
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
:where([data-blocfeed-ui-root]) .bf-watermark .bf-my-feedback-link {
|
|
846
|
-
display: block;
|
|
847
|
-
margin-bottom: 2px;
|
|
848
|
-
font-size: 10px;
|
|
849
|
-
color: var(--bf-accent);
|
|
850
|
-
opacity: 0.7;
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
:where([data-blocfeed-ui-root]) .bf-watermark .bf-my-feedback-link:hover {
|
|
854
|
-
opacity: 1;
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
:where([data-blocfeed-ui-root]) .bf-toast-link {
|
|
858
|
-
display: block;
|
|
859
|
-
margin-top: 4px;
|
|
860
|
-
font-size: 11px;
|
|
861
|
-
color: var(--bf-accent);
|
|
862
|
-
pointer-events: auto;
|
|
863
|
-
text-decoration: none;
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
:where([data-blocfeed-ui-root]) .bf-toast-link:hover {
|
|
867
|
-
text-decoration: underline;
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
/* ------------------------------------------------------------------ */
|
|
871
|
-
/* Reduced motion */
|
|
872
|
-
/* ------------------------------------------------------------------ */
|
|
873
|
-
|
|
874
|
-
@media (prefers-reduced-motion: reduce) {
|
|
875
|
-
:where([data-blocfeed-ui-root]) .bf-panel,
|
|
876
|
-
:where([data-blocfeed-ui-root]) .bf-toast,
|
|
877
|
-
:where([data-blocfeed-ui-root]) .bf-hint,
|
|
878
|
-
:where([data-blocfeed-ui-root]) .bf-cursor,
|
|
879
|
-
:where([data-blocfeed-ui-root]) .bf-rec-dot-pulse,
|
|
880
|
-
:where([data-blocfeed-ui-root]) .bf-recording-bar {
|
|
881
|
-
animation: none;
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
`;function Me(){if(!chunk4VWH5ZG6_cjs.a()||document.getElementById(Re))return;let t=document.createElement("style");t.id=Re,t.textContent=It,document.head.appendChild(t);}var Le={triggerLabel:"Feedback",panelTitle:"Feedback",hintText:"Click an element to attach your feedback. Press Esc to cancel.",cancelButton:"Cancel",rePickButton:"Re-pick",closeButton:"Close",textareaPlaceholder:"What's happening? What did you expect?",screenshotElement:"Screenshot element",screenshotFullPage:"Full page",capturingText:"Capturing screenshots\u2026",submittingText:"Submitting\u2026",successText:"Sent. Thank you!",toastText:"Feedback sent",sendButton:"Send",categoryBug:"Bug",categoryFeature:"Feature",categoryUx:"UX",categoryGeneral:"General",recordButton:"Record",stopRecordButton:"Stop",recordingText:"Recording\u2026",recordingDeniedText:"Screen share was denied",videoPreviewLabel:"Video attached",removeVideoButton:"Remove",voiceButton:"Voice",voiceStopButton:"Stop",voiceRecordingText:"Recording\u2026",voiceTranscribingText:"Transcribing\u2026",voiceDeniedText:"Microphone access was denied",voiceErrorText:"Voice transcription failed. Please type instead.",voiceEmptyText:"No speech detected. Try again or type instead."};function ze(t){return t?{...Le,...t}:Le}function ae(){let t=react.useContext(Y);if(!t)throw new Error("useBlocFeed must be used within a <BlocFeedProvider />");return {state:t.state,controller:t.controller,start:t.controller.start,stop:t.controller.stop,clearSelection:t.controller.clearSelection,submit:t.controller.submit,startRecording:t.controller.startRecording,stopRecording:t.controller.stopRecording,removeVideo:t.controller.removeVideo}}function y(t){switch(t){case "bottom-left":return "bf-trigger bf-trigger-bl";case "top-right":return "bf-trigger bf-trigger-tr";case "top-left":return "bf-trigger bf-trigger-tl";default:return "bf-trigger"}}function g({size:t=14}){return jsxRuntime.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"M20 6L9 17l-5-5",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ie({size:t=14}){return jsxRuntime.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ae({size:t=16}){return jsxRuntime.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[jsxRuntime.jsx("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M22 6l-10 7L2 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function _e({position:t,onClick:e,isVisible:i,label:r,queueCount:a,showSuccess:p}){return i?jsxRuntime.jsxs("button",{className:y(t),type:"button",onClick:e,"aria-label":r,children:[p?jsxRuntime.jsx("span",{style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:14})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"bf-dot","aria-hidden":"true"}),r]}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge","aria-label":`${a} queued`,children:a})]}):null}function h(){let[t,e]=react.useState(()=>typeof window>"u"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return react.useEffect(()=>{let i=window.matchMedia("(prefers-reduced-motion: reduce)"),r=a=>e(a.matches);return i.addEventListener("change",r),()=>i.removeEventListener("change",r)},[]),t}var Vt={duration:.18,ease:"easeOut"},$t={duration:0};function Oe({position:t,onClick:e,isVisible:i,label:r,queueCount:a,showSuccess:p}){let[n,l]=react.useState(false),o=h(),c=o?$t:Vt;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:i&&jsxRuntime.jsx(framerMotion.motion.button,{className:y(t),type:"button",onClick:e,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),"aria-label":r,initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},transition:c,whileTap:{scale:.92},style:{overflow:"hidden"},children:p?jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0},animate:{scale:1},transition:c,style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:14})},"success"):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(framerMotion.motion.span,{className:"bf-dot","aria-hidden":"true",animate:o?{}:{scale:n?1:[1,1.2,1],boxShadow:n?"0 0 0 4px rgba(99, 102, 241, 0.18)":["0 0 0 4px rgba(99, 102, 241, 0.18)","0 0 0 8px rgba(99, 102, 241, 0.28)","0 0 0 4px rgba(99, 102, 241, 0.18)"]},transition:n||o?c:{duration:2,repeat:1/0,ease:"easeInOut"}}),jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:n&&jsxRuntime.jsx(framerMotion.motion.span,{initial:{opacity:0,x:o?0:-6},animate:{opacity:1,x:0},exit:{opacity:0,x:o?0:-6},transition:c,style:{whiteSpace:"nowrap"},children:r},"label")}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge","aria-label":`${a} queued`,children:a})]})},"dot")})}var Yt={duration:.18,ease:"easeOut"},Ve={duration:0};function Ke({position:t,onClick:e,isVisible:i,label:r,queueCount:a,showSuccess:p}){let[n,l]=react.useState(false),o=h(),c=o?Ve:Yt;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:i&&jsxRuntime.jsxs(framerMotion.motion.div,{className:y(t),initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{y:8,opacity:0},transition:c,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),style:{background:"transparent",border:"none",boxShadow:"none",padding:0},children:[jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:n&&jsxRuntime.jsx(framerMotion.motion.div,{initial:{opacity:0,y:o?0:4},animate:{opacity:1,y:0},exit:{opacity:0,y:o?0:4},transition:c,style:{position:"absolute",bottom:"calc(100% + 8px)",left:"50%",transform:"translateX(-50%)",padding:"6px 12px",borderRadius:"8px",background:"var(--bf-panel-bg)",border:"1px solid var(--bf-border)",boxShadow:"var(--bf-shadow)",whiteSpace:"nowrap",fontSize:"12px",color:"var(--bf-panel-fg)",pointerEvents:"none"},children:r},"tooltip")}),jsxRuntime.jsxs(framerMotion.motion.button,{type:"button",onClick:e,"aria-label":r,style:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",width:"40px",height:"40px",borderRadius:"50%",border:"1px solid var(--bf-border)",background:"var(--bf-panel-bg)",color:"var(--bf-panel-fg)",boxShadow:"var(--bf-shadow)",cursor:"pointer",padding:0},animate:o?{}:{y:[0,-3,0]},transition:o?Ve:{y:{duration:3,repeat:1/0,ease:"easeInOut"}},whileHover:{scale:1.1,borderColor:"var(--bf-accent)"},whileTap:{scale:.9},children:[p?jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0},animate:{scale:1},transition:c,style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:16})},"success"):jsxRuntime.jsx(Ie,{size:16}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge bf-badge-float","aria-label":`${a} queued`,children:a})]})]},"bubble")})}var Qt={duration:.2,ease:"easeOut"},qt={duration:0};function Xe(t){return t==="bottom-left"||t==="top-left"}function Jt(t){return `bf-trigger-edge ${Xe(t)?"bf-trigger-edge-left":"bf-trigger-edge-right"}`}function Ye({position:t,onClick:e,isVisible:i,label:r,queueCount:a,showSuccess:p}){let[n,l]=react.useState(false),o=Xe(t),c=h(),x=c?qt:Qt;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:i&&jsxRuntime.jsx(framerMotion.motion.button,{className:Jt(t),type:"button",onClick:e,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),"aria-label":r,initial:{opacity:0,width:0},animate:{opacity:1,width:n?140:22,height:n?40:90},exit:{width:0,opacity:0},transition:x,whileTap:{scale:.97},style:{top:"50%",translateY:"-50%"},children:p?jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0},animate:{scale:1},transition:x,style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:14})},"success"):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(framerMotion.motion.span,{animate:{rotate:c||n?0:o?-90:90,opacity:n?1:.6},transition:x,style:{display:"flex",alignItems:"center",gap:"8px",whiteSpace:"nowrap",fontSize:"12px",letterSpacing:"0.5px",textTransform:"uppercase"},children:[n&&jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0},animate:{scale:1},transition:{duration:.12},style:{width:"6px",height:"6px",borderRadius:"50%",background:"var(--bf-accent)",flexShrink:0}}),r]}),jsxRuntime.jsx(framerMotion.motion.span,{"aria-hidden":"true",animate:{opacity:n?1:0},transition:{duration:.12},style:{position:"absolute",top:0,bottom:0,[o?"left":"right"]:0,width:"2px",background:"var(--bf-accent)"}}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge","aria-label":`${a} queued`,children:a})]})},"edge-tab")})}var to={duration:.18,ease:"easeOut"},oo={duration:0};function je({delay:t,hovered:e,reduced:i}){return i?null:jsxRuntime.jsx(framerMotion.motion.span,{"aria-hidden":"true",style:{position:"absolute",width:"10px",height:"10px",borderRadius:"50%",border:"2px solid var(--bf-accent)",pointerEvents:"none"},animate:e?{scale:1,opacity:0}:{scale:[1,1.8],opacity:[.5,0]},transition:e?{duration:.15}:{duration:2,repeat:1/0,delay:t,ease:"easeOut"}})}function qe({position:t,onClick:e,isVisible:i,label:r,queueCount:a,showSuccess:p}){let[n,l]=react.useState(false),o=h(),c=o?oo:to;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:i&&jsxRuntime.jsx(framerMotion.motion.button,{className:y(t),type:"button",onClick:e,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),"aria-label":r,initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},transition:c,whileTap:{scale:.92},style:{overflow:"hidden"},children:p?jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0},animate:{scale:1},transition:c,style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:14})},"success"):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("span",{style:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",width:"10px",height:"10px",flexShrink:0},children:[jsxRuntime.jsx(je,{delay:0,hovered:n,reduced:o}),jsxRuntime.jsx(je,{delay:.7,hovered:n,reduced:o}),jsxRuntime.jsx(framerMotion.motion.span,{className:"bf-dot","aria-hidden":"true",style:{position:"relative",zIndex:1}})]}),jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:n&&jsxRuntime.jsx(framerMotion.motion.span,{initial:{opacity:0,x:o?0:-6},animate:{opacity:1,x:0},exit:{opacity:0,x:o?0:-6},transition:c,style:{whiteSpace:"nowrap"},children:r},"label")}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge","aria-label":`${a} queued`,children:a})]})},"pulse-ring")})}var no={duration:.18,ease:"easeOut"},so={duration:0};function co(t){switch(t){case "bottom-left":return "bf-trigger-minimal bf-trigger-bl";case "top-right":return "bf-trigger-minimal bf-trigger-tr";case "top-left":return "bf-trigger-minimal bf-trigger-tl";default:return "bf-trigger-minimal"}}function et({position:t,onClick:e,isVisible:i,label:r,queueCount:a,showSuccess:p}){let[n,l]=react.useState(false),o=h(),c=o?so:no;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:i&&jsxRuntime.jsxs(framerMotion.motion.button,{className:co(t),type:"button",onClick:e,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),"aria-label":r,initial:{opacity:0,y:o?0:5},animate:{opacity:n?1:.65,y:0},exit:{opacity:0,y:o?0:5},transition:c,whileTap:{scale:.95},children:[p?jsxRuntime.jsx("span",{style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:14})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{children:r}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge",style:{marginLeft:"4px"},"aria-label":`${a} queued`,children:a})]}),!o&&jsxRuntime.jsx(framerMotion.motion.span,{"aria-hidden":"true",style:{position:"absolute",bottom:4,left:4,right:4,height:"2px",background:"var(--bf-accent)",borderRadius:"1px",transformOrigin:"left"},initial:false,animate:{scaleX:n?1:0},transition:c})]},"minimal")})}var po={duration:.18,ease:"easeOut"},uo={duration:0};function ot({position:t,onClick:e,isVisible:i,label:r,queueCount:a,showSuccess:p}){let[n,l]=react.useState(false),o=h(),c=o?uo:po;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:i&&jsxRuntime.jsx(framerMotion.motion.button,{className:y(t),type:"button",onClick:e,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),"aria-label":r,initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},transition:c,whileTap:{scale:.9},style:{overflow:"hidden"},children:p?jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0},animate:{scale:1},transition:c,style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:14})},"success"):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(framerMotion.motion.span,{style:{display:"inline-flex",flexShrink:0},animate:o?{}:n?{scale:1.2,rotate:0}:{rotate:[-5,5,-5]},transition:n||o?c:{duration:3,repeat:1/0,ease:"easeInOut"},children:jsxRuntime.jsx(Ae,{size:16})}),jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:n&&jsxRuntime.jsx(framerMotion.motion.span,{initial:{opacity:0,x:o?0:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:o?0:-8},transition:c,style:{whiteSpace:"nowrap"},children:r},"label")}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge","aria-label":`${a} queued`,children:a})]})},"icon-pop")})}var ho={duration:.18,ease:"easeOut"},xo={duration:0};function at({position:t,onClick:e,isVisible:i,label:r,queueCount:a,showSuccess:p}){let[n,l]=react.useState(false),o=h(),c=o?xo:ho;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:i&&jsxRuntime.jsx(framerMotion.motion.button,{className:y(t),type:"button",onClick:e,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),"aria-label":r,initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},transition:c,whileTap:{scale:.92},style:{overflow:"hidden"},children:p?jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0},animate:{scale:1},transition:c,style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:14})},"success"):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("span",{style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:"10px",height:"10px",flexShrink:0},children:[jsxRuntime.jsx(framerMotion.motion.span,{"aria-hidden":"true",style:{width:"10px",height:"10px",borderRadius:"50%",background:"var(--bf-accent)",position:"relative",zIndex:1},animate:o?{}:{opacity:n?1:[.5,1,.5],boxShadow:n?"0 0 8px 2px var(--bf-accent)":["0 0 4px 1px var(--bf-accent)","0 0 12px 4px var(--bf-accent)","0 0 4px 1px var(--bf-accent)"]},transition:n||o?c:{duration:2,repeat:1/0,ease:"easeInOut"}}),!n&&!o&&jsxRuntime.jsx(framerMotion.motion.span,{"aria-hidden":"true",style:{position:"absolute",width:"18px",height:"2px",background:"linear-gradient(90deg, var(--bf-accent), transparent)",transformOrigin:"left center",left:"5px",top:"4px"},animate:{rotate:[0,360]},transition:{duration:4,repeat:1/0,ease:"linear"}})]}),jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:n&&jsxRuntime.jsx(framerMotion.motion.span,{initial:{opacity:0,x:o?0:-6},animate:{opacity:1,x:0},exit:{opacity:0,x:o?0:-6},transition:c,style:{whiteSpace:"nowrap"},children:r},"label")}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge","aria-label":`${a} queued`,children:a})]})},"beacon")})}var To={duration:.18,ease:"easeOut"},Eo={duration:0};function lt({position:t,onClick:e,isVisible:i,label:r,queueCount:a,showSuccess:p}){let[n,l]=react.useState(false),[o,c]=react.useState(0),x=h(),z=x?Eo:To,f=react.useRef(null);react.useEffect(()=>{if(f.current&&(clearInterval(f.current),f.current=null),!i||n||x){c(n||x?r.length:0);return}let b=8,T=r.length*2+b*2,m=0;return f.current=setInterval(()=>{m=(m+1)%T,m<=r.length?c(m):m<=r.length+b?c(r.length):m<=r.length*2+b?c(r.length*2+b-m):c(0);},100),()=>{f.current&&(clearInterval(f.current),f.current=null);}},[i,n,x,r]);let S=r.slice(0,o);return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:i&&jsxRuntime.jsx(framerMotion.motion.button,{className:y(t),type:"button",onClick:e,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),"aria-label":r,initial:{opacity:0,y:x?0:5},animate:{opacity:1,y:0},exit:{opacity:0,y:x?0:5},transition:z,whileTap:{scale:.95},style:{minWidth:"44px"},children:p?jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0},animate:{scale:1},transition:z,style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:14})},"success"):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"bf-dot","aria-hidden":"true"}),jsxRuntime.jsxs("span",{style:{whiteSpace:"nowrap",minWidth:"1ch"},children:[S,jsxRuntime.jsx("span",{className:"bf-cursor","aria-hidden":"true"})]}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge","aria-label":`${a} queued`,children:a})]})},"typewriter")})}function dt(t){switch(t){case "dot":return Oe;case "bubble":return Ke;case "edge-tab":return Ye;case "pulse-ring":return qe;case "minimal":return et;case "icon-pop":return ot;case "beacon":return at;case "typewriter":return lt;default:return _e}}function ft(t,e,i){return Math.max(e,Math.min(i,t))}function No(t,e,i="bottom-right"){let a=window.innerWidth,p=window.innerHeight,n;n=ft(t.x,12,Math.max(12,a-e-12));let l=t.y+t.height+12,o=Math.max(12,t.y-240);return {top:l+240<=p?l:o,left:n}}function Fo(t){let{rect:e}=t,i={left:`${e.x}px`,top:`${e.y}px`,width:`${Math.max(0,e.width)}px`,height:`${Math.max(0,e.height)}px`};return jsxRuntime.jsx("div",{className:"bf-highlight",style:i,"aria-hidden":"true"})}function Ro(t){let e=react.useRef(null);return react.useEffect(()=>{if(!t||!e.current)return;let i=e.current,r=i.querySelector(".bf-textarea");r?.focus();let a=n=>{if(n.key!=="Tab")return;let l=i.querySelectorAll('button:not([disabled]), textarea:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(l.length===0)return;let o=l[0],c=l[l.length-1];n.shiftKey&&document.activeElement===o?(n.preventDefault(),c.focus()):!n.shiftKey&&document.activeElement===c&&(n.preventDefault(),o.focus());},p=n=>{let l=n.target;l&&(i.contains(l)||(n.stopImmediatePropagation(),r?.focus()));};return document.addEventListener("keydown",a,{capture:true}),document.addEventListener("focusin",p,{capture:true}),()=>{document.removeEventListener("keydown",a,{capture:true}),document.removeEventListener("focusin",p,{capture:true});}},[t]),e}function Mo(t,e){return t?typeof t=="function"?t(e):t.some(i=>i.endsWith("*")?e.startsWith(i.slice(0,-1)):e===i):true}var ce=new Set,pt=false;function Lo(){if(pt||typeof window>"u")return;pt=true;let t=history.pushState,e=history.replaceState,i=()=>{for(let r of ce)r();};history.pushState=function(...r){t.apply(this,r),setTimeout(i,0);},history.replaceState=function(...r){e.apply(this,r),setTimeout(i,0);};}function zo(t){let[e,i]=react.useState(()=>typeof window<"u"?window.location.pathname:"/");return react.useEffect(()=>{if(typeof window>"u")return;let r=()=>i(window.location.pathname);return window.addEventListener("popstate",r),Lo(),ce.add(r),()=>{window.removeEventListener("popstate",r),ce.delete(r);}},[]),Mo(t,e)}function Io(t){let[e,i]=react.useState(()=>!t||t==="dark"?"dark":t==="light"?"light":typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");return react.useEffect(()=>{if(t!=="auto"){i(t==="light"?"light":"dark");return}let r=window.matchMedia("(prefers-color-scheme: dark)"),a=p=>i(p.matches?"dark":"light");return i(r.matches?"dark":"light"),r.addEventListener("change",a),()=>r.removeEventListener("change",a)},[t]),e}var Ao=["bug","feature","ux","general"],Wo={bug:"categoryBug",feature:"categoryFeature",ux:"categoryUx",general:"categoryGeneral"};function X(t){let e=Math.floor(t/1e3),i=Math.floor(e/60),r=e%60;return `${i}:${String(r).padStart(2,"0")}`}function _o(t){return t<1024*1024?`${Math.round(t/1024)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function Ho(t){let{state:e,controller:i,start:r,stop:a,clearSelection:p,submit:n}=ae(),l=t.config.ui?.position,o=ze(t.config.ui?.strings),c=t.config.ui?.branding!==false,[x,z]=react.useState(null),[f,S]=react.useState(""),[b,T]=react.useState(t.config.capture?.element??true),[m,C]=react.useState(t.config.capture?.fullPage??false),[bt,de]=react.useState(null),[D,fe]=react.useState(void 0),pe=t.config.ui?.categories??Ao,gt=t.config.recording?.enabled===true&&chunk4VWH5ZG6_cjs.l(),mt=t.config.recording?.maxDurationMs??3e4,ue=i.getConfig().voice,ht=ue?.enabled===true&&chunk4VWH5ZG6_cjs.n(),xt=ue?.maxDurationMs??6e4,[vt,yt]=react.useState(false),[J,wt]=react.useState(0);react.useEffect(()=>{let s=window.setTimeout(()=>{let v=chunk4VWH5ZG6_cjs.z();wt(v.findings.length);},500);return ()=>window.clearTimeout(s)},[]),react.useImperativeHandle(t.handleRef,()=>({open:r,close:a,submit:s=>n(s),startRecording:()=>i.startRecording(),stopRecording:()=>i.stopRecording(),get isOpen(){return e.phase!=="idle"}}),[r,a,n,i,e.phase]);let be=e.phase==="review"||e.phase==="capturing"||e.phase==="submitting"||e.phase==="error"||e.phase==="success",kt=Ro(be),[Tt,Et]=react.useState(0);react.useEffect(()=>{e.phase==="idle"&&Et(chunk4VWH5ZG6_cjs.i());},[e.phase]);let[St,ge]=react.useState(false),me=react.useRef(e.phase);react.useEffect(()=>{if(me.current==="success"&&e.phase==="idle"){ge(true);let s=window.setTimeout(()=>ge(false),1500);return ()=>window.clearTimeout(s)}me.current=e.phase;},[e.phase]),react.useEffect(()=>{let s=t.config.ui?.shortcut;if(!s)return;let v=s.toLowerCase().split("+").map(N=>N.trim()),B=v[v.length-1]||"",I=new Set(v.slice(0,-1)),ve=N=>{let Nt=/Mac|iPod|iPhone|iPad/.test(navigator.platform);if(I.has("mod")){if(Nt?!N.metaKey:!N.ctrlKey)return}else if(I.has("ctrl")&&!N.ctrlKey||(I.has("meta")||I.has("cmd"))&&!N.metaKey)return;I.has("shift")&&!N.shiftKey||(I.has("alt")||I.has("option"))&&!N.altKey||N.key.toLowerCase()===B&&(N.preventDefault(),e.phase==="idle"?r():a());};return document.addEventListener("keydown",ve),()=>document.removeEventListener("keydown",ve)},[t.config.ui?.shortcut,e.phase,r,a]),react.useEffect(()=>i.subscribeHover(z),[i]),react.useEffect(()=>{let s=i.__unsafeGetSelectedElement();if(!s||e.phase==="idle"||e.phase==="picking"){de(null);return}let v=()=>{de(chunk4VWH5ZG6_cjs.b(s.getBoundingClientRect()));};v();let B=()=>v();return window.addEventListener("scroll",B,{capture:true,passive:true}),window.addEventListener("resize",B,{passive:true}),()=>{window.removeEventListener("scroll",B,{capture:true}),window.removeEventListener("resize",B);}},[i,e.phase,e.selection?.selector]),react.useEffect(()=>{e.phase==="review"&&(S(""),T(t.config.capture?.element??true),C(t.config.capture?.fullPage??false),fe(void 0),V(null));},[e.phase,e.selection?.selector,t.config.capture?.element,t.config.capture?.fullPage]),react.useEffect(()=>{if(e.phase!=="success")return;let s=window.setTimeout(()=>a(),1200);return ()=>window.clearTimeout(s)},[e.phase,a]);let E=e.phase==="capturing"||e.phase==="submitting",M=e.phase==="picking"?x?.rect??null:bt??e.selection?.rect??null,Z=react.useMemo(()=>M?No(M,360,l):null,[M?.x,M?.y,M?.width,M?.height,l]),he=e.lastError?.message,ee=react.useCallback(()=>{let s={capture:{element:b,fullPage:m}};D&&(s.category=D),n(f,s);},[n,f,b,m,D]),Ct=react.useCallback(s=>{(s.metaKey||s.ctrlKey)&&s.key==="Enter"&&f.trim().length>0&&!E&&(s.preventDefault(),ee());},[ee,f,E]),[xe,V]=react.useState(null),Pt=react.useCallback(async()=>{if(e.voiceRecording){i.stopVoice();return}V(null);let s=await i.startVoice();if(s?.text)S(v=>v?v+" "+s.text:s.text);else if(s?.warning)V(o.voiceEmptyText);else if(!s){let v=i.getState().lastError;if(v){let B=v.message?.toLowerCase()??"";B.includes("denied")||B.includes("permission")||B.includes("not allowed")?V(o.voiceDeniedText):V(o.voiceErrorText);}}},[e.voiceRecording,i,o]),Bt=dt(t.config.ui?.triggerStyle);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Bt,{position:l,onClick:()=>r(),isVisible:e.phase==="idle",label:t.config.ui?.triggerLabel??o.triggerLabel,queueCount:Tt,showSuccess:St}),e.phase!=="idle"&&e.phase!=="recording"&&jsxRuntime.jsxs("div",{className:"bf-overlay",role:"presentation",children:[e.phase!=="picking"&&jsxRuntime.jsx("div",{className:"bf-blocker",role:"presentation",onClick:()=>a()}),M&&jsxRuntime.jsx(Fo,{rect:M}),e.phase==="picking"&&jsxRuntime.jsxs("div",{className:"bf-hint",role:"status","aria-live":"polite",children:[jsxRuntime.jsx("p",{id:"bf-hint-text",children:o.hintText}),jsxRuntime.jsx("button",{type:"button",className:"bf-btn",onClick:()=>a(),"aria-label":o.cancelButton,children:o.cancelButton})]}),be&&Z&&jsxRuntime.jsxs("div",{ref:kt,className:"bf-panel",style:{left:Z.left,top:Z.top},role:"dialog","aria-modal":"true","aria-label":"Feedback form",children:[jsxRuntime.jsxs("div",{className:"bf-panelHeader",children:[jsxRuntime.jsx("div",{className:"bf-title",id:"bf-panel-title",children:o.panelTitle}),jsxRuntime.jsxs("div",{className:"bf-row",style:{justifyContent:"flex-end"},children:[jsxRuntime.jsx("button",{type:"button",className:"bf-btn",onClick:()=>p(),disabled:E,"aria-label":o.rePickButton,children:o.rePickButton}),jsxRuntime.jsx("button",{type:"button",className:"bf-btn",onClick:()=>a(),disabled:E,"aria-label":o.closeButton,children:o.closeButton})]})]}),jsxRuntime.jsxs("div",{className:"bf-panelBody",children:[jsxRuntime.jsx("textarea",{className:"bf-textarea",placeholder:o.textareaPlaceholder,value:f,onChange:s=>S(s.target.value),onKeyDown:Ct,disabled:E,"aria-label":o.panelTitle}),pe.length>0&&jsxRuntime.jsx("div",{className:"bf-pills",role:"group","aria-label":"Feedback category",children:pe.map(s=>jsxRuntime.jsx("button",{type:"button",className:`bf-pill${D===s?" bf-pill-active":""}`,onClick:()=>fe(D===s?void 0:s),disabled:E,children:o[Wo[s]]},s))}),jsxRuntime.jsxs("div",{className:"bf-row",role:"group","aria-label":o.screenshotElement,children:[jsxRuntime.jsxs("label",{children:[jsxRuntime.jsx("input",{type:"checkbox",checked:b,onChange:s=>T(s.target.checked),disabled:E}),o.screenshotElement]}),jsxRuntime.jsxs("label",{children:[jsxRuntime.jsx("input",{type:"checkbox",checked:m,onChange:s=>C(s.target.checked),disabled:E}),o.screenshotFullPage]})]}),ht&&e.phase==="review"&&!e.voiceTranscribing&&jsxRuntime.jsx("button",{type:"button",className:`bf-voice-btn${e.voiceRecording?" bf-voice-btn-active":""}`,onClick:Pt,disabled:E,"aria-label":e.voiceRecording?o.voiceStopButton:o.voiceButton,children:e.voiceRecording?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"bf-rec-dot bf-rec-dot-pulse","aria-hidden":"true"}),o.voiceRecordingText," ",X(e.voiceElapsedMs??0)," / ",X(xt)," \u2014 ",o.voiceStopButton]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("svg",{className:"bf-mic-icon",viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[jsxRuntime.jsx("rect",{x:"9",y:"1",width:"6",height:"11",rx:"3"}),jsxRuntime.jsx("path",{d:"M19 10v1a7 7 0 0 1-14 0v-1"}),jsxRuntime.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),jsxRuntime.jsx("line",{x1:"8",y1:"23",x2:"16",y2:"23"})]}),o.voiceButton]})}),e.voiceTranscribing&&jsxRuntime.jsxs("div",{className:"bf-status",role:"status","aria-live":"polite",children:[jsxRuntime.jsx("span",{className:"bf-spinner","aria-hidden":"true"}),o.voiceTranscribingText]}),xe&&!e.voiceRecording&&!e.voiceTranscribing&&jsxRuntime.jsx("div",{className:"bf-error",role:"alert",children:xe}),gt&&e.phase==="review"&&!e.video&&jsxRuntime.jsxs("button",{type:"button",className:"bf-record-btn",onClick:()=>i.startRecording(),disabled:E,"aria-label":o.recordButton,children:[jsxRuntime.jsx("span",{className:"bf-rec-dot","aria-hidden":"true"}),o.recordButton]}),e.video&&e.phase==="review"&&jsxRuntime.jsxs("div",{className:"bf-video-preview",children:[jsxRuntime.jsx("video",{src:e.video.blobUrl,controls:true,muted:true,playsInline:true}),jsxRuntime.jsx("button",{type:"button",className:"bf-video-remove",onClick:()=>i.removeVideo(),"aria-label":o.removeVideoButton,children:"\xD7"}),jsxRuntime.jsxs("div",{className:"bf-video-meta",children:[o.videoPreviewLabel," (",X(e.video.durationMs),", ",_o(e.video.sizeBytes),")"]})]}),e.phase==="capturing"&&jsxRuntime.jsxs("div",{className:"bf-status",role:"status","aria-live":"polite",children:[jsxRuntime.jsx("span",{className:"bf-spinner","aria-hidden":"true"}),o.capturingText]}),e.phase==="submitting"&&jsxRuntime.jsxs("div",{className:"bf-status",role:"status","aria-live":"polite",children:[jsxRuntime.jsx("span",{className:"bf-spinner","aria-hidden":"true"}),o.submittingText]}),e.phase==="success"&&jsxRuntime.jsx("div",{className:"bf-status",role:"status","aria-live":"polite",children:o.successText}),e.phase==="error"&&he&&jsxRuntime.jsx("div",{className:"bf-error",role:"alert",children:he}),jsxRuntime.jsxs("div",{className:"bf-actions",children:[jsxRuntime.jsx("button",{type:"button",className:"bf-btn",onClick:()=>a(),disabled:E,"aria-label":o.cancelButton,children:o.cancelButton}),jsxRuntime.jsx("button",{type:"button",className:"bf-btn bf-btnPrimary",onClick:ee,disabled:E||f.trim().length===0,"aria-label":o.sendButton,children:o.sendButton})]})]}),c&&jsxRuntime.jsxs("div",{className:"bf-watermark",children:[(()=>{let s=chunk4VWH5ZG6_cjs.q();return s?jsxRuntime.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"bf-my-feedback-link",children:"View my feedback"}):null})(),jsxRuntime.jsx("a",{href:"https://blocfeed.com",target:"_blank",rel:"noopener noreferrer",children:"Powered by BlocFeed"})]})]})]}),e.phase==="recording"&&jsxRuntime.jsxs("div",{className:`bf-recording-bar bf-pos-${l}`,role:"status","aria-live":"polite","data-blocfeed-ui":"true",children:[jsxRuntime.jsx("span",{className:"bf-rec-dot bf-rec-dot-pulse","aria-hidden":"true"}),jsxRuntime.jsxs("span",{className:"bf-recording-bar-timer",children:[o.recordingText," ",X(e.recordingElapsedMs??0)," / ",X(mt)]}),jsxRuntime.jsx("button",{type:"button",className:"bf-recording-bar-stop",onClick:()=>i.stopRecording(),"aria-label":o.stopRecordButton,children:o.stopRecordButton})]}),e.phase==="success"&&jsxRuntime.jsxs("div",{className:"bf-toast",role:"status","aria-live":"polite",children:[o.toastText,(()=>{let s=chunk4VWH5ZG6_cjs.q();return s?jsxRuntime.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"bf-toast-link",children:"View my feedback"}):null})()]}),J>0&&!vt&&jsxRuntime.jsxs("div",{className:"bf-security-banner",role:"alert",children:[jsxRuntime.jsx("button",{type:"button",className:"bf-security-banner-dismiss",onClick:()=>yt(true),"aria-label":"Dismiss",children:"\xD7"}),jsxRuntime.jsx("strong",{children:"Security Warning"}),J," potential secret",J>1?"s":""," exposed in client code. Check your environment variables."]})]})}var Oo=react.forwardRef(function(e,i){let r={...e.config??{},blocfeed_id:e.blocfeed_id},[a,p]=react.useState(null),n=zo(r.ui?.showOn),l=Io(r.ui?.theme?.mode),o=!!r.diagnostics;react.useEffect(()=>{if(o)return chunk4VWH5ZG6_cjs.u(r.diagnostics),()=>chunk4VWH5ZG6_cjs.v()},[o]);let c=!!r.security;react.useEffect(()=>{c&&chunk4VWH5ZG6_cjs.y(r.security);},[c]);let x=react.useRef(e.config?.metadata?.enrich);x.current=e.config?.metadata?.enrich;let z=react.useMemo(()=>{if(e.config)return {...e.config,metadata:{...e.config.metadata,enrich:async f=>{let S=x.current,b=S?await S(f):{},T=chunk4VWH5ZG6_cjs.w(),m=chunk4VWH5ZG6_cjs.z(),C=chunk4VWH5ZG6_cjs.j();return {...b,...T.consoleLogs.length>0?{_consoleLogs:T.consoleLogs}:{},...T.networkErrors.length>0?{_networkErrors:T.networkErrors}:{},...m.findings.length>0?{_securityFindings:m.findings}:{},...C.length>0?{_clickEvents:C}:{}}}}}},[]);return react.useEffect(()=>{Me();let f=document.createElement("div");f.setAttribute("data-blocfeed-ui-root","true"),f.setAttribute("data-blocfeed-ui","true"),f.setAttribute("data-bf-theme",l);let S=r.ui?.zIndex;typeof S=="number"&&f.style.setProperty("--bf-z",String(S));let b=r.ui?.theme;b&&(b.accentColor&&f.style.setProperty("--bf-accent",b.accentColor),b.panelBackground&&f.style.setProperty("--bf-panel-bg",b.panelBackground),b.panelForeground&&f.style.setProperty("--bf-panel-fg",b.panelForeground),b.fontFamily&&f.style.setProperty("--bf-font",b.fontFamily));let T=C=>C.stopPropagation(),m=["pointerdown","pointerup","mousedown","mouseup","click","touchstart","touchend"];for(let C of m)f.addEventListener(C,T);try{document.body.appendChild(f);}catch{return}return p(f),()=>{for(let C of m)f.removeEventListener(C,T);f.remove(),p(null);}},[r.ui?.zIndex,r.ui?.theme?.accentColor,r.ui?.theme?.panelBackground,r.ui?.theme?.panelForeground,r.ui?.theme?.fontFamily,l]),!n||!a?null:reactDom.createPortal(jsxRuntime.jsx(ie,{blocfeed_id:r.blocfeed_id,...z?{config:z}:{},children:jsxRuntime.jsx(Ho,{config:r,handleRef:i})}),a)});
|
|
885
|
-
Object.defineProperty(exports,"BehavioralTracker",{enumerable:true,get:function(){return chunk4VWH5ZG6_cjs.s}});exports.BlocFeedProvider=ie;exports.BlocFeedWidget=Oo;exports.useBlocFeed=ae;
|
|
2
|
+
'use strict';var chunkZQDABCPT_cjs=require('./chunk-ZQDABCPT.cjs');Object.defineProperty(exports,"BehavioralTracker",{enumerable:true,get:function(){return chunkZQDABCPT_cjs.s}});Object.defineProperty(exports,"BlocFeed",{enumerable:true,get:function(){return chunkZQDABCPT_cjs.F}});Object.defineProperty(exports,"BlocFeedProvider",{enumerable:true,get:function(){return chunkZQDABCPT_cjs.u}});Object.defineProperty(exports,"BlocFeedWidget",{enumerable:true,get:function(){return chunkZQDABCPT_cjs.D}});Object.defineProperty(exports,"SDK_VERSION",{enumerable:true,get:function(){return chunkZQDABCPT_cjs.E}});Object.defineProperty(exports,"track",{enumerable:true,get:function(){return chunkZQDABCPT_cjs.r}});Object.defineProperty(exports,"useBlocFeed",{enumerable:true,get:function(){return chunkZQDABCPT_cjs.C}});
|