@osiloke/chalo 0.1.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/dist/chalo.mjs ADDED
@@ -0,0 +1,3129 @@
1
+ import { create as e } from "zustand";
2
+ import { createContext as t, createElement as n, forwardRef as r, useCallback as i, useContext as a, useEffect as o, useMemo as s, useRef as c, useState as l } from "react";
3
+ import { AnimatePresence as u, motion as d } from "framer-motion";
4
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
5
+ //#region ../../node_modules/.pnpm/zustand@5.0.12_@types+react@19.2.14_react@19.2.4/node_modules/zustand/esm/middleware.mjs
6
+ function h(e, t) {
7
+ let n;
8
+ try {
9
+ n = e();
10
+ } catch {
11
+ return;
12
+ }
13
+ return {
14
+ getItem: (e) => {
15
+ let r = (e) => e === null ? null : JSON.parse(e, t?.reviver), i = n.getItem(e) ?? null;
16
+ return i instanceof Promise ? i.then(r) : r(i);
17
+ },
18
+ setItem: (e, r) => n.setItem(e, JSON.stringify(r, t?.replacer)),
19
+ removeItem: (e) => n.removeItem(e)
20
+ };
21
+ }
22
+ var g = (e) => (t) => {
23
+ try {
24
+ let n = e(t);
25
+ return n instanceof Promise ? n : {
26
+ then(e) {
27
+ return g(e)(n);
28
+ },
29
+ catch(e) {
30
+ return this;
31
+ }
32
+ };
33
+ } catch (e) {
34
+ return {
35
+ then(e) {
36
+ return this;
37
+ },
38
+ catch(t) {
39
+ return g(t)(e);
40
+ }
41
+ };
42
+ }
43
+ }, _ = (e, t) => (n, r, i) => {
44
+ let a = {
45
+ storage: h(() => window.localStorage),
46
+ partialize: (e) => e,
47
+ version: 0,
48
+ merge: (e, t) => ({
49
+ ...t,
50
+ ...e
51
+ }),
52
+ ...t
53
+ }, o = !1, s = 0, c = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set(), u = a.storage;
54
+ if (!u) return e((...e) => {
55
+ console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`), n(...e);
56
+ }, r, i);
57
+ let d = () => {
58
+ let e = a.partialize({ ...r() });
59
+ return u.setItem(a.name, {
60
+ state: e,
61
+ version: a.version
62
+ });
63
+ }, f = i.setState;
64
+ i.setState = (e, t) => (f(e, t), d());
65
+ let p = e((...e) => (n(...e), d()), r, i);
66
+ i.getInitialState = () => p;
67
+ let m, _ = () => {
68
+ if (!u) return;
69
+ let e = ++s;
70
+ o = !1, c.forEach((e) => e(r() ?? p));
71
+ let t = a.onRehydrateStorage?.call(a, r() ?? p) || void 0;
72
+ return g(u.getItem.bind(u))(a.name).then((e) => {
73
+ if (e) if (typeof e.version == "number" && e.version !== a.version) {
74
+ if (a.migrate) {
75
+ let t = a.migrate(e.state, e.version);
76
+ return t instanceof Promise ? t.then((e) => [!0, e]) : [!0, t];
77
+ }
78
+ console.error("State loaded from storage couldn't be migrated since no migrate function was provided");
79
+ } else return [!1, e.state];
80
+ return [!1, void 0];
81
+ }).then((t) => {
82
+ if (e !== s) return;
83
+ let [i, o] = t;
84
+ if (m = a.merge(o, r() ?? p), n(m, !0), i) return d();
85
+ }).then(() => {
86
+ e === s && (t?.(r(), void 0), m = r(), o = !0, l.forEach((e) => e(m)));
87
+ }).catch((n) => {
88
+ e === s && t?.(void 0, n);
89
+ });
90
+ };
91
+ return i.persist = {
92
+ setOptions: (e) => {
93
+ a = {
94
+ ...a,
95
+ ...e
96
+ }, e.storage && (u = e.storage);
97
+ },
98
+ clearStorage: () => {
99
+ u?.removeItem(a.name);
100
+ },
101
+ getOptions: () => a,
102
+ rehydrate: () => _(),
103
+ hasHydrated: () => o,
104
+ onHydrate: (e) => (c.add(e), () => {
105
+ c.delete(e);
106
+ }),
107
+ onFinishHydration: (e) => (l.add(e), () => {
108
+ l.delete(e);
109
+ })
110
+ }, a.skipHydration || _(), m || p;
111
+ }, v = async (e) => {
112
+ let t = e, n = t.field ? `[data-chalo-field="${t.field}"], #chalo-${t.field}` : t.selector;
113
+ if (!n) throw Error("Click action requires either \"field\" or \"selector\".");
114
+ let r = document.querySelector(n);
115
+ if (!r) throw Error(`Element not found: ${n}`);
116
+ return r.click(), { clicked: n };
117
+ }, y = async (e) => {
118
+ let { selector: t, behavior: n = "smooth", field: r } = e, i = r ? `[data-chalo-field="${r}"], #chalo-${r}` : t;
119
+ if (i) {
120
+ let e = document.querySelector(i);
121
+ if (!e) throw Error(`Element not found: ${i}`);
122
+ return e.scrollIntoView({
123
+ behavior: n,
124
+ block: "center"
125
+ }), e.style.transition = "outline 0.2s", e.style.outline = "3px solid rgba(99, 102, 241, 0.6)", e.style.outlineOffset = "4px", setTimeout(() => {
126
+ e.style.outline = "none";
127
+ }, 2e3), { scrolled: i };
128
+ } else return window.scrollTo({
129
+ top: document.body.scrollHeight,
130
+ behavior: n
131
+ }), { scrolled: "bottom" };
132
+ }, b = async (e, t) => {
133
+ let { field: n, value: r } = e;
134
+ t.variables[n] = r;
135
+ let i = document.querySelector(`[data-chalo-field="${n}"], #chalo-${n}, [name="${n}"], #${n}`);
136
+ return i && ((Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set || Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype, "value")?.set)?.call(i, r), i.dispatchEvent(new Event("input", { bubbles: !0 })), i.dispatchEvent(new Event("change", { bubbles: !0 }))), {
137
+ field: n,
138
+ value: r
139
+ };
140
+ }, x = async (e) => {
141
+ let { url: t, method: n = "GET", headers: r, body: i } = e, a = await fetch(t, {
142
+ method: n,
143
+ headers: {
144
+ "Content-Type": "application/json",
145
+ ...r
146
+ },
147
+ body: i ? JSON.stringify(i) : void 0
148
+ });
149
+ if (!a.ok) throw Error(`API call failed: ${a.status} ${a.statusText}`);
150
+ let o = await a.json();
151
+ return {
152
+ url: t,
153
+ status: a.status,
154
+ data: o
155
+ };
156
+ }, S = async (e) => {
157
+ let { durationMs: t } = e;
158
+ return await new Promise((e) => setTimeout(e, t)), { waited: t };
159
+ }, C = async (e, t) => {
160
+ let { condition: n } = e;
161
+ return { conditionMet: T(n, t) };
162
+ }, w = async (e) => {
163
+ let { path: t } = e;
164
+ return window.history.pushState({}, "", t), window.dispatchEvent(new PopStateEvent("popstate")), { navigated: t };
165
+ };
166
+ function T(e, t) {
167
+ if (!e) return !0;
168
+ switch (e.type) {
169
+ case "field_value": return e.field ? t.variables[e.field] == e.value : !1;
170
+ case "field_touched": return e.field ? t.variables[`__touched_${e.field}`] === !0 : !1;
171
+ case "custom": return e.predicate ? e.predicate(t.variables, t.variables) : !1;
172
+ default: return !0;
173
+ }
174
+ }
175
+ var ee = {
176
+ click: v,
177
+ scroll: y,
178
+ fill_field: b,
179
+ api_call: x,
180
+ wait: S,
181
+ conditional: C,
182
+ navigate: w,
183
+ custom: async (e, t) => {
184
+ let { handlerId: n } = e;
185
+ throw Error(`No handler registered for custom action: ${n}`);
186
+ }
187
+ };
188
+ async function E(e, t) {
189
+ let n = t?.maxAttempts ?? 1, r = t?.delayMs ?? 1e3, i = t?.backoff ?? "fixed", a = null;
190
+ for (let t = 1; t <= n; t++) try {
191
+ return {
192
+ result: await e(),
193
+ attempts: t
194
+ };
195
+ } catch (e) {
196
+ if (a = e, t < n) {
197
+ let e = i === "exponential" ? r * 2 ** (t - 1) : r;
198
+ await new Promise((t) => setTimeout(t, e));
199
+ }
200
+ }
201
+ throw a;
202
+ }
203
+ function te(e) {
204
+ let t = new Map(e.map((e) => [e.id, e])), n = /* @__PURE__ */ new Set(), r = [];
205
+ function i(e) {
206
+ if (n.has(e)) return;
207
+ n.add(e);
208
+ let a = t.get(e);
209
+ a && (a.dependsOn?.forEach((e) => i(e)), r.push(a));
210
+ }
211
+ return e.forEach((e) => i(e.id)), r;
212
+ }
213
+ var D = new class {
214
+ handlers = new Map(Object.entries(ee));
215
+ abortController = null;
216
+ registerHandler(e, t) {
217
+ this.handlers.set(e, t);
218
+ }
219
+ getHandler(e) {
220
+ return this.handlers.get(e);
221
+ }
222
+ async executeAction(e, t) {
223
+ if (e.condition && !T(e.condition, t)) return {
224
+ id: e.id,
225
+ status: "skipped",
226
+ attempts: 0
227
+ };
228
+ if (e.dependsOn?.length) {
229
+ let n = e.dependsOn.filter((e) => t.results[e]?.status === "failed" || t.results[e]?.status === "cancelled");
230
+ if (n.length > 0) return {
231
+ id: e.id,
232
+ status: "skipped",
233
+ attempts: 0,
234
+ error: `Dependencies failed: ${n.join(", ")}`
235
+ };
236
+ }
237
+ let n = this.handlers.get(e.type);
238
+ if (!n) return {
239
+ id: e.id,
240
+ status: "failed",
241
+ attempts: 0,
242
+ error: `No handler for action type: ${e.type}`
243
+ };
244
+ t.currentActionId = e.id;
245
+ let r = {
246
+ id: e.id,
247
+ status: "running",
248
+ attempts: 0,
249
+ startedAt: Date.now()
250
+ };
251
+ try {
252
+ let { result: i, attempts: a } = await E(() => n(e.config, t), e.retry);
253
+ r.status = "success", r.data = i, r.attempts = a, r.completedAt = Date.now();
254
+ } catch (t) {
255
+ r.status = "failed", r.error = t.message, r.attempts = e.retry?.maxAttempts ?? 1, r.completedAt = Date.now();
256
+ }
257
+ return t.results[e.id] = r, t.currentActionId = null, r;
258
+ }
259
+ async executeSequence(e, t, n) {
260
+ this.abortController = new AbortController();
261
+ let r = te(e);
262
+ for (let e of r) {
263
+ if (this.abortController.signal.aborted) {
264
+ r.filter((e) => !t.results[e.id]).forEach((e) => {
265
+ t.results[e.id] = {
266
+ id: e.id,
267
+ status: "cancelled",
268
+ attempts: 0
269
+ };
270
+ });
271
+ break;
272
+ }
273
+ await this.executeAction(e, t), n?.({ ...t.results });
274
+ }
275
+ return this.abortController = null, t.results;
276
+ }
277
+ cancel() {
278
+ this.abortController?.abort();
279
+ }
280
+ }(), ne = {
281
+ activeMissionId: null,
282
+ currentStepId: null,
283
+ missionProgress: 0,
284
+ fieldValues: {},
285
+ fieldStates: {},
286
+ missions: {},
287
+ interactionHistory: [],
288
+ tourHistory: {},
289
+ completedMissions: [],
290
+ executionContext: {
291
+ results: {},
292
+ variables: {},
293
+ isRunning: !1,
294
+ currentActionId: null
295
+ },
296
+ isPaused: !1,
297
+ isCompleted: !1,
298
+ error: null
299
+ }, O = e()(_((e, t) => ({
300
+ ...ne,
301
+ registerMission: (t) => {
302
+ e((e) => ({ missions: {
303
+ ...e.missions,
304
+ [t.id]: t
305
+ } }));
306
+ },
307
+ startMission: (n) => {
308
+ let { missions: r } = t(), i = r[n];
309
+ if (!i) {
310
+ console.error(`Mission "${n}" not found in registry.`), e({ error: `Mission "${n}" not found in registry.` });
311
+ return;
312
+ }
313
+ e({
314
+ activeMissionId: i.id,
315
+ currentStepId: i.steps[0]?.id || null,
316
+ missionProgress: 0,
317
+ fieldValues: {},
318
+ fieldStates: {},
319
+ interactionHistory: [],
320
+ isPaused: !1,
321
+ isCompleted: !1,
322
+ error: null
323
+ });
324
+ },
325
+ pauseMission: () => e({ isPaused: !0 }),
326
+ resumeMission: () => e({ isPaused: !1 }),
327
+ completeMission: () => e({
328
+ isCompleted: !0,
329
+ activeMissionId: null,
330
+ currentStepId: null
331
+ }),
332
+ goToStep: (n) => {
333
+ let { activeMissionId: r } = t();
334
+ r && e({ currentStepId: n });
335
+ },
336
+ nextStep: () => {},
337
+ prevStep: () => {},
338
+ updateField: (n, r, i = "idle") => {
339
+ let { fieldValues: a, fieldStates: o } = t();
340
+ a[n] === r && o[n] === i || e((e) => ({
341
+ fieldValues: {
342
+ ...e.fieldValues,
343
+ [n]: r
344
+ },
345
+ fieldStates: {
346
+ ...e.fieldStates,
347
+ [n]: i
348
+ }
349
+ }));
350
+ },
351
+ addInteraction: (t, n) => {
352
+ e((e) => ({ interactionHistory: [...e.interactionHistory.filter((e) => e.stepId !== t), {
353
+ stepId: t,
354
+ actionText: n,
355
+ timestamp: Date.now()
356
+ }] }));
357
+ },
358
+ recordTourEntry: (t, n, r) => {
359
+ e((e) => ({ tourHistory: {
360
+ ...e.tourHistory,
361
+ [t]: {
362
+ missionId: t,
363
+ lastStepId: n,
364
+ completed: r,
365
+ lastAccessed: Date.now()
366
+ }
367
+ } }));
368
+ },
369
+ resetMission: () => {
370
+ e({
371
+ activeMissionId: null,
372
+ currentStepId: null,
373
+ missionProgress: 0,
374
+ fieldValues: {},
375
+ fieldStates: {},
376
+ interactionHistory: [],
377
+ executionContext: {
378
+ results: {},
379
+ variables: {},
380
+ isRunning: !1,
381
+ currentActionId: null
382
+ },
383
+ isPaused: !1,
384
+ isCompleted: !1,
385
+ error: null
386
+ });
387
+ },
388
+ dismissAllTours: () => {
389
+ e((e) => ({ tourHistory: Object.fromEntries(Object.entries(e.tourHistory).map(([e, t]) => [e, {
390
+ ...t,
391
+ completed: !0
392
+ }])) }));
393
+ },
394
+ markMissionCompleted: (n) => {
395
+ let { missions: r } = t();
396
+ if (!r[n]?.allowCompletion) {
397
+ console.warn(`Mission "${n}" does not allow completion. Set allowCompletion: true on the mission.`);
398
+ return;
399
+ }
400
+ e((e) => ({ completedMissions: e.completedMissions.includes(n) ? e.completedMissions : [...e.completedMissions, n] }));
401
+ },
402
+ registerActionHandler: (e, t) => {
403
+ D.registerHandler(e, t);
404
+ },
405
+ executeAction: async (n) => {
406
+ let { executionContext: r } = t();
407
+ e((e) => ({ executionContext: {
408
+ ...e.executionContext,
409
+ isRunning: !0
410
+ } }));
411
+ let i = await D.executeAction(n, r);
412
+ return e((e) => ({ executionContext: {
413
+ ...e.executionContext,
414
+ ...r,
415
+ isRunning: !1
416
+ } })), i;
417
+ },
418
+ executeActionSequence: async (n, r) => {
419
+ let { executionContext: i, addInteraction: a } = t();
420
+ i.results = {}, i.variables = {}, i.isRunning = !0, e((e) => ({ executionContext: {
421
+ ...e.executionContext,
422
+ ...i
423
+ } }));
424
+ let o = await D.executeSequence(n, i, (t) => {
425
+ if (e((e) => ({ executionContext: {
426
+ ...e.executionContext,
427
+ results: t,
428
+ isRunning: !0
429
+ } })), r) {
430
+ let e = Object.values(t).filter((e) => e.status === "success").length;
431
+ a(r, `Action progress: ${e}/${n.length} completed`);
432
+ }
433
+ });
434
+ return e((e) => ({ executionContext: {
435
+ ...e.executionContext,
436
+ results: o,
437
+ isRunning: !1,
438
+ currentActionId: null
439
+ } })), o;
440
+ },
441
+ cancelExecution: () => {
442
+ D.cancel(), e((e) => ({ executionContext: {
443
+ ...e.executionContext,
444
+ isRunning: !1,
445
+ currentActionId: null
446
+ } }));
447
+ },
448
+ reset: () => e(ne),
449
+ setError: (t) => e({ error: t })
450
+ }), {
451
+ name: "chalo-storage",
452
+ storage: h(() => localStorage),
453
+ partialize: (e) => ({
454
+ activeMissionId: e.activeMissionId,
455
+ currentStepId: e.currentStepId,
456
+ fieldValues: e.fieldValues,
457
+ interactionHistory: e.interactionHistory,
458
+ tourHistory: e.tourHistory,
459
+ completedMissions: e.completedMissions,
460
+ isPaused: e.isPaused,
461
+ isCompleted: e.isCompleted
462
+ })
463
+ }));
464
+ //#endregion
465
+ //#region src/hooks/use-chalo.ts
466
+ function k(e) {
467
+ return e ? (e, t) => {
468
+ console.debug(`%c[use-chalo] %c${e}`, "color: #8b5cf6; font-weight: bold;", "color: #a78bfa;", t === void 0 ? "" : t);
469
+ } : () => {};
470
+ }
471
+ function A(e = {}) {
472
+ let { form: t, onMissionComplete: n, onStepChange: r, debug: a = !1 } = e, l = s(() => k(a), [a]), u = O((e) => e.activeMissionId), d = O((e) => e.currentStepId), f = O((e) => e.isCompleted), p = O((e) => e.isPaused), m = O((e) => e.missions), h = O((e) => e.fieldValues), g = O((e) => e.fieldStates), _ = O((e) => e.interactionHistory), v = O((e) => e.updateField), y = i((e, t, n) => {
473
+ l("updateField", {
474
+ name: e,
475
+ status: n
476
+ }), v(e, t, n);
477
+ }, [v, l]), b = O((e) => e.startMission), x = O((e) => e.pauseMission), S = i(() => {
478
+ l("pauseMission"), x();
479
+ }, [x, l]), C = O((e) => e.resumeMission), w = i(() => {
480
+ l("resumeMission"), C();
481
+ }, [C, l]), T = O((e) => e.completeMission), ee = i(() => {
482
+ l("completeMission"), T();
483
+ }, [T, l]), E = O((e) => e.goToStep), te = i((e) => {
484
+ l("goToStep", { stepId: e }), E(e);
485
+ }, [E, l]), D = O((e) => e.reset), ne = i(() => {
486
+ l("reset"), D();
487
+ }, [D, l]), A = O((e) => e.resetMission), re = i(() => {
488
+ l("resetMission"), A();
489
+ }, [A, l]), ie = O((e) => e.dismissAllTours), j = i(() => {
490
+ l("dismissAllTours"), ie();
491
+ }, [ie, l]), ae = O((e) => e.markMissionCompleted), oe = i((e) => {
492
+ l("markMissionCompleted", { missionId: e }), ae(e);
493
+ }, [ae, l]), se = O((e) => e.registerActionHandler), ce = i((e, t) => {
494
+ l("registerActionHandler", { type: e }), se(e, t);
495
+ }, [se, l]), M = O((e) => e.executeAction), N = i((e) => (l("executeAction", { type: e.type }), M(e)), [M, l]), P = O((e) => e.executeActionSequence), le = i((e, t) => (l("executeActionSequence", {
496
+ stepId: t,
497
+ count: e.length
498
+ }), P(e, t)), [P, l]), F = O((e) => e.cancelExecution), ue = i(() => {
499
+ l("cancelExecution"), F();
500
+ }, [F, l]), I = O((e) => e.addInteraction), L = i((e, t) => {
501
+ l("addInteraction", {
502
+ stepId: e,
503
+ actionText: t
504
+ }), I(e, t);
505
+ }, [I, l]), R = O((e) => e.registerMission), de = i((e) => {
506
+ l("registerMission", { missionId: e.id }), R(e);
507
+ }, [R, l]), z = O((e) => e.recordTourEntry), fe = i((e, t, n) => {
508
+ l("recordTourEntry", {
509
+ missionId: e,
510
+ stepId: t,
511
+ completed: n
512
+ }), z(e, t, n);
513
+ }, [z, l]), pe = O((e) => e.completedMissions), me = O((e) => e.executionContext), he = O((e) => e.tourHistory), ge = i((e) => {
514
+ l("startMission", { missionId: e }), z(e, "", !1), b(e);
515
+ }, [
516
+ b,
517
+ z,
518
+ l
519
+ ]), _e = s(() => t?.formState.errors || {}, [t?.formState.errors]), ve = i((e) => m[e] || void 0, [m]), B = s(() => u && ve(u) || null, [u, ve]), V = s(() => !B || !d ? null : B.steps.find((e) => e.id === d) || null, [B, d]), H = c({}), U = c(/* @__PURE__ */ new Set());
520
+ o(() => {
521
+ if (!t || !u) return;
522
+ let e = t.watch((e, { name: t }) => {
523
+ if (t) {
524
+ let n = e[t];
525
+ U.current.add(t), y(t, n);
526
+ } else Object.entries(e).forEach(([e, t]) => {
527
+ U.current.add(e), y(e, t);
528
+ });
529
+ });
530
+ return () => e.unsubscribe();
531
+ }, [
532
+ t,
533
+ u,
534
+ y
535
+ ]), o(() => {
536
+ !t || !u || Object.entries(h).forEach(([e, n]) => {
537
+ if (U.current.has(e)) {
538
+ U.current.delete(e), H.current[e] = n;
539
+ return;
540
+ }
541
+ if (H.current[e] !== n) {
542
+ try {
543
+ t.setValue(e, n, {
544
+ shouldValidate: !0,
545
+ shouldDirty: !0,
546
+ shouldTouch: !0
547
+ });
548
+ } catch {}
549
+ H.current[e] = n;
550
+ }
551
+ });
552
+ }, [
553
+ h,
554
+ t,
555
+ u
556
+ ]), o(() => {
557
+ if (V?.targetField && t) {
558
+ let e = h[V.targetField];
559
+ if (e !== void 0) try {
560
+ t.setValue(V.targetField, e);
561
+ } catch {}
562
+ setTimeout(() => {
563
+ t.setFocus(V.targetField);
564
+ }, 100);
565
+ }
566
+ if (V?.waitFor?.type === "custom" && V.targetElement) {
567
+ let e = document.querySelector(V.targetElement);
568
+ e && e.removeAttribute("data-clicked");
569
+ }
570
+ r && d && r(d);
571
+ }, [
572
+ d,
573
+ V,
574
+ t,
575
+ r,
576
+ h
577
+ ]);
578
+ let ye = c(/* @__PURE__ */ new Set());
579
+ o(() => {
580
+ ye.current.clear();
581
+ }, [u]), o(() => {
582
+ f && u && n && n(u);
583
+ }, [
584
+ f,
585
+ u,
586
+ n
587
+ ]);
588
+ let be = s(() => {
589
+ if (!B || !d) return 0;
590
+ let e = B.steps.findIndex((e) => e.id === d);
591
+ return e === -1 ? 0 : Math.round((e + 1) / B.steps.length * 100);
592
+ }, [B, d]), xe = i((e) => {
593
+ if (!e) return !0;
594
+ switch (e.type) {
595
+ case "field_value": return e.field ? h[e.field] == e.value : !1;
596
+ case "field_touched": return e.field ? (g[e.field] || "idle") !== "idle" : !1;
597
+ case "custom": return e.predicate ? e.predicate(h, t?.getValues()) : !1;
598
+ default: return !0;
599
+ }
600
+ }, [
601
+ h,
602
+ g,
603
+ t
604
+ ]), Se = i(() => {
605
+ if (!B || !d) return;
606
+ let e = B.steps, t = e.findIndex((e) => e.id === d);
607
+ t < e.length - 1 ? (l("nextStep", {
608
+ missionId: B.id,
609
+ stepId: e[t + 1].id
610
+ }), z(B.id, e[t + 1].id, !1), E(e[t + 1].id)) : (l("nextStep", {
611
+ missionId: B.id,
612
+ completing: !0
613
+ }), z(B.id, d, !0), T());
614
+ }, [
615
+ B,
616
+ d,
617
+ l,
618
+ z,
619
+ E,
620
+ T
621
+ ]), Ce = i(() => {
622
+ if (!B || !d) return;
623
+ let e = B.steps, t = e.findIndex((e) => e.id === d);
624
+ t > 0 && (l("prevStep", { stepId: e[t - 1].id }), E(e[t - 1].id));
625
+ }, [
626
+ B,
627
+ d,
628
+ l,
629
+ E
630
+ ]);
631
+ o(() => {
632
+ !V?.actionSequence || !d || ye.current.has(d) || V.condition && !xe(V.condition) || (ye.current.add(d), le(V.actionSequence, d));
633
+ }, [
634
+ d,
635
+ V?.actionSequence,
636
+ V?.condition,
637
+ le,
638
+ xe
639
+ ]);
640
+ let we = c(/* @__PURE__ */ new Set()), W = c(null), Te = c(Se);
641
+ o(() => {
642
+ Te.current = Se;
643
+ }, [Se]), o(() => {
644
+ if (W.current &&= (clearTimeout(W.current), null), !V?.waitFor) {
645
+ we.current.clear();
646
+ return;
647
+ }
648
+ if (we.current.has(V.id)) return;
649
+ let e = setInterval(() => {
650
+ xe(V.waitFor) && (we.current.add(V.id), clearInterval(e), W.current = setTimeout(() => {
651
+ Te.current(), W.current = null;
652
+ }, 600));
653
+ }, 300);
654
+ return () => {
655
+ clearInterval(e), W.current &&= (clearTimeout(W.current), null);
656
+ };
657
+ }, [
658
+ V?.id,
659
+ V?.waitFor,
660
+ xe
661
+ ]);
662
+ let Ee = i((e, n) => {
663
+ if (l("fillField", { name: e }), U.current.add(e), v(e, n, "valid"), t) try {
664
+ t.setValue(e, n, {
665
+ shouldValidate: !0,
666
+ shouldDirty: !0,
667
+ shouldTouch: !0
668
+ });
669
+ } catch {}
670
+ }, [t, l]);
671
+ return {
672
+ activeMissionId: u,
673
+ currentStepId: d,
674
+ isCompleted: f,
675
+ isPaused: p,
676
+ missions: m,
677
+ fieldValues: h,
678
+ fieldStates: g,
679
+ interactionHistory: _,
680
+ startMission: ge,
681
+ pauseMission: S,
682
+ resumeMission: w,
683
+ completeMission: ee,
684
+ goToStep: te,
685
+ reset: ne,
686
+ resetMission: re,
687
+ dismissAllTours: j,
688
+ markMissionCompleted: oe,
689
+ completedMissions: pe,
690
+ executionContext: me,
691
+ registerActionHandler: ce,
692
+ executeAction: N,
693
+ executeActionSequence: le,
694
+ cancelExecution: ue,
695
+ addInteraction: L,
696
+ registerMission: de,
697
+ activeMission: B,
698
+ currentStep: V,
699
+ missionProgress: be,
700
+ fieldErrors: _e,
701
+ nextStep: Se,
702
+ prevStep: Ce,
703
+ registerField: i((e, n) => {
704
+ if (l("registerField", { name: e }), h[e] !== void 0 && t) try {
705
+ t.setValue(e, h[e]);
706
+ } catch {}
707
+ let r = `chalo-${String(e)}`;
708
+ if (!t) return {
709
+ id: r,
710
+ name: e,
711
+ "data-chalo-field": String(e),
712
+ onChange: (t) => v(e, t.target.value),
713
+ onFocus: () => v(e, h[e], "focused"),
714
+ onBlur: () => v(e, h[e], "idle")
715
+ };
716
+ let i = t.register(e, n);
717
+ return {
718
+ ...i,
719
+ id: r,
720
+ "data-chalo-field": String(e),
721
+ onChange: async (t) => {
722
+ await i.onChange(t), v(e, t.target.value);
723
+ },
724
+ onBlur: async (t) => {
725
+ await i.onBlur(t), v(e, h[e], "idle");
726
+ }
727
+ };
728
+ }, [
729
+ t,
730
+ v,
731
+ h,
732
+ l
733
+ ]),
734
+ registerElement: i((e) => (t) => {
735
+ t && (t.setAttribute("data-chalo-field", e), t.id = t.id || `chalo-${e}`);
736
+ }, []),
737
+ fillField: Ee,
738
+ recordTourEntry: fe,
739
+ tourHistory: he,
740
+ evaluateCondition: xe
741
+ };
742
+ }
743
+ //#endregion
744
+ //#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
745
+ var re = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), ie = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), j = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), ae = (e) => {
746
+ let t = j(e);
747
+ return t.charAt(0).toUpperCase() + t.slice(1);
748
+ }, oe = {
749
+ xmlns: "http://www.w3.org/2000/svg",
750
+ width: 24,
751
+ height: 24,
752
+ viewBox: "0 0 24 24",
753
+ fill: "none",
754
+ stroke: "currentColor",
755
+ strokeWidth: 2,
756
+ strokeLinecap: "round",
757
+ strokeLinejoin: "round"
758
+ }, se = (e) => {
759
+ for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
760
+ return !1;
761
+ }, ce = t({}), M = () => a(ce), N = r(({ color: e, size: t, strokeWidth: r, absoluteStrokeWidth: i, className: a = "", children: o, iconNode: s, ...c }, l) => {
762
+ let { size: u = 24, strokeWidth: d = 2, absoluteStrokeWidth: f = !1, color: p = "currentColor", className: m = "" } = M() ?? {}, h = i ?? f ? Number(r ?? d) * 24 / Number(t ?? u) : r ?? d;
763
+ return n("svg", {
764
+ ref: l,
765
+ ...oe,
766
+ width: t ?? u ?? oe.width,
767
+ height: t ?? u ?? oe.height,
768
+ stroke: e ?? p,
769
+ strokeWidth: h,
770
+ className: re("lucide", m, a),
771
+ ...!o && !se(c) && { "aria-hidden": "true" },
772
+ ...c
773
+ }, [...s.map(([e, t]) => n(e, t)), ...Array.isArray(o) ? o : [o]]);
774
+ }), P = (e, t) => {
775
+ let i = r(({ className: r, ...i }, a) => n(N, {
776
+ ref: a,
777
+ iconNode: t,
778
+ className: re(`lucide-${ie(ae(e))}`, `lucide-${e}`, r),
779
+ ...i
780
+ }));
781
+ return i.displayName = ae(e), i;
782
+ }, le = P("bot", [
783
+ ["path", {
784
+ d: "M12 8V4H8",
785
+ key: "hb8ula"
786
+ }],
787
+ ["rect", {
788
+ width: "16",
789
+ height: "12",
790
+ x: "4",
791
+ y: "8",
792
+ rx: "2",
793
+ key: "enze0r"
794
+ }],
795
+ ["path", {
796
+ d: "M2 14h2",
797
+ key: "vft8re"
798
+ }],
799
+ ["path", {
800
+ d: "M20 14h2",
801
+ key: "4cs60a"
802
+ }],
803
+ ["path", {
804
+ d: "M15 13v2",
805
+ key: "1xurst"
806
+ }],
807
+ ["path", {
808
+ d: "M9 13v2",
809
+ key: "rq6x2g"
810
+ }]
811
+ ]), F = P("chevron-left", [["path", {
812
+ d: "m15 18-6-6 6-6",
813
+ key: "1wnfg3"
814
+ }]]), ue = P("chevron-right", [["path", {
815
+ d: "m9 18 6-6-6-6",
816
+ key: "mthhwq"
817
+ }]]), I = P("circle-alert", [
818
+ ["circle", {
819
+ cx: "12",
820
+ cy: "12",
821
+ r: "10",
822
+ key: "1mglay"
823
+ }],
824
+ ["line", {
825
+ x1: "12",
826
+ x2: "12",
827
+ y1: "8",
828
+ y2: "12",
829
+ key: "1pkeuh"
830
+ }],
831
+ ["line", {
832
+ x1: "12",
833
+ x2: "12.01",
834
+ y1: "16",
835
+ y2: "16",
836
+ key: "4dfq90"
837
+ }]
838
+ ]), L = P("circle-check", [["circle", {
839
+ cx: "12",
840
+ cy: "12",
841
+ r: "10",
842
+ key: "1mglay"
843
+ }], ["path", {
844
+ d: "m9 12 2 2 4-4",
845
+ key: "dzmm74"
846
+ }]]), R = P("circle-x", [
847
+ ["circle", {
848
+ cx: "12",
849
+ cy: "12",
850
+ r: "10",
851
+ key: "1mglay"
852
+ }],
853
+ ["path", {
854
+ d: "m15 9-6 6",
855
+ key: "1uzhvr"
856
+ }],
857
+ ["path", {
858
+ d: "m9 9 6 6",
859
+ key: "z0biqf"
860
+ }]
861
+ ]), de = P("list-filter", [
862
+ ["path", {
863
+ d: "M2 5h20",
864
+ key: "1fs1ex"
865
+ }],
866
+ ["path", {
867
+ d: "M6 12h12",
868
+ key: "8npq4p"
869
+ }],
870
+ ["path", {
871
+ d: "M9 19h6",
872
+ key: "456am0"
873
+ }]
874
+ ]), z = P("loader-circle", [["path", {
875
+ d: "M21 12a9 9 0 1 1-6.219-8.56",
876
+ key: "13zald"
877
+ }]]), fe = P("rotate-ccw", [["path", {
878
+ d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
879
+ key: "1357e3"
880
+ }], ["path", {
881
+ d: "M3 3v5h5",
882
+ key: "1xhq8a"
883
+ }]]), pe = P("send", [["path", {
884
+ d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
885
+ key: "1ffxy3"
886
+ }], ["path", {
887
+ d: "m21.854 2.147-10.94 10.939",
888
+ key: "12cjpa"
889
+ }]]), me = P("type", [
890
+ ["path", {
891
+ d: "M12 4v16",
892
+ key: "1654pz"
893
+ }],
894
+ ["path", {
895
+ d: "M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",
896
+ key: "e0r10z"
897
+ }],
898
+ ["path", {
899
+ d: "M9 20h6",
900
+ key: "s66wpe"
901
+ }]
902
+ ]), he = P("x", [["path", {
903
+ d: "M18 6 6 18",
904
+ key: "1bl5f8"
905
+ }], ["path", {
906
+ d: "m6 6 12 12",
907
+ key: "d8bk6v"
908
+ }]]);
909
+ //#endregion
910
+ //#region ../../node_modules/clsx/dist/clsx.mjs
911
+ function ge(e) {
912
+ var t, n, r = "";
913
+ if (typeof e == "string" || typeof e == "number") r += e;
914
+ else if (typeof e == "object") if (Array.isArray(e)) {
915
+ var i = e.length;
916
+ for (t = 0; t < i; t++) e[t] && (n = ge(e[t])) && (r && (r += " "), r += n);
917
+ } else for (n in e) e[n] && (r && (r += " "), r += n);
918
+ return r;
919
+ }
920
+ function _e() {
921
+ for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = ge(e)) && (r && (r += " "), r += t);
922
+ return r;
923
+ }
924
+ //#endregion
925
+ //#region ../../node_modules/tailwind-merge/dist/bundle-mjs.mjs
926
+ var ve = (e, t) => {
927
+ let n = Array(e.length + t.length);
928
+ for (let t = 0; t < e.length; t++) n[t] = e[t];
929
+ for (let r = 0; r < t.length; r++) n[e.length + r] = t[r];
930
+ return n;
931
+ }, B = (e, t) => ({
932
+ classGroupId: e,
933
+ validator: t
934
+ }), V = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
935
+ nextPart: e,
936
+ validators: t,
937
+ classGroupId: n
938
+ }), H = "-", U = [], ye = "arbitrary..", be = (e) => {
939
+ let t = Ce(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e;
940
+ return {
941
+ getClassGroupId: (e) => {
942
+ if (e.startsWith("[") && e.endsWith("]")) return Se(e);
943
+ let n = e.split(H);
944
+ return xe(n, n[0] === "" && n.length > 1 ? 1 : 0, t);
945
+ },
946
+ getConflictingClassGroupIds: (e, t) => {
947
+ if (t) {
948
+ let t = r[e], i = n[e];
949
+ return t ? i ? ve(i, t) : t : i || U;
950
+ }
951
+ return n[e] || U;
952
+ }
953
+ };
954
+ }, xe = (e, t, n) => {
955
+ if (e.length - t === 0) return n.classGroupId;
956
+ let r = e[t], i = n.nextPart.get(r);
957
+ if (i) {
958
+ let n = xe(e, t + 1, i);
959
+ if (n) return n;
960
+ }
961
+ let a = n.validators;
962
+ if (a === null) return;
963
+ let o = t === 0 ? e.join(H) : e.slice(t).join(H), s = a.length;
964
+ for (let e = 0; e < s; e++) {
965
+ let t = a[e];
966
+ if (t.validator(o)) return t.classGroupId;
967
+ }
968
+ }, Se = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
969
+ let t = e.slice(1, -1), n = t.indexOf(":"), r = t.slice(0, n);
970
+ return r ? ye + r : void 0;
971
+ })(), Ce = (e) => {
972
+ let { theme: t, classGroups: n } = e;
973
+ return we(n, t);
974
+ }, we = (e, t) => {
975
+ let n = V();
976
+ for (let r in e) {
977
+ let i = e[r];
978
+ W(i, n, r, t);
979
+ }
980
+ return n;
981
+ }, W = (e, t, n, r) => {
982
+ let i = e.length;
983
+ for (let a = 0; a < i; a++) {
984
+ let i = e[a];
985
+ Te(i, t, n, r);
986
+ }
987
+ }, Te = (e, t, n, r) => {
988
+ if (typeof e == "string") {
989
+ Ee(e, t, n);
990
+ return;
991
+ }
992
+ if (typeof e == "function") {
993
+ De(e, t, n, r);
994
+ return;
995
+ }
996
+ Oe(e, t, n, r);
997
+ }, Ee = (e, t, n) => {
998
+ let r = e === "" ? t : ke(t, e);
999
+ r.classGroupId = n;
1000
+ }, De = (e, t, n, r) => {
1001
+ if (Ae(e)) {
1002
+ W(e(r), t, n, r);
1003
+ return;
1004
+ }
1005
+ t.validators === null && (t.validators = []), t.validators.push(B(n, e));
1006
+ }, Oe = (e, t, n, r) => {
1007
+ let i = Object.entries(e), a = i.length;
1008
+ for (let e = 0; e < a; e++) {
1009
+ let [a, o] = i[e];
1010
+ W(o, ke(t, a), n, r);
1011
+ }
1012
+ }, ke = (e, t) => {
1013
+ let n = e, r = t.split(H), i = r.length;
1014
+ for (let e = 0; e < i; e++) {
1015
+ let t = r[e], i = n.nextPart.get(t);
1016
+ i || (i = V(), n.nextPart.set(t, i)), n = i;
1017
+ }
1018
+ return n;
1019
+ }, Ae = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, je = (e) => {
1020
+ if (e < 1) return {
1021
+ get: () => void 0,
1022
+ set: () => {}
1023
+ };
1024
+ let t = 0, n = Object.create(null), r = Object.create(null), i = (i, a) => {
1025
+ n[i] = a, t++, t > e && (t = 0, r = n, n = Object.create(null));
1026
+ };
1027
+ return {
1028
+ get(e) {
1029
+ let t = n[e];
1030
+ if (t !== void 0) return t;
1031
+ if ((t = r[e]) !== void 0) return i(e, t), t;
1032
+ },
1033
+ set(e, t) {
1034
+ e in n ? n[e] = t : i(e, t);
1035
+ }
1036
+ };
1037
+ }, Me = "!", Ne = ":", Pe = [], Fe = (e, t, n, r, i) => ({
1038
+ modifiers: e,
1039
+ hasImportantModifier: t,
1040
+ baseClassName: n,
1041
+ maybePostfixModifierPosition: r,
1042
+ isExternal: i
1043
+ }), Ie = (e) => {
1044
+ let { prefix: t, experimentalParseClassName: n } = e, r = (e) => {
1045
+ let t = [], n = 0, r = 0, i = 0, a, o = e.length;
1046
+ for (let s = 0; s < o; s++) {
1047
+ let o = e[s];
1048
+ if (n === 0 && r === 0) {
1049
+ if (o === Ne) {
1050
+ t.push(e.slice(i, s)), i = s + 1;
1051
+ continue;
1052
+ }
1053
+ if (o === "/") {
1054
+ a = s;
1055
+ continue;
1056
+ }
1057
+ }
1058
+ o === "[" ? n++ : o === "]" ? n-- : o === "(" ? r++ : o === ")" && r--;
1059
+ }
1060
+ let s = t.length === 0 ? e : e.slice(i), c = s, l = !1;
1061
+ s.endsWith(Me) ? (c = s.slice(0, -1), l = !0) : s.startsWith(Me) && (c = s.slice(1), l = !0);
1062
+ let u = a && a > i ? a - i : void 0;
1063
+ return Fe(t, l, c, u);
1064
+ };
1065
+ if (t) {
1066
+ let e = t + Ne, n = r;
1067
+ r = (t) => t.startsWith(e) ? n(t.slice(e.length)) : Fe(Pe, !1, t, void 0, !0);
1068
+ }
1069
+ if (n) {
1070
+ let e = r;
1071
+ r = (t) => n({
1072
+ className: t,
1073
+ parseClassName: e
1074
+ });
1075
+ }
1076
+ return r;
1077
+ }, Le = (e) => {
1078
+ let t = /* @__PURE__ */ new Map();
1079
+ return e.orderSensitiveModifiers.forEach((e, n) => {
1080
+ t.set(e, 1e6 + n);
1081
+ }), (e) => {
1082
+ let n = [], r = [];
1083
+ for (let i = 0; i < e.length; i++) {
1084
+ let a = e[i], o = a[0] === "[", s = t.has(a);
1085
+ o || s ? (r.length > 0 && (r.sort(), n.push(...r), r = []), n.push(a)) : r.push(a);
1086
+ }
1087
+ return r.length > 0 && (r.sort(), n.push(...r)), n;
1088
+ };
1089
+ }, Re = (e) => ({
1090
+ cache: je(e.cacheSize),
1091
+ parseClassName: Ie(e),
1092
+ sortModifiers: Le(e),
1093
+ ...be(e)
1094
+ }), ze = /\s+/, Be = (e, t) => {
1095
+ let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a } = t, o = [], s = e.trim().split(ze), c = "";
1096
+ for (let e = s.length - 1; e >= 0; --e) {
1097
+ let t = s[e], { isExternal: l, modifiers: u, hasImportantModifier: d, baseClassName: f, maybePostfixModifierPosition: p } = n(t);
1098
+ if (l) {
1099
+ c = t + (c.length > 0 ? " " + c : c);
1100
+ continue;
1101
+ }
1102
+ let m = !!p, h = r(m ? f.substring(0, p) : f);
1103
+ if (!h) {
1104
+ if (!m) {
1105
+ c = t + (c.length > 0 ? " " + c : c);
1106
+ continue;
1107
+ }
1108
+ if (h = r(f), !h) {
1109
+ c = t + (c.length > 0 ? " " + c : c);
1110
+ continue;
1111
+ }
1112
+ m = !1;
1113
+ }
1114
+ let g = u.length === 0 ? "" : u.length === 1 ? u[0] : a(u).join(":"), _ = d ? g + Me : g, v = _ + h;
1115
+ if (o.indexOf(v) > -1) continue;
1116
+ o.push(v);
1117
+ let y = i(h, m);
1118
+ for (let e = 0; e < y.length; ++e) {
1119
+ let t = y[e];
1120
+ o.push(_ + t);
1121
+ }
1122
+ c = t + (c.length > 0 ? " " + c : c);
1123
+ }
1124
+ return c;
1125
+ }, Ve = (...e) => {
1126
+ let t = 0, n, r, i = "";
1127
+ for (; t < e.length;) (n = e[t++]) && (r = He(n)) && (i && (i += " "), i += r);
1128
+ return i;
1129
+ }, He = (e) => {
1130
+ if (typeof e == "string") return e;
1131
+ let t, n = "";
1132
+ for (let r = 0; r < e.length; r++) e[r] && (t = He(e[r])) && (n && (n += " "), n += t);
1133
+ return n;
1134
+ }, Ue = (e, ...t) => {
1135
+ let n, r, i, a, o = (o) => (n = Re(t.reduce((e, t) => t(e), e())), r = n.cache.get, i = n.cache.set, a = s, s(o)), s = (e) => {
1136
+ let t = r(e);
1137
+ if (t) return t;
1138
+ let a = Be(e, n);
1139
+ return i(e, a), a;
1140
+ };
1141
+ return a = o, (...e) => a(Ve(...e));
1142
+ }, We = [], G = (e) => {
1143
+ let t = (t) => t[e] || We;
1144
+ return t.isThemeGetter = !0, t;
1145
+ }, Ge = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Ke = /^\((?:(\w[\w-]*):)?(.+)\)$/i, qe = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Je = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Ye = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Xe = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Ze = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Qe = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, K = (e) => qe.test(e), q = (e) => !!e && !Number.isNaN(Number(e)), J = (e) => !!e && Number.isInteger(Number(e)), $e = (e) => e.endsWith("%") && q(e.slice(0, -1)), Y = (e) => Je.test(e), et = () => !0, tt = (e) => Ye.test(e) && !Xe.test(e), nt = () => !1, rt = (e) => Ze.test(e), it = (e) => Qe.test(e), at = (e) => !X(e) && !Z(e), ot = (e) => Q(e, wt, nt), X = (e) => Ge.test(e), st = (e) => Q(e, Tt, tt), ct = (e) => Q(e, Et, q), lt = (e) => Q(e, Ot, et), ut = (e) => Q(e, Dt, nt), dt = (e) => Q(e, St, nt), ft = (e) => Q(e, Ct, it), pt = (e) => Q(e, kt, rt), Z = (e) => Ke.test(e), mt = (e) => xt(e, Tt), ht = (e) => xt(e, Dt), gt = (e) => xt(e, St), _t = (e) => xt(e, wt), vt = (e) => xt(e, Ct), yt = (e) => xt(e, kt, !0), bt = (e) => xt(e, Ot, !0), Q = (e, t, n) => {
1146
+ let r = Ge.exec(e);
1147
+ return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
1148
+ }, xt = (e, t, n = !1) => {
1149
+ let r = Ke.exec(e);
1150
+ return r ? r[1] ? t(r[1]) : n : !1;
1151
+ }, St = (e) => e === "position" || e === "percentage", Ct = (e) => e === "image" || e === "url", wt = (e) => e === "length" || e === "size" || e === "bg-size", Tt = (e) => e === "length", Et = (e) => e === "number", Dt = (e) => e === "family-name", Ot = (e) => e === "number" || e === "weight", kt = (e) => e === "shadow", At = /* @__PURE__ */ Ue(() => {
1152
+ let e = G("color"), t = G("font"), n = G("text"), r = G("font-weight"), i = G("tracking"), a = G("leading"), o = G("breakpoint"), s = G("container"), c = G("spacing"), l = G("radius"), u = G("shadow"), d = G("inset-shadow"), f = G("text-shadow"), p = G("drop-shadow"), m = G("blur"), h = G("perspective"), g = G("aspect"), _ = G("ease"), v = G("animate"), y = () => [
1153
+ "auto",
1154
+ "avoid",
1155
+ "all",
1156
+ "avoid-page",
1157
+ "page",
1158
+ "left",
1159
+ "right",
1160
+ "column"
1161
+ ], b = () => [
1162
+ "center",
1163
+ "top",
1164
+ "bottom",
1165
+ "left",
1166
+ "right",
1167
+ "top-left",
1168
+ "left-top",
1169
+ "top-right",
1170
+ "right-top",
1171
+ "bottom-right",
1172
+ "right-bottom",
1173
+ "bottom-left",
1174
+ "left-bottom"
1175
+ ], x = () => [
1176
+ ...b(),
1177
+ Z,
1178
+ X
1179
+ ], S = () => [
1180
+ "auto",
1181
+ "hidden",
1182
+ "clip",
1183
+ "visible",
1184
+ "scroll"
1185
+ ], C = () => [
1186
+ "auto",
1187
+ "contain",
1188
+ "none"
1189
+ ], w = () => [
1190
+ Z,
1191
+ X,
1192
+ c
1193
+ ], T = () => [
1194
+ K,
1195
+ "full",
1196
+ "auto",
1197
+ ...w()
1198
+ ], ee = () => [
1199
+ J,
1200
+ "none",
1201
+ "subgrid",
1202
+ Z,
1203
+ X
1204
+ ], E = () => [
1205
+ "auto",
1206
+ { span: [
1207
+ "full",
1208
+ J,
1209
+ Z,
1210
+ X
1211
+ ] },
1212
+ J,
1213
+ Z,
1214
+ X
1215
+ ], te = () => [
1216
+ J,
1217
+ "auto",
1218
+ Z,
1219
+ X
1220
+ ], D = () => [
1221
+ "auto",
1222
+ "min",
1223
+ "max",
1224
+ "fr",
1225
+ Z,
1226
+ X
1227
+ ], ne = () => [
1228
+ "start",
1229
+ "end",
1230
+ "center",
1231
+ "between",
1232
+ "around",
1233
+ "evenly",
1234
+ "stretch",
1235
+ "baseline",
1236
+ "center-safe",
1237
+ "end-safe"
1238
+ ], O = () => [
1239
+ "start",
1240
+ "end",
1241
+ "center",
1242
+ "stretch",
1243
+ "center-safe",
1244
+ "end-safe"
1245
+ ], k = () => ["auto", ...w()], A = () => [
1246
+ K,
1247
+ "auto",
1248
+ "full",
1249
+ "dvw",
1250
+ "dvh",
1251
+ "lvw",
1252
+ "lvh",
1253
+ "svw",
1254
+ "svh",
1255
+ "min",
1256
+ "max",
1257
+ "fit",
1258
+ ...w()
1259
+ ], re = () => [
1260
+ K,
1261
+ "screen",
1262
+ "full",
1263
+ "dvw",
1264
+ "lvw",
1265
+ "svw",
1266
+ "min",
1267
+ "max",
1268
+ "fit",
1269
+ ...w()
1270
+ ], ie = () => [
1271
+ K,
1272
+ "screen",
1273
+ "full",
1274
+ "lh",
1275
+ "dvh",
1276
+ "lvh",
1277
+ "svh",
1278
+ "min",
1279
+ "max",
1280
+ "fit",
1281
+ ...w()
1282
+ ], j = () => [
1283
+ e,
1284
+ Z,
1285
+ X
1286
+ ], ae = () => [
1287
+ ...b(),
1288
+ gt,
1289
+ dt,
1290
+ { position: [Z, X] }
1291
+ ], oe = () => ["no-repeat", { repeat: [
1292
+ "",
1293
+ "x",
1294
+ "y",
1295
+ "space",
1296
+ "round"
1297
+ ] }], se = () => [
1298
+ "auto",
1299
+ "cover",
1300
+ "contain",
1301
+ _t,
1302
+ ot,
1303
+ { size: [Z, X] }
1304
+ ], ce = () => [
1305
+ $e,
1306
+ mt,
1307
+ st
1308
+ ], M = () => [
1309
+ "",
1310
+ "none",
1311
+ "full",
1312
+ l,
1313
+ Z,
1314
+ X
1315
+ ], N = () => [
1316
+ "",
1317
+ q,
1318
+ mt,
1319
+ st
1320
+ ], P = () => [
1321
+ "solid",
1322
+ "dashed",
1323
+ "dotted",
1324
+ "double"
1325
+ ], le = () => [
1326
+ "normal",
1327
+ "multiply",
1328
+ "screen",
1329
+ "overlay",
1330
+ "darken",
1331
+ "lighten",
1332
+ "color-dodge",
1333
+ "color-burn",
1334
+ "hard-light",
1335
+ "soft-light",
1336
+ "difference",
1337
+ "exclusion",
1338
+ "hue",
1339
+ "saturation",
1340
+ "color",
1341
+ "luminosity"
1342
+ ], F = () => [
1343
+ q,
1344
+ $e,
1345
+ gt,
1346
+ dt
1347
+ ], ue = () => [
1348
+ "",
1349
+ "none",
1350
+ m,
1351
+ Z,
1352
+ X
1353
+ ], I = () => [
1354
+ "none",
1355
+ q,
1356
+ Z,
1357
+ X
1358
+ ], L = () => [
1359
+ "none",
1360
+ q,
1361
+ Z,
1362
+ X
1363
+ ], R = () => [
1364
+ q,
1365
+ Z,
1366
+ X
1367
+ ], de = () => [
1368
+ K,
1369
+ "full",
1370
+ ...w()
1371
+ ];
1372
+ return {
1373
+ cacheSize: 500,
1374
+ theme: {
1375
+ animate: [
1376
+ "spin",
1377
+ "ping",
1378
+ "pulse",
1379
+ "bounce"
1380
+ ],
1381
+ aspect: ["video"],
1382
+ blur: [Y],
1383
+ breakpoint: [Y],
1384
+ color: [et],
1385
+ container: [Y],
1386
+ "drop-shadow": [Y],
1387
+ ease: [
1388
+ "in",
1389
+ "out",
1390
+ "in-out"
1391
+ ],
1392
+ font: [at],
1393
+ "font-weight": [
1394
+ "thin",
1395
+ "extralight",
1396
+ "light",
1397
+ "normal",
1398
+ "medium",
1399
+ "semibold",
1400
+ "bold",
1401
+ "extrabold",
1402
+ "black"
1403
+ ],
1404
+ "inset-shadow": [Y],
1405
+ leading: [
1406
+ "none",
1407
+ "tight",
1408
+ "snug",
1409
+ "normal",
1410
+ "relaxed",
1411
+ "loose"
1412
+ ],
1413
+ perspective: [
1414
+ "dramatic",
1415
+ "near",
1416
+ "normal",
1417
+ "midrange",
1418
+ "distant",
1419
+ "none"
1420
+ ],
1421
+ radius: [Y],
1422
+ shadow: [Y],
1423
+ spacing: ["px", q],
1424
+ text: [Y],
1425
+ "text-shadow": [Y],
1426
+ tracking: [
1427
+ "tighter",
1428
+ "tight",
1429
+ "normal",
1430
+ "wide",
1431
+ "wider",
1432
+ "widest"
1433
+ ]
1434
+ },
1435
+ classGroups: {
1436
+ aspect: [{ aspect: [
1437
+ "auto",
1438
+ "square",
1439
+ K,
1440
+ X,
1441
+ Z,
1442
+ g
1443
+ ] }],
1444
+ container: ["container"],
1445
+ columns: [{ columns: [
1446
+ q,
1447
+ X,
1448
+ Z,
1449
+ s
1450
+ ] }],
1451
+ "break-after": [{ "break-after": y() }],
1452
+ "break-before": [{ "break-before": y() }],
1453
+ "break-inside": [{ "break-inside": [
1454
+ "auto",
1455
+ "avoid",
1456
+ "avoid-page",
1457
+ "avoid-column"
1458
+ ] }],
1459
+ "box-decoration": [{ "box-decoration": ["slice", "clone"] }],
1460
+ box: [{ box: ["border", "content"] }],
1461
+ display: [
1462
+ "block",
1463
+ "inline-block",
1464
+ "inline",
1465
+ "flex",
1466
+ "inline-flex",
1467
+ "table",
1468
+ "inline-table",
1469
+ "table-caption",
1470
+ "table-cell",
1471
+ "table-column",
1472
+ "table-column-group",
1473
+ "table-footer-group",
1474
+ "table-header-group",
1475
+ "table-row-group",
1476
+ "table-row",
1477
+ "flow-root",
1478
+ "grid",
1479
+ "inline-grid",
1480
+ "contents",
1481
+ "list-item",
1482
+ "hidden"
1483
+ ],
1484
+ sr: ["sr-only", "not-sr-only"],
1485
+ float: [{ float: [
1486
+ "right",
1487
+ "left",
1488
+ "none",
1489
+ "start",
1490
+ "end"
1491
+ ] }],
1492
+ clear: [{ clear: [
1493
+ "left",
1494
+ "right",
1495
+ "both",
1496
+ "none",
1497
+ "start",
1498
+ "end"
1499
+ ] }],
1500
+ isolation: ["isolate", "isolation-auto"],
1501
+ "object-fit": [{ object: [
1502
+ "contain",
1503
+ "cover",
1504
+ "fill",
1505
+ "none",
1506
+ "scale-down"
1507
+ ] }],
1508
+ "object-position": [{ object: x() }],
1509
+ overflow: [{ overflow: S() }],
1510
+ "overflow-x": [{ "overflow-x": S() }],
1511
+ "overflow-y": [{ "overflow-y": S() }],
1512
+ overscroll: [{ overscroll: C() }],
1513
+ "overscroll-x": [{ "overscroll-x": C() }],
1514
+ "overscroll-y": [{ "overscroll-y": C() }],
1515
+ position: [
1516
+ "static",
1517
+ "fixed",
1518
+ "absolute",
1519
+ "relative",
1520
+ "sticky"
1521
+ ],
1522
+ inset: [{ inset: T() }],
1523
+ "inset-x": [{ "inset-x": T() }],
1524
+ "inset-y": [{ "inset-y": T() }],
1525
+ start: [{
1526
+ "inset-s": T(),
1527
+ start: T()
1528
+ }],
1529
+ end: [{
1530
+ "inset-e": T(),
1531
+ end: T()
1532
+ }],
1533
+ "inset-bs": [{ "inset-bs": T() }],
1534
+ "inset-be": [{ "inset-be": T() }],
1535
+ top: [{ top: T() }],
1536
+ right: [{ right: T() }],
1537
+ bottom: [{ bottom: T() }],
1538
+ left: [{ left: T() }],
1539
+ visibility: [
1540
+ "visible",
1541
+ "invisible",
1542
+ "collapse"
1543
+ ],
1544
+ z: [{ z: [
1545
+ J,
1546
+ "auto",
1547
+ Z,
1548
+ X
1549
+ ] }],
1550
+ basis: [{ basis: [
1551
+ K,
1552
+ "full",
1553
+ "auto",
1554
+ s,
1555
+ ...w()
1556
+ ] }],
1557
+ "flex-direction": [{ flex: [
1558
+ "row",
1559
+ "row-reverse",
1560
+ "col",
1561
+ "col-reverse"
1562
+ ] }],
1563
+ "flex-wrap": [{ flex: [
1564
+ "nowrap",
1565
+ "wrap",
1566
+ "wrap-reverse"
1567
+ ] }],
1568
+ flex: [{ flex: [
1569
+ q,
1570
+ K,
1571
+ "auto",
1572
+ "initial",
1573
+ "none",
1574
+ X
1575
+ ] }],
1576
+ grow: [{ grow: [
1577
+ "",
1578
+ q,
1579
+ Z,
1580
+ X
1581
+ ] }],
1582
+ shrink: [{ shrink: [
1583
+ "",
1584
+ q,
1585
+ Z,
1586
+ X
1587
+ ] }],
1588
+ order: [{ order: [
1589
+ J,
1590
+ "first",
1591
+ "last",
1592
+ "none",
1593
+ Z,
1594
+ X
1595
+ ] }],
1596
+ "grid-cols": [{ "grid-cols": ee() }],
1597
+ "col-start-end": [{ col: E() }],
1598
+ "col-start": [{ "col-start": te() }],
1599
+ "col-end": [{ "col-end": te() }],
1600
+ "grid-rows": [{ "grid-rows": ee() }],
1601
+ "row-start-end": [{ row: E() }],
1602
+ "row-start": [{ "row-start": te() }],
1603
+ "row-end": [{ "row-end": te() }],
1604
+ "grid-flow": [{ "grid-flow": [
1605
+ "row",
1606
+ "col",
1607
+ "dense",
1608
+ "row-dense",
1609
+ "col-dense"
1610
+ ] }],
1611
+ "auto-cols": [{ "auto-cols": D() }],
1612
+ "auto-rows": [{ "auto-rows": D() }],
1613
+ gap: [{ gap: w() }],
1614
+ "gap-x": [{ "gap-x": w() }],
1615
+ "gap-y": [{ "gap-y": w() }],
1616
+ "justify-content": [{ justify: [...ne(), "normal"] }],
1617
+ "justify-items": [{ "justify-items": [...O(), "normal"] }],
1618
+ "justify-self": [{ "justify-self": ["auto", ...O()] }],
1619
+ "align-content": [{ content: ["normal", ...ne()] }],
1620
+ "align-items": [{ items: [...O(), { baseline: ["", "last"] }] }],
1621
+ "align-self": [{ self: [
1622
+ "auto",
1623
+ ...O(),
1624
+ { baseline: ["", "last"] }
1625
+ ] }],
1626
+ "place-content": [{ "place-content": ne() }],
1627
+ "place-items": [{ "place-items": [...O(), "baseline"] }],
1628
+ "place-self": [{ "place-self": ["auto", ...O()] }],
1629
+ p: [{ p: w() }],
1630
+ px: [{ px: w() }],
1631
+ py: [{ py: w() }],
1632
+ ps: [{ ps: w() }],
1633
+ pe: [{ pe: w() }],
1634
+ pbs: [{ pbs: w() }],
1635
+ pbe: [{ pbe: w() }],
1636
+ pt: [{ pt: w() }],
1637
+ pr: [{ pr: w() }],
1638
+ pb: [{ pb: w() }],
1639
+ pl: [{ pl: w() }],
1640
+ m: [{ m: k() }],
1641
+ mx: [{ mx: k() }],
1642
+ my: [{ my: k() }],
1643
+ ms: [{ ms: k() }],
1644
+ me: [{ me: k() }],
1645
+ mbs: [{ mbs: k() }],
1646
+ mbe: [{ mbe: k() }],
1647
+ mt: [{ mt: k() }],
1648
+ mr: [{ mr: k() }],
1649
+ mb: [{ mb: k() }],
1650
+ ml: [{ ml: k() }],
1651
+ "space-x": [{ "space-x": w() }],
1652
+ "space-x-reverse": ["space-x-reverse"],
1653
+ "space-y": [{ "space-y": w() }],
1654
+ "space-y-reverse": ["space-y-reverse"],
1655
+ size: [{ size: A() }],
1656
+ "inline-size": [{ inline: ["auto", ...re()] }],
1657
+ "min-inline-size": [{ "min-inline": ["auto", ...re()] }],
1658
+ "max-inline-size": [{ "max-inline": ["none", ...re()] }],
1659
+ "block-size": [{ block: ["auto", ...ie()] }],
1660
+ "min-block-size": [{ "min-block": ["auto", ...ie()] }],
1661
+ "max-block-size": [{ "max-block": ["none", ...ie()] }],
1662
+ w: [{ w: [
1663
+ s,
1664
+ "screen",
1665
+ ...A()
1666
+ ] }],
1667
+ "min-w": [{ "min-w": [
1668
+ s,
1669
+ "screen",
1670
+ "none",
1671
+ ...A()
1672
+ ] }],
1673
+ "max-w": [{ "max-w": [
1674
+ s,
1675
+ "screen",
1676
+ "none",
1677
+ "prose",
1678
+ { screen: [o] },
1679
+ ...A()
1680
+ ] }],
1681
+ h: [{ h: [
1682
+ "screen",
1683
+ "lh",
1684
+ ...A()
1685
+ ] }],
1686
+ "min-h": [{ "min-h": [
1687
+ "screen",
1688
+ "lh",
1689
+ "none",
1690
+ ...A()
1691
+ ] }],
1692
+ "max-h": [{ "max-h": [
1693
+ "screen",
1694
+ "lh",
1695
+ ...A()
1696
+ ] }],
1697
+ "font-size": [{ text: [
1698
+ "base",
1699
+ n,
1700
+ mt,
1701
+ st
1702
+ ] }],
1703
+ "font-smoothing": ["antialiased", "subpixel-antialiased"],
1704
+ "font-style": ["italic", "not-italic"],
1705
+ "font-weight": [{ font: [
1706
+ r,
1707
+ bt,
1708
+ lt
1709
+ ] }],
1710
+ "font-stretch": [{ "font-stretch": [
1711
+ "ultra-condensed",
1712
+ "extra-condensed",
1713
+ "condensed",
1714
+ "semi-condensed",
1715
+ "normal",
1716
+ "semi-expanded",
1717
+ "expanded",
1718
+ "extra-expanded",
1719
+ "ultra-expanded",
1720
+ $e,
1721
+ X
1722
+ ] }],
1723
+ "font-family": [{ font: [
1724
+ ht,
1725
+ ut,
1726
+ t
1727
+ ] }],
1728
+ "font-features": [{ "font-features": [X] }],
1729
+ "fvn-normal": ["normal-nums"],
1730
+ "fvn-ordinal": ["ordinal"],
1731
+ "fvn-slashed-zero": ["slashed-zero"],
1732
+ "fvn-figure": ["lining-nums", "oldstyle-nums"],
1733
+ "fvn-spacing": ["proportional-nums", "tabular-nums"],
1734
+ "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1735
+ tracking: [{ tracking: [
1736
+ i,
1737
+ Z,
1738
+ X
1739
+ ] }],
1740
+ "line-clamp": [{ "line-clamp": [
1741
+ q,
1742
+ "none",
1743
+ Z,
1744
+ ct
1745
+ ] }],
1746
+ leading: [{ leading: [a, ...w()] }],
1747
+ "list-image": [{ "list-image": [
1748
+ "none",
1749
+ Z,
1750
+ X
1751
+ ] }],
1752
+ "list-style-position": [{ list: ["inside", "outside"] }],
1753
+ "list-style-type": [{ list: [
1754
+ "disc",
1755
+ "decimal",
1756
+ "none",
1757
+ Z,
1758
+ X
1759
+ ] }],
1760
+ "text-alignment": [{ text: [
1761
+ "left",
1762
+ "center",
1763
+ "right",
1764
+ "justify",
1765
+ "start",
1766
+ "end"
1767
+ ] }],
1768
+ "placeholder-color": [{ placeholder: j() }],
1769
+ "text-color": [{ text: j() }],
1770
+ "text-decoration": [
1771
+ "underline",
1772
+ "overline",
1773
+ "line-through",
1774
+ "no-underline"
1775
+ ],
1776
+ "text-decoration-style": [{ decoration: [...P(), "wavy"] }],
1777
+ "text-decoration-thickness": [{ decoration: [
1778
+ q,
1779
+ "from-font",
1780
+ "auto",
1781
+ Z,
1782
+ st
1783
+ ] }],
1784
+ "text-decoration-color": [{ decoration: j() }],
1785
+ "underline-offset": [{ "underline-offset": [
1786
+ q,
1787
+ "auto",
1788
+ Z,
1789
+ X
1790
+ ] }],
1791
+ "text-transform": [
1792
+ "uppercase",
1793
+ "lowercase",
1794
+ "capitalize",
1795
+ "normal-case"
1796
+ ],
1797
+ "text-overflow": [
1798
+ "truncate",
1799
+ "text-ellipsis",
1800
+ "text-clip"
1801
+ ],
1802
+ "text-wrap": [{ text: [
1803
+ "wrap",
1804
+ "nowrap",
1805
+ "balance",
1806
+ "pretty"
1807
+ ] }],
1808
+ indent: [{ indent: w() }],
1809
+ "vertical-align": [{ align: [
1810
+ "baseline",
1811
+ "top",
1812
+ "middle",
1813
+ "bottom",
1814
+ "text-top",
1815
+ "text-bottom",
1816
+ "sub",
1817
+ "super",
1818
+ Z,
1819
+ X
1820
+ ] }],
1821
+ whitespace: [{ whitespace: [
1822
+ "normal",
1823
+ "nowrap",
1824
+ "pre",
1825
+ "pre-line",
1826
+ "pre-wrap",
1827
+ "break-spaces"
1828
+ ] }],
1829
+ break: [{ break: [
1830
+ "normal",
1831
+ "words",
1832
+ "all",
1833
+ "keep"
1834
+ ] }],
1835
+ wrap: [{ wrap: [
1836
+ "break-word",
1837
+ "anywhere",
1838
+ "normal"
1839
+ ] }],
1840
+ hyphens: [{ hyphens: [
1841
+ "none",
1842
+ "manual",
1843
+ "auto"
1844
+ ] }],
1845
+ content: [{ content: [
1846
+ "none",
1847
+ Z,
1848
+ X
1849
+ ] }],
1850
+ "bg-attachment": [{ bg: [
1851
+ "fixed",
1852
+ "local",
1853
+ "scroll"
1854
+ ] }],
1855
+ "bg-clip": [{ "bg-clip": [
1856
+ "border",
1857
+ "padding",
1858
+ "content",
1859
+ "text"
1860
+ ] }],
1861
+ "bg-origin": [{ "bg-origin": [
1862
+ "border",
1863
+ "padding",
1864
+ "content"
1865
+ ] }],
1866
+ "bg-position": [{ bg: ae() }],
1867
+ "bg-repeat": [{ bg: oe() }],
1868
+ "bg-size": [{ bg: se() }],
1869
+ "bg-image": [{ bg: [
1870
+ "none",
1871
+ {
1872
+ linear: [
1873
+ { to: [
1874
+ "t",
1875
+ "tr",
1876
+ "r",
1877
+ "br",
1878
+ "b",
1879
+ "bl",
1880
+ "l",
1881
+ "tl"
1882
+ ] },
1883
+ J,
1884
+ Z,
1885
+ X
1886
+ ],
1887
+ radial: [
1888
+ "",
1889
+ Z,
1890
+ X
1891
+ ],
1892
+ conic: [
1893
+ J,
1894
+ Z,
1895
+ X
1896
+ ]
1897
+ },
1898
+ vt,
1899
+ ft
1900
+ ] }],
1901
+ "bg-color": [{ bg: j() }],
1902
+ "gradient-from-pos": [{ from: ce() }],
1903
+ "gradient-via-pos": [{ via: ce() }],
1904
+ "gradient-to-pos": [{ to: ce() }],
1905
+ "gradient-from": [{ from: j() }],
1906
+ "gradient-via": [{ via: j() }],
1907
+ "gradient-to": [{ to: j() }],
1908
+ rounded: [{ rounded: M() }],
1909
+ "rounded-s": [{ "rounded-s": M() }],
1910
+ "rounded-e": [{ "rounded-e": M() }],
1911
+ "rounded-t": [{ "rounded-t": M() }],
1912
+ "rounded-r": [{ "rounded-r": M() }],
1913
+ "rounded-b": [{ "rounded-b": M() }],
1914
+ "rounded-l": [{ "rounded-l": M() }],
1915
+ "rounded-ss": [{ "rounded-ss": M() }],
1916
+ "rounded-se": [{ "rounded-se": M() }],
1917
+ "rounded-ee": [{ "rounded-ee": M() }],
1918
+ "rounded-es": [{ "rounded-es": M() }],
1919
+ "rounded-tl": [{ "rounded-tl": M() }],
1920
+ "rounded-tr": [{ "rounded-tr": M() }],
1921
+ "rounded-br": [{ "rounded-br": M() }],
1922
+ "rounded-bl": [{ "rounded-bl": M() }],
1923
+ "border-w": [{ border: N() }],
1924
+ "border-w-x": [{ "border-x": N() }],
1925
+ "border-w-y": [{ "border-y": N() }],
1926
+ "border-w-s": [{ "border-s": N() }],
1927
+ "border-w-e": [{ "border-e": N() }],
1928
+ "border-w-bs": [{ "border-bs": N() }],
1929
+ "border-w-be": [{ "border-be": N() }],
1930
+ "border-w-t": [{ "border-t": N() }],
1931
+ "border-w-r": [{ "border-r": N() }],
1932
+ "border-w-b": [{ "border-b": N() }],
1933
+ "border-w-l": [{ "border-l": N() }],
1934
+ "divide-x": [{ "divide-x": N() }],
1935
+ "divide-x-reverse": ["divide-x-reverse"],
1936
+ "divide-y": [{ "divide-y": N() }],
1937
+ "divide-y-reverse": ["divide-y-reverse"],
1938
+ "border-style": [{ border: [
1939
+ ...P(),
1940
+ "hidden",
1941
+ "none"
1942
+ ] }],
1943
+ "divide-style": [{ divide: [
1944
+ ...P(),
1945
+ "hidden",
1946
+ "none"
1947
+ ] }],
1948
+ "border-color": [{ border: j() }],
1949
+ "border-color-x": [{ "border-x": j() }],
1950
+ "border-color-y": [{ "border-y": j() }],
1951
+ "border-color-s": [{ "border-s": j() }],
1952
+ "border-color-e": [{ "border-e": j() }],
1953
+ "border-color-bs": [{ "border-bs": j() }],
1954
+ "border-color-be": [{ "border-be": j() }],
1955
+ "border-color-t": [{ "border-t": j() }],
1956
+ "border-color-r": [{ "border-r": j() }],
1957
+ "border-color-b": [{ "border-b": j() }],
1958
+ "border-color-l": [{ "border-l": j() }],
1959
+ "divide-color": [{ divide: j() }],
1960
+ "outline-style": [{ outline: [
1961
+ ...P(),
1962
+ "none",
1963
+ "hidden"
1964
+ ] }],
1965
+ "outline-offset": [{ "outline-offset": [
1966
+ q,
1967
+ Z,
1968
+ X
1969
+ ] }],
1970
+ "outline-w": [{ outline: [
1971
+ "",
1972
+ q,
1973
+ mt,
1974
+ st
1975
+ ] }],
1976
+ "outline-color": [{ outline: j() }],
1977
+ shadow: [{ shadow: [
1978
+ "",
1979
+ "none",
1980
+ u,
1981
+ yt,
1982
+ pt
1983
+ ] }],
1984
+ "shadow-color": [{ shadow: j() }],
1985
+ "inset-shadow": [{ "inset-shadow": [
1986
+ "none",
1987
+ d,
1988
+ yt,
1989
+ pt
1990
+ ] }],
1991
+ "inset-shadow-color": [{ "inset-shadow": j() }],
1992
+ "ring-w": [{ ring: N() }],
1993
+ "ring-w-inset": ["ring-inset"],
1994
+ "ring-color": [{ ring: j() }],
1995
+ "ring-offset-w": [{ "ring-offset": [q, st] }],
1996
+ "ring-offset-color": [{ "ring-offset": j() }],
1997
+ "inset-ring-w": [{ "inset-ring": N() }],
1998
+ "inset-ring-color": [{ "inset-ring": j() }],
1999
+ "text-shadow": [{ "text-shadow": [
2000
+ "none",
2001
+ f,
2002
+ yt,
2003
+ pt
2004
+ ] }],
2005
+ "text-shadow-color": [{ "text-shadow": j() }],
2006
+ opacity: [{ opacity: [
2007
+ q,
2008
+ Z,
2009
+ X
2010
+ ] }],
2011
+ "mix-blend": [{ "mix-blend": [
2012
+ ...le(),
2013
+ "plus-darker",
2014
+ "plus-lighter"
2015
+ ] }],
2016
+ "bg-blend": [{ "bg-blend": le() }],
2017
+ "mask-clip": [{ "mask-clip": [
2018
+ "border",
2019
+ "padding",
2020
+ "content",
2021
+ "fill",
2022
+ "stroke",
2023
+ "view"
2024
+ ] }, "mask-no-clip"],
2025
+ "mask-composite": [{ mask: [
2026
+ "add",
2027
+ "subtract",
2028
+ "intersect",
2029
+ "exclude"
2030
+ ] }],
2031
+ "mask-image-linear-pos": [{ "mask-linear": [q] }],
2032
+ "mask-image-linear-from-pos": [{ "mask-linear-from": F() }],
2033
+ "mask-image-linear-to-pos": [{ "mask-linear-to": F() }],
2034
+ "mask-image-linear-from-color": [{ "mask-linear-from": j() }],
2035
+ "mask-image-linear-to-color": [{ "mask-linear-to": j() }],
2036
+ "mask-image-t-from-pos": [{ "mask-t-from": F() }],
2037
+ "mask-image-t-to-pos": [{ "mask-t-to": F() }],
2038
+ "mask-image-t-from-color": [{ "mask-t-from": j() }],
2039
+ "mask-image-t-to-color": [{ "mask-t-to": j() }],
2040
+ "mask-image-r-from-pos": [{ "mask-r-from": F() }],
2041
+ "mask-image-r-to-pos": [{ "mask-r-to": F() }],
2042
+ "mask-image-r-from-color": [{ "mask-r-from": j() }],
2043
+ "mask-image-r-to-color": [{ "mask-r-to": j() }],
2044
+ "mask-image-b-from-pos": [{ "mask-b-from": F() }],
2045
+ "mask-image-b-to-pos": [{ "mask-b-to": F() }],
2046
+ "mask-image-b-from-color": [{ "mask-b-from": j() }],
2047
+ "mask-image-b-to-color": [{ "mask-b-to": j() }],
2048
+ "mask-image-l-from-pos": [{ "mask-l-from": F() }],
2049
+ "mask-image-l-to-pos": [{ "mask-l-to": F() }],
2050
+ "mask-image-l-from-color": [{ "mask-l-from": j() }],
2051
+ "mask-image-l-to-color": [{ "mask-l-to": j() }],
2052
+ "mask-image-x-from-pos": [{ "mask-x-from": F() }],
2053
+ "mask-image-x-to-pos": [{ "mask-x-to": F() }],
2054
+ "mask-image-x-from-color": [{ "mask-x-from": j() }],
2055
+ "mask-image-x-to-color": [{ "mask-x-to": j() }],
2056
+ "mask-image-y-from-pos": [{ "mask-y-from": F() }],
2057
+ "mask-image-y-to-pos": [{ "mask-y-to": F() }],
2058
+ "mask-image-y-from-color": [{ "mask-y-from": j() }],
2059
+ "mask-image-y-to-color": [{ "mask-y-to": j() }],
2060
+ "mask-image-radial": [{ "mask-radial": [Z, X] }],
2061
+ "mask-image-radial-from-pos": [{ "mask-radial-from": F() }],
2062
+ "mask-image-radial-to-pos": [{ "mask-radial-to": F() }],
2063
+ "mask-image-radial-from-color": [{ "mask-radial-from": j() }],
2064
+ "mask-image-radial-to-color": [{ "mask-radial-to": j() }],
2065
+ "mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
2066
+ "mask-image-radial-size": [{ "mask-radial": [{
2067
+ closest: ["side", "corner"],
2068
+ farthest: ["side", "corner"]
2069
+ }] }],
2070
+ "mask-image-radial-pos": [{ "mask-radial-at": b() }],
2071
+ "mask-image-conic-pos": [{ "mask-conic": [q] }],
2072
+ "mask-image-conic-from-pos": [{ "mask-conic-from": F() }],
2073
+ "mask-image-conic-to-pos": [{ "mask-conic-to": F() }],
2074
+ "mask-image-conic-from-color": [{ "mask-conic-from": j() }],
2075
+ "mask-image-conic-to-color": [{ "mask-conic-to": j() }],
2076
+ "mask-mode": [{ mask: [
2077
+ "alpha",
2078
+ "luminance",
2079
+ "match"
2080
+ ] }],
2081
+ "mask-origin": [{ "mask-origin": [
2082
+ "border",
2083
+ "padding",
2084
+ "content",
2085
+ "fill",
2086
+ "stroke",
2087
+ "view"
2088
+ ] }],
2089
+ "mask-position": [{ mask: ae() }],
2090
+ "mask-repeat": [{ mask: oe() }],
2091
+ "mask-size": [{ mask: se() }],
2092
+ "mask-type": [{ "mask-type": ["alpha", "luminance"] }],
2093
+ "mask-image": [{ mask: [
2094
+ "none",
2095
+ Z,
2096
+ X
2097
+ ] }],
2098
+ filter: [{ filter: [
2099
+ "",
2100
+ "none",
2101
+ Z,
2102
+ X
2103
+ ] }],
2104
+ blur: [{ blur: ue() }],
2105
+ brightness: [{ brightness: [
2106
+ q,
2107
+ Z,
2108
+ X
2109
+ ] }],
2110
+ contrast: [{ contrast: [
2111
+ q,
2112
+ Z,
2113
+ X
2114
+ ] }],
2115
+ "drop-shadow": [{ "drop-shadow": [
2116
+ "",
2117
+ "none",
2118
+ p,
2119
+ yt,
2120
+ pt
2121
+ ] }],
2122
+ "drop-shadow-color": [{ "drop-shadow": j() }],
2123
+ grayscale: [{ grayscale: [
2124
+ "",
2125
+ q,
2126
+ Z,
2127
+ X
2128
+ ] }],
2129
+ "hue-rotate": [{ "hue-rotate": [
2130
+ q,
2131
+ Z,
2132
+ X
2133
+ ] }],
2134
+ invert: [{ invert: [
2135
+ "",
2136
+ q,
2137
+ Z,
2138
+ X
2139
+ ] }],
2140
+ saturate: [{ saturate: [
2141
+ q,
2142
+ Z,
2143
+ X
2144
+ ] }],
2145
+ sepia: [{ sepia: [
2146
+ "",
2147
+ q,
2148
+ Z,
2149
+ X
2150
+ ] }],
2151
+ "backdrop-filter": [{ "backdrop-filter": [
2152
+ "",
2153
+ "none",
2154
+ Z,
2155
+ X
2156
+ ] }],
2157
+ "backdrop-blur": [{ "backdrop-blur": ue() }],
2158
+ "backdrop-brightness": [{ "backdrop-brightness": [
2159
+ q,
2160
+ Z,
2161
+ X
2162
+ ] }],
2163
+ "backdrop-contrast": [{ "backdrop-contrast": [
2164
+ q,
2165
+ Z,
2166
+ X
2167
+ ] }],
2168
+ "backdrop-grayscale": [{ "backdrop-grayscale": [
2169
+ "",
2170
+ q,
2171
+ Z,
2172
+ X
2173
+ ] }],
2174
+ "backdrop-hue-rotate": [{ "backdrop-hue-rotate": [
2175
+ q,
2176
+ Z,
2177
+ X
2178
+ ] }],
2179
+ "backdrop-invert": [{ "backdrop-invert": [
2180
+ "",
2181
+ q,
2182
+ Z,
2183
+ X
2184
+ ] }],
2185
+ "backdrop-opacity": [{ "backdrop-opacity": [
2186
+ q,
2187
+ Z,
2188
+ X
2189
+ ] }],
2190
+ "backdrop-saturate": [{ "backdrop-saturate": [
2191
+ q,
2192
+ Z,
2193
+ X
2194
+ ] }],
2195
+ "backdrop-sepia": [{ "backdrop-sepia": [
2196
+ "",
2197
+ q,
2198
+ Z,
2199
+ X
2200
+ ] }],
2201
+ "border-collapse": [{ border: ["collapse", "separate"] }],
2202
+ "border-spacing": [{ "border-spacing": w() }],
2203
+ "border-spacing-x": [{ "border-spacing-x": w() }],
2204
+ "border-spacing-y": [{ "border-spacing-y": w() }],
2205
+ "table-layout": [{ table: ["auto", "fixed"] }],
2206
+ caption: [{ caption: ["top", "bottom"] }],
2207
+ transition: [{ transition: [
2208
+ "",
2209
+ "all",
2210
+ "colors",
2211
+ "opacity",
2212
+ "shadow",
2213
+ "transform",
2214
+ "none",
2215
+ Z,
2216
+ X
2217
+ ] }],
2218
+ "transition-behavior": [{ transition: ["normal", "discrete"] }],
2219
+ duration: [{ duration: [
2220
+ q,
2221
+ "initial",
2222
+ Z,
2223
+ X
2224
+ ] }],
2225
+ ease: [{ ease: [
2226
+ "linear",
2227
+ "initial",
2228
+ _,
2229
+ Z,
2230
+ X
2231
+ ] }],
2232
+ delay: [{ delay: [
2233
+ q,
2234
+ Z,
2235
+ X
2236
+ ] }],
2237
+ animate: [{ animate: [
2238
+ "none",
2239
+ v,
2240
+ Z,
2241
+ X
2242
+ ] }],
2243
+ backface: [{ backface: ["hidden", "visible"] }],
2244
+ perspective: [{ perspective: [
2245
+ h,
2246
+ Z,
2247
+ X
2248
+ ] }],
2249
+ "perspective-origin": [{ "perspective-origin": x() }],
2250
+ rotate: [{ rotate: I() }],
2251
+ "rotate-x": [{ "rotate-x": I() }],
2252
+ "rotate-y": [{ "rotate-y": I() }],
2253
+ "rotate-z": [{ "rotate-z": I() }],
2254
+ scale: [{ scale: L() }],
2255
+ "scale-x": [{ "scale-x": L() }],
2256
+ "scale-y": [{ "scale-y": L() }],
2257
+ "scale-z": [{ "scale-z": L() }],
2258
+ "scale-3d": ["scale-3d"],
2259
+ skew: [{ skew: R() }],
2260
+ "skew-x": [{ "skew-x": R() }],
2261
+ "skew-y": [{ "skew-y": R() }],
2262
+ transform: [{ transform: [
2263
+ Z,
2264
+ X,
2265
+ "",
2266
+ "none",
2267
+ "gpu",
2268
+ "cpu"
2269
+ ] }],
2270
+ "transform-origin": [{ origin: x() }],
2271
+ "transform-style": [{ transform: ["3d", "flat"] }],
2272
+ translate: [{ translate: de() }],
2273
+ "translate-x": [{ "translate-x": de() }],
2274
+ "translate-y": [{ "translate-y": de() }],
2275
+ "translate-z": [{ "translate-z": de() }],
2276
+ "translate-none": ["translate-none"],
2277
+ accent: [{ accent: j() }],
2278
+ appearance: [{ appearance: ["none", "auto"] }],
2279
+ "caret-color": [{ caret: j() }],
2280
+ "color-scheme": [{ scheme: [
2281
+ "normal",
2282
+ "dark",
2283
+ "light",
2284
+ "light-dark",
2285
+ "only-dark",
2286
+ "only-light"
2287
+ ] }],
2288
+ cursor: [{ cursor: [
2289
+ "auto",
2290
+ "default",
2291
+ "pointer",
2292
+ "wait",
2293
+ "text",
2294
+ "move",
2295
+ "help",
2296
+ "not-allowed",
2297
+ "none",
2298
+ "context-menu",
2299
+ "progress",
2300
+ "cell",
2301
+ "crosshair",
2302
+ "vertical-text",
2303
+ "alias",
2304
+ "copy",
2305
+ "no-drop",
2306
+ "grab",
2307
+ "grabbing",
2308
+ "all-scroll",
2309
+ "col-resize",
2310
+ "row-resize",
2311
+ "n-resize",
2312
+ "e-resize",
2313
+ "s-resize",
2314
+ "w-resize",
2315
+ "ne-resize",
2316
+ "nw-resize",
2317
+ "se-resize",
2318
+ "sw-resize",
2319
+ "ew-resize",
2320
+ "ns-resize",
2321
+ "nesw-resize",
2322
+ "nwse-resize",
2323
+ "zoom-in",
2324
+ "zoom-out",
2325
+ Z,
2326
+ X
2327
+ ] }],
2328
+ "field-sizing": [{ "field-sizing": ["fixed", "content"] }],
2329
+ "pointer-events": [{ "pointer-events": ["auto", "none"] }],
2330
+ resize: [{ resize: [
2331
+ "none",
2332
+ "",
2333
+ "y",
2334
+ "x"
2335
+ ] }],
2336
+ "scroll-behavior": [{ scroll: ["auto", "smooth"] }],
2337
+ "scroll-m": [{ "scroll-m": w() }],
2338
+ "scroll-mx": [{ "scroll-mx": w() }],
2339
+ "scroll-my": [{ "scroll-my": w() }],
2340
+ "scroll-ms": [{ "scroll-ms": w() }],
2341
+ "scroll-me": [{ "scroll-me": w() }],
2342
+ "scroll-mbs": [{ "scroll-mbs": w() }],
2343
+ "scroll-mbe": [{ "scroll-mbe": w() }],
2344
+ "scroll-mt": [{ "scroll-mt": w() }],
2345
+ "scroll-mr": [{ "scroll-mr": w() }],
2346
+ "scroll-mb": [{ "scroll-mb": w() }],
2347
+ "scroll-ml": [{ "scroll-ml": w() }],
2348
+ "scroll-p": [{ "scroll-p": w() }],
2349
+ "scroll-px": [{ "scroll-px": w() }],
2350
+ "scroll-py": [{ "scroll-py": w() }],
2351
+ "scroll-ps": [{ "scroll-ps": w() }],
2352
+ "scroll-pe": [{ "scroll-pe": w() }],
2353
+ "scroll-pbs": [{ "scroll-pbs": w() }],
2354
+ "scroll-pbe": [{ "scroll-pbe": w() }],
2355
+ "scroll-pt": [{ "scroll-pt": w() }],
2356
+ "scroll-pr": [{ "scroll-pr": w() }],
2357
+ "scroll-pb": [{ "scroll-pb": w() }],
2358
+ "scroll-pl": [{ "scroll-pl": w() }],
2359
+ "snap-align": [{ snap: [
2360
+ "start",
2361
+ "end",
2362
+ "center",
2363
+ "align-none"
2364
+ ] }],
2365
+ "snap-stop": [{ snap: ["normal", "always"] }],
2366
+ "snap-type": [{ snap: [
2367
+ "none",
2368
+ "x",
2369
+ "y",
2370
+ "both"
2371
+ ] }],
2372
+ "snap-strictness": [{ snap: ["mandatory", "proximity"] }],
2373
+ touch: [{ touch: [
2374
+ "auto",
2375
+ "none",
2376
+ "manipulation"
2377
+ ] }],
2378
+ "touch-x": [{ "touch-pan": [
2379
+ "x",
2380
+ "left",
2381
+ "right"
2382
+ ] }],
2383
+ "touch-y": [{ "touch-pan": [
2384
+ "y",
2385
+ "up",
2386
+ "down"
2387
+ ] }],
2388
+ "touch-pz": ["touch-pinch-zoom"],
2389
+ select: [{ select: [
2390
+ "none",
2391
+ "text",
2392
+ "all",
2393
+ "auto"
2394
+ ] }],
2395
+ "will-change": [{ "will-change": [
2396
+ "auto",
2397
+ "scroll",
2398
+ "contents",
2399
+ "transform",
2400
+ Z,
2401
+ X
2402
+ ] }],
2403
+ fill: [{ fill: ["none", ...j()] }],
2404
+ "stroke-w": [{ stroke: [
2405
+ q,
2406
+ mt,
2407
+ st,
2408
+ ct
2409
+ ] }],
2410
+ stroke: [{ stroke: ["none", ...j()] }],
2411
+ "forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
2412
+ },
2413
+ conflictingClassGroups: {
2414
+ overflow: ["overflow-x", "overflow-y"],
2415
+ overscroll: ["overscroll-x", "overscroll-y"],
2416
+ inset: [
2417
+ "inset-x",
2418
+ "inset-y",
2419
+ "inset-bs",
2420
+ "inset-be",
2421
+ "start",
2422
+ "end",
2423
+ "top",
2424
+ "right",
2425
+ "bottom",
2426
+ "left"
2427
+ ],
2428
+ "inset-x": ["right", "left"],
2429
+ "inset-y": ["top", "bottom"],
2430
+ flex: [
2431
+ "basis",
2432
+ "grow",
2433
+ "shrink"
2434
+ ],
2435
+ gap: ["gap-x", "gap-y"],
2436
+ p: [
2437
+ "px",
2438
+ "py",
2439
+ "ps",
2440
+ "pe",
2441
+ "pbs",
2442
+ "pbe",
2443
+ "pt",
2444
+ "pr",
2445
+ "pb",
2446
+ "pl"
2447
+ ],
2448
+ px: ["pr", "pl"],
2449
+ py: ["pt", "pb"],
2450
+ m: [
2451
+ "mx",
2452
+ "my",
2453
+ "ms",
2454
+ "me",
2455
+ "mbs",
2456
+ "mbe",
2457
+ "mt",
2458
+ "mr",
2459
+ "mb",
2460
+ "ml"
2461
+ ],
2462
+ mx: ["mr", "ml"],
2463
+ my: ["mt", "mb"],
2464
+ size: ["w", "h"],
2465
+ "font-size": ["leading"],
2466
+ "fvn-normal": [
2467
+ "fvn-ordinal",
2468
+ "fvn-slashed-zero",
2469
+ "fvn-figure",
2470
+ "fvn-spacing",
2471
+ "fvn-fraction"
2472
+ ],
2473
+ "fvn-ordinal": ["fvn-normal"],
2474
+ "fvn-slashed-zero": ["fvn-normal"],
2475
+ "fvn-figure": ["fvn-normal"],
2476
+ "fvn-spacing": ["fvn-normal"],
2477
+ "fvn-fraction": ["fvn-normal"],
2478
+ "line-clamp": ["display", "overflow"],
2479
+ rounded: [
2480
+ "rounded-s",
2481
+ "rounded-e",
2482
+ "rounded-t",
2483
+ "rounded-r",
2484
+ "rounded-b",
2485
+ "rounded-l",
2486
+ "rounded-ss",
2487
+ "rounded-se",
2488
+ "rounded-ee",
2489
+ "rounded-es",
2490
+ "rounded-tl",
2491
+ "rounded-tr",
2492
+ "rounded-br",
2493
+ "rounded-bl"
2494
+ ],
2495
+ "rounded-s": ["rounded-ss", "rounded-es"],
2496
+ "rounded-e": ["rounded-se", "rounded-ee"],
2497
+ "rounded-t": ["rounded-tl", "rounded-tr"],
2498
+ "rounded-r": ["rounded-tr", "rounded-br"],
2499
+ "rounded-b": ["rounded-br", "rounded-bl"],
2500
+ "rounded-l": ["rounded-tl", "rounded-bl"],
2501
+ "border-spacing": ["border-spacing-x", "border-spacing-y"],
2502
+ "border-w": [
2503
+ "border-w-x",
2504
+ "border-w-y",
2505
+ "border-w-s",
2506
+ "border-w-e",
2507
+ "border-w-bs",
2508
+ "border-w-be",
2509
+ "border-w-t",
2510
+ "border-w-r",
2511
+ "border-w-b",
2512
+ "border-w-l"
2513
+ ],
2514
+ "border-w-x": ["border-w-r", "border-w-l"],
2515
+ "border-w-y": ["border-w-t", "border-w-b"],
2516
+ "border-color": [
2517
+ "border-color-x",
2518
+ "border-color-y",
2519
+ "border-color-s",
2520
+ "border-color-e",
2521
+ "border-color-bs",
2522
+ "border-color-be",
2523
+ "border-color-t",
2524
+ "border-color-r",
2525
+ "border-color-b",
2526
+ "border-color-l"
2527
+ ],
2528
+ "border-color-x": ["border-color-r", "border-color-l"],
2529
+ "border-color-y": ["border-color-t", "border-color-b"],
2530
+ translate: [
2531
+ "translate-x",
2532
+ "translate-y",
2533
+ "translate-none"
2534
+ ],
2535
+ "translate-none": [
2536
+ "translate",
2537
+ "translate-x",
2538
+ "translate-y",
2539
+ "translate-z"
2540
+ ],
2541
+ "scroll-m": [
2542
+ "scroll-mx",
2543
+ "scroll-my",
2544
+ "scroll-ms",
2545
+ "scroll-me",
2546
+ "scroll-mbs",
2547
+ "scroll-mbe",
2548
+ "scroll-mt",
2549
+ "scroll-mr",
2550
+ "scroll-mb",
2551
+ "scroll-ml"
2552
+ ],
2553
+ "scroll-mx": ["scroll-mr", "scroll-ml"],
2554
+ "scroll-my": ["scroll-mt", "scroll-mb"],
2555
+ "scroll-p": [
2556
+ "scroll-px",
2557
+ "scroll-py",
2558
+ "scroll-ps",
2559
+ "scroll-pe",
2560
+ "scroll-pbs",
2561
+ "scroll-pbe",
2562
+ "scroll-pt",
2563
+ "scroll-pr",
2564
+ "scroll-pb",
2565
+ "scroll-pl"
2566
+ ],
2567
+ "scroll-px": ["scroll-pr", "scroll-pl"],
2568
+ "scroll-py": ["scroll-pt", "scroll-pb"],
2569
+ touch: [
2570
+ "touch-x",
2571
+ "touch-y",
2572
+ "touch-pz"
2573
+ ],
2574
+ "touch-x": ["touch"],
2575
+ "touch-y": ["touch"],
2576
+ "touch-pz": ["touch"]
2577
+ },
2578
+ conflictingClassGroupModifiers: { "font-size": ["leading"] },
2579
+ orderSensitiveModifiers: [
2580
+ "*",
2581
+ "**",
2582
+ "after",
2583
+ "backdrop",
2584
+ "before",
2585
+ "details-content",
2586
+ "file",
2587
+ "first-letter",
2588
+ "first-line",
2589
+ "marker",
2590
+ "placeholder",
2591
+ "selection"
2592
+ ]
2593
+ };
2594
+ });
2595
+ //#endregion
2596
+ //#region src/components/TargetHighlight.tsx
2597
+ function jt({ selector: e, label: t, pulse: n = !0 }) {
2598
+ let [r, i] = l(null), a = c(0);
2599
+ return o(() => {
2600
+ let t = () => {
2601
+ let n = document.querySelector(e);
2602
+ if (!n) {
2603
+ i(null);
2604
+ return;
2605
+ }
2606
+ let r = n.getBoundingClientRect();
2607
+ i({
2608
+ top: r.top + window.scrollY,
2609
+ left: r.left + window.scrollX,
2610
+ width: r.width,
2611
+ height: r.height
2612
+ }), a.current = requestAnimationFrame(t);
2613
+ };
2614
+ return a.current = requestAnimationFrame(t), window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), () => {
2615
+ a.current && cancelAnimationFrame(a.current), window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
2616
+ };
2617
+ }, [e]), r ? /* @__PURE__ */ p(u, { children: /* @__PURE__ */ m(d.div, {
2618
+ initial: { opacity: 0 },
2619
+ animate: { opacity: 1 },
2620
+ exit: { opacity: 0 },
2621
+ className: "fixed pointer-events-none z-[9999]",
2622
+ style: {
2623
+ top: r.top - 8,
2624
+ left: r.left - 8,
2625
+ width: r.width + 16,
2626
+ height: r.height + 16
2627
+ },
2628
+ children: [/* @__PURE__ */ p(d.div, {
2629
+ className: "absolute inset-0 rounded-xl border-2 border-indigo-500",
2630
+ animate: n ? { boxShadow: [
2631
+ "0 0 0px rgba(99,102,241,0)",
2632
+ "0 0 20px rgba(99,102,241,0.4)",
2633
+ "0 0 0px rgba(99,102,241,0)"
2634
+ ] } : {},
2635
+ transition: {
2636
+ repeat: Infinity,
2637
+ duration: 2
2638
+ }
2639
+ }), t && /* @__PURE__ */ p("div", {
2640
+ className: "absolute -top-8 left-1/2 -translate-x-1/2 whitespace-nowrap bg-indigo-600 text-white text-xs font-bold px-3 py-1 rounded-lg shadow-lg",
2641
+ children: t
2642
+ })]
2643
+ }) }) : null;
2644
+ }
2645
+ //#endregion
2646
+ //#region src/components/SmartDrawer.tsx
2647
+ function $(...e) {
2648
+ return At(_e(e));
2649
+ }
2650
+ var Mt = ({ content: e }) => /* @__PURE__ */ p("div", {
2651
+ className: "bg-white dark:bg-slate-800 text-slate-700 dark:text-slate-300 border border-slate-100 dark:border-slate-700 rounded-2xl rounded-tl-sm p-4 text-sm shadow-sm w-fit max-w-[90%]",
2652
+ children: e
2653
+ }), Nt = ({ targetField: e, value: t, onChange: n }) => /* @__PURE__ */ m("div", {
2654
+ className: "bg-indigo-50/50 dark:bg-indigo-900/10 border border-indigo-100 dark:border-indigo-800/30 rounded-2xl p-4 space-y-2 w-full max-w-[90%]",
2655
+ children: [/* @__PURE__ */ m("div", {
2656
+ className: "flex items-center space-x-2 text-[10px] font-bold text-indigo-500 uppercase tracking-widest",
2657
+ children: [/* @__PURE__ */ p(me, { size: 12 }), /* @__PURE__ */ m("span", { children: ["Manual Entry: ", e] })]
2658
+ }), /* @__PURE__ */ p("input", {
2659
+ value: String(t || ""),
2660
+ onChange: (e) => n(e.target.value),
2661
+ className: "w-full bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-xl px-4 py-2.5 text-sm outline-none focus:ring-2 focus:ring-indigo-500 shadow-sm transition-all text-slate-900 dark:text-white",
2662
+ placeholder: `Type ${e}...`
2663
+ })]
2664
+ }), Pt = ({ targetField: e, value: t, options: n, onChange: r }) => /* @__PURE__ */ m("div", {
2665
+ className: "bg-indigo-50/50 dark:bg-indigo-900/10 border border-indigo-100 dark:border-indigo-800/30 rounded-2xl p-4 space-y-2 w-full max-w-[90%]",
2666
+ children: [/* @__PURE__ */ m("div", {
2667
+ className: "flex items-center space-x-2 text-[10px] font-bold text-indigo-500 uppercase tracking-widest",
2668
+ children: [/* @__PURE__ */ p(de, { size: 12 }), /* @__PURE__ */ m("span", { children: ["Select for: ", e] })]
2669
+ }), /* @__PURE__ */ m("div", {
2670
+ className: "relative",
2671
+ children: [/* @__PURE__ */ m("select", {
2672
+ value: String(t || ""),
2673
+ onChange: (e) => r(e.target.value),
2674
+ className: "w-full bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-xl px-4 py-2.5 text-sm outline-none focus:ring-2 focus:ring-indigo-500 shadow-sm transition-all appearance-none text-slate-900 dark:text-white",
2675
+ children: [/* @__PURE__ */ p("option", {
2676
+ value: "",
2677
+ disabled: !0,
2678
+ children: "Select option..."
2679
+ }), n?.map((e, t) => /* @__PURE__ */ p("option", {
2680
+ value: String(e.value),
2681
+ children: e.label
2682
+ }, t))]
2683
+ }), /* @__PURE__ */ p("div", {
2684
+ className: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-slate-400",
2685
+ children: /* @__PURE__ */ p(ue, {
2686
+ size: 16,
2687
+ className: "rotate-90"
2688
+ })
2689
+ })]
2690
+ })]
2691
+ }), Ft = ({ actions: e, onAction: t, onNext: n, onPrev: r }) => /* @__PURE__ */ p("div", {
2692
+ className: "flex flex-col items-end space-y-2 mt-2 w-full",
2693
+ children: e.map((e, i) => /* @__PURE__ */ m("button", {
2694
+ onClick: () => {
2695
+ t(e), e.type === "next" && n(), e.type === "prev" && r();
2696
+ },
2697
+ className: "bg-indigo-600 hover:bg-indigo-700 text-white text-sm font-semibold py-2.5 px-5 rounded-2xl rounded-tr-sm shadow-lg shadow-indigo-500/10 transition-all active:scale-95 flex items-center space-x-2",
2698
+ children: [/* @__PURE__ */ p("span", { children: e.label }), e.type === "next" && /* @__PURE__ */ p(ue, { size: 16 })]
2699
+ }, i))
2700
+ }), It = ({ action: e, result: t }) => {
2701
+ let n = {
2702
+ running: {
2703
+ icon: z,
2704
+ color: "text-blue-500",
2705
+ bg: "bg-blue-50 dark:bg-blue-900/10",
2706
+ border: "border-blue-200 dark:border-blue-800/30",
2707
+ label: "Executing..."
2708
+ },
2709
+ success: {
2710
+ icon: L,
2711
+ color: "text-emerald-500",
2712
+ bg: "bg-emerald-50 dark:bg-emerald-900/10",
2713
+ border: "border-emerald-200 dark:border-emerald-800/30",
2714
+ label: "Completed"
2715
+ },
2716
+ failed: {
2717
+ icon: I,
2718
+ color: "text-rose-500",
2719
+ bg: "bg-rose-50 dark:bg-rose-900/10",
2720
+ border: "border-rose-200 dark:border-rose-800/30",
2721
+ label: "Failed"
2722
+ },
2723
+ cancelled: {
2724
+ icon: R,
2725
+ color: "text-slate-400",
2726
+ bg: "bg-slate-50 dark:bg-slate-800/10",
2727
+ border: "border-slate-200 dark:border-slate-700/30",
2728
+ label: "Cancelled"
2729
+ },
2730
+ skipped: {
2731
+ icon: ue,
2732
+ color: "text-amber-500",
2733
+ bg: "bg-amber-50 dark:bg-amber-900/10",
2734
+ border: "border-amber-200 dark:border-amber-800/30",
2735
+ label: "Skipped"
2736
+ },
2737
+ pending: {
2738
+ icon: z,
2739
+ color: "text-slate-400",
2740
+ bg: "bg-slate-50 dark:bg-slate-800/10",
2741
+ border: "border-slate-200 dark:border-slate-700/30",
2742
+ label: "Pending"
2743
+ }
2744
+ }[t.status], r = n.icon, i = e.label || e.type;
2745
+ return /* @__PURE__ */ m("div", {
2746
+ className: $("flex flex-col space-y-1 px-4 py-2.5 rounded-xl border text-sm", n.bg, n.border),
2747
+ children: [/* @__PURE__ */ m("div", {
2748
+ className: "flex items-center space-x-3",
2749
+ children: [/* @__PURE__ */ p(r, {
2750
+ size: 16,
2751
+ className: $(n.color, t.status === "running" && "animate-spin")
2752
+ }), /* @__PURE__ */ p("span", {
2753
+ className: $("font-medium", n.color),
2754
+ children: i
2755
+ })]
2756
+ }), /* @__PURE__ */ m("div", {
2757
+ className: "flex items-center space-x-2 ml-7",
2758
+ children: [
2759
+ /* @__PURE__ */ p("span", {
2760
+ className: "text-xs text-slate-400",
2761
+ children: n.label
2762
+ }),
2763
+ t.error && /* @__PURE__ */ m("span", {
2764
+ className: "text-xs text-rose-400",
2765
+ children: ["· ", t.error]
2766
+ }),
2767
+ t.attempts > 1 && /* @__PURE__ */ m("span", {
2768
+ className: "text-xs text-slate-400",
2769
+ children: [
2770
+ "· (",
2771
+ t.attempts,
2772
+ " attempts)"
2773
+ ]
2774
+ })
2775
+ ]
2776
+ })]
2777
+ });
2778
+ }, Lt = ({ bubble: e, fieldValues: t, onFill: n, onNext: r, onPrev: i, onInteraction: a }) => {
2779
+ switch (e.type) {
2780
+ case "message": return /* @__PURE__ */ p(Mt, { content: e.content });
2781
+ case "input": return /* @__PURE__ */ p(Nt, {
2782
+ targetField: e.targetField,
2783
+ value: t[e.targetField],
2784
+ onChange: (t) => {
2785
+ n(e.targetField, t);
2786
+ }
2787
+ });
2788
+ case "select": return /* @__PURE__ */ p(Pt, {
2789
+ targetField: e.targetField,
2790
+ options: e.options,
2791
+ value: t[e.targetField],
2792
+ onChange: (t) => {
2793
+ n(e.targetField, t);
2794
+ }
2795
+ });
2796
+ case "action-group": return /* @__PURE__ */ p(Ft, {
2797
+ actions: e.actions || [],
2798
+ onNext: r,
2799
+ onPrev: i,
2800
+ onAction: (e) => {
2801
+ if (e.type === "fill_field" && e.data) {
2802
+ let t = e.data;
2803
+ n(t.field, t.value), a(`Auto-filled ${t.field} with ${t.value}`);
2804
+ } else if (e.type === "click" && e.data) {
2805
+ let t = e.data, n = document.querySelector(t.selector);
2806
+ n && (n.click(), a(`Clicked: ${t.selector}`));
2807
+ } else e.onClick ? (e.onClick(), a(`Performed action: ${e.label}`)) : a(`Clicked: ${e.label}`);
2808
+ }
2809
+ });
2810
+ default: return null;
2811
+ }
2812
+ };
2813
+ function Rt({ className: e }) {
2814
+ let t = O(), { activeMission: n, currentStep: r, nextStep: i, prevStep: a, fillField: h, fieldErrors: g, fieldValues: _, executionContext: v, cancelExecution: y } = A({ debug: !1 }), [b, x] = l(!1), [S, C] = l(!1), w = c(null), [T, ee] = l(null);
2815
+ o(() => {
2816
+ x(!!t.activeMissionId && !t.isPaused);
2817
+ }, [t.activeMissionId, t.isPaused]), o(() => {
2818
+ if (r && r.id !== T) {
2819
+ C(!0);
2820
+ let e = setTimeout(() => {
2821
+ C(!1), ee(r.id);
2822
+ }, 1200);
2823
+ return () => clearTimeout(e);
2824
+ }
2825
+ }, [r, T]);
2826
+ let E = s(() => {
2827
+ if (!n) return [];
2828
+ let e = [], r = n.steps.findIndex((e) => e.id === T);
2829
+ return r === -1 || n.steps.slice(0, r + 1).forEach((n) => {
2830
+ e.push({
2831
+ id: `sys-${n.id}`,
2832
+ role: "system",
2833
+ content: n.content
2834
+ });
2835
+ let r = t.interactionHistory.find((e) => e.stepId === n.id);
2836
+ r && e.push({
2837
+ id: `usr-${n.id}`,
2838
+ role: "user",
2839
+ content: r.actionText
2840
+ });
2841
+ }), e;
2842
+ }, [
2843
+ n,
2844
+ T,
2845
+ t.interactionHistory
2846
+ ]);
2847
+ if (o(() => {
2848
+ w.current && (w.current.scrollTop = w.current.scrollHeight);
2849
+ }, [E, S]), !n || !r) {
2850
+ let e = Object.values(t.tourHistory).find((e) => !e.completed && e.lastAccessed > Date.now() - 10080 * 60 * 1e3);
2851
+ if (e) {
2852
+ let n = t.missions[e.missionId];
2853
+ if (n) return /* @__PURE__ */ p(d.div, {
2854
+ initial: {
2855
+ opacity: 0,
2856
+ x: 20
2857
+ },
2858
+ animate: {
2859
+ opacity: 1,
2860
+ x: 0
2861
+ },
2862
+ exit: {
2863
+ opacity: 0,
2864
+ x: 20
2865
+ },
2866
+ className: "h-screen w-[400px] bg-white/95 dark:bg-slate-900/95 backdrop-blur-xl border-l border-slate-200 dark:border-slate-800 shadow-2xl flex flex-col shrink-0 z-[60]",
2867
+ children: /* @__PURE__ */ m("div", {
2868
+ className: "p-6 flex flex-col items-center text-center space-y-4",
2869
+ children: [
2870
+ /* @__PURE__ */ p("div", {
2871
+ className: "p-4 bg-amber-500/10 rounded-2xl",
2872
+ children: /* @__PURE__ */ p(fe, {
2873
+ size: 32,
2874
+ className: "text-amber-500"
2875
+ })
2876
+ }),
2877
+ /* @__PURE__ */ p("h3", {
2878
+ className: "text-lg font-bold text-slate-900 dark:text-white",
2879
+ children: "Resume Tour?"
2880
+ }),
2881
+ /* @__PURE__ */ m("p", {
2882
+ className: "text-sm text-slate-500 dark:text-slate-400",
2883
+ children: [
2884
+ "You were taking the ",
2885
+ /* @__PURE__ */ p("strong", { children: n.title }),
2886
+ " tour. Would you like to continue where you left off?"
2887
+ ]
2888
+ }),
2889
+ /* @__PURE__ */ m("div", {
2890
+ className: "flex flex-col w-full space-y-2 pt-2",
2891
+ children: [/* @__PURE__ */ m("button", {
2892
+ onClick: () => {
2893
+ t.startMission(e.missionId), e.lastStepId && t.goToStep(e.lastStepId);
2894
+ },
2895
+ className: "w-full py-3 rounded-xl bg-indigo-600 text-white font-semibold hover:bg-indigo-700 shadow-lg shadow-indigo-500/20 transition-all flex items-center justify-center space-x-2",
2896
+ children: [/* @__PURE__ */ p(fe, { size: 16 }), /* @__PURE__ */ p("span", { children: "Resume Tour" })]
2897
+ }), /* @__PURE__ */ p("button", {
2898
+ onClick: () => t.recordTourEntry(e.missionId, e.lastStepId, !0),
2899
+ className: "w-full py-3 rounded-xl border border-slate-200 dark:border-slate-700 text-slate-500 dark:text-slate-400 font-medium hover:bg-slate-50 dark:hover:bg-slate-800 transition-all text-sm",
2900
+ children: "Dismiss"
2901
+ })]
2902
+ })
2903
+ ]
2904
+ })
2905
+ });
2906
+ }
2907
+ return null;
2908
+ }
2909
+ return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(u, { children: b && /* @__PURE__ */ m(d.aside, {
2910
+ initial: {
2911
+ width: 0,
2912
+ opacity: 0
2913
+ },
2914
+ animate: {
2915
+ width: 400,
2916
+ opacity: 1
2917
+ },
2918
+ exit: {
2919
+ width: 0,
2920
+ opacity: 0
2921
+ },
2922
+ transition: {
2923
+ type: "spring",
2924
+ damping: 25,
2925
+ stiffness: 200
2926
+ },
2927
+ className: $("h-screen overflow-hidden bg-white/95 dark:bg-slate-900/95 backdrop-blur-xl border-l border-slate-200 dark:border-slate-800 shadow-2xl flex flex-col shrink-0 z-[60]", e),
2928
+ children: [
2929
+ /* @__PURE__ */ m("div", {
2930
+ className: "p-5 border-b border-slate-200 dark:border-slate-800 flex items-center justify-between bg-slate-50/50 dark:bg-slate-800/50 backdrop-blur-sm z-10 shrink-0",
2931
+ children: [/* @__PURE__ */ m("div", {
2932
+ className: "flex items-center space-x-3 overflow-hidden",
2933
+ children: [/* @__PURE__ */ m("div", {
2934
+ className: "relative shrink-0",
2935
+ children: [/* @__PURE__ */ p("div", {
2936
+ className: "p-2 bg-indigo-500 rounded-xl text-white shadow-lg shadow-indigo-500/30",
2937
+ children: /* @__PURE__ */ p(le, { size: 20 })
2938
+ }), /* @__PURE__ */ p("span", { className: "absolute -bottom-1 -right-1 w-3 h-3 bg-emerald-500 border-2 border-white dark:border-slate-900 rounded-full" })]
2939
+ }), /* @__PURE__ */ m("div", {
2940
+ className: "min-w-0",
2941
+ children: [/* @__PURE__ */ p("h2", {
2942
+ className: "text-sm font-bold text-slate-900 dark:text-white leading-tight truncate",
2943
+ children: "Chalo Guide"
2944
+ }), /* @__PURE__ */ p("p", {
2945
+ className: "text-[11px] font-semibold text-slate-500 dark:text-slate-400 truncate",
2946
+ children: n.title
2947
+ })]
2948
+ })]
2949
+ }), /* @__PURE__ */ p("button", {
2950
+ className: "p-2 hover:bg-slate-200 dark:hover:bg-slate-700 rounded-lg text-slate-500 transition-colors shrink-0",
2951
+ onClick: () => {
2952
+ t.dismissAllTours(), t.resetMission();
2953
+ },
2954
+ children: /* @__PURE__ */ p(he, { size: 18 })
2955
+ })]
2956
+ }),
2957
+ /* @__PURE__ */ m("div", {
2958
+ ref: w,
2959
+ className: "flex-1 overflow-y-auto p-5 space-y-6 scroll-smooth min-h-0",
2960
+ children: [/* @__PURE__ */ m(u, {
2961
+ initial: !1,
2962
+ children: [E.map((e) => /* @__PURE__ */ p(d.div, {
2963
+ initial: {
2964
+ opacity: 0,
2965
+ y: 10,
2966
+ scale: .95
2967
+ },
2968
+ animate: {
2969
+ opacity: 1,
2970
+ y: 0,
2971
+ scale: 1
2972
+ },
2973
+ className: $("flex w-full", e.role === "user" ? "justify-end" : "justify-start"),
2974
+ children: /* @__PURE__ */ p("div", {
2975
+ className: $("max-w-[85%] rounded-2xl p-4 text-sm shadow-sm", e.role === "user" ? "bg-slate-900 dark:bg-slate-100 text-white dark:text-slate-900 rounded-tr-sm" : "bg-white dark:bg-slate-800 text-slate-700 dark:text-slate-300 border border-slate-100 dark:border-slate-700 rounded-tl-sm"),
2976
+ children: e.content
2977
+ })
2978
+ }, e.id)), S && /* @__PURE__ */ p(d.div, {
2979
+ initial: {
2980
+ opacity: 0,
2981
+ y: 10
2982
+ },
2983
+ animate: {
2984
+ opacity: 1,
2985
+ y: 0
2986
+ },
2987
+ exit: {
2988
+ opacity: 0,
2989
+ scale: .9
2990
+ },
2991
+ className: "flex justify-start w-full",
2992
+ children: /* @__PURE__ */ m("div", {
2993
+ className: "bg-white dark:bg-slate-800 border border-slate-100 dark:border-slate-700 rounded-2xl rounded-tl-sm p-4 px-5 shadow-sm flex items-center space-x-1",
2994
+ children: [
2995
+ /* @__PURE__ */ p(d.div, {
2996
+ className: "w-1.5 h-1.5 bg-slate-400 rounded-full",
2997
+ animate: { y: [
2998
+ 0,
2999
+ -3,
3000
+ 0
3001
+ ] },
3002
+ transition: {
3003
+ repeat: Infinity,
3004
+ duration: .6,
3005
+ delay: 0
3006
+ }
3007
+ }),
3008
+ /* @__PURE__ */ p(d.div, {
3009
+ className: "w-1.5 h-1.5 bg-slate-400 rounded-full",
3010
+ animate: { y: [
3011
+ 0,
3012
+ -3,
3013
+ 0
3014
+ ] },
3015
+ transition: {
3016
+ repeat: Infinity,
3017
+ duration: .6,
3018
+ delay: .2
3019
+ }
3020
+ }),
3021
+ /* @__PURE__ */ p(d.div, {
3022
+ className: "w-1.5 h-1.5 bg-slate-400 rounded-full",
3023
+ animate: { y: [
3024
+ 0,
3025
+ -3,
3026
+ 0
3027
+ ] },
3028
+ transition: {
3029
+ repeat: Infinity,
3030
+ duration: .6,
3031
+ delay: .4
3032
+ }
3033
+ })
3034
+ ]
3035
+ })
3036
+ })]
3037
+ }), !S && /* @__PURE__ */ m(d.div, {
3038
+ initial: { opacity: 0 },
3039
+ animate: { opacity: 1 },
3040
+ className: "space-y-4",
3041
+ children: [
3042
+ r.bubbles?.map((e) => /* @__PURE__ */ p("div", {
3043
+ className: $("flex w-full", e.type === "action-group" ? "justify-end" : "justify-start"),
3044
+ children: /* @__PURE__ */ p(Lt, {
3045
+ bubble: e,
3046
+ fieldValues: _ || {},
3047
+ onFill: h,
3048
+ onNext: i,
3049
+ onPrev: a,
3050
+ onInteraction: (e) => t.addInteraction(r.id, e)
3051
+ })
3052
+ }, e.id)),
3053
+ !r.bubbles && r.actions && r.actions.length > 0 && /* @__PURE__ */ p(Ft, {
3054
+ actions: r.actions,
3055
+ onNext: i,
3056
+ onPrev: a,
3057
+ onAction: (e) => {
3058
+ if (e.type === "fill_field" && e.data) {
3059
+ let n = e.data;
3060
+ h(n.field, n.value), t.addInteraction(r.id, `Used auto-fill: ${n.value}`);
3061
+ } else if (e.type === "click" && e.data) {
3062
+ let n = e.data, i = document.querySelector(n.selector);
3063
+ i && (i.click(), t.addInteraction(r.id, `Clicked: ${n.selector}`));
3064
+ } else e.onClick && (e.onClick(), t.addInteraction(r.id, `Selected: ${e.label}`));
3065
+ }
3066
+ }),
3067
+ r?.actionSequence && Object.keys(v.results).length > 0 && /* @__PURE__ */ m("div", {
3068
+ className: "space-y-2",
3069
+ children: [r.actionSequence.map((e) => {
3070
+ let t = v.results[e.id];
3071
+ return t ? /* @__PURE__ */ p("div", {
3072
+ className: "flex justify-start w-full",
3073
+ children: /* @__PURE__ */ p(It, {
3074
+ action: e,
3075
+ result: t
3076
+ })
3077
+ }, e.id) : null;
3078
+ }), v.isRunning && /* @__PURE__ */ m("button", {
3079
+ onClick: y,
3080
+ className: "flex items-center space-x-1 text-xs text-rose-500 hover:text-rose-600 font-medium ml-2 mt-1",
3081
+ children: [/* @__PURE__ */ p(R, { size: 12 }), /* @__PURE__ */ p("span", { children: "Cancel execution" })]
3082
+ })]
3083
+ })
3084
+ ]
3085
+ })]
3086
+ }),
3087
+ /* @__PURE__ */ p("div", {
3088
+ className: "p-4 bg-white dark:bg-slate-900 border-t border-slate-100 dark:border-slate-800 shrink-0",
3089
+ children: /* @__PURE__ */ m("div", {
3090
+ className: "flex items-center justify-between space-x-2",
3091
+ children: [
3092
+ /* @__PURE__ */ p("button", {
3093
+ onClick: () => {
3094
+ t.addInteraction(r.id, "Navigated backwards"), a();
3095
+ },
3096
+ disabled: n.steps.indexOf(r) === 0,
3097
+ className: "p-3 text-slate-400 hover:text-slate-900 dark:hover:text-white disabled:opacity-30 transition-colors",
3098
+ children: /* @__PURE__ */ p(F, { size: 20 })
3099
+ }),
3100
+ /* @__PURE__ */ p("div", {
3101
+ className: "flex-1 bg-slate-100 dark:bg-slate-800 rounded-xl px-4 py-3 flex items-center overflow-hidden",
3102
+ children: /* @__PURE__ */ p("span", {
3103
+ className: "text-sm text-slate-400 flex-1 truncate",
3104
+ children: r.targetField ? `Focusing on ${r.targetField}...` : "Reading..."
3105
+ })
3106
+ }),
3107
+ /* @__PURE__ */ p("button", {
3108
+ onClick: () => {
3109
+ if (r.targetField) {
3110
+ let e = _[r.targetField];
3111
+ t.addInteraction(r.id, `Confirmed value: ${e}`);
3112
+ } else t.interactionHistory.find((e) => e.stepId === r.id) || t.addInteraction(r.id, "Proceeded to next step");
3113
+ i();
3114
+ },
3115
+ disabled: r.targetField && !!g?.[r.targetField] || n.steps.indexOf(r) === n.steps.length - 1,
3116
+ className: $("p-3 bg-indigo-600 hover:bg-indigo-700 text-white rounded-xl shadow-md active:scale-95 transition-all disabled:opacity-50"),
3117
+ children: n.steps.indexOf(r) === n.steps.length - 1 ? /* @__PURE__ */ p(L, { size: 20 }) : /* @__PURE__ */ p(pe, { size: 20 })
3118
+ })
3119
+ ]
3120
+ })
3121
+ })
3122
+ ]
3123
+ }) }), r?.targetElement && /* @__PURE__ */ p(jt, {
3124
+ selector: r.targetElement,
3125
+ label: r.title
3126
+ })] });
3127
+ }
3128
+ //#endregion
3129
+ export { Rt as SmartDrawer, jt as TargetHighlight, A as useChalo, O as useChaloStore };