@pure-ds/core 0.4.11 → 0.4.13

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.
@@ -226,41 +226,13 @@ ${[...t,...o,s,n,c].join("")} }
226
226
  radial-gradient(at 90% 10%, color-mix(in oklab, ${o} 13%, transparent) 0px, transparent 50%),
227
227
  radial-gradient(at 50% 90%, color-mix(in oklab, ${i} 10%, transparent) 0px, transparent 50%);
228
228
  `}#Z(){return`/* Alert dark mode adjustments */
229
- html[data-theme="dark"] .alert-success {
230
- background-color: var(--color-success-50);
231
- border-color: var(--color-success-500);
232
- color: var(--color-success-900);
233
- }
234
-
235
- html[data-theme="dark"] .alert-info {
236
- background-color: var(--color-info-50);
237
- border-color: var(--color-info-500);
238
- color: var(--color-info-900);
239
- }
240
-
241
- html[data-theme="dark"] .alert-warning {
242
- background-color: var(--color-warning-50);
243
- border-color: var(--color-warning-500);
244
- color: var(--color-warning-900);
245
- }
246
-
247
- html[data-theme="dark"] .alert-danger,
248
- html[data-theme="dark"] .alert-error {
249
- background-color: var(--color-danger-50);
250
- border-color: var(--color-danger-500);
251
- color: var(--color-danger-900);
252
- }
253
-
254
- /* Dim images in dark mode */
255
- html[data-theme="dark"] img,
256
- html[data-theme="dark"] video {
257
- opacity: 0.8;
258
- transition: opacity var(--transition-normal);
259
- }
260
-
261
- html[data-theme="dark"] img:hover,
262
- html[data-theme="dark"] video:hover {
263
- opacity: 1;
229
+ html[data-theme="dark"] {
230
+ .alert-success { background-color: var(--color-success-50); border-color: var(--color-success-500); color: var(--color-success-900); }
231
+ .alert-info { background-color: var(--color-info-50); border-color: var(--color-info-500); color: var(--color-info-900); }
232
+ .alert-warning { background-color: var(--color-warning-50); border-color: var(--color-warning-500); color: var(--color-warning-900); }
233
+ .alert-danger, .alert-error { background-color: var(--color-danger-50); border-color: var(--color-danger-500); color: var(--color-danger-900); }
234
+ img, video { opacity: 0.8; transition: opacity var(--transition-normal); }
235
+ img:hover, video:hover { opacity: 1; }
264
236
  }`}#X(){try{let e=this.options?.design?.options?.backgroundMesh;this.options.debug&&this.options.log?.("debug","backgroundMesh check:",e);let t=Number(e);return!Number.isFinite(t)||t===0?"":`/* Optional background mesh applied from config */
265
237
  body {
266
238
  background: var(--background-mesh-0${Math.max(1,Math.min(5,Math.floor(t)))});
@@ -1735,82 +1707,30 @@ tbody {
1735
1707
  vertical-align: middle;
1736
1708
  background-color: var(--color-gray-200);
1737
1709
  color: var(--color-gray-800);
1738
- border-radius: var(--radius-full);
1739
1710
  }
1740
1711
 
1741
- .badge-primary {
1742
- background-color: var(--color-primary-600);
1743
- color: white;
1744
- }
1745
-
1746
- .badge-secondary {
1747
- background-color: var(--color-secondary-600);
1748
- color: white;
1749
- }
1750
-
1751
- .badge-success {
1752
- background-color: var(--color-success-600);
1753
- color: white;
1754
- }
1755
-
1756
- .badge-info {
1757
- background-color: var(--color-info-600);
1758
- color: white;
1759
- }
1760
-
1761
- .badge-warning {
1762
- background-color: var(--color-warning-600);
1763
- color: white;
1764
- }
1765
-
1766
- .badge-danger {
1767
- background-color: var(--color-danger-600);
1768
- color: white;
1769
- }
1712
+ .badge-primary, .badge-secondary, .badge-success, .badge-info, .badge-warning, .badge-danger { color: white; }
1713
+ .badge-primary { background-color: var(--color-primary-600); }
1714
+ .badge-secondary { background-color: var(--color-secondary-600); }
1715
+ .badge-success { background-color: var(--color-success-600); }
1716
+ .badge-info { background-color: var(--color-info-600); }
1717
+ .badge-warning { background-color: var(--color-warning-600); }
1718
+ .badge-danger { background-color: var(--color-danger-600); }
1770
1719
 
1771
1720
  .badge-outline {
1772
1721
  background-color: transparent;
1773
1722
  border: 1px solid currentColor;
1774
-
1775
- &.badge-primary {
1776
- color: var(--color-text-primary);
1777
- }
1778
-
1779
- &.badge-secondary {
1780
- color: var(--color-secondary-600);
1781
- }
1782
-
1783
- &.badge-success {
1784
- color: var(--color-success-600);
1785
- }
1786
-
1787
- &.badge-info {
1788
- color: var(--color-info-600);
1789
- }
1790
-
1791
- &.badge-warning {
1792
- color: var(--color-warning-600);
1793
- }
1794
-
1795
- &.badge-danger {
1796
- color: var(--color-danger-600);
1797
- }
1798
- }
1799
-
1800
- .badge-sm {
1801
- padding: 2px var(--spacing-1);
1802
- font-size: 10px;
1723
+ &.badge-primary { color: var(--color-text-primary); }
1724
+ &.badge-secondary { color: var(--color-secondary-600); }
1725
+ &.badge-success { color: var(--color-success-600); }
1726
+ &.badge-info { color: var(--color-info-600); }
1727
+ &.badge-warning { color: var(--color-warning-600); }
1728
+ &.badge-danger { color: var(--color-danger-600); }
1803
1729
  }
1804
1730
 
1805
- .badge-lg {
1806
- padding: var(--spacing-2) var(--spacing-3);
1807
- font-size: var(--font-size-sm);
1808
- }
1809
-
1810
- .pill {
1811
- padding: var(--spacing-1) var(--spacing-3);
1812
- border-radius: var(--radius-full);
1813
- }
1731
+ .badge-sm { padding: 2px var(--spacing-1); font-size: 10px; }
1732
+ .badge-lg { padding: var(--spacing-2) var(--spacing-3); font-size: var(--font-size-sm); }
1733
+ .pill { padding: var(--spacing-1) var(--spacing-3); border-radius: var(--radius-full); }
1814
1734
 
1815
1735
  `}#ce(){let{layout:e={},behavior:t={}}=this.options.design;return`/* ============================================================================
1816
1736
  Dialog Primitive
@@ -1964,50 +1884,20 @@ dialog {
1964
1884
  }
1965
1885
 
1966
1886
  /* Dialog size modifiers */
1967
- dialog.dialog-sm {
1968
- max-width: min(400px, calc(100vw - var(--spacing-8)));
1969
- }
1970
-
1971
- dialog.dialog-lg {
1972
- max-width: min(800px, calc(100vw - var(--spacing-8)));
1973
- }
1974
-
1975
- dialog.dialog-xl {
1976
- max-width: min(1200px, calc(100vw - var(--spacing-8)));
1977
- }
1978
-
1979
- dialog.dialog-full {
1980
- max-width: calc(100vw - var(--spacing-8));
1981
- max-height: calc(100vh - var(--spacing-8));
1982
- }
1887
+ dialog.dialog-sm { max-width: min(400px, calc(100vw - var(--spacing-8))); }
1888
+ dialog.dialog-lg { max-width: min(800px, calc(100vw - var(--spacing-8))); }
1889
+ dialog.dialog-xl { max-width: min(1200px, calc(100vw - var(--spacing-8))); }
1890
+ dialog.dialog-full { max-width: calc(100vw - var(--spacing-8)); max-height: calc(100vh - var(--spacing-8)); }
1983
1891
 
1984
1892
  /* Mobile responsiveness */
1985
1893
  @media (max-width: ${(e.breakpoints||{sm:640,md:768,lg:1024,xl:1280}).sm-1}px) {
1986
- dialog {
1987
- max-width: 100vw;
1988
- max-height: 100vh;
1989
- border-radius: 0;
1990
- top: 50%;
1991
- transform: translateY(-50%);
1992
- margin: 0;
1993
- }
1994
-
1995
- dialog header,
1996
- dialog form > header,
1997
- dialog article,
1998
- dialog form > article,
1999
- dialog footer,
2000
- dialog form > footer {
2001
- padding: var(--spacing-4);
2002
- }
1894
+ dialog { max-width: 100vw; max-height: 100vh; border-radius: 0; top: 50%; transform: translateY(-50%); margin: 0; }
1895
+ dialog header, dialog form > header, dialog article, dialog form > article, dialog footer, dialog form > footer { padding: var(--spacing-4); }
2003
1896
  }
2004
1897
 
2005
1898
  /* Reduced motion support */
2006
1899
  @media (prefers-reduced-motion: reduce) {
2007
- dialog,
2008
- dialog::backdrop {
2009
- transition-duration: 0.01s !important;
2010
- }
1900
+ dialog, dialog::backdrop { transition-duration: 0.01s !important; }
2011
1901
  }
2012
1902
 
2013
1903
  `}#le(){let{layout:e={}}=this.options.design;return`/* Tab Strip Component */
@@ -2096,94 +1986,42 @@ pds-tabstrip {
2096
1986
  }
2097
1987
 
2098
1988
  @keyframes tabFadeIn {
2099
- from {
2100
- opacity: 0;
2101
- transform: translateY(8px);
2102
- }
2103
- to {
2104
- opacity: 1;
2105
- transform: translateY(0);
2106
- }
1989
+ from { opacity: 0; transform: translateY(8px); }
1990
+ to { opacity: 1; transform: translateY(0); }
2107
1991
  }
2108
1992
 
2109
1993
  /* Mobile responsive */
2110
1994
  @media (max-width: ${(e.breakpoints||{sm:640,md:768,lg:1024,xl:1280}).sm-1}px) {
2111
- pds-tabstrip > nav {
2112
- gap: var(--spacing-1);
2113
- }
2114
-
2115
- pds-tabstrip > nav > a {
2116
- padding: var(--spacing-2) var(--spacing-3);
2117
- font-size: var(--font-size-sm);
2118
- }
2119
-
2120
- pds-tabstrip > pds-tabpanel[data-tabpanel] {
2121
- padding: var(--spacing-3) 0;
2122
- }
1995
+ pds-tabstrip > nav { gap: var(--spacing-1); }
1996
+ pds-tabstrip > nav > a { padding: var(--spacing-2) var(--spacing-3); font-size: var(--font-size-sm); }
1997
+ pds-tabstrip > pds-tabpanel[data-tabpanel] { padding: var(--spacing-3) 0; }
2123
1998
  }
2124
1999
 
2125
2000
  `}#de(){return`/* Custom Scrollbars */
2126
-
2127
- ::-webkit-scrollbar {
2128
- width: 12px;
2129
- height: 12px;
2130
- }
2131
-
2132
- ::-webkit-scrollbar-track {
2133
- background: transparent;
2134
- }
2135
-
2001
+ ::-webkit-scrollbar { width: 12px; height: 12px; }
2002
+ ::-webkit-scrollbar-track { background: transparent; }
2136
2003
  ::-webkit-scrollbar-thumb {
2137
2004
  background: var(--color-secondary-300);
2138
2005
  border-radius: var(--radius-full);
2139
2006
  border: 3px solid transparent;
2140
2007
  background-clip: padding-box;
2141
2008
  transition: background-color var(--transition-fast);
2142
-
2143
- &:hover {
2144
- background: var(--color-secondary-400);
2145
- border: 2px solid transparent;
2146
- background-clip: padding-box;
2147
- }
2148
-
2149
- &:active {
2150
- background: var(--color-secondary-500);
2151
- border: 2px solid transparent;
2152
- background-clip: padding-box;
2153
- }
2154
-
2009
+ &:hover { background: var(--color-secondary-400); border: 2px solid transparent; background-clip: padding-box; }
2010
+ &:active { background: var(--color-secondary-500); border: 2px solid transparent; background-clip: padding-box; }
2155
2011
  @media (prefers-color-scheme: dark) {
2156
2012
  background: var(--color-secondary-600);
2157
-
2158
- &:hover {
2159
- background: var(--color-secondary-500);
2160
- }
2161
-
2162
- &:active {
2163
- background: var(--color-secondary-400);
2164
- }
2013
+ &:hover { background: var(--color-secondary-500); }
2014
+ &:active { background: var(--color-secondary-400); }
2165
2015
  }
2166
2016
  }
2167
2017
 
2168
2018
  * {
2169
2019
  scrollbar-width: thin;
2170
2020
  scrollbar-color: var(--color-secondary-300) transparent;
2171
-
2172
- @media (prefers-color-scheme: dark) {
2173
- scrollbar-color: var(--color-secondary-600) transparent;
2174
- }
2175
- }
2176
-
2177
- /* Hover effect for scrollable containers */
2178
- *:hover {
2179
- scrollbar-color: var(--color-secondary-400) transparent;
2180
- }
2181
-
2182
- @media (prefers-color-scheme: dark) {
2183
- *:hover {
2184
- scrollbar-color: var(--color-secondary-500) transparent;
2185
- }
2021
+ @media (prefers-color-scheme: dark) { scrollbar-color: var(--color-secondary-600) transparent; }
2186
2022
  }
2023
+ *:hover { scrollbar-color: var(--color-secondary-400) transparent; }
2024
+ @media (prefers-color-scheme: dark) { *:hover { scrollbar-color: var(--color-secondary-500) transparent; } }
2187
2025
 
2188
2026
  `}#pe(){let{a11y:e={}}=this.options.design,t=e.minTouchTarget||u.TouchTargetSizes.standard;return`/* Icon System */
2189
2027
 
@@ -2197,102 +2035,28 @@ pds-icon {
2197
2035
  }
2198
2036
 
2199
2037
  /* Icon size utilities */
2200
- .icon-xs,
2201
- pds-icon[size="xs"] {
2202
- width: var(--icon-size-xs);
2203
- height: var(--icon-size-xs);
2204
- }
2205
-
2206
- .icon-sm,
2207
- pds-icon[size="sm"] {
2208
- width: var(--icon-size-sm);
2209
- height: var(--icon-size-sm);
2210
- }
2211
-
2212
- .icon-md,
2213
- pds-icon[size="md"] {
2214
- width: var(--icon-size-md);
2215
- height: var(--icon-size-md);
2216
- }
2217
-
2218
- .icon-lg,
2219
- pds-icon[size="lg"] {
2220
- width: var(--icon-size-lg);
2221
- height: var(--icon-size-lg);
2222
- }
2223
-
2224
- .icon-xl,
2225
- pds-icon[size="xl"] {
2226
- width: var(--icon-size-xl);
2227
- height: var(--icon-size-xl);
2228
- }
2229
-
2230
- .icon-2xl,
2231
- pds-icon[size="2xl"] {
2232
- width: var(--icon-size-2xl);
2233
- height: var(--icon-size-2xl);
2234
- }
2038
+ .icon-xs, pds-icon[size="xs"] { width: var(--icon-size-xs); height: var(--icon-size-xs); }
2039
+ .icon-sm, pds-icon[size="sm"] { width: var(--icon-size-sm); height: var(--icon-size-sm); }
2040
+ .icon-md, pds-icon[size="md"] { width: var(--icon-size-md); height: var(--icon-size-md); }
2041
+ .icon-lg, pds-icon[size="lg"] { width: var(--icon-size-lg); height: var(--icon-size-lg); }
2042
+ .icon-xl, pds-icon[size="xl"] { width: var(--icon-size-xl); height: var(--icon-size-xl); }
2043
+ .icon-2xl, pds-icon[size="2xl"] { width: var(--icon-size-2xl); height: var(--icon-size-2xl); }
2235
2044
 
2236
2045
  /* Icon color utilities */
2237
- .icon-primary,
2238
- pds-icon.primary {
2239
- color: var(--color-primary-600);
2240
- }
2241
-
2242
- .icon-secondary,
2243
- pds-icon.secondary {
2244
- color: var(--color-secondary-600);
2245
- }
2246
-
2247
- .icon-accent,
2248
- pds-icon.accent {
2249
- color: var(--color-accent-600);
2250
- }
2251
-
2252
- .icon-success,
2253
- pds-icon.success {
2254
- color: var(--color-success-600);
2255
- }
2256
-
2257
- .icon-warning,
2258
- pds-icon.warning {
2259
- color: var(--color-warning-600);
2260
- }
2261
-
2262
- .icon-danger,
2263
- pds-icon.danger {
2264
- color: var(--color-danger-600);
2265
- }
2266
-
2267
- .icon-info,
2268
- pds-icon.info {
2269
- color: var(--color-info-600);
2270
- }
2271
-
2272
- .icon-muted,
2273
- pds-icon.muted {
2274
- color: var(--color-text-muted);
2275
- }
2276
-
2277
- .icon-subtle,
2278
- pds-icon.subtle {
2279
- color: var(--color-text-subtle);
2280
- }
2046
+ .icon-primary, pds-icon.primary { color: var(--color-primary-600); }
2047
+ .icon-secondary, pds-icon.secondary { color: var(--color-secondary-600); }
2048
+ .icon-accent, pds-icon.accent { color: var(--color-accent-600); }
2049
+ .icon-success, pds-icon.success { color: var(--color-success-600); }
2050
+ .icon-warning, pds-icon.warning { color: var(--color-warning-600); }
2051
+ .icon-danger, pds-icon.danger { color: var(--color-danger-600); }
2052
+ .icon-info, pds-icon.info { color: var(--color-info-600); }
2053
+ .icon-muted, pds-icon.muted { color: var(--color-text-muted); }
2054
+ .icon-subtle, pds-icon.subtle { color: var(--color-text-subtle); }
2281
2055
 
2282
2056
  /* Icon with text combinations */
2283
- .icon-text {
2284
- display: inline-flex;
2285
- align-items: center;
2286
- gap: var(--spacing-2);
2287
- }
2288
-
2289
- .icon-text-start {
2290
- flex-direction: row;
2291
- }
2292
-
2293
- .icon-text-end {
2294
- flex-direction: row-reverse;
2295
- }
2057
+ .icon-text { display: inline-flex; align-items: center; gap: var(--spacing-2); }
2058
+ .icon-text-start { flex-direction: row; }
2059
+ .icon-text-end { flex-direction: row-reverse; }
2296
2060
 
2297
2061
  /* Button icon utilities */
2298
2062
  button, a {
@@ -2312,46 +2076,19 @@ button, a {
2312
2076
  }
2313
2077
 
2314
2078
  /* Icon in inputs */
2315
- .input-icon {
2079
+ .input-icon, .input-icon-end {
2316
2080
  position: relative;
2317
2081
  display: flex;
2318
2082
  align-items: center;
2319
-
2320
- pds-icon {
2321
- position: absolute;
2322
- left: var(--spacing-3);
2323
- color: var(--color-text-muted);
2324
- pointer-events: none;
2325
- width: var(--icon-size-md);
2326
- height: var(--icon-size-md);
2327
- }
2328
-
2329
- input {
2330
- padding-left: calc(var(--icon-size-md) + var(--spacing-6));
2331
- width: 100%;
2332
- }
2083
+ pds-icon { position: absolute; color: var(--color-text-muted); pointer-events: none; width: var(--icon-size-md); height: var(--icon-size-md); }
2084
+ }
2085
+ .input-icon {
2086
+ pds-icon { left: var(--spacing-3); }
2087
+ input { padding-left: calc(var(--icon-size-md) + var(--spacing-6)); width: 100%; }
2333
2088
  }
2334
-
2335
2089
  .input-icon-end {
2336
- position: relative;
2337
- display: flex;
2338
- align-items: center;
2339
-
2340
- pds-icon {
2341
- position: absolute;
2342
- left: unset;
2343
- right: var(--spacing-3);
2344
- color: var(--color-text-muted);
2345
- pointer-events: none;
2346
- width: var(--icon-size-md);
2347
- height: var(--icon-size-md);
2348
- }
2349
-
2350
- input {
2351
- padding-left: var(--spacing-4);
2352
- padding-right: calc(var(--icon-size-md) + var(--spacing-6));
2353
- width: 100%;
2354
- }
2090
+ pds-icon { left: unset; right: var(--spacing-3); }
2091
+ input { padding-left: var(--spacing-4); padding-right: calc(var(--icon-size-md) + var(--spacing-6)); width: 100%; }
2355
2092
  }
2356
2093
 
2357
2094
  `}#ue(){return`/* Dropdown Component */
@@ -2525,54 +2262,20 @@ nav[data-dropdown] {
2525
2262
  `);for(let[n,c]of Object.entries(i))s.push(`.grid-auto-${n} { grid-template-columns: repeat(auto-fit, minmax(${c}, 1fr)); }
2526
2263
  `);return s.push(`
2527
2264
  /* Gap utilities */
2528
- .gap-0 { gap: 0; }
2529
- .gap-xs { gap: var(--spacing-1); }
2530
- .gap-sm { gap: var(--spacing-2); }
2531
- .gap-md { gap: var(--spacing-4); }
2532
- .gap-lg { gap: var(--spacing-6); }
2533
- .gap-xl { gap: var(--spacing-8); }
2265
+ .gap-0 { gap: 0; } .gap-xs { gap: var(--spacing-1); } .gap-sm { gap: var(--spacing-2); } .gap-md { gap: var(--spacing-4); } .gap-lg { gap: var(--spacing-6); } .gap-xl { gap: var(--spacing-8); }
2534
2266
 
2535
2267
  `),s.push(`
2536
2268
  /* Flexbox System */
2537
- .flex {
2538
- display: flex;
2539
- }
2540
-
2541
- .flex-wrap {
2542
- flex-wrap: wrap;
2543
- }
2269
+ .flex { display: flex; }
2270
+ .flex-wrap { flex-wrap: wrap; }
2271
+ .flex-col { flex-direction: column; }
2272
+ .flex-row { flex-direction: row; }
2273
+ .grow { flex: 1 1 0%; }
2544
2274
 
2545
- .flex-col {
2546
- flex-direction: column;
2547
- }
2548
-
2549
- .flex-row {
2550
- flex-direction: row;
2551
- }
2552
-
2553
- /* Flex grow - fill remaining space */
2554
- .grow {
2555
- flex: 1 1 0%;
2556
- }
2557
-
2558
- /* Flex alignment */
2559
- .items-start { align-items: flex-start; }
2560
- .items-center { align-items: center; }
2561
- .items-end { align-items: flex-end; }
2562
- .items-stretch { align-items: stretch; }
2563
- .items-baseline { align-items: baseline; }
2564
-
2565
- .justify-start { justify-content: flex-start; }
2566
- .justify-center { justify-content: center; }
2567
- .justify-end { justify-content: flex-end; }
2568
- .justify-between { justify-content: space-between; }
2569
- .justify-around { justify-content: space-around; }
2570
- .justify-evenly { justify-content: space-evenly; }
2571
-
2572
- /* Text alignment utilities */
2573
- .text-left { text-align: left; }
2574
- .text-center { text-align: center; }
2575
- .text-right { text-align: right; }
2275
+ /* Alignment utilities */
2276
+ .items-start { align-items: flex-start; } .items-center { align-items: center; } .items-end { align-items: flex-end; } .items-stretch { align-items: stretch; } .items-baseline { align-items: baseline; }
2277
+ .justify-start { justify-content: flex-start; } .justify-center { justify-content: center; } .justify-end { justify-content: flex-end; } .justify-between { justify-content: space-between; } .justify-around { justify-content: space-around; } .justify-evenly { justify-content: space-evenly; }
2278
+ .text-left { text-align: left; } .text-center { text-align: center; } .text-right { text-align: right; }
2576
2279
 
2577
2280
  /* Text overflow utility */
2578
2281
  .truncate {
@@ -2581,17 +2284,19 @@ nav[data-dropdown] {
2581
2284
  white-space: nowrap;
2582
2285
  }
2583
2286
 
2584
- /* Max-width utilities (semantic breakpoints) */
2585
- .max-w-sm { max-width: 400px; }
2586
- .max-w-md { max-width: 600px; }
2587
- .max-w-lg { max-width: 800px; }
2588
- .max-w-xl { max-width: 1200px; }
2287
+ /* Max-width utilities */
2288
+ .max-w-sm { max-width: 400px; } .max-w-md { max-width: 600px; } .max-w-lg { max-width: 800px; } .max-w-xl { max-width: 1200px; }
2589
2289
 
2590
2290
  /* Stack utilities - vertical rhythm for stacked elements */
2591
- .stack-sm { display: flex; flex-direction: column; gap: var(--spacing-2); }
2592
- .stack-md { display: flex; flex-direction: column; gap: var(--spacing-4); }
2593
- .stack-lg { display: flex; flex-direction: column; gap: var(--spacing-6); }
2594
- .stack-xl { display: flex; flex-direction: column; gap: var(--spacing-8); }
2291
+ [class^="stack-"], [class*=" stack-"] {
2292
+ display: flex;
2293
+ flex-direction: column;
2294
+ }
2295
+ .stack-xs { gap: var(--spacing-1); }
2296
+ .stack-sm { gap: var(--spacing-2); }
2297
+ .stack-md { gap: var(--spacing-4); }
2298
+ .stack-lg { gap: var(--spacing-6); }
2299
+ .stack-xl { gap: var(--spacing-8); }
2595
2300
 
2596
2301
  /* Section spacing - for major content blocks */
2597
2302
  .section { padding-block: var(--spacing-8); }
@@ -2626,27 +2331,9 @@ nav[data-dropdown] {
2626
2331
  }
2627
2332
 
2628
2333
  /* Backdrop variants */
2629
- .backdrop-light {
2630
- --backdrop-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
2631
- --backdrop-brightness: 1.1;
2632
- }
2633
-
2634
- .backdrop-dark {
2635
- --backdrop-bg: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5));
2636
- --backdrop-brightness: 0.6;
2637
- }
2638
-
2639
- .backdrop-blur-sm {
2640
- --backdrop-blur: 5px;
2641
- }
2642
-
2643
- .backdrop-blur-md {
2644
- --backdrop-blur: 10px;
2645
- }
2646
-
2647
- .backdrop-blur-lg {
2648
- --backdrop-blur: 20px;
2649
- }
2334
+ .backdrop-light { --backdrop-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2)); --backdrop-brightness: 1.1; }
2335
+ .backdrop-dark { --backdrop-bg: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)); --backdrop-brightness: 0.6; }
2336
+ .backdrop-blur-sm { --backdrop-blur: 5px; } .backdrop-blur-md { --backdrop-blur: 10px; } .backdrop-blur-lg { --backdrop-blur: 20px; }
2650
2337
  `),s.join("")}#ge(){return`/* Media Element Utilities */
