fiboui 2.1.0 → 2.2.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.
@@ -0,0 +1,2476 @@
1
+ "use client";
2
+ var yt = Object.defineProperty;
3
+ var _t = (r, t, e) => t in r ? yt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
4
+ var c = (r, t, e) => _t(r, typeof t != "symbol" ? t + "" : t, e);
5
+ import g, { useRef as w, createContext as P, useContext as O, useCallback as E, useSyncExternalStore as I, useEffect as j, useState as q, memo as kt, cloneElement as Z } from "react";
6
+ import { jsx as v, Fragment as B } from "react/jsx-runtime";
7
+ class J {
8
+ constructor() {
9
+ c(this, "activeEffect", null);
10
+ }
11
+ }
12
+ const Q = new J(), R = [Q];
13
+ function tt() {
14
+ return new J();
15
+ }
16
+ function et() {
17
+ return R[R.length - 1] ?? Q;
18
+ }
19
+ function A() {
20
+ return et().activeEffect;
21
+ }
22
+ function xt(r, t) {
23
+ R.push(r);
24
+ try {
25
+ return t();
26
+ } finally {
27
+ R.pop();
28
+ }
29
+ }
30
+ function M(r) {
31
+ const t = et(), e = t.activeEffect;
32
+ return t.activeEffect = r, e;
33
+ }
34
+ class wt {
35
+ constructor(t) {
36
+ c(this, "dependencies", /* @__PURE__ */ new Set());
37
+ c(this, "_onDispose");
38
+ this.fn = t, this.run();
39
+ }
40
+ run() {
41
+ const t = M(this);
42
+ try {
43
+ this.cleanup(), this.fn();
44
+ } finally {
45
+ M(t);
46
+ }
47
+ }
48
+ track(t) {
49
+ this.dependencies.add(t), t.subscribeEffect(this);
50
+ }
51
+ trigger() {
52
+ this.run();
53
+ }
54
+ cleanup() {
55
+ this.dependencies.forEach((t) => t.unsubscribeEffect(this)), this.dependencies.clear();
56
+ }
57
+ dispose() {
58
+ var t;
59
+ this.cleanup(), (t = this._onDispose) == null || t.call(this);
60
+ }
61
+ }
62
+ class $t {
63
+ constructor(t) {
64
+ c(this, "dependencies", /* @__PURE__ */ new Set());
65
+ this._onInvalidate = t;
66
+ }
67
+ execute(t) {
68
+ const e = M(this);
69
+ try {
70
+ return this.cleanup(), t();
71
+ } finally {
72
+ M(e);
73
+ }
74
+ }
75
+ track(t) {
76
+ this.dependencies.add(t), t.subscribeEffect(this);
77
+ }
78
+ trigger() {
79
+ this._onInvalidate();
80
+ }
81
+ cleanup() {
82
+ this.dependencies.forEach((t) => t.unsubscribeEffect(this)), this.dependencies.clear();
83
+ }
84
+ dispose() {
85
+ this.cleanup();
86
+ }
87
+ }
88
+ class z {
89
+ constructor(t) {
90
+ c(this, "listeners", /* @__PURE__ */ new Set());
91
+ c(this, "effects", /* @__PURE__ */ new Set());
92
+ this._value = t;
93
+ }
94
+ get value() {
95
+ const t = A();
96
+ return t && t.track(this), this._value;
97
+ }
98
+ set value(t) {
99
+ this._value !== t && (this._value = t, this.notify());
100
+ }
101
+ subscribe(t) {
102
+ return this.listeners.add(t), () => this.listeners.delete(t);
103
+ }
104
+ subscribeEffect(t) {
105
+ this.effects.add(t);
106
+ }
107
+ unsubscribeEffect(t) {
108
+ this.effects.delete(t);
109
+ }
110
+ notify() {
111
+ const t = Array.from(this.effects), e = Array.from(this.listeners);
112
+ t.forEach((s) => s.trigger()), e.forEach((s) => s(this._value));
113
+ }
114
+ }
115
+ function ye(r) {
116
+ return new z(r);
117
+ }
118
+ class St {
119
+ constructor(t) {
120
+ c(this, "listeners", /* @__PURE__ */ new Set());
121
+ c(this, "effects", /* @__PURE__ */ new Set());
122
+ c(this, "_value");
123
+ c(this, "_dirty", !0);
124
+ c(this, "internalEffect");
125
+ this.fn = t, this.internalEffect = new wt(() => {
126
+ this._dirty || (this._dirty = !0, this.notify());
127
+ });
128
+ }
129
+ get value() {
130
+ const t = A();
131
+ if (t && t.track(this), this._dirty) {
132
+ const e = M(this.internalEffect);
133
+ try {
134
+ this.internalEffect.cleanup(), this._value = this.fn(), this._dirty = !1;
135
+ } finally {
136
+ M(e);
137
+ }
138
+ }
139
+ return this._value;
140
+ }
141
+ subscribe(t) {
142
+ return this.listeners.add(t), () => this.listeners.delete(t);
143
+ }
144
+ subscribeEffect(t) {
145
+ this.effects.add(t);
146
+ }
147
+ unsubscribeEffect(t) {
148
+ this.effects.delete(t);
149
+ }
150
+ notify() {
151
+ const t = Array.from(this.effects), e = Array.from(this.listeners);
152
+ t.forEach((s) => s.trigger()), e.forEach((s) => s(this._value));
153
+ }
154
+ }
155
+ function _e(r) {
156
+ return new St(r);
157
+ }
158
+ class Nt {
159
+ constructor(t) {
160
+ c(this, "listeners", /* @__PURE__ */ new Set());
161
+ c(this, "effects", /* @__PURE__ */ new Set());
162
+ this._value = t;
163
+ }
164
+ get() {
165
+ const t = A();
166
+ return t && t.track(this), this._value;
167
+ }
168
+ set(t) {
169
+ this._value !== t && (this._value = t, this.notify());
170
+ }
171
+ subscribe(t) {
172
+ return this.listeners.add(t), () => this.listeners.delete(t);
173
+ }
174
+ subscribeEffect(t) {
175
+ this.effects.add(t);
176
+ }
177
+ unsubscribeEffect(t) {
178
+ this.effects.delete(t);
179
+ }
180
+ notify() {
181
+ Array.from(this.effects).forEach((t) => t.trigger()), Array.from(this.listeners).forEach((t) => t(this._value));
182
+ }
183
+ }
184
+ function ke(r) {
185
+ return new Nt(r);
186
+ }
187
+ class vt {
188
+ constructor(t) {
189
+ c(this, "listeners", /* @__PURE__ */ new Set());
190
+ c(this, "effects", /* @__PURE__ */ new Set());
191
+ this.state = t;
192
+ }
193
+ getState() {
194
+ const t = A();
195
+ return t && t.track(this), this.state;
196
+ }
197
+ setState(t) {
198
+ const e = typeof t == "function" ? t(this.state) : t, s = { ...this.state, ...e }, o = Object.keys(this.state), i = Object.keys(s);
199
+ o.length === i.length && i.every((a) => Object.is(s[a], this.state[a])) || (this.state = s, this.notify());
200
+ }
201
+ subscribe(t) {
202
+ return this.listeners.add(t), () => this.listeners.delete(t);
203
+ }
204
+ subscribeEffect(t) {
205
+ this.effects.add(t);
206
+ }
207
+ unsubscribeEffect(t) {
208
+ this.effects.delete(t);
209
+ }
210
+ notify() {
211
+ Array.from(this.effects).forEach((t) => t.trigger()), Array.from(this.listeners).forEach((t) => t(this.state));
212
+ }
213
+ }
214
+ function xe(r) {
215
+ return new vt(r);
216
+ }
217
+ const Ct = tt(), st = P(Ct);
218
+ function Et() {
219
+ return O(st);
220
+ }
221
+ function we({ children: r, scope: t }) {
222
+ const e = w(t ?? tt()).current;
223
+ return /* @__PURE__ */ v(st.Provider, { value: e, children: r });
224
+ }
225
+ function Mt({ children: r }) {
226
+ const t = w(0), e = w(/* @__PURE__ */ new Set()), s = w(null);
227
+ s.current || (s.current = new $t(() => {
228
+ t.current += 1, e.current.forEach((l) => l());
229
+ }));
230
+ const o = E((l) => (e.current.add(l), () => {
231
+ e.current.delete(l);
232
+ }), []), i = E(() => t.current, []);
233
+ I(o, i, i), j(() => () => {
234
+ var l;
235
+ (l = s.current) == null || l.dispose();
236
+ }, []);
237
+ const n = Et();
238
+ let a = null;
239
+ try {
240
+ a = xt(n, () => s.current.execute(r));
241
+ } catch {
242
+ a = null;
243
+ }
244
+ return /* @__PURE__ */ v(B, { children: a });
245
+ }
246
+ const Tt = P(/* @__PURE__ */ new Map()), rt = P(null);
247
+ function $e(r) {
248
+ const t = O(rt);
249
+ if (!t)
250
+ throw new Error("useBuilderState must be used under a builder that called .state()");
251
+ return [t.get(r), (e) => t.set(r, e)];
252
+ }
253
+ function zt({ stateMap: r = /* @__PURE__ */ new Map(), children: t }) {
254
+ const [e, s] = q(() => new Map(r)), o = {
255
+ map: e,
256
+ get: (i) => e.get(i),
257
+ set: (i, n) => {
258
+ s((a) => {
259
+ if (Object.is(a.get(i), n))
260
+ return a;
261
+ const l = new Map(a);
262
+ return l.set(i, n), l;
263
+ });
264
+ }
265
+ };
266
+ return /* @__PURE__ */ v(rt.Provider, { value: o, children: /* @__PURE__ */ v(Tt.Provider, { value: e, children: t }) });
267
+ }
268
+ function It({ observables: r, children: t }) {
269
+ const e = w(0), s = E((i) => {
270
+ const n = Array.from(r).map(
271
+ (a) => a.subscribe(() => {
272
+ e.current += 1, i();
273
+ })
274
+ );
275
+ return () => n.forEach((a) => a());
276
+ }, [r]), o = E(() => e.current, []);
277
+ return I(s, o, o), /* @__PURE__ */ v(B, { children: typeof t == "function" ? t() : t });
278
+ }
279
+ function Rt({ signals: r, children: t }) {
280
+ const e = w(0), s = E((i) => {
281
+ const n = Array.from(r).map(
282
+ (a) => a.subscribe(() => {
283
+ e.current += 1, i();
284
+ })
285
+ );
286
+ return () => n.forEach((a) => a());
287
+ }, [r]), o = E(() => e.current, []);
288
+ return I(s, o, o), /* @__PURE__ */ v(B, { children: typeof t == "function" ? t() : t });
289
+ }
290
+ const ot = P(/* @__PURE__ */ new Map());
291
+ function Se(r) {
292
+ const t = O(ot);
293
+ return t == null ? void 0 : t.get(r);
294
+ }
295
+ function Pt({ providers: r = /* @__PURE__ */ new Map(), children: t }) {
296
+ return /* @__PURE__ */ v(ot.Provider, { value: r, children: t });
297
+ }
298
+ function jt(r) {
299
+ return !!r && typeof r == "object" && "build" in r && typeof r.build == "function";
300
+ }
301
+ function At(r) {
302
+ return g.isValidElement(r) ? r : jt(r) ? r.build() : r;
303
+ }
304
+ function H(r) {
305
+ if (r == null)
306
+ return [];
307
+ const t = typeof r == "function" ? r() : r;
308
+ return (Array.isArray(t) ? t : [t]).map(At);
309
+ }
310
+ function Vt(r, t, e) {
311
+ if (!t) return r;
312
+ const s = e ?? (typeof window < "u" ? window.innerWidth : void 0);
313
+ if (s === void 0)
314
+ return r;
315
+ let o = { ...r };
316
+ return s < 768 && t.mobile ? o = { ...o, ...t.mobile } : s >= 768 && s < 1024 && t.tablet ? o = { ...o, ...t.tablet } : s >= 1024 && t.desktop && (o = { ...o, ...t.desktop }), o;
317
+ }
318
+ function Ne(r, t) {
319
+ const e = kt(r, t);
320
+ return (s) => g.createElement(e, s);
321
+ }
322
+ const Y = /* @__PURE__ */ new Map(), Dt = {
323
+ easeIn: "ease-in",
324
+ easeOut: "ease-out",
325
+ easeInOut: "ease-in-out",
326
+ linear: "linear",
327
+ ease: "ease"
328
+ };
329
+ function it(r = {}) {
330
+ const t = r.stiffness ?? 170, e = r.damping ?? 26, s = r.mass ?? 1, o = `${t}:${e}:${s}`, i = Y.get(o);
331
+ if (i) return i;
332
+ const n = 1 / 60, a = 1;
333
+ let l = 0, h = 0;
334
+ const f = [0];
335
+ for (let b = 0; b < 180; b += 1) {
336
+ const k = -t * (l - a) - e * h;
337
+ if (h += k / s * n, l += h * n, f.push(l), b > 8 && Math.abs(l - a) < 2e-3 && Math.abs(h) < 2e-3) break;
338
+ }
339
+ f[f.length - 1] !== 1 && f.push(1);
340
+ const m = Math.max(1, Math.floor((f.length - 1) / 24)), p = [];
341
+ for (let b = 0; b < f.length; b += m) {
342
+ const k = b / (f.length - 1), $ = Math.round(f[b] * 1e4) / 1e4;
343
+ p.push(b === 0 ? `${$}` : `${$} ${Math.round(k * 1e4) / 100}%`);
344
+ }
345
+ const y = `linear(${p.join(", ")})`;
346
+ return Y.set(o, y), y;
347
+ }
348
+ function N(r, t) {
349
+ return r === "spring" ? it(t) : Dt[r] ?? r;
350
+ }
351
+ const U = [
352
+ "fadeIn",
353
+ "fadeOut",
354
+ "fade",
355
+ "slideUp",
356
+ "slideDown",
357
+ "slideLeft",
358
+ "slideRight",
359
+ "scaleIn",
360
+ "scaleOut",
361
+ "scale",
362
+ "blurIn",
363
+ "blurOut",
364
+ "blur",
365
+ "pop",
366
+ "bounce"
367
+ ], Lt = {
368
+ fade: "fadeIn",
369
+ scale: "scaleIn",
370
+ blur: "blurIn"
371
+ };
372
+ function Ft(r) {
373
+ if (!r || typeof r != "object") return !1;
374
+ const t = r;
375
+ return typeof t.from == "object" && t.from !== null && typeof t.to == "object" && t.to !== null;
376
+ }
377
+ function K(r) {
378
+ const t = /* @__PURE__ */ new Set(["opacity", "zIndex", "z-index", "flex", "fontWeight", "lineHeight"]);
379
+ return Object.entries(r).map(([e, s]) => {
380
+ const o = e.replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`), i = typeof s == "number" && !t.has(e) ? `${s}px` : String(s);
381
+ return `${o}: ${i}`;
382
+ }).join("; ");
383
+ }
384
+ function Wt(r) {
385
+ let t = 5381;
386
+ for (let e = 0; e < r.length; e += 1) t = (t << 5) + t ^ r.charCodeAt(e);
387
+ return (t >>> 0).toString(36);
388
+ }
389
+ function Ot(r) {
390
+ const t = Lt[r] ?? r;
391
+ if (!U.includes(t))
392
+ throw new Error(`Unknown motion preset "${r}". Use: ${U.join(", ")}`);
393
+ return t;
394
+ }
395
+ const F = `
396
+ .fibo-anim {
397
+ animation-duration: var(--fibo-dur, 300ms);
398
+ animation-timing-function: var(--fibo-ease, ease);
399
+ animation-delay: calc(var(--fibo-i, 0) * var(--fibo-stagger, 0ms) + var(--fibo-delay, 0ms));
400
+ animation-fill-mode: both;
401
+ animation-iteration-count: 1;
402
+ }
403
+ .fibo-anim-fadeIn, .fibo-anim-fade { animation-name: fibo-fadeIn; }
404
+ .fibo-anim-fadeOut { animation-name: fibo-fadeOut; }
405
+ .fibo-anim-slideUp { animation-name: fibo-slideUp; }
406
+ .fibo-anim-slideDown { animation-name: fibo-slideDown; }
407
+ .fibo-anim-slideLeft { animation-name: fibo-slideLeft; }
408
+ .fibo-anim-slideRight { animation-name: fibo-slideRight; }
409
+ .fibo-anim-scaleIn, .fibo-anim-scale { animation-name: fibo-scaleIn; }
410
+ .fibo-anim-scaleOut { animation-name: fibo-scaleOut; }
411
+ .fibo-anim-blurIn, .fibo-anim-blur { animation-name: fibo-blurIn; }
412
+ .fibo-anim-blurOut { animation-name: fibo-blurOut; }
413
+ .fibo-anim-pop { animation-name: fibo-pop; }
414
+ .fibo-anim-bounce { animation-name: fibo-bounce; }
415
+
416
+ @keyframes fibo-fadeIn { from { opacity: 0; } to { opacity: 1; } }
417
+ @keyframes fibo-fadeOut { from { opacity: 1; } to { opacity: 0; } }
418
+ @keyframes fibo-slideUp {
419
+ from { opacity: 0; transform: translate3d(0, var(--fibo-from, 16px), 0); }
420
+ to { opacity: 1; transform: none; }
421
+ }
422
+ @keyframes fibo-slideDown {
423
+ from { opacity: 0; transform: translate3d(0, calc(var(--fibo-from, 16px) * -1), 0); }
424
+ to { opacity: 1; transform: none; }
425
+ }
426
+ @keyframes fibo-slideLeft {
427
+ from { opacity: 0; transform: translate3d(var(--fibo-from, 16px), 0, 0); }
428
+ to { opacity: 1; transform: none; }
429
+ }
430
+ @keyframes fibo-slideRight {
431
+ from { opacity: 0; transform: translate3d(calc(var(--fibo-from, 16px) * -1), 0, 0); }
432
+ to { opacity: 1; transform: none; }
433
+ }
434
+ @keyframes fibo-scaleIn {
435
+ from { opacity: 0; transform: scale(0.94); }
436
+ to { opacity: 1; transform: none; }
437
+ }
438
+ @keyframes fibo-scaleOut {
439
+ from { opacity: 1; transform: none; }
440
+ to { opacity: 0; transform: scale(0.94); }
441
+ }
442
+ @keyframes fibo-blurIn {
443
+ from { opacity: 0; filter: blur(var(--fibo-from, 8px)); }
444
+ to { opacity: 1; filter: none; }
445
+ }
446
+ @keyframes fibo-blurOut {
447
+ from { opacity: 1; filter: none; }
448
+ to { opacity: 0; filter: blur(var(--fibo-from, 8px)); }
449
+ }
450
+ @keyframes fibo-pop {
451
+ from { opacity: 0; transform: scale(0.92); }
452
+ to { opacity: 1; transform: none; }
453
+ }
454
+ @keyframes fibo-bounce {
455
+ 0% { opacity: 0; transform: translate3d(0, var(--fibo-from, 16px), 0); }
456
+ 60% { opacity: 1; transform: translate3d(0, -6px, 0); }
457
+ 80% { transform: translate3d(0, 2px, 0); }
458
+ 100% { opacity: 1; transform: none; }
459
+ }
460
+
461
+ @keyframes stripes {
462
+ from { background-position: 0 0; }
463
+ to { background-position: 40px 0; }
464
+ }
465
+
466
+ .fibo-stagger-item { display: contents; }
467
+
468
+ .fibo-reveal {
469
+ opacity: 0;
470
+ transform: translate3d(0, 12px, 0);
471
+ transition-property: opacity, transform, filter;
472
+ transition-duration: var(--fibo-dur, 500ms);
473
+ transition-timing-function: var(--fibo-ease, ease);
474
+ transition-delay: calc(var(--fibo-i, 0) * var(--fibo-stagger, 0ms) + var(--fibo-delay, 0ms));
475
+ }
476
+ .fibo-reveal-fade { transform: none; }
477
+ .fibo-reveal-fadeUp, .fibo-reveal-fadeIn, .fibo-reveal-slideUp { transform: translate3d(0, 16px, 0); }
478
+ .fibo-reveal-slideDown { transform: translate3d(0, -16px, 0); }
479
+ .fibo-reveal-slideLeft { transform: translate3d(16px, 0, 0); }
480
+ .fibo-reveal-slideRight { transform: translate3d(-16px, 0, 0); }
481
+ .fibo-reveal-scale, .fibo-reveal-scaleIn { transform: scale(0.96); }
482
+ .fibo-reveal-blur { filter: blur(8px); transform: none; }
483
+ .fibo-reveal.fibo-inview {
484
+ opacity: 1;
485
+ transform: none;
486
+ filter: none;
487
+ }
488
+
489
+ .fibo-view-timeline {
490
+ animation-timeline: view();
491
+ animation-range: entry 0% cover 35%;
492
+ }
493
+ .fibo-scroll-timeline {
494
+ animation-timeline: scroll();
495
+ }
496
+ .fibo-scroll-progress {
497
+ transform: scaleX(var(--fibo-progress, 0));
498
+ transform-origin: left center;
499
+ animation-name: fibo-progress-grow;
500
+ animation-duration: 1s;
501
+ animation-timing-function: linear;
502
+ animation-fill-mode: both;
503
+ animation-timeline: scroll();
504
+ }
505
+ @keyframes fibo-progress-grow {
506
+ from { transform: scaleX(0); }
507
+ to { transform: scaleX(1); }
508
+ }
509
+ @supports not (animation-timeline: scroll()) {
510
+ .fibo-scroll-progress {
511
+ animation: none;
512
+ transform: scaleX(var(--fibo-progress, 0));
513
+ }
514
+ }
515
+
516
+ .fibo-snap-y { scroll-snap-type: y mandatory; }
517
+ .fibo-snap-x { scroll-snap-type: x mandatory; }
518
+ .fibo-snap-both { scroll-snap-type: both mandatory; }
519
+ .fibo-snap-start { scroll-snap-align: start; }
520
+ .fibo-snap-center { scroll-snap-align: center; }
521
+ .fibo-snap-end { scroll-snap-align: end; }
522
+
523
+ @media (prefers-reduced-motion: reduce) {
524
+ .fibo-anim:not(.fibo-motion-force),
525
+ .fibo-reveal:not(.fibo-motion-force),
526
+ .fibo-scroll-progress:not(.fibo-motion-force) {
527
+ animation: none !important;
528
+ transition: none !important;
529
+ opacity: 1 !important;
530
+ transform: none !important;
531
+ filter: none !important;
532
+ }
533
+ }
534
+ `.trim(), S = class S {
535
+ constructor() {
536
+ c(this, "sheet", null);
537
+ c(this, "cache", /* @__PURE__ */ new Map());
538
+ c(this, "extras", []);
539
+ c(this, "defaultsReady", !1);
540
+ typeof document < "u" && (this.sheet = document.createElement("style"), this.sheet.id = "fibo-dynamic-styles", document.head.appendChild(this.sheet)), this.ensureDefaults();
541
+ }
542
+ static getInstance() {
543
+ return S.instance || (S.instance = new S()), S.instance;
544
+ }
545
+ /**
546
+ * CSS `@media` rule, deduped. Used by `.media()` / `.md()` — not JS resize.
547
+ */
548
+ registerMedia(t, e, s) {
549
+ const o = `@media ${t}|${e}:${s}`;
550
+ if (this.cache.has(o))
551
+ return this.cache.get(o);
552
+ const i = `fibo-mq-${Bt(o)}`, n = `@media ${t} { .${i} { ${e}: ${s} !important; } }`;
553
+ return this.insert(n), this.cache.set(o, i), i;
554
+ }
555
+ ensureDefaults() {
556
+ var t;
557
+ this.defaultsReady || (this.defaultsReady = !0, this.sheet && !((t = this.sheet.textContent) != null && t.includes("fibo-fadeIn")) && this.sheet.appendChild(document.createTextNode(F)));
558
+ }
559
+ getCss() {
560
+ var e;
561
+ this.ensureDefaults();
562
+ const t = (e = this.sheet) != null && e.sheet ? Array.from(this.sheet.sheet.cssRules).map((s) => s.cssText).join(`
563
+ `) : "";
564
+ return [F, ...this.extras, t].filter(Boolean).join(`
565
+ `);
566
+ }
567
+ registerKeyframes(t, e, s) {
568
+ const o = `kf:${e}=>${s}`;
569
+ if (this.cache.has(o)) return this.cache.get(o);
570
+ const i = `fibo-c-${t}`;
571
+ return this.insert(`@keyframes ${i} { from { ${e} } to { ${s} } }`), this.insert(`.${i} { animation-name: ${i}; }`), this.cache.set(o, i), i;
572
+ }
573
+ insert(t, e = !0) {
574
+ if (e && this.extras.push(t), this.sheet && this.sheet.sheet)
575
+ try {
576
+ this.sheet.sheet.insertRule(t, this.sheet.sheet.cssRules.length);
577
+ } catch {
578
+ this.sheet && this.sheet.appendChild(document.createTextNode(t));
579
+ }
580
+ else this.sheet && this.sheet.appendChild(document.createTextNode(t));
581
+ }
582
+ /** Set a `:root` custom property (e.g. `--fibo-sticky-offset`). */
583
+ registerRoot(t, e) {
584
+ const s = `:root:${t}:${e}`;
585
+ this.cache.has(s) || (this.insert(`:root { ${t}: ${e}; }`), this.cache.set(s, ":root"));
586
+ }
587
+ /** Once: `html { scroll-padding-top: var(--fibo-sticky-offset, 0px) }`. */
588
+ ensureScrollPadding() {
589
+ const t = "html:scroll-padding-top";
590
+ this.cache.has(t) || (this.insert("html { scroll-padding-top: var(--fibo-sticky-offset, 0px); }"), this.cache.set(t, "html"));
591
+ }
592
+ register(t, e) {
593
+ const s = `${t}:${e}`;
594
+ if (this.cache.has(s))
595
+ return this.cache.get(s);
596
+ const o = e.replace(/[^a-zA-Z0-9-]/g, "_"), i = `fibo-${t}-${o}`, n = `.${i} { ${t}: ${e} !important; }`;
597
+ return this.insert(n), this.cache.set(s, i), i;
598
+ }
599
+ registerPseudo(t, e, s, o) {
600
+ const i = `${t}:${e}:${s}:${o}`;
601
+ if (this.cache.has(i))
602
+ return t;
603
+ const n = `.${t}:${e} { ${s}: ${o} !important; }`;
604
+ return this.insert(n), this.cache.set(i, t), t;
605
+ }
606
+ registerGroupPseudo(t, e, s, o) {
607
+ const i = `group:${t}:${e}:${s}:${o}`;
608
+ if (this.cache.has(i))
609
+ return t;
610
+ const n = `.group:${e} .${t} { ${s}: ${o} !important; }`;
611
+ return this.insert(n), this.cache.set(i, t), t;
612
+ }
613
+ };
614
+ c(S, "instance");
615
+ let W = S;
616
+ function Bt(r) {
617
+ let t = 5381;
618
+ for (let e = 0; e < r.length; e += 1)
619
+ t = (t << 5) + t ^ r.charCodeAt(e);
620
+ return (t >>> 0).toString(36);
621
+ }
622
+ const u = W.getInstance();
623
+ function x() {
624
+ u.ensureDefaults();
625
+ }
626
+ function ve() {
627
+ return u.getCss();
628
+ }
629
+ function Xt() {
630
+ return x(), g.createElement("style", {
631
+ id: "fibo-motion-presets",
632
+ "data-fibo-motion": "1",
633
+ dangerouslySetInnerHTML: { __html: F }
634
+ });
635
+ }
636
+ const nt = {
637
+ sm: 640,
638
+ md: 768,
639
+ lg: 1024,
640
+ xl: 1280
641
+ };
642
+ function Ht(r) {
643
+ return r in nt;
644
+ }
645
+ function Yt(r) {
646
+ if (Ht(r))
647
+ return `(min-width: ${nt[r]}px)`;
648
+ const t = r.trim();
649
+ return t.startsWith("@media") ? t.replace(/^@media\s+/, "") : t;
650
+ }
651
+ function at(r) {
652
+ var t, e, s = "";
653
+ if (typeof r == "string" || typeof r == "number") s += r;
654
+ else if (typeof r == "object") if (Array.isArray(r)) {
655
+ var o = r.length;
656
+ for (t = 0; t < o; t++) r[t] && (e = at(r[t])) && (s && (s += " "), s += e);
657
+ } else for (e in r) r[e] && (s && (s += " "), s += e);
658
+ return s;
659
+ }
660
+ function Ut() {
661
+ for (var r, t, e = 0, s = "", o = arguments.length; e < o; e++) (r = arguments[e]) && (t = at(r)) && (s && (s += " "), s += t);
662
+ return s;
663
+ }
664
+ function Kt(r) {
665
+ const t = r.match(/oklch\(\s*([\d.]+)\s+([\d.]+)\s+([\d.]+)\s*\)/);
666
+ if (!t)
667
+ return r;
668
+ const [, e, s, o] = t, i = parseFloat(e), n = parseFloat(s), a = parseFloat(o), l = n * Math.cos(a * Math.PI / 180), h = n * Math.sin(a * Math.PI / 180), f = i + 0.3963377774 * l + 0.2158037573 * h, d = i - 0.1055613458 * l - 0.0638541728 * h, m = i - 0.0894841775 * l - 1.291485548 * h, p = f * f * f, y = d * d * d, b = m * m * m, k = 4.0767416621 * p - 3.3077115913 * y + 0.2309699292 * b, $ = -1.2684380046 * p + 2.6097574011 * y - 0.3413193965 * b, mt = -0.0041960863 * p - 0.7034186147 * y + 1.707614701 * b, V = (T) => T >= 31308e-7 ? 1.055 * T ** (1 / 2.4) - 0.055 : 12.92 * T, pt = Math.max(0, Math.min(1, V(k))), gt = Math.max(0, Math.min(1, V($))), bt = Math.max(0, Math.min(1, V(mt))), D = (T) => {
669
+ var X;
670
+ const L = (X = Math.round(T * 255).toString(16)) == null ? void 0 : X.toUpperCase();
671
+ return L.length === 1 ? `0${L}` : L;
672
+ };
673
+ return `#${D(pt)}${D(gt)}${D(bt)}`;
674
+ }
675
+ function Gt(r) {
676
+ const t = {}, e = {}, s = r.split(`
677
+ `);
678
+ for (const o of s) {
679
+ const i = o.trim();
680
+ if (!i || i.startsWith("//") || i.startsWith("*") || i === "@theme {" || i === "}")
681
+ continue;
682
+ const n = i.match(/^--color-([a-z0-9\-]+): (oklch\([^)]+\));?$/), a = i.match(/^--color-([a-z0-9\-]+): (#[a-fA-F0-9]{3,6});?$/);
683
+ if (n) {
684
+ const [, l, h] = n, f = Kt(h);
685
+ t[f.toLowerCase()] = `bg-${l}`, e[f.toLowerCase()] = `text-${l}`;
686
+ } else if (a) {
687
+ const [, l, h] = a;
688
+ t[h.toLowerCase()] = `bg-${l}`, e[h.toLowerCase()] = `text-${l}`;
689
+ }
690
+ }
691
+ return { background: t, text: e };
692
+ }
693
+ const qt = (r) => {
694
+ if (r !== void 0)
695
+ return typeof r == "number" ? `${r}px` : r.toString();
696
+ }, C = (r, t) => {
697
+ const e = qt(t);
698
+ return e === void 0 ? "" : `${r}-[${e}]`;
699
+ }, Zt = `
700
+ --color-red-50: oklch(0.971 0.013 17.38);
701
+ --color-red-100: oklch(0.936 0.032 17.717);
702
+ --color-red-200: oklch(0.885 0.062 18.334);
703
+ --color-red-300: oklch(0.808 0.114 19.571);
704
+ --color-red-400: oklch(0.704 0.191 22.216);
705
+ --color-red-500: oklch(0.637 0.237 25.331);
706
+ --color-red-600: oklch(0.577 0.245 27.325);
707
+ --color-red-700: oklch(0.505 0.213 27.518);
708
+ --color-red-800: oklch(0.444 0.177 26.899);
709
+ --color-red-900: oklch(0.396 0.141 25.723);
710
+ --color-red-950: oklch(0.258 0.092 26.042);
711
+ --color-orange-50: oklch(0.98 0.016 73.684);
712
+ --color-orange-100: oklch(0.954 0.038 75.164);
713
+ --color-orange-200: oklch(0.901 0.076 70.697);
714
+ --color-orange-300: oklch(0.837 0.128 66.29);
715
+ --color-orange-400: oklch(0.75 0.183 55.934);
716
+ --color-orange-500: oklch(0.705 0.213 47.604);
717
+ --color-orange-600: oklch(0.646 0.222 41.116);
718
+ --color-orange-700: oklch(0.553 0.195 38.402);
719
+ --color-orange-800: oklch(0.47 0.157 37.304);
720
+ --color-orange-900: oklch(0.408 0.123 38.172);
721
+ --color-orange-950: oklch(0.266 0.079 36.259);
722
+ --color-amber-50: oklch(0.987 0.022 95.277);
723
+ --color-amber-100: oklch(0.962 0.059 95.617);
724
+ --color-amber-200: oklch(0.924 0.12 95.746);
725
+ --color-amber-300: oklch(0.879 0.169 91.605);
726
+ --color-amber-400: oklch(0.828 0.189 84.429);
727
+ --color-amber-500: oklch(0.769 0.188 70.08);
728
+ --color-amber-600: oklch(0.666 0.179 58.318);
729
+ --color-amber-700: oklch(0.555 0.163 48.998);
730
+ --color-amber-800: oklch(0.473 0.137 46.201);
731
+ --color-amber-900: oklch(0.414 0.112 45.904);
732
+ --color-amber-950: oklch(0.279 0.077 45.635);
733
+ --color-yellow-50: oklch(0.987 0.026 102.212);
734
+ --color-yellow-100: oklch(0.973 0.071 103.193);
735
+ --color-yellow-200: oklch(0.945 0.129 101.54);
736
+ --color-yellow-300: oklch(0.905 0.182 98.111);
737
+ --color-yellow-400: oklch(0.852 0.199 91.936);
738
+ --color-yellow-500: oklch(0.795 0.184 86.047);
739
+ --color-yellow-600: oklch(0.681 0.162 75.834);
740
+ --color-yellow-700: oklch(0.554 0.135 66.442);
741
+ --color-yellow-800: oklch(0.476 0.114 61.907);
742
+ --color-yellow-900: oklch(0.421 0.095 57.708);
743
+ --color-yellow-950: oklch(0.286 0.066 53.813);
744
+ --color-lime-50: oklch(0.986 0.031 120.757);
745
+ --color-lime-100: oklch(0.967 0.067 122.328);
746
+ --color-lime-200: oklch(0.938 0.127 124.321);
747
+ --color-lime-300: oklch(0.897 0.196 126.665);
748
+ --color-lime-400: oklch(0.841 0.238 128.85);
749
+ --color-lime-500: oklch(0.768 0.233 130.85);
750
+ --color-lime-600: oklch(0.648 0.2 131.684);
751
+ --color-lime-700: oklch(0.532 0.157 131.589);
752
+ --color-lime-800: oklch(0.453 0.124 130.933);
753
+ --color-lime-900: oklch(0.405 0.101 131.063);
754
+ --color-lime-950: oklch(0.274 0.072 132.109);
755
+ --color-green-50: oklch(0.982 0.018 155.826);
756
+ --color-green-100: oklch(0.962 0.044 156.743);
757
+ --color-green-200: oklch(0.925 0.084 155.995);
758
+ --color-green-300: oklch(0.871 0.15 154.449);
759
+ --color-green-400: oklch(0.792 0.209 151.711);
760
+ --color-green-500: oklch(0.723 0.219 149.579);
761
+ --color-green-600: oklch(0.627 0.194 149.214);
762
+ --color-green-700: oklch(0.527 0.154 150.069);
763
+ --color-green-800: oklch(0.448 0.119 151.328);
764
+ --color-green-900: oklch(0.393 0.095 152.535);
765
+ --color-green-950: oklch(0.266 0.065 152.934);
766
+ --color-emerald-50: oklch(0.979 0.021 166.113);
767
+ --color-emerald-100: oklch(0.95 0.052 163.051);
768
+ --color-emerald-200: oklch(0.905 0.093 164.15);
769
+ --color-emerald-300: oklch(0.845 0.143 164.978);
770
+ --color-emerald-400: oklch(0.765 0.177 163.223);
771
+ --color-emerald-500: oklch(0.696 0.17 162.48);
772
+ --color-emerald-600: oklch(0.596 0.145 163.225);
773
+ --color-emerald-700: oklch(0.508 0.118 165.612);
774
+ --color-emerald-800: oklch(0.432 0.095 166.913);
775
+ --color-emerald-900: oklch(0.378 0.077 168.94);
776
+ --color-emerald-950: oklch(0.262 0.051 172.552);
777
+ --color-teal-50: oklch(0.984 0.014 180.72);
778
+ --color-teal-100: oklch(0.953 0.051 180.801);
779
+ --color-teal-200: oklch(0.91 0.096 180.426);
780
+ --color-teal-300: oklch(0.855 0.138 181.071);
781
+ --color-teal-400: oklch(0.777 0.152 181.912);
782
+ --color-teal-500: oklch(0.704 0.14 182.503);
783
+ --color-teal-600: oklch(0.6 0.118 184.704);
784
+ --color-teal-700: oklch(0.511 0.096 186.391);
785
+ --color-teal-800: oklch(0.437 0.078 188.216);
786
+ --color-teal-900: oklch(0.386 0.063 188.416);
787
+ --color-teal-950: oklch(0.277 0.046 192.524);
788
+ --color-cyan-50: oklch(0.984 0.019 200.873);
789
+ --color-cyan-100: oklch(0.956 0.045 203.388);
790
+ --color-cyan-200: oklch(0.917 0.08 205.041);
791
+ --color-cyan-300: oklch(0.865 0.127 207.078);
792
+ --color-cyan-400: oklch(0.789 0.154 211.53);
793
+ --color-cyan-500: oklch(0.715 0.143 215.221);
794
+ --color-cyan-600: oklch(0.609 0.126 221.723);
795
+ --color-cyan-700: oklch(0.52 0.105 223.128);
796
+ --color-cyan-800: oklch(0.45 0.085 224.283);
797
+ --color-cyan-900: oklch(0.398 0.07 227.392);
798
+ --color-cyan-950: oklch(0.302 0.056 229.695);
799
+ --color-sky-50: oklch(0.977 0.013 236.62);
800
+ --color-sky-100: oklch(0.951 0.026 236.824);
801
+ --color-sky-200: oklch(0.901 0.058 230.902);
802
+ --color-sky-300: oklch(0.828 0.111 230.318);
803
+ --color-sky-400: oklch(0.746 0.16 232.661);
804
+ --color-sky-500: oklch(0.685 0.169 237.323);
805
+ --color-sky-600: oklch(0.588 0.158 241.966);
806
+ --color-sky-700: oklch(0.5 0.134 242.749);
807
+ --color-sky-800: oklch(0.443 0.11 240.79);
808
+ --color-sky-900: oklch(0.391 0.09 240.876);
809
+ --color-sky-950: oklch(0.293 0.066 243.157);
810
+ --color-blue-50: oklch(0.97 0.014 254.604);
811
+ --color-blue-100: oklch(0.932 0.032 255.585);
812
+ --color-blue-200: oklch(0.882 0.059 254.128);
813
+ --color-blue-300: oklch(0.809 0.105 251.813);
814
+ --color-blue-400: oklch(0.707 0.165 254.624);
815
+ --color-blue-500: oklch(0.623 0.214 259.815);
816
+ --color-blue-600: oklch(0.546 0.245 262.881);
817
+ --color-blue-700: oklch(0.488 0.243 264.376);
818
+ --color-blue-800: oklch(0.424 0.199 265.638);
819
+ --color-blue-900: oklch(0.379 0.146 265.522);
820
+ --color-blue-950: oklch(0.282 0.091 267.935);
821
+ --color-indigo-50: oklch(0.962 0.018 272.314);
822
+ --color-indigo-100: oklch(0.93 0.034 272.788);
823
+ --color-indigo-200: oklch(0.87 0.065 274.039);
824
+ --color-indigo-300: oklch(0.785 0.115 274.713);
825
+ --color-indigo-400: oklch(0.673 0.182 276.935);
826
+ --color-indigo-500: oklch(0.585 0.233 277.117);
827
+ --color-indigo-600: oklch(0.511 0.262 276.966);
828
+ --color-indigo-700: oklch(0.457 0.24 277.023);
829
+ --color-indigo-800: oklch(0.398 0.195 277.366);
830
+ --color-indigo-900: oklch(0.359 0.144 278.697);
831
+ --color-indigo-950: oklch(0.257 0.09 281.288);
832
+ --color-violet-50: oklch(0.969 0.016 293.756);
833
+ --color-violet-100: oklch(0.943 0.029 294.588);
834
+ --color-violet-200: oklch(0.894 0.057 293.283);
835
+ --color-violet-300: oklch(0.811 0.111 293.571);
836
+ --color-violet-400: oklch(0.702 0.183 293.541);
837
+ --color-violet-500: oklch(0.606 0.25 292.717);
838
+ --color-violet-600: oklch(0.541 0.281 293.009);
839
+ --color-violet-700: oklch(0.491 0.27 292.581);
840
+ --color-violet-800: oklch(0.432 0.232 292.759);
841
+ --color-violet-900: oklch(0.38 0.189 293.745);
842
+ --color-violet-950: oklch(0.283 0.141 291.089);
843
+ --color-purple-50: oklch(0.977 0.014 308.299);
844
+ --color-purple-100: oklch(0.946 0.033 307.174);
845
+ --color-purple-200: oklch(0.902 0.063 306.703);
846
+ --color-purple-300: oklch(0.827 0.119 306.383);
847
+ --color-purple-400: oklch(0.714 0.203 305.504);
848
+ --color-purple-500: oklch(0.627 0.265 303.9);
849
+ --color-purple-600: oklch(0.558 0.288 302.321);
850
+ --color-purple-700: oklch(0.496 0.265 301.924);
851
+ --color-purple-800: oklch(0.438 0.218 303.724);
852
+ --color-purple-900: oklch(0.381 0.176 304.987);
853
+ --color-purple-950: oklch(0.291 0.149 302.717);
854
+ --color-fuchsia-50: oklch(0.977 0.017 320.058);
855
+ --color-fuchsia-100: oklch(0.952 0.037 318.852);
856
+ --color-fuchsia-200: oklch(0.903 0.076 319.62);
857
+ --color-fuchsia-300: oklch(0.833 0.145 321.434);
858
+ --color-fuchsia-400: oklch(0.74 0.238 322.16);
859
+ --color-fuchsia-500: oklch(0.667 0.295 322.15);
860
+ --color-fuchsia-600: oklch(0.591 0.293 322.896);
861
+ --color-fuchsia-700: oklch(0.518 0.253 323.949);
862
+ --color-fuchsia-800: oklch(0.452 0.211 324.591);
863
+ --color-fuchsia-900: oklch(0.401 0.17 325.612);
864
+ --color-fuchsia-950: oklch(0.293 0.136 325.661);
865
+ --color-pink-50: oklch(0.971 0.014 343.198);
866
+ --color-pink-100: oklch(0.948 0.028 342.258);
867
+ --color-pink-200: oklch(0.899 0.061 343.231);
868
+ --color-pink-300: oklch(0.823 0.12 346.018);
869
+ --color-pink-400: oklch(0.718 0.202 349.761);
870
+ --color-pink-500: oklch(0.656 0.241 354.308);
871
+ --color-pink-600: oklch(0.592 0.249 0.584);
872
+ --color-pink-700: oklch(0.525 0.223 3.958);
873
+ --color-pink-800: oklch(0.459 0.187 3.815);
874
+ --color-pink-900: oklch(0.408 0.153 2.432);
875
+ --color-pink-950: oklch(0.284 0.109 3.907);
876
+ --color-rose-50: oklch(0.969 0.015 12.422);
877
+ --color-rose-100: oklch(0.941 0.03 12.58);
878
+ --color-rose-200: oklch(0.892 0.058 10.001);
879
+ --color-rose-300: oklch(0.81 0.117 11.638);
880
+ --color-rose-400: oklch(0.712 0.194 13.428);
881
+ --color-rose-500: oklch(0.645 0.246 16.439);
882
+ --color-rose-600: oklch(0.586 0.253 17.585);
883
+ --color-rose-700: oklch(0.514 0.222 16.935);
884
+ --color-rose-800: oklch(0.455 0.188 13.697);
885
+ --color-rose-900: oklch(0.41 0.159 10.272);
886
+ --color-rose-950: oklch(0.271 0.105 12.094);
887
+ --color-slate-50: oklch(0.984 0.003 247.858);
888
+ --color-slate-100: oklch(0.968 0.007 247.896);
889
+ --color-slate-200: oklch(0.929 0.013 255.508);
890
+ --color-slate-300: oklch(0.869 0.022 252.894);
891
+ --color-slate-400: oklch(0.704 0.04 256.788);
892
+ --color-slate-500: oklch(0.554 0.046 257.417);
893
+ --color-slate-600: oklch(0.446 0.043 257.281);
894
+ --color-slate-700: oklch(0.372 0.044 257.287);
895
+ --color-slate-800: oklch(0.279 0.041 260.031);
896
+ --color-slate-900: oklch(0.208 0.042 265.755);
897
+ --color-slate-950: oklch(0.129 0.042 264.695);
898
+ --color-gray-50: oklch(0.985 0.002 247.839);
899
+ --color-gray-100: oklch(0.967 0.003 264.542);
900
+ --color-gray-200: oklch(0.928 0.006 264.531);
901
+ --color-gray-300: oklch(0.872 0.01 258.338);
902
+ --color-gray-400: oklch(0.707 0.022 261.325);
903
+ --color-gray-500: oklch(0.551 0.027 264.364);
904
+ --color-gray-600: oklch(0.446 0.03 256.802);
905
+ --color-gray-700: oklch(0.373 0.034 259.733);
906
+ --color-gray-800: oklch(0.278 0.033 256.848);
907
+ --color-gray-900: oklch(0.21 0.034 264.665);
908
+ --color-gray-950: oklch(0.13 0.028 261.692);
909
+ --color-zinc-50: oklch(0.985 0 0);
910
+ --color-zinc-100: oklch(0.967 0.001 286.375);
911
+ --color-zinc-200: oklch(0.92 0.004 286.32);
912
+ --color-zinc-300: oklch(0.871 0.006 286.286);
913
+ --color-zinc-400: oklch(0.705 0.015 286.067);
914
+ --color-zinc-500: oklch(0.552 0.016 285.938);
915
+ --color-zinc-600: oklch(0.442 0.017 285.786);
916
+ --color-zinc-700: oklch(0.37 0.013 285.805);
917
+ --color-zinc-800: oklch(0.274 0.006 286.033);
918
+ --color-zinc-900: oklch(0.21 0.006 285.885);
919
+ --color-zinc-950: oklch(0.141 0.005 285.823);
920
+ --color-neutral-50: oklch(0.985 0 0);
921
+ --color-neutral-100: oklch(0.97 0 0);
922
+ --color-neutral-200: oklch(0.922 0 0);
923
+ --color-neutral-300: oklch(0.87 0 0);
924
+ --color-neutral-400: oklch(0.708 0 0);
925
+ --color-neutral-500: oklch(0.556 0 0);
926
+ --color-neutral-600: oklch(0.439 0 0);
927
+ --color-neutral-700: oklch(0.371 0 0);
928
+ --color-neutral-800: oklch(0.269 0 0);
929
+ --color-neutral-900: oklch(0.205 0 0);
930
+ --color-neutral-950: oklch(0.145 0 0);
931
+ --color-stone-50: oklch(0.985 0.001 106.423);
932
+ --color-stone-100: oklch(0.97 0.001 106.424);
933
+ --color-stone-200: oklch(0.923 0.003 48.717);
934
+ --color-stone-300: oklch(0.869 0.005 56.366);
935
+ --color-stone-400: oklch(0.709 0.01 56.259);
936
+ --color-stone-500: oklch(0.553 0.013 58.071);
937
+ --color-stone-600: oklch(0.444 0.011 73.639);
938
+ --color-stone-700: oklch(0.374 0.01 67.558);
939
+ --color-stone-800: oklch(0.268 0.007 34.298);
940
+ --color-stone-900: oklch(0.216 0.006 56.043);
941
+ --color-stone-950: oklch(0.147 0.004 49.25);
942
+ --color-black: #000;
943
+ --color-white: #fff;
944
+ `, Jt = Gt(Zt), ct = {
945
+ borderRadius: {
946
+ 0: "rounded-none",
947
+ "0px": "rounded-none",
948
+ "1px": "rounded-sm",
949
+ "2px": "rounded-sm",
950
+ "3px": "rounded",
951
+ "4px": "rounded",
952
+ "5px": "rounded-md",
953
+ "6px": "rounded-md",
954
+ "7px": "rounded-lg",
955
+ "8px": "rounded-lg",
956
+ "9px": "rounded-lg",
957
+ "10px": "rounded-lg",
958
+ "11px": "rounded-xl",
959
+ "12px": "rounded-xl",
960
+ "14px": "rounded-2xl",
961
+ "16px": "rounded-2xl",
962
+ "20px": "rounded-3xl",
963
+ "50%": "rounded-full",
964
+ "9999px": "rounded-full"
965
+ },
966
+ fontSize: {
967
+ "0.75rem": "text-xs",
968
+ "0.875rem": "text-sm",
969
+ "1rem": "text-base",
970
+ "1.125rem": "text-lg",
971
+ "1.25rem": "text-xl",
972
+ "1.5rem": "text-2xl",
973
+ "1.875rem": "text-3xl",
974
+ "2.25rem": "text-4xl",
975
+ "3rem": "text-5xl",
976
+ "3.75rem": "text-6xl",
977
+ "4.5rem": "text-7xl",
978
+ "6rem": "text-8xl",
979
+ "8rem": "text-9xl"
980
+ },
981
+ fontWeight: {
982
+ 100: "font-thin",
983
+ 200: "font-extralight",
984
+ 300: "font-light",
985
+ 400: "font-normal",
986
+ 500: "font-medium",
987
+ 600: "font-semibold",
988
+ 700: "font-bold",
989
+ 800: "font-extrabold",
990
+ 900: "font-black"
991
+ },
992
+ fontFamily: {
993
+ "ui-serif": "font-serif",
994
+ "ui-monospace": "font-mono",
995
+ "ui-sans-serif": "font-sans",
996
+ default: "font-sans"
997
+ },
998
+ textAlign: {
999
+ left: "text-left",
1000
+ center: "text-center",
1001
+ right: "text-right",
1002
+ justify: "text-justify"
1003
+ },
1004
+ textDecoration: {
1005
+ underline: "underline",
1006
+ overline: "overline",
1007
+ "line-through": "line-through",
1008
+ none: "no-underline"
1009
+ },
1010
+ fontVariantNumeric: {
1011
+ "tabular-nums": "tabular-nums",
1012
+ "oldstyle-nums": "oldstyle-nums",
1013
+ "lining-nums": "lining-nums",
1014
+ "proportional-nums": "proportional-nums",
1015
+ "diagonal-fractions": "diagonal-fractions",
1016
+ "stacked-fractions": "stacked-fractions",
1017
+ ordinal: "ordinal",
1018
+ "slashed-zero": "slashed-zero",
1019
+ normal: "normal-nums"
1020
+ },
1021
+ fontStyle: {
1022
+ normal: "normal",
1023
+ italic: "italic",
1024
+ oblique: "oblique"
1025
+ },
1026
+ display: {
1027
+ block: "block",
1028
+ flex: "flex",
1029
+ "inline-flex": "inline-flex",
1030
+ grid: "grid",
1031
+ hidden: "hidden",
1032
+ none: "hidden"
1033
+ },
1034
+ position: {
1035
+ static: "static",
1036
+ relative: "relative",
1037
+ absolute: "absolute",
1038
+ fixed: "fixed",
1039
+ sticky: "sticky"
1040
+ }
1041
+ }, Qt = (r, t) => ({
1042
+ // 背景色
1043
+ backgroundColor: (e) => e.backgroundColor ? [r.background[e.backgroundColor.toLowerCase()] || `bg-[${e.backgroundColor}]`] : [],
1044
+ // 文字色
1045
+ color: (e) => e.color ? [r.text[e.color.toLowerCase()] || `text-[${e.color}]`] : [],
1046
+ // 圆角
1047
+ borderRadius: (e) => {
1048
+ if (!e.borderRadius)
1049
+ return [];
1050
+ const s = ct.borderRadius[e.borderRadius] || C("rounded", e.borderRadius);
1051
+ return s ? [s] : [];
1052
+ },
1053
+ // 外边距
1054
+ margin: (e) => {
1055
+ const s = [];
1056
+ if (e.margin !== void 0) {
1057
+ const i = C("m", e.margin);
1058
+ return i ? [i] : [];
1059
+ }
1060
+ return [
1061
+ { prop: e.marginTop, dir: "mt" },
1062
+ { prop: e.marginRight, dir: "mr" },
1063
+ { prop: e.marginBottom, dir: "mb" },
1064
+ { prop: e.marginLeft, dir: "ml" },
1065
+ { prop: e.marginX, dir: "mx" },
1066
+ { prop: e.marginY, dir: "my" }
1067
+ ].forEach(({ prop: i, dir: n }) => {
1068
+ if (i !== void 0) {
1069
+ const a = C(n, i);
1070
+ a && s.push(a);
1071
+ }
1072
+ }), s;
1073
+ },
1074
+ // 内边距
1075
+ padding: (e) => {
1076
+ const s = [];
1077
+ if (e.padding !== void 0) {
1078
+ const i = C("p", e.padding);
1079
+ return i ? [i] : [];
1080
+ }
1081
+ return [
1082
+ { prop: e.paddingTop, dir: "pt" },
1083
+ { prop: e.paddingRight, dir: "pr" },
1084
+ { prop: e.paddingBottom, dir: "pb" },
1085
+ { prop: e.paddingLeft, dir: "pl" },
1086
+ { prop: e.paddingX, dir: "px" },
1087
+ { prop: e.paddingY, dir: "py" }
1088
+ ].forEach(({ prop: i, dir: n }) => {
1089
+ if (i !== void 0) {
1090
+ const a = C(n, i);
1091
+ a && s.push(a);
1092
+ }
1093
+ }), s;
1094
+ },
1095
+ // 字体
1096
+ font: (e) => {
1097
+ const s = [];
1098
+ if (e.fontSize && s.push(t.fontSize[e.fontSize.toString()] || `text-[${e.fontSize}]`), e.fontWeight) {
1099
+ const o = t.fontWeight[e.fontWeight.toString()];
1100
+ o && s.push(o);
1101
+ }
1102
+ if (e.textAlign) {
1103
+ const o = t.textAlign[e.textAlign];
1104
+ o && s.push(o);
1105
+ }
1106
+ if (e.fontFamily) {
1107
+ const o = t.fontFamily[e.fontFamily];
1108
+ o && s.push(o);
1109
+ }
1110
+ if (e.textDecoration) {
1111
+ const o = t.textDecoration[e.textDecoration];
1112
+ o && s.push(o);
1113
+ }
1114
+ if (e.fontVariantNumeric) {
1115
+ const o = t.fontVariantNumeric[e.fontVariantNumeric];
1116
+ o && s.push(o);
1117
+ }
1118
+ if (e.fontStyle) {
1119
+ const o = t.fontStyle[e.fontStyle];
1120
+ o && s.push(o);
1121
+ }
1122
+ return s;
1123
+ },
1124
+ // 尺寸
1125
+ size: (e) => {
1126
+ const s = [];
1127
+ if (e.width) {
1128
+ const o = e.width.toString();
1129
+ s.push(`w-[${o}]`);
1130
+ }
1131
+ if (e.height) {
1132
+ const o = e.height.toString();
1133
+ s.push(`h-[${o}]`);
1134
+ }
1135
+ return s;
1136
+ },
1137
+ // 布局
1138
+ layout: (e) => {
1139
+ const s = [];
1140
+ if (e.display) {
1141
+ const o = t.display[e.display];
1142
+ o && s.push(o);
1143
+ }
1144
+ if (e.flexDirection) {
1145
+ const i = {
1146
+ row: "flex-row",
1147
+ column: "flex-col",
1148
+ "row-reverse": "flex-row-reverse",
1149
+ "column-reverse": "flex-col-reverse"
1150
+ }[e.flexDirection];
1151
+ i && s.push(i);
1152
+ }
1153
+ if (e.justifyContent) {
1154
+ const i = {
1155
+ "flex-start": "justify-start",
1156
+ "flex-end": "justify-end",
1157
+ center: "justify-center",
1158
+ "space-between": "justify-between",
1159
+ "space-around": "justify-around",
1160
+ "space-evenly": "justify-evenly"
1161
+ }[e.justifyContent];
1162
+ i && s.push(i);
1163
+ }
1164
+ if (e.alignItems) {
1165
+ const i = {
1166
+ "flex-start": "items-start",
1167
+ "flex-end": "items-end",
1168
+ center: "items-center",
1169
+ baseline: "items-baseline",
1170
+ stretch: "items-stretch"
1171
+ }[e.alignItems];
1172
+ i && s.push(i);
1173
+ }
1174
+ if (e.gap) {
1175
+ const o = C("gap", e.gap);
1176
+ o && s.push(o);
1177
+ }
1178
+ return s;
1179
+ },
1180
+ // 定位
1181
+ position: (e) => e.position ? [t.position[e.position] || ""].filter(Boolean) : [],
1182
+ // 透明度
1183
+ opacity: (e) => {
1184
+ if (e.opacity === void 0)
1185
+ return [];
1186
+ const s = typeof e.opacity == "string" ? parseFloat(e.opacity) : e.opacity;
1187
+ return [`opacity-${{
1188
+ 0: "0",
1189
+ 0.25: "25",
1190
+ 0.5: "50",
1191
+ 0.75: "75",
1192
+ 1: "100"
1193
+ }[s] || Math.round(s * 100)}`];
1194
+ },
1195
+ // 自定义类名
1196
+ className: (e) => e.className ? [e.className] : []
1197
+ }), te = {
1198
+ backgroundColor: "backgroundColor",
1199
+ color: "color",
1200
+ borderRadius: "borderRadius",
1201
+ margin: "margin",
1202
+ marginTop: "margin",
1203
+ marginRight: "margin",
1204
+ marginBottom: "margin",
1205
+ marginLeft: "margin",
1206
+ marginX: "margin",
1207
+ marginY: "margin",
1208
+ padding: "padding",
1209
+ paddingTop: "padding",
1210
+ paddingRight: "padding",
1211
+ paddingBottom: "padding",
1212
+ paddingLeft: "padding",
1213
+ paddingX: "padding",
1214
+ paddingY: "padding",
1215
+ fontSize: "font",
1216
+ fontWeight: "font",
1217
+ textAlign: "font",
1218
+ textDecoration: "font",
1219
+ fontVariantNumeric: "font",
1220
+ fontStyle: "font",
1221
+ width: "size",
1222
+ height: "size",
1223
+ display: "layout",
1224
+ flexDirection: "layout",
1225
+ justifyContent: "layout",
1226
+ alignItems: "layout",
1227
+ gap: "layout",
1228
+ position: "position",
1229
+ opacity: "opacity",
1230
+ className: "className"
1231
+ }, ee = (r, t) => {
1232
+ const e = (t == null ? void 0 : t.colorMaps) || Jt, s = (t == null ? void 0 : t.styleMaps) || ct, o = Qt(e, s), i = [], n = /* @__PURE__ */ new Set();
1233
+ return Object.keys(r).forEach((a) => {
1234
+ const l = te[a];
1235
+ if (l && !n.has(l)) {
1236
+ const h = o[l];
1237
+ if (h) {
1238
+ const f = h(r);
1239
+ i.push(...f), n.add(l);
1240
+ }
1241
+ }
1242
+ }), i.filter(Boolean).join(" ");
1243
+ };
1244
+ function se(r) {
1245
+ const t = {};
1246
+ return r.forEach((e, s) => {
1247
+ t[s] = e.value;
1248
+ }), t;
1249
+ }
1250
+ function re({ animatedProps: r, animationConfig: t, children: e }) {
1251
+ const [s, o] = q(
1252
+ () => se(r)
1253
+ );
1254
+ j(() => {
1255
+ const l = [];
1256
+ return r.forEach((h, f) => {
1257
+ const d = (m) => {
1258
+ o((p) => ({
1259
+ ...p,
1260
+ [f]: m
1261
+ }));
1262
+ };
1263
+ l.push(h.subscribe(d)), d(h.value);
1264
+ }), () => {
1265
+ l.forEach((h) => h());
1266
+ };
1267
+ }, [r]);
1268
+ const i = [];
1269
+ s.translateX !== void 0 && i.push(`translateX(${s.translateX}px)`), s.translateY !== void 0 && i.push(`translateY(${s.translateY}px)`), s.scale !== void 0 && i.push(`scale(${s.scale})`), s.rotate !== void 0 && i.push(`rotate(${s.rotate}deg)`);
1270
+ const n = {};
1271
+ if (i.length > 0 && (n.transform = i.join(" ")), t) {
1272
+ const { duration: l = 300, curve: h = "easeOut", stiffness: f, damping: d } = t, m = N(h, { stiffness: f, damping: d });
1273
+ n.transition = `transform ${l}ms ${m}`;
1274
+ }
1275
+ const a = {
1276
+ ...e.props.style,
1277
+ ...n
1278
+ };
1279
+ return Z(e, { style: a });
1280
+ }
1281
+ class _ {
1282
+ constructor(t, e, s, o = !1) {
1283
+ c(this, "baseClassName");
1284
+ c(this, "pseudoState");
1285
+ c(this, "parentBuilder");
1286
+ c(this, "isGroup");
1287
+ c(this, "transitionDuration", 200);
1288
+ c(this, "transitionEasing", "ease-in-out");
1289
+ c(this, "transitionDelay", 0);
1290
+ c(this, "transitionProperties", ["all"]);
1291
+ c(this, "transforms", /* @__PURE__ */ new Map());
1292
+ this.baseClassName = t, this.pseudoState = e, this.parentBuilder = s, this.isGroup = o;
1293
+ }
1294
+ bg(t) {
1295
+ return this.set("background-color", t);
1296
+ }
1297
+ color(t) {
1298
+ return this.set("color", t);
1299
+ }
1300
+ text(t) {
1301
+ return this.color(t);
1302
+ }
1303
+ opacity(t) {
1304
+ return this.set("opacity", String(t));
1305
+ }
1306
+ borderColor(t) {
1307
+ return this.set("border-color", t);
1308
+ }
1309
+ transform(t) {
1310
+ return this.transforms.set("raw", t), this.flushTransform();
1311
+ }
1312
+ scale(t) {
1313
+ return this.transforms.set("scale", `scale(${t})`), this.flushTransform();
1314
+ }
1315
+ translateX(t) {
1316
+ const e = typeof t == "number" ? `${t}px` : t;
1317
+ return this.transforms.set("translateX", `translateX(${e})`), this.flushTransform();
1318
+ }
1319
+ translateY(t) {
1320
+ const e = typeof t == "number" ? `${t}px` : t;
1321
+ return this.transforms.set("translateY", `translateY(${e})`), this.flushTransform();
1322
+ }
1323
+ rotate(t) {
1324
+ return this.transforms.set("rotate", `rotate(${t}deg)`), this.flushTransform();
1325
+ }
1326
+ shadow(t) {
1327
+ return this.set("box-shadow", t);
1328
+ }
1329
+ css(t, e) {
1330
+ return this.set(t, e);
1331
+ }
1332
+ transition(t, e, s, o) {
1333
+ if (typeof t == "string" && e === void 0)
1334
+ return this.set("transition", t);
1335
+ const i = Array.isArray(t) ? t.join(", ") : t, n = `${e || this.transitionDuration}ms`, a = N(s || this.transitionEasing), l = o ? `${o}ms` : "0ms";
1336
+ return this.set("transition", `${i} ${n} ${a} ${l}`);
1337
+ }
1338
+ duration(t) {
1339
+ return this.transitionDuration = t, this.applyTransition(), this;
1340
+ }
1341
+ easing(t) {
1342
+ return this.transitionEasing = N(t), this.applyTransition(), this;
1343
+ }
1344
+ ease(t) {
1345
+ return this.easing(t);
1346
+ }
1347
+ delay(t) {
1348
+ return this.transitionDelay = t, this.applyTransition(), this;
1349
+ }
1350
+ properties(t) {
1351
+ return this.transitionProperties = t, this.applyTransition(), this;
1352
+ }
1353
+ applyTransition() {
1354
+ const t = this.transitionProperties.join(", "), e = `${this.transitionDuration}ms`, s = this.transitionEasing, o = this.transitionDelay > 0 ? `${this.transitionDelay}ms` : "0ms";
1355
+ this.set("transition", `${t} ${e} ${s} ${o}`);
1356
+ }
1357
+ flushTransform() {
1358
+ return this.set("transform", [...this.transforms.values()].join(" "));
1359
+ }
1360
+ set(t, e) {
1361
+ return this.isGroup ? u.registerGroupPseudo(this.baseClassName, this.pseudoState, t, e) : u.registerPseudo(this.baseClassName, this.pseudoState, t, e), this;
1362
+ }
1363
+ end() {
1364
+ return this.parentBuilder;
1365
+ }
1366
+ }
1367
+ function lt(r) {
1368
+ return typeof window > "u" ? () => {
1369
+ } : (window.addEventListener("resize", r), () => window.removeEventListener("resize", r));
1370
+ }
1371
+ function ht() {
1372
+ return typeof window > "u" ? 1024 : window.innerWidth;
1373
+ }
1374
+ function oe({ responsive: r, children: t }) {
1375
+ const e = I(lt, ht, () => 1024), s = Vt(t.props.style ?? {}, r, e);
1376
+ return Z(t, { style: s });
1377
+ }
1378
+ function Ce() {
1379
+ return I(lt, ht, () => 1024);
1380
+ }
1381
+ let G = 0;
1382
+ function ut(r) {
1383
+ return G += 1, `${r}-${G}`;
1384
+ }
1385
+ function Ee(r, t) {
1386
+ if (typeof document > "u") return;
1387
+ const e = typeof r == "string" ? document.querySelector(r) : r;
1388
+ e && e.scrollIntoView({
1389
+ behavior: (t == null ? void 0 : t.behavior) ?? "smooth",
1390
+ block: (t == null ? void 0 : t.block) ?? "start"
1391
+ });
1392
+ }
1393
+ function Me(r) {
1394
+ const t = typeof document < "u" ? document : void 0, e = t == null ? void 0 : t.startViewTransition;
1395
+ if (typeof e == "function") {
1396
+ e.call(t, r);
1397
+ return;
1398
+ }
1399
+ r();
1400
+ }
1401
+ function ie() {
1402
+ return typeof CSS > "u" || typeof CSS.supports != "function" ? !1 : CSS.supports("animation-timeline", "view()");
1403
+ }
1404
+ function ne() {
1405
+ return typeof CSS > "u" || typeof CSS.supports != "function" ? !1 : CSS.supports("animation-timeline", "scroll()");
1406
+ }
1407
+ function ae({
1408
+ preset: r = "fadeUp",
1409
+ once: t = !0,
1410
+ rootMargin: e = "0px 0px -8% 0px",
1411
+ threshold: s = 0.12,
1412
+ forceMotion: o = !1,
1413
+ preferTimeline: i = !1,
1414
+ children: n
1415
+ }) {
1416
+ const a = w(null);
1417
+ j(() => {
1418
+ x();
1419
+ const h = a.current;
1420
+ if (!h) return;
1421
+ if (i && ie()) {
1422
+ h.classList.add("fibo-inview");
1423
+ return;
1424
+ }
1425
+ if (typeof IntersectionObserver > "u") {
1426
+ h.classList.add("fibo-inview");
1427
+ return;
1428
+ }
1429
+ const f = new IntersectionObserver(
1430
+ (d) => {
1431
+ for (const m of d)
1432
+ m.isIntersecting ? (m.target.classList.add("fibo-inview"), t && f.unobserve(m.target)) : t || m.target.classList.remove("fibo-inview");
1433
+ },
1434
+ { rootMargin: e, threshold: s }
1435
+ );
1436
+ return f.observe(h), () => f.disconnect();
1437
+ }, [t, e, s, i]);
1438
+ const l = [
1439
+ "fibo-reveal",
1440
+ `fibo-reveal-${r}`,
1441
+ o ? "fibo-motion-force" : ""
1442
+ ].filter(Boolean).join(" ");
1443
+ return g.createElement("div", { ref: a, className: l, "data-fibo-reveal": r }, n);
1444
+ }
1445
+ function ce({ children: r }) {
1446
+ const t = w(null);
1447
+ return j(() => {
1448
+ if (x(), ne()) return;
1449
+ const e = () => {
1450
+ var i, n;
1451
+ return ((i = t.current) == null ? void 0 : i.querySelector(".fibo-scroll-progress")) ?? ((n = t.current) == null ? void 0 : n.firstElementChild);
1452
+ }, s = () => {
1453
+ const o = e();
1454
+ if (!o) return;
1455
+ const i = document.documentElement.scrollHeight - window.innerHeight, n = i > 0 ? Math.min(1, Math.max(0, window.scrollY / i)) : 0;
1456
+ o.style.setProperty("--fibo-progress", String(n));
1457
+ };
1458
+ return s(), window.addEventListener("scroll", s, { passive: !0 }), window.addEventListener("resize", s), () => {
1459
+ window.removeEventListener("scroll", s), window.removeEventListener("resize", s);
1460
+ };
1461
+ }, []), g.createElement(
1462
+ "div",
1463
+ { ref: t, "data-fibo-scroll-progress": "1", style: { display: "contents" } },
1464
+ r
1465
+ );
1466
+ }
1467
+ const ft = 64, le = `${ft}px`;
1468
+ class Te {
1469
+ constructor() {
1470
+ /** @internal Extra DOM props forwarded to the host element. */
1471
+ c(this, "_props", {});
1472
+ c(this, "_style", {});
1473
+ c(this, "_cssStyles", {});
1474
+ c(this, "_classNames", []);
1475
+ c(this, "_children", []);
1476
+ c(this, "_responsive");
1477
+ c(this, "_theme");
1478
+ c(this, "_state", /* @__PURE__ */ new Map());
1479
+ c(this, "_providers", /* @__PURE__ */ new Map());
1480
+ c(this, "_observers", /* @__PURE__ */ new Set());
1481
+ c(this, "_signals", /* @__PURE__ */ new Set());
1482
+ c(this, "_isObserver", !1);
1483
+ c(this, "_gesture");
1484
+ c(this, "_animationConfig");
1485
+ c(this, "_animatedProps", /* @__PURE__ */ new Map());
1486
+ c(this, "_transforms", []);
1487
+ c(this, "_pseudoStateClassName");
1488
+ c(this, "_transitionClass");
1489
+ c(this, "_motionClass");
1490
+ c(this, "_staggerMs");
1491
+ c(this, "_reveal");
1492
+ c(this, "_scrollProgress", !1);
1493
+ c(this, "_viewTransition");
1494
+ c(this, "_reducedMotion", "reduce");
1495
+ c(this, "_usesCssMotion", !1);
1496
+ c(this, "_explicitScrollMargin", !1);
1497
+ /** Shrink-wrap: skip the default `w-full` / `self-stretch` on Row and Column. */
1498
+ c(this, "_hug", !1);
1499
+ // Transition properties
1500
+ c(this, "_transitionDuration", 200);
1501
+ // ms
1502
+ c(this, "_transitionEasing", "ease-in-out");
1503
+ c(this, "_transitionDelay", 0);
1504
+ // ms
1505
+ c(this, "_transitionProperties", ["all"]);
1506
+ c(this, "_childFunction");
1507
+ }
1508
+ hug() {
1509
+ return this._hug = !0, this;
1510
+ }
1511
+ isHug() {
1512
+ return this._hug;
1513
+ }
1514
+ id(t) {
1515
+ return this._props.id = t, this;
1516
+ }
1517
+ /**
1518
+ * Scroll target. Same as `.id()`, plus `scroll-margin-top` so the section
1519
+ * is not hidden under a sticky header. Pair with `scrollTo('#name')`.
1520
+ */
1521
+ anchor(t) {
1522
+ return this.id(t), this._explicitScrollMargin || this._classNames.push(
1523
+ u.register("scroll-margin-top", "var(--fibo-sticky-offset, 0px)")
1524
+ ), this;
1525
+ }
1526
+ /**
1527
+ * Explicit `scroll-margin-top` on this node (overrides the sticky CSS variable
1528
+ * that `.anchor()` applies).
1529
+ */
1530
+ scrollMargin(t) {
1531
+ this._explicitScrollMargin = !0;
1532
+ const e = typeof t == "number" ? `${t}px` : t;
1533
+ return this._classNames.push(u.register("scroll-margin-top", e)), this;
1534
+ }
1535
+ /**
1536
+ * React list key. After this is called, React reads the key as a string.
1537
+ * Builders are valid elements — you do not need `.build()`.
1538
+ */
1539
+ key(t) {
1540
+ return this._props.key = t, this;
1541
+ }
1542
+ paddingHorizontal(t) {
1543
+ const e = typeof t == "number" ? `${t}px` : t, s = u.register("padding-left", e), o = u.register("padding-right", e);
1544
+ return this._classNames.push(s, o), this;
1545
+ }
1546
+ paddingVertical(t) {
1547
+ const e = typeof t == "number" ? `${t}px` : t, s = u.register("padding-top", e), o = u.register("padding-bottom", e);
1548
+ return this._classNames.push(s, o), this;
1549
+ }
1550
+ marginHorizontal(t) {
1551
+ const e = typeof t == "number" ? `${t}px` : t, s = u.register("margin-left", e), o = u.register("margin-right", e);
1552
+ return this._classNames.push(s, o), this;
1553
+ }
1554
+ marginVertical(t) {
1555
+ const e = typeof t == "number" ? `${t}px` : t, s = u.register("margin-top", e), o = u.register("margin-bottom", e);
1556
+ return this._classNames.push(s, o), this;
1557
+ }
1558
+ flexDirection(t) {
1559
+ return this._classNames.push(`flex-${t}`), this;
1560
+ }
1561
+ alignItems(t) {
1562
+ return this._classNames.push(`items-${t}`), this;
1563
+ }
1564
+ justifyContent(t) {
1565
+ return this._classNames.push(`justify-${t}`), this;
1566
+ }
1567
+ flex(t) {
1568
+ if (this._classNames.push("flex"), t !== void 0)
1569
+ if (typeof t == "number") {
1570
+ const e = u.register("flex", String(t));
1571
+ this._classNames.push(e);
1572
+ } else typeof t == "string" && this._classNames.push(`flex-${t}`);
1573
+ return this;
1574
+ }
1575
+ grid() {
1576
+ return this._classNames.push("grid"), this;
1577
+ }
1578
+ inlineFlex() {
1579
+ return this._classNames.push("inline-flex"), this;
1580
+ }
1581
+ inlineGrid() {
1582
+ return this._classNames.push("inline-grid"), this;
1583
+ }
1584
+ block() {
1585
+ return this._classNames.push("block"), this;
1586
+ }
1587
+ inlineBlock() {
1588
+ return this._classNames.push("inline-block"), this;
1589
+ }
1590
+ hidden() {
1591
+ return this._classNames.push("hidden"), this;
1592
+ }
1593
+ center() {
1594
+ return this._classNames.push("flex", "items-center", "justify-center"), this;
1595
+ }
1596
+ centerX() {
1597
+ return this._classNames.push("flex", "justify-center"), this;
1598
+ }
1599
+ centerY() {
1600
+ return this._classNames.push("flex", "items-center"), this;
1601
+ }
1602
+ spaceBetween() {
1603
+ return this._classNames.push("justify-between"), this;
1604
+ }
1605
+ spaceAround() {
1606
+ return this._classNames.push("justify-around"), this;
1607
+ }
1608
+ spaceEvenly() {
1609
+ return this._classNames.push("justify-evenly"), this;
1610
+ }
1611
+ fill() {
1612
+ return this._classNames.push("w-full", "h-full"), this;
1613
+ }
1614
+ fillWidth() {
1615
+ return this._classNames.push("w-full"), this;
1616
+ }
1617
+ fillHeight() {
1618
+ return this._classNames.push("h-full"), this;
1619
+ }
1620
+ square(t) {
1621
+ const e = typeof t == "number" ? `${t}px` : t, s = u.register("width", e), o = u.register("height", e);
1622
+ return this._classNames.push(s, o), this;
1623
+ }
1624
+ circle() {
1625
+ return this._classNames.push("rounded-full"), this;
1626
+ }
1627
+ opacity(t) {
1628
+ const e = u.register("opacity", String(t));
1629
+ return this._classNames.push(e), this;
1630
+ }
1631
+ p(t) {
1632
+ const e = typeof t == "number" ? `${t}px` : t, s = u.register("padding", e);
1633
+ return this._classNames.push(s), this;
1634
+ }
1635
+ px(t) {
1636
+ return this.paddingHorizontal(t);
1637
+ }
1638
+ py(t) {
1639
+ return this.paddingVertical(t);
1640
+ }
1641
+ paddingX(t) {
1642
+ return this.paddingHorizontal(t);
1643
+ }
1644
+ paddingY(t) {
1645
+ return this.paddingVertical(t);
1646
+ }
1647
+ m(t) {
1648
+ const e = typeof t == "number" ? `${t}px` : t, s = u.register("margin", e);
1649
+ return this._classNames.push(s), this;
1650
+ }
1651
+ mx(t) {
1652
+ return this.marginHorizontal(t);
1653
+ }
1654
+ my(t) {
1655
+ return this.marginVertical(t);
1656
+ }
1657
+ marginX(t) {
1658
+ return this.marginHorizontal(t);
1659
+ }
1660
+ marginY(t) {
1661
+ return this.marginVertical(t);
1662
+ }
1663
+ bg(t) {
1664
+ const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = u.register("background-color", e);
1665
+ return this._classNames.push(s), this;
1666
+ }
1667
+ text(t) {
1668
+ const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = u.register("color", e);
1669
+ return this._classNames.push(s), this;
1670
+ }
1671
+ color(t) {
1672
+ const e = typeof t == "string" && !t.startsWith("#") && !t.startsWith("rgb") ? this.resolveSemanticColor(t) : t, s = u.register("color", e);
1673
+ return this._classNames.push(s), this;
1674
+ }
1675
+ resolveSemanticColor(t) {
1676
+ return [
1677
+ "primary",
1678
+ "on-primary",
1679
+ "primary-container",
1680
+ "on-primary-container",
1681
+ "secondary",
1682
+ "on-secondary",
1683
+ "secondary-container",
1684
+ "on-secondary-container",
1685
+ "tertiary",
1686
+ "on-tertiary",
1687
+ "tertiary-container",
1688
+ "on-tertiary-container",
1689
+ "error",
1690
+ "on-error",
1691
+ "background",
1692
+ "on-background",
1693
+ "surface",
1694
+ "on-surface",
1695
+ "surface-variant",
1696
+ "on-surface-variant",
1697
+ "outline"
1698
+ ].includes(t) ? `var(--fibo-${t})` : t;
1699
+ }
1700
+ shadow(t) {
1701
+ if (t === null || t === "none") {
1702
+ const i = u.register("box-shadow", "none");
1703
+ return this._classNames.push(i), this;
1704
+ }
1705
+ const e = {
1706
+ sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
1707
+ md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
1708
+ lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
1709
+ xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
1710
+ "2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
1711
+ card: "0 2px 8px rgba(0, 0, 0, 0.1)",
1712
+ button: "0 2px 4px rgba(0, 0, 0, 0.12)",
1713
+ modal: "0 10px 40px rgba(0, 0, 0, 0.2)",
1714
+ float: "0 8px 16px rgba(0, 0, 0, 0.15)",
1715
+ inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)"
1716
+ }, s = (i) => i.startsWith("#") || i.startsWith("rgb") || i.startsWith("hsl") || ["red", "blue", "green", "yellow", "purple", "pink", "orange", "white", "black", "gray"].some((n) => i.includes(n)), o = (i, n, a, l) => {
1717
+ let d = a || "rgba(0, 0, 0, " + (l ?? 0.1) + ")";
1718
+ if (a && a.startsWith("#") && l !== void 0) {
1719
+ const y = parseInt(a.slice(1, 3), 16), b = parseInt(a.slice(3, 5), 16), k = parseInt(a.slice(5, 7), 16);
1720
+ d = `rgba(${y}, ${b}, ${k}, ${l})`;
1721
+ }
1722
+ const p = {
1723
+ sm: "2px",
1724
+ md: "4px",
1725
+ lg: "8px",
1726
+ xl: "12px",
1727
+ "2xl": "16px"
1728
+ }[n] || "4px";
1729
+ switch (i) {
1730
+ case "top":
1731
+ return `0 -${p} ${p} -1px ${d}`;
1732
+ case "bottom":
1733
+ return `0 ${p} ${p} -1px ${d}`;
1734
+ case "left":
1735
+ return `-${p} 0 ${p} -1px ${d}`;
1736
+ case "right":
1737
+ return `${p} 0 ${p} -1px ${d}`;
1738
+ case "top-bottom":
1739
+ case "vertical":
1740
+ return `0 -${p} ${p} -1px ${d}, 0 ${p} ${p} -1px ${d}`;
1741
+ case "left-right":
1742
+ case "horizontal":
1743
+ return `-${p} 0 ${p} -1px ${d}, ${p} 0 ${p} -1px ${d}`;
1744
+ case "all":
1745
+ default:
1746
+ return e[n] || e.md;
1747
+ }
1748
+ };
1749
+ if (!t) {
1750
+ const i = u.register("box-shadow", e.md);
1751
+ return this._classNames.push(i), this;
1752
+ }
1753
+ if (typeof t == "string") {
1754
+ if (s(t)) {
1755
+ const a = o("all", "md", t), l = u.register("box-shadow", a);
1756
+ return this._classNames.push(l), this;
1757
+ }
1758
+ const i = e[t] || e.md, n = u.register("box-shadow", i);
1759
+ return this._classNames.push(n), this;
1760
+ }
1761
+ if (Array.isArray(t)) {
1762
+ const [i, n, a, l] = t;
1763
+ if (typeof i == "string" && s(i)) {
1764
+ const d = o("all", "md", i, n), m = u.register("box-shadow", d);
1765
+ return this._classNames.push(m), this;
1766
+ }
1767
+ const h = i;
1768
+ if (typeof n == "string" && s(n)) {
1769
+ const d = o(h, "md", n, a), m = u.register("box-shadow", d);
1770
+ return this._classNames.push(m), this;
1771
+ } else {
1772
+ const m = o(h, n, a, l), p = u.register("box-shadow", m);
1773
+ return this._classNames.push(p), this;
1774
+ }
1775
+ }
1776
+ return this;
1777
+ }
1778
+ responsive(t) {
1779
+ return this._responsive = t, this;
1780
+ }
1781
+ /**
1782
+ * CSS `@media` (min-width or a raw query). Compiles to a class — no resize JS.
1783
+ *
1784
+ * @example Box().padding(8).media('md', { padding: 16 }).media('(prefers-color-scheme: dark)', { backgroundColor: '#111' })
1785
+ */
1786
+ media(t, e) {
1787
+ const s = Yt(t), o = /* @__PURE__ */ new Set([
1788
+ "opacity",
1789
+ "zIndex",
1790
+ "z-index",
1791
+ "flex",
1792
+ "flexGrow",
1793
+ "flexShrink",
1794
+ "order",
1795
+ "fontWeight",
1796
+ "lineHeight"
1797
+ ]);
1798
+ for (const [i, n] of Object.entries(e)) {
1799
+ if (n == null) continue;
1800
+ const a = i.replace(/[A-Z]/g, (h) => `-${h.toLowerCase()}`), l = typeof n == "number" && !o.has(i) && !o.has(a) ? `${n}px` : String(n);
1801
+ this._classNames.push(u.registerMedia(s, a, l));
1802
+ }
1803
+ return this;
1804
+ }
1805
+ sm(t) {
1806
+ return this.media("sm", t);
1807
+ }
1808
+ md(t) {
1809
+ return this.media("md", t);
1810
+ }
1811
+ lg(t) {
1812
+ return this.media("lg", t);
1813
+ }
1814
+ xl(t) {
1815
+ return this.media("xl", t);
1816
+ }
1817
+ rounded(t) {
1818
+ if (typeof t == "number") {
1819
+ const e = u.register("border-radius", `${t}px`);
1820
+ this._classNames.push(e);
1821
+ } else if (typeof t == "string" && (t.startsWith("rounded-") || ["sm", "md", "lg", "xl", "2xl", "3xl", "full", "none"].includes(t))) {
1822
+ const e = t.startsWith("rounded-") ? t : `rounded-${t}`;
1823
+ this._classNames.push(e);
1824
+ } else {
1825
+ const e = u.register("border-radius", t);
1826
+ this._classNames.push(e);
1827
+ }
1828
+ return this;
1829
+ }
1830
+ borderRadius(t) {
1831
+ if (typeof t == "number") {
1832
+ const e = u.register("border-radius", `${t}px`);
1833
+ this._classNames.push(e);
1834
+ } else {
1835
+ const e = u.register("border-radius", t);
1836
+ this._classNames.push(e);
1837
+ }
1838
+ return this;
1839
+ }
1840
+ borderColor(t) {
1841
+ if (t.startsWith("border-"))
1842
+ this._classNames.push(t);
1843
+ else if (["red", "blue", "green", "gray", "white", "black", "transparent"].some((e) => t.includes(e)))
1844
+ this._classNames.push(`border-${t}`);
1845
+ else {
1846
+ const e = u.register("border-color", t);
1847
+ this._classNames.push(e);
1848
+ }
1849
+ return this;
1850
+ }
1851
+ width(t) {
1852
+ if (typeof t == "number") {
1853
+ const e = u.register("width", `${t}px`);
1854
+ this._classNames.push(e);
1855
+ } else if (typeof t == "string" && (t.startsWith("w-") || t === "full" || t === "screen" || t === "min" || t === "max" || t === "fit")) {
1856
+ const e = t.startsWith("w-") ? t : `w-${t}`;
1857
+ this._classNames.push(e);
1858
+ } else {
1859
+ const e = u.register("width", t);
1860
+ this._classNames.push(e);
1861
+ }
1862
+ return this;
1863
+ }
1864
+ height(t) {
1865
+ if (typeof t == "number") {
1866
+ const e = u.register("height", `${t}px`);
1867
+ this._classNames.push(e);
1868
+ } else if (typeof t == "string" && (t.startsWith("h-") || t === "full" || t === "screen" || t === "min" || t === "max" || t === "fit")) {
1869
+ const e = t.startsWith("h-") ? t : `h-${t}`;
1870
+ this._classNames.push(e);
1871
+ } else {
1872
+ const e = u.register("height", t);
1873
+ this._classNames.push(e);
1874
+ }
1875
+ return this;
1876
+ }
1877
+ gap(t) {
1878
+ if (typeof t == "number") {
1879
+ const e = u.register("gap", `${t}px`);
1880
+ this._classNames.push(e);
1881
+ } else if (typeof t == "string" && t.startsWith("gap-"))
1882
+ this._classNames.push(t);
1883
+ else {
1884
+ const e = u.register("gap", t);
1885
+ this._classNames.push(e);
1886
+ }
1887
+ return this;
1888
+ }
1889
+ clean() {
1890
+ return this._classNames.push(
1891
+ "[&_input]:outline-none",
1892
+ "[&_input]:ring-0",
1893
+ "[&_input]:border-none",
1894
+ "[&_input]:!shadow-none",
1895
+ "[&_input]:bg-transparent",
1896
+ "[&_input]:h-full",
1897
+ "[&_input]:w-full",
1898
+ "[&_input]:p-0",
1899
+ "[&_textarea]:outline-none",
1900
+ "[&_textarea]:ring-0",
1901
+ "[&_textarea]:border-none",
1902
+ "[&_textarea]:!shadow-none",
1903
+ "[&_textarea]:bg-transparent",
1904
+ "[&_textarea]:h-full",
1905
+ "[&_textarea]:w-full",
1906
+ "[&_textarea]:p-0",
1907
+ "[&_select]:outline-none",
1908
+ "[&_select]:ring-0",
1909
+ "[&_select]:border-none",
1910
+ "[&_select]:!shadow-none",
1911
+ "[&_select]:bg-transparent",
1912
+ "[&_select]:h-full",
1913
+ "[&_select]:w-full",
1914
+ "[&_select]:p-0",
1915
+ "[&_.fibo-textfield-input]:outline-none",
1916
+ "[&_.fibo-textfield-input]:ring-0",
1917
+ "[&_.fibo-textfield-input]:border-none",
1918
+ "[&_.fibo-textfield-input]:!shadow-none",
1919
+ "[&_.fibo-textfield-input]:bg-transparent",
1920
+ "[&_.fibo-textfield-input]:h-full",
1921
+ "[&_.fibo-textfield-input]:w-full",
1922
+ "[&_.fibo-textfield-input]:p-0",
1923
+ "[&_.fibo-textarea-input]:outline-none",
1924
+ "[&_.fibo-textarea-input]:ring-0",
1925
+ "[&_.fibo-textarea-input]:border-none",
1926
+ "[&_.fibo-textarea-input]:!shadow-none",
1927
+ "[&_.fibo-textarea-input]:bg-transparent",
1928
+ "[&_.fibo-textarea-input]:h-full",
1929
+ "[&_.fibo-textarea-input]:w-full",
1930
+ "[&_.fibo-textarea-input]:p-0",
1931
+ "[&>div]:h-full"
1932
+ ), this;
1933
+ }
1934
+ borderInput(t = "gray-300", e = "blue-500") {
1935
+ const s = (n) => ["red", "blue", "green", "yellow", "purple", "pink", "indigo", "gray", "orange", "teal", "cyan", "emerald", "lime", "amber", "fuchsia", "rose", "violet", "sky", "slate", "zinc", "neutral", "stone"].includes(n) ? `${n}-500` : n, o = s(t), i = s(e);
1936
+ return this._classNames.push(
1937
+ "border",
1938
+ `border-${o}`,
1939
+ "focus-within:ring-2",
1940
+ `focus-within:ring-${i}`,
1941
+ `focus-within:border-${i}`
1942
+ ), this.clean();
1943
+ }
1944
+ weight(t) {
1945
+ if (typeof t == "number") {
1946
+ const e = u.register("font-weight", String(t));
1947
+ this._classNames.push(e);
1948
+ } else {
1949
+ const e = {
1950
+ thin: "font-thin",
1951
+ extralight: "font-extralight",
1952
+ light: "font-light",
1953
+ normal: "font-normal",
1954
+ medium: "font-medium",
1955
+ semibold: "font-semibold",
1956
+ bold: "font-bold",
1957
+ extrabold: "font-extrabold",
1958
+ black: "font-black"
1959
+ };
1960
+ if (e[t])
1961
+ this._classNames.push(e[t]);
1962
+ else {
1963
+ const s = u.register("font-weight", t);
1964
+ this._classNames.push(s);
1965
+ }
1966
+ }
1967
+ return this;
1968
+ }
1969
+ onClick(t) {
1970
+ return this._props.onClick = t, this;
1971
+ }
1972
+ state(t, e) {
1973
+ return this._state.set(t, e), this;
1974
+ }
1975
+ getState(t) {
1976
+ return this._state.get(t);
1977
+ }
1978
+ setState(t, e) {
1979
+ return this._state.set(t, e), this;
1980
+ }
1981
+ provide(t, e) {
1982
+ return this._providers.set(t, e), this;
1983
+ }
1984
+ consume(t) {
1985
+ return this._providers.get(t);
1986
+ }
1987
+ observer(t) {
1988
+ return this._isObserver = !0, typeof t == "object" && t !== null ? t.key !== void 0 && this.key(t.key) : t !== void 0 && this.key(t), this;
1989
+ }
1990
+ observe(t) {
1991
+ return this._observers.add(t), this;
1992
+ }
1993
+ bindSignal(t) {
1994
+ return this._signals.add(t), this;
1995
+ }
1996
+ translateX(t) {
1997
+ return t instanceof z ? this._animatedProps.set("translateX", t) : this._transforms.push(`translateX(${t}px)`), this;
1998
+ }
1999
+ translateY(t) {
2000
+ return t instanceof z ? this._animatedProps.set("translateY", t) : this._transforms.push(`translateY(${t}px)`), this;
2001
+ }
2002
+ scale(t) {
2003
+ return t instanceof z ? this._animatedProps.set("scale", t) : this._transforms.push(`scale(${t})`), this;
2004
+ }
2005
+ rotate(t) {
2006
+ return t instanceof z ? this._animatedProps.set("rotate", t) : this._transforms.push(`rotate(${t}deg)`), this;
2007
+ }
2008
+ gesture(t) {
2009
+ return this._gesture = t, this;
2010
+ }
2011
+ animation(t) {
2012
+ return this._animationConfig = t, this;
2013
+ }
2014
+ hasStateManagement() {
2015
+ return this._state.size > 0 || this._providers.size > 0 || this._observers.size > 0 || this._signals.size > 0 || this._isObserver || this._animatedProps.size > 0;
2016
+ }
2017
+ className(t) {
2018
+ return this._classNames.push(t), this;
2019
+ }
2020
+ classNames(t) {
2021
+ return this._classNames.push(...t), this;
2022
+ }
2023
+ css(t) {
2024
+ return this._cssStyles = { ...this._cssStyles, ...t }, this;
2025
+ }
2026
+ style(t) {
2027
+ return this._style = { ...this._style, ...t }, this;
2028
+ }
2029
+ props(t) {
2030
+ return this._props = { ...this._props, ...t }, this;
2031
+ }
2032
+ transition(t, e, s, o) {
2033
+ if (typeof t == "string" && e === void 0)
2034
+ return this.replaceTransitionClass(u.register("transition", t)), this;
2035
+ const i = Array.isArray(t) ? t.join(", ") : t, n = `${e || this._transitionDuration}ms`, a = N(s || this._transitionEasing), l = o ? `${o}ms` : "0ms";
2036
+ return this.replaceTransitionClass(u.register("transition", `${i} ${n} ${a} ${l}`)), this;
2037
+ }
2038
+ /**
2039
+ * Set transition duration in milliseconds
2040
+ * Example: .duration(200) → 200ms
2041
+ */
2042
+ duration(t) {
2043
+ return this._transitionDuration = t, this._motionClass ? (this._style["--fibo-dur"] = `${t}ms`, this) : (this._applyTransition(), this);
2044
+ }
2045
+ /**
2046
+ * Set transition easing function
2047
+ * Example: .easing('ease-in-out')
2048
+ */
2049
+ easing(t) {
2050
+ return this._transitionEasing = N(t), this._motionClass ? (this._style["--fibo-ease"] = this._transitionEasing, this) : (this._applyTransition(), this);
2051
+ }
2052
+ /** Alias of `.easing()`. `'spring'` becomes CSS `linear()`. */
2053
+ ease(t) {
2054
+ return this.easing(t);
2055
+ }
2056
+ /**
2057
+ * Set transition delay in milliseconds
2058
+ * Example: .delay(100) → 100ms delay
2059
+ */
2060
+ delay(t) {
2061
+ return this._transitionDelay = t, this._motionClass ? (this._style["--fibo-delay"] = `${t}ms`, this) : (this._applyTransition(), this);
2062
+ }
2063
+ /**
2064
+ * Set which properties to transition
2065
+ * Example: .properties(['color', 'transform'])
2066
+ */
2067
+ properties(t) {
2068
+ return this._transitionProperties = t, this._applyTransition(), this;
2069
+ }
2070
+ /**
2071
+ * Apply the built transition to the element
2072
+ */
2073
+ _applyTransition() {
2074
+ const t = this._transitionProperties.join(", "), e = `${this._transitionDuration}ms`, s = this._transitionEasing, o = this._transitionDelay > 0 ? `${this._transitionDelay}ms` : "0ms";
2075
+ this.replaceTransitionClass(u.register("transition", `${t} ${e} ${s} ${o}`));
2076
+ }
2077
+ replaceTransitionClass(t) {
2078
+ this._transitionClass && (this._classNames = this._classNames.filter((e) => e !== this._transitionClass)), this._transitionClass = t, this._classNames.push(t);
2079
+ }
2080
+ animate(t, e) {
2081
+ x(), this._usesCssMotion = !0, this._motionClass && (this._classNames = this._classNames.filter((f) => f !== this._motionClass));
2082
+ const s = Ft(t), o = (s ? t.duration : e == null ? void 0 : e.duration) ?? this._transitionDuration, i = (s ? t.delay : e == null ? void 0 : e.delay) ?? this._transitionDelay;
2083
+ let n = s ? t.ease : e == null ? void 0 : e.ease;
2084
+ const a = {
2085
+ stiffness: (s ? t.stiffness : e == null ? void 0 : e.stiffness) ?? void 0,
2086
+ damping: (s ? t.damping : e == null ? void 0 : e.damping) ?? void 0,
2087
+ mass: (s ? t.mass : e == null ? void 0 : e.mass) ?? void 0
2088
+ };
2089
+ if (s) {
2090
+ const f = K(t.from), d = K(t.to), m = u.registerKeyframes(Wt(`${f}=>${d}`), f, d);
2091
+ this._motionClass = `fibo-anim ${m}`, this._props["data-fibo-anim"] = "custom";
2092
+ } else {
2093
+ const f = Ot(t);
2094
+ this._motionClass = `fibo-anim fibo-anim-${f}`, this._props["data-fibo-anim"] = f, (e == null ? void 0 : e.from) !== void 0 && (this._style["--fibo-from"] = typeof e.from == "number" ? `${e.from}px` : e.from), !n && f === "pop" && (n = "spring");
2095
+ }
2096
+ const l = N(n ?? "ease", a);
2097
+ this._classNames.push(this._motionClass);
2098
+ const h = this._style;
2099
+ return h["--fibo-dur"] = `${o}ms`, h["--fibo-ease"] = l, h["--fibo-delay"] = `${i}ms`, this._reducedMotion === "never" && !this._classNames.includes("fibo-motion-force") && this._classNames.push("fibo-motion-force"), this;
2100
+ }
2101
+ /** CSS `linear()` spring. Works on `.animate()` and `.transition()` / `.hover()`. */
2102
+ spring(t) {
2103
+ const e = it(t);
2104
+ return this._transitionEasing = e, this._motionClass ? (this._style["--fibo-ease"] = e, this) : (this._applyTransition(), this);
2105
+ }
2106
+ reducedMotion(t = "reduce") {
2107
+ return this._reducedMotion = t, t === "never" && !this._classNames.includes("fibo-motion-force") && this._classNames.push("fibo-motion-force"), this;
2108
+ }
2109
+ press(t) {
2110
+ return this.ensureInteractiveTransition(), t ? (this.active(t), this) : (this.active((e) => {
2111
+ e.scale(0.97);
2112
+ }), this);
2113
+ }
2114
+ focusVisible(t) {
2115
+ const e = this.getPseudoStateClassName(), s = new _(e, "focus-visible", this);
2116
+ return t ? (t(s), this) : s;
2117
+ }
2118
+ stagger(t) {
2119
+ return this._staggerMs = t, this._usesCssMotion = !0, this._style["--fibo-stagger"] = `${t}ms`, x(), this;
2120
+ }
2121
+ /** Scroll-reveal: IntersectionObserver toggles `.fibo-inview`. */
2122
+ reveal(t = "fadeUp") {
2123
+ return this._reveal = typeof t == "string" ? { preset: t, once: !0 } : { preset: "fadeUp", once: !0, ...t }, this._usesCssMotion = !0, x(), this;
2124
+ }
2125
+ /** Alias of `.reveal()` for scroll-triggered presets. */
2126
+ onScroll(t = "fadeIn") {
2127
+ return this.reveal(t);
2128
+ }
2129
+ /** CSS `animation-timeline: view()` / `scroll()`; IntersectionObserver reveal is the fallback. */
2130
+ scrollTimeline(t = "view") {
2131
+ return x(), this._classNames.push(t === "scroll" ? "fibo-scroll-timeline" : "fibo-view-timeline"), this._usesCssMotion = !0, t === "view" && !this._reveal && (this._reveal = { preset: "fadeUp", once: !0 }), this;
2132
+ }
2133
+ scrollProgress() {
2134
+ return x(), this._scrollProgress = !0, this._classNames.push("fibo-scroll-progress"), this._usesCssMotion = !0, this;
2135
+ }
2136
+ smoothScroll() {
2137
+ return this._classNames.push(u.register("scroll-behavior", "smooth")), this;
2138
+ }
2139
+ scrollSnap(t = "y") {
2140
+ return x(), this._classNames.push(`fibo-snap-${t}`), this;
2141
+ }
2142
+ scrollSnapAlign(t = "start") {
2143
+ return x(), this._classNames.push(`fibo-snap-${t}`), this;
2144
+ }
2145
+ sticky(t = 0) {
2146
+ if (t === !1) return this;
2147
+ this._classNames.push(u.register("position", "sticky"));
2148
+ const e = t === !0 ? "0px" : typeof t == "number" ? `${t}px` : t;
2149
+ this._classNames.push(u.register("top", e));
2150
+ const s = t === !0 || t === 0 ? le : typeof t == "number" ? `${Math.max(t, ft)}px` : t;
2151
+ return this.publishStickyOffset(s), this;
2152
+ }
2153
+ /**
2154
+ * Publish `--fibo-sticky-offset` on `:root` so `.anchor()` / `html` scroll-padding
2155
+ * clear this bar. Header uses the real bar height.
2156
+ */
2157
+ publishStickyOffset(t) {
2158
+ const e = typeof t == "number" ? `${t}px` : t;
2159
+ u.registerRoot("--fibo-sticky-offset", e), u.ensureScrollPadding();
2160
+ }
2161
+ viewTransition(t) {
2162
+ return this._viewTransition = t, this._style.viewTransitionName = t, this;
2163
+ }
2164
+ /** Default `:focus-visible` ring. Pass a callback to customize. */
2165
+ focusRing(t = "var(--fibo-primary)") {
2166
+ return this.focusVisible((e) => {
2167
+ e.css("outline", `2px solid ${t}`), e.css("outline-offset", "2px");
2168
+ }), this;
2169
+ }
2170
+ ensureInteractiveTransition() {
2171
+ this._transitionClass || this._motionClass || this.replaceTransitionClass(
2172
+ u.register(
2173
+ "transition",
2174
+ `transform ${this._transitionDuration}ms ${this._transitionEasing}, opacity ${this._transitionDuration}ms ${this._transitionEasing}`
2175
+ )
2176
+ );
2177
+ }
2178
+ theme(t) {
2179
+ return this._theme = t, this;
2180
+ }
2181
+ getPseudoStateClassName() {
2182
+ return this._pseudoStateClassName || (this._pseudoStateClassName = ut("fibo-pseudo"), this._classNames.push(this._pseudoStateClassName)), this._pseudoStateClassName;
2183
+ }
2184
+ hover(t) {
2185
+ this.ensureInteractiveTransition();
2186
+ const e = this.getPseudoStateClassName(), s = new _(e, "hover", this);
2187
+ return t ? (t(s), this) : s;
2188
+ }
2189
+ focus(t) {
2190
+ const e = this.getPseudoStateClassName(), s = new _(e, "focus", this);
2191
+ return t ? (t(s), this) : s;
2192
+ }
2193
+ active(t) {
2194
+ const e = this.getPseudoStateClassName(), s = new _(e, "active", this);
2195
+ return t ? (t(s), this) : s;
2196
+ }
2197
+ visited(t) {
2198
+ const e = this.getPseudoStateClassName(), s = new _(e, "visited", this);
2199
+ return t ? (t(s), this) : s;
2200
+ }
2201
+ disabledState(t) {
2202
+ const e = this.getPseudoStateClassName(), s = new _(e, "disabled", this);
2203
+ return t ? (t(s), this) : s;
2204
+ }
2205
+ focusWithin(t) {
2206
+ const e = this.getPseudoStateClassName(), s = new _(e, "focus-within", this);
2207
+ return t ? (t(s), this) : s;
2208
+ }
2209
+ firstChild(t) {
2210
+ const e = this.getPseudoStateClassName(), s = new _(e, "first-child", this);
2211
+ return t ? (t(s), this) : s;
2212
+ }
2213
+ lastChild(t) {
2214
+ const e = this.getPseudoStateClassName(), s = new _(e, "last-child", this);
2215
+ return t ? (t(s), this) : s;
2216
+ }
2217
+ groupHover(t) {
2218
+ const e = this.getPseudoStateClassName(), s = new _(e, "hover", this, !0);
2219
+ return t ? (t(s), this) : s;
2220
+ }
2221
+ groupFocus(t) {
2222
+ const e = this.getPseudoStateClassName(), s = new _(e, "focus", this, !0);
2223
+ return t ? (t(s), this) : s;
2224
+ }
2225
+ groupActive(t) {
2226
+ const e = this.getPseudoStateClassName(), s = new _(e, "active", this, !0);
2227
+ return t ? (t(s), this) : s;
2228
+ }
2229
+ groupFocusWithin(t) {
2230
+ const e = this.getPseudoStateClassName(), s = new _(e, "focus-within", this, !0);
2231
+ return t ? (t(s), this) : s;
2232
+ }
2233
+ group() {
2234
+ return this._classNames.push("group"), this;
2235
+ }
2236
+ children(t) {
2237
+ return typeof t == "function" ? (this._childFunction = t, this._children = []) : (this._children = H(t), this._childFunction = void 0), this;
2238
+ }
2239
+ getClassName() {
2240
+ let t;
2241
+ return Object.keys(this._cssStyles).length > 0 && (t = ee(this._cssStyles) || void 0), Ut(this._classNames, t);
2242
+ }
2243
+ getStyle() {
2244
+ let t = { ...this._style, ...this._cssStyles };
2245
+ if (this._theme) {
2246
+ const e = this._theme.colors || this._theme.colorScheme;
2247
+ if (e) {
2248
+ const s = t;
2249
+ e.primary && (s["--fibo-primary"] = e.primary), e.onPrimary && (s["--fibo-on-primary"] = e.onPrimary), e.secondary && (s["--fibo-secondary"] = e.secondary), e.onSecondary && (s["--fibo-on-secondary"] = e.onSecondary), e.background && (s["--fibo-background"] = e.background), e.onBackground && (s["--fibo-on-background"] = e.onBackground), e.surface && (s["--fibo-surface"] = e.surface), e.onSurface && (s["--fibo-on-surface"] = e.onSurface), e.error && (s["--fibo-error"] = e.error);
2250
+ }
2251
+ }
2252
+ if (this._transforms.length > 0) {
2253
+ const e = t.transform || "";
2254
+ t.transform = e ? `${e} ${this._transforms.join(" ")}` : this._transforms.join(" ");
2255
+ }
2256
+ if (this._animationConfig && this._animatedProps.size === 0) {
2257
+ const { duration: e = 300, curve: s = "easeOut", stiffness: o, damping: i } = this._animationConfig, n = N(s, { stiffness: o, damping: i });
2258
+ t.transition = `all ${e}ms ${n}`;
2259
+ }
2260
+ return t;
2261
+ }
2262
+ processChildren() {
2263
+ const t = this._childFunction ? H(this._childFunction) : this._children;
2264
+ return this._staggerMs == null ? t : t.map(
2265
+ (e, s) => g.createElement(
2266
+ "span",
2267
+ {
2268
+ key: g.isValidElement(e) && e.key != null ? e.key : `fibo-stagger-${s}`,
2269
+ className: "fibo-stagger-item",
2270
+ style: { "--fibo-i": String(s) }
2271
+ },
2272
+ e
2273
+ )
2274
+ );
2275
+ }
2276
+ getChildFunction() {
2277
+ return this._childFunction;
2278
+ }
2279
+ }
2280
+ const he = /* @__PURE__ */ new Set([
2281
+ "$$typeof",
2282
+ "type",
2283
+ "props",
2284
+ "ref",
2285
+ "_owner",
2286
+ "_store",
2287
+ "_self",
2288
+ "_source",
2289
+ "_debugStack",
2290
+ "_debugTask",
2291
+ "_debugInfo"
2292
+ ]);
2293
+ function ue(r) {
2294
+ const t = r._isObserver, e = r._signals, s = r._observers, o = r._state, i = r._providers, n = () => {
2295
+ var $;
2296
+ let d = r.build();
2297
+ const m = r._animatedProps, p = r._animationConfig;
2298
+ m && m.size > 0 && (d = g.createElement(re, {
2299
+ animatedProps: m,
2300
+ animationConfig: p,
2301
+ children: d
2302
+ }));
2303
+ const y = r._reveal;
2304
+ y && (d = g.createElement(ae, {
2305
+ preset: y.preset,
2306
+ once: y.once,
2307
+ rootMargin: y.rootMargin,
2308
+ threshold: y.threshold,
2309
+ forceMotion: r._reducedMotion === "never",
2310
+ preferTimeline: ($ = r._classNames) == null ? void 0 : $.includes("fibo-view-timeline"),
2311
+ children: d
2312
+ })), r._scrollProgress && (d = g.createElement(ce, { children: d })), r._usesCssMotion && (d = g.createElement(g.Fragment, null, g.createElement(Xt), d));
2313
+ const b = r._gesture;
2314
+ b && (d = b.wrap(d));
2315
+ const k = r._responsive;
2316
+ return k && (d = g.createElement(oe, {
2317
+ responsive: k,
2318
+ children: d
2319
+ })), d;
2320
+ }, a = typeof r.hasStateManagement == "function" ? r.hasStateManagement() : !!(t || e && e.size || s && s.size || o && o.size || i && i.size), l = t ? g.createElement(Mt, {
2321
+ key: r._props.key,
2322
+ children: n
2323
+ }) : null, h = () => l ?? n();
2324
+ let f = h();
2325
+ return a && e && e.size > 0 ? f = g.createElement(Rt, {
2326
+ key: r._props.key,
2327
+ signals: e,
2328
+ children: h
2329
+ }) : a && s && s.size > 0 && (f = g.createElement(It, {
2330
+ observables: s,
2331
+ children: h
2332
+ })), a && o && o.size > 0 && (f = g.createElement(zt, {
2333
+ stateMap: o,
2334
+ children: f
2335
+ })), a && i && i.size > 0 && (f = g.createElement(Pt, {
2336
+ providers: i,
2337
+ children: f
2338
+ })), f;
2339
+ }
2340
+ function dt(r, t, e) {
2341
+ const s = function() {
2342
+ return t();
2343
+ };
2344
+ s.displayName = e;
2345
+ const o = g.createElement(s);
2346
+ Object.defineProperty(r, "$$typeof", {
2347
+ value: o.$$typeof,
2348
+ enumerable: !0,
2349
+ configurable: !0
2350
+ }), Object.defineProperty(r, "type", {
2351
+ value: s,
2352
+ enumerable: !0,
2353
+ configurable: !0,
2354
+ writable: !0
2355
+ }), r.ref = o.ref ?? null, r.__fiboElementProps = o.props ?? {}, o._owner !== void 0 && (r._owner = o._owner), r._store = { validated: 1 };
2356
+ }
2357
+ function ze(r) {
2358
+ return (...t) => {
2359
+ const e = new r(...t), s = r.name.replace(/Builder$/, "") || "Fibo", o = () => ue(e);
2360
+ return dt(e, o, s), new Proxy(e, {
2361
+ get(i, n, a) {
2362
+ var l;
2363
+ if (n === "build")
2364
+ return o;
2365
+ if (n === "key") {
2366
+ const h = (l = i._props) == null ? void 0 : l.key;
2367
+ if (h != null && h !== "")
2368
+ return typeof h == "number" ? String(h) : h;
2369
+ if (!i.__fiboKeyFn) {
2370
+ const f = ut("fibo"), d = (m) => (i.key(m), a);
2371
+ d.toString = () => f, d.valueOf = () => f, i.__fiboKeyFn = d, i.__fiboAutoKey = f;
2372
+ }
2373
+ return i.__fiboKeyFn;
2374
+ }
2375
+ if (n === "props") {
2376
+ const h = Object.getPrototypeOf(i).props;
2377
+ return typeof h == "function" ? Object.assign((d) => (h.call(i, d), a), i.__fiboElementProps ?? {}) : i.__fiboElementProps ?? {};
2378
+ }
2379
+ return he.has(n) || Reflect.has(i, n) ? Reflect.get(i, n, a) : (h) => {
2380
+ const f = n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), m = ["opacity", "z-index", "flex", "flex-grow", "flex-shrink", "order", "font-weight", "line-height"].includes(f), p = typeof h == "number" && !m ? `${h}px` : String(h), y = u.register(f, p);
2381
+ return i.className(y), a;
2382
+ };
2383
+ }
2384
+ });
2385
+ };
2386
+ }
2387
+ const fe = ({
2388
+ signal: r,
2389
+ builder: t,
2390
+ loading: e,
2391
+ error: s
2392
+ }) => {
2393
+ const o = g.useSyncExternalStore(
2394
+ g.useCallback((a) => r.subscribe ? r.subscribe(a) : () => {
2395
+ }, [r]),
2396
+ () => r.value
2397
+ ), i = o == null ? void 0 : o.error;
2398
+ return i && s ? s(i) : ((o == null ? void 0 : o.isLoading) || (o == null ? void 0 : o.loading)) === !0 && e ? e() : t ? t(o) : null;
2399
+ }, de = g.memo(fe);
2400
+ class me {
2401
+ constructor(t) {
2402
+ c(this, "_loading");
2403
+ c(this, "_error");
2404
+ c(this, "_builder");
2405
+ this._signal = t, dt(this, () => this.build(), "ValueBuilder");
2406
+ }
2407
+ loading(t) {
2408
+ return this._loading = typeof t == "function" ? t : () => t, this;
2409
+ }
2410
+ error(t) {
2411
+ return this._error = t, this;
2412
+ }
2413
+ builder(t) {
2414
+ return this._builder = t, this;
2415
+ }
2416
+ children(t) {
2417
+ return this._builder = t, this;
2418
+ }
2419
+ build() {
2420
+ return g.createElement(de, {
2421
+ signal: this._signal,
2422
+ builder: this._builder,
2423
+ loading: this._loading,
2424
+ error: this._error
2425
+ });
2426
+ }
2427
+ }
2428
+ function Ie(r) {
2429
+ return new me(r);
2430
+ }
2431
+ export {
2432
+ jt as A,
2433
+ At as B,
2434
+ St as C,
2435
+ H as D,
2436
+ wt as E,
2437
+ Te as F,
2438
+ ut as G,
2439
+ Ne as H,
2440
+ F as I,
2441
+ nt as J,
2442
+ Yt as K,
2443
+ Ce as L,
2444
+ U as M,
2445
+ Nt as O,
2446
+ Pt as P,
2447
+ we as R,
2448
+ z as S,
2449
+ Ie as V,
2450
+ xe as a,
2451
+ tt as b,
2452
+ _e as c,
2453
+ Mt as d,
2454
+ Se as e,
2455
+ Vt as f,
2456
+ et as g,
2457
+ ae as h,
2458
+ ce as i,
2459
+ Ee as j,
2460
+ Me as k,
2461
+ ie as l,
2462
+ ne as m,
2463
+ it as n,
2464
+ ke as o,
2465
+ N as p,
2466
+ Xt as q,
2467
+ xt as r,
2468
+ ye as s,
2469
+ ve as t,
2470
+ $e as u,
2471
+ ze as v,
2472
+ Et as w,
2473
+ x,
2474
+ Ot as y,
2475
+ zt as z
2476
+ };