fiboui 2.1.0 → 2.2.1

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