2651
2338
 
2652
2339
  /* Gallery images */
@@ -2659,11 +2346,7 @@ nav[data-dropdown] {
2659
2346
  }
2660
2347
 
2661
2348
  /* Responsive images with different radius sizes */
2662
- .img-rounded-sm { border-radius: var(--radius-sm); }
2663
- .img-rounded-md { border-radius: var(--radius-md); }
2664
- .img-rounded-lg { border-radius: var(--radius-lg); }
2665
- .img-rounded-xl { border-radius: var(--radius-xl); }
2666
- .img-rounded-full { border-radius: var(--radius-full); }
2349
+ .img-rounded-sm { border-radius: var(--radius-sm); } .img-rounded-md { border-radius: var(--radius-md); } .img-rounded-lg { border-radius: var(--radius-lg); } .img-rounded-xl { border-radius: var(--radius-xl); } .img-rounded-full { border-radius: var(--radius-full); }
2667
2350
 
2668
2351
  /* Inline images */
2669
2352
  .img-inline {
@@ -2693,37 +2376,17 @@ nav[data-dropdown] {
2693
2376
 
2694
2377
  /* Small devices (${a.sm}px and up) */
2695
2378
  @media (min-width: ${a.sm}px) {
2696
- .sm\\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
2697
- .sm\\:flex-row { flex-direction: row; }
2698
- .sm\\:text-sm { font-size: var(--font-size-sm); }
2699
- .sm\\:p-6 { padding: var(--spacing-6); }
2700
- .sm\\:gap-6 { gap: var(--spacing-6); }
2701
- .sm\\:hidden { display: none; }
2702
- .sm\\:block { display: block; }
2379
+ .sm\\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); } .sm\\:flex-row { flex-direction: row; } .sm\\:text-sm { font-size: var(--font-size-sm); } .sm\\:p-6 { padding: var(--spacing-6); } .sm\\:gap-6 { gap: var(--spacing-6); } .sm\\:hidden { display: none; } .sm\\:block { display: block; }
2703
2380
  }
