@tachui/responsive 0.8.22 → 0.8.24

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,2621 @@
1
+ import { createSignal as T, createEffect as O, isSignal as I, isComputed as P, getThemeSignal as le, createComputed as m, createMemo as ue } from "@tachui/core";
2
+ import { globalModifierRegistry as pe } from "@tachui/registry";
3
+ import { BaseModifier as X } from "@tachui/modifiers";
4
+ const he = "0.8.24", fe = he, F = /* @__PURE__ */ new WeakSet(), U = /* @__PURE__ */ new WeakMap(), me = {
5
+ name: "@tachui/core",
6
+ version: fe,
7
+ author: "TachUI Team",
8
+ verified: !0
9
+ };
10
+ function ge(r) {
11
+ F.has(r) || (r.setFeatureFlags({
12
+ metadataRegistration: !0
13
+ }), F.add(r));
14
+ }
15
+ function be(r, e) {
16
+ let t = U.get(r);
17
+ t || (t = /* @__PURE__ */ new Set(), U.set(r, t)), !t.has(e.name) && (r.registerPlugin(e), t.add(e.name));
18
+ }
19
+ function ve(r, e, t, i = pe, n = me) {
20
+ ge(i), be(i, n), i.has(r) || i.register(r, e), i.getMetadata(r) || i.registerMetadata({
21
+ ...t,
22
+ name: r,
23
+ plugin: n.name
24
+ });
25
+ }
26
+ const ye = "0.8.24", xe = ye, W = {
27
+ base: "0px",
28
+ // Mobile-first base
29
+ sm: "640px",
30
+ // Small tablets and large phones
31
+ md: "768px",
32
+ // Tablets
33
+ lg: "1024px",
34
+ // Laptops and small desktops
35
+ xl: "1280px",
36
+ // Large desktops
37
+ "2xl": "1536px"
38
+ // Extra large screens
39
+ };
40
+ function x(r) {
41
+ return typeof r == "object" && r !== null && !Array.isArray(r) && Object.keys(r).some(
42
+ (e) => ["base", "sm", "md", "lg", "xl", "2xl"].includes(e)
43
+ );
44
+ }
45
+ function G(r) {
46
+ return ["base", "sm", "md", "lg", "xl", "2xl"].includes(r);
47
+ }
48
+ let E = {
49
+ ...W
50
+ };
51
+ const [J, Q] = T("base"), [ee, te] = T({
52
+ width: 0,
53
+ height: 0
54
+ });
55
+ let q = !1;
56
+ const ie = () => {
57
+ N(), V();
58
+ }, ne = () => {
59
+ setTimeout(() => {
60
+ N(), V();
61
+ }, 100);
62
+ };
63
+ function ze(r) {
64
+ Se(r), E = {
65
+ ...W,
66
+ ...r
67
+ }, V(), typeof window < "u" && window.addEventListener("resize", V);
68
+ }
69
+ function L() {
70
+ return { ...E };
71
+ }
72
+ function y() {
73
+ return J;
74
+ }
75
+ function De() {
76
+ return ee;
77
+ }
78
+ function qe() {
79
+ typeof window > "u" || q || (N(), V(), window.addEventListener("resize", ie), window.addEventListener("orientationchange", ne), q = !0);
80
+ }
81
+ function Ae() {
82
+ typeof window > "u" || (N(), V());
83
+ }
84
+ function Ne() {
85
+ E = {
86
+ ...W
87
+ }, Q("base"), te({
88
+ width: 0,
89
+ height: 0
90
+ }), typeof window < "u" && q && (window.removeEventListener("resize", ie), window.removeEventListener("orientationchange", ne)), q = !1;
91
+ }
92
+ function w() {
93
+ const r = J(), e = ee();
94
+ return {
95
+ current: r,
96
+ width: e.width,
97
+ height: e.height,
98
+ isAbove: (t) => K(r, t),
99
+ isBelow: (t) => Z(r, t),
100
+ isBetween: (t, i) => K(r, t) && Z(r, i),
101
+ matches: (t) => window.matchMedia(t).matches
102
+ };
103
+ }
104
+ function _(r) {
105
+ const e = E[r];
106
+ return e.endsWith("px") ? parseInt(e, 10) : e.endsWith("em") || e.endsWith("rem") ? parseInt(e, 10) * 16 : parseInt(e, 10) || 0;
107
+ }
108
+ function v(r) {
109
+ return ["base", "sm", "md", "lg", "xl", "2xl"].indexOf(r);
110
+ }
111
+ function K(r, e) {
112
+ return v(r) > v(e);
113
+ }
114
+ function Z(r, e) {
115
+ return v(r) < v(e);
116
+ }
117
+ function we(r) {
118
+ return r === "base" ? "" : `(min-width: ${E[r]})`;
119
+ }
120
+ function Qe(r, e) {
121
+ const t = [];
122
+ if (r !== "base" && t.push(`(min-width: ${E[r]})`), e && e !== "2xl") {
123
+ const i = ["sm", "md", "lg", "xl", "2xl"], n = i.indexOf(e);
124
+ if (n >= 0 && n < i.length - 1) {
125
+ const o = i[n + 1], s = `${_(o) - 1}px`;
126
+ t.push(`(max-width: ${s})`);
127
+ }
128
+ }
129
+ return t.length > 0 ? t.join(" and ") : "";
130
+ }
131
+ function A() {
132
+ return ["base", "sm", "md", "lg", "xl", "2xl"];
133
+ }
134
+ function We(r) {
135
+ const e = A(), t = e.indexOf(r);
136
+ return t >= 0 ? e.slice(t + 1) : [];
137
+ }
138
+ function _e(r) {
139
+ const e = A(), t = e.indexOf(r);
140
+ return t > 0 ? e.slice(0, t) : [];
141
+ }
142
+ function V() {
143
+ if (typeof window > "u")
144
+ return;
145
+ const r = window.innerWidth, e = A().reverse();
146
+ for (const t of e)
147
+ if (t === "base" || r >= _(t)) {
148
+ Q(t);
149
+ return;
150
+ }
151
+ Q("base");
152
+ }
153
+ function N() {
154
+ typeof window < "u" && te({
155
+ width: window.innerWidth,
156
+ height: window.innerHeight
157
+ });
158
+ }
159
+ function Se(r) {
160
+ for (const [t, i] of Object.entries(r)) {
161
+ if (!G(t))
162
+ throw new Error(
163
+ `Invalid breakpoint key: "${t}". Valid keys are: base, sm, md, lg, xl, 2xl`
164
+ );
165
+ if (typeof i != "string")
166
+ throw new Error(
167
+ `Breakpoint value for "${t}" must be a string (e.g., "768px")`
168
+ );
169
+ if (!i.match(/^\d+(\.\d+)?(px|em|rem|%)$/))
170
+ throw new Error(
171
+ `Invalid breakpoint value for "${t}": "${i}". Must be a valid CSS length (e.g., "768px", "48em")`
172
+ );
173
+ }
174
+ const e = Object.keys(r).filter(G).sort((t, i) => v(t) - v(i));
175
+ for (let t = 1; t < e.length; t++) {
176
+ const i = e[t - 1], n = e[t], o = r[i], s = r[n];
177
+ if (_(i) >= parseInt(s, 10))
178
+ throw new Error(
179
+ `Breakpoint "${n}" (${s}) must be larger than "${i}" (${o})`
180
+ );
181
+ }
182
+ }
183
+ const He = {
184
+ // Tailwind CSS (default)
185
+ tailwind: {
186
+ sm: "640px",
187
+ md: "768px",
188
+ lg: "1024px",
189
+ xl: "1280px",
190
+ "2xl": "1536px"
191
+ },
192
+ // Bootstrap
193
+ bootstrap: {
194
+ sm: "576px",
195
+ md: "768px",
196
+ lg: "992px",
197
+ xl: "1200px",
198
+ "2xl": "1400px"
199
+ },
200
+ // Material Design
201
+ material: {
202
+ sm: "600px",
203
+ md: "960px",
204
+ lg: "1280px",
205
+ xl: "1920px",
206
+ "2xl": "2560px"
207
+ },
208
+ // Custom mobile-first
209
+ mobileFocus: {
210
+ sm: "480px",
211
+ md: "768px",
212
+ lg: "1024px",
213
+ xl: "1200px",
214
+ "2xl": "1440px"
215
+ }
216
+ };
217
+ class re {
218
+ options;
219
+ constructor(e) {
220
+ this.options = {
221
+ generateMinified: !1,
222
+ includeComments: !0,
223
+ optimizeOutput: !0,
224
+ mobileFirst: !0,
225
+ ...e
226
+ };
227
+ }
228
+ /**
229
+ * Generate complete responsive CSS from a style configuration
230
+ */
231
+ generateResponsiveCSS(e) {
232
+ const t = [], i = [], n = {};
233
+ let o = !1;
234
+ for (const [s, a] of Object.entries(e))
235
+ if (x(a)) {
236
+ o = !0;
237
+ const d = this.generatePropertyMediaQueries(s, a);
238
+ t.push(...d.mediaQueries), d.baseStyles && Object.assign(n, d.baseStyles);
239
+ } else
240
+ n[this.toCSSPropertyName(s)] = this.formatCSSValue(
241
+ s,
242
+ a
243
+ );
244
+ return i.push(...this.generateCSSRules(t, n)), {
245
+ cssRules: i,
246
+ mediaQueries: t,
247
+ fallbackStyles: n,
248
+ hasResponsiveStyles: o
249
+ };
250
+ }
251
+ /**
252
+ * Generate media queries for a single property
253
+ */
254
+ generatePropertyMediaQueries(e, t) {
255
+ const i = [], n = {}, o = A();
256
+ for (const s of o) {
257
+ const a = t[s];
258
+ if (a === void 0) continue;
259
+ const d = this.toCSSPropertyName(e), c = this.formatCSSValue(e, a);
260
+ if (s === "base")
261
+ n[d] = c;
262
+ else {
263
+ const u = we(s), p = { [d]: c };
264
+ i.push({
265
+ breakpoint: s,
266
+ query: u,
267
+ styles: p,
268
+ selector: this.options.selector
269
+ });
270
+ }
271
+ }
272
+ return {
273
+ mediaQueries: i,
274
+ baseStyles: Object.keys(n).length > 0 ? n : void 0
275
+ };
276
+ }
277
+ /**
278
+ * Generate CSS rules from media queries and base styles
279
+ */
280
+ generateCSSRules(e, t) {
281
+ const i = [];
282
+ if (Object.keys(t).length > 0) {
283
+ const o = this.generateCSSRule(this.options.selector, t);
284
+ i.push(o);
285
+ }
286
+ const n = this.groupQueriesByMediaQuery(e);
287
+ for (const [o, s] of Object.entries(n)) {
288
+ if (o === "") continue;
289
+ const a = {};
290
+ for (const c of s)
291
+ Object.assign(a, c.styles);
292
+ const d = this.generateMediaQueryRule(
293
+ o,
294
+ this.options.selector,
295
+ a
296
+ );
297
+ i.push(d);
298
+ }
299
+ return i;
300
+ }
301
+ /**
302
+ * Group media queries by their query string for optimization
303
+ */
304
+ groupQueriesByMediaQuery(e) {
305
+ const t = {};
306
+ for (const i of e)
307
+ t[i.query] || (t[i.query] = []), t[i.query].push(i);
308
+ return t;
309
+ }
310
+ /**
311
+ * Generate a single CSS rule
312
+ */
313
+ generateCSSRule(e, t) {
314
+ const { generateMinified: i, includeComments: n } = this.options, o = i ? "" : " ", s = i ? "" : `
315
+ `, a = i ? "" : " ";
316
+ let d = `${e}${a}{${s}`;
317
+ for (const [c, u] of Object.entries(t))
318
+ d += `${o}${c}:${a}${u};${s}`;
319
+ return d += `}${s}`, n && !i && (d = `/* Base styles (mobile-first) */${s}${d}`), d;
320
+ }
321
+ /**
322
+ * Generate a CSS media query rule
323
+ */
324
+ generateMediaQueryRule(e, t, i) {
325
+ const { generateMinified: n, includeComments: o } = this.options, s = n ? "" : " ", a = n ? "" : " ", d = n ? "" : `
326
+ `, c = n ? "" : " ";
327
+ let u = `@media ${e}${c}{${d}`;
328
+ u += `${s}${t}${c}{${d}`;
329
+ for (const [p, f] of Object.entries(i))
330
+ u += `${a}${p}:${c}${f};${d}`;
331
+ return u += `${s}}${d}`, u += `}${d}`, o && !n && (u = `/* ${this.getBreakpointFromQuery(e)} styles */${d}${u}`), u;
332
+ }
333
+ /**
334
+ * Convert camelCase property to CSS kebab-case
335
+ */
336
+ toCSSProperty(e) {
337
+ return e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
338
+ }
339
+ /**
340
+ * Format CSS value with appropriate units and validation
341
+ */
342
+ formatCSSValue(e, t) {
343
+ if (t == null)
344
+ return "inherit";
345
+ if (typeof t == "number") {
346
+ const i = [
347
+ "opacity",
348
+ "z-index",
349
+ "font-weight",
350
+ "line-height",
351
+ "flex-grow",
352
+ "flex-shrink",
353
+ "order",
354
+ "grid-column-start",
355
+ "grid-column-end",
356
+ "grid-row-start",
357
+ "grid-row-end"
358
+ ], n = this.toCSSProperty(e);
359
+ if (i.includes(n))
360
+ return this.addImportantIfNeeded(e, t.toString());
361
+ if ([
362
+ "width",
363
+ "height",
364
+ "min-width",
365
+ "max-width",
366
+ "min-height",
367
+ "max-height",
368
+ "padding",
369
+ "margin",
370
+ "border-width",
371
+ "border-radius",
372
+ "top",
373
+ "right",
374
+ "bottom",
375
+ "left",
376
+ "font-size",
377
+ "letter-spacing",
378
+ "text-indent"
379
+ ].some((s) => n.includes(s)))
380
+ return this.addImportantIfNeeded(e, `${t}px`);
381
+ }
382
+ return this.addImportantIfNeeded(e, t.toString());
383
+ }
384
+ /**
385
+ * Add !important for properties that need to override base component styles
386
+ */
387
+ addImportantIfNeeded(e, t) {
388
+ const i = [
389
+ "flexDirection",
390
+ "flex-direction",
391
+ "justifyContent",
392
+ "justify-content",
393
+ "alignItems",
394
+ "align-items",
395
+ "display"
396
+ ], n = this.toCSSProperty(e);
397
+ return i.includes(e) || i.includes(n) ? `${t} !important` : t;
398
+ }
399
+ /**
400
+ * Convert property name to appropriate CSS property (including custom properties)
401
+ */
402
+ toCSSPropertyName(e) {
403
+ return this.toCSSProperty(e);
404
+ }
405
+ /**
406
+ * Extract breakpoint name from media query for comments
407
+ */
408
+ getBreakpointFromQuery(e) {
409
+ const t = L();
410
+ for (const [i, n] of Object.entries(t))
411
+ if (e.includes(n))
412
+ return i;
413
+ return "custom";
414
+ }
415
+ }
416
+ function Fe(r, e, t, i) {
417
+ if (!x(t)) {
418
+ const a = e.replace(
419
+ /[A-Z]/g,
420
+ (c) => `-${c.toLowerCase()}`
421
+ ), d = typeof t == "number" ? `${t}px` : t.toString();
422
+ return [`${r} { ${a}: ${d}; }`];
423
+ }
424
+ const n = new re({ selector: r, ...i }), o = { [e]: t };
425
+ return n.generateResponsiveCSS(o).cssRules;
426
+ }
427
+ function Ue(r, e, t) {
428
+ const { generateMinified: i = !1 } = t || {}, n = i ? "" : " ", o = i ? "" : `
429
+ `, s = i ? "" : " ";
430
+ let a = `@media ${e.query}${s}{${o}`;
431
+ a += `${n}${r}${s}{${o}`;
432
+ for (const [d, c] of Object.entries(e.styles)) {
433
+ const u = d.replace(
434
+ /[A-Z]/g,
435
+ (f) => `-${f.toLowerCase()}`
436
+ ), p = typeof c == "number" ? `${c}px` : c.toString();
437
+ a += `${n}${n}${u}:${s}${p};${o}`;
438
+ }
439
+ return a += `${n}}${o}`, a += `}${o}`, a;
440
+ }
441
+ class se {
442
+ static styleSheet = null;
443
+ static injectedRules = /* @__PURE__ */ new Set();
444
+ /**
445
+ * Get or create the tachUI responsive stylesheet
446
+ */
447
+ static getStyleSheet() {
448
+ if (this.styleSheet)
449
+ return this.styleSheet;
450
+ const e = document.createElement("style");
451
+ return e.setAttribute("data-tachui-responsive", "true"), document.head.appendChild(e), this.styleSheet = e.sheet, this.styleSheet;
452
+ }
453
+ /**
454
+ * Inject CSS rules into the document
455
+ */
456
+ static injectCSS(e) {
457
+ if (typeof document > "u")
458
+ return;
459
+ const t = this.getStyleSheet();
460
+ for (const i of e)
461
+ if (!this.injectedRules.has(i))
462
+ try {
463
+ t.insertRule(i, t.cssRules.length), this.injectedRules.add(i);
464
+ } catch (n) {
465
+ console.warn("Failed to inject CSS rule:", i, n);
466
+ }
467
+ }
468
+ /**
469
+ * Clear all injected responsive CSS
470
+ */
471
+ static clearCSS() {
472
+ if (this.styleSheet) {
473
+ for (; this.styleSheet.cssRules.length > 0; )
474
+ this.styleSheet.deleteRule(0);
475
+ this.injectedRules.clear();
476
+ }
477
+ }
478
+ /**
479
+ * Check if a rule has been injected
480
+ */
481
+ static hasRule(e) {
482
+ return this.injectedRules.has(e);
483
+ }
484
+ }
485
+ class Ce {
486
+ cache = /* @__PURE__ */ new Map();
487
+ hitCount = 0;
488
+ missCount = 0;
489
+ get(e) {
490
+ const t = this.cache.get(e);
491
+ return t ? this.hitCount++ : this.missCount++, t;
492
+ }
493
+ set(e, t) {
494
+ this.cache.set(e, t);
495
+ }
496
+ clear() {
497
+ this.cache.clear(), this.hitCount = 0, this.missCount = 0;
498
+ }
499
+ getStats() {
500
+ return {
501
+ size: this.cache.size,
502
+ hitRate: this.hitCount / (this.hitCount + this.missCount) || 0,
503
+ hits: this.hitCount,
504
+ misses: this.missCount
505
+ };
506
+ }
507
+ }
508
+ const k = new Ce();
509
+ class Ge {
510
+ static BATCH_SIZE = 50;
511
+ static ruleQueue = [];
512
+ static flushTimer = null;
513
+ /**
514
+ * Generate CSS with caching and batching
515
+ */
516
+ static generateOptimizedCSS(e, t, i = {}) {
517
+ const {
518
+ minify: n = process.env.NODE_ENV === "production",
519
+ batch: o = !0,
520
+ deduplicate: s = !0
521
+ } = i, a = this.createCacheKey(e, t, { minify: n });
522
+ if (s) {
523
+ const c = k.get(a);
524
+ if (c)
525
+ return c;
526
+ }
527
+ const d = this.generateCSS(e, t, { minify: n });
528
+ return s && k.set(a, d), o && d.trim() ? (this.addToBatch(d), "") : d;
529
+ }
530
+ /**
531
+ * Create cache key for CSS rule
532
+ */
533
+ static createCacheKey(e, t, i) {
534
+ return JSON.stringify({ selector: e, config: t, options: i });
535
+ }
536
+ /**
537
+ * Generate CSS without optimizations (for comparison)
538
+ */
539
+ static generateCSS(e, t, i) {
540
+ const { minify: n = !1 } = i, o = n ? "" : " ", s = n ? "" : `
541
+ `, a = n ? "" : " ";
542
+ let d = "";
543
+ const c = /* @__PURE__ */ new Set(), u = this.extractBaseStyles(t);
544
+ Object.keys(u).length > 0 && (d += `${e}${a}{${s}`, d += this.generateProperties(u, o, s, a), d += `}${s}`);
545
+ for (const [p, f] of Object.entries(t))
546
+ if (typeof f == "object" && f !== null)
547
+ for (const [b, S] of Object.entries(f)) {
548
+ if (b === "base") continue;
549
+ const B = this.getMediaQuery(b), j = `${B}:${p}`;
550
+ c.has(j) || (d += `@media ${B}${a}{${s}`, d += `${o}${e}${a}{${s}`, d += `${o}${o}${this.propertyToCSS(p)}:${a}${this.valueToCSS(S)};${s}`, d += `${o}}${s}`, d += `}${s}`, c.add(j));
551
+ }
552
+ return d;
553
+ }
554
+ /**
555
+ * Add CSS to batch queue
556
+ */
557
+ static addToBatch(e) {
558
+ this.ruleQueue.push(e), this.ruleQueue.length >= this.BATCH_SIZE ? this.flushBatch() : this.flushTimer || (this.flushTimer = window.setTimeout(() => this.flushBatch(), 16));
559
+ }
560
+ /**
561
+ * Flush batched CSS rules
562
+ */
563
+ static flushBatch() {
564
+ if (this.ruleQueue.length === 0) return;
565
+ const e = this.ruleQueue.join("");
566
+ this.ruleQueue = [], this.flushTimer && (clearTimeout(this.flushTimer), this.flushTimer = null), this.injectCSS(e);
567
+ }
568
+ /**
569
+ * Inject CSS into document
570
+ */
571
+ static injectCSS(e) {
572
+ if (typeof document > "u") return;
573
+ let t = document.getElementById(
574
+ "tachui-responsive-styles"
575
+ );
576
+ t || (t = document.createElement("style"), t.id = "tachui-responsive-styles", t.type = "text/css", document.head.appendChild(t)), t.appendChild(document.createTextNode(e));
577
+ }
578
+ /**
579
+ * Extract base (non-responsive) styles
580
+ */
581
+ static extractBaseStyles(e) {
582
+ const t = {};
583
+ for (const [i, n] of Object.entries(e))
584
+ typeof n != "object" || n === null ? t[i] = n : "base" in n && (t[i] = n.base);
585
+ return t;
586
+ }
587
+ /**
588
+ * Generate CSS properties
589
+ */
590
+ static generateProperties(e, t, i, n) {
591
+ let o = "";
592
+ for (const [s, a] of Object.entries(e))
593
+ a !== void 0 && (o += `${t}${this.propertyToCSS(s)}:${n}${this.valueToCSS(a)};${i}`);
594
+ return o;
595
+ }
596
+ /**
597
+ * Convert property name to CSS
598
+ */
599
+ static propertyToCSS(e) {
600
+ return e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
601
+ }
602
+ /**
603
+ * Convert value to CSS
604
+ */
605
+ static valueToCSS(e) {
606
+ return typeof e == "number" ? `${e}px` : e.toString();
607
+ }
608
+ /**
609
+ * Get media query for breakpoint
610
+ */
611
+ static getMediaQuery(e) {
612
+ return {
613
+ base: "",
614
+ sm: "(min-width: 640px)",
615
+ md: "(min-width: 768px)",
616
+ lg: "(min-width: 1024px)",
617
+ xl: "(min-width: 1280px)",
618
+ "2xl": "(min-width: 1536px)"
619
+ }[e] || e;
620
+ }
621
+ /**
622
+ * Force flush any pending batched CSS
623
+ */
624
+ static flush() {
625
+ this.flushBatch();
626
+ }
627
+ /**
628
+ * Get performance statistics
629
+ */
630
+ static getStats() {
631
+ return {
632
+ cache: k.getStats(),
633
+ batch: {
634
+ queueSize: this.ruleQueue.length,
635
+ batchSize: this.BATCH_SIZE
636
+ }
637
+ };
638
+ }
639
+ /**
640
+ * Clear all caches and reset performance counters
641
+ */
642
+ static reset() {
643
+ k.clear(), this.ruleQueue = [], this.flushTimer && (clearTimeout(this.flushTimer), this.flushTimer = null);
644
+ }
645
+ }
646
+ class D {
647
+ static measurements = /* @__PURE__ */ new Map();
648
+ /**
649
+ * Start performance measurement
650
+ */
651
+ static startMeasurement(e) {
652
+ const t = performance.now();
653
+ return () => {
654
+ const i = performance.now() - t;
655
+ return this.recordMeasurement(e, i), i;
656
+ };
657
+ }
658
+ /**
659
+ * Record measurement
660
+ */
661
+ static recordMeasurement(e, t) {
662
+ this.measurements.has(e) || this.measurements.set(e, []);
663
+ const i = this.measurements.get(e);
664
+ i.push(t), i.length > 100 && i.shift();
665
+ }
666
+ /**
667
+ * Get performance statistics
668
+ */
669
+ static getStats() {
670
+ const e = {};
671
+ for (const [t, i] of this.measurements) {
672
+ const n = [...i].sort((s, a) => s - a), o = i.reduce((s, a) => s + a, 0) / i.length;
673
+ e[t] = {
674
+ count: i.length,
675
+ average: o,
676
+ min: n[0],
677
+ max: n[n.length - 1],
678
+ p50: n[Math.floor(n.length * 0.5)],
679
+ p95: n[Math.floor(n.length * 0.95)],
680
+ p99: n[Math.floor(n.length * 0.99)]
681
+ };
682
+ }
683
+ return e;
684
+ }
685
+ /**
686
+ * Clear all performance data
687
+ */
688
+ static reset() {
689
+ this.measurements.clear();
690
+ }
691
+ }
692
+ const oe = 250;
693
+ class H extends X {
694
+ type = "responsive";
695
+ priority = oe;
696
+ generatedCSS = null;
697
+ elementSelector = "";
698
+ _config;
699
+ constructor(e) {
700
+ super(e), this._config = e;
701
+ }
702
+ get config() {
703
+ return this._config;
704
+ }
705
+ /**
706
+ * Apply responsive styles to the element
707
+ */
708
+ apply(e, t) {
709
+ const i = e.element;
710
+ !i || !(i instanceof HTMLElement) || (this.elementSelector = this.generateUniqueSelector(i), i.classList.add(this.getClassFromSelector(this.elementSelector)), this.generateAndInjectCSS(), this.setupReactiveUpdates());
711
+ }
712
+ /**
713
+ * Generate and inject responsive CSS
714
+ */
715
+ generateAndInjectCSS() {
716
+ const e = D.startMeasurement("css-generation");
717
+ try {
718
+ const t = new re({
719
+ selector: this.elementSelector,
720
+ generateMinified: process.env.NODE_ENV === "production",
721
+ includeComments: process.env.NODE_ENV !== "production",
722
+ optimizeOutput: !0
723
+ });
724
+ this.generatedCSS = t.generateResponsiveCSS(this.config), this.generatedCSS.cssRules.length > 0 && se.injectCSS(this.generatedCSS.cssRules);
725
+ } finally {
726
+ e();
727
+ }
728
+ }
729
+ /**
730
+ * Set up reactive updates for dynamic responsive values
731
+ */
732
+ setupReactiveUpdates() {
733
+ this.hasReactiveValues(this.properties) && O(() => {
734
+ this.trackReactiveDependencies(this.properties);
735
+ const t = this.resolveReactiveConfig(this.properties);
736
+ this.updateConfig(t);
737
+ });
738
+ }
739
+ /**
740
+ * Track reactive dependencies by accessing all reactive values
741
+ */
742
+ trackReactiveDependencies(e) {
743
+ let t = !1;
744
+ for (const [i, n] of Object.entries(e))
745
+ if (this.isReactiveValue(n))
746
+ I(n) || P(n) ? n() : this.isAsset(n) && (t = !0, n.resolve());
747
+ else if (x(n))
748
+ for (const [o, s] of Object.entries(n))
749
+ this.isReactiveValue(s) && (I(s) || P(s) ? s() : this.isAsset(s) && (t = !0, s.resolve()));
750
+ t && le()();
751
+ }
752
+ /**
753
+ * Update configuration and regenerate CSS
754
+ */
755
+ updateConfig(e) {
756
+ this._config = e, this.generateAndInjectCSS();
757
+ }
758
+ /**
759
+ * Generate unique CSS selector for this element
760
+ */
761
+ generateUniqueSelector(e) {
762
+ return `.${`tachui-responsive-${this.generateUniqueId()}`}`;
763
+ }
764
+ /**
765
+ * Extract class name from CSS selector
766
+ */
767
+ getClassFromSelector(e) {
768
+ return e.replace(/^\./, "");
769
+ }
770
+ /**
771
+ * Generate unique ID for CSS class names
772
+ */
773
+ generateUniqueId() {
774
+ return Math.random().toString(36).substr(2, 9);
775
+ }
776
+ /**
777
+ * Check if configuration contains reactive values (signals)
778
+ */
779
+ hasReactiveValues(e) {
780
+ for (const t of Object.values(e)) {
781
+ if (this.isReactiveValue(t))
782
+ return !0;
783
+ if (x(t)) {
784
+ for (const i of Object.values(t))
785
+ if (this.isReactiveValue(i))
786
+ return !0;
787
+ }
788
+ }
789
+ return !1;
790
+ }
791
+ /**
792
+ * Check if a value is a reactive signal, computed, or Asset
793
+ */
794
+ isReactiveValue(e) {
795
+ return !!(I(e) || P(e) || this.isAsset(e));
796
+ }
797
+ /**
798
+ * Check if a value is an Asset object
799
+ */
800
+ isAsset(e) {
801
+ return e != null && typeof e == "object" && "resolve" in e && typeof e.resolve == "function";
802
+ }
803
+ /**
804
+ * Resolve configuration with current signal values
805
+ */
806
+ resolveReactiveConfig(e) {
807
+ const t = {};
808
+ for (const [i, n] of Object.entries(e))
809
+ if (this.isReactiveValue(n))
810
+ I(n) || P(n) ? t[i] = n() : this.isAsset(n) && (t[i] = n.resolve());
811
+ else if (x(n)) {
812
+ const o = {};
813
+ for (const [s, a] of Object.entries(n))
814
+ this.isReactiveValue(a) ? I(a) || P(a) ? o[s] = a() : this.isAsset(a) && (o[s] = a.resolve()) : o[s] = a;
815
+ t[i] = o;
816
+ } else
817
+ t[i] = n;
818
+ return t;
819
+ }
820
+ /**
821
+ * Get generated CSS information (for debugging)
822
+ */
823
+ getGeneratedCSS() {
824
+ return this.generatedCSS;
825
+ }
826
+ /**
827
+ * Get configuration (for debugging)
828
+ */
829
+ getConfig() {
830
+ return this.config;
831
+ }
832
+ }
833
+ function h(r) {
834
+ return new H(r);
835
+ }
836
+ class $e extends X {
837
+ type = "media-query";
838
+ priority = oe + 1;
839
+ // Slightly higher than responsive
840
+ elementSelector = "";
841
+ constructor(e, t) {
842
+ super({ query: e, styles: t });
843
+ }
844
+ get query() {
845
+ return this.properties.query;
846
+ }
847
+ get styles() {
848
+ return this.properties.styles;
849
+ }
850
+ apply(e, t) {
851
+ const i = e.element;
852
+ !i || !(i instanceof HTMLElement) || (this.elementSelector = this.generateUniqueSelector(i), i.classList.add(this.getClassFromSelector(this.elementSelector)), this.generateMediaQueryCSS());
853
+ }
854
+ generateMediaQueryCSS() {
855
+ const { generateMinified: e = process.env.NODE_ENV === "production" } = {}, t = e ? "" : " ", i = e ? "" : " ", n = e ? "" : `
856
+ `, o = e ? "" : " ";
857
+ let s = `@media ${this.query}${o}{${n}`;
858
+ s += `${t}${this.elementSelector}${o}{${n}`;
859
+ for (const [a, d] of Object.entries(this.styles)) {
860
+ const c = a.replace(
861
+ /[A-Z]/g,
862
+ (p) => `-${p.toLowerCase()}`
863
+ ), u = typeof d == "number" ? `${d}px` : d.toString();
864
+ s += `${i}${c}:${o}${u};${n}`;
865
+ }
866
+ s += `${t}}${n}`, s += `}${n}`, se.injectCSS([s]);
867
+ }
868
+ generateUniqueSelector(e) {
869
+ return `.${`tachui-mq-${Math.random().toString(36).substr(2, 9)}`}`;
870
+ }
871
+ getClassFromSelector(e) {
872
+ return e.replace(/^\./, "");
873
+ }
874
+ }
875
+ function C(r, e) {
876
+ return new $e(r, e);
877
+ }
878
+ function l(r, e) {
879
+ const t = { [r]: e };
880
+ return new H(t);
881
+ }
882
+ function ae(r) {
883
+ const e = {};
884
+ return r.direction && (e.flexDirection = r.direction), r.wrap && (e.flexWrap = r.wrap), r.justify && (e.justifyContent = r.justify), r.align && (e.alignItems = r.align), r.gap && (e.gap = r.gap), new H(e);
885
+ }
886
+ class de {
887
+ constructor(e) {
888
+ return this.baseBuilder = e, new Proxy(this, {
889
+ get(t, i) {
890
+ if (i === "base" || i === "sm" || i === "md" || i === "lg" || i === "xl" || i === "2xl" || i in t)
891
+ return t[i];
892
+ const n = t.baseBuilder[i];
893
+ return typeof n == "function" ? (...o) => {
894
+ const s = n.apply(t.baseBuilder, o);
895
+ return s === t.baseBuilder ? t : s;
896
+ } : n;
897
+ }
898
+ });
899
+ }
900
+ // Delegate essential builder methods
901
+ addModifier(e) {
902
+ this.baseBuilder.addModifier(e);
903
+ }
904
+ build() {
905
+ return this.baseBuilder.build();
906
+ }
907
+ // Core responsive methods
908
+ responsive(e) {
909
+ const t = h(e);
910
+ return this.baseBuilder.addModifier(t), this;
911
+ }
912
+ mediaQuery(e, t) {
913
+ const i = C(e, t);
914
+ return this.baseBuilder.addModifier(i), this;
915
+ }
916
+ // Advanced media query methods
917
+ orientation(e, t) {
918
+ const i = `(orientation: ${e})`, n = C(i, t);
919
+ return this.baseBuilder.addModifier(n), this;
920
+ }
921
+ colorScheme(e, t) {
922
+ const i = `(prefers-color-scheme: ${e})`, n = C(i, t);
923
+ return this.baseBuilder.addModifier(n), this;
924
+ }
925
+ reducedMotion(e) {
926
+ const i = C("(prefers-reduced-motion: reduce)", e);
927
+ return this.baseBuilder.addModifier(i), this;
928
+ }
929
+ highContrast(e) {
930
+ const i = C("(prefers-contrast: high)", e);
931
+ return this.baseBuilder.addModifier(i), this;
932
+ }
933
+ touchDevice(e) {
934
+ const i = C("(pointer: coarse)", e);
935
+ return this.baseBuilder.addModifier(i), this;
936
+ }
937
+ mouseDevice(e) {
938
+ const i = C("(pointer: fine)", e);
939
+ return this.baseBuilder.addModifier(i), this;
940
+ }
941
+ retina(e) {
942
+ const i = C("(min-resolution: 2dppx)", e);
943
+ return this.baseBuilder.addModifier(i), this;
944
+ }
945
+ print(e) {
946
+ const i = C("print", e);
947
+ return this.baseBuilder.addModifier(i), this;
948
+ }
949
+ // Responsive layout methods
950
+ responsiveLayout(e) {
951
+ const t = ae(e);
952
+ return this.baseBuilder.addModifier(t), this;
953
+ }
954
+ // Responsive dimension methods
955
+ responsiveWidth(e) {
956
+ const t = l("width", e);
957
+ return this.baseBuilder.addModifier(t), this;
958
+ }
959
+ responsiveHeight(e) {
960
+ const t = l("height", e);
961
+ return this.baseBuilder.addModifier(t), this;
962
+ }
963
+ responsiveSize(e) {
964
+ const t = h(e);
965
+ return this.baseBuilder.addModifier(t), this;
966
+ }
967
+ // Responsive spacing methods
968
+ responsivePadding(e) {
969
+ if (x(e) || typeof e == "string" || typeof e == "number") {
970
+ const t = l(
971
+ "padding",
972
+ e
973
+ );
974
+ this.baseBuilder.addModifier(t);
975
+ } else {
976
+ const t = {}, i = e;
977
+ i.all && (t.padding = i.all), i.horizontal && (t.paddingLeft = i.horizontal, t.paddingRight = i.horizontal), i.vertical && (t.paddingTop = i.vertical, t.paddingBottom = i.vertical), i.top && (t.paddingTop = i.top), i.right && (t.paddingRight = i.right), i.bottom && (t.paddingBottom = i.bottom), i.left && (t.paddingLeft = i.left);
978
+ const n = h(t);
979
+ this.baseBuilder.addModifier(n);
980
+ }
981
+ return this;
982
+ }
983
+ responsiveMargin(e) {
984
+ if (x(e) || typeof e == "string" || typeof e == "number") {
985
+ const t = l(
986
+ "margin",
987
+ e
988
+ );
989
+ this.baseBuilder.addModifier(t);
990
+ } else {
991
+ const t = {}, i = e;
992
+ i.all && (t.margin = i.all), i.horizontal && (t.marginLeft = i.horizontal, t.marginRight = i.horizontal), i.vertical && (t.marginTop = i.vertical, t.marginBottom = i.vertical), i.top && (t.marginTop = i.top), i.right && (t.marginRight = i.right), i.bottom && (t.marginBottom = i.bottom), i.left && (t.marginLeft = i.left);
993
+ const n = h(t);
994
+ this.baseBuilder.addModifier(n);
995
+ }
996
+ return this;
997
+ }
998
+ // Responsive typography methods
999
+ responsiveFont(e) {
1000
+ const t = h(e);
1001
+ return this.baseBuilder.addModifier(t), this;
1002
+ }
1003
+ responsiveFontSize(e) {
1004
+ const t = l("fontSize", e);
1005
+ return this.baseBuilder.addModifier(t), this;
1006
+ }
1007
+ responsiveTextAlign(e) {
1008
+ const t = l("textAlign", e);
1009
+ return this.baseBuilder.addModifier(t), this;
1010
+ }
1011
+ // Breakpoint shorthand methods
1012
+ get base() {
1013
+ return new M("base", this, this.baseBuilder);
1014
+ }
1015
+ get sm() {
1016
+ return new M("sm", this, this.baseBuilder);
1017
+ }
1018
+ get md() {
1019
+ return new M("md", this, this.baseBuilder);
1020
+ }
1021
+ get lg() {
1022
+ return new M("lg", this, this.baseBuilder);
1023
+ }
1024
+ get xl() {
1025
+ return new M("xl", this, this.baseBuilder);
1026
+ }
1027
+ get "2xl"() {
1028
+ return new M("2xl", this, this.baseBuilder);
1029
+ }
1030
+ }
1031
+ class M {
1032
+ constructor(e, t, i) {
1033
+ this.breakpoint = e, this.parentBuilder = t, this.baseBuilder = i;
1034
+ }
1035
+ // Layout properties
1036
+ width(e) {
1037
+ const t = { [this.breakpoint]: e }, i = l("width", t);
1038
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1039
+ }
1040
+ height(e) {
1041
+ const t = { [this.breakpoint]: e }, i = l("height", t);
1042
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1043
+ }
1044
+ minWidth(e) {
1045
+ const t = { [this.breakpoint]: e }, i = l(
1046
+ "minWidth",
1047
+ t
1048
+ );
1049
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1050
+ }
1051
+ maxWidth(e) {
1052
+ const t = { [this.breakpoint]: e }, i = l(
1053
+ "maxWidth",
1054
+ t
1055
+ );
1056
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1057
+ }
1058
+ minHeight(e) {
1059
+ const t = { [this.breakpoint]: e }, i = l(
1060
+ "minHeight",
1061
+ t
1062
+ );
1063
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1064
+ }
1065
+ maxHeight(e) {
1066
+ const t = { [this.breakpoint]: e }, i = l(
1067
+ "maxHeight",
1068
+ t
1069
+ );
1070
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1071
+ }
1072
+ padding(e) {
1073
+ const t = { [this.breakpoint]: e }, i = l(
1074
+ "padding",
1075
+ t
1076
+ );
1077
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1078
+ }
1079
+ paddingHorizontal(e) {
1080
+ const t = { [this.breakpoint]: e }, i = l(
1081
+ "paddingLeft",
1082
+ t
1083
+ ), n = l(
1084
+ "paddingRight",
1085
+ t
1086
+ );
1087
+ return this.parentBuilder.addModifier(i), this.parentBuilder.addModifier(n), this.parentBuilder;
1088
+ }
1089
+ paddingVertical(e) {
1090
+ const t = { [this.breakpoint]: e }, i = l(
1091
+ "paddingTop",
1092
+ t
1093
+ ), n = l(
1094
+ "paddingBottom",
1095
+ t
1096
+ );
1097
+ return this.parentBuilder.addModifier(i), this.parentBuilder.addModifier(n), this.parentBuilder;
1098
+ }
1099
+ paddingTop(e) {
1100
+ const t = { [this.breakpoint]: e }, i = l(
1101
+ "paddingTop",
1102
+ t
1103
+ );
1104
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1105
+ }
1106
+ paddingBottom(e) {
1107
+ const t = { [this.breakpoint]: e }, i = l(
1108
+ "paddingBottom",
1109
+ t
1110
+ );
1111
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1112
+ }
1113
+ paddingLeft(e) {
1114
+ const t = { [this.breakpoint]: e }, i = l(
1115
+ "paddingLeft",
1116
+ t
1117
+ );
1118
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1119
+ }
1120
+ paddingRight(e) {
1121
+ const t = { [this.breakpoint]: e }, i = l(
1122
+ "paddingRight",
1123
+ t
1124
+ );
1125
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1126
+ }
1127
+ margin(e) {
1128
+ const t = { [this.breakpoint]: e }, i = l("margin", t);
1129
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1130
+ }
1131
+ marginHorizontal(e) {
1132
+ const t = { [this.breakpoint]: e }, i = l(
1133
+ "marginLeft",
1134
+ t
1135
+ ), n = l(
1136
+ "marginRight",
1137
+ t
1138
+ );
1139
+ return this.parentBuilder.addModifier(i), this.parentBuilder.addModifier(n), this.parentBuilder;
1140
+ }
1141
+ marginVertical(e) {
1142
+ const t = { [this.breakpoint]: e }, i = l(
1143
+ "marginTop",
1144
+ t
1145
+ ), n = l(
1146
+ "marginBottom",
1147
+ t
1148
+ );
1149
+ return this.parentBuilder.addModifier(i), this.parentBuilder.addModifier(n), this.parentBuilder;
1150
+ }
1151
+ marginTop(e) {
1152
+ const t = { [this.breakpoint]: e }, i = l(
1153
+ "marginTop",
1154
+ t
1155
+ );
1156
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1157
+ }
1158
+ marginBottom(e) {
1159
+ const t = { [this.breakpoint]: e }, i = l(
1160
+ "marginBottom",
1161
+ t
1162
+ );
1163
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1164
+ }
1165
+ marginLeft(e) {
1166
+ const t = { [this.breakpoint]: e }, i = l(
1167
+ "marginLeft",
1168
+ t
1169
+ );
1170
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1171
+ }
1172
+ marginRight(e) {
1173
+ const t = { [this.breakpoint]: e }, i = l(
1174
+ "marginRight",
1175
+ t
1176
+ );
1177
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1178
+ }
1179
+ // Typography properties
1180
+ fontSize(e) {
1181
+ const t = { [this.breakpoint]: e }, i = l(
1182
+ "fontSize",
1183
+ t
1184
+ );
1185
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1186
+ }
1187
+ textAlign(e) {
1188
+ const t = { [this.breakpoint]: e }, i = l(
1189
+ "textAlign",
1190
+ t
1191
+ );
1192
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1193
+ }
1194
+ // Display properties
1195
+ display(e) {
1196
+ const t = { [this.breakpoint]: e }, i = l(
1197
+ "display",
1198
+ t
1199
+ );
1200
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1201
+ }
1202
+ // Flexbox properties
1203
+ flexDirection(e) {
1204
+ const t = { [this.breakpoint]: e }, i = l(
1205
+ "flexDirection",
1206
+ t
1207
+ );
1208
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1209
+ }
1210
+ justifyContent(e) {
1211
+ const t = { [this.breakpoint]: e }, i = l(
1212
+ "justifyContent",
1213
+ t
1214
+ );
1215
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1216
+ }
1217
+ alignItems(e) {
1218
+ const t = { [this.breakpoint]: e }, i = l(
1219
+ "alignItems",
1220
+ t
1221
+ );
1222
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1223
+ }
1224
+ // Visual properties
1225
+ backgroundColor(e) {
1226
+ const t = { [this.breakpoint]: e }, i = l(
1227
+ "backgroundColor",
1228
+ t
1229
+ );
1230
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1231
+ }
1232
+ color(e) {
1233
+ const t = { [this.breakpoint]: e }, i = l("color", t);
1234
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1235
+ }
1236
+ opacity(e) {
1237
+ const t = { [this.breakpoint]: e }, i = l(
1238
+ "opacity",
1239
+ t
1240
+ );
1241
+ return this.parentBuilder.addModifier(i), this.parentBuilder;
1242
+ }
1243
+ }
1244
+ function Ke(r) {
1245
+ return new de(r);
1246
+ }
1247
+ function Ze(r) {
1248
+ return new de(r);
1249
+ }
1250
+ function Ye() {
1251
+ const r = y(), e = m(() => w());
1252
+ return {
1253
+ current: r,
1254
+ context: e,
1255
+ isAbove: (s) => m(
1256
+ () => v(r()) > v(s)
1257
+ ),
1258
+ isBelow: (s) => m(
1259
+ () => v(r()) < v(s)
1260
+ ),
1261
+ isBetween: (s, a) => m(() => {
1262
+ const d = v(r()), c = v(s), u = v(a);
1263
+ return d >= c && d <= u;
1264
+ }),
1265
+ matches: (s) => {
1266
+ const [a, d] = T(!1);
1267
+ if (typeof window < "u") {
1268
+ const c = window.matchMedia(s);
1269
+ d(c.matches);
1270
+ const u = (p) => d(p.matches);
1271
+ c.addEventListener("change", u);
1272
+ }
1273
+ return a;
1274
+ }
1275
+ };
1276
+ }
1277
+ function Xe(r) {
1278
+ const [e, t] = T(!1);
1279
+ if (typeof window < "u") {
1280
+ const i = window.matchMedia(r);
1281
+ t(i.matches);
1282
+ const n = (o) => t(o.matches);
1283
+ i.addEventListener("change", n);
1284
+ }
1285
+ return e;
1286
+ }
1287
+ function Je(r) {
1288
+ const e = y();
1289
+ return m(() => {
1290
+ if (!x(r))
1291
+ return r;
1292
+ const t = e(), i = r, n = [
1293
+ "base",
1294
+ "sm",
1295
+ "md",
1296
+ "lg",
1297
+ "xl",
1298
+ "2xl"
1299
+ ], o = n.indexOf(t);
1300
+ for (let s = o; s >= 0; s--) {
1301
+ const a = n[s];
1302
+ if (i[a] !== void 0)
1303
+ return i[a];
1304
+ }
1305
+ for (const s of n)
1306
+ if (i[s] !== void 0)
1307
+ return i[s];
1308
+ throw new Error("No responsive value found for any breakpoint");
1309
+ });
1310
+ }
1311
+ function et(r, e) {
1312
+ if (!x(r))
1313
+ return r;
1314
+ const t = r, i = e || y()(), n = [
1315
+ "base",
1316
+ "sm",
1317
+ "md",
1318
+ "lg",
1319
+ "xl",
1320
+ "2xl"
1321
+ ], o = n.indexOf(i);
1322
+ for (let s = o; s >= 0; s--) {
1323
+ const a = n[s];
1324
+ if (t[a] !== void 0)
1325
+ return t[a];
1326
+ }
1327
+ for (const s of n)
1328
+ if (t[s] !== void 0)
1329
+ return t[s];
1330
+ throw new Error("No responsive value found for any breakpoint");
1331
+ }
1332
+ function tt(r, e) {
1333
+ const t = {};
1334
+ for (const [i, n] of Object.entries(e))
1335
+ if (x(n)) {
1336
+ const o = n;
1337
+ for (const [s, a] of Object.entries(o))
1338
+ if (a !== void 0) {
1339
+ const d = s === "base" ? `--${r}-${i}` : `--${r}-${i}-${s}`;
1340
+ t[d] = a.toString();
1341
+ }
1342
+ } else
1343
+ t[`--${r}-${i}`] = n.toString();
1344
+ return t;
1345
+ }
1346
+ const g = {
1347
+ // Viewport size queries
1348
+ mobile: "(max-width: 767px)",
1349
+ tablet: "(min-width: 768px) and (max-width: 1023px)",
1350
+ desktop: "(min-width: 1024px)",
1351
+ // Device orientation
1352
+ landscape: "(orientation: landscape)",
1353
+ portrait: "(orientation: portrait)",
1354
+ // Device pixel density
1355
+ highDPI: "(min-resolution: 2dppx)",
1356
+ lowDPI: "(max-resolution: 1dppx)",
1357
+ retinaDisplay: "(min-resolution: 2dppx)",
1358
+ standardDisplay: "(max-resolution: 1.9dppx)",
1359
+ // Color scheme preference
1360
+ darkMode: "(prefers-color-scheme: dark)",
1361
+ lightMode: "(prefers-color-scheme: light)",
1362
+ noColorSchemePreference: "(prefers-color-scheme: no-preference)",
1363
+ // Reduced motion preference
1364
+ reducedMotion: "(prefers-reduced-motion: reduce)",
1365
+ allowMotion: "(prefers-reduced-motion: no-preference)",
1366
+ // Contrast preference (accessibility)
1367
+ highContrast: "(prefers-contrast: high)",
1368
+ lowContrast: "(prefers-contrast: low)",
1369
+ normalContrast: "(prefers-contrast: no-preference)",
1370
+ // Data usage preference
1371
+ reduceData: "(prefers-reduced-data: reduce)",
1372
+ allowData: "(prefers-reduced-data: no-preference)",
1373
+ // Transparency preference
1374
+ reduceTransparency: "(prefers-reduced-transparency: reduce)",
1375
+ allowTransparency: "(prefers-reduced-transparency: no-preference)",
1376
+ // Hover capability
1377
+ canHover: "(hover: hover)",
1378
+ noHover: "(hover: none)",
1379
+ // Pointer capability
1380
+ finePointer: "(pointer: fine)",
1381
+ // Mouse, trackpad
1382
+ coarsePointer: "(pointer: coarse)",
1383
+ // Touch
1384
+ // Any-hover (any input can hover)
1385
+ anyCanHover: "(any-hover: hover)",
1386
+ anyNoHover: "(any-hover: none)",
1387
+ // Any-pointer (any input type)
1388
+ anyFinePointer: "(any-pointer: fine)",
1389
+ anyCoarsePointer: "(any-pointer: coarse)",
1390
+ // Update preference
1391
+ slowUpdate: "(update: slow)",
1392
+ // E-ink displays
1393
+ fastUpdate: "(update: fast)",
1394
+ // Standard displays
1395
+ // Overflow-block capability
1396
+ blockScrolling: "(overflow-block: scroll)",
1397
+ blockPaged: "(overflow-block: paged)",
1398
+ // Overflow-inline capability
1399
+ inlineScrolling: "(overflow-inline: scroll)",
1400
+ // Forced colors (high contrast mode)
1401
+ forcedColors: "(forced-colors: active)",
1402
+ normalColors: "(forced-colors: none)",
1403
+ // Inverted colors
1404
+ invertedColors: "(inverted-colors: inverted)",
1405
+ normalInvertedColors: "(inverted-colors: none)",
1406
+ // Scripting capability
1407
+ scriptingEnabled: "(scripting: enabled)",
1408
+ scriptingDisabled: "(scripting: none)",
1409
+ scriptingInitialOnly: "(scripting: initial-only)",
1410
+ // Container queries (future)
1411
+ containerSmall: "(max-width: 400px)",
1412
+ containerMedium: "(min-width: 401px) and (max-width: 800px)",
1413
+ containerLarge: "(min-width: 801px)",
1414
+ // Custom breakpoint builders
1415
+ minWidth: (r) => `(min-width: ${r}${typeof r == "number" ? "px" : ""})`,
1416
+ maxWidth: (r) => `(max-width: ${r}${typeof r == "number" ? "px" : ""})`,
1417
+ between: (r, e) => `(min-width: ${r}${typeof r == "number" ? "px" : ""}) and (max-width: ${e}${typeof e == "number" ? "px" : ""})`,
1418
+ // Height-based queries
1419
+ minHeight: (r) => `(min-height: ${r}${typeof r == "number" ? "px" : ""})`,
1420
+ maxHeight: (r) => `(max-height: ${r}${typeof r == "number" ? "px" : ""})`,
1421
+ heightBetween: (r, e) => `(min-height: ${r}${typeof r == "number" ? "px" : ""}) and (max-height: ${e}${typeof e == "number" ? "px" : ""})`,
1422
+ // Aspect ratio queries
1423
+ square: "(aspect-ratio: 1/1)",
1424
+ landscape16_9: "(aspect-ratio: 16/9)",
1425
+ portrait9_16: "(aspect-ratio: 9/16)",
1426
+ widescreen: "(min-aspect-ratio: 16/9)",
1427
+ tallscreen: "(max-aspect-ratio: 9/16)",
1428
+ customAspectRatio: (r) => `(aspect-ratio: ${r})`,
1429
+ minAspectRatio: (r) => `(min-aspect-ratio: ${r})`,
1430
+ maxAspectRatio: (r) => `(max-aspect-ratio: ${r})`,
1431
+ // Resolution queries
1432
+ lowRes: "(max-resolution: 120dpi)",
1433
+ standardRes: "(min-resolution: 120dpi) and (max-resolution: 192dpi)",
1434
+ highRes: "(min-resolution: 192dpi)",
1435
+ customResolution: (r) => `(min-resolution: ${r}dpi)`,
1436
+ // Print media
1437
+ print: "print",
1438
+ screen: "screen",
1439
+ speech: "speech",
1440
+ // Device-specific queries (common patterns)
1441
+ iPhone: "(max-width: 428px)",
1442
+ iPad: "(min-width: 768px) and (max-width: 1024px)",
1443
+ desktopSmall: "(min-width: 1024px) and (max-width: 1440px)",
1444
+ desktopLarge: "(min-width: 1440px)",
1445
+ // Special conditions
1446
+ touchDevice: "(pointer: coarse)",
1447
+ mouseDevice: "(pointer: fine)",
1448
+ keyboardNavigation: "(hover: none) and (pointer: coarse)",
1449
+ // Modern display features
1450
+ wideColorGamut: "(color-gamut: p3)",
1451
+ standardColorGamut: "(color-gamut: srgb)",
1452
+ hdr: "(dynamic-range: high)",
1453
+ sdr: "(dynamic-range: standard)"
1454
+ };
1455
+ function it(...r) {
1456
+ return r.filter((e) => e).join(" and ");
1457
+ }
1458
+ function nt(...r) {
1459
+ return r.filter((e) => e).join(", ");
1460
+ }
1461
+ function rt(r) {
1462
+ const e = y();
1463
+ return m(() => {
1464
+ const t = e();
1465
+ return !(r.hideOn && r.hideOn.includes(t) || r.showOn && !r.showOn.includes(t));
1466
+ });
1467
+ }
1468
+ function Be() {
1469
+ if (typeof window > "u") return;
1470
+ const r = w();
1471
+ console.group("🔍 tachUI Responsive State"), console.log("Current breakpoint:", r.current), console.log("Viewport dimensions:", `${r.width}x${r.height}`), console.log("Available breakpoints:", ["base", "sm", "md", "lg", "xl", "2xl"]);
1472
+ const e = {
1473
+ Mobile: g.mobile,
1474
+ Tablet: g.tablet,
1475
+ Desktop: g.desktop,
1476
+ "Dark mode": g.darkMode,
1477
+ "Reduced motion": g.reducedMotion,
1478
+ "Can hover": g.canHover
1479
+ };
1480
+ console.log("Media query matches:");
1481
+ for (const [t, i] of Object.entries(e))
1482
+ console.log(` ${t}: ${window.matchMedia(i).matches}`);
1483
+ console.groupEnd();
1484
+ }
1485
+ function st(r = {}) {
1486
+ if (typeof window > "u" || process.env.NODE_ENV === "production")
1487
+ return;
1488
+ const {
1489
+ position: e = "top-right",
1490
+ showDimensions: t = !0,
1491
+ showBreakpoint: i = !0
1492
+ } = r, n = document.createElement("div");
1493
+ n.id = "tachui-responsive-debug", n.style.cssText = `
1494
+ position: fixed;
1495
+ ${e.includes("top") ? "top: 10px" : "bottom: 10px"};
1496
+ ${e.includes("right") ? "right: 10px" : "left: 10px"};
1497
+ background: rgba(0, 0, 0, 0.8);
1498
+ color: white;
1499
+ padding: 8px 12px;
1500
+ border-radius: 4px;
1501
+ font-family: monospace;
1502
+ font-size: 12px;
1503
+ z-index: 9999;
1504
+ pointer-events: none;
1505
+ white-space: pre-line;
1506
+ `, document.body.appendChild(n);
1507
+ function o() {
1508
+ const s = w();
1509
+ let a = "";
1510
+ i && (a += `Breakpoint: ${s.current}`), t && (a && (a += `
1511
+ `), a += `Size: ${s.width}×${s.height}`), n.textContent = a;
1512
+ }
1513
+ o(), window.addEventListener("resize", o), Be();
1514
+ }
1515
+ class ke {
1516
+ /**
1517
+ * Create a responsive grid with automatic column sizing
1518
+ */
1519
+ static autoFit(e) {
1520
+ const t = {};
1521
+ if (typeof e.minColumnWidth == "object") {
1522
+ t.gridTemplateColumns = {};
1523
+ for (const [i, n] of Object.entries(e.minColumnWidth)) {
1524
+ const o = typeof n == "number" ? `${n}px` : n, s = e.maxColumns && typeof e.maxColumns == "object" ? e.maxColumns[i] || "auto" : e.maxColumns || "auto";
1525
+ t.gridTemplateColumns[i] = s === "auto" ? `repeat(auto-fit, minmax(${o}, 1fr))` : `repeat(${s}, minmax(${o}, 1fr))`;
1526
+ }
1527
+ } else {
1528
+ const i = typeof e.minColumnWidth == "number" ? `${e.minColumnWidth}px` : e.minColumnWidth, n = e.maxColumns || "auto";
1529
+ t.gridTemplateColumns = n === "auto" ? `repeat(auto-fit, minmax(${i}, 1fr))` : `repeat(${n}, minmax(${i}, 1fr))`;
1530
+ }
1531
+ return e.gap && (t.gap = e.gap), t.display = "grid", h(t);
1532
+ }
1533
+ /**
1534
+ * Create a responsive grid with explicit column counts
1535
+ */
1536
+ static columns(e, t) {
1537
+ const i = {
1538
+ display: "grid",
1539
+ gridTemplateColumns: typeof e == "object" ? Object.fromEntries(
1540
+ Object.entries(e).map(([n, o]) => [
1541
+ n,
1542
+ `repeat(${o}, 1fr)`
1543
+ ])
1544
+ ) : `repeat(${e}, 1fr)`
1545
+ };
1546
+ return t?.gap && (i.gap = t.gap), t?.rowGap && (i.rowGap = t.rowGap), t?.autoRows && (i.gridAutoRows = t.autoRows), h(i);
1547
+ }
1548
+ /**
1549
+ * Create responsive masonry-style grid
1550
+ */
1551
+ static masonry(e) {
1552
+ const t = {
1553
+ display: "grid",
1554
+ gridTemplateColumns: typeof e.columns == "object" ? Object.fromEntries(
1555
+ Object.entries(e.columns).map(([i, n]) => [
1556
+ i,
1557
+ `repeat(${n}, 1fr)`
1558
+ ])
1559
+ ) : `repeat(${e.columns}, 1fr)`,
1560
+ gridAutoRows: "max-content"
1561
+ };
1562
+ return e.gap && (t.gap = e.gap), h(t);
1563
+ }
1564
+ }
1565
+ class ot {
1566
+ /**
1567
+ * Create a responsive flex container that stacks on mobile, flows horizontally on desktop
1568
+ */
1569
+ static stackToRow(e) {
1570
+ const i = {
1571
+ display: "flex",
1572
+ flexDirection: {
1573
+ base: "column",
1574
+ [e?.stackBreakpoint || "md"]: "row"
1575
+ }
1576
+ };
1577
+ return e?.gap && (i.gap = e.gap), e?.align && (i.alignItems = e.align), e?.justify && (i.justifyContent = e.justify), h(i);
1578
+ }
1579
+ /**
1580
+ * Create a responsive flex container with wrapping behavior
1581
+ */
1582
+ static wrap(e) {
1583
+ const t = {
1584
+ display: "flex",
1585
+ flexWrap: "wrap",
1586
+ ...e
1587
+ };
1588
+ return h(t);
1589
+ }
1590
+ /**
1591
+ * Create centered flex layout
1592
+ */
1593
+ static center(e = "row") {
1594
+ return h({
1595
+ display: "flex",
1596
+ flexDirection: e,
1597
+ justifyContent: "center",
1598
+ alignItems: "center"
1599
+ });
1600
+ }
1601
+ /**
1602
+ * Create space-between flex layout
1603
+ */
1604
+ static spaceBetween(e = "row") {
1605
+ return h({
1606
+ display: "flex",
1607
+ flexDirection: e,
1608
+ justifyContent: "space-between",
1609
+ alignItems: "center"
1610
+ });
1611
+ }
1612
+ }
1613
+ class at {
1614
+ /**
1615
+ * Create a responsive container with max-width constraints
1616
+ */
1617
+ static container(e) {
1618
+ const t = {
1619
+ width: "100%",
1620
+ marginLeft: "auto",
1621
+ marginRight: "auto"
1622
+ };
1623
+ return e?.maxWidth ? t.maxWidth = e.maxWidth : t.maxWidth = {
1624
+ sm: "640px",
1625
+ md: "768px",
1626
+ lg: "1024px",
1627
+ xl: "1280px",
1628
+ "2xl": "1536px"
1629
+ }, e?.padding && (t.paddingLeft = e.padding, t.paddingRight = e.padding), e?.margin && (t.marginTop = e.margin, t.marginBottom = e.margin), h(t);
1630
+ }
1631
+ /**
1632
+ * Create a full-width container that breaks out of constraints
1633
+ */
1634
+ static fullWidth() {
1635
+ return h({
1636
+ width: "100vw",
1637
+ marginLeft: "calc(-50vw + 50%)",
1638
+ marginRight: "calc(-50vw + 50%)"
1639
+ });
1640
+ }
1641
+ /**
1642
+ * Create a section container with responsive padding
1643
+ */
1644
+ static section(e) {
1645
+ const t = {};
1646
+ return e?.paddingY && (t.paddingTop = e.paddingY, t.paddingBottom = e.paddingY), e?.paddingX && (t.paddingLeft = e.paddingX, t.paddingRight = e.paddingX), e?.maxWidth && (t.maxWidth = e.maxWidth, t.marginLeft = "auto", t.marginRight = "auto"), h(t);
1647
+ }
1648
+ }
1649
+ class dt {
1650
+ /**
1651
+ * Show element only on specific breakpoints
1652
+ */
1653
+ static showOn(e) {
1654
+ const t = {
1655
+ display: {}
1656
+ // Start with empty object
1657
+ };
1658
+ for (const i of e)
1659
+ t.display[i] = "block";
1660
+ return h(t);
1661
+ }
1662
+ /**
1663
+ * Hide element only on specific breakpoints
1664
+ */
1665
+ static hideOn(e) {
1666
+ const t = {
1667
+ display: {}
1668
+ // Start with empty object
1669
+ };
1670
+ for (const i of e)
1671
+ t.display[i] = "none";
1672
+ return h(t);
1673
+ }
1674
+ /**
1675
+ * Show on mobile, hide on desktop
1676
+ */
1677
+ static mobileOnly() {
1678
+ return h({
1679
+ display: {
1680
+ base: "block",
1681
+ md: "none"
1682
+ }
1683
+ });
1684
+ }
1685
+ /**
1686
+ * Hide on mobile, show on desktop
1687
+ */
1688
+ static desktopOnly() {
1689
+ return h({
1690
+ display: {
1691
+ base: "none",
1692
+ md: "block"
1693
+ }
1694
+ });
1695
+ }
1696
+ /**
1697
+ * Show only on tablet breakpoint
1698
+ */
1699
+ static tabletOnly() {
1700
+ return h({
1701
+ display: {
1702
+ base: "none",
1703
+ md: "block",
1704
+ lg: "none"
1705
+ }
1706
+ });
1707
+ }
1708
+ }
1709
+ class ct {
1710
+ /**
1711
+ * Create responsive padding
1712
+ */
1713
+ static padding(e) {
1714
+ const t = {};
1715
+ return e.all && (t.padding = e.all), e.horizontal && (t.paddingLeft = e.horizontal, t.paddingRight = e.horizontal), e.vertical && (t.paddingTop = e.vertical, t.paddingBottom = e.vertical), e.top && (t.paddingTop = e.top), e.right && (t.paddingRight = e.right), e.bottom && (t.paddingBottom = e.bottom), e.left && (t.paddingLeft = e.left), h(t);
1716
+ }
1717
+ /**
1718
+ * Create responsive margin
1719
+ */
1720
+ static margin(e) {
1721
+ const t = {};
1722
+ return e.all && (t.margin = e.all), e.horizontal && (t.marginLeft = e.horizontal, t.marginRight = e.horizontal), e.vertical && (t.marginTop = e.vertical, t.marginBottom = e.vertical), e.top && (t.marginTop = e.top), e.right && (t.marginRight = e.right), e.bottom && (t.marginBottom = e.bottom), e.left && (t.marginLeft = e.left), h(t);
1723
+ }
1724
+ /**
1725
+ * Create responsive gap (for flexbox and grid)
1726
+ */
1727
+ static gap(e) {
1728
+ const t = {};
1729
+ return e.all && (t.gap = e.all), e.column && (t.columnGap = e.column), e.row && (t.rowGap = e.row), h(t);
1730
+ }
1731
+ }
1732
+ class lt {
1733
+ /**
1734
+ * Create responsive font scale
1735
+ */
1736
+ static scale(e) {
1737
+ const t = {
1738
+ fontSize: e.base
1739
+ };
1740
+ if (e.scale && typeof e.scale == "object") {
1741
+ t.fontSize = {};
1742
+ for (const [i, n] of Object.entries(e.scale)) {
1743
+ const o = typeof e.base == "number" ? e.base : parseFloat(e.base);
1744
+ t.fontSize[i] = `${o * n}px`;
1745
+ }
1746
+ }
1747
+ return e.lineHeight && (t.lineHeight = e.lineHeight), h(t);
1748
+ }
1749
+ /**
1750
+ * Create fluid typography that scales smoothly
1751
+ */
1752
+ static fluid(e) {
1753
+ const t = e.minBreakpoint || "320px", i = e.maxBreakpoint || "1200px", n = typeof e.minSize == "number" ? `${e.minSize}px` : e.minSize, o = typeof e.maxSize == "number" ? `${e.maxSize}px` : e.maxSize;
1754
+ return h({
1755
+ fontSize: `clamp(${n}, calc(${n} + (${o} - ${n}) * ((100vw - ${t}) / (${i} - ${t}))), ${o})`
1756
+ });
1757
+ }
1758
+ }
1759
+ const ut = {
1760
+ /**
1761
+ * Sidebar layout that collapses on mobile
1762
+ */
1763
+ sidebar: (r) => {
1764
+ const e = r?.collapseBreakpoint || "md", t = r?.sidebarWidth || "250px";
1765
+ return h({
1766
+ display: "grid",
1767
+ gridTemplateColumns: {
1768
+ base: "1fr",
1769
+ [e]: `${t} 1fr`
1770
+ },
1771
+ gap: r?.gap || "1rem"
1772
+ });
1773
+ },
1774
+ /**
1775
+ * Holy grail layout (header, footer, sidebar, main content)
1776
+ */
1777
+ holyGrail: (r) => {
1778
+ const e = r?.collapseBreakpoint || "lg";
1779
+ return h({
1780
+ display: "grid",
1781
+ gridTemplateAreas: {
1782
+ base: '"header" "main" "footer"',
1783
+ [e]: '"header header" "sidebar main" "footer footer"'
1784
+ },
1785
+ gridTemplateRows: {
1786
+ base: `${r?.headerHeight || "auto"} 1fr ${r?.footerHeight || "auto"}`,
1787
+ [e]: `${r?.headerHeight || "auto"} 1fr ${r?.footerHeight || "auto"}`
1788
+ },
1789
+ gridTemplateColumns: {
1790
+ base: "1fr",
1791
+ [e]: `${r?.sidebarWidth || "250px"} 1fr`
1792
+ },
1793
+ minHeight: "100vh"
1794
+ });
1795
+ },
1796
+ /**
1797
+ * Card grid layout
1798
+ */
1799
+ cardGrid: (r) => ke.autoFit({
1800
+ minColumnWidth: r?.minCardWidth || "300px",
1801
+ gap: r?.gap || "1rem",
1802
+ maxColumns: r?.maxColumns
1803
+ }),
1804
+ /**
1805
+ * Hero section layout
1806
+ */
1807
+ hero: (r) => h({
1808
+ display: "flex",
1809
+ flexDirection: "column",
1810
+ justifyContent: "center",
1811
+ alignItems: "center",
1812
+ textAlign: r?.textAlign || "center",
1813
+ minHeight: r?.minHeight || "50vh",
1814
+ padding: r?.padding || "2rem"
1815
+ })
1816
+ };
1817
+ class $ {
1818
+ /**
1819
+ * Create a responsive value resolver with custom logic
1820
+ */
1821
+ static createResponsiveResolver(e, t = []) {
1822
+ const i = y();
1823
+ return m(() => {
1824
+ t.forEach((s) => s());
1825
+ const n = i(), o = w();
1826
+ return e(n, o);
1827
+ });
1828
+ }
1829
+ /**
1830
+ * Create responsive value that interpolates between breakpoints
1831
+ */
1832
+ static createInterpolatedValue(e, t = {}) {
1833
+ const { smoothing: i = "linear", clamp: n = !0 } = t;
1834
+ return m(() => {
1835
+ const s = w().width, a = L(), d = [];
1836
+ for (const [b, S] of Object.entries(e))
1837
+ if (S !== void 0) {
1838
+ const B = b === "base" ? 0 : parseInt(a[b] || "0");
1839
+ d.push({ width: B, value: S });
1840
+ }
1841
+ if (d.sort((b, S) => b.width - S.width), d.length === 0) return 0;
1842
+ if (d.length === 1) return d[0].value;
1843
+ let c = d[0], u = d[d.length - 1];
1844
+ for (let b = 0; b < d.length - 1; b++)
1845
+ if (s >= d[b].width && s <= d[b + 1].width) {
1846
+ c = d[b], u = d[b + 1];
1847
+ break;
1848
+ }
1849
+ if (n) {
1850
+ if (s <= c.width) return c.value;
1851
+ if (s >= u.width) return u.value;
1852
+ }
1853
+ const p = (s - c.width) / (u.width - c.width);
1854
+ let f = p;
1855
+ switch (i) {
1856
+ case "ease":
1857
+ f = 0.5 - 0.5 * Math.cos(p * Math.PI);
1858
+ break;
1859
+ case "ease-in":
1860
+ f = p * p;
1861
+ break;
1862
+ case "ease-out":
1863
+ f = 1 - (1 - p) * (1 - p);
1864
+ break;
1865
+ case "linear":
1866
+ default:
1867
+ f = p;
1868
+ break;
1869
+ }
1870
+ return c.value + (u.value - c.value) * f;
1871
+ });
1872
+ }
1873
+ /**
1874
+ * Create conditional responsive behavior
1875
+ */
1876
+ static createConditionalResponsive(e, t, i) {
1877
+ const n = y();
1878
+ return m(() => {
1879
+ const o = w(), a = e(o) ? t : i;
1880
+ return this.resolveResponsiveValue(a, n());
1881
+ });
1882
+ }
1883
+ /**
1884
+ * Resolve responsive value at specific breakpoint
1885
+ */
1886
+ static resolveResponsiveValue(e, t) {
1887
+ if (!x(e))
1888
+ return e;
1889
+ const i = e, n = [
1890
+ "base",
1891
+ "sm",
1892
+ "md",
1893
+ "lg",
1894
+ "xl",
1895
+ "2xl"
1896
+ ], o = n.indexOf(t);
1897
+ for (let s = o; s >= 0; s--) {
1898
+ const a = n[s];
1899
+ if (i[a] !== void 0)
1900
+ return i[a];
1901
+ }
1902
+ for (const s of n)
1903
+ if (i[s] !== void 0)
1904
+ return i[s];
1905
+ throw new Error("No responsive value found");
1906
+ }
1907
+ }
1908
+ class Re {
1909
+ /**
1910
+ * Hook for responsive arrays (e.g., responsive grid columns data)
1911
+ */
1912
+ static useResponsiveArray(e) {
1913
+ const t = y();
1914
+ return m(() => {
1915
+ const i = t();
1916
+ return $.resolveResponsiveValue(e, i) || [];
1917
+ });
1918
+ }
1919
+ /**
1920
+ * Hook for responsive object selection
1921
+ */
1922
+ static useResponsiveObject(e) {
1923
+ const t = y();
1924
+ return m(() => {
1925
+ const i = t();
1926
+ try {
1927
+ return $.resolveResponsiveValue(
1928
+ e,
1929
+ i
1930
+ );
1931
+ } catch {
1932
+ return null;
1933
+ }
1934
+ });
1935
+ }
1936
+ /**
1937
+ * Hook for responsive function selection and execution
1938
+ */
1939
+ static useResponsiveFunction(e) {
1940
+ const t = y();
1941
+ return m(() => {
1942
+ const i = t();
1943
+ try {
1944
+ return $.resolveResponsiveValue(
1945
+ e,
1946
+ i
1947
+ );
1948
+ } catch {
1949
+ return null;
1950
+ }
1951
+ });
1952
+ }
1953
+ /**
1954
+ * Hook for responsive state management
1955
+ */
1956
+ static useResponsiveState(e) {
1957
+ const [t, i] = T(e), n = y();
1958
+ return [m(() => {
1959
+ const a = t(), d = n();
1960
+ try {
1961
+ return $.resolveResponsiveValue(
1962
+ a,
1963
+ d
1964
+ );
1965
+ } catch {
1966
+ return;
1967
+ }
1968
+ }), (a) => {
1969
+ x(a) ? i(a) : i({ [n()]: a });
1970
+ }];
1971
+ }
1972
+ /**
1973
+ * Hook for responsive computations with memoization
1974
+ */
1975
+ static useResponsiveComputation(e, t = []) {
1976
+ return ue(() => {
1977
+ t.forEach((n) => n());
1978
+ const i = w();
1979
+ return e(i);
1980
+ });
1981
+ }
1982
+ /**
1983
+ * Hook for responsive side effects
1984
+ */
1985
+ static useResponsiveEffect(e, t = []) {
1986
+ let i, n;
1987
+ O(() => {
1988
+ t.forEach((a) => a());
1989
+ const o = w();
1990
+ i && (i(), i = void 0);
1991
+ const s = e(o, n);
1992
+ typeof s == "function" && (i = s), n = o;
1993
+ });
1994
+ }
1995
+ }
1996
+ class Me {
1997
+ /**
1998
+ * Execute callback only on specific breakpoints
1999
+ */
2000
+ static onBreakpoints(e, t) {
2001
+ let i;
2002
+ return O(() => {
2003
+ const n = w();
2004
+ if (e.includes(n.current)) {
2005
+ i && (i(), i = void 0);
2006
+ const o = t(n);
2007
+ typeof o == "function" && (i = o);
2008
+ }
2009
+ }), () => {
2010
+ i && i();
2011
+ };
2012
+ }
2013
+ /**
2014
+ * Execute callback when breakpoint changes
2015
+ */
2016
+ static onBreakpointChange(e) {
2017
+ let t;
2018
+ return O(() => {
2019
+ const i = w(), n = i.current;
2020
+ t && t !== n && e(n, t, i), t = n;
2021
+ }), () => {
2022
+ };
2023
+ }
2024
+ /**
2025
+ * Execute callback when entering/leaving specific breakpoint ranges
2026
+ */
2027
+ static onBreakpointRange(e, t, i) {
2028
+ let n = !1, o, s;
2029
+ return O(() => {
2030
+ const a = w(), d = v(a.current), c = v(e), u = v(t), p = d >= c && d <= u;
2031
+ if (p && !n) {
2032
+ if (i.onEnter) {
2033
+ const f = i.onEnter(a);
2034
+ typeof f == "function" && (s = f);
2035
+ }
2036
+ n = !0;
2037
+ } else !p && n && (s && (s(), s = void 0), o && (o(), o = void 0), i.onLeave && i.onLeave(a), n = !1);
2038
+ if (p && i.onWithin) {
2039
+ o && (o(), o = void 0);
2040
+ const f = i.onWithin(a);
2041
+ typeof f == "function" && (o = f);
2042
+ }
2043
+ }), () => {
2044
+ s && s(), o && o();
2045
+ };
2046
+ }
2047
+ }
2048
+ class Oe {
2049
+ /**
2050
+ * Create responsive pagination
2051
+ */
2052
+ static createResponsivePagination(e, t) {
2053
+ const [i, n] = T(1), o = y(), s = m(() => {
2054
+ const S = o();
2055
+ return $.resolveResponsiveValue(
2056
+ t,
2057
+ S
2058
+ );
2059
+ }), a = m(() => Math.ceil(e.length / s())), d = m(() => {
2060
+ const S = s(), j = (i() - 1) * S, ce = j + S;
2061
+ return e.slice(j, ce);
2062
+ }), c = m(
2063
+ () => i() < a()
2064
+ ), u = m(() => i() > 1), p = (S) => {
2065
+ const B = a();
2066
+ n(Math.max(1, Math.min(S, B)));
2067
+ }, f = () => {
2068
+ c() && n(i() + 1);
2069
+ }, b = () => {
2070
+ u() && n(i() - 1);
2071
+ };
2072
+ return O(() => {
2073
+ s(), n(1);
2074
+ }), {
2075
+ currentPage: i,
2076
+ totalPages: a,
2077
+ currentItems: d,
2078
+ setPage: p,
2079
+ nextPage: f,
2080
+ prevPage: b,
2081
+ hasNext: c,
2082
+ hasPrev: u
2083
+ };
2084
+ }
2085
+ /**
2086
+ * Create responsive filtering
2087
+ */
2088
+ static createResponsiveFilter(e, t) {
2089
+ const i = y();
2090
+ return m(() => {
2091
+ const n = i(), o = $.resolveResponsiveValue(
2092
+ t,
2093
+ n
2094
+ );
2095
+ return o ? e.filter(o) : e;
2096
+ });
2097
+ }
2098
+ /**
2099
+ * Create responsive sorting
2100
+ */
2101
+ static createResponsiveSort(e, t) {
2102
+ const i = y();
2103
+ return m(() => {
2104
+ const n = i(), o = $.resolveResponsiveValue(
2105
+ t,
2106
+ n
2107
+ );
2108
+ return o ? [...e].sort(o) : e;
2109
+ });
2110
+ }
2111
+ }
2112
+ const pt = {
2113
+ Breakpoints: $,
2114
+ Hooks: Re,
2115
+ Targeting: Me,
2116
+ Data: Oe
2117
+ };
2118
+ class R {
2119
+ static isEnabled = !1;
2120
+ static debugOverlay = null;
2121
+ static logLevel = "info";
2122
+ /**
2123
+ * Enable responsive development tools
2124
+ */
2125
+ static enable(e = {}) {
2126
+ if (process.env.NODE_ENV === "production") {
2127
+ console.warn("ResponsiveDevTools: Not enabling in production mode");
2128
+ return;
2129
+ }
2130
+ this.isEnabled = !0, this.logLevel = e.logLevel || "info", this.log("info", "ResponsiveDevTools: Enabled"), e.showOverlay && this.createDebugOverlay(e), e.highlightResponsiveElements && this.enableElementHighlighting(), e.showPerformance && this.enablePerformanceMonitoring(), this.logResponsiveState();
2131
+ }
2132
+ /**
2133
+ * Disable responsive development tools
2134
+ */
2135
+ static disable() {
2136
+ this.isEnabled = !1, this.debugOverlay && (this.debugOverlay.remove(), this.debugOverlay = null), this.disableElementHighlighting(), this.log("info", "ResponsiveDevTools: Disabled");
2137
+ }
2138
+ /**
2139
+ * Check if development tools are enabled
2140
+ */
2141
+ static get enabled() {
2142
+ return this.isEnabled && process.env.NODE_ENV !== "production";
2143
+ }
2144
+ /**
2145
+ * Log responsive information
2146
+ */
2147
+ static log(e, ...t) {
2148
+ if (!this.enabled) return;
2149
+ const i = ["error", "warn", "info", "debug"], n = i.indexOf(this.logLevel);
2150
+ i.indexOf(e) <= n && console[e]("[ResponsiveDevTools]", ...t);
2151
+ }
2152
+ /**
2153
+ * Create visual debug overlay
2154
+ */
2155
+ static createDebugOverlay(e) {
2156
+ if (typeof document > "u") return;
2157
+ const t = e.position || "top-right";
2158
+ this.debugOverlay = document.createElement("div"), this.debugOverlay.id = "tachui-responsive-debug", this.debugOverlay.style.cssText = `
2159
+ position: fixed;
2160
+ ${t.includes("top") ? "top: 10px" : "bottom: 10px"};
2161
+ ${t.includes("right") ? "right: 10px" : "left: 10px"};
2162
+ background: rgba(0, 0, 0, 0.9);
2163
+ color: white;
2164
+ padding: 12px;
2165
+ border-radius: 8px;
2166
+ font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
2167
+ font-size: 12px;
2168
+ z-index: 10000;
2169
+ pointer-events: auto;
2170
+ cursor: pointer;
2171
+ max-width: 300px;
2172
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
2173
+ border: 1px solid rgba(255, 255, 255, 0.1);
2174
+ `;
2175
+ const i = document.createElement("div");
2176
+ i.textContent = "×", i.style.cssText = `
2177
+ position: absolute;
2178
+ top: 4px;
2179
+ right: 8px;
2180
+ cursor: pointer;
2181
+ font-size: 16px;
2182
+ color: #ff6b6b;
2183
+ `, i.onclick = () => this.disable(), this.debugOverlay.appendChild(i), document.body.appendChild(this.debugOverlay), this.updateDebugOverlay(e);
2184
+ let n;
2185
+ window.addEventListener("resize", () => {
2186
+ clearTimeout(n), n = window.setTimeout(() => {
2187
+ this.updateDebugOverlay(e);
2188
+ }, 100);
2189
+ });
2190
+ }
2191
+ /**
2192
+ * Update debug overlay content
2193
+ */
2194
+ static updateDebugOverlay(e) {
2195
+ if (!this.debugOverlay) return;
2196
+ const t = w(), i = L();
2197
+ let n = `
2198
+ <div style="margin-bottom: 8px; font-weight: bold; color: #4fc3f7;">
2199
+ 📱 Responsive Debug
2200
+ </div>
2201
+ `;
2202
+ if (n += `
2203
+ <div style="margin-bottom: 6px;">
2204
+ <strong>Current:</strong> <span style="color: #66bb6a;">${t.current}</span>
2205
+ </div>
2206
+ <div style="margin-bottom: 6px;">
2207
+ <strong>Size:</strong> ${t.width}×${t.height}
2208
+ </div>
2209
+ `, e.showBreakpoints) {
2210
+ n += '<div style="margin: 8px 0; font-weight: bold; color: #ffb74d;">Breakpoints:</div>';
2211
+ for (const [s, a] of Object.entries(i)) {
2212
+ const d = s === t.current;
2213
+ n += `
2214
+ <div style="color: ${d ? "#66bb6a" : "#999"}; margin-bottom: 2px;">
2215
+ ${d ? "▶" : "▷"} ${s}: ${a}
2216
+ </div>
2217
+ `;
2218
+ }
2219
+ }
2220
+ if (e.showPerformance) {
2221
+ const s = D.getStats(), a = k.getStats();
2222
+ if (n += '<div style="margin: 8px 0; font-weight: bold; color: #f06292;">Performance:</div>', n += `
2223
+ <div style="margin-bottom: 2px;">
2224
+ Cache: ${a.size} rules (${(a.hitRate * 100).toFixed(1)}% hit rate)
2225
+ </div>
2226
+ `, Object.keys(s).length > 0)
2227
+ for (const [d, c] of Object.entries(s))
2228
+ n += `
2229
+ <div style="margin-bottom: 2px;">
2230
+ ${d}: ${c.average.toFixed(2)}ms avg
2231
+ </div>
2232
+ `;
2233
+ }
2234
+ n += '<div style="margin: 8px 0; font-weight: bold; color: #ba68c8;">Media Queries:</div>';
2235
+ const o = {
2236
+ Touch: g.touchDevice,
2237
+ Dark: g.darkMode,
2238
+ "Reduced Motion": g.reducedMotion,
2239
+ "High Contrast": g.highContrast
2240
+ };
2241
+ for (const [s, a] of Object.entries(o)) {
2242
+ const d = window.matchMedia(a).matches;
2243
+ n += `
2244
+ <div style="color: ${d ? "#66bb6a" : "#666"}; margin-bottom: 2px;">
2245
+ ${d ? "✓" : "✗"} ${s}
2246
+ </div>
2247
+ `;
2248
+ }
2249
+ this.debugOverlay.innerHTML = n + this.debugOverlay.querySelector("div:last-child")?.outerHTML || "";
2250
+ }
2251
+ /**
2252
+ * Enable element highlighting for responsive elements
2253
+ */
2254
+ static enableElementHighlighting() {
2255
+ if (typeof document > "u") return;
2256
+ const e = document.createElement("style");
2257
+ e.id = "tachui-responsive-highlight", e.textContent = `
2258
+ .tachui-responsive-element {
2259
+ outline: 2px dashed #4fc3f7 !important;
2260
+ outline-offset: 2px !important;
2261
+ position: relative !important;
2262
+ }
2263
+
2264
+ .tachui-responsive-element::before {
2265
+ content: 'R';
2266
+ position: absolute !important;
2267
+ top: -8px !important;
2268
+ right: -8px !important;
2269
+ background: #4fc3f7 !important;
2270
+ color: white !important;
2271
+ width: 16px !important;
2272
+ height: 16px !important;
2273
+ border-radius: 50% !important;
2274
+ font-size: 10px !important;
2275
+ font-weight: bold !important;
2276
+ display: flex !important;
2277
+ align-items: center !important;
2278
+ justify-content: center !important;
2279
+ z-index: 10001 !important;
2280
+ font-family: monospace !important;
2281
+ }
2282
+ `, document.head.appendChild(e), new MutationObserver(() => {
2283
+ this.highlightResponsiveElements();
2284
+ }).observe(document.body, {
2285
+ childList: !0,
2286
+ subtree: !0,
2287
+ attributes: !0,
2288
+ attributeFilter: ["class"]
2289
+ }), this.highlightResponsiveElements();
2290
+ }
2291
+ /**
2292
+ * Disable element highlighting
2293
+ */
2294
+ static disableElementHighlighting() {
2295
+ if (typeof document > "u") return;
2296
+ const e = document.getElementById("tachui-responsive-highlight");
2297
+ e && e.remove(), document.querySelectorAll(".tachui-responsive-element").forEach((t) => {
2298
+ t.classList.remove("tachui-responsive-element");
2299
+ });
2300
+ }
2301
+ /**
2302
+ * Highlight elements with responsive classes
2303
+ */
2304
+ static highlightResponsiveElements() {
2305
+ if (typeof document > "u") return;
2306
+ [
2307
+ '[class*="tachui-responsive-"]',
2308
+ '[class*="tachui-mq-"]'
2309
+ ].forEach((t) => {
2310
+ document.querySelectorAll(t).forEach((i) => {
2311
+ i.classList.contains("tachui-responsive-element") || i.classList.add("tachui-responsive-element");
2312
+ });
2313
+ });
2314
+ }
2315
+ /**
2316
+ * Enable performance monitoring display
2317
+ */
2318
+ static enablePerformanceMonitoring() {
2319
+ setInterval(() => {
2320
+ if (!this.enabled) return;
2321
+ const e = D.getStats(), t = k.getStats();
2322
+ this.log("debug", "Performance Stats:", {
2323
+ cache: t,
2324
+ performance: e
2325
+ });
2326
+ }, 5e3);
2327
+ }
2328
+ /**
2329
+ * Log current responsive state
2330
+ */
2331
+ static logResponsiveState() {
2332
+ if (!this.enabled) return;
2333
+ const e = w(), t = L();
2334
+ if (console.group("🔍 TachUI Responsive State"), console.log("Current breakpoint:", e.current), console.log("Viewport:", `${e.width}×${e.height}`), console.log("Configuration:", t), typeof window < "u" && window.matchMedia) {
2335
+ const i = {
2336
+ Mobile: g.mobile,
2337
+ Tablet: g.tablet,
2338
+ Desktop: g.desktop,
2339
+ "Touch Device": g.touchDevice,
2340
+ "Dark Mode": g.darkMode,
2341
+ "Reduced Motion": g.reducedMotion
2342
+ };
2343
+ console.log("Media Query Results:");
2344
+ for (const [n, o] of Object.entries(i))
2345
+ try {
2346
+ console.log(` ${n}: ${window.matchMedia(o).matches}`);
2347
+ } catch {
2348
+ console.log(` ${n}: Error testing query`);
2349
+ }
2350
+ }
2351
+ console.groupEnd();
2352
+ }
2353
+ /**
2354
+ * Inspect a responsive value
2355
+ */
2356
+ static inspectResponsiveValue(e, t) {
2357
+ if (!this.enabled) return;
2358
+ const i = y();
2359
+ if (console.group(`🔍 Responsive Value${t ? ` - ${t}` : ""}`), x(e)) {
2360
+ const n = e;
2361
+ console.log("Responsive object:", n);
2362
+ const o = [
2363
+ "base",
2364
+ "sm",
2365
+ "md",
2366
+ "lg",
2367
+ "xl",
2368
+ "2xl"
2369
+ ], s = o.indexOf(i());
2370
+ let a;
2371
+ for (let d = s; d >= 0; d--) {
2372
+ const c = o[d];
2373
+ if (n[c] !== void 0) {
2374
+ a = n[c], console.log(`Resolved value (${c}):`, a);
2375
+ break;
2376
+ }
2377
+ }
2378
+ console.log("Defined breakpoints:");
2379
+ for (const [d, c] of Object.entries(n))
2380
+ if (c !== void 0) {
2381
+ const u = d === i();
2382
+ console.log(` ${u ? "→" : " "} ${d}:`, c);
2383
+ }
2384
+ } else
2385
+ console.log("Static value:", e);
2386
+ console.groupEnd();
2387
+ }
2388
+ /**
2389
+ * Test responsive behavior
2390
+ */
2391
+ static testResponsiveBehavior(e, t = ["base", "sm", "md", "lg", "xl", "2xl"]) {
2392
+ if (!this.enabled) return {};
2393
+ const i = {};
2394
+ return t.forEach((n) => {
2395
+ this.log("debug", `Testing breakpoint ${n}:`, e);
2396
+ }), i;
2397
+ }
2398
+ /**
2399
+ * Export responsive configuration for debugging
2400
+ */
2401
+ static exportConfiguration() {
2402
+ const e = w(), t = L(), i = D.getStats(), n = k.getStats(), o = {};
2403
+ if (typeof window < "u" && window.matchMedia) {
2404
+ for (const [s, a] of Object.entries(g))
2405
+ if (typeof a == "string")
2406
+ try {
2407
+ o[s] = window.matchMedia(a).matches;
2408
+ } catch {
2409
+ o[s] = !1;
2410
+ }
2411
+ }
2412
+ return {
2413
+ breakpoints: t,
2414
+ currentContext: e,
2415
+ performance: {
2416
+ cache: n,
2417
+ timings: i
2418
+ },
2419
+ mediaQueries: o
2420
+ };
2421
+ }
2422
+ }
2423
+ function Ve(r, e) {
2424
+ const t = y();
2425
+ return m(() => {
2426
+ const i = t(), n = x(r);
2427
+ let o, s = {};
2428
+ if (n) {
2429
+ const a = r;
2430
+ s = a;
2431
+ const d = [
2432
+ "base",
2433
+ "sm",
2434
+ "md",
2435
+ "lg",
2436
+ "xl",
2437
+ "2xl"
2438
+ ], c = d.indexOf(i);
2439
+ for (let u = c; u >= 0; u--) {
2440
+ const p = d[u];
2441
+ if (a[p] !== void 0) {
2442
+ o = a[p];
2443
+ break;
2444
+ }
2445
+ }
2446
+ } else
2447
+ o = r, s = { [i]: o };
2448
+ return R.enabled && e && R.inspectResponsiveValue(r, e), {
2449
+ resolvedValue: o,
2450
+ activeBreakpoint: i,
2451
+ allValues: s,
2452
+ isResponsive: n
2453
+ };
2454
+ });
2455
+ }
2456
+ class Te {
2457
+ /**
2458
+ * Test CSS features support
2459
+ */
2460
+ static testCSSFeatures() {
2461
+ if (typeof window > "u" || typeof CSS > "u" || !CSS.supports)
2462
+ return {};
2463
+ const e = {};
2464
+ try {
2465
+ e.cssGrid = CSS.supports("display", "grid"), e.flexbox = CSS.supports("display", "flex"), e.customProperties = CSS.supports("--test", "value"), e.viewportUnits = CSS.supports("width", "100vw"), e.mediaQueries = typeof window.matchMedia == "function", e.containerQueries = CSS.supports("container-type", "inline-size"), e.logicalProperties = CSS.supports("margin-inline-start", "1rem");
2466
+ } catch {
2467
+ }
2468
+ return e;
2469
+ }
2470
+ /**
2471
+ * Test responsive behavior across different viewport sizes
2472
+ */
2473
+ static testViewportSizes(e) {
2474
+ if (typeof window > "u") return;
2475
+ const t = [
2476
+ { width: 320, height: 568, name: "iPhone SE" },
2477
+ { width: 375, height: 667, name: "iPhone 8" },
2478
+ { width: 768, height: 1024, name: "iPad Portrait" },
2479
+ { width: 1024, height: 768, name: "iPad Landscape" },
2480
+ { width: 1280, height: 720, name: "Desktop Small" },
2481
+ { width: 1920, height: 1080, name: "Desktop Large" }
2482
+ ];
2483
+ R.enabled && R.log("info", "Testing viewport sizes:", t), t.forEach((i) => {
2484
+ e(i.width, i.height);
2485
+ });
2486
+ }
2487
+ }
2488
+ typeof window < "u" && process.env.NODE_ENV !== "production" && (window.tachUIResponsive = {
2489
+ devTools: R,
2490
+ inspector: Ve,
2491
+ compatibility: Te,
2492
+ logState: () => R.logResponsiveState(),
2493
+ export: () => R.exportConfiguration()
2494
+ });
2495
+ const Ee = {
2496
+ name: "@tachui/responsive",
2497
+ version: xe,
2498
+ author: "TachUI Team",
2499
+ verified: !0
2500
+ }, z = 80, je = [
2501
+ [
2502
+ "responsive",
2503
+ h,
2504
+ {
2505
+ category: "layout",
2506
+ priority: z,
2507
+ signature: "(config: ResponsiveStyleConfig) => Modifier",
2508
+ description: "Applies responsive style mappings across configured breakpoints."
2509
+ }
2510
+ ],
2511
+ [
2512
+ "mediaQuery",
2513
+ C,
2514
+ {
2515
+ category: "layout",
2516
+ priority: z,
2517
+ signature: "(query: string, styles: Record<string, any>) => Modifier",
2518
+ description: "Attaches custom CSS rules for a media query to a component."
2519
+ }
2520
+ ],
2521
+ [
2522
+ "responsiveProperty",
2523
+ l,
2524
+ {
2525
+ category: "layout",
2526
+ priority: z,
2527
+ signature: "(property: string, value: ResponsiveValue<any>) => Modifier",
2528
+ description: "Creates a responsive modifier from a single style property/value map."
2529
+ }
2530
+ ],
2531
+ [
2532
+ "responsiveLayout",
2533
+ ae,
2534
+ {
2535
+ category: "layout",
2536
+ priority: z,
2537
+ signature: "(config: ResponsiveLayoutConfig) => Modifier",
2538
+ description: "Configures responsive flexbox layout properties such as direction, wrap, and gap."
2539
+ }
2540
+ ]
2541
+ ];
2542
+ let Y = !1;
2543
+ function ht(r) {
2544
+ const e = r?.registry, t = r?.plugin ?? Ee, i = r?.force === !0, n = !!(e || r?.plugin);
2545
+ !n && Y && !i || (je.forEach(([o, s, a]) => {
2546
+ ve(
2547
+ o,
2548
+ s,
2549
+ a,
2550
+ e,
2551
+ t
2552
+ );
2553
+ }), n || (Y = !0));
2554
+ }
2555
+ export {
2556
+ re as $,
2557
+ $ as A,
2558
+ He as B,
2559
+ Me as C,
2560
+ W as D,
2561
+ Oe as E,
2562
+ pt as F,
2563
+ D as G,
2564
+ k as H,
2565
+ R as I,
2566
+ Te as J,
2567
+ Ve as K,
2568
+ ut as L,
2569
+ g as M,
2570
+ x as N,
2571
+ Ge as O,
2572
+ G as P,
2573
+ Ne as Q,
2574
+ de as R,
2575
+ _ as S,
2576
+ v as T,
2577
+ K as U,
2578
+ Z as V,
2579
+ Qe as W,
2580
+ A as X,
2581
+ We as Y,
2582
+ _e as Z,
2583
+ Ae as _,
2584
+ ze as a,
2585
+ Fe as a0,
2586
+ Ue as a1,
2587
+ se as a2,
2588
+ oe as a3,
2589
+ H as a4,
2590
+ $e as a5,
2591
+ et as a6,
2592
+ tt as a7,
2593
+ it as a8,
2594
+ nt as a9,
2595
+ rt as aa,
2596
+ y as b,
2597
+ Ze as c,
2598
+ De as d,
2599
+ w as e,
2600
+ we as f,
2601
+ L as g,
2602
+ h,
2603
+ qe as i,
2604
+ C as j,
2605
+ l as k,
2606
+ ae as l,
2607
+ Xe as m,
2608
+ Je as n,
2609
+ st as o,
2610
+ Be as p,
2611
+ ke as q,
2612
+ ht as r,
2613
+ ot as s,
2614
+ at as t,
2615
+ Ye as u,
2616
+ dt as v,
2617
+ Ke as w,
2618
+ ct as x,
2619
+ lt as y,
2620
+ Re as z
2621
+ };