@exponential_app/eui 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +54 -0
  3. package/README.md +377 -2
  4. package/catalog/a11y.json +705 -0
  5. package/catalog/basic-map.json +104 -0
  6. package/catalog/code.json +58 -0
  7. package/catalog/core.catalog.json +5190 -0
  8. package/catalog/core.schema.json +24542 -0
  9. package/catalog/host.json +95 -0
  10. package/catalog/layout.json +20 -0
  11. package/catalog/limits.json +9 -0
  12. package/catalog/locale.json +48 -0
  13. package/catalog/macros.json +4152 -0
  14. package/catalog/recipes.json +64 -0
  15. package/catalog/strings.json +84 -0
  16. package/catalog/style.json +180 -0
  17. package/catalog/theme.schema.json +47754 -0
  18. package/catalog/tokens.json +47 -0
  19. package/conformance/README.md +218 -0
  20. package/conformance/baseline.ts +101 -0
  21. package/conformance/browser-page.ts +146 -0
  22. package/conformance/browser-suites.ts +699 -0
  23. package/conformance/compare.ts +201 -0
  24. package/conformance/dom.ts +97 -0
  25. package/conformance/dump.ts +163 -0
  26. package/conformance/fonts.json +157 -0
  27. package/conformance/manifest.json +233 -0
  28. package/conformance/parity-compare.ts +191 -0
  29. package/conformance/parity-report.schema.json +73 -0
  30. package/conformance/parity.ts +412 -0
  31. package/conformance/pixel.ts +177 -0
  32. package/conformance/primitives-page.ts +49 -0
  33. package/conformance/report.schema.json +66 -0
  34. package/conformance/run.ts +118 -0
  35. package/conformance/voice-wave-child.ts +102 -0
  36. package/dist/chunks/index-5fmaa0xq.js +8384 -0
  37. package/dist/chunks/index-5fmaa0xq.js.map +10 -0
  38. package/dist/chunks/index-62yzr94z.js +2784 -0
  39. package/dist/chunks/index-62yzr94z.js.map +10 -0
  40. package/dist/chunks/index-bg2jsgjq.js +8541 -0
  41. package/dist/chunks/index-bg2jsgjq.js.map +15 -0
  42. package/dist/chunks/index-fy7y2nz8.js +186 -0
  43. package/dist/chunks/index-fy7y2nz8.js.map +9 -0
  44. package/dist/chunks/index-gtk2gwsb.js +4555 -0
  45. package/dist/chunks/index-gtk2gwsb.js.map +31 -0
  46. package/dist/chunks/index-t6qz1770.js +95 -0
  47. package/dist/chunks/index-t6qz1770.js.map +11 -0
  48. package/dist/conformance.js +230462 -0
  49. package/dist/conformance.js.map +10 -0
  50. package/dist/entries/prompt.js +251 -0
  51. package/dist/entries/prompt.js.map +11 -0
  52. package/dist/entries/schema.js +1725 -0
  53. package/dist/entries/schema.js.map +11 -0
  54. package/dist/host/index.js +194 -0
  55. package/dist/host/index.js.map +9 -0
  56. package/dist/index.js +3840 -0
  57. package/dist/index.js.map +29 -0
  58. package/dist/types/src/a11y.d.ts +21 -0
  59. package/dist/types/src/animation.d.ts +76 -0
  60. package/dist/types/src/basic-map.d.ts +38 -0
  61. package/dist/types/src/builder.d.ts +50 -0
  62. package/dist/types/src/catalog.d.ts +54 -0
  63. package/dist/types/src/catalog.described.d.ts +33 -0
  64. package/dist/types/src/catalog.generated.d.ts +904 -0
  65. package/dist/types/src/chart.d.ts +46 -0
  66. package/dist/types/src/code.d.ts +44 -0
  67. package/dist/types/src/color.d.ts +20 -0
  68. package/dist/types/src/conformance.d.ts +39 -0
  69. package/dist/types/src/connector/app.d.ts +14 -0
  70. package/dist/types/src/connector/connector.d.ts +77 -0
  71. package/dist/types/src/connector/index.d.ts +4 -0
  72. package/dist/types/src/css.d.ts +27 -0
  73. package/dist/types/src/define.d.ts +66 -0
  74. package/dist/types/src/direction.d.ts +16 -0
  75. package/dist/types/src/dynamic.d.ts +161 -0
  76. package/dist/types/src/entries/prompt.d.ts +11 -0
  77. package/dist/types/src/entries/schema.d.ts +8 -0
  78. package/dist/types/src/expr.d.ts +71 -0
  79. package/dist/types/src/extension.d.ts +4 -0
  80. package/dist/types/src/format.d.ts +112 -0
  81. package/dist/types/src/geometry.d.ts +40 -0
  82. package/dist/types/src/host/contract.d.ts +225 -0
  83. package/dist/types/src/host/decoders.d.ts +61 -0
  84. package/dist/types/src/host/index.d.ts +15 -0
  85. package/dist/types/src/host/package.d.ts +102 -0
  86. package/dist/types/src/host/policy.d.ts +107 -0
  87. package/dist/types/src/host/record-store.d.ts +103 -0
  88. package/dist/types/src/host/records.d.ts +45 -0
  89. package/dist/types/src/host/router.d.ts +38 -0
  90. package/dist/types/src/host/runtime.d.ts +213 -0
  91. package/dist/types/src/host/signature.d.ts +52 -0
  92. package/dist/types/src/host/sources.d.ts +22 -0
  93. package/dist/types/src/host/tools.d.ts +42 -0
  94. package/dist/types/src/host/transports.d.ts +109 -0
  95. package/dist/types/src/index.d.ts +69 -0
  96. package/dist/types/src/layout.d.ts +20 -0
  97. package/dist/types/src/limits.d.ts +21 -0
  98. package/dist/types/src/list.d.ts +133 -0
  99. package/dist/types/src/locale.d.ts +22 -0
  100. package/dist/types/src/macros.d.ts +29 -0
  101. package/dist/types/src/overlay.d.ts +27 -0
  102. package/dist/types/src/prompt.d.ts +44 -0
  103. package/dist/types/src/qr-code.d.ts +30 -0
  104. package/dist/types/src/recipes.d.ts +17 -0
  105. package/dist/types/src/reducer.d.ts +41 -0
  106. package/dist/types/src/resizable.d.ts +38 -0
  107. package/dist/types/src/schema.d.ts +7 -0
  108. package/dist/types/src/strings.d.ts +13 -0
  109. package/dist/types/src/style.d.ts +201 -0
  110. package/dist/types/src/test-preload.d.ts +1 -0
  111. package/dist/types/src/text-shimmer.d.ts +24 -0
  112. package/dist/types/src/theme-types.d.ts +162 -0
  113. package/dist/types/src/theme.d.ts +75 -0
  114. package/dist/types/src/themes.d.ts +22 -0
  115. package/dist/types/src/tree-guides.d.ts +17 -0
  116. package/dist/types/src/types.d.ts +320 -0
  117. package/dist/types/src/validate.d.ts +31 -0
  118. package/dist/types/src/voice-wave.d.ts +181 -0
  119. package/dist/types/src/web/base-css.d.ts +1 -0
  120. package/dist/types/src/web/box-css.d.ts +63 -0
  121. package/dist/types/src/web/coerce.d.ts +32 -0
  122. package/dist/types/src/web/custom-icons.generated.d.ts +4 -0
  123. package/dist/types/src/web/data.d.ts +107 -0
  124. package/dist/types/src/web/dates.d.ts +12 -0
  125. package/dist/types/src/web/form.d.ts +44 -0
  126. package/dist/types/src/web/host-types.d.ts +126 -0
  127. package/dist/types/src/web/index.d.ts +35 -0
  128. package/dist/types/src/web/inputs.d.ts +55 -0
  129. package/dist/types/src/web/list.d.ts +16 -0
  130. package/dist/types/src/web/listbox.d.ts +14 -0
  131. package/dist/types/src/web/markdown.d.ts +96 -0
  132. package/dist/types/src/web/media.d.ts +63 -0
  133. package/dist/types/src/web/parts.d.ts +4 -0
  134. package/dist/types/src/web/primitives/alert-dialog.d.ts +10 -0
  135. package/dist/types/src/web/primitives/alert.d.ts +9 -0
  136. package/dist/types/src/web/primitives/avatar-color.d.ts +2 -0
  137. package/dist/types/src/web/primitives/avatar.d.ts +13 -0
  138. package/dist/types/src/web/primitives/badge.d.ts +10 -0
  139. package/dist/types/src/web/primitives/breadcrumb.d.ts +10 -0
  140. package/dist/types/src/web/primitives/button.d.ts +6 -0
  141. package/dist/types/src/web/primitives/calendar.d.ts +43 -0
  142. package/dist/types/src/web/primitives/card.d.ts +9 -0
  143. package/dist/types/src/web/primitives/checkbox.d.ts +5 -0
  144. package/dist/types/src/web/primitives/choice-tiles.d.ts +32 -0
  145. package/dist/types/src/web/primitives/cn.d.ts +3 -0
  146. package/dist/types/src/web/primitives/code-block.d.ts +24 -0
  147. package/dist/types/src/web/primitives/command.d.ts +134 -0
  148. package/dist/types/src/web/primitives/context-ring.d.ts +24 -0
  149. package/dist/types/src/web/primitives/dialog-arms.d.ts +6 -0
  150. package/dist/types/src/web/primitives/dialog.d.ts +24 -0
  151. package/dist/types/src/web/primitives/disclosure-header.d.ts +5 -0
  152. package/dist/types/src/web/primitives/dock.d.ts +42 -0
  153. package/dist/types/src/web/primitives/dropdown-menu.d.ts +14 -0
  154. package/dist/types/src/web/primitives/empty-state.d.ts +15 -0
  155. package/dist/types/src/web/primitives/glass-card.d.ts +4 -0
  156. package/dist/types/src/web/primitives/hover-card.d.ts +7 -0
  157. package/dist/types/src/web/primitives/icon-disc.d.ts +12 -0
  158. package/dist/types/src/web/primitives/index.d.ts +50 -0
  159. package/dist/types/src/web/primitives/input.d.ts +5 -0
  160. package/dist/types/src/web/primitives/kbd.d.ts +4 -0
  161. package/dist/types/src/web/primitives/label.d.ts +3 -0
  162. package/dist/types/src/web/primitives/measure.d.ts +16 -0
  163. package/dist/types/src/web/primitives/menu-surface.d.ts +17 -0
  164. package/dist/types/src/web/primitives/meter.d.ts +21 -0
  165. package/dist/types/src/web/primitives/popover.d.ts +3 -0
  166. package/dist/types/src/web/primitives/progress-ring.d.ts +5 -0
  167. package/dist/types/src/web/primitives/progress.d.ts +8 -0
  168. package/dist/types/src/web/primitives/scroll-area.d.ts +49 -0
  169. package/dist/types/src/web/primitives/segmented-control.d.ts +5 -0
  170. package/dist/types/src/web/primitives/select.d.ts +47 -0
  171. package/dist/types/src/web/primitives/separator.d.ts +3 -0
  172. package/dist/types/src/web/primitives/sheet-chrome.d.ts +4 -0
  173. package/dist/types/src/web/primitives/sheet.d.ts +20 -0
  174. package/dist/types/src/web/primitives/skeleton.d.ts +3 -0
  175. package/dist/types/src/web/primitives/spinner.d.ts +3 -0
  176. package/dist/types/src/web/primitives/switch.d.ts +4 -0
  177. package/dist/types/src/web/primitives/table.d.ts +11 -0
  178. package/dist/types/src/web/primitives/tabs.d.ts +13 -0
  179. package/dist/types/src/web/primitives/textarea.d.ts +3 -0
  180. package/dist/types/src/web/primitives/toast.d.ts +163 -0
  181. package/dist/types/src/web/primitives/tooltip.d.ts +3 -0
  182. package/dist/types/src/web/primitives/truncate.d.ts +7 -0
  183. package/dist/types/src/web/primitives/typeahead-portal.d.ts +12 -0
  184. package/dist/types/src/web/primitives/voice-wave.d.ts +50 -0
  185. package/dist/types/src/web/round5.d.ts +107 -0
  186. package/dist/types/src/web/share.d.ts +6 -0
  187. package/dist/types/src/web/table.d.ts +20 -0
  188. package/dist/types/src/web/theme-css.d.ts +69 -0
  189. package/dist/types/src/web/urls.d.ts +21 -0
  190. package/dist/web/index.js +2565 -0
  191. package/dist/web/index.js.map +28 -0
  192. package/dist/web/primitives/index.js +1476 -0
  193. package/dist/web/primitives/index.js.map +57 -0
  194. package/docs/components.generated.json +6783 -0
  195. package/docs/package-format.md +182 -0
  196. package/docs/round-1-contract.md +679 -0
  197. package/docs/round-2-contract.md +476 -0
  198. package/docs/round-3-contract.md +174 -0
  199. package/docs/round-5-contract.md +268 -0
  200. package/docs/themes.generated.json +3647 -0
  201. package/fixtures/animations.json +2890 -0
  202. package/fixtures/bench-list.json +58 -0
  203. package/fixtures/bind-time.json +54734 -0
  204. package/fixtures/catalog-basic-map.json +1692 -0
  205. package/fixtures/catalog-components.json +10293 -0
  206. package/fixtures/catalog-extension.json +620 -0
  207. package/fixtures/catalog-macros.json +51805 -0
  208. package/fixtures/code-tokens.json +1993 -0
  209. package/fixtures/conformance-baseline.json +59016 -0
  210. package/fixtures/conformance-cases.json +49 -0
  211. package/fixtures/conformance-known.json +2111 -0
  212. package/fixtures/control-geometry.json +5129 -0
  213. package/fixtures/dashboard.data.json +74 -0
  214. package/fixtures/dashboard.json +781 -0
  215. package/fixtures/demo-surface.json +47 -0
  216. package/fixtures/format.json +870 -0
  217. package/fixtures/host-package.json +1262 -0
  218. package/fixtures/host-policy.json +1209 -0
  219. package/fixtures/host-router.json +2034 -0
  220. package/fixtures/host-transport.json +590 -0
  221. package/fixtures/interactions-round1.json +1058 -0
  222. package/fixtures/kitchen-sink.expanded.json +11972 -0
  223. package/fixtures/kitchen-sink.json +3140 -0
  224. package/fixtures/layout-geometry-round1.json +7278 -0
  225. package/fixtures/layout-geometry.json +2072 -0
  226. package/fixtures/overlay-geometry.json +272 -0
  227. package/fixtures/pointer.json +89 -0
  228. package/fixtures/primitive-specimens.json +59 -0
  229. package/fixtures/prompt-budget.json +33 -0
  230. package/fixtures/qr-code.json +480 -0
  231. package/fixtures/resizable.json +714 -0
  232. package/fixtures/round4-contract.json +2985 -0
  233. package/fixtures/specimens.json +11168 -0
  234. package/fixtures/style-conditions.json +336 -0
  235. package/fixtures/template-items.json +2215 -0
  236. package/fixtures/text-direction.json +309 -0
  237. package/fixtures/text-shimmer.json +96 -0
  238. package/fixtures/theme-extends.json +573 -0
  239. package/fixtures/theme-invalid.json +1300 -0
  240. package/fixtures/theme-recipes.json +61762 -0
  241. package/fixtures/theme-resolved.json +25969 -0
  242. package/fixtures/toast-stack.json +215 -0
  243. package/fixtures/tree-guides.json +224 -0
  244. package/fixtures/virtual-list.json +733 -0
  245. package/fixtures/voice-wave.json +19236 -0
  246. package/generated/ExponentialUICatalog.generated.kt +67 -0
  247. package/generated/ExponentialUICatalog.generated.swift +67 -0
  248. package/generated/ExponentialUIThemes.generated.kt +23 -0
  249. package/generated/ExponentialUIThemes.generated.swift +23 -0
  250. package/generated/catalog.descriptions.generated.rs +6 -0
  251. package/generated/catalog.generated.rs +80 -0
  252. package/generated/catalog.themes.generated.rs +34 -0
  253. package/generated/core.descriptions.json +2726 -0
  254. package/generated/core.runtime.json +3944 -0
  255. package/package.json +87 -4
  256. package/themes/exponential.recipes.json +49 -0
  257. package/themes/exponential.theme.json +768 -0
  258. package/themes/neutral.theme.json +6178 -0
  259. package/themes/orange.theme.json +43 -0
  260. package/themes/playful.theme.json +219 -0
  261. package/vendor/a2ui/LICENSE.txt +203 -0
  262. package/vendor/a2ui/README.md +27 -0
  263. package/vendor/a2ui/v0_9/basic_catalog.json +1387 -0
  264. package/vendor/a2ui/v0_9/basic_catalog_rules.txt +5 -0
  265. package/vendor/a2ui/v0_9/client_capabilities.json +97 -0
  266. package/vendor/a2ui/v0_9/client_to_server.json +104 -0
  267. package/vendor/a2ui/v0_9/common_types.json +315 -0
  268. package/vendor/a2ui/v0_9/server_to_client.json +132 -0
  269. package/vendor/json-render/LICENSE.txt +201 -0
  270. package/vendor/json-render/README.md +13 -0
  271. package/vendor/nayuki-qr/LICENSE.txt +20 -0
  272. package/vendor/nayuki-qr/README.md +10 -0