2704
2381
 
2705
2382
  /* Medium devices (${a.md}px and up) */
2706
2383
  @media (min-width: ${a.md}px) {
2707
- .md\\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
2708
- .md\\:text-lg { font-size: var(--font-size-lg); }
2709
- .md\\:p-8 { padding: var(--spacing-8); }
2710
- .md\\:gap-8 { gap: var(--spacing-8); }
2711
- .md\\:flex-row { flex-direction: row; }
2712
- .md\\:w-1\\/2 { width: 50%; }
2713
- .md\\:w-1\\/3 { width: 33.333333%; }
2714
- .md\\:hidden { display: none; }
2715
- .md\\:block { display: block; }
2384
+ .md\\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); } .md\\:text-lg { font-size: var(--font-size-lg); } .md\\:p-8 { padding: var(--spacing-8); } .md\\:gap-8 { gap: var(--spacing-8); } .md\\:flex-row { flex-direction: row; } .md\\:w-1\\/2 { width: 50%; } .md\\:w-1\\/3 { width: 33.333333%; } .md\\:hidden { display: none; } .md\\:block { display: block; }
2716
2385
  }
2717
2386
 
2718
2387
  /* Large devices (${a.lg}px and up) */
2719
2388
  @media (min-width: ${a.lg}px) {
2720
- .lg\\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
2721
- .lg\\:text-xl { font-size: var(--font-size-xl); }
2722
- .lg\\:p-12 { padding: var(--spacing-12); }
2723
- .lg\\:gap-12 { gap: var(--spacing-12); }
2724
- .lg\\:w-1\\/4 { width: 25%; }
2725
- .lg\\:hidden { display: none; }
2726
- .lg\\:block { display: block; }
2389
+ .lg\\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); } .lg\\:text-xl { font-size: var(--font-size-xl); } .lg\\:p-12 { padding: var(--spacing-12); } .lg\\:gap-12 { gap: var(--spacing-12); } .lg\\:w-1\\/4 { width: 25%; } .lg\\:hidden { display: none; } .lg\\:block { display: block; }
2727
2390
  }
2728
2391
 
2729
2392
  /* Touch device optimizations */
@@ -3478,7 +3141,7 @@ export const ${e}CSS = \`${a}\`;
3478
3141
  <button class="btn-primary btn-working">
3479
3142
  <span>Saving</span>
3480
3143
  </button>
3481
- `.trim()}];function Gr(r){r.dataset.enhancedAccordion||(r.dataset.enhancedAccordion="true",r.addEventListener("toggle",e=>{e.target.open&&r.querySelectorAll("details[open]").forEach(t=>{t!==e.target&&(t.open=!1)})},!0))}function Vr(r){if(r.dataset.enhancedDropdown)return;r.dataset.enhancedDropdown="true";let e=r.querySelector("menu");if(!e)return;let t=r.querySelector("[data-dropdown-toggle]")||r.querySelector("button");t&&!t.hasAttribute("type")&&t.setAttribute("type","button"),e.id||(e.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),e.setAttribute("role",e.getAttribute("role")||"menu"),e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden","true"),t&&(t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"));let a=()=>{let n=(r.getAttribute("data-mode")||"auto").toLowerCase();if(n==="up"||n==="down")return n;let c=r.getBoundingClientRect(),l=Math.max(0,window.innerHeight-c.bottom);return Math.max(0,c.top)>l?"up":"down"},o=()=>{r.dataset.dropdownDirection=a(),e.setAttribute("aria-hidden","false"),t?.setAttribute("aria-expanded","true")},i=()=>{e.setAttribute("aria-hidden","true"),t?.setAttribute("aria-expanded","false")},s=()=>{e.getAttribute("aria-hidden")==="false"?i():o()};t?.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation(),s()}),document.addEventListener("click",n=>{r.contains(n.target)||i()}),r.addEventListener("keydown",n=>{n.key==="Escape"&&(i(),t?.focus())}),r.addEventListener("focusout",n=>{(!n.relatedTarget||!r.contains(n.relatedTarget))&&i()})}function Jr(r){if(r.dataset.enhancedToggle)return;r.dataset.enhancedToggle="true";let e=r.querySelector('input[type="checkbox"]');if(!e)return;r.hasAttribute("tabindex")||r.setAttribute("tabindex","0"),r.setAttribute("role","switch"),r.setAttribute("aria-checked",e.checked?"true":"false");let t=document.createElement("span");t.className="toggle-switch",t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true");let a=document.createElement("span");a.className="toggle-knob",t.appendChild(a),r.insertBefore(t,e.nextSibling);let o=()=>{r.setAttribute("aria-checked",e.checked?"true":"false")},i=()=>{e.disabled||(e.checked=!e.checked,o(),e.dispatchEvent(new Event("change",{bubbles:!0})))};r.addEventListener("click",s=>{s.preventDefault(),i()}),r.addEventListener("keydown",s=>{(s.key===" "||s.key==="Enter")&&(s.preventDefault(),i())}),e.addEventListener("change",o)}function Kr(r){if(r.dataset.enhancedRange)return;let e=r.closest("label"),t=e?.classList.contains("range-output"),a=r.id||`range-${Math.random().toString(36).substring(2,11)}`,o=`${a}-output`;if(r.id=a,t){let i=e.querySelector("span");if(i&&!i.classList.contains("range-output-wrapper")){let s=document.createElement("span");s.className="range-output-wrapper",s.style.display="flex",s.style.justifyContent="space-between",s.style.alignItems="center";let n=document.createElement("span");n.textContent=i.textContent,s.appendChild(n);let c=document.createElement("output");c.id=o,c.setAttribute("for",a),c.style.color="var(--surface-text-secondary, var(--color-text-secondary))",c.style.fontSize="0.875rem",c.textContent=r.value,s.appendChild(c),i.textContent="",i.appendChild(s);let l=()=>{c.textContent=r.value};r.addEventListener("input",l)}}else{let i=r.closest(".range-container");i||(i=document.createElement("div"),i.className="range-container",r.parentNode?.insertBefore(i,r),i.appendChild(r)),i.style.position="relative";let s=document.createElement("output");s.id=o,s.setAttribute("for",a),s.className="range-bubble",s.setAttribute("aria-live","polite"),i.appendChild(s);let n=()=>{let d=parseFloat(r.min)||0,p=parseFloat(r.max)||100,h=parseFloat(r.value),g=(h-d)/(p-d);s.style.left=`calc(${g*100}% )`,s.textContent=String(h)},c=()=>s.classList.add("visible"),l=()=>s.classList.remove("visible");r.addEventListener("input",n),r.addEventListener("pointerdown",c),r.addEventListener("pointerup",l),r.addEventListener("pointerleave",l),r.addEventListener("focus",c),r.addEventListener("blur",l),n()}r.dataset.enhancedRange="1"}function Qr(r){if(r.dataset.enhancedRequired)return;r.dataset.enhancedRequired="true";let e=t=>{let a=t.closest("label");if(!a||a.querySelector(".required-asterisk"))return;let o=document.createElement("span");o.classList.add("required-asterisk"),o.textContent="*",o.style.marginLeft="4px",a.querySelector("span").appendChild(o);let i=t.closest("form");if(i&&!i.querySelector(".required-legend")){let s=document.createElement("small");s.classList.add("required-legend"),s.textContent="* Required fields",i.insertBefore(s,i.querySelector(".form-actions")||i.lastElementChild)}};r.querySelectorAll("[required]").forEach(t=>{e(t)})}function Yr(r){if(r.dataset.enhancedOpenGroup)return;r.dataset.enhancedOpenGroup="true",r.classList.add("flex","flex-wrap","buttons");let e=document.createElement("input");e.type="text",e.placeholder="Add item...",e.classList.add("input-text","input-sm"),e.style.width="auto";let t=r.querySelector('input[type="radio"], input[type="checkbox"]');r.appendChild(e),e.addEventListener("keydown",a=>{if(a.key==="Enter"||a.key==="Tab"){let o=e.value.trim();if(o){a.preventDefault();let i=t.type==="radio"?"radio":"checkbox",s=`open-group-${Math.random().toString(36).substring(2,11)}`,n=document.createElement("label"),c=document.createElement("span");c.setAttribute("data-label",""),c.textContent=o;let l=document.createElement("input");l.type=i,l.name=t.name||r.getAttribute("data-name")||"open-group",l.value=o,l.id=s,n.appendChild(c),n.appendChild(l),r.insertBefore(n,e),e.value=""}}else if(a.key==="Backspace"&&e.value===""){a.preventDefault();let o=r.querySelectorAll("label");o.length>0&&o[o.length-1].remove()}})}function Zr(r){if(r.dataset.enhancedBtnWorking)return;r.dataset.enhancedBtnWorking="true";let e=null,t=!1;new MutationObserver(o=>{o.forEach(i=>{if(i.attributeName==="class"){let s=r.classList.contains("btn-working"),n=r.querySelector("pds-icon");if(s)if(n)e||(e=n.getAttribute("icon")),n.setAttribute("icon","circle-notch");else{let c=document.createElement("pds-icon");c.setAttribute("icon","circle-notch"),c.setAttribute("size","sm"),r.insertBefore(c,r.firstChild),t=!0}else i.oldValue?.includes("btn-working")&&n&&(t?(n.remove(),t=!1):e&&(n.setAttribute("icon",e),e=null))}})}).observe(r,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var Xr=new Map([[".accordion",Gr],["nav[data-dropdown]",Vr],["label[data-toggle]",Jr],['input[type="range"]',Kr],["form[data-required]",Qr],["fieldset[role=group][data-open]",Yr],["button, a[class*='btn-']",Zr]]),er=Xt.map(r=>({...r,run:Xr.get(r.selector)||(()=>{})}));var rr="pds",eo=/^([a-z][a-z0-9+\-.]*:)?\/\//i,tr=/^[a-z]:/i;function ge(r=""){return r.endsWith("/")?r:`${r}/`}function to(r="",e=rr){let t=r.replace(/\/+$/,"");return new RegExp(`(?:^|/)${e}$`,"i").test(t)?t:`${t}/${e}`}function ro(r){return r.replace(/^\.\/+/,"")}function oo(r){return tr.test(r)?r.replace(tr,"").replace(/^\/+/,""):r}function ao(r){return r.startsWith("public/")?r.substring(7):r}function or(r,e={}){let t=e.segment||rr,a=e.defaultRoot||`/assets/${t}/`,o=r?.public&&r.public?.root||r?.static&&r.static?.root||null;if(!o||typeof o!="string")return ge(a);let i=o.trim();return i?(i=i.replace(/\\/g,"/"),i=to(i,t),i=ge(i),eo.test(i)?i:(i=ro(i),i=oo(i),i.startsWith("/")||(i=ao(i),i.startsWith("/")||(i=`/${i}`),i=i.replace(/\/+/g,(s,n)=>n===0?s:"/")),ge(i))):ge(a)}function ar(r){let e=r.replace(/['"]/g,"").trim();if(["system-ui","-apple-system","sans-serif","serif","monospace","cursive","fantasy","ui-sans-serif","ui-serif","ui-monospace","ui-rounded"].includes(e.toLowerCase()))return!0;let o=document.createElement("canvas").getContext("2d");if(!o)return!1;let i="mmmmmmmmmmlli",s="72px",n="monospace";o.font=`${s} ${n}`;let c=o.measureText(i).width;o.font=`${s} "${e}", ${n}`;let l=o.measureText(i).width;return c!==l}function io(r){return r?r.split(",").map(a=>a.trim())[0].replace(/['"]/g,"").trim():null}async function so(r,e={}){if(!r)return Promise.resolve();let{weights:t=[400,500,600,700],italic:a=!1}=e,o=io(r);if(!o||ar(o))return Promise.resolve();let i=encodeURIComponent(o);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${i}"]`)?(console.log(`Font "${o}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${o}" from Google Fonts...`),new Promise((n,c)=>{let l=document.createElement("link");l.rel="stylesheet";let d=a?`ital,wght@0,${t.join(";0,")};1,${t.join(";1,")}`:`wght@${t.join(";")}`;l.href=`https://fonts.googleapis.com/css2?family=${i}:${d}&display=swap`,l.setAttribute("data-font-loader",o),l.onload=()=>{console.log(`Successfully loaded font "${o}"`),n()},l.onerror=()=>{console.warn(`Failed to load font "${o}" from Google Fonts`),c(new Error(`Failed to load font: ${o}`))},document.head.appendChild(l),setTimeout(()=>{ar(o)||console.warn(`Font "${o}" did not load within timeout`),n()},5e3)}))}async function je(r){if(!r)return Promise.resolve();let e=new Set;r.fontFamilyHeadings&&e.add(r.fontFamilyHeadings),r.fontFamilyBody&&e.add(r.fontFamilyBody),r.fontFamilyMono&&e.add(r.fontFamilyMono);let t=Array.from(e).map(a=>so(a).catch(o=>{console.warn(`Could not load font: ${a}`,o)}));await Promise.all(t)}var pt=class extends EventTarget{},m=new pt;m.initializing=!1;m.currentPreset=null;m.Generator=$;m.registry=he;m.ontology=Jt;m.adoptLayers=Qt;m.adoptPrimitives=Kt;m.createStylesheet=Yt;m.isLiveMode=()=>he.isLive;m.enums=u;m.ask=Zt;m.common=ct;m.presets=C;m.findComponentForElement=Vt;m.query=async function(r){return await new Ne(m).search(r)};function cr(r){let e=typeof CustomEvent=="function";try{let t=e?new CustomEvent("pds:ready",{detail:r}):new Event("pds:ready");m.dispatchEvent(t)}catch{}if(typeof document<"u")if(e){let t={detail:r,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",t))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",t))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}Object.defineProperty(m,"currentConfig",{value:null,writable:!0,enumerable:!0,configurable:!1});Object.defineProperty(m,"compiled",{get(){return m.registry?.isLive&&$.instance?$.instance.compiled:null},enumerable:!0,configurable:!1});typeof window<"u"&&(window.PDS=m);typeof document<"u"&&m.addEventListener("pds:ready",r=>{let e=r.detail?.mode;e&&(document.documentElement.classList.add(`pds-${e}`),e==="live"&&document.documentElement.classList.add("pds-ready"))});var dt="pure-ds-theme",X=null,me=null;function lr(r){try{if(typeof document>"u")return;let e="light";r?r==="system"?e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e=r:e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",e)}catch{}}function dr(r){try{if(X&&me){try{typeof X.removeEventListener=="function"?X.removeEventListener("change",me):typeof X.removeListener=="function"&&X.removeListener(me)}catch{}X=null,me=null}if(r==="system"&&typeof window<"u"&&window.matchMedia){let e=window.matchMedia("(prefers-color-scheme: dark)"),t=a=>{let o=a?.matches===void 0?e.matches:a.matches;try{let i=o?"dark":"light";document.documentElement.setAttribute("data-theme",i),m.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:i,source:"system"}}))}catch{}};X=e,me=t,typeof e.addEventListener=="function"?e.addEventListener("change",t):typeof e.addListener=="function"&&e.addListener(t)}}catch{}}Object.defineProperty(m,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(dt)||null}catch{return null}},set(r){try{if(typeof window>"u")return;r==null?localStorage.removeItem(dt):localStorage.setItem(dt,r),lr(r),dr(r),m.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:r,source:"api"}}))}catch{}}});m.defaultEnhancers=er;function He(r={},e={}){let t=Number(e.minContrast||4.5),a=n=>{let c=String(n||"").replace("#",""),l=c.length===3?c.split("").map(p=>p+p).join(""):c,d=parseInt(l||"0",16);return{r:d>>16&255,g:d>>8&255,b:d&255}},o=n=>{let{r:c,g:l,b:d}=a(n),p=[c/255,l/255,d/255].map(h=>h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4));return .2126*p[0]+.7152*p[1]+.0722*p[2]},i=(n,c)=>{if(!n||!c)return 0;let l=o(n),d=o(c),p=Math.max(l,d),h=Math.min(l,d);return(p+.05)/(h+.05)},s=[];try{let c=new m.Generator({design:structuredClone(r)}).tokens.colors,l={surfaceBg:c.surface?.base,surfaceText:c.gray?.[900]||"#000000",primaryFill:c.interactive?.light?.fill||c.primary?.[600],primaryText:c.interactive?.light?.text||c.primary?.[600]},d=i(l.primaryFill,"#ffffff");d<t&&s.push({path:"/colors/primary",message:`Primary button contrast too low in light theme (${d.toFixed(2)} < ${t}). Choose a darker primary.`,ratio:d,min:t,context:"light/btn-primary"});let p=i(l.surfaceBg,l.surfaceText);p<t&&s.push({path:"/colors/background",message:`Base text contrast on surface (light) is too low (${p.toFixed(2)} < ${t}). Adjust background or secondary (gray).`,ratio:p,min:t,context:"light/surface-text"});let h=i(l.primaryText,l.surfaceBg);h<t&&s.push({path:"/colors/primary",message:`Primary text on surface is too low for outline/link styles (light) (${h.toFixed(2)} < ${t}). Choose a darker primary or lighter surface.`,ratio:h,min:t,context:"light/outline"});let g=c.dark;if(g){let y={surfaceBg:g.surface?.base||c.surface?.inverse,primaryFill:c.interactive?.dark?.fill||g.primary?.[600],primaryText:c.interactive?.dark?.text||g.primary?.[600]},f=i(y.primaryFill,"#ffffff");f<t&&s.push({path:"/colors/darkMode/primary",message:`Primary button contrast too low in dark theme (${f.toFixed(2)} < ${t}). Override darkMode.primary or pick a brighter hue.`,ratio:f,min:t,context:"dark/btn-primary"});let b=i(y.primaryText,y.surfaceBg);b<t&&s.push({path:"/colors/darkMode/primary",message:`Primary text on surface is too low for outline/link styles (dark) (${b.toFixed(2)} < ${t}). Override darkMode.primary/background.`,ratio:b,min:t,context:"dark/outline"})}}catch(n){s.push({path:"/",message:`Validation failed: ${String(n?.message||n)}`,ratio:0,min:0})}return{ok:s.length===0,issues:s}}m.validateDesign=He;function co(r=[],e={}){let t=[],a=Array.isArray(r)?r:r&&typeof r=="object"?Object.values(r):[];for(let o of a){let i,s=null;if(typeof o=="string"){let l=String(o).toLowerCase(),d=C?.[l]||Object.values(C||{}).find(p=>fe(p.name)===l||String(p.name||"").toLowerCase()===l);if(!d){t.push({name:o,ok:!1,issues:[{path:"/",message:`Preset not found: ${o}`,ratio:0,min:0}]});continue}i=d.name||l,s=structuredClone(d)}else if(o&&typeof o=="object")if(i=o.name||o.preset||void 0,"preset"in o||"design"in o){let l=String(o.preset||"default").toLowerCase(),d=C?.[l]||Object.values(C||{}).find(h=>fe(h.name)===l||String(h.name||"").toLowerCase()===l);if(!d){t.push({name:i,ok:!1,issues:[{path:"/",message:`Preset not found: ${o.preset}`,ratio:0,min:0}]});continue}let p=structuredClone(d);o.design&&typeof o.design=="object"&&(p=ut(p,structuredClone(o.design))),s=p}else s=o;if(!s){t.push({name:i,ok:!1,issues:[{path:"/",message:"Invalid design entry",ratio:0,min:0}]});continue}let{ok:n,issues:c}=He(s,e);t.push({name:i,ok:n,issues:c})}return{ok:t.every(o=>o.ok),results:t}}m.validateDesigns=co;function pr({manageTheme:r,themeStorageKey:e}){let t="light",a=null;if(r&&typeof window<"u"){try{a=localStorage.getItem(e)||null}catch{a=null}try{lr(a),dr(a)}catch{}a?a==="system"?t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t=a:t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:t,storedTheme:a}}function ut(r={},e={}){if(!e||typeof e!="object")return r;let t=Array.isArray(r)?[...r]:{...r};for(let[a,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?t[a]=ut(t[a]&&typeof t[a]=="object"?t[a]:{},o):t[a]=o;return t}function fe(r=""){return String(r).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function ye(r){if(r==null)return r;if(typeof r=="function")return;if(typeof r!="object")return r;if(Array.isArray(r))return r.map(t=>ye(t)).filter(t=>t!==void 0);let e={};for(let t in r)if(r.hasOwnProperty(t)){let a=r[t];if(typeof a!="function"){let o=ye(a);o!==void 0&&(e[t]=o)}}return e}var lo=/^[a-z][a-z0-9+\-.]*:\/\//i,be=(()=>{try{return import.meta.url}catch{return}})();function Ue(r,e={}){if(!r||lo.test(r))return r;let{preferModule:t=!0}=e,a=()=>{if(!be)return null;try{return new URL(r,be).href}catch{return null}},o=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(r,window.location.origin).href}catch{return null}};return(t?a()||o():o()||a())||r}var We=r=>typeof r=="string"&&r.length&&!r.endsWith("/")?`${r}/`:r,nr=(()=>{if(be)try{let r=new URL(be);if(/\/public\/assets\/js\//.test(r.pathname))return new URL("../pds/",be).href}catch{return}})();function ur(r){let e=!!(r?.public?.root||r?.static?.root),t=or(r);return!e&&nr&&(t=nr),We(Ue(t))}function hr(r={},e={}){let t=typeof r=="object"&&("colors"in r||"typography"in r||"spatialRhythm"in r||"shape"in r||"behavior"in r||"layout"in r||"advanced"in r||"a11y"in r||"components"in r||"icons"in r),a=r&&r.enhancers;a&&!Array.isArray(a)&&(a=Object.values(a));let o=a??e.enhancers??[],i=r&&r.preset,s=r&&r.design,n="preset"in(r||{})||"design"in(r||{})||"enhancers"in(r||{}),c,l=null;if(n){let d=String(i||"default").toLowerCase(),p=C?.[d]||Object.values(C||{}).find(D=>fe(D.name)===d||String(D.name||"").toLowerCase()===d);if(!p)throw new Error(`PDS preset not found: "${i||"default"}"`);l={id:p.id||fe(p.name),name:p.name||p.id||String(d)};let h=structuredClone(p);if(s&&typeof s=="object"){let D=ye(s);h=ut(h,structuredClone(D))}let{mode:g,autoDefine:y,applyGlobalStyles:f,manageTheme:b,themeStorageKey:_,preloadStyles:O,criticalLayers:F,preset:E,design:A,enhancers:M,log:I,...Ge}=r;c={...Ge,design:h,preset:l.name,log:I||Ie}}else if(t){let{log:d,...p}=r;c={design:structuredClone(p),log:d||Ie}}else{let d=C?.default||Object.values(C||{}).find(p=>fe(p.name)==="default");if(!d)throw new Error("PDS default preset not available");l={id:d.id||"default",name:d.name||"Default"},c={design:structuredClone(d),preset:l.name,log:Ie}}return{generatorConfig:c,enhancers:o,presetInfo:l}}async function gr(r){let{autoDefineBaseURL:e="/auto-define/",autoDefinePreload:t=[],autoDefineMapper:a=null,enhancers:o=[],autoDefineOverrides:i=null,autoDefinePreferModule:s=!0}=r,n=(()=>{let l=new Map;return(m.defaultEnhancers||[]).forEach(d=>l.set(d.selector,d)),(o||[]).forEach(d=>l.set(d.selector,d)),Array.from(l.values())})(),c=null;if(typeof window<"u"&&typeof document<"u"){let l=null;try{let f=await Promise.resolve().then(()=>(sr(),ir));l=f?.AutoDefiner||f?.default?.AutoDefiner||f?.default||null}catch(f){console.warn("AutoDefiner not available:",f?.message||f)}let d=f=>{switch(f){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${f}.js`}},{mapper:p,...h}=i&&typeof i=="object"?i:{},y={baseURL:e&&We(Ue(e,{preferModule:s})),predefine:t,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:n,onError:(f,b)=>{typeof f=="string"&&f.startsWith("pds-")?console.warn(`\u26A0\uFE0F PDS component <${f}> not found. Assets may not be installed.`):console.error(`\u274C Auto-define error for <${f}>:`,b)},...h,mapper:f=>{if(customElements.get(f))return null;if(typeof a=="function")try{let b=a(f);return b===void 0?d(f):b}catch(b){return console.warn("Custom autoDefine.mapper error; falling back to default:",b?.message||b),d(f)}return d(f)}};l&&(c=new l(y),t.length>0&&typeof l.define=="function"&&await l.define(...t,{baseURL:e,mapper:y.mapper,onError:y.onError}))}return{autoDefiner:c}}async function po(r){if(!r||typeof r!="object")throw new Error("PDS.start({ mode: 'live', ... }) requires a valid configuration object");if(typeof document<"u"&&document.adoptedStyleSheets){let n=`
3144
+ `.trim()}];function Gr(r){r.dataset.enhancedAccordion||(r.dataset.enhancedAccordion="true",r.addEventListener("toggle",e=>{e.target.open&&e.target.parentElement===r&&r.querySelectorAll(":scope > details[open]").forEach(t=>{t!==e.target&&(t.open=!1)})},!0))}function Vr(r){if(r.dataset.enhancedDropdown)return;r.dataset.enhancedDropdown="true";let e=r.querySelector("menu");if(!e)return;let t=r.querySelector("[data-dropdown-toggle]")||r.querySelector("button");t&&!t.hasAttribute("type")&&t.setAttribute("type","button"),e.id||(e.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),e.setAttribute("role",e.getAttribute("role")||"menu"),e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden","true"),t&&(t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"));let a=()=>{let n=(r.getAttribute("data-mode")||"auto").toLowerCase();if(n==="up"||n==="down")return n;let c=r.getBoundingClientRect(),l=Math.max(0,window.innerHeight-c.bottom);return Math.max(0,c.top)>l?"up":"down"},o=()=>{r.dataset.dropdownDirection=a(),e.setAttribute("aria-hidden","false"),t?.setAttribute("aria-expanded","true")},i=()=>{e.setAttribute("aria-hidden","true"),t?.setAttribute("aria-expanded","false")},s=()=>{e.getAttribute("aria-hidden")==="false"?i():o()};t?.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation(),s()}),document.addEventListener("click",n=>{r.contains(n.target)||i()}),r.addEventListener("keydown",n=>{n.key==="Escape"&&(i(),t?.focus())}),r.addEventListener("focusout",n=>{(!n.relatedTarget||!r.contains(n.relatedTarget))&&i()})}function Jr(r){if(r.dataset.enhancedToggle)return;r.dataset.enhancedToggle="true";let e=r.querySelector('input[type="checkbox"]');if(!e)return;r.hasAttribute("tabindex")||r.setAttribute("tabindex","0"),r.setAttribute("role","switch"),r.setAttribute("aria-checked",e.checked?"true":"false");let t=document.createElement("span");t.className="toggle-switch",t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true");let a=document.createElement("span");a.className="toggle-knob",t.appendChild(a),r.insertBefore(t,e.nextSibling);let o=()=>{r.setAttribute("aria-checked",e.checked?"true":"false")},i=()=>{e.disabled||(e.checked=!e.checked,o(),e.dispatchEvent(new Event("change",{bubbles:!0})))};r.addEventListener("click",s=>{s.preventDefault(),i()}),r.addEventListener("keydown",s=>{(s.key===" "||s.key==="Enter")&&(s.preventDefault(),i())}),e.addEventListener("change",o)}function Kr(r){if(r.dataset.enhancedRange)return;let e=r.closest("label"),t=e?.classList.contains("range-output"),a=r.id||`range-${Math.random().toString(36).substring(2,11)}`,o=`${a}-output`;if(r.id=a,t){let i=e.querySelector("span");if(i&&!i.classList.contains("range-output-wrapper")){let s=document.createElement("span");s.className="range-output-wrapper",s.style.display="flex",s.style.justifyContent="space-between",s.style.alignItems="center";let n=document.createElement("span");n.textContent=i.textContent,s.appendChild(n);let c=document.createElement("output");c.id=o,c.setAttribute("for",a),c.style.color="var(--surface-text-secondary, var(--color-text-secondary))",c.style.fontSize="0.875rem",c.textContent=r.value,s.appendChild(c),i.textContent="",i.appendChild(s);let l=()=>{c.textContent=r.value};r.addEventListener("input",l)}}else{let i=r.closest(".range-container");i||(i=document.createElement("div"),i.className="range-container",r.parentNode?.insertBefore(i,r),i.appendChild(r)),i.style.position="relative";let s=document.createElement("output");s.id=o,s.setAttribute("for",a),s.className="range-bubble",s.setAttribute("aria-live","polite"),i.appendChild(s);let n=()=>{let d=parseFloat(r.min)||0,p=parseFloat(r.max)||100,h=parseFloat(r.value),g=(h-d)/(p-d);s.style.left=`calc(${g*100}% )`,s.textContent=String(h)},c=()=>s.classList.add("visible"),l=()=>s.classList.remove("visible");r.addEventListener("input",n),r.addEventListener("pointerdown",c),r.addEventListener("pointerup",l),r.addEventListener("pointerleave",l),r.addEventListener("focus",c),r.addEventListener("blur",l),n()}r.dataset.enhancedRange="1"}function Qr(r){if(r.dataset.enhancedRequired)return;r.dataset.enhancedRequired="true";let e=t=>{let a=t.closest("label");if(!a||a.querySelector(".required-asterisk"))return;let o=document.createElement("span");o.classList.add("required-asterisk"),o.textContent="*",o.style.marginLeft="4px",a.querySelector("span").appendChild(o);let i=t.closest("form");if(i&&!i.querySelector(".required-legend")){let s=document.createElement("small");s.classList.add("required-legend"),s.textContent="* Required fields",i.insertBefore(s,i.querySelector(".form-actions")||i.lastElementChild)}};r.querySelectorAll("[required]").forEach(t=>{e(t)})}function Yr(r){if(r.dataset.enhancedOpenGroup)return;r.dataset.enhancedOpenGroup="true",r.classList.add("flex","flex-wrap","buttons");let e=document.createElement("input");e.type="text",e.placeholder="Add item...",e.classList.add("input-text","input-sm"),e.style.width="auto";let t=r.querySelector('input[type="radio"], input[type="checkbox"]');r.appendChild(e),e.addEventListener("keydown",a=>{if(a.key==="Enter"||a.key==="Tab"){let o=e.value.trim();if(o){a.preventDefault();let i=t.type==="radio"?"radio":"checkbox",s=`open-group-${Math.random().toString(36).substring(2,11)}`,n=document.createElement("label"),c=document.createElement("span");c.setAttribute("data-label",""),c.textContent=o;let l=document.createElement("input");l.type=i,l.name=t.name||r.getAttribute("data-name")||"open-group",l.value=o,l.id=s,n.appendChild(c),n.appendChild(l),r.insertBefore(n,e),e.value=""}}else if(a.key==="Backspace"&&e.value===""){a.preventDefault();let o=r.querySelectorAll("label");o.length>0&&o[o.length-1].remove()}})}function Zr(r){if(r.dataset.enhancedBtnWorking)return;r.dataset.enhancedBtnWorking="true";let e=null,t=!1;new MutationObserver(o=>{o.forEach(i=>{if(i.attributeName==="class"){let s=r.classList.contains("btn-working"),n=r.querySelector("pds-icon");if(s)if(n)e||(e=n.getAttribute("icon")),n.setAttribute("icon","circle-notch");else{let c=document.createElement("pds-icon");c.setAttribute("icon","circle-notch"),c.setAttribute("size","sm"),r.insertBefore(c,r.firstChild),t=!0}else i.oldValue?.includes("btn-working")&&n&&(t?(n.remove(),t=!1):e&&(n.setAttribute("icon",e),e=null))}})}).observe(r,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var Xr=new Map([[".accordion",Gr],["nav[data-dropdown]",Vr],["label[data-toggle]",Jr],['input[type="range"]',Kr],["form[data-required]",Qr],["fieldset[role=group][data-open]",Yr],["button, a[class*='btn-']",Zr]]),er=Xt.map(r=>({...r,run:Xr.get(r.selector)||(()=>{})}));var rr="pds",eo=/^([a-z][a-z0-9+\-.]*:)?\/\//i,tr=/^[a-z]:/i;function ge(r=""){return r.endsWith("/")?r:`${r}/`}function to(r="",e=rr){let t=r.replace(/\/+$/,"");return new RegExp(`(?:^|/)${e}$`,"i").test(t)?t:`${t}/${e}`}function ro(r){return r.replace(/^\.\/+/,"")}function oo(r){return tr.test(r)?r.replace(tr,"").replace(/^\/+/,""):r}function ao(r){return r.startsWith("public/")?r.substring(7):r}function or(r,e={}){let t=e.segment||rr,a=e.defaultRoot||`/assets/${t}/`,o=r?.public&&r.public?.root||r?.static&&r.static?.root||null;if(!o||typeof o!="string")return ge(a);let i=o.trim();return i?(i=i.replace(/\\/g,"/"),i=to(i,t),i=ge(i),eo.test(i)?i:(i=ro(i),i=oo(i),i.startsWith("/")||(i=ao(i),i.startsWith("/")||(i=`/${i}`),i=i.replace(/\/+/g,(s,n)=>n===0?s:"/")),ge(i))):ge(a)}function ar(r){let e=r.replace(/['"]/g,"").trim();if(["system-ui","-apple-system","sans-serif","serif","monospace","cursive","fantasy","ui-sans-serif","ui-serif","ui-monospace","ui-rounded"].includes(e.toLowerCase()))return!0;let o=document.createElement("canvas").getContext("2d");if(!o)return!1;let i="mmmmmmmmmmlli",s="72px",n="monospace";o.font=`${s} ${n}`;let c=o.measureText(i).width;o.font=`${s} "${e}", ${n}`;let l=o.measureText(i).width;return c!==l}function io(r){return r?r.split(",").map(a=>a.trim())[0].replace(/['"]/g,"").trim():null}async function so(r,e={}){if(!r)return Promise.resolve();let{weights:t=[400,500,600,700],italic:a=!1}=e,o=io(r);if(!o||ar(o))return Promise.resolve();let i=encodeURIComponent(o);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${i}"]`)?(console.log(`Font "${o}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${o}" from Google Fonts...`),new Promise((n,c)=>{let l=document.createElement("link");l.rel="stylesheet";let d=a?`ital,wght@0,${t.join(";0,")};1,${t.join(";1,")}`:`wght@${t.join(";")}`;l.href=`https://fonts.googleapis.com/css2?family=${i}:${d}&display=swap`,l.setAttribute("data-font-loader",o),l.onload=()=>{console.log(`Successfully loaded font "${o}"`),n()},l.onerror=()=>{console.warn(`Failed to load font "${o}" from Google Fonts`),c(new Error(`Failed to load font: ${o}`))},document.head.appendChild(l),setTimeout(()=>{ar(o)||console.warn(`Font "${o}" did not load within timeout`),n()},5e3)}))}async function je(r){if(!r)return Promise.resolve();let e=new Set;r.fontFamilyHeadings&&e.add(r.fontFamilyHeadings),r.fontFamilyBody&&e.add(r.fontFamilyBody),r.fontFamilyMono&&e.add(r.fontFamilyMono);let t=Array.from(e).map(a=>so(a).catch(o=>{console.warn(`Could not load font: ${a}`,o)}));await Promise.all(t)}var pt=class extends EventTarget{},m=new pt;m.initializing=!1;m.currentPreset=null;m.Generator=$;m.registry=he;m.ontology=Jt;m.adoptLayers=Qt;m.adoptPrimitives=Kt;m.createStylesheet=Yt;m.isLiveMode=()=>he.isLive;m.enums=u;m.ask=Zt;m.common=ct;m.presets=C;m.findComponentForElement=Vt;m.query=async function(r){return await new Ne(m).search(r)};function cr(r){let e=typeof CustomEvent=="function";try{let t=e?new CustomEvent("pds:ready",{detail:r}):new Event("pds:ready");m.dispatchEvent(t)}catch{}if(typeof document<"u")if(e){let t={detail:r,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",t))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",t))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}Object.defineProperty(m,"currentConfig",{value:null,writable:!0,enumerable:!0,configurable:!1});Object.defineProperty(m,"compiled",{get(){return m.registry?.isLive&&$.instance?$.instance.compiled:null},enumerable:!0,configurable:!1});typeof window<"u"&&(window.PDS=m);typeof document<"u"&&m.addEventListener("pds:ready",r=>{let e=r.detail?.mode;e&&(document.documentElement.classList.add(`pds-${e}`),e==="live"&&document.documentElement.classList.add("pds-ready"))});var dt="pure-ds-theme",X=null,me=null;function lr(r){try{if(typeof document>"u")return;let e="light";r?r==="system"?e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e=r:e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",e)}catch{}}function dr(r){try{if(X&&me){try{typeof X.removeEventListener=="function"?X.removeEventListener("change",me):typeof X.removeListener=="function"&&X.removeListener(me)}catch{}X=null,me=null}if(r==="system"&&typeof window<"u"&&window.matchMedia){let e=window.matchMedia("(prefers-color-scheme: dark)"),t=a=>{let o=a?.matches===void 0?e.matches:a.matches;try{let i=o?"dark":"light";document.documentElement.setAttribute("data-theme",i),m.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:i,source:"system"}}))}catch{}};X=e,me=t,typeof e.addEventListener=="function"?e.addEventListener("change",t):typeof e.addListener=="function"&&e.addListener(t)}}catch{}}Object.defineProperty(m,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(dt)||null}catch{return null}},set(r){try{if(typeof window>"u")return;r==null?localStorage.removeItem(dt):localStorage.setItem(dt,r),lr(r),dr(r),m.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:r,source:"api"}}))}catch{}}});m.defaultEnhancers=er;function He(r={},e={}){let t=Number(e.minContrast||4.5),a=n=>{let c=String(n||"").replace("#",""),l=c.length===3?c.split("").map(p=>p+p).join(""):c,d=parseInt(l||"0",16);return{r:d>>16&255,g:d>>8&255,b:d&255}},o=n=>{let{r:c,g:l,b:d}=a(n),p=[c/255,l/255,d/255].map(h=>h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4));return .2126*p[0]+.7152*p[1]+.0722*p[2]},i=(n,c)=>{if(!n||!c)return 0;let l=o(n),d=o(c),p=Math.max(l,d),h=Math.min(l,d);return(p+.05)/(h+.05)},s=[];try{let c=new m.Generator({design:structuredClone(r)}).tokens.colors,l={surfaceBg:c.surface?.base,surfaceText:c.gray?.[900]||"#000000",primaryFill:c.interactive?.light?.fill||c.primary?.[600],primaryText:c.interactive?.light?.text||c.primary?.[600]},d=i(l.primaryFill,"#ffffff");d<t&&s.push({path:"/colors/primary",message:`Primary button contrast too low in light theme (${d.toFixed(2)} < ${t}). Choose a darker primary.`,ratio:d,min:t,context:"light/btn-primary"});let p=i(l.surfaceBg,l.surfaceText);p<t&&s.push({path:"/colors/background",message:`Base text contrast on surface (light) is too low (${p.toFixed(2)} < ${t}). Adjust background or secondary (gray).`,ratio:p,min:t,context:"light/surface-text"});let h=i(l.primaryText,l.surfaceBg);h<t&&s.push({path:"/colors/primary",message:`Primary text on surface is too low for outline/link styles (light) (${h.toFixed(2)} < ${t}). Choose a darker primary or lighter surface.`,ratio:h,min:t,context:"light/outline"});let g=c.dark;if(g){let y={surfaceBg:g.surface?.base||c.surface?.inverse,primaryFill:c.interactive?.dark?.fill||g.primary?.[600],primaryText:c.interactive?.dark?.text||g.primary?.[600]},f=i(y.primaryFill,"#ffffff");f<t&&s.push({path:"/colors/darkMode/primary",message:`Primary button contrast too low in dark theme (${f.toFixed(2)} < ${t}). Override darkMode.primary or pick a brighter hue.`,ratio:f,min:t,context:"dark/btn-primary"});let b=i(y.primaryText,y.surfaceBg);b<t&&s.push({path:"/colors/darkMode/primary",message:`Primary text on surface is too low for outline/link styles (dark) (${b.toFixed(2)} < ${t}). Override darkMode.primary/background.`,ratio:b,min:t,context:"dark/outline"})}}catch(n){s.push({path:"/",message:`Validation failed: ${String(n?.message||n)}`,ratio:0,min:0})}return{ok:s.length===0,issues:s}}m.validateDesign=He;function co(r=[],e={}){let t=[],a=Array.isArray(r)?r:r&&typeof r=="object"?Object.values(r):[];for(let o of a){let i,s=null;if(typeof o=="string"){let l=String(o).toLowerCase(),d=C?.[l]||Object.values(C||{}).find(p=>fe(p.name)===l||String(p.name||"").toLowerCase()===l);if(!d){t.push({name:o,ok:!1,issues:[{path:"/",message:`Preset not found: ${o}`,ratio:0,min:0}]});continue}i=d.name||l,s=structuredClone(d)}else if(o&&typeof o=="object")if(i=o.name||o.preset||void 0,"preset"in o||"design"in o){let l=String(o.preset||"default").toLowerCase(),d=C?.[l]||Object.values(C||{}).find(h=>fe(h.name)===l||String(h.name||"").toLowerCase()===l);if(!d){t.push({name:i,ok:!1,issues:[{path:"/",message:`Preset not found: ${o.preset}`,ratio:0,min:0}]});continue}let p=structuredClone(d);o.design&&typeof o.design=="object"&&(p=ut(p,structuredClone(o.design))),s=p}else s=o;if(!s){t.push({name:i,ok:!1,issues:[{path:"/",message:"Invalid design entry",ratio:0,min:0}]});continue}let{ok:n,issues:c}=He(s,e);t.push({name:i,ok:n,issues:c})}return{ok:t.every(o=>o.ok),results:t}}m.validateDesigns=co;function pr({manageTheme:r,themeStorageKey:e}){let t="light",a=null;if(r&&typeof window<"u"){try{a=localStorage.getItem(e)||null}catch{a=null}try{lr(a),dr(a)}catch{}a?a==="system"?t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t=a:t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:t,storedTheme:a}}function ut(r={},e={}){if(!e||typeof e!="object")return r;let t=Array.isArray(r)?[...r]:{...r};for(let[a,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?t[a]=ut(t[a]&&typeof t[a]=="object"?t[a]:{},o):t[a]=o;return t}function fe(r=""){return String(r).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function ye(r){if(r==null)return r;if(typeof r=="function")return;if(typeof r!="object")return r;if(Array.isArray(r))return r.map(t=>ye(t)).filter(t=>t!==void 0);let e={};for(let t in r)if(r.hasOwnProperty(t)){let a=r[t];if(typeof a!="function"){let o=ye(a);o!==void 0&&(e[t]=o)}}return e}var lo=/^[a-z][a-z0-9+\-.]*:\/\//i,be=(()=>{try{return import.meta.url}catch{return}})();function Ue(r,e={}){if(!r||lo.test(r))return r;let{preferModule:t=!0}=e,a=()=>{if(!be)return null;try{return new URL(r,be).href}catch{return null}},o=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(r,window.location.origin).href}catch{return null}};return(t?a()||o():o()||a())||r}var We=r=>typeof r=="string"&&r.length&&!r.endsWith("/")?`${r}/`:r,nr=(()=>{if(be)try{let r=new URL(be);if(/\/public\/assets\/js\//.test(r.pathname))return new URL("../pds/",be).href}catch{return}})();function ur(r){let e=!!(r?.public?.root||r?.static?.root),t=or(r);return!e&&nr&&(t=nr),We(Ue(t))}function hr(r={},e={}){let t=typeof r=="object"&&("colors"in r||"typography"in r||"spatialRhythm"in r||"shape"in r||"behavior"in r||"layout"in r||"advanced"in r||"a11y"in r||"components"in r||"icons"in r),a=r&&r.enhancers;a&&!Array.isArray(a)&&(a=Object.values(a));let o=a??e.enhancers??[],i=r&&r.preset,s=r&&r.design,n="preset"in(r||{})||"design"in(r||{})||"enhancers"in(r||{}),c,l=null;if(n){let d=String(i||"default").toLowerCase(),p=C?.[d]||Object.values(C||{}).find(D=>fe(D.name)===d||String(D.name||"").toLowerCase()===d);if(!p)throw new Error(`PDS preset not found: "${i||"default"}"`);l={id:p.id||fe(p.name),name:p.name||p.id||String(d)};let h=structuredClone(p);if(s&&typeof s=="object"){let D=ye(s);h=ut(h,structuredClone(D))}let{mode:g,autoDefine:y,applyGlobalStyles:f,manageTheme:b,themeStorageKey:_,preloadStyles:O,criticalLayers:F,preset:E,design:A,enhancers:M,log:I,...Ge}=r;c={...Ge,design:h,preset:l.name,log:I||Ie}}else if(t){let{log:d,...p}=r;c={design:structuredClone(p),log:d||Ie}}else{let d=C?.default||Object.values(C||{}).find(p=>fe(p.name)==="default");if(!d)throw new Error("PDS default preset not available");l={id:d.id||"default",name:d.name||"Default"},c={design:structuredClone(d),preset:l.name,log:Ie}}return{generatorConfig:c,enhancers:o,presetInfo:l}}async function gr(r){let{autoDefineBaseURL:e="/auto-define/",autoDefinePreload:t=[],autoDefineMapper:a=null,enhancers:o=[],autoDefineOverrides:i=null,autoDefinePreferModule:s=!0}=r,n=(()=>{let l=new Map;return(m.defaultEnhancers||[]).forEach(d=>l.set(d.selector,d)),(o||[]).forEach(d=>l.set(d.selector,d)),Array.from(l.values())})(),c=null;if(typeof window<"u"&&typeof document<"u"){let l=null;try{let f=await Promise.resolve().then(()=>(sr(),ir));l=f?.AutoDefiner||f?.default?.AutoDefiner||f?.default||null}catch(f){console.warn("AutoDefiner not available:",f?.message||f)}let d=f=>{switch(f){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${f}.js`}},{mapper:p,...h}=i&&typeof i=="object"?i:{},y={baseURL:e&&We(Ue(e,{preferModule:s})),predefine:t,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:n,onError:(f,b)=>{typeof f=="string"&&f.startsWith("pds-")?console.warn(`\u26A0\uFE0F PDS component <${f}> not found. Assets may not be installed.`):console.error(`\u274C Auto-define error for <${f}>:`,b)},...h,mapper:f=>{if(customElements.get(f))return null;if(typeof a=="function")try{let b=a(f);return b===void 0?d(f):b}catch(b){return console.warn("Custom autoDefine.mapper error; falling back to default:",b?.message||b),d(f)}return d(f)}};l&&(c=new l(y),t.length>0&&typeof l.define=="function"&&await l.define(...t,{baseURL:e,mapper:y.mapper,onError:y.onError}))}return{autoDefiner:c}}async function po(r){if(!r||typeof r!="object")throw new Error("PDS.start({ mode: 'live', ... }) requires a valid configuration object");if(typeof document<"u"&&document.adoptedStyleSheets){let n=`
3482
3145
  html { opacity: 0; }
3483
3146
  html.pds-ready { opacity: 1; transition: opacity 0.3s ease-in; }
3484
3147
  `;try{if(!document.adoptedStyleSheets.some(l=>l._pdsFouc)){let l=new CSSStyleSheet;l.replaceSync(n),l._pdsFouc=!0,document.adoptedStyleSheets=[l,...document.adoptedStyleSheets]}}catch(c){if(console.warn("Constructable stylesheets not supported, using <style> tag fallback:",c),!document.head.querySelector("style[data-pds-fouc]")){let d=document.createElement("style");d.setAttribute("data-pds-fouc",""),d.textContent=n,document.head.insertBefore(d,document.head.firstChild)}}}let e=r.applyGlobalStyles??!0,t=r.manageTheme??!0,a=r.themeStorageKey??"pure-ds-theme",o=r.preloadStyles??!1,i=r.criticalLayers??["tokens","primitives"],s=r&&r.autoDefine||null;try{let{resolvedTheme:n,storedTheme:c}=pr({manageTheme:t,themeStorageKey:a}),l=hr(r,{}),d=l.enhancers,{log:p,...h}=l.generatorConfig,g=structuredClone(h);g.log=p,t&&(g.theme=n);let y=new m.Generator(g);if(g.design?.typography)try{await je(g.design.typography)}catch(E){g?.log?.("warn","Failed to load some fonts from Google Fonts:",E)}if(o&&typeof window<"u"&&document.head)try{let E=i.map(A=>{try{return y.css?.[A]||""}catch(M){return g?.log?.("warn",`Failed to generate critical CSS for layer "${A}":`,M),""}}).filter(A=>A.trim()).join(`