@@ -0,0 +1,2565 @@
1
+ import {
2
+ style_default
3
+ } from "../chunks/index-fy7y2nz8.js";
4
+ import {
5
+ layoutSize2,
6
+ visualScale2,
7
+ elementScale2,
8
+ voiceWaveAnimates2,
9
+ voiceWaveName2,
10
+ voiceWaveClock2,
11
+ voiceWaveFitChild2
12
+ } from "../chunks/index-t6qz1770.js";
13
+
14
+ // packages/exponential-ui/src/web/theme-css.ts
15
+ import { ANIMATIONS, animatesOpacity, coreCatalog, easingCss, parseTokenRef, shadowCss } from "@exponential_app/eui";
16
+ var LAYERS = `@layer xui-base, xui-recipe, xui-node, xui-part, xui-author;`;
17
+ var UNITLESS = new Set([`flexGrow`, `flexShrink`, `opacity`, `fontWeight`, `aspectRatio`, `zIndex`]);
18
+ var kebab = (key) => key.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
19
+ function tokenVarName(ref) {
20
+ const parsed = parseTokenRef(ref);
21
+ if (!parsed)
22
+ return null;
23
+ const { group, name } = parsed;
24
+ if (group === `type.family`)
25
+ return `--xui-font-${name}`;
26
+ return `--xui-${group.replace(/\./g, `-`)}-${name}`;
27
+ }
28
+ function tokenVar(ref) {
29
+ const name = tokenVarName(ref);
30
+ return name ? `var(${name})` : null;
31
+ }
32
+ function cssString(text) {
33
+ return `"${text.replace(/\\/g, `\\\\`).replace(/"/g, `\\"`)}"`;
34
+ }
35
+ var CSS_GENERIC_FAMILIES = new Set([`serif`, `sans-serif`, `monospace`, `cursive`, `fantasy`, `system-ui`, `ui-serif`, `ui-sans-serif`, `ui-monospace`, `ui-rounded`, `math`, `emoji`, `fangsong`]);
36
+ function fontStack(family, fonts) {
37
+ const fallback = fonts[family]?.fallback;
38
+ const name = CSS_GENERIC_FAMILIES.has(family) ? family : cssString(family);
39
+ return fallback ? `${name}, ${fallback}` : name;
40
+ }
41
+ function cssValue(key, value, fonts = {}) {
42
+ if (value === undefined || value === null || typeof value === `boolean`)
43
+ return null;
44
+ if (typeof value === `string` && value.startsWith(`var(--xd-`))
45
+ return value;
46
+ if (typeof value === `string` && value.startsWith(`$`)) {
47
+ const v = tokenVar(value);
48
+ if (v)
49
+ return v;
50
+ }
51
+ if (key === `boxShadow`)
52
+ return Array.isArray(value) ? shadowCss(value) : String(value);
53
+ if (key === `fontFamily`)
54
+ return fontStack(String(value), fonts);
55
+ if (key === `gridTemplateAreas` && Array.isArray(value))
56
+ return value.map((row) => `"${row}"`).join(` `);
57
+ if (key === `backgroundGradient`)
58
+ return gradientValue(value);
59
+ if (key === `transitionEasing`)
60
+ return Array.isArray(value) ? easingCss(value) : String(value);
61
+ if (key === `transition`)
62
+ return typeof value === `number` ? `${value}ms` : String(value);
63
+ if (typeof value === `object`)
64
+ return null;
65
+ if (typeof value === `number`)
66
+ return UNITLESS.has(key) ? String(value) : `${value}px`;
67
+ if ((key === `overflow` || key === `overflowX` || key === `overflowY`) && value === `hidden`)
68
+ return `clip`;
69
+ return String(value);
70
+ }
71
+ function gradientValue(value) {
72
+ if (typeof value !== `object` || value === null)
73
+ return null;
74
+ const g = value;
75
+ if (!Array.isArray(g.stops) || g.stops.length < 2)
76
+ return null;
77
+ const stops = g.stops.map((s) => {
78
+ const color = typeof s.color === `string` && s.color.startsWith(`$`) ? tokenVar(s.color) ?? s.color : String(s.color);
79
+ return `${color} ${Math.round(Number(s.offset ?? 0) * 1e4) / 100}%`;
80
+ });
81
+ return `linear-gradient(${Number(g.angle ?? 180)}deg, ${stops.join(`, `)})`;
82
+ }
83
+ var SHORTHANDS = {
84
+ paddingHorizontal: [`padding-left`, `padding-right`],
85
+ paddingVertical: [`padding-top`, `padding-bottom`],
86
+ marginHorizontal: [`margin-left`, `margin-right`],
87
+ marginVertical: [`margin-top`, `margin-bottom`],
88
+ backgroundGradient: [`background-image`],
89
+ transition: [`transition-property:all`, `transition-duration`],
90
+ transitionEasing: [`transition-timing-function`]
91
+ };
92
+ var BORDER_WIDTHS = [`borderWidth`, `borderTopWidth`, `borderRightWidth`, `borderBottomWidth`, `borderLeftWidth`];
93
+ function declarations(style, fonts = {}, base) {
94
+ const out = [];
95
+ const animation = `animation` in style ? style.animation : base?.animation;
96
+ const multiply = typeof animation === `string` && animatesOpacity(animation) && ((`animation` in style) || (`opacity` in style));
97
+ for (const [key, value] of Object.entries(style)) {
98
+ if (key === `native` || key.startsWith(`@`) || key.startsWith(`:`))
99
+ continue;
100
+ if (typeof value === `object` && value !== null && !Array.isArray(value) && key !== `backgroundGradient`)
101
+ continue;
102
+ if (key === `backdropBlur`) {
103
+ const v = cssValue(key, value, fonts);
104
+ if (v)
105
+ out.push([`-webkit-backdrop-filter`, `blur(${v})`], [`backdrop-filter`, `blur(${v})`]);
106
+ continue;
107
+ }
108
+ if (key === `animation`) {
109
+ out.push(...animationDeclarations(value, style.animationDuration));
110
+ continue;
111
+ }
112
+ if (key === `animationDuration`) {
113
+ const v = typeof value === `string` ? tokenVar(value) : null;
114
+ if (v && !(`animation` in style))
115
+ out.push([`animation-duration`, `calc(${v} * var(--xui-anim-factor, 1))`]);
116
+ continue;
117
+ }
118
+ const css = cssValue(key, value, fonts);
119
+ if (css === null)
120
+ continue;
121
+ for (const target of SHORTHANDS[key] ?? [kebab(key)]) {
122
+ const fixed = target.indexOf(`:`);
123
+ if (fixed > 0)
124
+ out.push([target.slice(0, fixed), target.slice(fixed + 1)]);
125
+ else
126
+ out.push([target, css]);
127
+ }
128
+ }
129
+ if (multiply) {
130
+ const at = out.findIndex(([p]) => p === `opacity`);
131
+ const ownStyle = `opacity` in style ? style : base && (`opacity` in base) ? base : null;
132
+ const own = at >= 0 ? out[at][1] : ownStyle ? cssValue(`opacity`, ownStyle.opacity, fonts) : null;
133
+ const value = own === null ? `var(--xui-a-opacity, 1)` : `calc(${own} * var(--xui-a-opacity, 1))`;
134
+ if (at >= 0)
135
+ out[at] = [`opacity`, value];
136
+ else
137
+ out.push([`opacity`, value]);
138
+ }
139
+ if (!(`borderStyle` in style) && BORDER_WIDTHS.some((k) => (k in style)))
140
+ out.push([`border-style`, `solid`]);
141
+ return out;
142
+ }
143
+ function animationDeclarations(name, durationToken) {
144
+ const def = typeof name === `string` ? ANIMATIONS[name] : undefined;
145
+ if (!def)
146
+ return [[`animation-name`, `none`]];
147
+ const token = typeof durationToken === `string` && parseTokenRef(durationToken)?.group === `motion` ? durationToken : def.duration;
148
+ const ease = def.easing === `linear` ? `linear` : tokenVar(def.easing) ?? `linear`;
149
+ return [
150
+ [`--xui-anim-factor`, String(def.factor)],
151
+ [`animation-name`, `xui-${name}`],
152
+ [`animation-duration`, `calc(${tokenVar(token) ?? `0ms`} * ${def.factor})`],
153
+ [`animation-timing-function`, ease],
154
+ [`animation-iteration-count`, def.iterations === `infinite` ? `infinite` : String(def.iterations)],
155
+ [`animation-fill-mode`, `both`]
156
+ ];
157
+ }
158
+ function shimmerRule(selector, style) {
159
+ if (style.animation !== `shimmer`)
160
+ return ``;
161
+ const band = ANIMATIONS.shimmer?.band;
162
+ const color = (band && tokenVar(band.color)) ?? `var(--xui-color-background)`;
163
+ const stops = (band?.stops ?? [{ offset: 0, alpha: 0 }, { offset: 0.5, alpha: 0.5 }, { offset: 1, alpha: 0 }]).map((s) => `color-mix(in srgb, ${color} ${Math.round(s.alpha * 100)}%, transparent) calc(var(--xui-band, 1) * 100% + ${Math.round(s.offset * 100)}%)`);
164
+ const sel = selector.split(`,`).map((x) => `${x}::after`).join(`,`);
165
+ return `${sel}{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;background-image:linear-gradient(90deg, ${stops.join(`, `)})}`;
166
+ }
167
+ var rule = (selector, decls) => decls.length === 0 ? `` : `${selector}{${decls.map(([p, v]) => `${p}:${v}`).join(`;`)}}`;
168
+ var STATE_SELECTORS = {
169
+ hover: [`:hover`, `[data-xs~="hover"]`],
170
+ pressed: [`:active`, `[data-xs~="pressed"]`],
171
+ focus: [`:focus-visible`, `[data-xs~="focus"]`],
172
+ disabled: [`:disabled`, `[data-disabled]`, `[aria-disabled="true"]`, `[data-xs~="disabled"]`],
173
+ checked: [`[data-state="checked"]`, `[data-xs~="checked"]`],
174
+ open: [`[data-state="open"]`, `[data-xs~="open"]`],
175
+ selected: [`[data-state="active"]`, `[data-state="on"]`, `[data-highlighted]`, `[data-xs~="selected"]`],
176
+ invalid: [`[aria-invalid="true"]`, `[data-xs~="invalid"]`],
177
+ dragover: [`[data-dragover]`, `[data-xs~="dragover"]`]
178
+ };
179
+ function stateSuffixes(states) {
180
+ let out = [``];
181
+ for (const state of states) {
182
+ const alts = STATE_SELECTORS[state] ?? [`[data-xs~="${state}"]`];
183
+ out = out.flatMap((prefix) => alts.map((alt) => prefix + alt));
184
+ }
185
+ return out;
186
+ }
187
+ var propAttribute = (macro, prop) => `data-${macro ? `m` : `r`}-${kebab(prop)}`;
188
+ function propSelector(when, macro) {
189
+ if (!when)
190
+ return [``];
191
+ let out = [``];
192
+ for (const [key, want] of Object.entries(when)) {
193
+ if (key === `state`)
194
+ continue;
195
+ const values = Array.isArray(want) ? want : [want];
196
+ out = out.flatMap((prefix) => values.map((v) => `${prefix}[${propAttribute(macro, key)}="${String(v)}"]`));
197
+ }
198
+ return out;
199
+ }
200
+ function ruleSelectors(base, rule, macro = false) {
201
+ const states = rule.when?.state === undefined ? [] : Array.isArray(rule.when.state) ? rule.when.state.map(String) : [String(rule.when.state)];
202
+ const props = propSelector(rule.when, macro);
203
+ const suffixes = stateSuffixes(states);
204
+ return props.flatMap((p) => suffixes.map((s) => `${base}${p}${s}`));
205
+ }
206
+ function hash(text) {
207
+ let h = 2166136261;
208
+ for (let i = 0;i < text.length; i++) {
209
+ h ^= text.charCodeAt(i);
210
+ h = Math.imul(h, 16777619);
211
+ }
212
+ return (h >>> 0).toString(36);
213
+ }
214
+ function themeScope(theme) {
215
+ return `xui-t-${theme.id.replace(/[^a-z0-9-]/gi, `-`)}-${hash(JSON.stringify(theme))}`;
216
+ }
217
+ var SHADCN_ALIASES = [
218
+ [`--background`, `background`],
219
+ [`--foreground`, `foreground`],
220
+ [`--card`, `card`],
221
+ [`--card-foreground`, `cardForeground`],
222
+ [`--popover`, `popover`],
223
+ [`--popover-foreground`, `popoverForeground`],
224
+ [`--primary`, `primary`],
225
+ [`--primary-foreground`, `primaryForeground`],
226
+ [`--secondary`, `secondary`],
227
+ [`--secondary-foreground`, `secondaryForeground`],
228
+ [`--muted`, `muted`],
229
+ [`--muted-foreground`, `mutedForeground`],
230
+ [`--accent`, `accent`],
231
+ [`--accent-foreground`, `accentForeground`],
232
+ [`--destructive`, `destructive`],
233
+ [`--destructive-foreground`, `destructiveForeground`],
234
+ [`--success`, `success`],
235
+ [`--success-foreground`, `successForeground`],
236
+ [`--warning`, `warning`],
237
+ [`--warning-foreground`, `warningForeground`],
238
+ [`--info`, `info`],
239
+ [`--info-foreground`, `infoForeground`],
240
+ [`--border`, `border`],
241
+ [`--input`, `input`],
242
+ [`--ring`, `ring`],
243
+ [`--chart-1`, `chart1`],
244
+ [`--chart-2`, `chart2`],
245
+ [`--chart-3`, `chart3`],
246
+ [`--chart-4`, `chart4`],
247
+ [`--chart-5`, `chart5`],
248
+ [`--chart-6`, `chart6`],
249
+ [`--chart-7`, `chart7`],
250
+ [`--chart-8`, `chart8`],
251
+ [`--sidebar`, `background`],
252
+ [`--sidebar-foreground`, `foreground`],
253
+ [`--sidebar-primary`, `primary`],
254
+ [`--sidebar-primary-foreground`, `primaryForeground`],
255
+ [`--sidebar-accent`, `accent`],
256
+ [`--sidebar-accent-foreground`, `accentForeground`],
257
+ [`--sidebar-border`, `border`],
258
+ [`--sidebar-ring`, `ring`],
259
+ [`--glass-fill-section`, `muted`],
260
+ [`--glass-fill-row`, `muted`],
261
+ [`--glass-fill-card`, `card`],
262
+ [`--glass-fill-panel`, `popover`],
263
+ [`--glass-fill-active`, `accent`],
264
+ [`--glass-stroke-row`, `border`],
265
+ [`--glass-stroke-section`, `border`],
266
+ [`--glass-stroke-card`, `border`],
267
+ [`--glass-stroke-strong`, `input`],
268
+ [`--glass-stroke-active`, `ring`],
269
+ [`--glass-background-top`, `background`],
270
+ [`--glass-background-bottom`, `background`]
271
+ ];
272
+ function tokenBlock(theme) {
273
+ const decls = [];
274
+ const tokens = theme.tokens;
275
+ for (const group of [`spacing`, `radius`, `control`, `opacity`, `border`, `motion`]) {
276
+ for (const [name, value] of Object.entries(tokens[group] ?? {})) {
277
+ const unit = group === `opacity` ? `` : group === `motion` ? `ms` : `px`;
278
+ decls.push([`--xui-${group}-${name}`, `${value}${unit}`]);
279
+ }
280
+ }
281
+ for (const [name, px] of Object.entries(theme.tokens.blur ?? {}))
282
+ decls.push([`--xui-blur-${name}`, `${px}px`]);
283
+ for (const [name, value] of Object.entries(theme.tokens.scale ?? {}))
284
+ decls.push([`--xui-scale-${name}`, String(value)]);
285
+ for (const [name, curve] of Object.entries(theme.tokens.ease ?? {}))
286
+ decls.push([`--xui-ease-${name}`, easingCss(curve)]);
287
+ for (const [name, px] of Object.entries(theme.tokens.breakpoint ?? {}))
288
+ decls.push([`--xui-breakpoint-${name}`, `${px}px`]);
289
+ for (const [name, value] of Object.entries(theme.tokens.type.size))
290
+ decls.push([`--xui-type-size-${name}`, `${value}px`]);
291
+ for (const [name, value] of Object.entries(theme.tokens.type.lineHeight))
292
+ decls.push([`--xui-type-lineHeight-${name}`, `${value}px`]);
293
+ for (const [name, value] of Object.entries(theme.tokens.type.weight))
294
+ decls.push([`--xui-type-weight-${name}`, String(value)]);
295
+ for (const [name, family] of Object.entries(theme.tokens.type.family))
296
+ decls.push([`--xui-font-${name}`, fontStack(family, theme.fonts)]);
297
+ decls.push([`--radius`, `var(--xui-radius-lg)`], [`--font-sans`, `var(--xui-font-sans)`], [`--font-mono`, `var(--xui-font-mono)`]);
298
+ decls.push([`--xui-duration-fast`, `var(--xui-motion-fast)`], [`--xui-duration-standard`, `var(--xui-motion-standard)`]);
299
+ return decls.map(([p, v]) => `${p}:${v}`).join(`;`);
300
+ }
301
+ function modeBlock(theme, mode) {
302
+ const decls = [];
303
+ for (const [name, hex] of Object.entries(theme.modes[mode].color))
304
+ decls.push([`--xui-color-${name}`, hex]);
305
+ for (const [name, layers] of Object.entries(theme.modes[mode].shadow))
306
+ decls.push([`--xui-shadow-${name}`, shadowCss(layers)]);
307
+ for (const [alias, token] of SHADCN_ALIASES)
308
+ decls.push([alias, `var(--xui-color-${token})`]);
309
+ decls.push([`color-scheme`, mode]);
310
+ return decls.map(([p, v]) => `${p}:${v}`).join(`;`);
311
+ }
312
+ var MACROS = new Set(Object.entries(coreCatalog.components).filter(([, d]) => d.kind === `macro`).map(([n]) => n));
313
+ function isMacroComponent(component, extensionMacros = new Set) {
314
+ return MACROS.has(component) || extensionMacros.has(component);
315
+ }
316
+ var partClass = (component, part) => `xui-${component}-${part}`;
317
+ function compileTheme(theme, options = {}) {
318
+ const scope = themeScope(theme);
319
+ const root = `.xui-surface.${scope}`;
320
+ const chunks = [LAYERS];
321
+ chunks.push(`${root}{${tokenBlock(theme)}}`);
322
+ chunks.push(`${root}[data-xui-mode="light"]{${modeBlock(theme, `light`)}}`);
323
+ chunks.push(`${root}[data-xui-mode="dark"]{${modeBlock(theme, `dark`)}}`);
324
+ const recipe = [];
325
+ const part = [];
326
+ for (const [component, parts] of Object.entries(theme.recipes)) {
327
+ const macro = isMacroComponent(component, options.extensionMacros);
328
+ const target = macro ? part : recipe;
329
+ for (const [partName, rules] of Object.entries(parts)) {
330
+ const base = `.${scope}.${partClass(component, partName)}`;
331
+ for (const r of rules) {
332
+ const decls = declarations(r.style, theme.fonts);
333
+ if (decls.length === 0)
334
+ continue;
335
+ const selector = ruleSelectors(base, r, macro).join(`,`);
336
+ target.push(rule(selector, decls) + shimmerRule(selector, r.style));
337
+ }
338
+ }
339
+ }
340
+ chunks.push(`@layer xui-recipe{${recipe.join(``)}}`);
341
+ chunks.push(`@layer xui-part{${part.join(``)}}`);
342
+ return { scope, css: chunks.join(`
343
+ `), theme };
344
+ }
345
+ var cache = new WeakMap;
346
+ function compiledTheme(theme, options) {
347
+ if (options?.extensionMacros && options.extensionMacros.size > 0)
348
+ return compileTheme(theme, options);
349
+ let hit = cache.get(theme);
350
+ if (!hit) {
351
+ hit = compileTheme(theme);
352
+ cache.set(theme, hit);
353
+ }
354
+ return hit;
355
+ }
356
+ function globalsCss(theme, options = {}) {
357
+ const block = (mode, shared) => {
358
+ const color = theme.modes[mode].color;
359
+ const decls = [];
360
+ for (const [alias, token] of SHADCN_ALIASES)
361
+ if (color[token] !== undefined)
362
+ decls.push([alias, color[token]]);
363
+ if (shared) {
364
+ const radius = theme.tokens.radius.lg;
365
+ if (radius !== undefined)
366
+ decls.push([`--radius`, `${radius}px`]);
367
+ for (const name of [`sans`, `mono`]) {
368
+ const family = theme.tokens.type.family[name];
369
+ if (family)
370
+ decls.push([`--font-${name}`, fontStack(family, theme.fonts)]);
371
+ }
372
+ }
373
+ return decls.map(([p, v]) => ` ${p}: ${v};`).join(`
374
+ `);
375
+ };
376
+ return `${options.light ?? `:root`} {
377
+ ${block(`light`, true)}
378
+ }
379
+
380
+ ${options.dark ?? `.dark`} {
381
+ ${block(`dark`, false)}
382
+ }
383
+ `;
384
+ }
385
+ // packages/exponential-ui/src/web/box-css.ts
386
+ import { parseMediaCondition, parseTokenRef as parseTokenRef2 } from "@exponential_app/eui";
387
+
388
+ // packages/exponential-ui/src/web/data.ts
389
+ import { CORE_FUNCTIONS, DEFAULT_LOCALE, FORMAT_FUNCTION_NAMES, displayString, formatFunctions, hasRowSlots, intlFormatter, isDataSchema, resolveString, sharedCatalogView, readPointer, truthy, writePointer } from "@exponential_app/eui";
390
+ function isBinding(value) {
391
+ return typeof value === `object` && value !== null && !Array.isArray(value) && typeof value.path === `string` && Object.keys(value).length === 1;
392
+ }
393
+ function isCall(value) {
394
+ return typeof value === `object` && value !== null && !Array.isArray(value) && typeof value.call === `string`;
395
+ }
396
+ var unescape = (token) => token.replace(/~1/g, `/`).replace(/~0/g, `~`);
397
+ function pointerTokens(pointer) {
398
+ if (pointer === `` || pointer === `/`)
399
+ return [];
400
+ return (pointer.startsWith(`/`) ? pointer.slice(1) : pointer).split(`/`).map(unescape);
401
+ }
402
+ function absolutePath(path, scope = ``) {
403
+ if (path.startsWith(`/`))
404
+ return path;
405
+ if (!scope)
406
+ return `/${path}`;
407
+ return path === `` ? scope : `${scope}/${path}`;
408
+ }
409
+ var getPointer = readPointer;
410
+ function setPointer(data, pointer, value) {
411
+ return writePointer(data, pointer, value).data;
412
+ }
413
+ var LITERAL_ROWS_ROOT = `/$xuiRows`;
414
+ function hostPath(path) {
415
+ return path === undefined || path === LITERAL_ROWS_ROOT || path.startsWith(`${LITERAL_ROWS_ROOT}/`) ? undefined : path;
416
+ }
417
+ var num = (v) => typeof v === `number` ? v : Number(v);
418
+ function interpolate(text, ctx) {
419
+ return text.replace(/\$\{([^}]+)\}/g, (_, expr) => {
420
+ return displayString(getPointer(ctx.data, absolutePath(expr.trim(), ctx.scope)));
421
+ });
422
+ }
423
+ function memoFormatter(base, max = 4096) {
424
+ const hits = new Map;
425
+ const memo = (key, run) => {
426
+ const hit = hits.get(key);
427
+ if (hit !== undefined)
428
+ return hit;
429
+ const out = run();
430
+ if (hits.size >= max)
431
+ hits.clear();
432
+ hits.set(key, out);
433
+ return out;
434
+ };
435
+ const valueKey = (v) => v instanceof Date ? `t${v.getTime()}` : typeof v === `string` ? `s${v}` : `${typeof v}${String(v)}`;
436
+ return {
437
+ locale: base.locale,
438
+ number: (value, o) => memo(`n|${value}|${o?.decimals}|${o?.grouping}`, () => base.number(value, o)),
439
+ currency: (value, currency, o) => memo(`c|${currency}|${value}|${o?.decimals}|${o?.grouping}`, () => base.currency(value, currency, o)),
440
+ percent: (value, o) => memo(`p|${value}|${o?.decimals}`, () => base.percent(value, o)),
441
+ date: (value, o) => memo(`d|${o?.format}|${o?.style}|${o?.time}|${valueKey(value)}`, () => base.date(value, o)),
442
+ relativeTime: (value, now) => base.relativeTime(value, now),
443
+ plural: (value) => memo(`l|${value}`, () => base.plural(value))
444
+ };
445
+ }
446
+ var formatterCache = new Map;
447
+ function formatterOf(ctx) {
448
+ if (ctx.formatter)
449
+ return ctx.formatter;
450
+ const locale = ctx.locale ?? DEFAULT_LOCALE;
451
+ let hit = formatterCache.get(locale);
452
+ if (!hit)
453
+ formatterCache.set(locale, hit = memoFormatter(intlFormatter(locale, `UTC`)));
454
+ return hit;
455
+ }
456
+ var formatTables = new WeakMap;
457
+ function formatCall(name) {
458
+ return (args, ctx) => {
459
+ const formatter = formatterOf(ctx);
460
+ let hit = formatTables.get(formatter);
461
+ if (!hit || hit.now !== ctx.now)
462
+ formatTables.set(formatter, hit = { now: ctx.now, table: formatFunctions(formatter, ctx.now) });
463
+ return hit.table[name](args);
464
+ };
465
+ }
466
+ var FORMAT = Object.fromEntries(FORMAT_FUNCTION_NAMES.map((name) => [name, formatCall(name)]));
467
+ var CORE = Object.fromEntries(Object.entries(CORE_FUNCTIONS).map(([name, fn]) => [name, (args) => fn(args)]));
468
+ var CLIENT_FUNCTIONS = {
469
+ required: ({ value }) => truthy(value) && !(Array.isArray(value) && value.length === 0),
470
+ regex: ({ value, pattern }) => {
471
+ try {
472
+ return new RegExp(String(pattern)).test(String(value ?? ``));
473
+ } catch {
474
+ return false;
475
+ }
476
+ },
477
+ length: ({ value, min, max }) => {
478
+ const n = String(value ?? ``).length;
479
+ return (min === undefined || n >= num(min)) && (max === undefined || n <= num(max));
480
+ },
481
+ numeric: ({ value, min, max }) => {
482
+ const n = num(value);
483
+ return Number.isFinite(n) && (min === undefined || n >= num(min)) && (max === undefined || n <= num(max));
484
+ },
485
+ email: ({ value }) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(value ?? ``)),
486
+ formatString: ({ value }, ctx) => interpolate(String(value ?? ``), ctx),
487
+ openUrl: ({ url }, ctx) => {
488
+ if (typeof url === `string`)
489
+ ctx.openUrl?.(url);
490
+ return;
491
+ },
492
+ and: ({ values }) => Array.isArray(values) ? values.every(truthy) : false,
493
+ or: ({ values }) => Array.isArray(values) ? values.some(truthy) : false,
494
+ not: ({ value }) => !truthy(value),
495
+ ...CORE,
496
+ ...FORMAT
497
+ };
498
+ function resolveValue(value, ctx) {
499
+ if (isBinding(value))
500
+ return getPointer(ctx.data, absolutePath(value.path, ctx.scope));
501
+ if (isCall(value)) {
502
+ const fn = ctx.functions?.[value.call] ?? CLIENT_FUNCTIONS[value.call];
503
+ if (!fn)
504
+ return;
505
+ const args = {};
506
+ for (const [k, v] of Object.entries(value.args ?? {}))
507
+ args[k] = resolveValue(v, ctx);
508
+ return fn(args, ctx);
509
+ }
510
+ if (typeof value === `string`)
511
+ return ctx.strings && value.startsWith(`$string.`) ? resolveString(value, ctx.strings) : value;
512
+ if (Array.isArray(value))
513
+ return value.map((item) => resolveValue(item, ctx));
514
+ if (typeof value === `object` && value !== null) {
515
+ const out = {};
516
+ for (const [k, v] of Object.entries(value))
517
+ out[k] = resolveValue(v, ctx);
518
+ return out;
519
+ }
520
+ return value;
521
+ }
522
+ function resolveProps(props, ctx) {
523
+ return resolveValue(props, ctx);
524
+ }
525
+ function viewOf(extensions) {
526
+ return sharedCatalogView(extensions);
527
+ }
528
+ var isPlainObject = (v) => typeof v === `object` && v !== null && !Array.isArray(v);
529
+ function resolveAlong(value, schema, ctx, defs) {
530
+ if (isBinding(value) || isCall(value))
531
+ return resolveValue(value, ctx);
532
+ if (isDataSchema(schema))
533
+ return value;
534
+ if (schema?.type === `array` && schema.items && Array.isArray(value))
535
+ return value.map((item) => resolveAlong(item, schema.items, ctx, defs));
536
+ const shape = schema?.type === `object` && schema.shape ? defs[schema.shape] : undefined;
537
+ if (shape && isPlainObject(value)) {
538
+ const out = {};
539
+ for (const [k, v] of Object.entries(value))
540
+ out[k] = resolveAlong(v, shape.properties[k], ctx, defs);
541
+ return out;
542
+ }
543
+ return resolveValue(value, ctx);
544
+ }
545
+ function resolveNodeProps(component, props, ctx, extensions) {
546
+ const view = viewOf(extensions);
547
+ const def = view.components[component];
548
+ const out = {};
549
+ for (const [k, v] of Object.entries(props)) {
550
+ const r = resolveAlong(v, def?.props[k], ctx, view.defs);
551
+ if (r !== undefined)
552
+ out[k] = r;
553
+ }
554
+ return out;
555
+ }
556
+ function boundPath(props, name, scope = ``) {
557
+ const raw = props[name];
558
+ return isBinding(raw) ? absolutePath(raw.path, scope) : undefined;
559
+ }
560
+ function resolveVisible(visible, ctx) {
561
+ if (visible === undefined)
562
+ return true;
563
+ return truthy(resolveValue(visible, ctx));
564
+ }
565
+ function hasDynamic(value) {
566
+ if (isBinding(value) || isCall(value))
567
+ return true;
568
+ if (Array.isArray(value))
569
+ return value.some(hasDynamic);
570
+ if (typeof value === `object` && value !== null)
571
+ return Object.values(value).some(hasDynamic);
572
+ return false;
573
+ }
574
+ function resolveAccessibility(accessibility, ctx) {
575
+ if (!accessibility || typeof accessibility !== `object`)
576
+ return null;
577
+ const out = {};
578
+ for (const [k, v] of Object.entries(resolveValue(accessibility, ctx)))
579
+ if (v !== undefined)
580
+ out[k] = v;
581
+ return Object.keys(out).length ? out : null;
582
+ }
583
+ function ariaAttributes(a11y) {
584
+ const out = {};
585
+ if (!a11y)
586
+ return out;
587
+ const role = a11y.role;
588
+ if (role === `hidden`)
589
+ out[`aria-hidden`] = `true`;
590
+ else if (typeof role === `string` && role !== `text` && role !== ``)
591
+ out.role = role;
592
+ if (a11y.label !== undefined && a11y.label !== null && a11y.label !== ``)
593
+ out[`aria-label`] = String(a11y.label);
594
+ if (a11y.description !== undefined && a11y.description !== null && a11y.description !== ``)
595
+ out[`aria-description`] = String(a11y.description);
596
+ if (typeof a11y.level === `number` || typeof a11y.level === `string` && a11y.level !== ``)
597
+ out[`aria-level`] = String(a11y.level);
598
+ for (const [key, attr] of [[`expanded`, `aria-expanded`], [`selected`, `aria-selected`], [`pressed`, `aria-pressed`], [`checked`, `aria-checked`]]) {
599
+ const v = a11y[key];
600
+ if (typeof v === `boolean` || v === `mixed`)
601
+ out[attr] = String(v);
602
+ }
603
+ if (a11y.current !== undefined && a11y.current !== null && a11y.current !== false && a11y.current !== ``)
604
+ out[`aria-current`] = a11y.current === true ? `true` : String(a11y.current);
605
+ for (const [key, attr] of [[`valueNow`, `aria-valuenow`], [`valueMin`, `aria-valuemin`], [`valueMax`, `aria-valuemax`]]) {
606
+ const v = a11y[key];
607
+ if (typeof v === `number` && Number.isFinite(v))
608
+ out[attr] = String(v);
609
+ }
610
+ if (a11y.hidden === true)
611
+ out[`aria-hidden`] = `true`;
612
+ if (a11y.autoFocus === true)
613
+ out[`data-xui-autofocus`] = ``;
614
+ return out;
615
+ }
616
+ function bindTree(node, ctx, extensions) {
617
+ if (!resolveVisible(node.visible, ctx))
618
+ return null;
619
+ const out = { id: node.id, component: node.component, props: resolveNodeProps(node.component, node.props, ctx, extensions), children: [] };
620
+ if (node.style)
621
+ out.style = resolveValue(node.style, ctx);
622
+ if (node.on)
623
+ out.on = node.on;
624
+ if (node.accessibility) {
625
+ const a11y = resolveAccessibility(node.accessibility, ctx);
626
+ if (a11y)
627
+ out.accessibility = a11y;
628
+ }
629
+ for (const child of node.children) {
630
+ const bound = bindTree(child, ctx, extensions);
631
+ if (bound)
632
+ out.children.push(bound);
633
+ }
634
+ if (node.slots) {
635
+ if (hasRowSlots(viewOf(extensions).components[node.component]))
636
+ out.slots = node.slots;
637
+ else
638
+ for (const [name, slot] of Object.entries(node.slots)) {
639
+ const bound = bindTree(slot, ctx, extensions);
640
+ if (bound)
641
+ (out.slots ??= {})[name] = bound;
642
+ }
643
+ }
644
+ if (node.template)
645
+ out.template = node.template;
646
+ if (node.recipe)
647
+ out.recipe = { ...node.recipe, props: resolveValue(node.recipe.props, ctx) };
648
+ return out;
649
+ }
650
+
651
+ // packages/exponential-ui/src/web/box-css.ts
652
+ var nodeClass = (id) => `xui-n-${cssEscape(id)}`;
653
+ var surfaceClass = (surfaceId) => `xui-s-${cssEscape(surfaceId)}`;
654
+ function cssEscape(text) {
655
+ return text.replace(/[^a-zA-Z0-9_-]/g, (c) => `_${c.charCodeAt(0).toString(16)}_`);
656
+ }
657
+ function* walkNodes(root) {
658
+ yield root;
659
+ for (const slot of Object.values(root.slots ?? {}))
660
+ yield* walkNodes(slot);
661
+ for (const child of root.children)
662
+ yield* walkNodes(child);
663
+ }
664
+ function dynamicStyleEntries(style) {
665
+ const out = [];
666
+ if (!style)
667
+ return out;
668
+ const visit = (block, s) => {
669
+ for (const [key, value] of Object.entries(s)) {
670
+ if (key.startsWith(`@`) || key.startsWith(`:`))
671
+ continue;
672
+ if (hasDynamic(value))
673
+ out.push({ name: `--xd-${out.length}`, block, key, value });
674
+ }
675
+ };
676
+ visit(``, style);
677
+ for (const [key, value] of Object.entries(style)) {
678
+ if ((key.startsWith(`@`) || key.startsWith(`:`)) && typeof value === `object` && value !== null)
679
+ visit(key, value);
680
+ }
681
+ return out;
682
+ }
683
+ function queryToken(key) {
684
+ return cssEscape(key.replace(/^@media \(|\)$/g, ``).replace(/: /, `-`));
685
+ }
686
+ function resolvedMediaKey(key, theme) {
687
+ const condition = parseMediaCondition(key);
688
+ if (!condition)
689
+ return null;
690
+ if (condition.feature === `orientation` || condition.feature === `hover` || condition.feature === `prefers-reduced-motion`)
691
+ return key;
692
+ const px = breakpointPx(condition.value, theme);
693
+ return px === null ? null : `@media (${condition.feature}: ${px}px)`;
694
+ }
695
+ var isDirection = (v) => v === `ltr` || v === `rtl`;
696
+ function styleDirection(style, theme, matches) {
697
+ if (!style)
698
+ return;
699
+ let out = isDirection(style.direction) ? style.direction : undefined;
700
+ for (const [key, value] of Object.entries(style)) {
701
+ if (!key.startsWith(`@`) || typeof value !== `object` || value === null)
702
+ continue;
703
+ const d = value.direction;
704
+ if (!isDirection(d))
705
+ continue;
706
+ const resolved = resolvedMediaKey(key, theme);
707
+ if (resolved && matches(resolved))
708
+ out = d;
709
+ }
710
+ return out;
711
+ }
712
+ function breakpointPx(value, theme) {
713
+ const ref = parseTokenRef2(value);
714
+ if (ref) {
715
+ if (ref.group !== `breakpoint`)
716
+ return null;
717
+ const px = theme?.tokens.breakpoint?.[ref.name];
718
+ return typeof px === `number` ? px : null;
719
+ }
720
+ const n = parseFloat(value);
721
+ return Number.isFinite(n) ? n : null;
722
+ }
723
+ var AUTHOR_SEP = `\x00`;
724
+ function layeredCss(chunks) {
725
+ const node = [];
726
+ const author = [];
727
+ for (const chunk of chunks) {
728
+ const at = chunk.indexOf(AUTHOR_SEP);
729
+ if (at < 0)
730
+ node.push(chunk);
731
+ else {
732
+ node.push(chunk.slice(0, at));
733
+ author.push(chunk.slice(at + 1));
734
+ }
735
+ }
736
+ return `@layer xui-node{${node.join(``)}}${author.length ? `@layer xui-author{${author.join(``)}}` : ``}`;
737
+ }
738
+ var chunkCache = new WeakMap;
739
+ function nodeChunk(node, style, scope, theme, fonts) {
740
+ const hit = chunkCache.get(node);
741
+ if (hit && hit.scope === scope && hit.theme === theme && hit.fonts === fonts)
742
+ return hit.chunk;
743
+ const queries = new Set;
744
+ const dyn = dynamicStyleEntries(style);
745
+ const withVars = (block, s) => {
746
+ const mine = dyn.filter((d) => d.block === block && (d.key in s));
747
+ if (mine.length === 0)
748
+ return s;
749
+ const copy = { ...s };
750
+ for (const d of mine)
751
+ copy[d.key] = `var(${d.name})`;
752
+ return copy;
753
+ };
754
+ const cls = nodeClass(node.id);
755
+ const own = withVars(``, style);
756
+ let css = styleRules(style, own, withVars, scope, cls, theme, fonts, queries);
757
+ const authored = node.recipe?.authored;
758
+ if (authored?.length) {
759
+ const picked = {};
760
+ for (const key of authored)
761
+ if (key in style)
762
+ picked[key] = style[key];
763
+ const author = styleRules(picked, own, withVars, scope, cls, theme, fonts, queries);
764
+ if (author)
765
+ css += AUTHOR_SEP + author;
766
+ }
767
+ const chunk = { css, queries: [...queries] };
768
+ chunkCache.set(node, { scope, theme, fonts, chunk });
769
+ return chunk;
770
+ }
771
+ function styleRules(style, own, withVars, scope, cls, theme, fonts, queries) {
772
+ const sel = `${scope} .${cls}`;
773
+ const rules = [];
774
+ const base = declarations(withVars(``, style), fonts, own);
775
+ if (base.length)
776
+ rules.push(rule(sel, base) + shimmerRule(sel, style));
777
+ for (const [key, value] of Object.entries(style)) {
778
+ if (!key.startsWith(`@`) || typeof value !== `object` || value === null)
779
+ continue;
780
+ const block = declarations(withVars(key, value), fonts, own);
781
+ if (block.length === 0)
782
+ continue;
783
+ const condition = parseMediaCondition(key);
784
+ if (!condition)
785
+ continue;
786
+ if (isDirection(value.direction)) {
787
+ const resolved = resolvedMediaKey(key, theme);
788
+ if (resolved)
789
+ queries.add(resolved);
790
+ }
791
+ const band = (selector) => shimmerRule(selector, value);
792
+ switch (condition.feature) {
793
+ case `min-width`:
794
+ case `max-width`: {
795
+ const px = breakpointPx(condition.value, theme);
796
+ if (px === null)
797
+ break;
798
+ const op = condition.feature === `min-width` ? `>=` : `<`;
799
+ rules.push(`@container xui (width ${op} ${px}px){${rule(sel, block)}${band(sel)}}`);
800
+ break;
801
+ }
802
+ case `min-height`:
803
+ case `max-height`: {
804
+ const px = breakpointPx(condition.value, theme);
805
+ if (px === null)
806
+ break;
807
+ const resolved = `@media (${condition.feature}: ${px}px)`;
808
+ queries.add(resolved);
809
+ const q = `${scope}:where([data-xq~="${queryToken(resolved)}"]) .${cls}`;
810
+ rules.push(rule(q, block) + band(q));
811
+ break;
812
+ }
813
+ case `orientation`:
814
+ queries.add(key);
815
+ const q = `${scope}:where([data-xq~="${queryToken(key)}"]) .${cls}`;
816
+ rules.push(rule(q, block) + band(q));
817
+ break;
818
+ case `hover`:
819
+ case `prefers-reduced-motion`:
820
+ rules.push(`@media (${condition.feature}: ${condition.value}){${rule(sel, block)}${band(sel)}}`);
821
+ break;
822
+ }
823
+ }
824
+ const states = [
825
+ [`:hover`, `${sel}:hover,${sel}[data-xs~="hover"]`],
826
+ [`:focus-visible`, `${sel}:focus-visible,${sel}[data-xs~="focus-visible"]`],
827
+ [`:pressed`, `${sel}:active,${sel}[data-xs~="pressed"]`]
828
+ ];
829
+ for (const [key, selector] of states) {
830
+ const value = style[key];
831
+ if (typeof value !== `object` || value === null)
832
+ continue;
833
+ const block = declarations(withVars(key, value), fonts, own);
834
+ if (block.length)
835
+ rules.push(rule(selector, block) + shimmerRule(selector, value));
836
+ }
837
+ return rules.join(``);
838
+ }
839
+ function compileNodeSheet(roots, surfaceId, theme, fonts = theme?.fonts ?? {}) {
840
+ const scope = `.${surfaceClass(surfaceId)}`;
841
+ const chunks = new Map;
842
+ const queries = new Set;
843
+ const seen = new Set;
844
+ for (const root of roots) {
845
+ for (const node of walkNodes(root)) {
846
+ const style = node.style;
847
+ if (!style || seen.has(node.id))
848
+ continue;
849
+ seen.add(node.id);
850
+ const chunk = nodeChunk(node, style, scope, theme, fonts);
851
+ if (chunk.css)
852
+ chunks.set(node.id, chunk.css);
853
+ for (const q of chunk.queries)
854
+ queries.add(q);
855
+ }
856
+ }
857
+ return { css: layeredCss(chunks.values()), queries: [...queries], chunks };
858
+ }
859
+ var sheetBatch = (chunks) => ({ chunks, css: layeredCss(chunks.values()) });
860
+ function nodeSheetBatches(prev, chunks) {
861
+ const out = [];
862
+ const placed = new Set;
863
+ for (const b of prev) {
864
+ let dirty = false;
865
+ for (const [id, css] of b.chunks) {
866
+ placed.add(id);
867
+ if (chunks.get(id) !== css)
868
+ dirty = true;
869
+ }
870
+ if (!dirty) {
871
+ out.push(b);
872
+ continue;
873
+ }
874
+ const kept = new Map;
875
+ for (const id of b.chunks.keys()) {
876
+ const css = chunks.get(id);
877
+ if (css !== undefined)
878
+ kept.set(id, css);
879
+ }
880
+ if (kept.size)
881
+ out.push(sheetBatch(kept));
882
+ }
883
+ const fresh = new Map;
884
+ for (const [id, css] of chunks)
885
+ if (!placed.has(id))
886
+ fresh.set(id, css);
887
+ if (fresh.size)
888
+ out.push(sheetBatch(fresh));
889
+ while (out.length > 1 && out[out.length - 1].chunks.size >= out[out.length - 2].chunks.size) {
890
+ const last = out.pop();
891
+ const before = out.pop();
892
+ out.push(sheetBatch(new Map([...before.chunks, ...last.chunks])));
893
+ }
894
+ return out;
895
+ }
896
+ function nodeSheet(root, surfaceId, fontsOrTheme = {}, extra = []) {
897
+ const theme = isTheme(fontsOrTheme) ? fontsOrTheme : undefined;
898
+ const fonts = theme ? theme.fonts : fontsOrTheme;
899
+ return compileNodeSheet([root, ...extra], surfaceId, theme, fonts).css;
900
+ }
901
+ function isTheme(v) {
902
+ return typeof v === `object` && v !== null && `tokens` in v && `modes` in v;
903
+ }
904
+ // packages/exponential-ui/src/web/round5.ts
905
+ import { luminance, parseColor, qrMatrix, QR_CODE } from "@exponential_app/eui";
906
+ var QR_SCANNER = style_default.qrScanner;
907
+ function qrPaint(value, level, plateColour, moduleColour) {
908
+ const matrix = qrMatrix(value, level);
909
+ const pc = parseColor(plateColour);
910
+ const mc = parseColor(moduleColour);
911
+ const swap = pc !== null && mc !== null && luminance(pc) < luminance(mc);
912
+ const plate = swap ? moduleColour : plateColour;
913
+ const module = swap ? plateColour : moduleColour;
914
+ if (!matrix)
915
+ return { matrix: null, modules: 0, path: ``, plate, module };
916
+ const q = QR_CODE.quietZone;
917
+ let path = ``;
918
+ matrix.rows.forEach((row, y) => {
919
+ let x = 0;
920
+ while (x < row.length) {
921
+ if (row[x] !== `1`) {
922
+ x += 1;
923
+ continue;
924
+ }
925
+ let end = x;
926
+ while (end < row.length && row[end] === `1`)
927
+ end += 1;
928
+ path += `M${x + q} ${y + q}h${end - x}v1h${x - end}z`;
929
+ x = end;
930
+ }
931
+ });
932
+ return { matrix, modules: matrix.size + 2 * q, path, plate, module };
933
+ }
934
+ function qrScanReporter(report) {
935
+ let last = null;
936
+ return (value) => {
937
+ if (typeof value !== `string` || value === `` || value === last)
938
+ return;
939
+ last = value;
940
+ report(value);
941
+ };
942
+ }
943
+ var QR_CORNERS = [`tl`, `tr`, `bl`, `br`];
944
+ function qrCornerPath(corner, radius) {
945
+ const L = QR_SCANNER.cornerLength;
946
+ const h = QR_SCANNER.cornerStroke / 2;
947
+ const r = Math.max(0, Math.min(L - h, (Number.isFinite(radius) ? radius : 0) - h));
948
+ const fx = (x) => corner === `tr` || corner === `br` ? L - x : x;
949
+ const fy = (y) => corner === `bl` || corner === `br` ? L - y : y;
950
+ const sweep = corner === `tl` || corner === `br` ? 1 : 0;
951
+ const n = (v) => Math.round(v * 100) / 100;
952
+ return `M${n(fx(h))} ${n(fy(L))}V${n(fy(h + r))}A${n(r)} ${n(r)} 0 0 ${sweep} ${n(fx(h + r))} ${n(fy(h))}H${n(fx(L))}`;
953
+ }
954
+ function qrFeedColour(colour) {
955
+ const c = parseColor(colour);
956
+ if (!c)
957
+ return `color-mix(in srgb, ${colour} ${QR_SCANNER.feedAlpha * 100}%, transparent)`;
958
+ return `rgba(${c.r}, ${c.g}, ${c.b}, ${Math.round(c.a * QR_SCANNER.feedAlpha * 1000) / 1000})`;
959
+ }
960
+ function qrScanFormats(raw) {
961
+ const list = Array.isArray(raw) ? raw.filter((f) => typeof f === `string` && f !== ``) : [];
962
+ return list.length ? list : [`qr`];
963
+ }
964
+ function segmentedBadge(raw) {
965
+ const n = typeof raw === `number` ? raw : typeof raw === `string` && raw.trim() !== `` ? Number(raw) : NaN;
966
+ if (!Number.isFinite(n) || n <= 0)
967
+ return null;
968
+ const whole = Math.floor(n);
969
+ if (whole <= 0)
970
+ return null;
971
+ return whole > 99 ? `99+` : String(whole);
972
+ }
973
+ var HOLD_SLOP = 24;
974
+ function withinSlop(rect, x, y, slop = HOLD_SLOP) {
975
+ return x >= rect.left - slop && x <= rect.right + slop && y >= rect.top - slop && y <= rect.bottom + slop;
976
+ }
977
+
978
+ class ButtonHold {
979
+ fire;
980
+ pressed;
981
+ disabled;
982
+ by = null;
983
+ pointerId = null;
984
+ constructor(fire, pressed, disabled) {
985
+ this.fire = fire;
986
+ this.pressed = pressed;
987
+ this.disabled = disabled;
988
+ }
989
+ get active() {
990
+ return this.by !== null;
991
+ }
992
+ start(by, pointerId = null) {
993
+ if (this.by !== null || this.disabled())
994
+ return false;
995
+ this.by = by;
996
+ this.pointerId = pointerId;
997
+ this.pressed(true);
998
+ this.fire(`holdStart`);
999
+ return true;
1000
+ }
1001
+ finish(event) {
1002
+ if (this.by === null)
1003
+ return false;
1004
+ this.by = null;
1005
+ this.pointerId = null;
1006
+ this.pressed(false);
1007
+ this.fire(event);
1008
+ return true;
1009
+ }
1010
+ pointerDown(pointerId = null) {
1011
+ return this.start(`pointer`, pointerId);
1012
+ }
1013
+ pointerMove(rect, x, y, pointerId = null) {
1014
+ if (this.by !== `pointer` || !this.samePointer(pointerId))
1015
+ return;
1016
+ if (!withinSlop(rect, x, y))
1017
+ this.finish(`holdCancel`);
1018
+ }
1019
+ pointerUp(rect, x, y, pointerId = null) {
1020
+ if (this.by !== `pointer` || !this.samePointer(pointerId))
1021
+ return;
1022
+ this.finish(withinSlop(rect, x, y) ? `holdEnd` : `holdCancel`);
1023
+ }
1024
+ pointerCancel(pointerId = null) {
1025
+ if (this.by === `pointer` && this.samePointer(pointerId))
1026
+ this.finish(`holdCancel`);
1027
+ }
1028
+ keyDown(key, repeat = false) {
1029
+ if (key === `Escape`)
1030
+ return this.finish(`holdCancel`);
1031
+ if (key !== ` ` && key !== `Enter`)
1032
+ return false;
1033
+ if (repeat || this.by !== null)
1034
+ return this.by !== null;
1035
+ return this.start(key);
1036
+ }
1037
+ keyUp(key) {
1038
+ if (this.by === null || this.by !== key)
1039
+ return key === ` ` || key === `Enter`;
1040
+ return this.finish(`holdEnd`);
1041
+ }
1042
+ blur() {
1043
+ this.finish(`holdCancel`);
1044
+ }
1045
+ reset() {
1046
+ if (this.by === null)
1047
+ return;
1048
+ this.by = null;
1049
+ this.pointerId = null;
1050
+ this.pressed(false);
1051
+ }
1052
+ samePointer(id) {
1053
+ return this.pointerId === null || id === null || id === this.pointerId;
1054
+ }
1055
+ }
1056
+
1057
+ // packages/exponential-ui/src/web/base-css.ts
1058
+ import { ANIMATION_NAMES, ANIMATION_PROPERTIES_CSS, RTL_MIRRORED_ICONS, SEARCH_LIST_FADE, SKELETON_OPACITY_HIGH, SKELETON_OPACITY_LOW, SKELETON_PULSE_MS, SKELETON_REDUCED_OPACITY, TEXT_SHIMMER, keyframesCss } from "@exponential_app/eui";
1059
+ var S = TEXT_SHIMMER;
1060
+ var SHIMMER_CSS = `@keyframes xui-shimmer{from{background-position:100% 0}to{background-position:0 0}}
1061
+ [data-xui-shimmer]{--_spread:${S.spreadPx}px;--_base:currentColor;--_highlight:oklch(from currentColor l c h / calc(alpha * ${S.lightAlphaFactor}));background-image:linear-gradient(calc(90deg + ${S.angleDeg}deg),var(--_base) calc(50% - var(--_spread)),color-mix(in oklab,var(--_highlight),var(--_base) 50%) calc(50% - var(--_spread) * .5),var(--_highlight) 50%,color-mix(in oklab,var(--_highlight),var(--_base) 50%) calc(50% + var(--_spread) * .5),var(--_base) calc(50% + var(--_spread)));background-repeat:no-repeat;background-size:calc(200% + var(--_spread) * 2) 100%;background-position:0 0;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:xui-shimmer ${S.durationMs}ms linear infinite}
1062
+ [data-xui-mode="dark"] [data-xui-shimmer]{--_highlight:oklch(from currentColor min(1, max(${S.highlightLightnessMin}, calc(l + ${S.highlightLightnessBoost}))) c h / min(1, calc(alpha + ${S.highlightAlphaBoost})))}
1063
+ [dir="rtl"] [data-xui-shimmer]{animation-direction:reverse}`;
1064
+ var REDUCED_EXTRA = `.xui-surface [data-xui-shimmer]{animation:none !important;background-image:none !important;-webkit-text-fill-color:currentColor !important}.xui-surface [data-xui-c="Button"].xui-el:active,.xui-surface [data-xui-c="Button"][data-hold][data-xs~="pressed"].xui-el{scale:none !important}.xui-surface .xui-QrScanner-scanLine{animation:none !important}.xui-surface [data-xui-c="Skeleton"].xui-el:not([data-rows]),.xui-surface .xui-Skeleton-dot,.xui-surface .xui-Skeleton-bar{animation:none !important;opacity:${SKELETON_REDUCED_OPACITY} !important}`;
1065
+ var ROUND2_CSS = `${ANIMATION_NAMES.map(keyframesCss).join(`
1066
+ `)}
1067
+ :is(${RTL_MIRRORED_ICONS.map((n) => `svg[data-icon="${n}"]`).join(`,`)}):dir(rtl){scale:-1 1}`;
1068
+ var BASE_CSS = `${ANIMATION_PROPERTIES_CSS}
1069
+ @layer xui-base{
1070
+ ${ROUND2_CSS}
1071
+ .xui-surface{display:block;position:relative;font-family:var(--xui-font-sans);color:var(--xui-color-foreground);font-size:var(--xui-type-size-sm);line-height:var(--xui-type-lineHeight-sm);-webkit-font-smoothing:antialiased}
1072
+ .xui-surface *{box-sizing:border-box}
1073
+ .xui-container{container-type:inline-size;container-name:xui;width:100%;position:relative}
1074
+ :where([data-xui-part]){border:0 solid transparent}
1075
+ .xui-el{box-sizing:border-box;display:flex;flex-direction:row;position:relative;margin:0;padding:0;border:0 solid transparent;min-width:auto;min-height:auto;font:inherit;color:inherit;background:transparent;text-align:start;text-decoration:none;outline:none;appearance:none;-webkit-appearance:none}
1076
+ button:where([data-xui-part],.xui-calendar-nav,.xui-table-sort,.xui-carousel-nav){margin:0;padding:0;border:0 solid transparent;background:transparent;color:inherit;font:inherit;appearance:none;-webkit-appearance:none}
1077
+ .xui-el:focus-visible{outline:2px solid var(--xui-color-ring);outline-offset:1px}
1078
+ .xui-leaf{flex-direction:column}
1079
+ .xui-leaf>.xui-measured{flex-shrink:0}
1080
+ [data-xui-c="Text"].xui-el{display:block;white-space:pre-wrap;overflow-wrap:anywhere}
1081
+ [data-xui-c="Text"][data-lines="1"].xui-el{white-space:nowrap;overflow:clip;text-overflow:ellipsis;min-width:0}
1082
+ [data-xui-c="Text"][data-clamp].xui-el{display:-webkit-box;-webkit-box-orient:vertical;overflow:clip}
1083
+ [data-xui-c="Text"][data-xui-align="start"].xui-el{text-align:start}
1084
+ [data-xui-c="Text"][data-xui-align="center"].xui-el{text-align:center}
1085
+ [data-xui-c="Text"][data-xui-align="end"].xui-el{text-align:end}
1086
+ [data-xui-c="Button"].xui-el,[data-xui-c="Toggle"].xui-el,[data-xui-c="Link"].xui-el{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;cursor:pointer;user-select:none;flex-shrink:0;transition:background-color var(--xui-motion-fast) var(--xui-ease-standard,ease),color var(--xui-motion-fast) var(--xui-ease-standard,ease),opacity var(--xui-motion-fast) var(--xui-ease-standard,ease),border-color var(--xui-motion-fast) var(--xui-ease-standard,ease),scale var(--xui-motion-fast) var(--xui-ease-standard,ease)}
1087
+ [data-xui-c="Button"].xui-el:disabled,[data-xui-c="Toggle"].xui-el:disabled{cursor:default;pointer-events:none}
1088
+ [data-xui-c="Link"].xui-el{text-decoration:underline;text-underline-offset:3px}
1089
+ .xui-Button-icon,.xui-Button-spinner,.xui-Toggle-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
1090
+ .xui-Button-icon>svg,.xui-Toggle-icon>svg,.xui-Button-spinner>svg,.xui-icon>svg{width:100%;height:100%}
1091
+ .xui-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
1092
+ [data-xui-c="Icon"].xui-el{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
1093
+ [data-xui-c="Icon"].xui-el>svg{width:100%;height:100%}
1094
+ [data-xui-c="Image"].xui-el{overflow:clip}
1095
+ [data-xui-c="Image"].xui-el>img{display:block;position:absolute;inset:0;width:100%;height:100%}
1096
+ .xui-image-placeholder{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:24px;background:repeating-linear-gradient(45deg,color-mix(in srgb,currentColor 12%,transparent) 0 6px,color-mix(in srgb,currentColor 4%,transparent) 6px 12px);color:var(--xui-color-mutedForeground);font-size:var(--xui-type-size-xs)}
1097
+ [data-xui-c="Video"].xui-el{overflow:clip}
1098
+ .xui-media-sizer{display:block;max-width:100%;height:0;flex:0 1 auto;visibility:hidden;pointer-events:none}
1099
+ [data-xui-c="Video"].xui-el>video{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
1100
+ [data-xui-c="AudioPlayer"].xui-el>audio{width:100%;display:block;flex-shrink:0}
1101
+ [data-xui-c="Avatar"].xui-el{overflow:clip;flex-shrink:0;align-items:center;justify-content:center}
1102
+ .xui-Avatar-image{width:100%;height:100%;object-fit:cover;border-radius:inherit}
1103
+ .xui-Avatar-fallback{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:inherit;text-transform:uppercase;user-select:none}
1104
+ [data-xui-c="List"].xui-el{flex-direction:column;overflow:auto;min-height:0}
1105
+ [data-xui-c="List"][data-r-direction="horizontal"].xui-el{flex-direction:row}
1106
+ .xui-List-divider{flex-shrink:0;align-self:stretch;border-style:solid;border-width:0}
1107
+ .xui-list-window{position:relative;width:100%;flex-shrink:0}
1108
+ .xui-list-window[data-axis="horizontal"]{width:auto;align-self:flex-start}
1109
+ .xui-list-item{position:absolute;left:0;right:0}
1110
+ .xui-list-window[data-axis="horizontal"]>.xui-list-item{left:auto;right:auto;top:0}
1111
+ .xui-list-row{display:flex;flex-direction:column;position:relative}
1112
+ .xui-list-row[data-axis="horizontal"]{flex-direction:row}
1113
+ .xui-list-gap{position:absolute;display:flex;pointer-events:none}
1114
+ .xui-list-gap[data-axis="vertical"]{left:0;right:0;flex-direction:column;transform:translateY(-50%)}
1115
+ .xui-list-gap[data-axis="horizontal"]{top:0;bottom:0;flex-direction:row;transform:translateX(-50%)}
1116
+ .xui-list-gap[data-axis="horizontal"]:dir(rtl){transform:translateX(50%)}
1117
+ .xui-List-section{display:flex;flex-direction:row;align-items:center;flex-shrink:0}
1118
+ [data-xui-c="Resizable"].xui-el{flex-direction:row;align-items:stretch;min-width:0;min-height:0}
1119
+ [data-xui-c="Resizable"][data-orientation="vertical"].xui-el{flex-direction:column}
1120
+ .xui-Resizable-panel{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:clip}
1121
+ .xui-Resizable-handle{position:relative;display:flex;align-items:center;justify-content:center;flex:0 0 var(--xui-control-hairline);min-width:0;min-height:0;touch-action:none;user-select:none;outline:none;z-index:1}
1122
+ [data-orientation="horizontal"]>.xui-Resizable-handle{cursor:col-resize}
1123
+ [data-orientation="vertical"]>.xui-Resizable-handle{cursor:row-resize}
1124
+ .xui-Resizable-handle:focus-visible{outline:2px solid var(--xui-color-ring);outline-offset:1px}
1125
+ .xui-resize-hit{position:absolute}
1126
+ [data-orientation="horizontal"]>.xui-Resizable-handle>.xui-resize-hit{top:0;bottom:0;left:50%;transform:translateX(-50%)}
1127
+ [data-orientation="vertical"]>.xui-Resizable-handle>.xui-resize-hit{left:0;right:0;top:50%;transform:translateY(-50%)}
1128
+ .xui-Resizable-grip{flex:none;pointer-events:none}
1129
+ [data-xui-c="Carousel"].xui-el{flex-direction:column;overflow:clip}
1130
+ .xui-carousel-track{display:flex;flex-direction:row;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;gap:var(--xui-spacing-sm)}
1131
+ .xui-carousel-track::-webkit-scrollbar{display:none}
1132
+ .xui-Carousel-page{flex:0 0 100%;scroll-snap-align:start;display:flex;flex-direction:column}
1133
+ .xui-carousel-dots{display:flex;justify-content:center;gap:var(--xui-spacing-xs);padding-top:var(--xui-spacing-sm)}
1134
+ .xui-Carousel-indicator{width:6px;height:6px;border-radius:9999px;background:var(--xui-color-border);padding:0;cursor:pointer}
1135
+ .xui-Carousel-indicator[data-xs~="selected"]{background:var(--xui-color-primary)}
1136
+ [data-xui-c="Tabs"].xui-el{flex-direction:column}
1137
+ .xui-Tabs-list{display:flex;flex-direction:row;align-self:flex-start;flex-shrink:0}
1138
+ .xui-Tabs-list[data-fill="true"]{align-self:stretch}
1139
+ .xui-Tabs-tab{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--xui-spacing-xs);cursor:pointer;white-space:nowrap;flex:0 0 auto;position:relative}
1140
+ .xui-Tabs-list[data-fill="true"]>.xui-Tabs-tab{flex:1 1 0}
1141
+ .xui-Tabs-tab-body{display:inline-flex;align-items:center;gap:var(--xui-spacing-xs)}
1142
+ .xui-Tabs-close,.xui-Tabs-new{display:inline-flex;align-items:center;justify-content:center;align-self:center;flex-shrink:0;cursor:pointer;padding:0;border:0}
1143
+ .xui-Tabs-close>svg{width:12px;height:12px}
1144
+ .xui-Tabs-new>svg{width:16px;height:16px}
1145
+ .xui-Tabs-indicator{position:absolute;left:0;right:0;bottom:0}
1146
+ .xui-Tabs-content{display:flex;flex-direction:column;outline:none}
1147
+ .xui-Tabs-content[hidden]{display:none}
1148
+ [data-xui-c="Segmented"].xui-el{display:inline-flex;align-items:center;align-self:flex-start;flex-wrap:nowrap}
1149
+ [data-xui-c="Segmented"][data-r-fill="true"].xui-el,[data-xui-c="Segmented"][data-r-variant="bar"].xui-el{align-self:stretch}
1150
+ .xui-Segmented-item{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;white-space:nowrap;flex:0 0 auto;min-width:0}
1151
+ [data-xui-c="Segmented"][data-r-fill="true"].xui-el>.xui-Segmented-item,[data-xui-c="Segmented"][data-r-variant="bar"].xui-el>.xui-Segmented-item{flex:1 1 0}
1152
+ [data-xui-c="Segmented"][data-r-variant="bar"].xui-el{align-items:stretch;height:var(--xui-control-tabBar);width:100%}
1153
+ [data-xui-c="Segmented"][data-r-variant="bar"].xui-el>.xui-Segmented-item{flex-direction:column;gap:var(--xui-spacing-xxs);padding:var(--xui-spacing-xs) 0}
1154
+ [data-xui-c="Segmented"][data-r-variant="bar"].xui-el .xui-Segmented-label{font-size:var(--xui-type-size-xs);line-height:var(--xui-type-lineHeight-xs);white-space:nowrap}
1155
+ .xui-Segmented-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
1156
+ [data-xui-c="Segmented"][data-r-orientation="vertical"].xui-el{flex-direction:column;align-items:stretch}
1157
+ [data-xui-c="Segmented"][data-r-orientation="vertical"][data-r-variant="bar"].xui-el{height:auto;width:auto;align-self:flex-start}
1158
+ [data-xui-c="Segmented"][data-r-orientation="vertical"].xui-el>.xui-Segmented-item{flex:0 0 auto}
1159
+ .xui-Segmented-icon{position:relative}
1160
+ .xui-Segmented-badge{position:absolute;top:0;left:100%;transform:translate(-50%,-50%);box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;line-height:1;font-variant-numeric:tabular-nums;pointer-events:none}
1161
+ [dir="rtl"] .xui-Segmented-badge{left:auto;right:100%;transform:translate(50%,-50%)}
1162
+ .xui-Segmented-label{min-width:0;overflow:hidden;text-overflow:ellipsis}
1163
+ [data-xui-c="Accordion"].xui-el{flex-direction:column}
1164
+ .xui-Accordion-item{display:flex;flex-direction:column}
1165
+ .xui-Accordion-trigger{display:flex;align-items:center;justify-content:space-between;width:100%;cursor:pointer;text-align:start}
1166
+ .xui-Accordion-trigger>svg{transition:transform var(--xui-motion-fast) var(--xui-ease-standard,ease)}
1167
+ .xui-Accordion-trigger[data-state="open"]>svg{transform:rotate(180deg)}
1168
+ .xui-Accordion-content{display:flex;flex-direction:column;overflow:clip}
1169
+ .xui-Accordion-content[hidden]{display:none}
1170
+ .xui-Dialog-overlay,.xui-Drawer-overlay{position:fixed;inset:0;z-index:50}
1171
+ .xui-Dialog-content{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:51;display:flex;flex-direction:column;width:calc(100% - 32px);max-width:480px;max-height:calc(100% - 32px);overflow:auto;outline:none}
1172
+ .xui-Drawer-content{position:fixed;z-index:51;display:flex;flex-direction:column;overflow:auto;outline:none}
1173
+ .xui-Drawer-content[data-side="bottom"]{left:0;right:0;bottom:0;max-height:85%}
1174
+ .xui-Drawer-content[data-side="top"]{left:0;right:0;top:0;max-height:85%}
1175
+ .xui-Drawer-content[data-side="left"]{left:0;top:0;bottom:0;width:min(85%,360px)}
1176
+ .xui-Drawer-content[data-side="right"]{right:0;top:0;bottom:0;width:min(85%,360px)}
1177
+ .xui-Drawer-handle{align-self:center;width:36px;height:4px;border-radius:9999px;background:var(--xui-color-border);flex-shrink:0}
1178
+ .xui-overlay-head{display:flex;flex-direction:column;gap:var(--xui-spacing-xxs)}
1179
+ .xui-overlay-body{display:flex;flex-direction:column;gap:var(--xui-spacing-md);min-height:0}
1180
+ .xui-Dialog-footer,.xui-Drawer-footer{display:flex;flex-direction:row;justify-content:flex-end;flex-wrap:wrap}
1181
+ .xui-Dialog-close{position:absolute;top:var(--xui-spacing-sm);inset-inline-end:var(--xui-spacing-sm);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
1182
+ .xui-Dialog-close>svg{width:16px;height:16px}
1183
+ .xui-Popover-content,.xui-Tooltip-content,.xui-Menu-content,.xui-Select-content,.xui-TimePicker-list{z-index:52;display:flex;flex-direction:column;outline:none;max-height:var(--radix-popper-available-height,320px);overflow:auto}
1184
+ .xui-Tooltip-content{max-width:280px}
1185
+ .xui-Menu-item,.xui-Select-item,.xui-TimePicker-item{display:flex;align-items:center;cursor:pointer;user-select:none;white-space:nowrap;outline:none}
1186
+ .xui-Menu-item[data-disabled],.xui-Select-item[data-disabled],.xui-Select-item[aria-disabled="true"]{pointer-events:none}
1187
+ .xui-Menu-item>svg,.xui-Select-item>svg{width:16px;height:16px;flex-shrink:0}
1188
+ .xui-Menu-separator{align-self:stretch;flex-shrink:0}
1189
+ .xui-Menu-label{display:flex;align-items:center}
1190
+ .xui-Menu-trigger{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;flex-shrink:0;cursor:pointer}
1191
+ [data-xui-overlay-root].xui-el{flex-direction:row;align-self:auto;align-items:flex-start}
1192
+ [data-xui-overlay-root="stretch"].xui-el{align-items:stretch}
1193
+ [data-xui-overlay-root="none"].xui-el{display:contents}
1194
+ .xui-trigger{display:flex;flex-direction:row;align-items:stretch;flex:1 1 auto;min-width:0}
1195
+ .xui-Tooltip-anchor{display:flex;flex-direction:row;flex:1 1 auto;min-width:0}
1196
+ .xui-field-column{display:flex;flex-direction:column;gap:var(--xui-spacing-xs);min-width:0}
1197
+ .xui-field-row{display:flex;flex-direction:row;align-items:flex-start;gap:var(--xui-spacing-sm);min-width:0}
1198
+ .xui-field-text{display:flex;flex-direction:column;gap:var(--xui-spacing-xxs);min-width:0}
1199
+ [data-xui-c="Input"].xui-el,[data-xui-c="Textarea"].xui-el,[data-xui-c="Select"].xui-el,[data-xui-c="DatePicker"].xui-el,[data-xui-c="DateRangePicker"].xui-el,[data-xui-c="TimePicker"].xui-el,[data-xui-c="NumberField"].xui-el,[data-xui-c="ChipInput"].xui-el,[data-xui-c="FileUpload"].xui-el,[data-xui-c="Slider"].xui-el,[data-xui-c="Radio"].xui-el,[data-xui-c="Composer"].xui-el{flex-direction:column;gap:var(--xui-spacing-xs);min-width:0}
1200
+ [data-xui-c="Checkbox"].xui-el{flex-direction:row;align-items:flex-start;gap:var(--xui-spacing-sm);cursor:pointer}
1201
+ [data-xui-c="Checkbox"].xui-el>.xui-field-text{flex:1 1 0%}
1202
+ .xui-Checkbox-box{margin-top:max(0px,calc((var(--xui-type-lineHeight-sm) - var(--xui-control-checkbox)) / 2))}
1203
+ [data-xui-c="Switch"].xui-el{flex-direction:row;align-items:center;cursor:pointer}
1204
+ .xui-Switch-body{display:flex;flex-direction:column;gap:var(--xui-spacing-xxs);flex:1 1 0%;min-width:0}
1205
+ .xui-Input-field,.xui-Textarea-field{display:block;width:100%;min-width:0;margin:0;outline:none;appearance:none;border:0 solid transparent;background:transparent;color:inherit;font:inherit}
1206
+ .xui-Input-field::placeholder,.xui-Textarea-field::placeholder,.xui-Composer-field::placeholder{color:var(--xui-color-mutedForeground)}
1207
+ .xui-Textarea-field{resize:vertical;line-height:var(--xui-type-lineHeight-sm);padding-top:var(--xui-spacing-sm);padding-bottom:var(--xui-spacing-sm)}
1208
+ .xui-Input-label,.xui-Textarea-label,.xui-Select-label,.xui-DatePicker-label,.xui-DateRangePicker-label,.xui-TimePicker-label,.xui-NumberField-label,.xui-ChipInput-label,.xui-FileUpload-label,.xui-Slider-label,.xui-Radio-label,.xui-Checkbox-label,.xui-Switch-label{display:block;cursor:inherit}
1209
+ .xui-Select-trigger,.xui-DatePicker-trigger,.xui-DateRangePicker-trigger,.xui-TimePicker-trigger{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:var(--xui-spacing-sm);width:100%;min-width:0;cursor:pointer;text-align:start;white-space:nowrap}
1210
+ .xui-Select-trigger>span,.xui-DatePicker-trigger>span,.xui-DateRangePicker-trigger>span,.xui-TimePicker-trigger>span{overflow:clip;text-overflow:ellipsis;min-width:0;flex:1 1 auto}
1211
+ .xui-Select-trigger>svg,.xui-DatePicker-trigger>svg,.xui-DateRangePicker-trigger>svg,.xui-TimePicker-trigger>svg{width:16px;height:16px;flex-shrink:0;opacity:.6}
1212
+ .xui-Select-search{display:flex;width:100%;min-width:0;margin:0 0 var(--xui-spacing-xs);padding:var(--xui-spacing-xs) var(--xui-spacing-sm);outline:none;border:0;border-bottom:1px solid var(--xui-color-border);background:transparent;color:inherit;font:inherit}
1213
+ .xui-Select-check{display:inline-flex;margin-inline-start:auto;flex-shrink:0}
1214
+ .xui-Checkbox-box{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;cursor:pointer}
1215
+ .xui-Checkbox-check{display:inline-flex;align-items:center;justify-content:center}
1216
+ .xui-Checkbox-check>svg{width:100%;height:100%}
1217
+ [data-xui-c="Radio"][data-r-orientation="horizontal"].xui-el>.xui-radio-items{flex-direction:row;flex-wrap:wrap}
1218
+ .xui-radio-items{display:flex;flex-direction:column;gap:inherit}
1219
+ .xui-radio-row{display:flex;align-items:center;gap:var(--xui-spacing-sm);cursor:pointer}
1220
+ .xui-Radio-item{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;cursor:pointer}
1221
+ .xui-ChoiceTiles-tile{display:flex;flex-direction:column;align-items:stretch;min-width:0;margin:0;font:inherit;color:inherit;text-align:start;appearance:none;-webkit-appearance:none;cursor:pointer;outline:none}
1222
+ .xui-ChoiceTiles-tile:focus-visible{outline:2px solid var(--xui-color-ring);outline-offset:1px}
1223
+ .xui-ChoiceTiles-tile:disabled{cursor:not-allowed}
1224
+ .xui-ChoiceTiles-picture{position:relative;display:flex;align-items:center;justify-content:center;align-self:stretch;aspect-ratio:1.6;flex-shrink:0;min-width:0;overflow:clip;color:var(--xui-color-mutedForeground)}
1225
+ .xui-ChoiceTiles-picture>img{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
1226
+ .xui-ChoiceTiles-picture>svg{width:var(--xui-control-iconMd);height:var(--xui-control-iconMd);opacity:.6}
1227
+ .xui-ChoiceTiles-label,.xui-ChoiceTiles-description{display:block;min-width:0;overflow-wrap:anywhere;white-space:pre-wrap}
1228
+ .xui-ChoiceTiles-error{grid-column:1/-1;display:flex;flex-direction:column;gap:2px}
1229
+ .xui-Switch-track{display:inline-flex;align-items:center;flex-shrink:0;padding:2px;cursor:pointer;transition:background-color var(--xui-motion-fast) var(--xui-ease-standard,ease)}
1230
+ .xui-Switch-thumb{display:block;transition:transform var(--xui-motion-fast) var(--xui-ease-standard,ease);transform:translateX(0)}
1231
+ .xui-Switch-track[data-state="checked"]>.xui-Switch-thumb{transform:translateX(var(--xui-switch-travel,12px))}
1232
+ .xui-Switch-track[data-state="checked"]>.xui-Switch-thumb:dir(rtl){transform:translateX(calc(-1 * var(--xui-switch-travel,12px)))}
1233
+ .xui-slider-head{display:flex;justify-content:space-between;gap:var(--xui-spacing-sm)}
1234
+ .xui-Slider-track{position:relative;display:flex;align-items:center;width:100%;flex-grow:1;overflow:visible;touch-action:none;user-select:none}
1235
+ .xui-slider-root{display:flex;align-items:center;width:100%;min-height:var(--xui-control-slider);touch-action:none;user-select:none;position:relative}
1236
+ .xui-Slider-range{position:absolute;height:100%;left:0;border-radius:inherit}
1237
+ .xui-Slider-thumb{display:block;cursor:grab;outline:none}
1238
+ .xui-DatePicker-calendar,.xui-DateRangePicker-calendar{display:flex;flex-direction:column;gap:var(--xui-spacing-sm);padding:var(--xui-spacing-sm)}
1239
+ .xui-calendar-head{display:flex;align-items:center;justify-content:space-between;gap:var(--xui-spacing-sm);font-weight:var(--xui-type-weight-medium)}
1240
+ .xui-calendar-nav{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--xui-radius-sm);cursor:pointer;padding:0}
1241
+ .xui-calendar-nav:hover{background:var(--xui-color-accent)}
1242
+ .xui-calendar-nav>svg{width:16px;height:16px}
1243
+ .xui-calendar-grid{display:grid;grid-template-columns:repeat(7,32px);gap:2px}
1244
+ .xui-calendar-weekday{display:flex;align-items:center;justify-content:center;height:24px;font-size:var(--xui-type-size-xs);color:var(--xui-color-mutedForeground)}
1245
+ .xui-DatePicker-day,.xui-DateRangePicker-day{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:var(--xui-radius-sm);cursor:pointer;padding:0;font-size:var(--xui-type-size-sm)}
1246
+ .xui-DatePicker-day:hover,.xui-DateRangePicker-day:hover{background:var(--xui-color-accent)}
1247
+ .xui-DatePicker-day[data-xs~="selected"],.xui-DateRangePicker-day[data-xs~="selected"]{background:var(--xui-color-primary);color:var(--xui-color-primaryForeground)}
1248
+ .xui-DatePicker-day[data-outside],.xui-DateRangePicker-day[data-outside]{opacity:.4}
1249
+ .xui-DatePicker-day:disabled,.xui-DateRangePicker-day:disabled{opacity:.3;cursor:default;pointer-events:none}
1250
+ .xui-Composer-field{display:block;width:100%;min-width:0;margin:0;padding:0;outline:none;border:0;background:transparent;color:inherit;font:inherit;resize:none;max-height:200px}
1251
+ .xui-composer-bar{display:flex;align-items:center;justify-content:flex-end;gap:var(--xui-spacing-xs)}
1252
+ .xui-Composer-attachment{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
1253
+ .xui-Composer-send{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
1254
+ .xui-Composer-send>svg,.xui-Composer-attachment>svg{width:16px;height:16px}
1255
+ .xui-Composer-send:disabled{opacity:.5;pointer-events:none}
1256
+ [data-xui-c="Ring"].xui-el,[data-xui-c="Spinner"].xui-el{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
1257
+ [data-xui-c="Ring"].xui-el>svg,[data-xui-c="Spinner"].xui-el>svg{width:100%;height:100%;display:block}
1258
+ .xui-Ring-label{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
1259
+ [data-xui-c="VoiceWave"].xui-el{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
1260
+ [data-xui-c="VoiceWave"].xui-el>svg{position:absolute;inset:0;width:100%;height:100%;display:block;overflow:visible;pointer-events:none}
1261
+ .xui-VoiceWave-child{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0}
1262
+ .xui-VoiceWave-child[data-hidden]{visibility:hidden;pointer-events:none}
1263
+ [data-xui-c="QrCode"].xui-el{flex-direction:column;align-items:center;flex-shrink:0}
1264
+ .xui-QrCode-plate{display:block;flex-shrink:0;overflow:hidden}
1265
+ .xui-QrCode-plate>svg{display:block;width:100%;height:100%}
1266
+ .xui-QrCode-label{text-align:center}
1267
+ [data-xui-c="QrScanner"].xui-el{flex-direction:column;align-items:center}
1268
+ .xui-QrScanner-viewfinder{position:relative;display:block;width:100%;max-width:${QR_SCANNER.maxWidth}px;aspect-ratio:${QR_SCANNER.aspectRatio};flex-shrink:0;overflow:hidden;isolation:isolate}
1269
+ .xui-QrScanner-feed{position:absolute;inset:0;display:block;overflow:hidden}
1270
+ .xui-QrScanner-feed>video,.xui-QrScanner-feed>canvas,.xui-QrScanner-feed>img{display:block;width:100%;height:100%;object-fit:cover}
1271
+ .xui-QrScanner-corner{position:absolute;width:${QR_SCANNER.cornerLength}px;height:${QR_SCANNER.cornerLength}px;overflow:visible;pointer-events:none}
1272
+ .xui-QrScanner-corner[data-corner="tl"]{top:0;left:0}.xui-QrScanner-corner[data-corner="tr"]{top:0;right:0}.xui-QrScanner-corner[data-corner="bl"]{bottom:0;left:0}.xui-QrScanner-corner[data-corner="br"]{bottom:0;right:0}
1273
+ .xui-QrScanner-scanLine{position:absolute;left:${QR_SCANNER.scanLineInset}px;right:${QR_SCANNER.scanLineInset}px;height:${QR_SCANNER.scanLineHeight}px;top:calc(50% - ${QR_SCANNER.scanLineHeight / 2}px);border-radius:${QR_SCANNER.scanLineHeight / 2}px;pointer-events:none;animation:xui-qr-sweep ${QR_SCANNER.sweepMs}ms var(--xui-ease-standard,ease) infinite alternate}
1274
+ [data-xui-c="QrScanner"][data-r-disabled="true"].xui-el .xui-QrScanner-scanLine{animation:none}
1275
+ .xui-QrScanner-placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--xui-spacing-xs);text-align:center;padding:var(--xui-spacing-md)}
1276
+ .xui-QrScanner-placeholderIcon{display:inline-flex;width:${QR_SCANNER.placeholderIconSize}px;height:${QR_SCANNER.placeholderIconSize}px;flex-shrink:0}
1277
+ .xui-QrScanner-placeholderIcon>svg{width:100%;height:100%}
1278
+ .xui-QrScanner-hint{text-align:center}
1279
+ @keyframes xui-qr-sweep{from{top:0}to{top:calc(100% - ${QR_SCANNER.scanLineHeight}px)}}
1280
+ [data-xui-c="Button"][data-hold].xui-el{touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
1281
+ [data-xui-c="Button"][data-hold][data-xs~="pressed"].xui-el{scale:var(--xui-scale-press,1)}
1282
+ [data-xui-c="Spinner"].xui-el>svg,.xui-Button-spinner>svg{animation:xui-spin 0.8s linear infinite}
1283
+ [data-xui-c="Skeleton"].xui-el:not([data-rows]),.xui-Skeleton-dot,.xui-Skeleton-bar{animation:xui-skeleton ${SKELETON_PULSE_MS}ms ease-in-out infinite;opacity:${SKELETON_OPACITY_LOW};flex-shrink:0}
1284
+ [data-xui-c="Skeleton"][data-rows].xui-el{display:flex;flex-direction:column;align-self:stretch;flex-shrink:0;background:none;border-radius:0}
1285
+ .xui-Skeleton-row{display:flex;flex-direction:row;align-items:center;flex-shrink:0}
1286
+ .xui-Skeleton-row+.xui-Skeleton-row{border-top:var(--xui-border-hairline) solid var(--xui-color-border)}
1287
+ .xui-Skeleton-dot{display:block}
1288
+ .xui-Skeleton-bar{display:block}
1289
+ .xui-Skeleton-bar[data-title]{flex-shrink:1;min-width:0}
1290
+ @keyframes xui-skeleton{0%,100%{opacity:${SKELETON_OPACITY_LOW}}50%{opacity:${SKELETON_OPACITY_HIGH}}}
1291
+ [data-xui-c="SearchList"].xui-el{display:flex;flex-direction:column;overflow:hidden;min-width:0}
1292
+ .xui-SearchList-head,.xui-Menu-head{display:flex;flex-direction:row;align-items:center;flex-shrink:0}
1293
+ .xui-SearchList-search,.xui-Menu-search{display:flex;align-items:center;gap:8px;flex:1 1 auto;min-width:0;align-self:stretch}
1294
+ .xui-SearchList-search>svg,.xui-Menu-search>svg{width:16px;height:16px;opacity:.6;flex-shrink:0}
1295
+ .xui-SearchList-search>input,.xui-Menu-search>input{flex:1 1 auto;min-width:0;height:100%;padding:0;border:0;outline:none;background:transparent;color:inherit;font:inherit}
1296
+ .xui-SearchList-count,.xui-Menu-count{flex-shrink:0;font-variant-numeric:tabular-nums}
1297
+ .xui-SearchList-body,.xui-Menu-body{display:flex;flex-direction:column;position:relative;flex-shrink:1;min-height:0}
1298
+ .xui-SearchList-list,.xui-Menu-list{display:flex;flex-direction:column;flex-shrink:1;min-height:0;overflow-y:auto}
1299
+ .xui-SearchList-item{display:flex;flex-direction:row;align-items:center;flex-shrink:0;cursor:pointer;user-select:none;white-space:nowrap}
1300
+ .xui-SearchList-item[aria-disabled="true"]{pointer-events:none}
1301
+ .xui-SearchList-icon,.xui-SearchList-check{display:inline-flex;flex-shrink:0}
1302
+ .xui-SearchList-icon>svg,.xui-SearchList-check>svg{width:100%;height:100%}
1303
+ .xui-SearchList-identifier{flex-shrink:0}
1304
+ .xui-SearchList-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
1305
+ .xui-SearchList-fade,.xui-Menu-fade{position:absolute;left:0;right:0;bottom:0;height:${SEARCH_LIST_FADE}px;pointer-events:none;background:linear-gradient(to bottom,transparent,var(--xui-color-popover)) !important}
1306
+ .xui-menu-search{display:flex;flex-direction:column;min-width:240px}
1307
+ .xui-menu-search .xui-Menu-item{flex-shrink:0}
1308
+ [data-xui-c="Markdown"].xui-el{display:block;min-width:0;overflow-wrap:anywhere}
1309
+ [data-xui-c="Markdown"][data-lines].xui-el{display:-webkit-box;-webkit-box-orient:vertical;overflow:clip}
1310
+ .xui-md>:first-child{margin-top:0}
1311
+ .xui-md>:last-child{margin-bottom:0}
1312
+ .xui-Markdown-paragraph{margin:0 0 var(--xui-spacing-sm)}
1313
+ .xui-Markdown-heading{margin:var(--xui-spacing-md) 0 var(--xui-spacing-xs);font-weight:var(--xui-type-weight-semibold);line-height:1.25}
1314
+ .xui-md ul,.xui-md ol{margin:0 0 var(--xui-spacing-sm);padding-inline-start:1.4em}
1315
+ .xui-md ul{list-style:disc}
1316
+ .xui-md ol{list-style:decimal}
1317
+ .xui-md li>ul,.xui-md li>ol{margin-bottom:0}
1318
+ .xui-Markdown-listItem{margin:0}
1319
+ .xui-md li[data-task]{list-style:none}
1320
+ .xui-Markdown-listItem>input[type=checkbox]{appearance:none;display:inline-grid;place-content:center;vertical-align:-3px;width:16px;height:16px;margin:0;border:1px solid var(--xui-color-input);border-radius:4px;background:var(--xui-color-card)}
1321
+ .xui-Markdown-listItem>input[type=checkbox]:checked{background:var(--xui-color-primary);border-color:var(--xui-color-primary)}
1322
+ .xui-Markdown-listItem>input[type=checkbox]:checked::before{content:"";width:14px;height:14px;background:var(--xui-color-primaryForeground);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat}
1323
+ .xui-Markdown-code{font-family:var(--xui-font-mono);font-size:.925em;padding:0 .3em;border-radius:4px;background:var(--xui-color-muted)}
1324
+ .xui-Markdown-codeBlock{display:block;font-family:var(--xui-font-mono);font-size:var(--xui-type-size-xs);white-space:pre;overflow:auto;padding:var(--xui-spacing-sm);margin:0 0 var(--xui-spacing-sm);border-radius:var(--xui-radius-sm);background:var(--xui-color-muted)}
1325
+ .xui-Markdown-quote{margin:0 0 var(--xui-spacing-sm);padding-inline-start:var(--xui-spacing-md);border-inline-start:2px solid var(--xui-color-border);color:var(--xui-color-mutedForeground)}
1326
+ .xui-Markdown-link{color:var(--xui-color-primary);text-decoration:underline;text-underline-offset:3px}
1327
+ .xui-Markdown-table{border-collapse:collapse;margin:0 0 var(--xui-spacing-sm);width:100%}
1328
+ .xui-Markdown-table th,.xui-Markdown-table td{border:1px solid var(--xui-color-border);padding:var(--xui-spacing-xs) var(--xui-spacing-sm);text-align:start}
1329
+ .xui-Markdown-image{height:160px;margin:0 0 var(--xui-spacing-sm);overflow:hidden}
1330
+ .xui-Markdown-image>img{display:block;width:100%;height:100%;object-fit:contain;object-position:0 0}
1331
+ .xui-Markdown-image>img:dir(rtl){object-position:100% 0}
1332
+ .xui-Markdown-imageAlt{color:var(--xui-color-mutedForeground)}
1333
+ [data-xui-c="Chart"].xui-el{flex-direction:column;gap:var(--xui-spacing-xs);min-width:0}
1334
+ .xui-Chart-legend,.xui-Chart-title{flex-shrink:0}
1335
+ [data-xui-c="Chart"].xui-el>svg{width:100%;display:block}
1336
+ .xui-Chart-legend{display:flex;flex-wrap:wrap;gap:var(--xui-spacing-sm);font-size:var(--xui-type-size-xs);color:var(--xui-color-mutedForeground)}
1337
+ .xui-Chart-legend>span{display:inline-flex;align-items:center;gap:var(--xui-spacing-xxs)}
1338
+ .xui-Chart-legend i{display:inline-block;width:8px;height:8px;border-radius:2px}
1339
+ .xui-Chart-title{font-weight:var(--xui-type-weight-medium)}
1340
+ [data-xui-c="TreeGuides"].xui-el{flex-direction:row;align-self:stretch;flex-shrink:0}
1341
+ [data-xui-c="TreeGuides"].xui-el{overflow:visible}
1342
+ .xui-tree-col{position:relative;align-self:stretch;flex-shrink:0;overflow:visible}
1343
+ .xui-tree-col>.xui-TreeGuides-line{position:absolute;background:currentColor;display:block;padding:0;margin:0;box-sizing:border-box}
1344
+ .xui-tree-col>.xui-TreeGuides-line[data-elbow]{background:none;border-style:solid;border-color:currentColor;border-top-width:0;border-right-width:0}
1345
+ [data-xui-c="Unknown"].xui-el{flex-direction:column;gap:var(--xui-spacing-xxs)}
1346
+ [data-xui-c="Box"][data-pressable="true"].xui-el{cursor:pointer}
1347
+ .xui-layer{position:absolute;top:0;left:0;width:0;height:0;overflow:visible}
1348
+ .xui-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
1349
+
1350
+ .xui-calendar-row{display:contents}
1351
+ .xui-calendar-cell{display:flex;align-items:center;justify-content:center}
1352
+ .xui-calendar-day-label{position:relative}
1353
+ .xui-DatePicker-day[data-today]>.xui-calendar-day-label,.xui-DateRangePicker-day[data-today]>.xui-calendar-day-label{text-decoration:underline;text-underline-offset:3px}
1354
+ .xui-DateRangePicker-day{position:relative}
1355
+ .xui-DateRangePicker-range{position:absolute;inset:0;border-radius:inherit}
1356
+ .xui-DateRangePicker-day[data-range]{background:var(--xui-color-accent)}
1357
+ .xui-calendar-nav{color:inherit}
1358
+ [data-xui-c="Form"].xui-el{flex-direction:column}
1359
+ .xui-form-fields{display:contents;border:0;margin:0;padding:0;min-width:0}
1360
+ .xui-Form-summary{display:flex;flex-direction:column}
1361
+ .xui-form-summary-list{margin:0;padding-inline-start:1.2em}
1362
+ .xui-Input-error,.xui-Textarea-error,.xui-NumberField-error,.xui-ChipInput-error,.xui-FileUpload-error,.xui-Select-error,.xui-Checkbox-error,.xui-Switch-error,.xui-Radio-error,.xui-DatePicker-error,.xui-DateRangePicker-error,.xui-TimePicker-error{display:flex;flex-direction:column;gap:2px}
1363
+ [data-xui-numberfield]{display:flex;flex-direction:row;align-items:center;gap:var(--xui-spacing-xxs);min-width:0}
1364
+ .xui-NumberField-input{flex:1 1 auto;min-width:0;width:100%;border:0;outline:none;background:transparent;color:inherit;font:inherit;padding:0;text-align:start;font-variant-numeric:tabular-nums}
1365
+ .xui-NumberField-decrement,.xui-NumberField-increment,.xui-ChipInput-remove,.xui-FileUpload-remove,.xui-Toast-close,.xui-CodeBlock-copy{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;cursor:pointer}
1366
+ .xui-NumberField-decrement>svg,.xui-NumberField-increment>svg,.xui-ChipInput-remove>svg,.xui-FileUpload-remove>svg,.xui-Toast-close>svg,.xui-CodeBlock-copy>svg{width:16px;height:16px}
1367
+ .xui-NumberField-decrement:disabled,.xui-NumberField-increment:disabled{opacity:.4;pointer-events:none}
1368
+ .xui-NumberField-unit{flex-shrink:0}
1369
+ [data-xui-chipfield]{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;cursor:text}
1370
+ .xui-chip-list{display:contents;list-style:none;margin:0;padding:0}
1371
+ .xui-ChipInput-chip{display:inline-flex;align-items:center;flex-shrink:0;outline:none}
1372
+ .xui-ChipInput-input{flex:1 1 80px;min-width:80px;border:0;outline:none;background:transparent;color:inherit;font:inherit;padding:0;height:var(--xui-type-lineHeight-sm)}
1373
+ .xui-ChipInput-suggestions{display:flex;flex-direction:column;border:1px solid var(--xui-color-border);border-radius:var(--xui-radius-md);background:var(--xui-color-popover);color:var(--xui-color-popoverForeground);padding:var(--xui-spacing-xs);box-shadow:var(--xui-shadow-md)}
1374
+ .xui-ChipInput-suggestion{display:flex;align-items:center;padding:var(--xui-spacing-xs) var(--xui-spacing-sm);border-radius:var(--xui-radius-sm);cursor:pointer}
1375
+ .xui-ChipInput-suggestion[data-active]{background:var(--xui-color-accent);color:var(--xui-color-accentForeground)}
1376
+ .xui-FileUpload-dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;cursor:pointer;outline:none}
1377
+ .xui-FileUpload-dropzone[aria-disabled="true"]{cursor:default}
1378
+ .xui-FileUpload-icon{display:inline-flex}
1379
+ .xui-FileUpload-icon>svg{width:100%;height:100%}
1380
+ .xui-FileUpload-title{font-weight:var(--xui-type-weight-medium)}
1381
+ .xui-file-list{display:flex;flex-direction:column;gap:var(--xui-spacing-xs);list-style:none;margin:0;padding:0}
1382
+ .xui-FileUpload-file{display:flex;flex-direction:row;align-items:center}
1383
+ .xui-FileUpload-fileIcon{display:inline-flex;flex-shrink:0;opacity:.7}
1384
+ .xui-FileUpload-fileIcon>svg{width:16px;height:16px}
1385
+ .xui-FileUpload-browse{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;flex-shrink:0;height:var(--xui-control-buttonSm)}
1386
+ .xui-FileUpload-fileName{flex:1 1 auto;min-width:0;overflow:clip;text-overflow:ellipsis;white-space:nowrap}
1387
+ [data-xui-c="CodeBlock"].xui-el{flex-direction:column;min-width:0;overflow:clip}
1388
+ .xui-CodeBlock-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between}
1389
+ .xui-CodeBlock-copy>svg{width:12px;height:12px}
1390
+ .xui-codeblock-scroll{overflow:auto;min-width:0;outline:none}
1391
+ .xui-codeblock-scroll[data-max-lines]{max-height:calc(var(--xui-code-lines) * 1lh)}
1392
+ .xui-codeblock-pre{margin:0;padding:0;font:inherit;white-space:pre;tab-size:2;min-width:max-content}
1393
+ .xui-codeblock-scroll[data-wrap="true"]>.xui-codeblock-pre{white-space:pre-wrap;overflow-wrap:anywhere;min-width:0}
1394
+ .xui-codeblock-pre>code{font:inherit;display:block}
1395
+ .xui-CodeBlock-line{display:flex;flex-direction:row}
1396
+ .xui-codeblock-text{flex:0 1 auto;min-width:0}
1397
+ .xui-CodeBlock-gutter{display:flex;flex-direction:row;justify-content:flex-end;flex-shrink:0;user-select:none}
1398
+ .xui-CodeBlock-lineNumber{display:block}
1399
+ [data-xui-c="Table"].xui-el{flex-direction:column;min-width:0;overflow:auto}
1400
+ .xui-Table-header{display:flex;flex-direction:column}
1401
+ .xui-Table-header[data-sticky="true"]{position:sticky;top:0;z-index:1}
1402
+ .xui-table-row,.xui-Table-row{display:grid;align-items:stretch;min-width:0}
1403
+ .xui-table-body{display:flex;flex-direction:column;position:relative}
1404
+ .xui-table-check{display:flex;align-items:center;justify-content:center;min-width:0}
1405
+ .xui-Table-headerCell,.xui-Table-cell{display:flex;flex-direction:row;align-items:center;min-width:0;overflow:clip;text-overflow:ellipsis;white-space:nowrap;gap:var(--xui-spacing-xs)}
1406
+ .xui-Table-headerCell[data-r-align="end"],.xui-Table-cell[data-r-align="end"]{justify-content:flex-end;text-align:end}
1407
+ .xui-Table-headerCell[data-r-align="center"],.xui-Table-cell[data-r-align="center"]{justify-content:center;text-align:center}
1408
+ .xui-Table-cell[data-type="number"]{font-variant-numeric:tabular-nums}
1409
+ .xui-Table-cell>svg{width:16px;height:16px}
1410
+ .xui-Table-row{outline:none}
1411
+ .xui-Table-row:focus-visible{box-shadow:inset 0 0 0 2px var(--xui-color-ring)}
1412
+ .xui-Table-row[tabindex]{cursor:pointer}
1413
+ .xui-table-sort{display:inline-flex;align-items:center;gap:var(--xui-spacing-xxs);padding:0;margin:0;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;min-width:0}
1414
+ .xui-Table-headerCell[data-r-align="end"]>.xui-table-sort{flex-direction:row}
1415
+ .xui-Table-sortIcon{display:inline-flex;flex-shrink:0}
1416
+ .xui-Table-sortIcon>svg{width:100%;height:100%}
1417
+ .xui-Table-empty{display:flex;justify-content:center}
1418
+ .xui-table-badge{display:inline-flex;align-items:center;height:var(--xui-control-badge);padding:0 var(--xui-spacing-sm);border-radius:var(--xui-radius-full);background:var(--xui-color-secondary);color:var(--xui-color-secondaryForeground);font-size:var(--xui-type-size-xs)}
1419
+ .xui-chart-plot{position:relative;width:100%;min-width:0;flex:1 1 0%;min-height:0;overflow:visible}
1420
+ .xui-chart-svg{position:absolute;top:0;left:0;display:block;overflow:visible;outline:none}
1421
+ .xui-chart-svg:focus-visible{outline:2px solid var(--xui-color-ring);outline-offset:2px;border-radius:var(--xui-radius-sm)}
1422
+ .xui-Chart-grid{opacity:.7}
1423
+ .xui-Chart-tooltip{display:flex;flex-direction:column;gap:2px;z-index:2;min-width:120px;white-space:nowrap}
1424
+ .xui-chart-tip-row{display:inline-flex;align-items:center;gap:var(--xui-spacing-xxs)}
1425
+ .xui-chart-tip-row>i{display:inline-block;width:8px;height:8px;border-radius:2px}
1426
+ .xui-Chart-valueLabel{fill:currentColor}
1427
+ [data-xui-c="Chart"][data-kind="sparkline"].xui-el{gap:0}
1428
+ .xui-Image-fallback{display:flex;align-items:center;justify-content:center;position:absolute;inset:0}
1429
+ .xui-Image-fallback>svg{width:var(--xui-control-iconLg);height:var(--xui-control-iconLg)}
1430
+ [data-xui-c="Image"][data-state="loading"].xui-el{background:var(--xui-color-muted)}
1431
+ .xui-carousel-controls{display:flex;align-items:center;justify-content:center}
1432
+ .xui-carousel-controls>.xui-carousel-dots{padding-top:0}
1433
+ .xui-carousel-nav{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;cursor:pointer}
1434
+ .xui-carousel-nav:disabled{pointer-events:none}
1435
+ .xui-carousel-nav>svg{width:var(--xui-control-iconSm);height:var(--xui-control-iconSm)}
1436
+ .xui-menu-label{flex:1 1 auto;min-width:0}
1437
+ .xui-Menu-shortcut{margin-inline-start:auto;padding-inline-start:var(--xui-spacing-lg)}
1438
+ .xui-Menu-check{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
1439
+ .xui-Menu-check svg,.xui-Menu-submenuIndicator>svg{width:100%;height:100%}
1440
+ .xui-Menu-submenuIndicator{display:inline-flex;margin-inline-start:auto;flex-shrink:0}
1441
+ .xui-Select-searchbox{display:flex;align-items:center;gap:var(--xui-spacing-xs);padding-inline-start:var(--xui-spacing-sm)}
1442
+ .xui-Select-searchbox>svg{width:16px;height:16px;opacity:.6;flex-shrink:0}
1443
+ .xui-Select-searchbox>.xui-Select-search{margin:0;border-bottom:0;padding-inline-start:0}
1444
+ .xui-Select-listbox,.xui-TimePicker-listbox{display:flex;flex-direction:column;outline:none;overflow:auto;max-height:280px}
1445
+ .xui-Select-empty{display:flex}
1446
+ .xui-TimePicker-list{min-width:var(--radix-popover-trigger-width)}
1447
+ [data-xui-c="Toast"].xui-el{flex-direction:row;align-items:flex-start;width:min(360px,calc(100vw - 32px));pointer-events:auto}
1448
+ .xui-Toast-icon{display:inline-flex;flex-shrink:0}
1449
+ .xui-Toast-icon>svg{width:100%;height:100%}
1450
+ .xui-toast-text{display:flex;flex-direction:column;gap:2px;flex:1 1 auto;min-width:0}
1451
+ .xui-Toast-action{display:inline-flex;align-items:center;flex-shrink:0;cursor:pointer;white-space:nowrap}
1452
+ .xui-toast-layer{position:fixed;bottom:var(--xui-spacing-lg);left:50%;transform:translateX(-50%);z-index:60;display:flex;flex-direction:column;align-items:center;gap:var(--xui-spacing-sm);pointer-events:none;width:max-content;max-width:calc(100vw - 32px)}
1453
+ .xui-toast-layer>:nth-last-child(n+4){display:none}
1454
+ .xui-Popover-content[data-open-on="hover"]{pointer-events:auto}
1455
+ @keyframes xui-fade-out{to{opacity:0}}
1456
+ @keyframes xui-pop-in{from{opacity:0;scale:var(--xui-scale-popoverFrom,.96)}}
1457
+ @keyframes xui-pop-out{to{opacity:0}}
1458
+ @keyframes xui-slide-bottom-in{from{translate:0 100%}}
1459
+ @keyframes xui-slide-bottom-out{to{translate:0 100%}}
1460
+ @keyframes xui-slide-top-in{from{translate:0 -100%}}
1461
+ @keyframes xui-slide-top-out{to{translate:0 -100%}}
1462
+ @keyframes xui-slide-left-in{from{translate:-100% 0}}
1463
+ @keyframes xui-slide-left-out{to{translate:-100% 0}}
1464
+ @keyframes xui-slide-right-in{from{translate:100% 0}}
1465
+ @keyframes xui-slide-right-out{to{translate:100% 0}}
1466
+ @keyframes xui-toast-in{from{opacity:0;translate:0 12px}}
1467
+ @keyframes xui-accordion-open{from{height:0}to{height:var(--radix-accordion-content-height)}}
1468
+ @keyframes xui-accordion-close{from{height:var(--radix-accordion-content-height)}to{height:0}}
1469
+ .xui-Popover-content,.xui-Tooltip-content,.xui-Menu-content,.xui-Select-content,.xui-DatePicker-calendar,.xui-DateRangePicker-calendar,.xui-TimePicker-list{transform-origin:var(--radix-popper-transform-origin)}
1470
+ .xui-Popover-content[data-state="open"],.xui-Tooltip-content[data-state$="open"],.xui-Menu-content[data-state="open"],.xui-Select-content[data-state="open"],.xui-DatePicker-calendar[data-state="open"],.xui-DateRangePicker-calendar[data-state="open"],.xui-TimePicker-list[data-state="open"],.xui-Dialog-content[data-state="open"]{animation:xui-pop-in var(--xui-motion-standard) var(--xui-ease-decelerate,ease-out)}
1471
+ [data-xui-c="Button"].xui-el:active:not(:disabled){scale:var(--xui-scale-press,1)}
1472
+ .xui-Popover-content[data-state="closed"],.xui-Tooltip-content[data-state="closed"],.xui-Menu-content[data-state="closed"],.xui-Select-content[data-state="closed"],.xui-DatePicker-calendar[data-state="closed"],.xui-DateRangePicker-calendar[data-state="closed"],.xui-TimePicker-list[data-state="closed"],.xui-Dialog-content[data-state="closed"]{animation:xui-pop-out var(--xui-motion-fast) var(--xui-ease-accelerate,ease-in) forwards}
1473
+ .xui-Dialog-overlay[data-state="open"],.xui-Drawer-overlay[data-state="open"]{animation:xui-fade-in var(--xui-motion-standard) var(--xui-ease-decelerate,ease-out)}
1474
+ .xui-Dialog-overlay[data-state="closed"],.xui-Drawer-overlay[data-state="closed"]{animation:xui-fade-out var(--xui-motion-standard) var(--xui-ease-accelerate,ease-in) forwards}
1475
+ .xui-Drawer-content[data-side="bottom"][data-state="open"]{animation:xui-slide-bottom-in var(--xui-motion-slow) var(--xui-ease-decelerate,ease-out)}
1476
+ .xui-Drawer-content[data-side="bottom"][data-state="closed"]{animation:xui-slide-bottom-out var(--xui-motion-standard) var(--xui-ease-accelerate,ease-in) forwards}
1477
+ .xui-Drawer-content[data-side="top"][data-state="open"]{animation:xui-slide-top-in var(--xui-motion-slow) var(--xui-ease-decelerate,ease-out)}
1478
+ .xui-Drawer-content[data-side="top"][data-state="closed"]{animation:xui-slide-top-out var(--xui-motion-standard) var(--xui-ease-accelerate,ease-in) forwards}
1479
+ .xui-Drawer-content[data-side="left"][data-state="open"]{animation:xui-slide-left-in var(--xui-motion-slow) var(--xui-ease-decelerate,ease-out)}
1480
+ .xui-Drawer-content[data-side="left"][data-state="closed"]{animation:xui-slide-left-out var(--xui-motion-standard) var(--xui-ease-accelerate,ease-in) forwards}
1481
+ .xui-Drawer-content[data-side="right"][data-state="open"]{animation:xui-slide-right-in var(--xui-motion-slow) var(--xui-ease-decelerate,ease-out)}
1482
+ .xui-Drawer-content[data-side="right"][data-state="closed"]{animation:xui-slide-right-out var(--xui-motion-standard) var(--xui-ease-accelerate,ease-in) forwards}
1483
+ .xui-Accordion-content[data-state="open"]{animation:xui-accordion-open var(--xui-motion-standard) var(--xui-ease-standard,ease)}
1484
+ .xui-Accordion-content[data-state="closed"]{animation:xui-accordion-close var(--xui-motion-standard) var(--xui-ease-standard,ease)}
1485
+ .xui-Tabs-content[data-state="active"]{animation:xui-fade-in var(--xui-motion-fast) var(--xui-ease-decelerate,ease-out)}
1486
+ [data-xui-c="Toast"][data-state="open"].xui-el{animation:xui-toast-in var(--xui-motion-standard) var(--xui-ease-decelerate,ease-out)}
1487
+ [data-xui-c="Toast"][data-state="closed"].xui-el{animation:xui-fade-out var(--xui-motion-standard) var(--xui-ease-accelerate,ease-in) forwards}
1488
+ .xui-accordion-title{display:inline-flex;align-items:baseline;gap:var(--xui-spacing-xs);min-width:0}
1489
+ .xui-Collapsible-chevron.xui-el{transition:transform var(--xui-motion-fast) var(--xui-ease-standard,ease)}
1490
+ ${SHIMMER_CSS}
1491
+ }
1492
+ @media (prefers-reduced-motion: reduce){@layer xui-base{.xui-surface *,.xui-surface *::before,.xui-surface *::after{animation-duration:0ms !important;animation-iteration-count:1 !important;transition-duration:0ms !important;scroll-behavior:auto !important}${REDUCED_EXTRA}}}
1493
+ .xui-surface[data-xui-motion="reduce"] *,.xui-surface[data-xui-motion="reduce"] *::after{animation-duration:0ms !important;animation-iteration-count:1 !important;transition-duration:0ms !important}
1494
+ ${REDUCED_EXTRA.replace(/\.xui-surface /g, `.xui-surface[data-xui-motion="reduce"] `)}`;
1495
+ // packages/exponential-ui/src/web/urls.ts
1496
+ import { DEFAULT_MEDIA_SCHEMES, decideUrl, isPrivateHost, mediaRequest, safeHref } from "@exponential_app/eui";
1497
+ var documentBase = () => typeof document !== `undefined` && document.baseURI ? document.baseURI : undefined;
1498
+ function ownPrivateHosts() {
1499
+ try {
1500
+ const base = documentBase();
1501
+ if (!base)
1502
+ return [];
1503
+ const host = new URL(base).hostname.toLowerCase();
1504
+ return isPrivateHost(host) ? [host] : [];
1505
+ } catch {
1506
+ return [];
1507
+ }
1508
+ }
1509
+ function withOwnOrigin(allow) {
1510
+ const own = ownPrivateHosts();
1511
+ if (!own.length)
1512
+ return allow;
1513
+ return [...allow ?? [], ...own.filter((h) => !(allow ?? []).includes(h))];
1514
+ }
1515
+ function urlPolicyOf(host) {
1516
+ const urls = host.urls ?? {};
1517
+ const withBase = urls.baseUrl ? urls : { ...urls, baseUrl: host.media?.baseUrl ?? documentBase() };
1518
+ return { ...withBase, allowPrivate: withOwnOrigin(withBase.allowPrivate) };
1519
+ }
1520
+ function linkHref(host, href) {
1521
+ return safeHref(urlPolicyOf(host), href);
1522
+ }
1523
+ function mediaRequestOf(host, src) {
1524
+ if (typeof src !== `string` || !src)
1525
+ return null;
1526
+ const rewritten = host.resolveUrl ? host.resolveUrl(src) : src;
1527
+ const req = host.mediaRequest ? host.mediaRequest(rewritten) : mediaRequest(rewritten, { baseUrl: documentBase(), ...host.media, allowPrivate: withOwnOrigin(host.media?.allowPrivate) });
1528
+ if (!req)
1529
+ return null;
1530
+ return mediaUrlAllowed(host, req.url) ? req : null;
1531
+ }
1532
+ function mediaUrlAllowed(host, url) {
1533
+ return decideUrl({ schemes: host.media?.schemes ?? DEFAULT_MEDIA_SCHEMES, hosts: host.media?.hosts, allowPrivate: withOwnOrigin(host.media?.allowPrivate) }, url).allowed;
1534
+ }
1535
+ function openAllowed(host, url) {
1536
+ const href = linkHref(host, url);
1537
+ if (!href)
1538
+ return;
1539
+ if (host.openUrl)
1540
+ host.openUrl(href);
1541
+ else if (typeof window !== `undefined`)
1542
+ window.open(href, `_blank`, `noopener,noreferrer`);
1543
+ }
1544
+ // packages/exponential-ui/src/web/host-types.ts
1545
+ function lookupIcon(icons, name, fallbacks = {}) {
1546
+ if (!icons)
1547
+ return fallbacks[name];
1548
+ const hit = typeof icons === `function` ? icons(name) : icons[name];
1549
+ return hit ?? fallbacks[name];
1550
+ }
1551
+ // packages/exponential-ui/src/web/custom-icons.generated.ts
1552
+ var CUSTOM_ICON_NODES = {
1553
+ "os-apple": [["path", { d: "M18.859 9.138c-0.105 0.081 -1.948 1.118 -1.948 3.428c0 2.672 2.345 3.618 2.415 3.639c-0.011 0.056 -0.373 1.294 -1.238 2.556c-0.77 1.107 -1.575 2.215 -2.798 2.215s-1.54 -0.71 -2.953 -0.71c-1.378 0 -1.867 0.735 -2.985 0.735s-1.902 -1.027 -2.798 -2.285c-1.041 -1.48 -1.881 -3.779 -1.881 -5.959c0 -3.498 2.275 -5.354 4.514 -5.354c1.188 0 2.183 0.78 2.929 0.78c0.71 0 1.821 -0.83 3.175 -0.83c0.513 0 2.355 0.046 3.568 1.786m-4.212 -3.27c0.559 -0.664 0.956 -1.586 0.956 -2.507c0 -0.127 -0.011 -0.257 -0.035 -0.362c-0.911 0.035 -1.993 0.608 -2.647 1.364c-0.513 0.584 -0.991 1.505 -0.991 2.44c0 0.141 0.025 0.281 0.035 0.327c0.056 0.011 0.151 0.025 0.246 0.025c0.816 -0.004 1.842 -0.548 2.436 -1.287", fill: "currentColor", stroke: "none", key: "mark" }]],
1554
+ "os-linux": [["path", { d: "M19.471 17.752c-0.12 -0.109 -0.299 -0.19 -0.418 -0.25c-0.179 -0.07 -0.299 -0.162 -0.418 -0.267c-0.179 -0.109 -0.239 -0.232 -0.299 -0.362l-0.06 -0.439c-0.06 -0.281 -0.12 -0.461 -0.179 -0.541s-0.12 -0.13 -0.239 -0.13c0.12 -0.387 0.179 -0.787 0.179 -1.199c0 -0.83 -0.179 -1.603 -0.478 -2.201c-0.239 -0.654 -0.654 -1.311 -1.192 -1.905c-0.239 -0.359 -0.478 -0.654 -0.654 -0.953c-0.179 -0.239 -0.299 -0.478 -0.418 -0.714c-0.12 -0.179 -0.179 -0.418 -0.239 -0.654c-0.06 -0.299 -0.06 -0.538 -0.12 -0.714c0 -0.179 -0.06 -0.418 -0.06 -0.773c-0.06 -0.418 -0.06 -0.714 -0.12 -1.012c-0.06 -0.478 -0.179 -0.833 -0.299 -1.192c-0.179 -0.299 -0.359 -0.598 -0.598 -0.773c-0.179 -0.179 -0.418 -0.299 -0.654 -0.418c-0.299 -0.12 -0.538 -0.179 -0.714 -0.179C12.316 3 12.137 3 11.961 3c-0.478 0 -0.893 0.06 -1.252 0.179s-0.598 0.359 -0.773 0.598c-0.204 0.239 -0.341 0.538 -0.418 0.833c-0.077 0.299 -0.113 0.598 -0.113 1.012c0 0.538 0.028 1.132 0.088 1.73c0.067 0.598 0.095 0.953 0.095 1.072c0 0.239 -0.06 0.538 -0.172 0.773s-0.316 0.538 -0.626 0.893L8.344 10.629c-0.359 0.418 -0.584 0.833 -0.679 1.252c-0.12 0.478 -0.225 0.833 -0.327 1.072c-0.095 0.239 -0.225 0.478 -0.401 0.798l-0.207 0.376c-0.214 0.401 -0.316 0.703 -0.316 0.918c-0.011 0.035 -0.011 0.095 -0.011 0.162c0 0.095 0.025 0.172 0.07 0.232c-0.042 0.049 -0.07 0.095 -0.095 0.137c-0.011 0.028 -0.025 0.067 -0.035 0.102c-0.011 0.025 -0.025 0.077 -0.053 0.148c-0.025 0.07 -0.06 0.148 -0.102 0.246c-0.127 0.07 -0.207 0.102 -0.264 0.102H5.236c-0.13 0 -0.257 0.077 -0.387 0.225s-0.19 0.359 -0.19 0.619c0 0.084 0.025 0.281 0.07 0.591c0.049 0.316 0.07 0.496 0.07 0.555s-0.011 0.12 -0.025 0.179c-0.011 0.067 -0.035 0.12 -0.06 0.172c-0.025 0.06 -0.049 0.113 -0.084 0.165c-0.025 0.06 -0.06 0.12 -0.102 0.186c-0.042 0.06 -0.084 0.127 -0.123 0.19c-0.042 0.109 -0.06 0.211 -0.06 0.306s0.042 0.179 0.123 0.253c0.088 0.074 0.207 0.137 0.359 0.183c0.155 0.056 0.299 0.095 0.422 0.123c0.137 0.028 0.292 0.056 0.461 0.081c0.172 0.028 0.281 0.049 0.327 0.06c0.482 0.109 1.037 0.274 1.663 0.489c0.619 0.225 1.079 0.341 1.371 0.341c0.464 0 0.798 -0.186 1.097 -0.541v0.018c0.418 -0.207 1.012 -0.313 1.789 -0.313c0.478 0 1.252 0.056 2.204 0.172c0.179 0.362 0.478 0.601 0.953 0.728l0.418 0.049c0.239 0 0.478 -0.053 0.654 -0.162c0.179 -0.102 0.418 -0.267 0.654 -0.499l0.598 -0.506c0.299 -0.253 0.598 -0.468 0.893 -0.643c0.359 -0.169 0.598 -0.288 0.714 -0.348c0.179 -0.053 0.299 -0.137 0.418 -0.257c0.12 -0.109 0.179 -0.257 0.179 -0.461c0.004 -0.134 -0.056 -0.257 -0.172 -0.376M15.364 11.438c0.299 0.06 0.538 0.239 0.773 0.598c0.239 0.359 0.359 0.773 0.359 1.371c0 0.429 -0.06 0.918 -0.239 1.473c0.06 0.011 0.179 0.025 0.239 0.028c0.06 0 0.06 0 0.12 0.011c0 0 0.06 0 0.12 0.007c0.359 0.049 0.654 0.162 0.833 0.341c0.179 0.172 0.239 0.327 0.239 0.461c0 0.053 0 0.077 -0.06 0.077c0 0 -0.06 -0.035 -0.06 -0.113c-0.06 -0.077 -0.12 -0.162 -0.179 -0.25c-0.06 -0.095 -0.179 -0.179 -0.418 -0.257c-0.179 -0.084 -0.478 -0.127 -0.773 -0.127c-0.179 0 -0.299 0.053 -0.478 0.155c-0.12 0.102 -0.179 0.204 -0.299 0.302c-0.06 0.102 -0.12 0.155 -0.12 0.155c-0.06 0 -0.06 -0.028 -0.06 -0.084c0.179 -0.345 0.418 -0.566 0.654 -0.661c0.239 -0.633 0.299 -1.125 0.299 -1.459c0 -0.418 -0.06 -0.773 -0.239 -1.192c-0.179 -0.359 -0.478 -0.598 -0.773 -0.714c0.004 -0.063 0.004 -0.063 0.063 -0.123M12.084 5.848q0.269 -0.179 0.538 -0.179c0.239 0 0.418 0.06 0.598 0.239c0.12 0.179 0.179 0.418 0.179 0.773c0 0.299 -0.06 0.538 -0.12 0.893c-0.12 -0.06 -0.179 -0.12 -0.299 -0.12c-0.06 0 -0.12 -0.06 -0.12 -0.06q0.359 -0.09 0.359 -0.538c0 -0.179 -0.06 -0.299 -0.12 -0.478c-0.12 -0.12 -0.239 -0.239 -0.418 -0.239q-0.179 0 -0.359 0.179c-0.12 0.179 -0.12 0.299 -0.12 0.538c0 0.12 0 0.239 0.06 0.299c-0.06 0 -0.12 -0.06 -0.179 -0.06c-0.12 -0.239 -0.179 -0.478 -0.179 -0.773c0 -0.176 0.06 -0.295 0.179 -0.475m0.657 0.657c0 -0.06 -0.06 -0.06 -0.06 -0.12c0.06 0 0.12 -0.06 0.12 -0.06c0.06 0 0.12 0.06 0.179 0.12s0.06 0.12 0.06 0.179s0 0.12 0.06 0.179h-0.12c-0.06 -0.179 -0.12 -0.299 -0.239 -0.299m-0.179 0.893c0.598 0.179 0.893 0.359 0.953 0.478c0.06 0 0.06 0.06 0.06 0.12c0 0.179 -0.12 0.299 -0.239 0.418l-0.538 0.359c-0.598 0.418 -1.072 0.654 -1.491 0.654c-0.299 0 -0.598 -0.12 -0.833 -0.359l-0.359 -0.359c-0.06 -0.06 -0.12 -0.179 -0.179 -0.299c0.359 0.299 0.773 0.478 1.192 0.478c0.478 0 1.072 -0.239 1.849 -0.773c0 0 0 -0.06 -0.06 -0.06v-0.12c-0.773 0.598 -1.371 0.833 -1.849 0.833c-0.359 0 -0.714 -0.179 -1.072 -0.478c-0.06 -0.12 -0.12 -0.179 -0.12 -0.179c0 -0.239 0.239 -0.478 0.598 -0.714c0.418 -0.239 0.714 -0.359 0.893 -0.359c0.243 0 0.657 0.12 1.195 0.359m-2.264 -0.893v-0.12c0.06 0 0.06 -0.06 0.06 -0.06c0.179 0 0.299 0.179 0.299 0.478h-0.12c0 -0.12 -0.06 -0.179 -0.06 -0.299Zm-0.359 -0.418c0.06 -0.179 0.239 -0.299 0.418 -0.299c0.239 0 0.359 0.12 0.478 0.299s0.12 0.359 0.12 0.538c0 0.239 0 0.359 -0.06 0.359v0.06h-0.06v-0.12c0 -0.179 -0.06 -0.359 -0.12 -0.538c-0.12 -0.12 -0.179 -0.179 -0.299 -0.179s-0.239 0.06 -0.299 0.179c-0.12 0.12 -0.12 0.239 -0.12 0.418c0 0.299 0.06 0.478 0.299 0.598c-0.06 0.06 -0.12 0.06 -0.179 0.12c-0.239 -0.239 -0.323 -0.478 -0.323 -0.714c0 -0.302 0.025 -0.482 0.144 -0.721m0.053 14.126c-0.285 0.359 -0.633 0.541 -1.048 0.541c-0.162 0 -0.601 -0.137 -1.322 -0.401s-1.361 -0.439 -1.912 -0.52v-0.004c-0.721 -0.095 -1.114 -0.257 -1.174 -0.489c0 -0.137 0.077 -0.327 0.225 -0.584c0.148 -0.246 0.221 -0.489 0.221 -0.735c0 -0.127 -0.025 -0.302 -0.07 -0.524c-0.049 -0.225 -0.07 -0.387 -0.07 -0.482c0 -0.207 0.077 -0.404 0.225 -0.577c0.113 -0.06 0.327 -0.095 0.643 -0.095h0.162c0.077 -0.007 0.13 -0.007 0.162 -0.007c0.137 -0.028 0.239 -0.06 0.299 -0.095c0.06 -0.042 0.095 -0.127 0.113 -0.25c0.011 -0.13 0.06 -0.257 0.144 -0.369s0.257 -0.197 0.506 -0.246c0.197 0.049 0.376 0.137 0.531 0.274c0.162 0.137 0.285 0.274 0.362 0.411c0.088 0.127 0.204 0.302 0.327 0.538c0.13 0.232 0.232 0.404 0.316 0.517l0.404 0.541c0.679 0.865 1.02 1.575 1.02 2.141c-0.004 0.158 -0.004 0.295 -0.063 0.411m1.311 -1.167c-0.714 0 -1.252 -0.165 -1.501 -0.506c-0.127 -0.232 -0.186 -0.352 -0.186 -0.359c0 -0.028 0.007 -0.042 0.018 -0.042c0.137 0 0.299 -0.07 0.418 -0.214c0.179 -0.137 0.239 -0.264 0.239 -0.387c0 -0.239 -0.359 -0.643 -1.03 -1.227l-0.633 -0.411c-0.499 -0.362 -0.816 -0.65 -0.949 -0.847c-0.12 -0.204 -0.186 -0.436 -0.186 -0.703c0 -0.362 0.13 -0.858 0.38 -1.396c0.25 -0.598 0.461 -1.012 0.633 -1.192l0.06 0.06c0.049 0 0.077 0 0.088 0.06c-0.207 0.239 -0.422 0.598 -0.636 1.132c-0.221 0.538 -0.327 0.988 -0.327 1.399c0 0.334 0.13 0.591 0.401 0.773c-0.025 -0.144 -0.035 -0.285 -0.035 -0.422c0 -0.686 0.246 -1.515 0.728 -2.408l0.446 -0.893c0.011 0 0.028 -0.12 0.053 -0.239c0.018 -0.179 0.109 -0.418 0.274 -0.833l0.376 -0.714c0.12 -0.239 0.179 -0.478 0.179 -0.654l0.359 0.299c0.179 0.239 0.478 0.299 0.833 0.299c0.418 0 0.893 -0.179 1.491 -0.598l0.538 -0.418c0.12 0.239 0.239 0.538 0.359 0.833c0.179 0.299 0.299 0.598 0.478 0.893c0 0.299 0.06 0.478 0.12 0.714c0.12 0.179 0.179 0.359 0.299 0.538l0.359 0.538c0.12 0.239 0.239 0.538 0.299 0.893c0.12 0.418 0.12 0.865 0.12 1.406c0 0.359 0 0.756 -0.06 1.216c-0.12 -0.088 -0.239 -0.13 -0.359 -0.13c-0.179 0 -0.299 0.088 -0.418 0.281c-0.12 0.19 -0.179 0.482 -0.179 0.868v0.221c0.06 0.077 0.06 0.264 0.06 0.559c-0.78 1.076 -1.793 1.61 -3.104 1.61m7.991 -0.503c-0.12 0.095 -0.239 0.165 -0.418 0.214c-0.12 0.053 -0.359 0.148 -0.598 0.292c-0.299 0.144 -0.538 0.309 -0.773 0.499l-1.012 0.875c-0.06 0.028 -0.06 0.06 -0.179 0.102c-0.06 0.049 -0.12 0.088 -0.179 0.13c-0.06 0.049 -0.179 0.088 -0.299 0.113q-0.179 0.053 -0.359 0.053c-0.478 0 -0.893 -0.225 -1.132 -0.675v-0.014l0.12 -0.661c0 -0.236 0 -0.446 0.06 -0.633c0 -0.186 0.06 -0.302 0.06 -0.359v-1.853c0 -0.626 0.12 -0.935 0.418 -0.935c0.12 0 0.179 0.053 0.299 0.155c0.06 0.25 0.12 0.471 0.239 0.661c0.179 0.257 0.418 0.387 0.893 0.387c0.12 0 0.299 -0.053 0.478 -0.155c0.12 -0.102 0.299 -0.207 0.359 -0.327c0.12 -0.12 0.239 -0.232 0.359 -0.334c0.06 -0.102 0.179 -0.155 0.239 -0.155s0.06 0.007 0.06 0.025c0.06 0.067 0.06 0.186 0.12 0.345l0.06 0.345c0.06 0.281 0.179 0.496 0.299 0.65c0.179 0.162 0.299 0.257 0.418 0.299s0.239 0.109 0.359 0.204s0.239 0.225 0.239 0.401c-0.007 0.148 -0.067 0.264 -0.127 0.352m-7.805 -11.204s-0.06 -0.06 -0.06 -0.12s0 -0.06 0.06 -0.06l0.12 0.06c0.06 0.06 0.12 0.12 0.12 0.179s-0.06 0.06 -0.06 0.06h-0.06c-0.06 0 -0.06 -0.06 -0.12 -0.12m-0.598 0.06c0 -0.06 0 -0.12 0.06 -0.179c0.12 0 0.179 -0.06 0.179 -0.06c0.06 0 0.06 0.06 0.06 0.06c0 0.06 -0.06 0.12 -0.179 0.239h-0.06c-0.06 0 -0.06 0 -0.06 -0.06", fill: "currentColor", stroke: "none", key: "mark" }]],
1555
+ "os-windows": [["path", { d: "M3 3h8.532v8.529H3Zm9.468 0H21v8.529H12.468ZM3 12.468h8.532V21H3Zm9.468 0H21V21H12.468", fill: "currentColor", stroke: "none", key: "mark" }]],
1556
+ "progress-1-4": [["circle", { cx: "12", cy: "12", r: "10", key: "ring" }], ["path", { d: "M12 12 L12 6 A6 6 0 0 1 18 12 Z", fill: "currentColor", stroke: "none", key: "wedge" }]],
1557
+ "progress-1-5": [["circle", { cx: "12", cy: "12", r: "10", key: "ring" }], ["path", { d: "M12 12 L12 6 A6 6 0 0 1 17.7063 10.1459 Z", fill: "currentColor", stroke: "none", key: "wedge" }]],
1558
+ "progress-2-4": [["circle", { cx: "12", cy: "12", r: "10", key: "ring" }], ["path", { d: "M12 12 L12 6 A6 6 0 0 1 12 18 Z", fill: "currentColor", stroke: "none", key: "wedge" }]],
1559
+ "progress-2-5": [["circle", { cx: "12", cy: "12", r: "10", key: "ring" }], ["path", { d: "M12 12 L12 6 A6 6 0 0 1 15.5267 16.8541 Z", fill: "currentColor", stroke: "none", key: "wedge" }]],
1560
+ "progress-3-4": [["circle", { cx: "12", cy: "12", r: "10", key: "ring" }], ["path", { d: "M12 12 L12 6 A6 6 0 1 1 6 12 Z", fill: "currentColor", stroke: "none", key: "wedge" }]],
1561
+ "progress-3-5": [["circle", { cx: "12", cy: "12", r: "10", key: "ring" }], ["path", { d: "M12 12 L12 6 A6 6 0 1 1 8.4733 16.8541 Z", fill: "currentColor", stroke: "none", key: "wedge" }]],
1562
+ "progress-4-5": [["circle", { cx: "12", cy: "12", r: "10", key: "ring" }], ["path", { d: "M12 12 L12 6 A6 6 0 1 1 6.2937 10.1459 Z", fill: "currentColor", stroke: "none", key: "wedge" }]]
1563
+ };
1564
+ // packages/exponential-ui/src/web/coerce.ts
1565
+ import { DEFAULT_STRINGS, coreCatalog as coreCatalog2 } from "@exponential_app/eui";
1566
+ var str = (v, fallback = ``) => v === undefined || v === null ? fallback : typeof v === `object` ? JSON.stringify(v) : String(v);
1567
+ var num2 = (v, fallback = 0) => typeof v === `number` && Number.isFinite(v) ? v : typeof v === `string` && v.trim() !== `` && Number.isFinite(Number(v)) ? Number(v) : fallback;
1568
+ var bool = (v) => v === true || v === `true`;
1569
+ var arr = (v) => Array.isArray(v) ? v : [];
1570
+ var objects = (v) => Array.isArray(v) ? v.filter((e) => e !== null && typeof e === `object` && !Array.isArray(e)) : [];
1571
+ function phrase(ctx, id, params, fallback) {
1572
+ return ctx.strings[id] !== undefined ? ctx.t(id, params) : fallback();
1573
+ }
1574
+ var SIZE_UNITS = [`byte`, `kilobyte`, `megabyte`, `gigabyte`];
1575
+ var sizeFormats = new Map;
1576
+ function formatFileSize(bytes, locale) {
1577
+ let fmts = sizeFormats.get(locale);
1578
+ if (!fmts) {
1579
+ fmts = SIZE_UNITS.map((unit) => {
1580
+ try {
1581
+ return new Intl.NumberFormat(locale, { style: `unit`, unit, unitDisplay: `short`, maximumFractionDigits: 1 });
1582
+ } catch {
1583
+ return new Intl.NumberFormat(locale, { maximumFractionDigits: 1 });
1584
+ }
1585
+ });
1586
+ sizeFormats.set(locale, fmts);
1587
+ }
1588
+ let i = 0;
1589
+ let n = Math.max(0, bytes);
1590
+ while (n >= 1024 && i < SIZE_UNITS.length - 1) {
1591
+ n /= 1024;
1592
+ i++;
1593
+ }
1594
+ return fmts[i].format(n);
1595
+ }
1596
+ function acceptsFile(accept, file) {
1597
+ const rules = accept.split(`,`).map((r) => r.trim().toLowerCase()).filter(Boolean);
1598
+ if (rules.length === 0)
1599
+ return true;
1600
+ const name = file.name.toLowerCase();
1601
+ const type = (file.type || ``).toLowerCase();
1602
+ return rules.some((r) => r.startsWith(`.`) ? name.endsWith(r) : r.endsWith(`/*`) ? type.startsWith(r.slice(0, -1)) : type === r);
1603
+ }
1604
+ function failingChecks(checks, fallback = DEFAULT_STRINGS.invalidValue) {
1605
+ const out = [];
1606
+ for (const check of objects(checks)) {
1607
+ if (check && typeof check === `object` && `condition` in check && (check.condition === false || check.condition === null || check.condition === undefined || check.condition === ``))
1608
+ out.push(str(check.message, fallback));
1609
+ }
1610
+ return out;
1611
+ }
1612
+ function failingCheck(checks, fallback) {
1613
+ return failingChecks(checks, fallback)[0] ?? null;
1614
+ }
1615
+ var BUILTIN_ICONS = coreCatalog2.builtinIcons;
1616
+ function builtinIconName(slot) {
1617
+ return BUILTIN_ICONS[slot] ?? `ui-icon-placeholder`;
1618
+ }
1619
+ function joinIds(...ids) {
1620
+ const out = ids.filter(Boolean).join(` `);
1621
+ return out || undefined;
1622
+ }
1623
+ // packages/exponential-ui/src/web/table.ts
1624
+ function sortRows(rows, sort, column, locale) {
1625
+ const order = rows.map((_, i) => i);
1626
+ if (!sort || !column)
1627
+ return order;
1628
+ const collator = new Intl.Collator(locale, { numeric: true, sensitivity: `base` });
1629
+ const dir = sort.direction === `desc` ? -1 : 1;
1630
+ const missing = (v) => v === undefined || v === null || v === ``;
1631
+ return order.sort((a, b) => {
1632
+ const va = rows[a]?.[sort.key];
1633
+ const vb = rows[b]?.[sort.key];
1634
+ if (missing(va) && missing(vb))
1635
+ return a - b;
1636
+ if (missing(va))
1637
+ return 1;
1638
+ if (missing(vb))
1639
+ return -1;
1640
+ let c;
1641
+ if (typeof va === `number` && typeof vb === `number`)
1642
+ c = va - vb;
1643
+ else if (column.type === `number`)
1644
+ c = num2(va) - num2(vb);
1645
+ else if (column.type === `date`)
1646
+ c = new Date(String(va)).getTime() - new Date(String(vb)).getTime();
1647
+ else if (typeof va === `boolean` || typeof vb === `boolean`)
1648
+ c = Number(Boolean(va)) - Number(Boolean(vb));
1649
+ else
1650
+ c = collator.compare(String(va), String(vb));
1651
+ return c === 0 ? a - b : c * dir;
1652
+ });
1653
+ }
1654
+ // packages/exponential-ui/src/web/dates.ts
1655
+ var isoDate = (d) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, `0`)}-${String(d.getDate()).padStart(2, `0`)}`;
1656
+ var parseIsoDate = (s) => {
1657
+ const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(s);
1658
+ return m ? new Date(Number(m[1]), Number(m[2]) - 1, Number(m[3])) : null;
1659
+ };
1660
+ var addDays = (d, n) => new Date(d.getFullYear(), d.getMonth(), d.getDate() + n);
1661
+ var addMonths = (d, n) => {
1662
+ const last = new Date(d.getFullYear(), d.getMonth() + n + 1, 0).getDate();
1663
+ return new Date(d.getFullYear(), d.getMonth() + n, Math.min(d.getDate(), last));
1664
+ };
1665
+ var sameDay = (a, b) => Boolean(a && b && isoDate(a) === isoDate(b));
1666
+ function monthGrid(view, first) {
1667
+ const start = new Date(view.getFullYear(), view.getMonth(), 1);
1668
+ const lead = (start.getDay() - first + 7) % 7;
1669
+ return Array.from({ length: 42 }, (_, i) => new Date(start.getFullYear(), start.getMonth(), 1 - lead + i));
1670
+ }
1671
+ function calendarStop(days, view, focus, disabled) {
1672
+ const inMonth = days.filter((d) => d.getMonth() === view.getMonth() && d.getFullYear() === view.getFullYear() && !disabled(d));
1673
+ if (inMonth.some((d) => sameDay(d, focus)))
1674
+ return focus;
1675
+ let best = null;
1676
+ for (const d of inMonth)
1677
+ if (!best || Math.abs(d.getTime() - focus.getTime()) < Math.abs(best.getTime() - focus.getTime()))
1678
+ best = d;
1679
+ return best;
1680
+ }
1681
+ // packages/exponential-ui/src/web/inputs.ts
1682
+ var DEBOUNCE_MS = 150;
1683
+
1684
+ class HostOwnedController {
1685
+ value;
1686
+ revision = 0;
1687
+ pending = false;
1688
+ focused = false;
1689
+ acked = 0;
1690
+ timer = null;
1691
+ live = true;
1692
+ send;
1693
+ writeLocal;
1694
+ debounceMs;
1695
+ onChange;
1696
+ constructor(options) {
1697
+ this.value = options.initial;
1698
+ this.send = options.send;
1699
+ this.writeLocal = options.writeLocal;
1700
+ this.debounceMs = options.debounceMs ?? DEBOUNCE_MS;
1701
+ this.onChange = options.onChange;
1702
+ }
1703
+ configure(options) {
1704
+ this.send = options.send;
1705
+ this.writeLocal = options.writeLocal;
1706
+ this.debounceMs = options.debounceMs ?? DEBOUNCE_MS;
1707
+ }
1708
+ edit(next) {
1709
+ this.value = next;
1710
+ this.revision += 1;
1711
+ this.pending = true;
1712
+ this.writeLocal?.(next);
1713
+ this.clearTimer();
1714
+ this.timer = setTimeout(() => {
1715
+ this.timer = null;
1716
+ this.dispatch(`change`);
1717
+ }, this.debounceMs);
1718
+ this.notify();
1719
+ }
1720
+ commit() {
1721
+ this.clearTimer();
1722
+ this.dispatch(`commit`);
1723
+ }
1724
+ focus() {
1725
+ this.focused = true;
1726
+ this.notify();
1727
+ }
1728
+ blur() {
1729
+ this.focused = false;
1730
+ this.notify();
1731
+ this.commit();
1732
+ }
1733
+ push(external) {
1734
+ if (this.focused)
1735
+ return false;
1736
+ if (this.revision > this.acked)
1737
+ return false;
1738
+ if (Object.is(external, this.value))
1739
+ return false;
1740
+ this.value = external;
1741
+ this.notify();
1742
+ return true;
1743
+ }
1744
+ attach() {
1745
+ this.live = true;
1746
+ }
1747
+ dispose() {
1748
+ this.live = false;
1749
+ this.clearTimer();
1750
+ }
1751
+ clearTimer() {
1752
+ if (this.timer) {
1753
+ clearTimeout(this.timer);
1754
+ this.timer = null;
1755
+ }
1756
+ }
1757
+ notify() {
1758
+ if (this.live)
1759
+ this.onChange?.();
1760
+ }
1761
+ ack(rev) {
1762
+ if (rev > this.acked)
1763
+ this.acked = rev;
1764
+ if (this.live && this.acked >= this.revision && this.pending) {
1765
+ this.pending = false;
1766
+ this.notify();
1767
+ }
1768
+ }
1769
+ dispatch(kind) {
1770
+ const rev = this.revision;
1771
+ let result;
1772
+ try {
1773
+ result = this.send(this.value, rev, kind);
1774
+ } catch {
1775
+ result = undefined;
1776
+ }
1777
+ if (result && typeof result.then === `function`) {
1778
+ result.then(() => this.ack(rev), () => this.ack(rev));
1779
+ } else
1780
+ this.ack(rev);
1781
+ }
1782
+ }
1783
+ var localeDigits = new Map;
1784
+ function digitMap(locale) {
1785
+ let hit = localeDigits.get(locale);
1786
+ if (!hit) {
1787
+ hit = new Map;
1788
+ const fmt = new Intl.NumberFormat(locale, { useGrouping: false });
1789
+ for (let d = 0;d <= 9; d++) {
1790
+ const glyph = fmt.format(d);
1791
+ if (glyph !== String(d))
1792
+ hit.set(glyph, String(d));
1793
+ }
1794
+ localeDigits.set(locale, hit);
1795
+ }
1796
+ return hit;
1797
+ }
1798
+ function parseLocaleNumber(text, locale) {
1799
+ const parts = new Intl.NumberFormat(locale).formatToParts(12345.6);
1800
+ const group = parts.find((p) => p.type === `group`)?.value ?? `,`;
1801
+ const decimal = parts.find((p) => p.type === `decimal`)?.value ?? `.`;
1802
+ const digits = digitMap(locale);
1803
+ const ascii = digits.size ? Array.from(text, (ch) => digits.get(ch) ?? ch).join(``) : text;
1804
+ const clean = ascii.trim().split(group).join(``).replace(/[\s‎‏؜]/g, ``).replace(decimal, `.`).replace(/[−–]/g, `-`);
1805
+ if (clean === `` || clean === `-`)
1806
+ return null;
1807
+ const n = Number(clean);
1808
+ return Number.isFinite(n) ? n : null;
1809
+ }
1810
+ // packages/exponential-ui/src/web/media.ts
1811
+ import { MEDIA_LIMITS, mediaImageWithinLimits } from "@exponential_app/eui";
1812
+ var MEDIA_CACHE_IDLE_MAX = 64;
1813
+ var blobs = new Map;
1814
+ function mediaCacheKey(url, headers) {
1815
+ return `${url}
1816
+ ${JSON.stringify(headers)}`;
1817
+ }
1818
+ function touch(k, e) {
1819
+ blobs.delete(k);
1820
+ blobs.set(k, e);
1821
+ }
1822
+ function acquireMedia(k, load) {
1823
+ let e = blobs.get(k);
1824
+ if (!e) {
1825
+ const entry = { refs: 0, promise: Promise.resolve(``) };
1826
+ entry.promise = load().then((url) => {
1827
+ entry.url = url;
1828
+ if (blobs.get(k) !== entry)
1829
+ URL.revokeObjectURL(url);
1830
+ return url;
1831
+ });
1832
+ entry.promise.catch(() => {
1833
+ if (blobs.get(k) === entry)
1834
+ blobs.delete(k);
1835
+ });
1836
+ e = entry;
1837
+ }
1838
+ e.refs += 1;
1839
+ touch(k, e);
1840
+ return e;
1841
+ }
1842
+ function releaseMedia(k, e) {
1843
+ e.refs -= 1;
1844
+ if (e.refs > 0 || blobs.get(k) !== e)
1845
+ return;
1846
+ touch(k, e);
1847
+ let idle = 0;
1848
+ for (const v of blobs.values())
1849
+ if (v.refs === 0)
1850
+ idle += 1;
1851
+ for (const [ok, v] of blobs) {
1852
+ if (idle <= MEDIA_CACHE_IDLE_MAX)
1853
+ break;
1854
+ if (v.refs > 0)
1855
+ continue;
1856
+ blobs.delete(ok);
1857
+ if (v.url)
1858
+ URL.revokeObjectURL(v.url);
1859
+ idle -= 1;
1860
+ }
1861
+ }
1862
+ function mediaCacheStats() {
1863
+ let inUse = 0;
1864
+ for (const v of blobs.values())
1865
+ if (v.refs > 0)
1866
+ inUse += 1;
1867
+ return { entries: blobs.size, inUse };
1868
+ }
1869
+ function clearMediaCache() {
1870
+ for (const [k, v] of blobs) {
1871
+ if (v.refs > 0)
1872
+ continue;
1873
+ blobs.delete(k);
1874
+ if (v.url)
1875
+ URL.revokeObjectURL(v.url);
1876
+ }
1877
+ }
1878
+ function openMediaSource(host, src, kind = `image`) {
1879
+ const req = mediaRequestOf(host, src);
1880
+ const headers = req?.headers ?? {};
1881
+ const fetched = req !== null && Object.keys(headers).length > 0;
1882
+ const k = fetched ? `${kind}
1883
+ ${mediaCacheKey(req.url, headers)}` : ``;
1884
+ return {
1885
+ fetched,
1886
+ key: k,
1887
+ direct: req ? req.url : undefined,
1888
+ denied: Boolean(src) && req === null,
1889
+ open: () => {
1890
+ if (!req || !fetched)
1891
+ return { promise: Promise.resolve(req ? req.url : ``), release: () => {} };
1892
+ const hosted = kind === `stream` && host.mediaStreamUrl !== undefined;
1893
+ const allowed = (url) => mediaUrlAllowed(host, url);
1894
+ const entry = hosted ? streamEntry(host, req) : acquireMedia(k, () => (kind === `stream` ? fetchStream(req.url, headers, MEDIA_LIMITS, allowed) : fetchLimited(req.url, headers, MEDIA_LIMITS, true, allowed)).then((b) => URL.createObjectURL(b)));
1895
+ return { promise: entry.promise, release: hosted ? () => {} : () => releaseMedia(k, entry) };
1896
+ }
1897
+ };
1898
+ }
1899
+ function streamEntry(host, req) {
1900
+ const promise = Promise.resolve(host.mediaStreamUrl(req)).then((url) => {
1901
+ if (typeof url !== `string` || !mediaUrlAllowed(host, url))
1902
+ throw new Error(`stream url denied by the media policy`);
1903
+ return url;
1904
+ });
1905
+ return { promise, refs: 0 };
1906
+ }
1907
+ function fetchStream(url, headers, limits = MEDIA_LIMITS, allowed = defaultAllowed) {
1908
+ return fetchLimited(url, headers, { ...limits, maxPixels: Infinity }, false, allowed);
1909
+ }
1910
+ function defaultAllowed(url) {
1911
+ return mediaUrlAllowed({}, url);
1912
+ }
1913
+ async function fetchLimited(url, headers, limits = MEDIA_LIMITS, image = true, allowed = defaultAllowed) {
1914
+ const abort = new AbortController;
1915
+ const timer = setTimeout(() => abort.abort(new Error(`media timed out after ${limits.timeoutMs} ms`)), limits.timeoutMs);
1916
+ const over = () => new Error(`media is over ${limits.maxBytes} bytes`);
1917
+ try {
1918
+ const r = await fetch(url, { headers, signal: abort.signal });
1919
+ if (r.redirected && !allowed(r.url)) {
1920
+ abort.abort();
1921
+ throw new Error(`media redirect denied by the media policy`);
1922
+ }
1923
+ if (!r.ok)
1924
+ throw new Error(`HTTP ${r.status}`);
1925
+ if (Number(r.headers.get(`content-length`) ?? NaN) > limits.maxBytes)
1926
+ throw over();
1927
+ const chunks = [];
1928
+ let total = 0;
1929
+ if (r.body) {
1930
+ const reader = r.body.getReader();
1931
+ for (;; ) {
1932
+ const { done, value } = await reader.read();
1933
+ if (done)
1934
+ break;
1935
+ total += value.byteLength;
1936
+ if (total > limits.maxBytes) {
1937
+ abort.abort();
1938
+ throw over();
1939
+ }
1940
+ chunks.push(value);
1941
+ }
1942
+ } else {
1943
+ const all = new Uint8Array(await r.arrayBuffer());
1944
+ if (all.byteLength > limits.maxBytes)
1945
+ throw over();
1946
+ chunks.push(all);
1947
+ }
1948
+ if (image) {
1949
+ const refused = mediaImageWithinLimits(chunks.length === 1 ? chunks[0] : concat(chunks), limits);
1950
+ if (refused)
1951
+ throw new Error(refused);
1952
+ }
1953
+ return new Blob(chunks, { type: r.headers.get(`content-type`) ?? `` });
1954
+ } finally {
1955
+ clearTimeout(timer);
1956
+ }
1957
+ }
1958
+ function concat(chunks) {
1959
+ const out = new Uint8Array(chunks.reduce((n, c) => n + c.byteLength, 0));
1960
+ let at = 0;
1961
+ for (const c of chunks) {
1962
+ out.set(c, at);
1963
+ at += c.byteLength;
1964
+ }
1965
+ return out;
1966
+ }
1967
+ // packages/exponential-ui/src/web/markdown.ts
1968
+ var MAX_LINK_NESTING = 32;
1969
+ var MAX_LINK_DEST = 8192;
1970
+ var TITLE = /\s+(?:"[^"]*"|'[^']*')/y;
1971
+
1972
+ class LinkScanner {
1973
+ s;
1974
+ close;
1975
+ balance;
1976
+ nextWs;
1977
+ nextGt;
1978
+ nextLtNl;
1979
+ escaped;
1980
+ constructor(s) {
1981
+ this.s = s;
1982
+ const n = s.length;
1983
+ this.close = new Int32Array(n).fill(-1);
1984
+ this.balance = new Int32Array(n + 1);
1985
+ this.escaped = new Uint8Array(n);
1986
+ const brackets = [];
1987
+ const parens = [];
1988
+ let esc = false;
1989
+ let bal = 0;
1990
+ for (let i = 0;i < n; i++) {
1991
+ this.balance[i] = bal;
1992
+ if (esc) {
1993
+ this.escaped[i] = 1;
1994
+ esc = false;
1995
+ continue;
1996
+ }
1997
+ const c = s[i];
1998
+ if (c === `\\`)
1999
+ esc = true;
2000
+ else if (c === `[`)
2001
+ brackets.push(i);
2002
+ else if (c === `]`) {
2003
+ const o = brackets.pop();
2004
+ if (o !== undefined)
2005
+ this.close[o] = i;
2006
+ } else if (c === `(`) {
2007
+ parens.push(i);
2008
+ bal++;
2009
+ } else if (c === `)`) {
2010
+ const o = parens.pop();
2011
+ if (o !== undefined)
2012
+ this.close[o] = i;
2013
+ bal--;
2014
+ }
2015
+ }
2016
+ this.balance[n] = bal;
2017
+ this.nextWs = new Int32Array(n + 1);
2018
+ this.nextGt = new Int32Array(n + 1);
2019
+ this.nextLtNl = new Int32Array(n + 1);
2020
+ this.nextWs[n] = n;
2021
+ this.nextGt[n] = -1;
2022
+ this.nextLtNl[n] = n;
2023
+ for (let i = n - 1;i >= 0; i--) {
2024
+ const c = s[i];
2025
+ this.nextWs[i] = !this.escaped[i] && /\s/.test(c) ? i : this.nextWs[i + 1];
2026
+ this.nextGt[i] = c === `>` ? i : this.nextGt[i + 1];
2027
+ this.nextLtNl[i] = c === `<` || c === `
2028
+ ` ? i : this.nextLtNl[i + 1];
2029
+ }
2030
+ }
2031
+ at(at) {
2032
+ const s = this.s;
2033
+ if (s[at] !== `[` || this.escaped[at])
2034
+ return null;
2035
+ const i = this.close[at];
2036
+ if (i < 0 || s[i + 1] !== `(`)
2037
+ return null;
2038
+ let j = i + 2;
2039
+ let dest;
2040
+ if (s[j] === `<`) {
2041
+ const close = this.nextGt[j];
2042
+ if (close < 0 || this.nextLtNl[j + 1] < close || close - j - 1 > MAX_LINK_DEST)
2043
+ return null;
2044
+ dest = s.slice(j + 1, close);
2045
+ j = close + 1;
2046
+ } else {
2047
+ const k = this.close[i + 1];
2048
+ const w = this.nextWs[j];
2049
+ let stop;
2050
+ if (k >= 0 && k < w)
2051
+ stop = k;
2052
+ else if (this.balance[w] === this.balance[j])
2053
+ stop = w;
2054
+ else
2055
+ return null;
2056
+ if (stop - j > MAX_LINK_DEST)
2057
+ return null;
2058
+ dest = s.slice(j, stop).replace(/\\([()])/g, `$1`);
2059
+ j = stop;
2060
+ }
2061
+ TITLE.lastIndex = j;
2062
+ if (TITLE.exec(s))
2063
+ j = TITLE.lastIndex;
2064
+ while (s[j] === ` `)
2065
+ j++;
2066
+ if (s[j] !== `)`)
2067
+ return null;
2068
+ return { label: s.slice(at + 1, i), dest, end: j + 1 };
2069
+ }
2070
+ }
2071
+ function linkAt(s, at) {
2072
+ return s[at] === `[` ? new LinkScanner(s).at(at) : null;
2073
+ }
2074
+ function wholeImage(text) {
2075
+ if (text[0] !== `!`)
2076
+ return null;
2077
+ const l = linkAt(text, 1);
2078
+ return l && l.end === text.length ? { alt: l.label, src: l.dest } : null;
2079
+ }
2080
+ var SIMPLE = /(`[^`]+`)|(\*\*([^*]+)\*\*)|(__([^_]+)__)|(\*([^*\s][^*]*)\*)|(_([^_\s][^_]*)_)|(~~([^~]+)~~)/;
2081
+ function parseInline(text, depth = 0) {
2082
+ const out = [];
2083
+ const scan = depth < MAX_LINK_NESTING && text.includes(`[`) ? new LinkScanner(text) : null;
2084
+ const simple = new RegExp(SIMPLE.source, `g`);
2085
+ let pos = 0;
2086
+ let m = null;
2087
+ let searched = false;
2088
+ while (pos < text.length) {
2089
+ if (!searched || m && m.index < pos) {
2090
+ simple.lastIndex = pos;
2091
+ m = simple.exec(text);
2092
+ searched = true;
2093
+ }
2094
+ const limit = m ? m.index : text.length;
2095
+ let link = null;
2096
+ if (scan) {
2097
+ for (let p = text.indexOf(`[`, pos);p >= 0 && p < limit; p = text.indexOf(`[`, p + 1)) {
2098
+ const l = scan.at(p);
2099
+ if (!l)
2100
+ continue;
2101
+ const image = p > pos && text[p - 1] === `!`;
2102
+ link = { at: image ? p - 1 : p, image, ...l };
2103
+ break;
2104
+ }
2105
+ }
2106
+ if (link) {
2107
+ if (link.at > pos)
2108
+ out.push(text.slice(pos, link.at));
2109
+ if (link.image)
2110
+ out.push(link.label);
2111
+ else
2112
+ out.push({ type: `link`, dest: link.dest, children: parseInline(link.label, depth + 1) });
2113
+ pos = link.end;
2114
+ continue;
2115
+ }
2116
+ if (!m) {
2117
+ out.push(text.slice(pos));
2118
+ break;
2119
+ }
2120
+ if (m.index > pos)
2121
+ out.push(text.slice(pos, m.index));
2122
+ if (m[1])
2123
+ out.push({ type: `code`, text: m[1].slice(1, -1) });
2124
+ else if (m[2])
2125
+ out.push({ type: `strong`, children: parseInline(m[3], depth) });
2126
+ else if (m[4])
2127
+ out.push({ type: `strong`, children: parseInline(m[5], depth) });
2128
+ else if (m[6])
2129
+ out.push({ type: `em`, children: parseInline(m[7], depth) });
2130
+ else if (m[8])
2131
+ out.push({ type: `em`, children: parseInline(m[9], depth) });
2132
+ else if (m[10])
2133
+ out.push({ type: `del`, text: m[11] });
2134
+ pos = m.index + m[0].length;
2135
+ }
2136
+ return out;
2137
+ }
2138
+ var LIST_ITEM = /^(\s*)([-*+]|\d+[.)])\s+(.*)$/;
2139
+ function parseList(lines) {
2140
+ const indentOf = (ws) => ws.replace(/\t/g, ` `).length;
2141
+ const first = lines.length ? LIST_ITEM.exec(lines[0]) : null;
2142
+ if (!first)
2143
+ return { indent: 0, ordered: false, items: [] };
2144
+ const root = { indent: indentOf(first[1]), ordered: /\d/.test(first[2]), items: [] };
2145
+ const stack = [root];
2146
+ for (const line of lines) {
2147
+ const m = LIST_ITEM.exec(line);
2148
+ if (!m)
2149
+ continue;
2150
+ const indent = indentOf(m[1]);
2151
+ while (stack.length > 1 && indent < stack[stack.length - 1].indent)
2152
+ stack.pop();
2153
+ let list = stack[stack.length - 1];
2154
+ const parent = list.items[list.items.length - 1];
2155
+ if (parent && indent >= list.indent + 2 && stack.length < MAX_BLOCK_NESTING) {
2156
+ const child = { indent, ordered: /\d/.test(m[2]), items: [] };
2157
+ parent.children.push(child);
2158
+ stack.push(child);
2159
+ list = child;
2160
+ }
2161
+ const task = /^\[([ xX])\]\s+(.*)$/.exec(m[3]);
2162
+ list.items.push(task ? { text: task[2], content: parseInline(task[2]), task: task[1] !== ` `, children: [] } : { text: m[3], content: parseInline(m[3]), children: [] });
2163
+ }
2164
+ return root;
2165
+ }
2166
+ var isTableRow = (line) => /^\s*\|.*\|\s*$/.test(line);
2167
+ var isTableRule = (line) => /^\s*\|(\s*:?-+:?\s*\|)+\s*$/.test(line);
2168
+ var cells = (line) => line.trim().replace(/^\|/, ``).replace(/\|$/, ``).split(/(?<!\\)\|/).map((c) => c.replace(/\\\|/g, `|`).trim());
2169
+ var MAX_BLOCK_NESTING = 32;
2170
+ function parseMarkdown(text) {
2171
+ return parseBlocks(text, 0);
2172
+ }
2173
+ function parseBlocks(text, depth) {
2174
+ const lines = text.replace(/\r\n?/g, `
2175
+ `).split(`
2176
+ `);
2177
+ const blocks = [];
2178
+ let i = 0;
2179
+ const para = [];
2180
+ const flush = () => {
2181
+ if (para.length === 0)
2182
+ return;
2183
+ const text = para.join(` `);
2184
+ const image = wholeImage(text);
2185
+ if (image)
2186
+ blocks.push({ type: `image`, alt: image.alt, src: image.src });
2187
+ else
2188
+ blocks.push({ type: `paragraph`, children: parseInline(text) });
2189
+ para.length = 0;
2190
+ };
2191
+ while (i < lines.length) {
2192
+ const line = lines[i];
2193
+ const fence = /^```(\w*)\s*$/.exec(line);
2194
+ if (fence) {
2195
+ flush();
2196
+ const body = [];
2197
+ i++;
2198
+ while (i < lines.length && !/^```\s*$/.test(lines[i]))
2199
+ body.push(lines[i++]);
2200
+ i++;
2201
+ blocks.push({ type: `codeBlock`, lang: fence[1] || undefined, text: body.join(`
2202
+ `) });
2203
+ continue;
2204
+ }
2205
+ const heading = /^(#{1,6})\s+(.*)$/.exec(line);
2206
+ if (heading) {
2207
+ flush();
2208
+ blocks.push({ type: `heading`, level: heading[1].length, children: parseInline(heading[2]) });
2209
+ i++;
2210
+ continue;
2211
+ }
2212
+ if (depth < MAX_BLOCK_NESTING && /^\s*>/.test(line)) {
2213
+ flush();
2214
+ const body = [];
2215
+ while (i < lines.length && /^\s*>/.test(lines[i]))
2216
+ body.push(lines[i++].replace(/^\s*>\s?/, ``));
2217
+ blocks.push({ type: `quote`, children: parseBlocks(body.join(`
2218
+ `), depth + 1) });
2219
+ continue;
2220
+ }
2221
+ if (LIST_ITEM.test(line)) {
2222
+ flush();
2223
+ const body = [];
2224
+ while (i < lines.length && LIST_ITEM.test(lines[i]))
2225
+ body.push(lines[i++]);
2226
+ blocks.push({ type: `list`, list: parseList(body) });
2227
+ continue;
2228
+ }
2229
+ if (isTableRow(line) && i + 1 < lines.length && isTableRule(lines[i + 1])) {
2230
+ flush();
2231
+ const head = cells(line);
2232
+ const align = cells(lines[i + 1]).map((c) => c.startsWith(`:`) && c.endsWith(`:`) ? `center` : c.endsWith(`:`) ? `end` : c.startsWith(`:`) ? `start` : undefined);
2233
+ i += 2;
2234
+ const rows = [];
2235
+ while (i < lines.length && isTableRow(lines[i]))
2236
+ rows.push(cells(lines[i++]));
2237
+ blocks.push({ type: `table`, align, head: head.map((h) => parseInline(h)), rows: rows.map((r) => r.map((c) => parseInline(c))) });
2238
+ continue;
2239
+ }
2240
+ if (/^\s*([-*_])(\s*\1){2,}\s*$/.test(line)) {
2241
+ flush();
2242
+ blocks.push({ type: `rule` });
2243
+ i++;
2244
+ continue;
2245
+ }
2246
+ if (line.trim() === ``) {
2247
+ flush();
2248
+ i++;
2249
+ continue;
2250
+ }
2251
+ para.push(line.trim());
2252
+ i++;
2253
+ }
2254
+ flush();
2255
+ return blocks;
2256
+ }
2257
+ // packages/exponential-ui/src/web/form.ts
2258
+ import { coreCatalog as coreCatalog3 } from "@exponential_app/eui";
2259
+ var VALIDATE_ON = Object.fromEntries(Object.entries(coreCatalog3.components).flatMap(([name, def]) => {
2260
+ const d = def.props.validateOn?.default;
2261
+ return d === undefined ? [] : [[name, String(d)]];
2262
+ }));
2263
+ function validateOnDefault(component) {
2264
+ return VALIDATE_ON[component];
2265
+ }
2266
+ function fieldErrorsVisible(state) {
2267
+ return state.submitted || state.attempts > 0 || (state.validateOn === `change` ? state.dirty : state.validateOn === `blur` ? state.touched : false);
2268
+ }
2269
+ function documentOrder(fields) {
2270
+ return [...fields].sort((a, b) => {
2271
+ const ea = a.element();
2272
+ const eb = b.element();
2273
+ if (!ea || !eb)
2274
+ return 0;
2275
+ return ea.compareDocumentPosition(eb) & 4 ? -1 : 1;
2276
+ });
2277
+ }
2278
+
2279
+ class FormRegistry {
2280
+ fields = new Set;
2281
+ register(field) {
2282
+ this.fields.add(field);
2283
+ return () => void this.fields.delete(field);
2284
+ }
2285
+ check() {
2286
+ const list = documentOrder(this.fields);
2287
+ const errors = [];
2288
+ let first = null;
2289
+ for (const f of list) {
2290
+ const errs = f.errors();
2291
+ if (errs.length && !first)
2292
+ first = f;
2293
+ for (const message of errs)
2294
+ errors.push({ name: f.name, message });
2295
+ }
2296
+ if (errors.length)
2297
+ return { ok: false, errors, first };
2298
+ const values = {};
2299
+ for (const f of list)
2300
+ values[f.name] = f.value();
2301
+ return { ok: true, values };
2302
+ }
2303
+ stillFailing(summary) {
2304
+ return summary.filter((e) => [...this.fields].some((f) => f.name === e.name && f.errors().includes(e.message)));
2305
+ }
2306
+ }
2307
+ // packages/exponential-ui/src/web/list.ts
2308
+ function scrollParent(el, axis = `vertical`) {
2309
+ let cur = el?.parentElement ?? null;
2310
+ while (cur && cur !== document.body && cur !== document.documentElement) {
2311
+ const cs = getComputedStyle(cur);
2312
+ const o = axis === `vertical` ? cs.overflowY : cs.overflowX;
2313
+ const scrolls = axis === `vertical` ? cur.scrollHeight > cur.clientHeight + 1 : cur.scrollWidth > cur.clientWidth + 1;
2314
+ if ((o === `auto` || o === `scroll`) && scrolls)
2315
+ return cur;
2316
+ cur = cur.parentElement;
2317
+ }
2318
+ return null;
2319
+ }
2320
+ function listViewport(el, axis, rtl, known) {
2321
+ const scroller = known === undefined ? scrollParent(el, axis) : known;
2322
+ const r = el.getBoundingClientRect();
2323
+ const ls = elementScale2(el, r);
2324
+ if (axis === `vertical`) {
2325
+ if (scroller) {
2326
+ const s = scroller.getBoundingClientRect();
2327
+ const ss = elementScale2(scroller, s).y;
2328
+ return { scroll: (s.top + scroller.clientTop * ss - r.top) / ls.y, viewport: scroller.clientHeight * ss / ls.y, scroller };
2329
+ }
2330
+ return { scroll: -r.top / ls.y, viewport: window.innerHeight / ls.y, scroller };
2331
+ }
2332
+ if (scroller) {
2333
+ const s = scroller.getBoundingClientRect();
2334
+ const ss = elementScale2(scroller, s).x;
2335
+ const scroll = rtl ? r.right - (s.right - scroller.clientLeft * ss) : s.left + scroller.clientLeft * ss - r.left;
2336
+ return { scroll: scroll / ls.x, viewport: scroller.clientWidth * ss / ls.x, scroller };
2337
+ }
2338
+ return { scroll: (rtl ? r.right - window.innerWidth : -r.left) / ls.x, viewport: window.innerWidth / ls.x, scroller };
2339
+ }
2340
+ // packages/exponential-ui/src/web/listbox.ts
2341
+ var TYPEAHEAD_RESET_MS = 700;
2342
+ function nextEnabledIndex(count, from, delta, isDisabled = () => false) {
2343
+ if (count === 0)
2344
+ return -1;
2345
+ let i = from;
2346
+ for (let n = 0;n < count; n++) {
2347
+ i = ((i + delta) % count + count) % count;
2348
+ if (!isDisabled(i))
2349
+ return i;
2350
+ }
2351
+ return -1;
2352
+ }
2353
+ function typeaheadStep(buffer, key, now, active, count, isDisabled, labelOf) {
2354
+ const next = { text: now - buffer.at > TYPEAHEAD_RESET_MS ? key.toLowerCase() : buffer.text + key.toLowerCase(), at: now };
2355
+ for (let n = 1;n <= count; n++) {
2356
+ const i = (Math.max(0, active) + (next.text.length > 1 ? n - 1 : n)) % count;
2357
+ if (!isDisabled(i) && labelOf(i).toLowerCase().startsWith(next.text))
2358
+ return { buffer: next, index: i };
2359
+ }
2360
+ return { buffer: next, index: -1 };
2361
+ }
2362
+ // packages/exponential-ui/src/web/parts.ts
2363
+ var PLACED = {
2364
+ Switch: [`body`, `label`, `description`, `track`],
2365
+ Input: [`label`, `field`, `description`, `error`],
2366
+ Textarea: [`label`, `field`, `description`, `error`],
2367
+ NumberField: [`label`, `field`, `decrement`, `input`, `unit`, `increment`, `description`, `error`],
2368
+ ChipInput: [`label`, `field`, `input`, `description`, `error`],
2369
+ Select: [`label`, `trigger`],
2370
+ DatePicker: [`label`, `trigger`],
2371
+ DateRangePicker: [`label`, `trigger`],
2372
+ TimePicker: [`label`, `trigger`],
2373
+ Radio: [`label`, `items`],
2374
+ ChoiceTiles: [`error`],
2375
+ Checkbox: [`box`, `label`, `description`],
2376
+ Slider: [`header`, `label`, `value`, `track`],
2377
+ Tabs: [`list`, `content`, `new`],
2378
+ SearchList: [`head`, `search`, `count`, `body`, `list`, `empty`, `fade`],
2379
+ Menu: [`trigger`, `head`, `search`, `count`, `body`, `list`, `empty`, `fade`],
2380
+ Table: [`header`, `body`, `caption`, `empty`],
2381
+ Carousel: [`page`, `indicator`, `controls`, `previous`, `next`],
2382
+ Tooltip: [`anchor`],
2383
+ FileUpload: [`label`, `dropzone`, `icon`, `title`, `hint`, `browse`, `description`],
2384
+ CodeBlock: [`header`, `title`, `copy`, `body`],
2385
+ AudioPlayer: [`track`, `controls`],
2386
+ Video: [`controls`],
2387
+ Image: [`fallback`],
2388
+ Ring: [`label`]
2389
+ };
2390
+ function placedPartId(component, part, domId) {
2391
+ return PLACED[component]?.includes(part) ? `${domId}.${part}` : null;
2392
+ }
2393
+ // packages/exponential-ui/src/web/share.ts
2394
+ var isPlainObject2 = (v) => {
2395
+ const proto = Object.getPrototypeOf(v);
2396
+ return proto === Object.prototype || proto === null;
2397
+ };
2398
+ var idOf = (v) => typeof v === `object` && v !== null && typeof v.id === `string` ? v.id : undefined;
2399
+ function share(prev, next) {
2400
+ if (Object.is(prev, next) || typeof prev !== `object` || typeof next !== `object` || prev === null || next === null)
2401
+ return next;
2402
+ if (Array.isArray(next)) {
2403
+ if (!Array.isArray(prev))
2404
+ return next;
2405
+ const byId = prev.length > 0 && idOf(prev[0]) !== undefined ? new Map(prev.map((p) => [idOf(p), p])) : null;
2406
+ let same = prev.length === next.length;
2407
+ const out = next.map((v, i) => {
2408
+ const id = byId ? idOf(v) : undefined;
2409
+ const s = share(id !== undefined ? byId.get(id) : prev[i], v);
2410
+ if (s !== prev[i])
2411
+ same = false;
2412
+ return s;
2413
+ });
2414
+ return same ? prev : out;
2415
+ }
2416
+ if (Array.isArray(prev) || !isPlainObject2(prev) || !isPlainObject2(next))
2417
+ return next;
2418
+ const p = prev;
2419
+ const keys = Object.keys(next);
2420
+ let same = keys.length === Object.keys(p).length;
2421
+ const out = {};
2422
+ for (const k of keys) {
2423
+ const had = Object.prototype.hasOwnProperty.call(p, k);
2424
+ const s = share(had ? p[k] : undefined, next[k]);
2425
+ out[k] = s;
2426
+ if (!had || s !== p[k])
2427
+ same = false;
2428
+ }
2429
+ return same ? prev : out;
2430
+ }
2431
+ export {
2432
+ BASE_CSS,
2433
+ ButtonHold,
2434
+ CLIENT_FUNCTIONS,
2435
+ CUSTOM_ICON_NODES,
2436
+ DEBOUNCE_MS,
2437
+ FormRegistry,
2438
+ HOLD_SLOP,
2439
+ HostOwnedController,
2440
+ LAYERS,
2441
+ LIST_ITEM,
2442
+ LITERAL_ROWS_ROOT,
2443
+ MAX_BLOCK_NESTING,
2444
+ MAX_LINK_DEST,
2445
+ MAX_LINK_NESTING,
2446
+ MEDIA_CACHE_IDLE_MAX,
2447
+ PLACED,
2448
+ QR_CORNERS,
2449
+ QR_SCANNER,
2450
+ STATE_SELECTORS,
2451
+ TYPEAHEAD_RESET_MS,
2452
+ absolutePath,
2453
+ acceptsFile,
2454
+ acquireMedia,
2455
+ addDays,
2456
+ addMonths,
2457
+ animationDeclarations,
2458
+ ariaAttributes,
2459
+ arr,
2460
+ bindTree,
2461
+ bool,
2462
+ boundPath,
2463
+ builtinIconName,
2464
+ calendarStop,
2465
+ clearMediaCache,
2466
+ compileNodeSheet,
2467
+ compileTheme,
2468
+ compiledTheme,
2469
+ cssEscape,
2470
+ cssValue,
2471
+ declarations,
2472
+ documentOrder,
2473
+ dynamicStyleEntries,
2474
+ elementScale2 as elementScale,
2475
+ failingCheck,
2476
+ failingChecks,
2477
+ fetchLimited,
2478
+ fetchStream,
2479
+ fieldErrorsVisible,
2480
+ formatFileSize,
2481
+ formatterOf,
2482
+ getPointer,
2483
+ globalsCss,
2484
+ hasDynamic,
2485
+ hostPath,
2486
+ isBinding,
2487
+ isCall,
2488
+ isMacroComponent,
2489
+ isoDate,
2490
+ joinIds,
2491
+ layoutSize2 as layoutSize,
2492
+ linkAt,
2493
+ linkHref,
2494
+ listViewport,
2495
+ lookupIcon,
2496
+ mediaCacheKey,
2497
+ mediaCacheStats,
2498
+ mediaRequestOf,
2499
+ mediaUrlAllowed,
2500
+ memoFormatter,
2501
+ monthGrid,
2502
+ nextEnabledIndex,
2503
+ nodeClass,
2504
+ nodeSheet,
2505
+ nodeSheetBatches,
2506
+ num2 as num,
2507
+ objects,
2508
+ openAllowed,
2509
+ openMediaSource,
2510
+ ownPrivateHosts,
2511
+ parseInline,
2512
+ parseIsoDate,
2513
+ parseList,
2514
+ parseLocaleNumber,
2515
+ parseMarkdown,
2516
+ partClass,
2517
+ phrase,
2518
+ placedPartId,
2519
+ pointerTokens,
2520
+ propAttribute,
2521
+ qrCornerPath,
2522
+ qrFeedColour,
2523
+ qrPaint,
2524
+ qrScanFormats,
2525
+ qrScanReporter,
2526
+ queryToken,
2527
+ releaseMedia,
2528
+ resolveAccessibility,
2529
+ resolveNodeProps,
2530
+ resolveProps,
2531
+ resolveValue,
2532
+ resolveVisible,
2533
+ resolvedMediaKey,
2534
+ rule,
2535
+ ruleSelectors,
2536
+ sameDay,
2537
+ scrollParent,
2538
+ segmentedBadge,
2539
+ setPointer,
2540
+ share,
2541
+ shimmerRule,
2542
+ sortRows,
2543
+ str,
2544
+ streamEntry,
2545
+ styleDirection,
2546
+ surfaceClass,
2547
+ themeScope,
2548
+ tokenVar,
2549
+ tokenVarName,
2550
+ typeaheadStep,
2551
+ urlPolicyOf,
2552
+ validateOnDefault,
2553
+ viewOf,
2554
+ visualScale2 as visualScale,
2555
+ voiceWaveAnimates2 as voiceWaveAnimates,
2556
+ voiceWaveClock2 as voiceWaveClock,
2557
+ voiceWaveFitChild2 as voiceWaveFitChild,
2558
+ voiceWaveName2 as voiceWaveName,
2559
+ walkNodes,
2560
+ wholeImage,
2561
+ withinSlop
2562
+ };
2563
+
2564
+ //# debugId=3DD32DA39743EA9764756E2164756E21
2565
+ //# sourceMappingURL=index.js.map