@cyberskill/design 2.4.0 → 2.5.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 (311) hide show
  1. package/DESIGN.md +3 -3
  2. package/README.md +3 -3
  3. package/VERSION +1 -1
  4. package/_ds_bundle.js +2 -2
  5. package/_ds_bundle.js.map +1 -1
  6. package/_ds_manifest.json +6 -6
  7. package/_esm/cs.mjs +2 -2
  8. package/base/a11y.css +1 -1
  9. package/base/ai.css +3 -2
  10. package/base/collections.css +1 -1
  11. package/base/components.css +1 -1
  12. package/base/controls.css +17 -9
  13. package/base/data.css +1 -0
  14. package/base/feedback.css +4 -4
  15. package/base/glass.css +1 -1
  16. package/base/shell.css +1 -1
  17. package/base/typography.css +1 -1
  18. package/components/prompt-api.json +1 -1
  19. package/components/release-compatibility.json +1 -1
  20. package/components/specifications.json +1 -1
  21. package/components/static-html-reference.json +19 -19
  22. package/dist/esm/build.json +1 -1
  23. package/dist/styles.min.css +1 -1
  24. package/docs/consuming.md +1 -1
  25. package/docs/contrast-report.md +1 -1
  26. package/docs/conventions.md +1 -1
  27. package/docs/reference-catalog.json +17 -17
  28. package/docs/release-notes.md +1 -1
  29. package/docs/static-html-reference.md +18 -18
  30. package/docs/vi/consuming.md +1 -1
  31. package/docs/vi/contrast-report.md +1 -1
  32. package/docs/vi/conventions.md +1 -1
  33. package/docs/vi/entrypoints/DESIGN.md +3 -3
  34. package/docs/vi/entrypoints/README.md +3 -3
  35. package/docs/vi/release-notes.md +1 -1
  36. package/docs/vi/static-html-reference.md +18 -18
  37. package/package.json +1 -1
  38. package/styles/components/manifest.json +132 -132
  39. package/styles.layered.css +14 -14
  40. package/styles.layered.provenance.json +11 -11
  41. package/tokens/declarations.json +17 -17
  42. package/tokens/element-seeds.json +1 -1
  43. package/tokens/modes/dark__default__comfortable__high.dtcg.json +1 -1
  44. package/tokens/modes/dark__default__comfortable__standard.dtcg.json +1 -1
  45. package/tokens/modes/dark__default__compact__high.dtcg.json +1 -1
  46. package/tokens/modes/dark__default__compact__standard.dtcg.json +1 -1
  47. package/tokens/modes/dark__hoa-lava__comfortable__high.dtcg.json +1 -1
  48. package/tokens/modes/dark__hoa-lava__comfortable__standard.dtcg.json +1 -1
  49. package/tokens/modes/dark__hoa-lava__compact__high.dtcg.json +1 -1
  50. package/tokens/modes/dark__hoa-lava__compact__standard.dtcg.json +1 -1
  51. package/tokens/modes/dark__hoa-plasma__comfortable__high.dtcg.json +1 -1
  52. package/tokens/modes/dark__hoa-plasma__comfortable__standard.dtcg.json +1 -1
  53. package/tokens/modes/dark__hoa-plasma__compact__high.dtcg.json +1 -1
  54. package/tokens/modes/dark__hoa-plasma__compact__standard.dtcg.json +1 -1
  55. package/tokens/modes/dark__hoa__comfortable__high.dtcg.json +1 -1
  56. package/tokens/modes/dark__hoa__comfortable__standard.dtcg.json +1 -1
  57. package/tokens/modes/dark__hoa__compact__high.dtcg.json +1 -1
  58. package/tokens/modes/dark__hoa__compact__standard.dtcg.json +1 -1
  59. package/tokens/modes/dark__kim-steel__comfortable__high.dtcg.json +1 -1
  60. package/tokens/modes/dark__kim-steel__comfortable__standard.dtcg.json +1 -1
  61. package/tokens/modes/dark__kim-steel__compact__high.dtcg.json +1 -1
  62. package/tokens/modes/dark__kim-steel__compact__standard.dtcg.json +1 -1
  63. package/tokens/modes/dark__kim-titanium__comfortable__high.dtcg.json +1 -1
  64. package/tokens/modes/dark__kim-titanium__comfortable__standard.dtcg.json +1 -1
  65. package/tokens/modes/dark__kim-titanium__compact__high.dtcg.json +1 -1
  66. package/tokens/modes/dark__kim-titanium__compact__standard.dtcg.json +1 -1
  67. package/tokens/modes/dark__kim__comfortable__high.dtcg.json +1 -1
  68. package/tokens/modes/dark__kim__comfortable__standard.dtcg.json +1 -1
  69. package/tokens/modes/dark__kim__compact__high.dtcg.json +1 -1
  70. package/tokens/modes/dark__kim__compact__standard.dtcg.json +1 -1
  71. package/tokens/modes/dark__moc-bamboo__comfortable__high.dtcg.json +1 -1
  72. package/tokens/modes/dark__moc-bamboo__comfortable__standard.dtcg.json +1 -1
  73. package/tokens/modes/dark__moc-bamboo__compact__high.dtcg.json +1 -1
  74. package/tokens/modes/dark__moc-bamboo__compact__standard.dtcg.json +1 -1
  75. package/tokens/modes/dark__moc-forest__comfortable__high.dtcg.json +1 -1
  76. package/tokens/modes/dark__moc-forest__comfortable__standard.dtcg.json +1 -1
  77. package/tokens/modes/dark__moc-forest__compact__high.dtcg.json +1 -1
  78. package/tokens/modes/dark__moc-forest__compact__standard.dtcg.json +1 -1
  79. package/tokens/modes/dark__moc__comfortable__high.dtcg.json +1 -1
  80. package/tokens/modes/dark__moc__comfortable__standard.dtcg.json +1 -1
  81. package/tokens/modes/dark__moc__compact__high.dtcg.json +1 -1
  82. package/tokens/modes/dark__moc__compact__standard.dtcg.json +1 -1
  83. package/tokens/modes/dark__tho-clay__comfortable__high.dtcg.json +1 -1
  84. package/tokens/modes/dark__tho-clay__comfortable__standard.dtcg.json +1 -1
  85. package/tokens/modes/dark__tho-clay__compact__high.dtcg.json +1 -1
  86. package/tokens/modes/dark__tho-clay__compact__standard.dtcg.json +1 -1
  87. package/tokens/modes/dark__tho-sand__comfortable__high.dtcg.json +1 -1
  88. package/tokens/modes/dark__tho-sand__comfortable__standard.dtcg.json +1 -1
  89. package/tokens/modes/dark__tho-sand__compact__high.dtcg.json +1 -1
  90. package/tokens/modes/dark__tho-sand__compact__standard.dtcg.json +1 -1
  91. package/tokens/modes/dark__tho__comfortable__high.dtcg.json +1 -1
  92. package/tokens/modes/dark__tho__comfortable__standard.dtcg.json +1 -1
  93. package/tokens/modes/dark__tho__compact__high.dtcg.json +1 -1
  94. package/tokens/modes/dark__tho__compact__standard.dtcg.json +1 -1
  95. package/tokens/modes/dark__thuy-mist__comfortable__high.dtcg.json +1 -1
  96. package/tokens/modes/dark__thuy-mist__comfortable__standard.dtcg.json +1 -1
  97. package/tokens/modes/dark__thuy-mist__compact__high.dtcg.json +1 -1
  98. package/tokens/modes/dark__thuy-mist__compact__standard.dtcg.json +1 -1
  99. package/tokens/modes/dark__thuy-ocean__comfortable__high.dtcg.json +1 -1
  100. package/tokens/modes/dark__thuy-ocean__comfortable__standard.dtcg.json +1 -1
  101. package/tokens/modes/dark__thuy-ocean__compact__high.dtcg.json +1 -1
  102. package/tokens/modes/dark__thuy-ocean__compact__standard.dtcg.json +1 -1
  103. package/tokens/modes/dark__thuy__comfortable__high.dtcg.json +1 -1
  104. package/tokens/modes/dark__thuy__comfortable__standard.dtcg.json +1 -1
  105. package/tokens/modes/dark__thuy__compact__high.dtcg.json +1 -1
  106. package/tokens/modes/dark__thuy__compact__standard.dtcg.json +1 -1
  107. package/tokens/modes/index.json +268 -268
  108. package/tokens/modes/light__default__comfortable__high.dtcg.json +1 -1
  109. package/tokens/modes/light__default__comfortable__standard.dtcg.json +1 -1
  110. package/tokens/modes/light__default__compact__high.dtcg.json +1 -1
  111. package/tokens/modes/light__default__compact__standard.dtcg.json +1 -1
  112. package/tokens/modes/light__hoa-lava__comfortable__high.dtcg.json +1 -1
  113. package/tokens/modes/light__hoa-lava__comfortable__standard.dtcg.json +1 -1
  114. package/tokens/modes/light__hoa-lava__compact__high.dtcg.json +1 -1
  115. package/tokens/modes/light__hoa-lava__compact__standard.dtcg.json +1 -1
  116. package/tokens/modes/light__hoa-plasma__comfortable__high.dtcg.json +1 -1
  117. package/tokens/modes/light__hoa-plasma__comfortable__standard.dtcg.json +1 -1
  118. package/tokens/modes/light__hoa-plasma__compact__high.dtcg.json +1 -1
  119. package/tokens/modes/light__hoa-plasma__compact__standard.dtcg.json +1 -1
  120. package/tokens/modes/light__hoa__comfortable__high.dtcg.json +1 -1
  121. package/tokens/modes/light__hoa__comfortable__standard.dtcg.json +1 -1
  122. package/tokens/modes/light__hoa__compact__high.dtcg.json +1 -1
  123. package/tokens/modes/light__hoa__compact__standard.dtcg.json +1 -1
  124. package/tokens/modes/light__kim-steel__comfortable__high.dtcg.json +1 -1
  125. package/tokens/modes/light__kim-steel__comfortable__standard.dtcg.json +1 -1
  126. package/tokens/modes/light__kim-steel__compact__high.dtcg.json +1 -1
  127. package/tokens/modes/light__kim-steel__compact__standard.dtcg.json +1 -1
  128. package/tokens/modes/light__kim-titanium__comfortable__high.dtcg.json +1 -1
  129. package/tokens/modes/light__kim-titanium__comfortable__standard.dtcg.json +1 -1
  130. package/tokens/modes/light__kim-titanium__compact__high.dtcg.json +1 -1
  131. package/tokens/modes/light__kim-titanium__compact__standard.dtcg.json +1 -1
  132. package/tokens/modes/light__kim__comfortable__high.dtcg.json +1 -1
  133. package/tokens/modes/light__kim__comfortable__standard.dtcg.json +1 -1
  134. package/tokens/modes/light__kim__compact__high.dtcg.json +1 -1
  135. package/tokens/modes/light__kim__compact__standard.dtcg.json +1 -1
  136. package/tokens/modes/light__moc-bamboo__comfortable__high.dtcg.json +1 -1
  137. package/tokens/modes/light__moc-bamboo__comfortable__standard.dtcg.json +1 -1
  138. package/tokens/modes/light__moc-bamboo__compact__high.dtcg.json +1 -1
  139. package/tokens/modes/light__moc-bamboo__compact__standard.dtcg.json +1 -1
  140. package/tokens/modes/light__moc-forest__comfortable__high.dtcg.json +1 -1
  141. package/tokens/modes/light__moc-forest__comfortable__standard.dtcg.json +1 -1
  142. package/tokens/modes/light__moc-forest__compact__high.dtcg.json +1 -1
  143. package/tokens/modes/light__moc-forest__compact__standard.dtcg.json +1 -1
  144. package/tokens/modes/light__moc__comfortable__high.dtcg.json +1 -1
  145. package/tokens/modes/light__moc__comfortable__standard.dtcg.json +1 -1
  146. package/tokens/modes/light__moc__compact__high.dtcg.json +1 -1
  147. package/tokens/modes/light__moc__compact__standard.dtcg.json +1 -1
  148. package/tokens/modes/light__tho-clay__comfortable__high.dtcg.json +1 -1
  149. package/tokens/modes/light__tho-clay__comfortable__standard.dtcg.json +1 -1
  150. package/tokens/modes/light__tho-clay__compact__high.dtcg.json +1 -1
  151. package/tokens/modes/light__tho-clay__compact__standard.dtcg.json +1 -1
  152. package/tokens/modes/light__tho-sand__comfortable__high.dtcg.json +1 -1
  153. package/tokens/modes/light__tho-sand__comfortable__standard.dtcg.json +1 -1
  154. package/tokens/modes/light__tho-sand__compact__high.dtcg.json +1 -1
  155. package/tokens/modes/light__tho-sand__compact__standard.dtcg.json +1 -1
  156. package/tokens/modes/light__tho__comfortable__high.dtcg.json +1 -1
  157. package/tokens/modes/light__tho__comfortable__standard.dtcg.json +1 -1
  158. package/tokens/modes/light__tho__compact__high.dtcg.json +1 -1
  159. package/tokens/modes/light__tho__compact__standard.dtcg.json +1 -1
  160. package/tokens/modes/light__thuy-mist__comfortable__high.dtcg.json +1 -1
  161. package/tokens/modes/light__thuy-mist__comfortable__standard.dtcg.json +1 -1
  162. package/tokens/modes/light__thuy-mist__compact__high.dtcg.json +1 -1
  163. package/tokens/modes/light__thuy-mist__compact__standard.dtcg.json +1 -1
  164. package/tokens/modes/light__thuy-ocean__comfortable__high.dtcg.json +1 -1
  165. package/tokens/modes/light__thuy-ocean__comfortable__standard.dtcg.json +1 -1
  166. package/tokens/modes/light__thuy-ocean__compact__high.dtcg.json +1 -1
  167. package/tokens/modes/light__thuy-ocean__compact__standard.dtcg.json +1 -1
  168. package/tokens/modes/light__thuy__comfortable__high.dtcg.json +1 -1
  169. package/tokens/modes/light__thuy__comfortable__standard.dtcg.json +1 -1
  170. package/tokens/modes/light__thuy__compact__high.dtcg.json +1 -1
  171. package/tokens/modes/light__thuy__compact__standard.dtcg.json +1 -1
  172. package/tokens/modes/system-dark__default__comfortable__high.dtcg.json +1 -1
  173. package/tokens/modes/system-dark__default__comfortable__standard.dtcg.json +1 -1
  174. package/tokens/modes/system-dark__default__compact__high.dtcg.json +1 -1
  175. package/tokens/modes/system-dark__default__compact__standard.dtcg.json +1 -1
  176. package/tokens/modes/system-dark__hoa-lava__comfortable__high.dtcg.json +1 -1
  177. package/tokens/modes/system-dark__hoa-lava__comfortable__standard.dtcg.json +1 -1
  178. package/tokens/modes/system-dark__hoa-lava__compact__high.dtcg.json +1 -1
  179. package/tokens/modes/system-dark__hoa-lava__compact__standard.dtcg.json +1 -1
  180. package/tokens/modes/system-dark__hoa-plasma__comfortable__high.dtcg.json +1 -1
  181. package/tokens/modes/system-dark__hoa-plasma__comfortable__standard.dtcg.json +1 -1
  182. package/tokens/modes/system-dark__hoa-plasma__compact__high.dtcg.json +1 -1
  183. package/tokens/modes/system-dark__hoa-plasma__compact__standard.dtcg.json +1 -1
  184. package/tokens/modes/system-dark__hoa__comfortable__high.dtcg.json +1 -1
  185. package/tokens/modes/system-dark__hoa__comfortable__standard.dtcg.json +1 -1
  186. package/tokens/modes/system-dark__hoa__compact__high.dtcg.json +1 -1
  187. package/tokens/modes/system-dark__hoa__compact__standard.dtcg.json +1 -1
  188. package/tokens/modes/system-dark__kim-steel__comfortable__high.dtcg.json +1 -1
  189. package/tokens/modes/system-dark__kim-steel__comfortable__standard.dtcg.json +1 -1
  190. package/tokens/modes/system-dark__kim-steel__compact__high.dtcg.json +1 -1
  191. package/tokens/modes/system-dark__kim-steel__compact__standard.dtcg.json +1 -1
  192. package/tokens/modes/system-dark__kim-titanium__comfortable__high.dtcg.json +1 -1
  193. package/tokens/modes/system-dark__kim-titanium__comfortable__standard.dtcg.json +1 -1
  194. package/tokens/modes/system-dark__kim-titanium__compact__high.dtcg.json +1 -1
  195. package/tokens/modes/system-dark__kim-titanium__compact__standard.dtcg.json +1 -1
  196. package/tokens/modes/system-dark__kim__comfortable__high.dtcg.json +1 -1
  197. package/tokens/modes/system-dark__kim__comfortable__standard.dtcg.json +1 -1
  198. package/tokens/modes/system-dark__kim__compact__high.dtcg.json +1 -1
  199. package/tokens/modes/system-dark__kim__compact__standard.dtcg.json +1 -1
  200. package/tokens/modes/system-dark__moc-bamboo__comfortable__high.dtcg.json +1 -1
  201. package/tokens/modes/system-dark__moc-bamboo__comfortable__standard.dtcg.json +1 -1
  202. package/tokens/modes/system-dark__moc-bamboo__compact__high.dtcg.json +1 -1
  203. package/tokens/modes/system-dark__moc-bamboo__compact__standard.dtcg.json +1 -1
  204. package/tokens/modes/system-dark__moc-forest__comfortable__high.dtcg.json +1 -1
  205. package/tokens/modes/system-dark__moc-forest__comfortable__standard.dtcg.json +1 -1
  206. package/tokens/modes/system-dark__moc-forest__compact__high.dtcg.json +1 -1
  207. package/tokens/modes/system-dark__moc-forest__compact__standard.dtcg.json +1 -1
  208. package/tokens/modes/system-dark__moc__comfortable__high.dtcg.json +1 -1
  209. package/tokens/modes/system-dark__moc__comfortable__standard.dtcg.json +1 -1
  210. package/tokens/modes/system-dark__moc__compact__high.dtcg.json +1 -1
  211. package/tokens/modes/system-dark__moc__compact__standard.dtcg.json +1 -1
  212. package/tokens/modes/system-dark__tho-clay__comfortable__high.dtcg.json +1 -1
  213. package/tokens/modes/system-dark__tho-clay__comfortable__standard.dtcg.json +1 -1
  214. package/tokens/modes/system-dark__tho-clay__compact__high.dtcg.json +1 -1
  215. package/tokens/modes/system-dark__tho-clay__compact__standard.dtcg.json +1 -1
  216. package/tokens/modes/system-dark__tho-sand__comfortable__high.dtcg.json +1 -1
  217. package/tokens/modes/system-dark__tho-sand__comfortable__standard.dtcg.json +1 -1
  218. package/tokens/modes/system-dark__tho-sand__compact__high.dtcg.json +1 -1
  219. package/tokens/modes/system-dark__tho-sand__compact__standard.dtcg.json +1 -1
  220. package/tokens/modes/system-dark__tho__comfortable__high.dtcg.json +1 -1
  221. package/tokens/modes/system-dark__tho__comfortable__standard.dtcg.json +1 -1
  222. package/tokens/modes/system-dark__tho__compact__high.dtcg.json +1 -1
  223. package/tokens/modes/system-dark__tho__compact__standard.dtcg.json +1 -1
  224. package/tokens/modes/system-dark__thuy-mist__comfortable__high.dtcg.json +1 -1
  225. package/tokens/modes/system-dark__thuy-mist__comfortable__standard.dtcg.json +1 -1
  226. package/tokens/modes/system-dark__thuy-mist__compact__high.dtcg.json +1 -1
  227. package/tokens/modes/system-dark__thuy-mist__compact__standard.dtcg.json +1 -1
  228. package/tokens/modes/system-dark__thuy-ocean__comfortable__high.dtcg.json +1 -1
  229. package/tokens/modes/system-dark__thuy-ocean__comfortable__standard.dtcg.json +1 -1
  230. package/tokens/modes/system-dark__thuy-ocean__compact__high.dtcg.json +1 -1
  231. package/tokens/modes/system-dark__thuy-ocean__compact__standard.dtcg.json +1 -1
  232. package/tokens/modes/system-dark__thuy__comfortable__high.dtcg.json +1 -1
  233. package/tokens/modes/system-dark__thuy__comfortable__standard.dtcg.json +1 -1
  234. package/tokens/modes/system-dark__thuy__compact__high.dtcg.json +1 -1
  235. package/tokens/modes/system-dark__thuy__compact__standard.dtcg.json +1 -1
  236. package/tokens/modes/system-light__default__comfortable__high.dtcg.json +1 -1
  237. package/tokens/modes/system-light__default__comfortable__standard.dtcg.json +1 -1
  238. package/tokens/modes/system-light__default__compact__high.dtcg.json +1 -1
  239. package/tokens/modes/system-light__default__compact__standard.dtcg.json +1 -1
  240. package/tokens/modes/system-light__hoa-lava__comfortable__high.dtcg.json +1 -1
  241. package/tokens/modes/system-light__hoa-lava__comfortable__standard.dtcg.json +1 -1
  242. package/tokens/modes/system-light__hoa-lava__compact__high.dtcg.json +1 -1
  243. package/tokens/modes/system-light__hoa-lava__compact__standard.dtcg.json +1 -1
  244. package/tokens/modes/system-light__hoa-plasma__comfortable__high.dtcg.json +1 -1
  245. package/tokens/modes/system-light__hoa-plasma__comfortable__standard.dtcg.json +1 -1
  246. package/tokens/modes/system-light__hoa-plasma__compact__high.dtcg.json +1 -1
  247. package/tokens/modes/system-light__hoa-plasma__compact__standard.dtcg.json +1 -1
  248. package/tokens/modes/system-light__hoa__comfortable__high.dtcg.json +1 -1
  249. package/tokens/modes/system-light__hoa__comfortable__standard.dtcg.json +1 -1
  250. package/tokens/modes/system-light__hoa__compact__high.dtcg.json +1 -1
  251. package/tokens/modes/system-light__hoa__compact__standard.dtcg.json +1 -1
  252. package/tokens/modes/system-light__kim-steel__comfortable__high.dtcg.json +1 -1
  253. package/tokens/modes/system-light__kim-steel__comfortable__standard.dtcg.json +1 -1
  254. package/tokens/modes/system-light__kim-steel__compact__high.dtcg.json +1 -1
  255. package/tokens/modes/system-light__kim-steel__compact__standard.dtcg.json +1 -1
  256. package/tokens/modes/system-light__kim-titanium__comfortable__high.dtcg.json +1 -1
  257. package/tokens/modes/system-light__kim-titanium__comfortable__standard.dtcg.json +1 -1
  258. package/tokens/modes/system-light__kim-titanium__compact__high.dtcg.json +1 -1
  259. package/tokens/modes/system-light__kim-titanium__compact__standard.dtcg.json +1 -1
  260. package/tokens/modes/system-light__kim__comfortable__high.dtcg.json +1 -1
  261. package/tokens/modes/system-light__kim__comfortable__standard.dtcg.json +1 -1
  262. package/tokens/modes/system-light__kim__compact__high.dtcg.json +1 -1
  263. package/tokens/modes/system-light__kim__compact__standard.dtcg.json +1 -1
  264. package/tokens/modes/system-light__moc-bamboo__comfortable__high.dtcg.json +1 -1
  265. package/tokens/modes/system-light__moc-bamboo__comfortable__standard.dtcg.json +1 -1
  266. package/tokens/modes/system-light__moc-bamboo__compact__high.dtcg.json +1 -1
  267. package/tokens/modes/system-light__moc-bamboo__compact__standard.dtcg.json +1 -1
  268. package/tokens/modes/system-light__moc-forest__comfortable__high.dtcg.json +1 -1
  269. package/tokens/modes/system-light__moc-forest__comfortable__standard.dtcg.json +1 -1
  270. package/tokens/modes/system-light__moc-forest__compact__high.dtcg.json +1 -1
  271. package/tokens/modes/system-light__moc-forest__compact__standard.dtcg.json +1 -1
  272. package/tokens/modes/system-light__moc__comfortable__high.dtcg.json +1 -1
  273. package/tokens/modes/system-light__moc__comfortable__standard.dtcg.json +1 -1
  274. package/tokens/modes/system-light__moc__compact__high.dtcg.json +1 -1
  275. package/tokens/modes/system-light__moc__compact__standard.dtcg.json +1 -1
  276. package/tokens/modes/system-light__tho-clay__comfortable__high.dtcg.json +1 -1
  277. package/tokens/modes/system-light__tho-clay__comfortable__standard.dtcg.json +1 -1
  278. package/tokens/modes/system-light__tho-clay__compact__high.dtcg.json +1 -1
  279. package/tokens/modes/system-light__tho-clay__compact__standard.dtcg.json +1 -1
  280. package/tokens/modes/system-light__tho-sand__comfortable__high.dtcg.json +1 -1
  281. package/tokens/modes/system-light__tho-sand__comfortable__standard.dtcg.json +1 -1
  282. package/tokens/modes/system-light__tho-sand__compact__high.dtcg.json +1 -1
  283. package/tokens/modes/system-light__tho-sand__compact__standard.dtcg.json +1 -1
  284. package/tokens/modes/system-light__tho__comfortable__high.dtcg.json +1 -1
  285. package/tokens/modes/system-light__tho__comfortable__standard.dtcg.json +1 -1
  286. package/tokens/modes/system-light__tho__compact__high.dtcg.json +1 -1
  287. package/tokens/modes/system-light__tho__compact__standard.dtcg.json +1 -1
  288. package/tokens/modes/system-light__thuy-mist__comfortable__high.dtcg.json +1 -1
  289. package/tokens/modes/system-light__thuy-mist__comfortable__standard.dtcg.json +1 -1
  290. package/tokens/modes/system-light__thuy-mist__compact__high.dtcg.json +1 -1
  291. package/tokens/modes/system-light__thuy-mist__compact__standard.dtcg.json +1 -1
  292. package/tokens/modes/system-light__thuy-ocean__comfortable__high.dtcg.json +1 -1
  293. package/tokens/modes/system-light__thuy-ocean__comfortable__standard.dtcg.json +1 -1
  294. package/tokens/modes/system-light__thuy-ocean__compact__high.dtcg.json +1 -1
  295. package/tokens/modes/system-light__thuy-ocean__compact__standard.dtcg.json +1 -1
  296. package/tokens/modes/system-light__thuy__comfortable__high.dtcg.json +1 -1
  297. package/tokens/modes/system-light__thuy__comfortable__standard.dtcg.json +1 -1
  298. package/tokens/modes/system-light__thuy__compact__high.dtcg.json +1 -1
  299. package/tokens/modes/system-light__thuy__compact__standard.dtcg.json +1 -1
  300. package/tokens/native/CSModes.kt +3 -3
  301. package/tokens/native/CSModes.swift +3 -3
  302. package/tokens/native/CSTokens.kt +1 -1
  303. package/tokens/native/CSTokens.swift +1 -1
  304. package/tokens/native/cs_modes.dart +3 -3
  305. package/tokens/native/cs_tokens.dart +1 -1
  306. package/tokens/native/mode-provenance.json +6 -6
  307. package/tokens/provenance.json +6 -6
  308. package/tokens/tokens.dtcg.json +2 -2
  309. package/tokens/tokens.js +3 -3
  310. package/tokens/tokens.json +2 -2
  311. package/tokens/variables.css +1 -1
package/_ds_bundle.js CHANGED
@@ -1,3 +1,3 @@
1
- /* @ds-bundle: {"format":4,"namespace":"CyberSkillDesignSystem_847b3c","components":[{"name":"AIDisclosureBadge","sourcePath":"components/ai/AIDisclosureBadge.jsx"},{"name":"ChatMessage","sourcePath":"components/ai/ChatMessage.jsx"},{"name":"CitationList","sourcePath":"components/ai/CitationList.jsx"},{"name":"ConfidenceMeter","sourcePath":"components/ai/ConfidenceMeter.jsx"},{"name":"HumanReviewGate","sourcePath":"components/ai/HumanReviewGate.jsx"},{"name":"PromptInput","sourcePath":"components/ai/PromptInput.jsx"},{"name":"PromptSuggestions","sourcePath":"components/ai/PromptSuggestions.jsx"},{"name":"TypingIndicator","sourcePath":"components/ai/TypingIndicator.jsx"},{"name":"LumiAvatar","sourcePath":"components/brand/LumiAvatar.jsx"},{"name":"Button","sourcePath":"components/button/Button.jsx"},{"name":"ButtonGroup","sourcePath":"components/button/ButtonGroup.jsx"},{"name":"FloatingActionButton","sourcePath":"components/button/FloatingActionButton.jsx"},{"name":"Accordion","sourcePath":"components/data/Accordion.jsx"},{"name":"AspectRatio","sourcePath":"components/data/AspectRatio.jsx"},{"name":"Avatar","sourcePath":"components/data/Avatar.jsx"},{"name":"AvatarGroup","sourcePath":"components/data/Avatar.jsx"},{"name":"Card","sourcePath":"components/data/Card.jsx"},{"name":"CardHeader","sourcePath":"components/data/Card.jsx"},{"name":"CardBody","sourcePath":"components/data/Card.jsx"},{"name":"CardFooter","sourcePath":"components/data/Card.jsx"},{"name":"Carousel","sourcePath":"components/data/Carousel.jsx"},{"name":"Chart","sourcePath":"components/data/Chart.jsx"},{"name":"CodeBlock","sourcePath":"components/data/CodeBlock.jsx"},{"name":"Collapsible","sourcePath":"components/data/Collapsible.jsx"},{"name":"Comment","sourcePath":"components/data/Comment.jsx"},{"name":"DescriptionList","sourcePath":"components/data/DescriptionList.jsx"},{"name":"Divider","sourcePath":"components/data/Divider.jsx"},{"name":"Image","sourcePath":"components/data/Image.jsx"},{"name":"Item","sourcePath":"components/data/Item.jsx"},{"name":"Kbd","sourcePath":"components/data/Kbd.jsx"},{"name":"List","sourcePath":"components/data/List.jsx"},{"name":"ListItem","sourcePath":"components/data/List.jsx"},{"name":"Masonry","sourcePath":"components/data/Masonry.jsx"},{"name":"QRCode","sourcePath":"components/data/QRCode.jsx"},{"name":"ScrollArea","sourcePath":"components/data/ScrollArea.jsx"},{"name":"Sortable","sourcePath":"components/data/Sortable.jsx"},{"name":"Splitter","sourcePath":"components/data/Splitter.jsx"},{"name":"Stat","sourcePath":"components/data/Stat.jsx"},{"name":"Terminal","sourcePath":"components/data/Terminal.jsx"},{"name":"Timeline","sourcePath":"components/data/Timeline.jsx"},{"name":"Tooltip","sourcePath":"components/data/Tooltip.jsx"},{"name":"Tree","sourcePath":"components/data/Tree.jsx"},{"name":"Watermark","sourcePath":"components/data/Watermark.jsx"},{"name":"DataGrid","sourcePath":"components/datatable/DataGrid.jsx"},{"name":"DataTable","sourcePath":"components/datatable/DataTable.jsx"},{"name":"TreeTable","sourcePath":"components/datatable/TreeTable.jsx"},{"name":"Dialog","sourcePath":"components/dialog/Dialog.jsx"},{"name":"Alert","sourcePath":"components/feedback/Alert.jsx"},{"name":"Badge","sourcePath":"components/feedback/Badge.jsx"},{"name":"EmptyState","sourcePath":"components/feedback/EmptyState.jsx"},{"name":"ProgressBar","sourcePath":"components/feedback/ProgressBar.jsx"},{"name":"Result","sourcePath":"components/feedback/Result.jsx"},{"name":"Skeleton","sourcePath":"components/feedback/Skeleton.jsx"},{"name":"Spinner","sourcePath":"components/feedback/Spinner.jsx"},{"name":"StatusIndicator","sourcePath":"components/feedback/StatusIndicator.jsx"},{"name":"Tag","sourcePath":"components/feedback/Tag.jsx"},{"name":"ToastStack","sourcePath":"components/feedback/Toast.jsx"},{"name":"Toast","sourcePath":"components/feedback/Toast.jsx"},{"name":"Calendar","sourcePath":"components/forms/Calendar.jsx"},{"name":"Cascader","sourcePath":"components/forms/Cascader.jsx"},{"name":"Checkbox","sourcePath":"components/forms/Checkbox.jsx"},{"name":"ColorPicker","sourcePath":"components/forms/ColorPicker.jsx"},{"name":"Combobox","sourcePath":"components/forms/Combobox.jsx"},{"name":"DatePicker","sourcePath":"components/forms/DatePicker.jsx"},{"name":"Editor","sourcePath":"components/forms/Editor.jsx"},{"name":"FileUpload","sourcePath":"components/forms/FileUpload.jsx"},{"name":"Form","sourcePath":"components/forms/Form.jsx"},{"name":"FormField","sourcePath":"components/forms/Form.jsx"},{"name":"FormFieldArray","sourcePath":"components/forms/Form.jsx"},{"name":"FormWizard","sourcePath":"components/forms/Form.jsx"},{"name":"InlineEdit","sourcePath":"components/forms/InlineEdit.jsx"},{"name":"InputGroup","sourcePath":"components/forms/InputGroup.jsx"},{"name":"InputOTP","sourcePath":"components/forms/InputOTP.jsx"},{"name":"Mentions","sourcePath":"components/forms/Mentions.jsx"},{"name":"NativeSelect","sourcePath":"components/forms/NativeSelect.jsx"},{"name":"NumberField","sourcePath":"components/forms/NumberField.jsx"},{"name":"Radio","sourcePath":"components/forms/RadioGroup.jsx"},{"name":"RadioGroup","sourcePath":"components/forms/RadioGroup.jsx"},{"name":"Rating","sourcePath":"components/forms/Rating.jsx"},{"name":"SearchField","sourcePath":"components/forms/SearchField.jsx"},{"name":"SegmentedControl","sourcePath":"components/forms/SegmentedControl.jsx"},{"name":"Select","sourcePath":"components/forms/Select.jsx"},{"name":"Slider","sourcePath":"components/forms/Slider.jsx"},{"name":"Switch","sourcePath":"components/forms/Switch.jsx"},{"name":"TagInput","sourcePath":"components/forms/TagInput.jsx"},{"name":"Textarea","sourcePath":"components/forms/Textarea.jsx"},{"name":"TimePicker","sourcePath":"components/forms/TimePicker.jsx"},{"name":"Toggle","sourcePath":"components/forms/Toggle.jsx"},{"name":"Transfer","sourcePath":"components/forms/Transfer.jsx"},{"name":"TreeSelect","sourcePath":"components/forms/TreeSelect.jsx"},{"name":"EDITOR_SCHEMA","sourcePath":"components/forms/editor-schema.js"},{"name":"LocaleProvider","sourcePath":"components/i18n/LocaleProvider.jsx"},{"name":"useMessages","sourcePath":"components/i18n/LocaleProvider.jsx"},{"name":"CS_ICONS","sourcePath":"components/icon/Icon.jsx"},{"name":"Icon","sourcePath":"components/icon/Icon.jsx"},{"name":"Logo","sourcePath":"components/logo/Logo.jsx"},{"name":"CS_LOGO_VIEWBOX","sourcePath":"components/logo/logo-data.js"},{"name":"CS_LOGO_MARK_INNER","sourcePath":"components/logo/logo-data.js"},{"name":"Anchor","sourcePath":"components/navigation/Anchor.jsx"},{"name":"BackTop","sourcePath":"components/navigation/BackTop.jsx"},{"name":"Breadcrumb","sourcePath":"components/navigation/Breadcrumb.jsx"},{"name":"CommandPalette","sourcePath":"components/navigation/CommandPalette.jsx"},{"name":"Dock","sourcePath":"components/navigation/Dock.jsx"},{"name":"HotKeys","sourcePath":"components/navigation/HotKeys.jsx"},{"name":"Link","sourcePath":"components/navigation/Link.jsx"},{"name":"Menu","sourcePath":"components/navigation/Menu.jsx"},{"name":"MenuItem","sourcePath":"components/navigation/Menu.jsx"},{"name":"Menubar","sourcePath":"components/navigation/Menubar.jsx"},{"name":"NavigationMenu","sourcePath":"components/navigation/NavigationMenu.jsx"},{"name":"Pagination","sourcePath":"components/navigation/Pagination.jsx"},{"name":"Sidebar","sourcePath":"components/navigation/Sidebar.jsx"},{"name":"NavItem","sourcePath":"components/navigation/Sidebar.jsx"},{"name":"Steps","sourcePath":"components/navigation/Steps.jsx"},{"name":"Tabs","sourcePath":"components/navigation/Tabs.jsx"},{"name":"Tab","sourcePath":"components/navigation/Tabs.jsx"},{"name":"Toolbar","sourcePath":"components/navigation/Toolbar.jsx"},{"name":"AlertDialog","sourcePath":"components/overlays/AlertDialog.jsx"},{"name":"ContextMenu","sourcePath":"components/overlays/ContextMenu.jsx"},{"name":"Drawer","sourcePath":"components/overlays/Drawer.jsx"},{"name":"HoverCard","sourcePath":"components/overlays/HoverCard.jsx"},{"name":"OverlayProvider","sourcePath":"components/overlays/OverlayManager.jsx"},{"name":"Popconfirm","sourcePath":"components/overlays/Popconfirm.jsx"},{"name":"Popover","sourcePath":"components/overlays/Popover.jsx"},{"name":"Tour","sourcePath":"components/overlays/Tour.jsx"},{"name":"TextField","sourcePath":"components/textfield/TextField.jsx"}],"sourceHashes":{"components/_i18n/i18n.js":"ea69f4f43816","components/_i18n/strings.js":"ffedd19ed9ea","components/_utils/cx.js":"ad6a747ea116","components/_utils/field-association.js":"692c40e3e1be","components/_utils/floating-panel.js":"23239258bd82","components/_utils/floating-position.js":"b8ca0a589a5a","components/_utils/open-change.js":"7038e3bb290c","components/_utils/refs.js":"e3bc17a04584","components/_utils/renderCount.js":"bee2dce5fdd6","components/_utils/use-client-layout-effect.js":"ad9fb69fd4a4","components/_utils/use-overlay-surface.js":"3e73a204593b","components/ai/AIDisclosureBadge.jsx":"3b9d32551351","components/ai/ChatMessage.jsx":"b6fe36ea61af","components/ai/CitationList.jsx":"dc3f9e04b716","components/ai/ConfidenceMeter.jsx":"90ee1079775f","components/ai/HumanReviewGate.jsx":"0b0ce36ffa11","components/ai/PromptInput.jsx":"af962b0e65d4","components/ai/PromptSuggestions.jsx":"c4c6fca2eb27","components/ai/TypingIndicator.jsx":"a367cad65800","components/brand/LumiAvatar.jsx":"aef2a9a8be4e","components/button/Button.jsx":"198c46d2c90a","components/button/ButtonGroup.jsx":"64726fc0b33a","components/button/FloatingActionButton.jsx":"2c13907fa52c","components/data/Accordion.jsx":"2bd0ed6b7ddb","components/data/AspectRatio.jsx":"702957661817","components/data/Avatar.jsx":"9088033b5797","components/data/Card.jsx":"37a0eb43b0fd","components/data/Carousel.jsx":"21422bad1971","components/data/Chart.jsx":"04ada47476df","components/data/CodeBlock.jsx":"a0bbfb0874c1","components/data/Collapsible.jsx":"6dfb148c5938","components/data/Comment.jsx":"08be70ef2910","components/data/DescriptionList.jsx":"8aed2b747130","components/data/Divider.jsx":"28239cea9e76","components/data/Image.jsx":"7341c2593dfb","components/data/Item.jsx":"525c6e1034e5","components/data/Kbd.jsx":"f171f19f669a","components/data/List.jsx":"f33cd6ae9b7c","components/data/Masonry.jsx":"86ffb4c1e1fb","components/data/QRCode.jsx":"0df916a87ae5","components/data/ScrollArea.jsx":"2bdf99b2f7c2","components/data/Sortable.jsx":"de39e14bb065","components/data/Splitter.jsx":"dba77796d22d","components/data/Stat.jsx":"748ee679d2fc","components/data/Terminal.jsx":"0e3c5aff1c9d","components/data/Timeline.jsx":"3289633a5729","components/data/Tooltip.jsx":"092338240216","components/data/Tree.jsx":"09a331fb6048","components/data/Watermark.jsx":"1f478e37babe","components/data/qr-encode.js":"844b78fabee5","components/datatable/DataGrid.jsx":"e1c12c99dee3","components/datatable/DataTable.jsx":"2982f89295d1","components/datatable/TreeTable.jsx":"0f050c7e325b","components/dialog/Dialog.jsx":"69ea5f27ca85","components/feedback/Alert.jsx":"00beec82c17f","components/feedback/Badge.jsx":"6eeac438173e","components/feedback/EmptyState.jsx":"324d3ac33620","components/feedback/ProgressBar.jsx":"6b5e69900ba7","components/feedback/Result.jsx":"3977aaa50e38","components/feedback/Skeleton.jsx":"56b00bf55c72","components/feedback/Spinner.jsx":"dc4addb99ec3","components/feedback/StatusIndicator.jsx":"b969e7713b3e","components/feedback/Tag.jsx":"8b6415fd3811","components/feedback/Toast.jsx":"600f0efdcc28","components/forms/Calendar.jsx":"9300c818b4a4","components/forms/Cascader.jsx":"60217f041dd7","components/forms/Checkbox.jsx":"19491fd53a0a","components/forms/ColorPicker.jsx":"64da95eccfc3","components/forms/Combobox.jsx":"bae42bd62970","components/forms/DatePicker.jsx":"7a2fadb7759d","components/forms/Editor.jsx":"dcb9dd625cac","components/forms/FileUpload.jsx":"5a37afe44694","components/forms/Form.jsx":"fc33716feb9f","components/forms/InlineEdit.jsx":"45b36df70b17","components/forms/InputGroup.jsx":"0bd2e8f408f1","components/forms/InputOTP.jsx":"fe278664ea6b","components/forms/Mentions.jsx":"324a1ef9e7b9","components/forms/NativeSelect.jsx":"fc49d3ff729c","components/forms/NumberField.jsx":"f2dfbf219d37","components/forms/RadioGroup.jsx":"b72f44677071","components/forms/Rating.jsx":"3d545ce0192b","components/forms/SearchField.jsx":"44a861064011","components/forms/SegmentedControl.jsx":"acf7e576e168","components/forms/Select.jsx":"a87c83c27831","components/forms/Slider.jsx":"409856d4cdba","components/forms/Switch.jsx":"a321971bc38a","components/forms/TagInput.jsx":"775a7e229226","components/forms/Textarea.jsx":"8a7c960a4b7b","components/forms/TimePicker.jsx":"0537c564b214","components/forms/Toggle.jsx":"0527c9533072","components/forms/Transfer.jsx":"2a1c824ff9a0","components/forms/TreeSelect.jsx":"3d5d1ef69f6e","components/forms/editor-parser.js":"1306c442e12d","components/forms/editor-schema.js":"a996ec9b4b88","components/i18n/LocaleProvider.jsx":"5545f338df72","components/icon/Icon.jsx":"c1d7d63c7309","components/logo/Logo.jsx":"a4c5fe0cf5cb","components/logo/logo-data.js":"f1a251a50c8f","components/navigation/Anchor.jsx":"8907d6bfe9ae","components/navigation/BackTop.jsx":"d8ad1e190a86","components/navigation/Breadcrumb.jsx":"205de44c5157","components/navigation/CommandPalette.jsx":"4d01c61f1a03","components/navigation/Dock.jsx":"77956d94bda2","components/navigation/HotKeys.jsx":"bcdf9afdf1b9","components/navigation/Link.jsx":"d4406a6a38f0","components/navigation/Menu.jsx":"d52fc45cfca5","components/navigation/Menubar.jsx":"c53128a82420","components/navigation/NavigationMenu.jsx":"2d8e2f9cc80d","components/navigation/Pagination.jsx":"1f8c7370a149","components/navigation/Sidebar.jsx":"f2a96bdbab2d","components/navigation/Steps.jsx":"82b14258d351","components/navigation/Tabs.jsx":"551a0dc725d8","components/navigation/Toolbar.jsx":"37051ca58d60","components/overlays/AlertDialog.jsx":"4da78ce1d38a","components/overlays/ContextMenu.jsx":"31ac2665583b","components/overlays/Drawer.jsx":"4fa7fd441117","components/overlays/HoverCard.jsx":"575ff663edf9","components/overlays/OverlayManager.jsx":"32ffa7dcba29","components/overlays/Popconfirm.jsx":"53d59355a442","components/overlays/Popover.jsx":"1ca5d2905995","components/overlays/Tour.jsx":"74775e9b0740","components/textfield/TextField.jsx":"878810214bb3","tokens/tokens.js":"14a3ed18bcb8"},"inlinedExternals":[],"unexposedExports":[{"name":"associateFieldProps","sourcePath":"components/_utils/field-association.js"},{"name":"attachFocusTrap","sourcePath":"components/overlays/OverlayManager.jsx"},{"name":"cx","sourcePath":"components/_utils/cx.js"},{"name":"escapeEditorText","sourcePath":"components/forms/editor-schema.js"},{"name":"fieldAssociationContext","sourcePath":"components/_utils/field-association.js"},{"name":"fieldMessages","sourcePath":"components/_utils/field-association.js"},{"name":"floatingPlacements","sourcePath":"components/_utils/floating-position.js"},{"name":"floatingPosition","sourcePath":"components/_utils/floating-position.js"},{"name":"focusableSelector","sourcePath":"components/overlays/OverlayManager.jsx"},{"name":"formatCurrency","sourcePath":"components/_i18n/i18n.js"},{"name":"formatDate","sourcePath":"components/_i18n/i18n.js"},{"name":"formatNumber","sourcePath":"components/_i18n/i18n.js"},{"name":"getOverlayManager","sourcePath":"components/overlays/OverlayManager.jsx"},{"name":"getPath","sourcePath":"components/forms/Form.jsx"},{"name":"hasDismiss","sourcePath":"components/_utils/open-change.js"},{"name":"knownLocales","sourcePath":"components/_i18n/i18n.js"},{"name":"localeMessagesContext","sourcePath":"components/_i18n/i18n.js"},{"name":"makeT","sourcePath":"components/_i18n/i18n.js"},{"name":"mergeIds","sourcePath":"components/_utils/field-association.js"},{"name":"mergeTargetProps","sourcePath":"components/_utils/field-association.js"},{"name":"monthName","sourcePath":"components/_i18n/i18n.js"},{"name":"notifyClosed","sourcePath":"components/_utils/open-change.js"},{"name":"notifyDismiss","sourcePath":"components/_utils/open-change.js"},{"name":"overlayScopeContext","sourcePath":"components/overlays/OverlayManager.jsx"},{"name":"overlaySurfaceClass","sourcePath":"components/_utils/use-overlay-surface.js"},{"name":"parseEditorFragment","sourcePath":"components/forms/editor-parser.js"},{"name":"primaryLang","sourcePath":"components/_i18n/i18n.js"},{"name":"qrMatrix","sourcePath":"components/data/qr-encode.js"},{"name":"renderCount","sourcePath":"components/_utils/renderCount.js"},{"name":"reorderItems","sourcePath":"components/data/Sortable.jsx"},{"name":"resolveLang","sourcePath":"components/_i18n/i18n.js"},{"name":"sanitizeHtml","sourcePath":"components/forms/editor-schema.js"},{"name":"setPath","sourcePath":"components/forms/Form.jsx"},{"name":"snapshotLocaleMessages","sourcePath":"components/_i18n/i18n.js"},{"name":"strings","sourcePath":"components/_i18n/strings.js"},{"name":"tokens","sourcePath":"tokens/tokens.js"},{"name":"tr","sourcePath":"components/_i18n/i18n.js"},{"name":"useClientLayoutEffect","sourcePath":"components/_utils/use-client-layout-effect.js"},{"name":"useComposedRefs","sourcePath":"components/_utils/refs.js"},{"name":"useFieldAssociation","sourcePath":"components/_utils/field-association.js"},{"name":"useFloatingPanel","sourcePath":"components/_utils/floating-panel.js"},{"name":"useLang","sourcePath":"components/_i18n/i18n.js"},{"name":"useOverlayLayer","sourcePath":"components/overlays/OverlayManager.jsx"},{"name":"useOverlaySurface","sourcePath":"components/_utils/use-overlay-surface.js"}]} */
2
- (()=>{const __ds_ns=window.CyberSkillDesignSystem_847b3c=window.CyberSkillDesignSystem_847b3c||{};const __ds_scope={};__ds_ns.__errors=__ds_ns.__errors||[];try{(()=>{const strings={Chart:{en:{empty:"Chart with no data"},vi:{empty:"Biểu đồ chưa có dữ liệu"}},AIDisclosureBadge:{en:{label:"AI assisted",details:"This content was generated or transformed with AI assistance.",sources:"Sources"},vi:{label:"Có AI hỗ trợ",details:"Nội dung này được tạo hoặc chuyển đổi với sự hỗ trợ của AI.",sources:"Nguồn"}},CodeBlock:{en:{code:"code",copy:"Copy",copied:"Copied ✓"},vi:{code:"mã",copy:"Sao chép",copied:"Đã sao chép ✓"}},Pagination:{en:{label:"Pagination",prev:"Previous page",next:"Next page"},vi:{label:"Phân trang",prev:"Trang trước",next:"Trang sau"},ja:{label:"ページネーション",prev:"前のページ",next:"次のページ"}},Breadcrumb:{en:{label:"Breadcrumb"},vi:{label:"Đường dẫn"},ja:{label:"パンくずリスト"}},CommandPalette:{en:{placeholder:"Type a command or search…",empty:"No results",oneResult:"{count} result",results:"{count} results",aria:"Command palette",esc:"Esc"},vi:{placeholder:"Nhập lệnh hoặc tìm kiếm…",empty:"Không có kết quả",oneResult:"{count} kết quả",results:"{count} kết quả",aria:"Bảng lệnh",esc:"Esc"}},SearchField:{en:{placeholder:"Search…",clear:"Clear search"},vi:{placeholder:"Tìm kiếm…",clear:"Xóa tìm kiếm"},ja:{placeholder:"検索…",clear:"検索をクリア"}},NumberField:{en:{decrease:"Decrease",increase:"Increase",value:"Value"},vi:{decrease:"Giảm",increase:"Tăng",value:"Giá trị"}},FileUpload:{en:{title:"Drop files here or browse",hint:"PNG, JPG, or PDF up to 10MB"},vi:{title:"Kéo tệp vào đây hoặc chọn",hint:"PNG, JPG hoặc PDF, tối đa 10MB"}},Dialog:{en:{close:"Close",confirm:"Confirm",cancel:"Cancel"},vi:{close:"Đóng",confirm:"Xác nhận",cancel:"Hủy"},ja:{close:"閉じる",confirm:"確認",cancel:"キャンセル"}},AlertDialog:{en:{confirm:"Confirm",cancel:"Cancel"},vi:{confirm:"Xác nhận",cancel:"Hủy"}},Drawer:{en:{close:"Close",panel:"Side panel"},vi:{close:"Đóng",panel:"Bảng bên"}},TreeTable:{en:{empty:"No results",expand:"Expand",collapse:"Collapse"},vi:{empty:"Không có kết quả",expand:"Mở rộng",collapse:"Thu gọn"}},DataTable:{en:{empty:"No results",loading:"Loading table",error:"We couldn't load this table",errorHint:"Check your connection, then try again."},vi:{empty:"Không có kết quả",loading:"Đang tải bảng",error:"Không tải được bảng này",errorHint:"Kiểm tra kết nối, rồi thử lại."}},ConfidenceMeter:{en:{label:"Confidence",low:"Low",medium:"Medium",high:"High"},vi:{label:"Độ tin cậy",low:"Thấp",medium:"Trung bình",high:"Cao"}},Spinner:{en:{label:"Loading"},vi:{label:"Đang tải"}},Tag:{en:{remove:"Remove"},vi:{remove:"Gỡ"}},Toast:{en:{notifications:"Notifications",dismiss:"Close"},vi:{notifications:"Thông báo",dismiss:"Đóng"}},TypingIndicator:{en:{label:"Lumi is typing"},vi:{label:"Lumi đang nhập"}},Editor:{en:{toolbar:"Formatting",bold:"Bold",italic:"Italic",list:"Bullet list",area:"Rich text"},vi:{toolbar:"Định dạng",bold:"Đậm",italic:"Nghiêng",list:"Danh sách",area:"Văn bản"}},Terminal:{en:{input:"Terminal input",title:"cyberskill — zsh"},vi:{input:"Ô nhập lệnh",title:"cyberskill — zsh"}},DataGrid:{en:{empty:"No results",selectAll:"Select all rows",selectRow:"Select row",pin:"Pin this column",pinNamed:"Pin column {name}"},vi:{empty:"Không có kết quả",selectAll:"Chọn tất cả",selectRow:"Chọn dòng",pin:"Ghim cột này",pinNamed:"Ghim cột {name}"}},Splitter:{en:{label:"Resize panes"},vi:{label:"Đổi kích thước khung"}},HotKeys:{en:{title:"Keyboard shortcuts",toggle:"Toggle this sheet"},vi:{title:"Phím tắt",toggle:"Bật/tắt bảng này"}},ColorPicker:{en:{label:"Color",hex:"Hex value"},vi:{label:"Màu",hex:"Giá trị hex"}},Tour:{en:{skip:"Skip",back:"Back",next:"Next",done:"Done"},vi:{skip:"Bỏ qua",back:"Quay lại",next:"Tiếp",done:"Xong"}},TreeSelect:{en:{placeholder:"Select…"},vi:{placeholder:"Chọn…"}},Cascader:{en:{placeholder:"Select…"},vi:{placeholder:"Chọn…"}},Transfer:{en:{source:"Available",target:"Selected",toTarget:"Move to selected",toSource:"Move to available"},vi:{source:"Có sẵn",target:"Đã chọn",toTarget:"Chuyển sang đã chọn",toSource:"Chuyển về có sẵn"}},Mentions:{en:{placeholder:"Add a note — @ to mention"},vi:{placeholder:"Thêm ghi chú — gõ @ để nhắc tên"}},Sortable:{en:{moveUp:"Move up",moveDown:"Move down"},vi:{moveUp:"Di chuyển lên",moveDown:"Di chuyển xuống"}},Form:{en:{summary:"Please fix the following:",required:"required",requiredField:"Enter a value",arrayContext:"FormFieldArray must be used inside Form",addRow:"Add row",back:"Back",finish:"Finish",next:"Next",step:"Step"},vi:{summary:"Vui lòng sửa các mục sau:",required:"bắt buộc",requiredField:"Vui lòng nhập giá trị",arrayContext:"FormFieldArray phải được đặt bên trong Form",addRow:"Thêm dòng",back:"Quay lại",finish:"Hoàn tất",next:"Tiếp",step:"Bước"}},BackTop:{en:{label:"Back to top"},vi:{label:"Về đầu trang"}},Carousel:{en:{prev:"Previous slide",next:"Next slide",slide:"Slide"},vi:{prev:"Ảnh trước",next:"Ảnh sau",slide:"Ảnh"}},Comment:{en:{reply:"Reply"},vi:{reply:"Trả lời"}},Image:{en:{preview:"Preview image",close:"Close"},vi:{preview:"Xem ảnh",close:"Đóng"}},Toolbar:{en:{more:"More actions"},vi:{more:"Thao tác khác"}},Popconfirm:{en:{ok:"Confirm",cancel:"Cancel"},vi:{ok:"Xác nhận",cancel:"Hủy"}},Result:{en:{success:"Done",error:"We couldn't complete that",warning:"Please check",info:"Here's what happened"},vi:{success:"Hoàn tất",error:"Chưa thực hiện được thao tác này",warning:"Vui lòng kiểm tra",info:"Thông tin chi tiết"}},InlineEdit:{en:{edit:"Edit",empty:"Add text"},vi:{edit:"Sửa",empty:"Thêm nội dung"}},Calendar:{en:{prev:"Previous month",next:"Next month"},vi:{prev:"Tháng trước",next:"Tháng sau"},ja:{prev:"前の月",next:"次の月"}},DatePicker:{en:{placeholder:"Select a date"},vi:{placeholder:"Chọn ngày"}},TimePicker:{en:{label:"Time"},vi:{label:"Giờ"}},Combobox:{en:{placeholder:"Select or type…",label:"Choose an option",empty:"No results"},vi:{placeholder:"Chọn hoặc nhập…",label:"Chọn mục",empty:"Không có kết quả"}},InputGroup:{en:{clear:"Clear",show:"Show password",hide:"Hide password",input:"Input"},vi:{clear:"Xóa",show:"Hiện mật khẩu",hide:"Ẩn mật khẩu",input:"Ô nhập"}},TagInput:{en:{placeholder:"Add a tag…",remove:"Remove"},vi:{placeholder:"Thêm thẻ…",remove:"Gỡ"}},Rating:{en:{label:"Rating"},vi:{label:"Đánh giá"}},InputOTP:{en:{label:"One-time code"},vi:{label:"Mã dùng một lần"}},PromptInput:{en:{placeholder:"Type your wish…",send:"Send",hint:"Lumi replies, then hands clear wishes to a human."},vi:{placeholder:"Nhập điều ước của bạn…",send:"Gửi",hint:"Lumi phản hồi trước, rồi chuyển điều ước rõ ràng đến đội ngũ."}},HumanReviewGate:{en:{aria:"Human review gate",risk:"review required",approve:"Approve",reject:"Reject",reviewer:"Reviewer"},vi:{aria:"Bước duyệt của người phụ trách",risk:"cần xem xét",approve:"Phê duyệt",reject:"Từ chối",reviewer:"Người duyệt"}},Switch:{en:{label:"Setting"},vi:{label:"Cài đặt"}},Tabs:{en:{list:"Tabs"},vi:{list:"Tab"}},EmptyState:{en:{title:"Nothing here yet",action:"Create your first item"},vi:{title:"Chưa có gì ở đây",action:"Tạo mục đầu tiên"}},Alert:{en:{dismiss:"Close"},vi:{dismiss:"Đóng"}},Select:{en:{placeholder:"Select…"},vi:{placeholder:"Chọn…"}},Slider:{en:{label:"Slider"},vi:{label:"Thanh trượt"}},Steps:{en:{label:"Steps"},vi:{label:"Các bước"}},Toggle:{en:{label:"Toggle"},vi:{label:"Nút bật tắt"}},Menu:{en:{menu:"Menu"},vi:{menu:"Trình đơn"}},Popover:{en:{panel:"Details"},vi:{panel:"Chi tiết"}},Menubar:{en:{label:"Application menu"},vi:{label:"Trình đơn ứng dụng"}},ContextMenu:{en:{menu:"Context menu"},vi:{menu:"Trình đơn ngữ cảnh"}},Tooltip:{en:{label:"Tooltip"},vi:{label:"Chú thích"}},CitationList:{en:{sources:"Sources"},vi:{sources:"Nguồn"}},ProgressBar:{en:{label:"Progress"},vi:{label:"Tiến độ"}},ChatMessage:{en:{you:"You"},vi:{you:"Bạn"}}};for(const namespace of Object.values(strings)){for(const table of Object.values(namespace))Object.freeze(table);Object.freeze(namespace)}Object.freeze(strings);Object.assign(__ds_scope,{strings})})()}catch(e){__ds_ns.__errors.push({path:"components/_i18n/strings.js",error:String(e&&e.message||e)})}try{(()=>{function cx(...c){return c.filter(Boolean).join(" ")}Object.assign(__ds_scope,{cx})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/cx.js",error:String(e&&e.message||e)})}try{(()=>{let FieldContext;function fieldAssociationContext(){if(!FieldContext)FieldContext=React.createContext(null);return FieldContext}function mergeIds(...values){return[...new Set(values.filter(Boolean).flatMap(value=>String(value).trim().split(/\s+/)).filter(Boolean))].join(" ")||void 0}function associateFieldProps(props,field,{id,fallbackLabel,requiredSupported=false,nativeRequired=false}={}){const explicitLabel=typeof props["aria-label"]==="string"&&props["aria-label"].trim()?props["aria-label"]:void 0;const labelledBy=mergeIds(props["aria-labelledby"])||(!explicitLabel?field?.labelId:void 0);const result={...props,id:props.id??id??field?.controlId,"aria-labelledby":labelledBy,"aria-label":explicitLabel??(labelledBy?void 0:fallbackLabel),"aria-describedby":mergeIds(props["aria-describedby"],field?.descriptionId,field?.errorId),"aria-invalid":field?.invalid?true:props["aria-invalid"]};if(requiredSupported)result["aria-required"]=field?.required?true:props["aria-required"];if(nativeRequired)result.required=field?.required?true:props.required;return result}function useFieldAssociation(props={},options={}){const field=React.useContext(fieldAssociationContext());const generated=React.useId();const id=props.id??options.id??generated;const hasError=Boolean(options.error)||options.error===0;const hasDescription=Boolean(options.description)||options.description===0;const result=associateFieldProps(props,field,{...options,id});result["aria-describedby"]=mergeIds(result["aria-describedby"],hasDescription?id+"-description":void 0,hasError?id+"-error":void 0,options.requiredDescription?id+"-required":void 0);if(hasError)result["aria-invalid"]=true;if(options.requiredSupported&&options.required)result["aria-required"]=true;if(options.nativeRequired&&options.required)result.required=true;return result}function fieldMessages(control,description,error,requiredDescription){const hasError=Boolean(error)||error===0;const hasDescription=Boolean(description)||description===0;return React.createElement(React.Fragment,null,requiredDescription?React.createElement("span",{id:control.id+"-required",style:{position:"absolute",width:1,height:1,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap"}},requiredDescription):null,hasDescription?React.createElement("span",{id:control.id+"-description",className:"cs-field__description"},description):null,hasError?React.createElement("span",{id:control.id+"-error",className:"cs-field__error",role:"alert"},error):null)}function mergeTargetProps(base={},extra={},protectedKeys=[]){const denied=new Set(["__proto__","constructor","prototype","ref","key","children","dangerouslySetInnerHTML",...protectedKeys]);const result={...base};for(const[key,value]of Object.entries(extra||{})){if(denied.has(key)||value===void 0)continue;if(key==="className")result.className=[base.className,value].filter(Boolean).join(" ");else if(key==="style")result.style={...base.style,...value};else if(/^on[A-Z]/.test(key)&&typeof base[key]==="function"){if(typeof value==="function")result[key]=(...args)=>{base[key](...args);value(...args)}}else result[key]=value}return result}Object.assign(__ds_scope,{fieldAssociationContext,mergeIds,associateFieldProps,useFieldAssociation,fieldMessages,mergeTargetProps})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/field-association.js",error:String(e&&e.message||e)})}try{(()=>{const floatingPlacements=Object.freeze(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"]);const placements=new Set(floatingPlacements);const clamp=(value,start,end)=>Math.max(start,Math.min(value,Math.max(start,end)));function floatingPosition(anchor,panel,viewport,placement="bottom-start",gap=8,direction="ltr"){if(!placements.has(placement))throw new TypeError("Unsupported floating placement: "+placement);const[preferred,alignment]=placement.split("-");const opposite={top:"bottom",bottom:"top",left:"right",right:"left"};const available={top:anchor.top-viewport.top-gap,bottom:viewport.bottom-anchor.bottom-gap,left:anchor.left-viewport.left-gap,right:viewport.right-anchor.right-gap};const dimension=preferred==="top"||preferred==="bottom"?panel.height:panel.width;const side=dimension>available[preferred]&&available[opposite[preferred]]>available[preferred]?opposite[preferred]:preferred;const vertical=side==="top"||side==="bottom";const align=vertical&&direction==="rtl"?alignment==="start"?"end":alignment==="end"?"start":void 0:alignment;let left=vertical?align==="start"?anchor.left:align==="end"?anchor.right-panel.width:anchor.left+(anchor.width-panel.width)/2:side==="left"?anchor.left-gap-panel.width:anchor.right+gap;let top=vertical?side==="top"?anchor.top-gap-panel.height:anchor.bottom+gap:align==="start"?anchor.top:align==="end"?anchor.bottom-panel.height:anchor.top+(anchor.height-panel.height)/2;left=clamp(left,viewport.left,viewport.right-panel.width);top=clamp(top,viewport.top,viewport.bottom-panel.height);return{left,top,placement:side+(alignment?"-"+alignment:""),maxWidth:Math.max(0,vertical?viewport.right-viewport.left:available[side]),maxHeight:Math.max(0,vertical?available[side]:viewport.bottom-viewport.top)}}Object.assign(__ds_scope,{floatingPlacements,floatingPosition})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/floating-position.js",error:String(e&&e.message||e)})}try{(()=>{function hasDismiss(onOpenChange,onClose,onDismiss){return typeof onOpenChange==="function"||typeof onClose==="function"||typeof onDismiss==="function"}function notifyClosed(onOpenChange,onClose){onOpenChange?.(false);onClose?.()}function notifyDismiss(event,onOpenChange,onClose,onDismiss){onOpenChange?.(false);onClose?.();onDismiss?.(event)}Object.assign(__ds_scope,{hasDismiss,notifyClosed,notifyDismiss})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/open-change.js",error:String(e&&e.message||e)})}try{(()=>{function assignRef(ref,node){if(typeof ref==="function")return ref(node);if(ref&&typeof ref==="object"&&"current"in ref){ref.current=node;return}throw new TypeError("A native ref must be a callback or an object with current")}function useComposedRefs(...refs){return React.useMemo(()=>{const unique=[...new Set(refs.filter(ref=>ref!=null))];if(!unique.length)return void 0;const cleanupSupported=Number.parseInt(React.version,10)>=19;return node=>{if(node==null){unique.forEach(ref=>assignRef(ref,null));return}const cleanups=unique.map(ref=>assignRef(ref,node));if(!cleanupSupported)return;return()=>{let failure;unique.forEach((ref,index)=>{try{if(typeof cleanups[index]==="function")cleanups[index]();else assignRef(ref,null)}catch(error){failure??(failure=error)}});if(failure)throw failure}}},refs)}Object.assign(__ds_scope,{useComposedRefs})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/refs.js",error:String(e&&e.message||e)})}try{(()=>{function renderCount(value,fallback,minimum=0){if(!Number.isFinite(value)||value>=2**32)return fallback;return Math.max(minimum,Math.trunc(value))}Object.assign(__ds_scope,{renderCount})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/renderCount.js",error:String(e&&e.message||e)})}try{(()=>{const useClientLayoutEffect=typeof document==="undefined"?React.useEffect:React.useLayoutEffect;Object.assign(__ds_scope,{useClientLayoutEffect})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/use-client-layout-effect.js",error:String(e&&e.message||e)})}try{(()=>{const{useClientLayoutEffect}=__ds_scope;const{strings:STRINGS}=__ds_scope;const knownLocales=Object.freeze(["vi","en","ja"]);function primaryLang(tag){if(tag==null)return null;const raw=String(tag).trim();if(!raw)return null;const lower=raw.toLowerCase().replace(/_/g,"-");if(lower==="tiếng việt"||lower==="tieng viet")return"vi";if(lower==="english")return"en";if(lower==="日本語"||lower==="japanese")return"ja";const primary=lower.split("-")[0];return primary||null}function resolveLang(propLang,el){let l=primaryLang(propLang);if(!l&&el&&el.closest){const a=el.closest("[lang]");if(a)l=primaryLang(a.getAttribute("lang"))}if(!l&&typeof document!=="undefined"){l=primaryLang(document.documentElement.getAttribute("lang"))}return l||"vi"}const forbiddenMessageKeys=new Set(["__proto__","prototype","constructor"]);let MessageContext;function localeMessagesContext(){if(!MessageContext)MessageContext=React.createContext(null);return MessageContext}function messageEntries(value,label){if(!value||typeof value!=="object"||Array.isArray(value)||![Object.prototype,null].includes(Object.getPrototypeOf(value)))throw new TypeError(label+" must be a plain message record");return Reflect.ownKeys(value).map(key=>{if(typeof key!=="string"||!key.trim()||forbiddenMessageKeys.has(key))throw new TypeError("Unsafe message key");const descriptor=Object.getOwnPropertyDescriptor(value,key);if(!descriptor||!Object.prototype.hasOwnProperty.call(descriptor,"value"))throw new TypeError("Message accessors are not supported");return[key,descriptor.value]})}function snapshotLocaleMessages(messages){const result=Object.create(null);for(const[namespace,locales]of messageEntries(messages,"messages")){const normalized=Object.create(null);for(const[tag,values]of messageEntries(locales,namespace)){const locale=primaryLang(tag);if(!locale||forbiddenMessageKeys.has(locale))throw new TypeError("Unsafe message locale");if(Object.prototype.hasOwnProperty.call(normalized,locale))throw new TypeError("Message locale aliases collide in "+namespace+": "+locale);const table=Object.create(null);for(const[key,value]of messageEntries(values,namespace+"."+tag)){if(typeof value!=="string")throw new TypeError("Messages must be strings");table[key]=value}normalized[locale]=Object.freeze(table)}result[namespace]=Object.freeze(normalized)}return Object.freeze(result)}function tr(component,key,lang,messages=null){const c=Object.prototype.hasOwnProperty.call(STRINGS,component)?STRINGS[component]:{};const want=primaryLang(lang)||"vi";for(const locale of new Set([want,"en","vi"])){for(let layer=messages;layer;layer=layer.parent){const table2=layer.messages[component]?.[locale];if(table2&&Object.prototype.hasOwnProperty.call(table2,key))return table2[key]}const table=c[locale];if(table&&Object.prototype.hasOwnProperty.call(table,key)&&table[key]!=null)return table[key]}return key}function makeT(component,lang,messages=null){return key=>tr(component,key,lang,messages)}function useLang(propLang){const messages=React.useContext(localeMessagesContext());const ref=React.useRef(null);const binding=React.useRef(null);const[lang,setLang]=React.useState(()=>resolveLang(propLang,null));useClientLayoutEffect(()=>{const el=ref.current;setLang(resolveLang(propLang,el));const ancestors=[];for(let node=el;node;node=node.parentElement)ancestors.push(node);const previous=binding.current;if(previous&&previous.propLang===propLang&&previous.ancestors.length===ancestors.length&&previous.ancestors.every((node,i)=>node===ancestors[i]))return;previous?.observer?.disconnect();binding.current={propLang,ancestors,observer:null};if(!el||primaryLang(propLang))return;const obs=new MutationObserver(()=>setLang(resolveLang(propLang,el)));for(const node of ancestors){obs.observe(node,{attributes:true,attributeFilter:["lang"]})}binding.current.observer=obs});useClientLayoutEffect(()=>()=>{binding.current?.observer?.disconnect();binding.current=null},[]);return[ref,lang,messages]}const VI_MONTHS=["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"];function formatDate(d,lang){const dt=d instanceof Date?d:new Date(d);if(isNaN(dt.getTime()))return"";const L=primaryLang(lang)||"vi";if(L==="vi"){const p=n=>String(n).padStart(2,"0");return p(dt.getDate())+"/"+p(dt.getMonth()+1)+"/"+dt.getFullYear()}if(L==="ja"){return dt.toLocaleDateString("ja-JP",{year:"numeric",month:"2-digit",day:"2-digit"})}return dt.toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}function monthName(i,lang){const L=primaryLang(lang)||"vi";if(L==="vi")return VI_MONTHS[i];if(L==="ja")return new Date(2e3,i,1).toLocaleDateString("ja-JP",{month:"long"});return new Date(2e3,i,1).toLocaleDateString("en-US",{month:"long"})}function formatNumber(n,lang){if(n==null||isNaN(n))return"";const L=primaryLang(lang)||"vi";const locale=L==="vi"?"vi-VN":L==="ja"?"ja-JP":"en-US";return new Intl.NumberFormat(locale).format(n)}function formatCurrency(n,langOrOpts){if(n==null||isNaN(n))return"";const opts=langOrOpts&&typeof langOrOpts==="object"?langOrOpts:null;if(opts&&opts.currency){let locale=opts.locale;if(!locale){const L2=primaryLang(opts.lang)||"en";locale=L2==="vi"?"vi-VN":L2==="ja"?"ja-JP":"en-US"}return new Intl.NumberFormat(locale,{style:"currency",currency:String(opts.currency).toUpperCase(),currencyDisplay:"symbol"}).format(Number(n))}const lang=typeof langOrOpts==="string"?langOrOpts:opts&&opts.lang||"en";const L=primaryLang(lang)||"en";return L==="vi"?new Intl.NumberFormat("vi-VN").format(n)+" ₫":"$"+new Intl.NumberFormat("en-US").format(n)}Object.assign(__ds_scope,{knownLocales,primaryLang,resolveLang,localeMessagesContext,snapshotLocaleMessages,tr,makeT,useLang,formatDate,monthName,formatNumber,formatCurrency})})()}catch(e){__ds_ns.__errors.push({path:"components/_i18n/i18n.js",error:String(e&&e.message||e)})}try{(()=>{const{useClientLayoutEffect}=__ds_scope;function overlaySurfaceClass(className){const classes=new Set(String(className||"").split(/\s+/));return["cs-surface-matte","cs-surface-solid","cs-surface-heavy","cs-surface-standard","cs-glass-card","cs-surface-light","cs-surface-whisper"].find(name=>classes.has(name))||""}function useOverlaySurface(open,panelRef,material){const surfaceRef=React.useRef(null);useClientLayoutEffect(()=>{const panel=panelRef.current,surface=surfaceRef.current;if(!open||!material||!panel||!surface)return void 0;panel.setAttribute("data-cs-overlay-surface-ready","");let frame=0,disposed=false;const update=()=>{if(disposed)return;const css=getComputedStyle(panel),rect=panel.getBoundingClientRect();for(const name of css)if(name.startsWith("--cs-"))surface.style.setProperty(name,css.getPropertyValue(name));surface.style.position=css.position==="fixed"?"fixed":"absolute";const parent=surface.offsetParent;const origin=surface.style.position==="absolute"&&parent?parent.getBoundingClientRect():{left:0,top:0};surface.style.left=`${rect.left-origin.left-(parent?.clientLeft||0)+(parent?.scrollLeft||0)}px`;surface.style.top=`${rect.top-origin.top-(parent?.clientTop||0)+(parent?.scrollTop||0)}px`;surface.style.width=`${rect.width}px`;surface.style.height=`${rect.height}px`;surface.style.borderRadius=css.borderRadius;surface.style.zIndex=css.zIndex;surface.style.opacity=css.opacity;if(panel.getAnimations().some(animation=>animation.playState==="running")&&!frame)frame=requestAnimationFrame(()=>{frame=0;update()})};update();const resize=new ResizeObserver(update);resize.observe(panel);const mutation=new MutationObserver(update);for(let ancestor=panel;ancestor;ancestor=ancestor.parentElement)mutation.observe(ancestor,{attributes:true});const preferences=["prefers-color-scheme: dark","prefers-reduced-transparency: reduce","forced-colors: active","prefers-contrast: more"].map(query=>matchMedia(`(${query})`));for(const preference of preferences)preference.addEventListener("change",update);window.addEventListener("resize",update);return()=>{disposed=true;cancelAnimationFrame(frame);resize.disconnect();mutation.disconnect();for(const preference of preferences)preference.removeEventListener("change",update);window.removeEventListener("resize",update);panel.removeAttribute("data-cs-overlay-surface-ready")}},[open,panelRef,material]);return surfaceRef}Object.assign(__ds_scope,{overlaySurfaceClass,useOverlaySurface})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/use-overlay-surface.js",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const ChatMessage=React.forwardRef(function ChatMessage2({role="lumi",name,avatar,lang,className,children,rootProps},forwardedRef){const isUser=role==="user";const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("ChatMessage",L,localeMessages);const you=t("you");const defaultAvatar=isUser?React.createElement("span",{"aria-hidden":"true"},you):React.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M12 3l1.8 5.4L19 10l-5.2 1.6L12 17l-1.8-5.4L5 10l5.2-1.6z"}));return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-chat-msg",isUser?"cs-chat-msg--user":"cs-chat-msg--lumi",className)},rootProps,[])},React.createElement("div",{className:"cs-chat-msg__avatar"},avatar??defaultAvatar),React.createElement("div",{className:"cs-chat-msg__col"},React.createElement("div",{className:"cs-chat-msg__name"},name??(isUser?you:"Lumi")),React.createElement("div",{className:"cs-chat-msg__bubble"},children)))});ChatMessage.displayName="ChatMessage";Object.assign(__ds_scope,{ChatMessage})})()}catch(e){__ds_ns.__errors.push({path:"components/ai/ChatMessage.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const{makeT,useLang}=__ds_scope;const CitationList=React.forwardRef(function CitationList2({label,items=[],lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const heading=label!==void 0?label:makeT("CitationList",L,localeMessages)("sources");return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-citations",className)},rootProps,[])},heading||heading===0?React.createElement("div",{className:"cs-citations__label"},heading):null,items.map((it,i)=>{const inner=React.createElement(React.Fragment,null,React.createElement("span",{className:"cs-citation__num"},i+1),React.createElement("span",{className:"cs-citation__text"},it.title,it.source||it.source===0?React.createElement("span",{className:"cs-citation__src"}," · ",it.source):null));return it.href?React.createElement("a",{key:i,className:"cs-citation",href:it.href,target:"_blank",rel:"noreferrer"},inner):React.createElement("div",{key:i,className:"cs-citation"},inner)}))});CitationList.displayName="CitationList";Object.assign(__ds_scope,{CitationList})})()}catch(e){__ds_ns.__errors.push({path:"components/ai/CitationList.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{renderCount}=__ds_scope;const TONE={low:{color:"var(--cs-color-semantic-danger)",textColor:"var(--cs-color-semantic-danger-text)",label:"Low",fill:2},medium:{color:"var(--cs-color-semantic-warning)",textColor:"var(--cs-color-semantic-warning-text)",label:"Medium",fill:3},high:{color:"var(--cs-color-semantic-success)",textColor:"var(--cs-color-semantic-success-text)",label:"High",fill:5}};const ConfidenceMeter=React.forwardRef(function ConfidenceMeter2({value,level,segments=5,label,lang,className,rootProps},forwardedRef){let tone,filled;const segs=renderCount(Number(segments)||5,5,1);if(value!=null){const v=Math.max(0,Math.min(1,Number(value)||0));tone=v<.4?"low":v<.75?"medium":"high";filled=Math.max(0,Math.min(segs,Math.round(v*segs)))}else{tone=TONE[level]?level:"medium";filled=Math.max(0,Math.min(segs,Math.round(TONE[tone].fill/5*segs)))}const meta=TONE[tone];const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const nameId=React.useId();const t=makeT("ConfidenceMeter",L,localeMessages);const lbl=label!=null?label:t("label");const levelText=t(tone);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-confidence",className)},rootProps,[])},React.createElement("div",{className:"cs-confidence__head"},React.createElement("span",{id:nameId+"-label"},lbl),React.createElement("span",{id:nameId+"-level",className:"cs-confidence__level",style:{color:meta.textColor}},levelText)),React.createElement("div",{className:"cs-confidence__track",role:"meter","aria-valuemin":0,"aria-valuemax":segs,"aria-valuenow":filled,"aria-labelledby":nameId+"-label "+nameId+"-level"},Array.from({length:segs}).map((_,i)=>React.createElement("span",{key:i,className:"cs-confidence__seg",style:i<filled?{background:meta.color}:void 0}))))});ConfidenceMeter.displayName="ConfidenceMeter";Object.assign(__ds_scope,{ConfidenceMeter})})()}catch(e){__ds_ns.__errors.push({path:"components/ai/ConfidenceMeter.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const HumanReviewGate=React.forwardRef(function HumanReviewGate2({risk,summary,reviewer,onApprove,onReject,approveLabel,rejectLabel,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("HumanReviewGate",L,localeMessages);const rk=risk!=null?risk:t("risk");const al=approveLabel!=null?approveLabel:t("approve");const rl=rejectLabel!=null?rejectLabel:t("reject");return React.createElement("section",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-review-gate",className)},rootProps,["aria-label"]),"aria-label":t("aria")},React.createElement("div",{className:"cs-review-gate__risk"},rk),React.createElement("p",{className:"cs-review-gate__summary"},summary),reviewer||reviewer===0?React.createElement("p",{className:"cs-review-gate__reviewer"},t("reviewer"),": ",reviewer):null,React.createElement("div",{className:"cs-review-gate__actions"},React.createElement("button",{type:"button",className:"cs-button cs-button--secondary",onClick:onReject},rl),React.createElement("button",{type:"button",className:"cs-button cs-button--primary",onClick:onApprove},al)))});HumanReviewGate.displayName="HumanReviewGate";Object.assign(__ds_scope,{HumanReviewGate})})()}catch(e){__ds_ns.__errors.push({path:"components/ai/HumanReviewGate.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const PromptInput=React.forwardRef(function PromptInput2({controlRef,value,onChange,onSubmit,placeholder,sendLabel,hint,lang,disabled=false,busy=false,className,"aria-label":ariaLabel,rootProps},forwardedRef){const mergedControlRef=useComposedRefs(controlRef);const[inner,setInner]=React.useState("");const val=value!=null?value:inner;const setVal=v=>{if(value==null)setInner(v);onChange?.(v)};const submit=()=>{if(!disabled&&!busy&&String(val).trim())onSubmit&&onSubmit(val)};const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("PromptInput",L,localeMessages);const ph=placeholder!=null?placeholder:t("placeholder");const sl=sendLabel!=null?sendLabel:t("send");const ht=hint!==void 0?hint:t("hint");return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-prompt",className)},rootProps,[])},React.createElement("textarea",{className:"cs-prompt__field",rows:1,value:val,placeholder:ph,"aria-label":ariaLabel||ph,disabled,onChange:e=>setVal(e.target.value),onKeyDown:e=>{if(e.key==="Enter"&&!e.shiftKey&&!e.nativeEvent.isComposing&&e.keyCode!==229){e.preventDefault();submit()}},ref:mergedControlRef}),React.createElement("div",{className:"cs-prompt__bar"},ht||ht===0?React.createElement("span",{className:"cs-prompt__hint"},React.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M12 3l1.8 5.4L19 10l-5.2 1.6L12 17l-1.8-5.4L5 10l5.2-1.6z"})),ht):null,React.createElement("button",{type:"button",className:"cs-button cs-button--primary cs-button--sm",onClick:submit,disabled:disabled||busy},busy?React.createElement("span",{className:"cs-button__spinner","aria-hidden":"true"}):null,sl)))});PromptInput.displayName="PromptInput";Object.assign(__ds_scope,{PromptInput})})()}catch(e){__ds_ns.__errors.push({path:"components/ai/PromptInput.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const PromptSuggestions=React.forwardRef(function PromptSuggestions2({suggestions=[],onSelect,className,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{...mergeTargetProps({"className":cx("cs-suggest",className)},rootProps,[]),ref:mergedNativeRef},suggestions.map((s,i)=>{const label=typeof s==="string"?s:s.label;const icon=typeof s==="string"?null:s.icon;return React.createElement("button",{key:i,type:"button",onClick:()=>onSelect&&onSelect(label)},icon??React.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M12 3l1.8 5.4L19 10l-5.2 1.6L12 17l-1.8-5.4L5 10l5.2-1.6z"})),label)}))});PromptSuggestions.displayName="PromptSuggestions";Object.assign(__ds_scope,{PromptSuggestions})})()}catch(e){__ds_ns.__errors.push({path:"components/ai/PromptSuggestions.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const TypingIndicator=React.forwardRef(function TypingIndicator2({label,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const lbl=label!=null?label:makeT("TypingIndicator",L,localeMessages)("label");return React.createElement("span",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-typing",className)},rootProps,["role","aria-label"]),role:"status","aria-label":lbl},React.createElement("span",null),React.createElement("span",null),React.createElement("span",null))});TypingIndicator.displayName="TypingIndicator";Object.assign(__ds_scope,{TypingIndicator})})()}catch(e){__ds_ns.__errors.push({path:"components/ai/TypingIndicator.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const LumiAvatar=React.forwardRef(function LumiAvatar2({src,size="md",ring=false,alt="Lumi",className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("span",{className:cx("cs-lumi",`cs-lumi--${size}`,ring&&"cs-lumi--ring",className),role:!src&&alt?"img":void 0,"aria-label":!src&&alt?alt:void 0,...props,ref:mergedNativeRef},src?React.createElement("img",{src,alt}):React.createElement("span",{"aria-hidden":"true"},"✦"))});LumiAvatar.displayName="LumiAvatar";Object.assign(__ds_scope,{LumiAvatar})})()}catch(e){__ds_ns.__errors.push({path:"components/brand/LumiAvatar.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Button=React.forwardRef(function Button2({variant="primary",size="md",loading=false,disabled=false,fullWidth=false,icon,children,className,type="button",...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const isDisabled=disabled||loading;return React.createElement("button",{...props,type,disabled:isDisabled,"aria-busy":loading||void 0,className:cx("cs-button",`cs-button--${variant}`,`cs-button--${size}`,fullWidth&&"cs-button--full",isDisabled&&"is-disabled",loading&&"is-loading",className),ref:mergedNativeRef},icon||icon===0?React.createElement("span",{className:"cs-button__icon","aria-hidden":"true"},icon):null,React.createElement("span",{className:"cs-button__label"},children),loading?React.createElement("span",{className:"cs-button__spinner","aria-hidden":"true"}):null)});Button.displayName="Button";Object.assign(__ds_scope,{Button})})()}catch(e){__ds_ns.__errors.push({path:"components/button/Button.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const ButtonGroup=React.forwardRef(function ButtonGroup2({children,label,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{className:cx("cs-btngroup",className),role:"group","aria-label":label,...props,ref:mergedNativeRef},children)});ButtonGroup.displayName="ButtonGroup";Object.assign(__ds_scope,{ButtonGroup})})()}catch(e){__ds_ns.__errors.push({path:"components/button/ButtonGroup.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const Accordion=React.forwardRef(function Accordion2({items=[],defaultOpen=0,allowMultiple=false,className,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const id=React.useId();const[open,setOpen]=React.useState(()=>defaultOpen!=null&&defaultOpen>=0?[defaultOpen]:[]);React.useEffect(()=>{if(!allowMultiple)setOpen(current=>current.length>1?current.slice(0,1):current)},[allowMultiple]);const isOpen=i=>allowMultiple?open.includes(i):open[0]===i;const toggle=i=>{if(allowMultiple)setOpen(o=>o.includes(i)?o.filter(x=>x!==i):[...o,i]);else setOpen(o=>o[0]===i?[]:[i])};return React.createElement("div",{...mergeTargetProps({"className":cx("cs-accordion",className)},rootProps,[]),ref:mergedNativeRef},items.map((it,i)=>React.createElement("div",{className:"cs-accordion__item",key:i},React.createElement("h3",{style:{margin:0,font:"inherit"}},React.createElement("button",{id:`${id}-trigger-${i}`,type:"button",className:"cs-accordion__trigger","aria-expanded":isOpen(i),"aria-controls":isOpen(i)?`${id}-panel-${i}`:void 0,onClick:()=>toggle(i)},it.title,React.createElement("span",{className:"cs-accordion__chevron","aria-hidden":"true"},React.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React.createElement("path",{d:"M6 9l6 6 6-6"}))))),isOpen(i)?React.createElement("div",{id:`${id}-panel-${i}`,"aria-labelledby":`${id}-trigger-${i}`,className:"cs-accordion__panel"},it.content):null)))});Accordion.displayName="Accordion";Object.assign(__ds_scope,{Accordion})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Accordion.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const AspectRatio=React.forwardRef(function AspectRatio2({ratio="16 / 9",children,className,style,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const ar=typeof ratio==="number"?String(ratio):ratio;return React.createElement("div",{className:cx("cs-aspect-ratio",className),style:{...style||{},aspectRatio:ar},...props,ref:mergedNativeRef},children)});AspectRatio.displayName="AspectRatio";Object.assign(__ds_scope,{AspectRatio})})()}catch(e){__ds_ns.__errors.push({path:"components/data/AspectRatio.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const Avatar=React.forwardRef(function Avatar2({src,name="",size="md",square=false,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const initials=name?name.trim().split(/\s+/).map(w=>w[0]).slice(0,2).join("").toUpperCase():"";return React.createElement("span",{className:cx("cs-avatar",`cs-avatar--${size}`,square&&"cs-avatar--square",className),role:!src&&name?"img":void 0,"aria-label":!src&&name?name:void 0,title:name||void 0,...props,ref:mergedNativeRef},src?React.createElement("img",{src,alt:name}):React.createElement("span",{"aria-hidden":"true"},initials))});Avatar.displayName="Avatar";const AvatarGroup=React.forwardRef(function AvatarGroup2({className,children,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{...mergeTargetProps({"className":cx("cs-avatar-group",className)},rootProps,[]),ref:mergedNativeRef},children)});AvatarGroup.displayName="AvatarGroup";Object.assign(__ds_scope,{Avatar,AvatarGroup})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Avatar.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Card=React.forwardRef(function Card2({interactive=false,flat=false,as,className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const Tag=as||(interactive?"button":"div");return React.createElement(Tag,{type:Tag==="button"?"button":void 0,className:cx("cs-card",flat&&"cs-card--flat",interactive&&"cs-card--interactive",className),...props,ref:mergedNativeRef},children)});Card.displayName="Card";const CardHeader=React.forwardRef(function CardHeader2({title,subtitle,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{className:cx("cs-card__header",className),...props,ref:mergedNativeRef},title||title===0?React.createElement("h3",{className:"cs-card__title"},title):null,subtitle||subtitle===0?React.createElement("p",{className:"cs-card__subtitle"},subtitle):null,children)});CardHeader.displayName="CardHeader";const CardBody=React.forwardRef(function CardBody2({className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{className:cx("cs-card__body",className),...props,ref:mergedNativeRef},children)});CardBody.displayName="CardBody";const CardFooter=React.forwardRef(function CardFooter2({className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{className:cx("cs-card__footer",className),...props,ref:mergedNativeRef},children)});CardFooter.displayName="CardFooter";Object.assign(__ds_scope,{Card,CardHeader,CardBody,CardFooter})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Card.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Carousel=React.forwardRef(function Carousel2({children,startIndex=0,label,lang,className,rootProps},forwardedRef){const slides=React.Children.toArray(children);const clampIndex=n=>Math.max(0,Math.min(Number.isFinite(n)?Math.trunc(n):0,slides.length-1));const[i,setI]=React.useState(()=>clampIndex(startIndex));const active=clampIndex(i);if(i!==active)setI(active);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Carousel",L,localeMessages);const go=n=>{if(slides.length)setI((n+slides.length)%slides.length)};return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-carousel",className)},rootProps,["role","aria-roledescription","aria-label"]),role:"group","aria-roledescription":"carousel","aria-label":label},React.createElement("div",{className:"cs-carousel__view"},React.createElement("div",{className:"cs-carousel__window"},React.createElement("div",{className:"cs-carousel__track",style:{transform:"translateX(-"+active*100+"%)"}},slides.map((s,j)=>React.createElement("div",{key:j,className:"cs-carousel__slide",role:"group","aria-roledescription":"slide","aria-label":`${t("slide")} ${j+1}/${slides.length}`,"aria-hidden":j!==active,ref:el=>{if(el)el.inert=j!==active}},s)))),React.createElement("button",{type:"button",className:"cs-carousel__nav prev","aria-label":t("prev"),disabled:slides.length<2,onClick:()=>go(active-1)},"‹"),React.createElement("button",{type:"button",className:"cs-carousel__nav next","aria-label":t("next"),disabled:slides.length<2,onClick:()=>go(active+1)},"›")),React.createElement("div",{className:"cs-sr-only",role:"status","aria-live":"polite","aria-atomic":"true"},slides.length?`${t("slide")} ${active+1}/${slides.length}`:""),React.createElement("div",{className:"cs-carousel__dots"},slides.map((_,j)=>React.createElement("button",{key:j,type:"button","aria-label":t("slide")+" "+(j+1)+"/"+slides.length,"aria-current":j===active,onClick:()=>setI(j)}))))});Carousel.displayName="Carousel";Object.assign(__ds_scope,{Carousel})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Carousel.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Chart=React.forwardRef(function Chart2({type="bar",data=[],height=160,color="var(--cs-accent)",showValues=false,label,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const dataName=data.map(d=>d.label+": "+d.value).join(", ");const accessibleName=typeof label==="string"&&label.trim()?label:dataName||makeT("Chart",L,localeMessages)("empty");const W=320,H=height,max=Math.max(1,...data.map(d=>d.value));let body=null;if(type==="pie"){const total=data.reduce((a,d)=>a+d.value,0)||1;const cols=[color,"var(--cs-accent-strong)","var(--cs-accent-grad-b)","var(--cs-color-text-muted)","var(--cs-color-border-default)"];let a0=-Math.PI/2;body=React.createElement("svg",{viewBox:"0 0 120 120",width:H,height:H,"aria-hidden":"true"},data.map((d,i)=>{if(d.value===0)return null;if(d.value===total)return React.createElement("circle",{key:i,cx:"60",cy:"60",r:"50",fill:cols[i%cols.length],stroke:"var(--cs-color-surface-panel)",strokeWidth:"1.5"});const a1=a0+d.value/total*Math.PI*2;const large=a1-a0>Math.PI?1:0;const p=`M60 60 L${60+50*Math.cos(a0)} ${60+50*Math.sin(a0)} A50 50 0 ${large} 1 ${60+50*Math.cos(a1)} ${60+50*Math.sin(a1)} Z`;a0=a1;return React.createElement("path",{key:i,d:p,fill:cols[i%cols.length],stroke:"var(--cs-color-surface-panel)",strokeWidth:"1.5"})}))}else if(type==="line"||type==="spark"){const pts=data.map((d,i)=>`${i/Math.max(1,data.length-1)*(W-8)+4},${H-6-d.value/max*(H-24)}`).join(" ");body=React.createElement("svg",{viewBox:`0 0 ${W} ${H}`,width:"100%",height:H,preserveAspectRatio:"none","aria-hidden":"true"},React.createElement("polyline",{points:pts,fill:"none",stroke:color,strokeWidth:"2.4",strokeLinejoin:"round",strokeLinecap:"round"}),type==="line"?data.map((d,i)=>React.createElement("circle",{key:i,cx:i/Math.max(1,data.length-1)*(W-8)+4,cy:H-6-d.value/max*(H-24),r:"3.4",fill:color})):null)}else{const bw=(W-8)/data.length;const min=Math.min(0,...data.map(d=>Number(d.value)||0));const span=max-min||1;const zeroY=min<0?6+max/span*(H-26):H-20;body=React.createElement("svg",{viewBox:`0 0 ${W} ${H}`,width:"100%",height:H,preserveAspectRatio:"none","aria-hidden":"true"},data.map((d,i)=>{const val=Number(d.value)||0;const h=min<0?Math.abs(val)/span*(H-26):Math.max(0,Math.max(0,val)/max*(H-26));const y=min<0?val>=0?zeroY-h:zeroY:H-20-h;return React.createElement("rect",{key:i,x:4+i*bw+bw*.14,y,width:bw*.72,height:h,rx:"3",fill:color})}))}return React.createElement("figure",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-chart",className)},rootProps,["role","aria-label"]),role:"img","aria-label":accessibleName},body,type!=="spark"?React.createElement("figcaption",{className:"cs-chart__legend"},data.map((d,i)=>React.createElement("span",{key:i},d.label,showValues?React.createElement("b",null," ",d.value):null))):null)});Chart.displayName="Chart";Object.assign(__ds_scope,{Chart})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Chart.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const CodeBlock=React.forwardRef(function CodeBlock2({code="",filename,language,showBar=true,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("CodeBlock",L,localeMessages);const[copied,setCopied]=React.useState(false);const attempt=React.useRef(0);const timer=React.useRef(null);React.useEffect(()=>{setCopied(false);return()=>{attempt.current++;clearTimeout(timer.current)}},[code]);const copy=async()=>{const current=++attempt.current;clearTimeout(timer.current);setCopied(false);try{if(!navigator.clipboard?.writeText)return;await navigator.clipboard.writeText(code);if(current!==attempt.current)return;setCopied(true);timer.current=setTimeout(()=>{if(current===attempt.current)setCopied(false)},1400)}catch{}};return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-code",className)},rootProps,[])},showBar?React.createElement("div",{className:"cs-code__bar"},React.createElement("span",null,filename||(language===void 0?t("code"):language)),React.createElement("button",{type:"button",className:"cs-code__copy",onClick:copy},copied?t("copied"):t("copy"))):null,React.createElement("pre",null,React.createElement("code",null,code)))});CodeBlock.displayName="CodeBlock";Object.assign(__ds_scope,{CodeBlock})})()}catch(e){__ds_ns.__errors.push({path:"components/data/CodeBlock.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Collapsible=React.forwardRef(function Collapsible2({controlRef,open,defaultOpen=false,onOpenChange,title,trigger,children,className,...props},forwardedRef){const mergedControlRef=useComposedRefs(controlRef);const mergedNativeRef=useComposedRefs(forwardedRef);const uncontrolled=open===void 0;const[internal,setInternal]=React.useState(!!defaultOpen);const isOpen=uncontrolled?internal:!!open;const setOpen=next=>{if(uncontrolled)setInternal(next);onOpenChange?.(next)};const label=title??trigger;const panelId=React.useId();const triggerId=React.useId();return React.createElement("div",{className:cx("cs-collapsible",className),...props,ref:mergedNativeRef},React.createElement("button",{type:"button",id:triggerId,className:"cs-collapsible__trigger","aria-expanded":isOpen,"aria-controls":isOpen?panelId:void 0,onClick:()=>setOpen(!isOpen),ref:mergedControlRef},React.createElement("span",{className:"cs-collapsible__label"},label),React.createElement("span",{className:"cs-collapsible__chevron","aria-hidden":"true"},React.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React.createElement("path",{d:"M6 9l6 6 6-6"})))),isOpen?React.createElement("div",{id:panelId,role:"region","aria-labelledby":triggerId,className:"cs-collapsible__panel"},children):null)});Collapsible.displayName="Collapsible";Object.assign(__ds_scope,{Collapsible})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Collapsible.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Comment=React.forwardRef(function Comment2({avatar,author,meta,children,actions=[],replies,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Comment",L,localeMessages);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-comment",className)},rootProps,[])},avatar||avatar===0?React.createElement("span",{className:"cs-comment__avatar"},avatar):null,React.createElement("div",{className:"cs-comment__main"},React.createElement("div",{className:"cs-comment__head"},React.createElement("b",null,author),meta||meta===0?React.createElement("span",{className:"cs-comment__meta"},meta):null),React.createElement("div",{className:"cs-comment__body"},children),React.createElement("div",{className:"cs-comment__actions"},(actions.length?actions:[{label:t("reply")}]).map((a,i)=>React.createElement("button",{key:i,type:"button",onClick:()=>a.onSelect&&a.onSelect()},a.label))),replies||replies===0?React.createElement("div",{className:"cs-comment__replies"},replies):null))});Comment.displayName="Comment";Object.assign(__ds_scope,{Comment})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Comment.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const DescriptionList=React.forwardRef(function DescriptionList2({items=[],className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("dl",{className:cx("cs-dl",className),...props,ref:mergedNativeRef},items.map((it,i)=>React.createElement("div",{key:i},React.createElement("dt",null,it.term),React.createElement("dd",null,it.value))))});DescriptionList.displayName="DescriptionList";Object.assign(__ds_scope,{DescriptionList})})()}catch(e){__ds_ns.__errors.push({path:"components/data/DescriptionList.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Divider=React.forwardRef(function Divider2({vertical=false,label,className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);if(label||label===0){return React.createElement("div",{className:cx("cs-divider","cs-divider--label",className),role:"separator",...props,ref:mergedNativeRef},label)}return React.createElement("hr",{className:cx("cs-divider",vertical&&"cs-divider--vertical",className),"aria-orientation":vertical?"vertical":"horizontal",...props,ref:mergedNativeRef})});Divider.displayName="Divider";Object.assign(__ds_scope,{Divider})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Divider.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Item=React.forwardRef(function Item2({leading,trailing,title,description,selected=false,disabled=false,href,onClick,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const interactive=href!=null||typeof onClick==="function";const Tag=href!=null?"a":interactive?"button":"div";const rowProps={...props};if(Tag==="a"){if(disabled){rowProps["aria-disabled"]="true";rowProps.tabIndex=-1;rowProps.role=rowProps.role??"link";rowProps.onClick=e=>e.preventDefault()}else{rowProps.href=href;rowProps.onClick=onClick}}else if(Tag==="button"){rowProps.type="button";rowProps.disabled=disabled||void 0;rowProps.onClick=!disabled?onClick:void 0}if(selected)rowProps["aria-current"]=rowProps["aria-current"]??"true";const trailExplicit=trailing!==void 0;const trailNode=trailExplicit?trailing:title!=null?children:null;const mainExtra=trailExplicit?children:title==null?children:null;return React.createElement(Tag,{className:cx("cs-item",interactive&&!disabled&&"cs-item--interactive",selected&&"is-selected",disabled&&"is-disabled",className),...rowProps,ref:mergedNativeRef},leading!=null?React.createElement("span",{className:"cs-item__leading"},leading):null,React.createElement("span",{className:"cs-item__main"},title!=null?React.createElement("span",{className:"cs-item__title"},title):null,description!=null?React.createElement("span",{className:"cs-item__description"},description):null,mainExtra),trailNode!=null&&trailNode!==false?React.createElement("span",{className:"cs-item__trailing"},trailNode):null)});Item.displayName="Item";Object.assign(__ds_scope,{Item})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Item.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Kbd=React.forwardRef(function Kbd2({children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("kbd",{className:cx("cs-kbd",className),...props,ref:mergedNativeRef},children)});Kbd.displayName="Kbd";Object.assign(__ds_scope,{Kbd})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Kbd.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const List=React.forwardRef(function List2({className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{role:"list",className:cx("cs-list",className),...props,ref:mergedNativeRef},children)});List.displayName="List";const ListItem=React.forwardRef(function ListItem2({lead,title,subtitle,trail,onClick,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const interactive=!!onClick;const Tag=interactive?"button":"div";const row=React.createElement(Tag,{ref:interactive?void 0:mergedNativeRef,type:Tag==="button"?"button":void 0,role:interactive?void 0:"listitem",className:cx("cs-list__item",interactive&&"cs-list__item--button",className),onClick,...props},lead!=null?React.createElement("span",{className:"cs-list__lead"},lead):null,React.createElement("span",{className:"cs-list__main"},title!=null?React.createElement("span",{className:"cs-list__title"},title):null,subtitle!=null?React.createElement("span",{className:"cs-list__sub"},subtitle):null,children),trail!=null?React.createElement("span",{className:"cs-list__trail"},trail):null);return interactive?React.createElement("div",{role:"listitem",ref:mergedNativeRef},row):row});ListItem.displayName="ListItem";Object.assign(__ds_scope,{List,ListItem})})()}catch(e){__ds_ns.__errors.push({path:"components/data/List.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const Masonry=React.forwardRef(function Masonry2({columns=3,gap=16,children,className,style,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{...mergeTargetProps({"className":cx("cs-masonry",className)},rootProps,[]),style:{...rootProps?.style,...{columnCount:columns,columnGap:gap,...style}},ref:mergedNativeRef},React.Children.map(children,c=>React.createElement("div",{className:"cs-masonry__item",style:{marginBottom:gap}},c)))});Masonry.displayName="Masonry";Object.assign(__ds_scope,{Masonry})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Masonry.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const ScrollArea=React.forwardRef(function ScrollArea2({children,maxHeight,className,style,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const max=maxHeight==null?void 0:typeof maxHeight==="number"?`${maxHeight}px`:maxHeight;return React.createElement("div",{className:cx("cs-scroll-area",className),tabIndex:0,style:{...style||{},...max!=null?{maxBlockSize:max}:{}},...props,ref:mergedNativeRef},children)});ScrollArea.displayName="ScrollArea";Object.assign(__ds_scope,{ScrollArea})})()}catch(e){__ds_ns.__errors.push({path:"components/data/ScrollArea.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;function reorderItems(items,from,to){if(from<0||to<0||from>=items.length||to>=items.length||from===to)return items;const next=[...items];next.splice(to,0,next.splice(from,1)[0]);return next}const Sortable=React.forwardRef(function Sortable2({items=[],onChange,lang,className,rootProps},forwardedRef){const[dragKey,setDragKey]=React.useState(null);const[over,setOver]=React.useState(null);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Sortable",L,localeMessages);const move=(from,to)=>{const next=reorderItems(items,from,to);if(next!==items)onChange&&onChange(next)};const drop=()=>{if(dragKey==null||over==null||dragKey===over){setDragKey(null);setOver(null);return}const from=items.findIndex(i=>i.key===dragKey);const to=items.findIndex(i=>i.key===over);move(from,to);setDragKey(null);setOver(null)};return React.createElement("ul",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-sortable",className)},rootProps,[])},items.map((it,idx)=>React.createElement("li",{key:it.key,draggable:true,className:cx("cs-sortable__item",dragKey===it.key&&"is-dragging",over===it.key&&"is-over"),onDragStart:e=>{if(e.target.closest&&e.target.closest(".cs-sortable__ops")){e.preventDefault();return}setDragKey(it.key)},onDragOver:e=>{e.preventDefault();setOver(it.key)},onDrop:drop,onDragEnd:()=>{setDragKey(null);setOver(null)}},React.createElement("span",{className:"cs-sortable__grip","aria-hidden":"true"},"⠿"),React.createElement("span",{className:"cs-sortable__label"},it.label),React.createElement("span",{className:"cs-sortable__ops",onMouseDown:e=>e.stopPropagation()},React.createElement("button",{type:"button",className:"cs-button cs-button--secondary cs-button--xs","aria-label":t("moveUp"),disabled:idx===0,onClick:e=>{const sibling=idx-1===0?e.currentTarget.nextElementSibling:null;move(idx,idx-1);if(sibling)requestAnimationFrame(()=>sibling.focus())}},"↑"),React.createElement("button",{type:"button",className:"cs-button cs-button--secondary cs-button--xs","aria-label":t("moveDown"),disabled:idx===items.length-1,onClick:e=>{const sibling=idx+1===items.length-1?e.currentTarget.previousElementSibling:null;move(idx,idx+1);if(sibling)requestAnimationFrame(()=>sibling.focus())}},"↓")))))});Sortable.displayName="Sortable";Object.assign(__ds_scope,{reorderItems,Sortable})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Sortable.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Splitter=React.forwardRef(function Splitter2({start,end,initial=50,min=20,max=80,height=240,lang,className,rootProps},forwardedRef){const clamp=value=>Math.min(max,Math.max(min,value));const[storedPct,setPct]=React.useState(()=>clamp(initial));const pct=clamp(storedPct);const stopDrag=React.useRef(null);React.useEffect(()=>()=>stopDrag.current?.(),[min,max]);const wrap=React.useRef(null);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(wrap,ref,forwardedRef);const t=makeT("Splitter",L,localeMessages);const drag=e=>{if(e.button!==0)return;e.preventDefault();stopDrag.current?.();const pointerId=e.pointerId;const grabX=e.clientX;const startPct=pct;const handle=e.currentTarget;const move=ev=>{if(ev.pointerId!==pointerId||!wrap.current)return;const available=wrap.current.clientWidth-handle.getBoundingClientRect().width;if(available>0){const distance=(ev.clientX-grabX)*(getComputedStyle(wrap.current).direction==="rtl"?-1:1);setPct(clamp(startPct+distance/available*100))}};const cleanup=()=>{document.removeEventListener("pointermove",move);document.removeEventListener("pointerup",up);document.removeEventListener("pointercancel",up);stopDrag.current=null};const up=ev=>{if(ev.pointerId===pointerId)cleanup()};stopDrag.current=cleanup;document.addEventListener("pointermove",move);document.addEventListener("pointerup",up);document.addEventListener("pointercancel",up)};return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-splitter",className)},rootProps,[]),style:{...rootProps?.style,...{height,display:"grid",gridTemplateColumns:`minmax(0, ${pct}fr) auto minmax(0, ${100-pct}fr)`}}},React.createElement("div",{className:"cs-splitter__pane"},start),React.createElement("div",{className:"cs-splitter__bar",role:"separator","aria-orientation":"vertical","aria-label":t("label"),"aria-valuenow":pct,"aria-valuemin":min,"aria-valuemax":max,tabIndex:0,onPointerDown:drag,onKeyDown:e=>{if(e.nativeEvent.isComposing||e.keyCode===229||!["ArrowLeft","ArrowRight"].includes(e.key))return;e.preventDefault();const rtl=getComputedStyle(wrap.current).direction==="rtl";const delta=(e.key==="ArrowRight"?2:-2)*(rtl?-1:1);setPct(p=>clamp(clamp(p)+delta))}}),React.createElement("div",{className:"cs-splitter__pane"},end))});Splitter.displayName="Splitter";Object.assign(__ds_scope,{Splitter})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Splitter.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Stat=React.forwardRef(function Stat2({label,value,delta,trend="flat",className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const arrow=trend==="up"?"M12 5v14M6 11l6-6 6 6":trend==="down"?"M12 5v14M6 13l6 6 6-6":"M5 12h14";return React.createElement("div",{className:cx("cs-stat",className),...props,ref:mergedNativeRef},React.createElement("div",{className:"cs-stat__label"},label),React.createElement("div",{className:"cs-stat__value"},value),delta!=null?React.createElement("div",{className:cx("cs-stat__delta",`cs-stat__delta--${trend}`)},React.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:arrow})),delta):null)});Stat.displayName="Stat";Object.assign(__ds_scope,{Stat})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Stat.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const hasOutput=value=>value!=null&&typeof value!=="boolean"&&value!=="";const Terminal=React.forwardRef(function Terminal2({title,welcome,onCommand,prompt="➜",lang,className,rootProps},forwardedRef){const[hist,setHist]=React.useState(()=>hasOutput(welcome)?[{out:welcome}]:[]);const[q,setQ]=React.useState("");const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Terminal",L,localeMessages);const barTitle=title??t("title");const run=()=>{if(!q.trim())return;const res=onCommand?onCommand(q.trim()):"";setHist(h=>[...h,{cmd:q},...hasOutput(res)?[{out:res}]:[]]);setQ("")};return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-terminal",className)},rootProps,[])},React.createElement("div",{className:"cs-terminal__bar"},React.createElement("i",null),React.createElement("i",null),React.createElement("i",null),React.createElement("span",null,barTitle)),React.createElement("div",{className:"cs-terminal__body"},hist.map((l,i)=>l.cmd!=null?React.createElement("div",{key:i,className:"cs-terminal__line"},React.createElement("span",{className:"p"},prompt)," ",l.cmd):React.createElement("div",{key:i,className:"cs-terminal__out"},l.out)),React.createElement("div",{className:"cs-terminal__line"},React.createElement("span",{className:"p"},prompt),React.createElement("input",{value:q,"aria-label":t("input"),spellCheck:false,onChange:e=>setQ(e.target.value),onKeyDown:e=>{if(e.nativeEvent.isComposing||e.keyCode===229)return;if(e.key==="Enter"){e.preventDefault();run()}}}))))});Terminal.displayName="Terminal";Object.assign(__ds_scope,{Terminal})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Terminal.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const Timeline=React.forwardRef(function Timeline2({items=[],className,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{...mergeTargetProps({className:cx("cs-timeline",className)},rootProps),ref:mergedNativeRef},items.map((it,i)=>React.createElement("div",{key:i,className:cx("cs-timeline__item",it.state==="now"&&"cs-timeline__item--now",it.state==="todo"&&"cs-timeline__item--todo")},React.createElement("span",{className:"cs-timeline__marker","aria-hidden":"true"},it.state==="todo"?"":it.state==="now"?"→":"✓"),React.createElement("div",null,React.createElement("div",{className:"cs-timeline__title"},it.title),it.meta||it.meta===0?React.createElement("div",{className:"cs-timeline__meta"},it.meta):null,it.body||it.body===0?React.createElement("div",{className:"cs-timeline__body"},it.body):null))))});Timeline.displayName="Timeline";Object.assign(__ds_scope,{Timeline})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Timeline.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;function collectVisible(nodes,openMap,out=[]){for(const n of nodes){out.push(n);const kids=n.children||[];if(kids.length&&openMap[n.key])collectVisible(kids,openMap,out)}return out}function parentOf(nodes,key,parent=null){for(const n of nodes){if(n.key===key)return parent;const kids=n.children||[];if(kids.length){const p=parentOf(kids,key,n);if(p!==void 0)return p}}return void 0}function findNode(nodes,key){for(const n of nodes){if(n.key===key)return n;const kids=n.children||[];if(kids.length){const hit=findNode(kids,key);if(hit)return hit}}return null}function seedOpen(nodes,defaultOpen,map=Object.create(null)){for(const n of nodes){const kids=n.children||[];if(kids.length){map[n.key]=!!defaultOpen;seedOpen(kids,defaultOpen,map)}}return map}const Tree=React.forwardRef(function Tree2({nodes=[],selected,onSelect,defaultOpen=false,className,"aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const[openMap,setOpenMap]=React.useState(()=>seedOpen(nodes,defaultOpen));const[focusKey,setFocusKey]=React.useState(()=>{if(selected!=null&&findNode(nodes,selected))return selected;return nodes[0]?nodes[0].key:null});const itemRefs=React.useRef(new Map);const treeId=React.useId();const search=React.useRef({text:"",time:0});React.useEffect(()=>{setOpenMap(prev=>{const next=seedOpen(nodes,defaultOpen);for(const k of Object.keys(next))if(Object.hasOwn(prev,k))next[k]=prev[k];return next})},[nodes,defaultOpen]);const visible=React.useMemo(()=>collectVisible(nodes,openMap),[nodes,openMap]);React.useEffect(()=>{if(!visible.length){setFocusKey(null);return}if(focusKey==null||!visible.some(n=>n.key===focusKey))setFocusKey(visible[0].key)},[visible,focusKey]);const toggle=key=>setOpenMap(m=>Object.assign(Object.create(null),m,{[key]:!m[key]}));const focusItem=key=>{setFocusKey(key);requestAnimationFrame(()=>{const el=itemRefs.current.get(key);if(el)el.focus()})};const onKeyDown=(e,key)=>{if(e.target!==e.currentTarget)return;if(e.nativeEvent.isComposing||e.keyCode===229)return;if(["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Home","End","Enter"," "].includes(e.key))e.stopPropagation();const idx=visible.findIndex(n=>n.key===key);if(idx<0)return;const node=visible[idx];const kids=node.children||[];const open=!!openMap[key];if(e.key==="*"){e.preventDefault();const parent=parentOf(nodes,key);const siblings=parent?parent.children:nodes;setOpenMap(current=>{const next=Object.assign(Object.create(null),current);for(const sibling of siblings)if(sibling.children?.length)next[sibling.key]=true;return next})}else if(e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key!==" "){const now=Date.now();const char=e.key.toLocaleLowerCase();const text=now-search.current.time<500?search.current.text+char:char;search.current={text,time:now};const needle=[...text].every(letter=>letter===char)?char:text;const ordered=[...visible.slice(idx+1),...visible.slice(0,idx+1)];const found=ordered.find(n=>itemRefs.current.get(n.key)?.querySelector(".cs-tree__label")?.textContent?.trim().toLocaleLowerCase().startsWith(needle));if(found){e.preventDefault();focusItem(found.key)}}else if(e.key==="ArrowDown"){e.preventDefault();if(idx<visible.length-1)focusItem(visible[idx+1].key)}else if(e.key==="ArrowUp"){e.preventDefault();if(idx>0)focusItem(visible[idx-1].key)}else if(e.key==="Home"){e.preventDefault();focusItem(visible[0].key)}else if(e.key==="End"){e.preventDefault();focusItem(visible[visible.length-1].key)}else if(e.key==="ArrowRight"){e.preventDefault();if(kids.length&&!open)toggle(key);else if(kids.length&&open)focusItem(kids[0].key)}else if(e.key==="ArrowLeft"){e.preventDefault();if(kids.length&&open)toggle(key);else{const p=parentOf(nodes,key);if(p)focusItem(p.key)}}else if(e.key==="Enter"||e.key===" "){e.preventDefault();onSelect&&onSelect(key,node);if(kids.length)toggle(key)}};const renderNodes=(list,depth)=>list.map(n=>{const kids=n.children||[];const open=!!openMap[n.key];const selectNode=e=>{e.stopPropagation();focusItem(n.key);onSelect&&onSelect(n.key,n);if(kids.length)toggle(n.key)};return React.createElement("li",{key:n.key,role:"treeitem","aria-expanded":kids.length?open:void 0,"aria-selected":selected===n.key,"aria-labelledby":treeId+"-"+encodeURIComponent(n.key),tabIndex:focusKey===n.key?0:-1,ref:el=>{if(el)itemRefs.current.set(n.key,el);else itemRefs.current.delete(n.key)},onKeyDown:e=>onKeyDown(e,n.key),onFocus:e=>{if(e.target===e.currentTarget)setFocusKey(n.key)}},React.createElement("span",{className:cx("cs-tree__row",selected===n.key&&"is-selected"),style:{paddingInlineStart:depth*18+6},onClick:selectNode},kids.length?React.createElement("span",{className:"cs-tree__twist","aria-hidden":"true",onClick:e=>{e.stopPropagation();focusItem(n.key);toggle(n.key)}},open?"▾":"▸"):React.createElement("span",{className:"cs-tree__twist","aria-hidden":"true"}),React.createElement("span",{id:treeId+"-"+encodeURIComponent(n.key),className:"cs-tree__label",onClick:selectNode},n.label)),kids.length&&open?React.createElement("ul",{role:"group"},renderNodes(kids,depth+1)):null)});return React.createElement("ul",{role:"tree","aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy,...mergeTargetProps({"className":cx("cs-tree",className)},rootProps,["role","aria-label","aria-labelledby"]),ref:mergedNativeRef},renderNodes(nodes,0))});Tree.displayName="Tree";Object.assign(__ds_scope,{Tree})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Tree.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const Watermark=React.forwardRef(function Watermark2({text="CyberSkill",opacity=.09,gap=140,rotate=-22,children,className,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const svg=encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="${gap}" height="${gap}"><text x="50%" y="50%" font-family="Be Vietnam Pro, sans-serif" font-size="14" font-weight="700" fill="black" fill-opacity="${opacity}" text-anchor="middle" transform="rotate(${rotate} ${gap/2} ${gap/2})">${String(text).replace(/&/g,"&amp;").replace(/</g,"&lt;")}</text></svg>`);return React.createElement("div",{...mergeTargetProps({className:cx("cs-watermark",className)},rootProps),style:{...rootProps?.style,position:"relative"},ref:mergedNativeRef},children,React.createElement("div",{"aria-hidden":"true",style:{position:"absolute",inset:0,pointerEvents:"none",backgroundColor:"var(--cs-color-text-primary, #45210E)",maskImage:`url("data:image/svg+xml,${svg}")`,WebkitMaskImage:`url("data:image/svg+xml,${svg}")`,maskRepeat:"repeat",WebkitMaskRepeat:"repeat"}}))});Watermark.displayName="Watermark";Object.assign(__ds_scope,{Watermark})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Watermark.jsx",error:String(e&&e.message||e)})}try{(()=>{const EC={1:7,2:10,3:15,4:20};const TOTAL={1:26,2:44,3:70,4:100};const CAP={1:17,2:32,3:53,4:78};const ALIGN={1:[],2:[6,18],3:[6,22],4:[6,26]};const FORMAT=Array.from({length:15},(_,i)=>30660>>i&1);const EXP=new Array(512),LOG=new Array(256);(function(){let x=1;for(let i=0;i<255;i++){EXP[i]=x;LOG[x]=i;x<<=1;if(x&256)x^=285}for(let i=255;i<512;i++)EXP[i]=EXP[i-255]})();function rs(data,ecLen){let gen=[1];for(let i=0;i<ecLen;i++){const next=new Array(gen.length+1).fill(0);for(let j=0;j<gen.length;j++){next[j]^=gen[j];if(gen[j])next[j+1]^=EXP[(LOG[gen[j]]+i)%255]}gen=next}const res=data.concat(new Array(ecLen).fill(0));for(let i=0;i<data.length;i++){const f=res[i];if(f===0)continue;for(let j=0;j<gen.length;j++)if(gen[j])res[i+j]^=EXP[(LOG[gen[j]]+LOG[f])%255]}return res.slice(data.length)}function qrMatrix(text){const bytes=Array.from(new TextEncoder().encode(text));let v=0;for(const cand of[1,2,3,4])if(bytes.length<=CAP[cand]){v=cand;break}if(!v)throw new Error("too long");const dataLen=TOTAL[v]-EC[v];const bits=[];const push=(val,n2)=>{for(let i=n2-1;i>=0;i--)bits.push(val>>i&1)};push(4,4);push(bytes.length,8);bytes.forEach(b=>push(b,8));push(0,Math.min(4,dataLen*8-bits.length));while(bits.length%8)bits.push(0);const cw=[];for(let i=0;i<bits.length;i+=8)cw.push(parseInt(bits.slice(i,i+8).join(""),2));const pads=[236,17];let p=0;while(cw.length<dataLen)cw.push(pads[p++%2]);const all=cw.concat(rs(cw,EC[v]));const n=17+v*4;const M=Array.from({length:n},()=>new Array(n).fill(null));const setF=(x,y,val)=>{if(y>=0&&y<n&&x>=0&&x<n)M[y][x]=val};const finder=(cx0,cy0)=>{for(let y=-1;y<=7;y++)for(let x=-1;x<=7;x++){const in7=x>=0&&x<7&&y>=0&&y<7;const on=in7&&(x===0||x===6||y===0||y===6||x>=2&&x<=4&&y>=2&&y<=4);setF(cx0+x,cy0+y,on?1:0)}};finder(0,0);finder(n-7,0);finder(0,n-7);for(let i=8;i<n-8;i++){const on=i%2===0?1:0;if(M[6][i]==null)M[6][i]=on;if(M[i][6]==null)M[i][6]=on}const ap=ALIGN[v];for(const ay of ap)for(const ax of ap){if(M[ay][ax]!=null)continue;for(let y=-2;y<=2;y++)for(let x=-2;x<=2;x++)setF(ax+x,ay+y,Math.max(Math.abs(x),Math.abs(y))!==1?1:0)}M[n-8][8]=1;const fpos1=[[8,0],[8,1],[8,2],[8,3],[8,4],[8,5],[8,7],[8,8],[7,8],[5,8],[4,8],[3,8],[2,8],[1,8],[0,8]];const fpos2=[[n-1,8],[n-2,8],[n-3,8],[n-4,8],[n-5,8],[n-6,8],[n-7,8],[n-8,8],[8,n-7],[8,n-6],[8,n-5],[8,n-4],[8,n-3],[8,n-2],[8,n-1]];FORMAT.forEach((b,i)=>{const[x1,y1]=fpos1[i];M[y1][x1]=b;const[x2,y2]=fpos2[i];M[y2][x2]=b});let bi=0;const bit=i=>i<all.length*8?all[i>>3]>>7-(i&7)&1:0;for(let col=n-1;col>0;col-=2){if(col===6)col--;for(let i=0;i<n;i++){for(let dx=0;dx<2;dx++){const x=col-dx;const y=(col+1&2)===0?n-1-i:i;if(M[y][x]!=null)continue;let b=bit(bi++);if((y+x)%2===0)b^=1;M[y][x]=b}}}return M}Object.assign(__ds_scope,{qrMatrix})})()}catch(e){__ds_ns.__errors.push({path:"components/data/qr-encode.js",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{qrMatrix}=__ds_scope;const{cx}=__ds_scope;const QRCode=React.forwardRef(function QRCode2({value="",size=128,color="var(--cs-color-text-primary)",label,className,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const m=React.useMemo(()=>{try{return qrMatrix(String(value))}catch(e){return null}},[value]);if(!m)return React.createElement("span",{...mergeTargetProps({className:cx("cs-qrcode",className)},rootProps,["role","aria-label"]),role:"img","aria-label":label||value,ref:mergedNativeRef},"—");const n=m.length,cell=size/n;let d="";for(let y=0;y<n;y++)for(let x=0;x<n;x++)if(m[y][x])d+=`M${x*cell} ${y*cell}h${cell}v${cell}h${-cell}z`;return React.createElement("span",{...mergeTargetProps({className:cx("cs-qrcode",className)},rootProps,["role","aria-label"]),role:"img","aria-label":label||value,ref:mergedNativeRef},React.createElement("svg",{width:size,height:size,viewBox:`0 0 ${size} ${size}`,"aria-hidden":"true"},React.createElement("path",{d,fill:color})))});QRCode.displayName="QRCode";Object.assign(__ds_scope,{QRCode})})()}catch(e){__ds_ns.__errors.push({path:"components/data/QRCode.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;function nodeRowId(prefix,key){return prefix+"-row-"+String(key).split("").map(unit=>unit.charCodeAt(0).toString(16).padStart(4,"0")).join("")}function Row({n,depth,columns,expanded,setExpanded,t,treeId}){const labelId=React.useId();const actionId=labelId+"-action";const rowId=nodeRowId(treeId,n.key);const kids=n.children||[];const open=expanded.includes(n.key);return React.createElement(React.Fragment,null,React.createElement("tr",{id:rowId},columns.map((c,i)=>React.createElement("td",{key:c.key},i===0?React.createElement("span",{className:"cs-treetable__cell",style:{paddingInlineStart:depth*18}},kids.length?React.createElement("button",{type:"button",className:"cs-tree__twist","aria-expanded":open,"aria-controls":open?kids.map(child=>nodeRowId(treeId,child.key)).join(" "):void 0,"aria-labelledby":actionId+" "+labelId,onClick:()=>setExpanded(current=>current.includes(n.key)?current.filter(k=>k!==n.key):[...current,n.key])},React.createElement("span",{id:actionId,className:"cs-sr-only"},t(open?"collapse":"expand")),React.createElement("span",{"aria-hidden":"true"},open?"▾":"▸")):React.createElement("span",{className:"cs-tree__twist","aria-hidden":"true"}),React.createElement("span",{id:labelId},c.render?c.render(n):n[c.key])):c.render?c.render(n):n[c.key]))),open?kids.map(k=>React.createElement(Row,{key:k.key,n:k,depth:depth+1,columns,expanded,setExpanded,t,treeId})):null)}const TreeTable=React.forwardRef(function TreeTable2({columns=[],nodes=[],caption,defaultExpanded=[],lang,className,rootProps},forwardedRef){const[expanded,setExpanded]=React.useState(defaultExpanded);const treeId=React.useId();const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("TreeTable",L,localeMessages);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-table-wrap",className)},rootProps,[])},React.createElement("table",{className:"cs-table cs-treetable"},caption||caption===0?React.createElement("caption",null,caption):null,React.createElement("thead",null,React.createElement("tr",null,columns.map(c=>React.createElement("th",{key:c.key,scope:"col"},c.header)))),React.createElement("tbody",null,nodes.length===0?React.createElement("tr",null,React.createElement("td",{colSpan:columns.length,className:"cs-table__empty"},t("empty"))):nodes.map(n=>React.createElement(Row,{key:n.key,n,depth:0,columns,expanded,setExpanded,t,treeId})))))});TreeTable.displayName="TreeTable";Object.assign(__ds_scope,{TreeTable})})()}catch(e){__ds_ns.__errors.push({path:"components/datatable/TreeTable.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{hasDismiss,notifyDismiss}=__ds_scope;const PATHS={info:"M12 8h.01M11 12h1v4h1 M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z",success:"M4 12.5l5 5 11-11",warning:"M12 3l9 16H3z M12 10v4 M12 17h.01",danger:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z M9 9l6 6 M15 9l-6 6"};function DefaultIcon({variant}){return React.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:PATHS[variant]||PATHS.info}))}const Alert=React.forwardRef(function Alert2({variant="info",title,icon,children,onDismiss,onClose,onOpenChange,lang,className,...props},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Alert",L,localeMessages);return React.createElement("div",{ref:mergedNativeRef,role:"status",className:cx("cs-alert",`cs-alert--${variant}`,className),...props},React.createElement("span",{className:"cs-alert__icon"},icon??React.createElement(DefaultIcon,{variant})),React.createElement("div",null,title||title===0?React.createElement("p",{className:"cs-alert__title"},title):null,children||children===0?React.createElement("div",{className:"cs-alert__body"},children):null),hasDismiss(onOpenChange,onClose,onDismiss)?React.createElement("button",{type:"button",className:"cs-alert__dismiss","aria-label":t("dismiss"),onClick:event=>notifyDismiss(event,onOpenChange,onClose,onDismiss)},"×"):null)});Alert.displayName="Alert";Object.assign(__ds_scope,{Alert})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/Alert.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Badge=React.forwardRef(function Badge2({variant="neutral",dot=false,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("span",{className:cx("cs-badge",variant!=="neutral"&&`cs-badge--${variant}`,className),...props,ref:mergedNativeRef},dot?React.createElement("span",{className:"cs-badge__dot","aria-hidden":"true"}):null,children)});Badge.displayName="Badge";Object.assign(__ds_scope,{Badge})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/Badge.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const EmptyState=React.forwardRef(function EmptyState2({icon,title,children,actions,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("EmptyState",L,localeMessages);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-empty",className)},rootProps)},React.createElement("span",{className:"cs-empty__icon"},icon??React.createElement("svg",{width:"26",height:"26",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M3 8l2-4h14l2 4M3 8v10a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V8M3 8h6l1 3h4l1-3h6"}))),React.createElement("div",{className:"cs-empty__title"},title??t("title")),children||children===0?React.createElement("div",{className:"cs-empty__body"},children):null,actions||actions===0?React.createElement("div",{className:"cs-empty__actions"},actions):null)});EmptyState.displayName="EmptyState";Object.assign(__ds_scope,{EmptyState})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/EmptyState.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const ProgressBar=React.forwardRef(function ProgressBar2({value=0,max=100,variant,label,lang,className,rootProps},forwardedRef){const safeMax=Number.isFinite(max)&&max>0?max:100;const clamped=Math.max(0,Math.min(safeMax,Number(value)||0));const pct=Math.max(0,Math.min(100,clamped/safeMax*100));const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("ProgressBar",L,localeMessages);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-progress",variant&&`cs-progress--${variant}`,className)},rootProps,["role","aria-valuenow","aria-valuemin","aria-valuemax","aria-label"]),role:"progressbar","aria-valuenow":clamped,"aria-valuemin":0,"aria-valuemax":safeMax,"aria-label":label??t("label")},React.createElement("span",{className:"cs-progress__fill",style:{inlineSize:pct+"%",width:pct+"%"}}))});ProgressBar.displayName="ProgressBar";Object.assign(__ds_scope,{ProgressBar})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/ProgressBar.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const ART={success:React.createElement("svg",{width:"30",height:"30",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M4 12.5l5 5 11-11"})),error:React.createElement("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round","aria-hidden":"true"},React.createElement("path",{d:"M6 6l12 12M18 6L6 18"})),warning:React.createElement("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M12 3l10 18H2z"}),React.createElement("path",{d:"M12 10v5M12 18.2v.1"})),info:React.createElement("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round","aria-hidden":"true"},React.createElement("circle",{cx:"12",cy:"12",r:"9"}),React.createElement("path",{d:"M12 11v6M12 7.2v.1"}))};const Result=React.forwardRef(function Result2({status="info",title,children,actions,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Result",L,localeMessages);const tt=title!=null?title:t(status);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-result","cs-result--"+status,className)},rootProps,["role"]),role:"status"},React.createElement("span",{className:"cs-result__icon","aria-hidden":"true"},ART[status]||ART.info),React.createElement("h2",{className:"cs-result__title"},tt),children||children===0?React.createElement("div",{className:"cs-result__body"},children):null,actions||actions===0?React.createElement("div",{className:"cs-result__actions"},actions):null)});Result.displayName="Result";Object.assign(__ds_scope,{Result})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/Result.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const{renderCount}=__ds_scope;const Skeleton=React.forwardRef(function Skeleton2({variant="block",width,height,lines:requestedLines,radius,className,style,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const lines=renderCount(requestedLines,0);if(lines){return React.createElement("div",{...mergeTargetProps({"className":className},rootProps,["aria-hidden","role"]),"aria-hidden":"true",role:"presentation",ref:mergedNativeRef},Array.from({length:lines}).map((_,i)=>React.createElement("span",{key:i,className:"cs-skeleton cs-skeleton--text",style:{width:i===lines-1?"70%":"100%"}})))}return React.createElement("span",{...mergeTargetProps({"className":cx("cs-skeleton",variant==="circle"&&"cs-skeleton--circle",className)},rootProps,["aria-hidden","role"]),style:{...rootProps?.style,...{display:"block",width,height,borderRadius:radius,...style}},"aria-hidden":"true",ref:mergedNativeRef})});Skeleton.displayName="Skeleton";Object.assign(__ds_scope,{Skeleton})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/Skeleton.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{Skeleton}=__ds_scope;const{Result}=__ds_scope;const{cx}=__ds_scope;const{renderCount}=__ds_scope;const DataTable=React.forwardRef(function DataTable2({caption,columns,rows,rowKey="id",emptyState,state="idle",errorState,loadingState,loadingRows:requestedLoadingRows=5,lang,className,rootProps},forwardedRef){const normalized=Array.isArray(rows)?rows:[];const loadingRows=renderCount(requestedLoadingRows,5,1);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("DataTable",L,localeMessages);const es=emptyState!=null?emptyState:t("empty");const colCount=Math.max(1,columns&&columns.length||1);if(state==="loading"){return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-table-wrap",className)},rootProps,["aria-busy","role"]),"aria-busy":"true"},React.createElement("span",{className:"cs-sr-only"},t("loading")),loadingState!=null?loadingState:React.createElement("table",{className:"cs-table"},caption||caption===0?React.createElement("caption",null,caption):null,React.createElement("thead",null,React.createElement("tr",null,(columns||[]).map(c=>React.createElement("th",{key:c.key,scope:"col"},c.header)))),React.createElement("tbody",{"aria-hidden":"true"},Array.from({length:loadingRows}).map((_,i)=>React.createElement("tr",{key:i},Array.from({length:colCount}).map((__,j)=>React.createElement("td",{key:j},React.createElement(Skeleton,{lines:1}))))))))}if(state==="error"){return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-table-wrap","cs-table-wrap--status",className)},rootProps,["aria-busy","role"]),role:"alert"},errorState!=null?errorState:React.createElement(Result,{status:"error",lang:L,title:t("error")},t("errorHint")))}return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-table-wrap",className)},rootProps,["aria-busy","role"])},React.createElement("table",{className:"cs-table"},caption||caption===0?React.createElement("caption",null,caption):null,React.createElement("thead",null,React.createElement("tr",null,(columns||[]).map(c=>React.createElement("th",{key:c.key,scope:"col"},c.header)))),React.createElement("tbody",null,normalized.length===0?React.createElement("tr",null,React.createElement("td",{colSpan:colCount,className:"cs-table__empty"},es)):normalized.map((row,i)=>React.createElement("tr",{key:row[rowKey]??i},(columns||[]).map(c=>React.createElement("td",{key:c.key},c.render?c.render(row):row[c.key])))))))});DataTable.displayName="DataTable";Object.assign(__ds_scope,{DataTable})})()}catch(e){__ds_ns.__errors.push({path:"components/datatable/DataTable.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Spinner=React.forwardRef(function Spinner2({size=20,label,lang,className,style,...props},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const lbl=label!=null?label:makeT("Spinner",L,localeMessages)("label");return React.createElement("span",{ref:mergedNativeRef,role:"status","aria-label":lbl,className:cx("cs-spinner",className),style:{inlineSize:size,blockSize:size,width:size,height:size,...style},...props})});Spinner.displayName="Spinner";Object.assign(__ds_scope,{Spinner})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/Spinner.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const StatusIndicator=React.forwardRef(function StatusIndicator2({status="offline",pulse=false,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("span",{className:cx("cs-status",`cs-status--${status}`,pulse&&"cs-status--pulse",className),...props,ref:mergedNativeRef},React.createElement("span",{className:"cs-status__dot","aria-hidden":"true"}),children)});StatusIndicator.displayName="StatusIndicator";Object.assign(__ds_scope,{StatusIndicator})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/StatusIndicator.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Tag=React.forwardRef(function Tag2({children,onRemove,removeLabel,lang,className,...props},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const rl=removeLabel!=null?removeLabel:makeT("Tag",L,localeMessages)("remove");return React.createElement("span",{ref:mergedNativeRef,className:cx("cs-tag",className),...props},children,onRemove?React.createElement("button",{type:"button",className:"cs-tag__close","aria-label":rl,onClick:onRemove},React.createElement("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round"},React.createElement("path",{d:"M6 6l12 12M18 6L6 18"}))):null)});Tag.displayName="Tag";Object.assign(__ds_scope,{Tag})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/Tag.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang,monthName,primaryLang}=__ds_scope;const{useClientLayoutEffect}=__ds_scope;const{cx}=__ds_scope;const WD={en:["Mo","Tu","We","Th","Fr","Sa","Su"],vi:["T2","T3","T4","T5","T6","T7","CN"],ja:["月","火","水","木","金","土","日"]};function localDate(year,month,day){const date=new Date(0);date.setFullYear(year,month,day);date.setHours(0,0,0,0);return date}function grid(year,month){const first=localDate(year,month,1);const lead=(first.getDay()+6)%7;const days=localDate(year,month+1,0).getDate();const cells=[];for(let i=0;i<lead;i++)cells.push(null);for(let d=1;d<=days;d++)cells.push(d);while(cells.length%7)cells.push(null);return cells}const Calendar=React.forwardRef(function Calendar2({value,onChange,lang,className,rootProps},forwardedRef){const parsed=value!=null?new Date(value):null;const sel=parsed&&Number.isFinite(parsed.getTime())?parsed:null;const selectedYear=sel?.getFullYear(),selectedMonth=sel?.getMonth(),selectedDay=sel?.getDate();const today=new Date;const[view,setView]=React.useState(()=>sel?[sel.getFullYear(),sel.getMonth()]:[today.getFullYear(),today.getMonth()]);React.useEffect(()=>{if(selectedYear!=null&&selectedMonth!=null){setView([selectedYear,selectedMonth]);setFocusedDay(selectedDay)}},[selectedYear,selectedMonth,selectedDay]);const[y,m]=view;const[focusedDay,setFocusedDay]=React.useState(()=>sel?.getDate()??today.getDate());const pendingFocus=React.useRef(false);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Calendar",L,localeMessages);const cells=grid(y,m);const maxDay=localDate(y,m+1,0).getDate();const activeDay=Math.min(focusedDay,maxDay);const monthId=React.useId();useClientLayoutEffect(()=>{if(!pendingFocus.current)return;pendingFocus.current=false;ref.current?.querySelector(`button[data-day="${activeDay}"]`)?.focus()},[y,m,activeDay]);const moveFocus=date=>{pendingFocus.current=true;setFocusedDay(date.getDate());setView([date.getFullYear(),date.getMonth()])};const dateLabel=d=>new Intl.DateTimeFormat(primaryLang(L)==="vi"?"vi-VN":primaryLang(L)==="ja"?"ja-JP":"en-US",{weekday:"long",day:"numeric",month:"long",year:"numeric"}).format(localDate(y,m,d));const isSel=d=>sel&&d===sel.getDate()&&m===sel.getMonth()&&y===sel.getFullYear();const isToday=d=>d===today.getDate()&&m===today.getMonth()&&y===today.getFullYear();return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-cal",className)},rootProps,[])},React.createElement("div",{className:"cs-cal__head"},React.createElement("button",{type:"button","aria-label":t("prev"),onClick:()=>setView(([yy,mm])=>mm?[yy,mm-1]:[yy-1,11])},"‹"),React.createElement("b",{id:monthId,"aria-live":"polite"},monthName(m,L)," ",y),React.createElement("button",{type:"button","aria-label":t("next"),onClick:()=>setView(([yy,mm])=>mm===11?[yy+1,0]:[yy,mm+1])},"›")),React.createElement("div",{className:"cs-cal__wd"},WD[WD[L]?L:"en"].map(w=>React.createElement("span",{key:w},w))),React.createElement("div",{className:"cs-cal__grid",role:"grid","aria-labelledby":monthId,onKeyDown:e=>{const btn=e.target.closest("button[data-day]");if(!btn)return;const cur=Number(btn.getAttribute("data-day"));let next=null;if(e.key==="ArrowLeft")next=localDate(y,m,cur-1);else if(e.key==="ArrowRight")next=localDate(y,m,cur+1);else if(e.key==="ArrowUp")next=localDate(y,m,cur-7);else if(e.key==="ArrowDown")next=localDate(y,m,cur+7);else if(e.key==="Home")next=localDate(y,m,1);else if(e.key==="End")next=localDate(y,m,maxDay);else if(e.key==="PageUp"||e.key==="PageDown"){const offset=(e.key==="PageUp"?-1:1)*(e.shiftKey?12:1);const target=localDate(y,m+offset,1);next=localDate(target.getFullYear(),target.getMonth(),Math.min(cur,localDate(target.getFullYear(),target.getMonth()+1,0).getDate()))}if(next){e.preventDefault();moveFocus(next)}}},Array.from({length:cells.length/7},(_,week)=>React.createElement("div",{role:"row",key:week,style:{display:"contents"}},cells.slice(week*7,week*7+7).map((d,i)=>d==null?React.createElement("span",{role:"gridcell",key:i}):React.createElement("span",{role:"gridcell","aria-selected":!!isSel(d),key:i,style:{display:"contents"}},React.createElement("button",{type:"button","data-day":d,tabIndex:d===activeDay?0:-1,onFocus:()=>setFocusedDay(d),className:cx(isSel(d)&&"sel",isToday(d)&&"today"),"aria-pressed":isSel(d)||void 0,"aria-current":isToday(d)?"date":void 0,"aria-label":dateLabel(d),onClick:()=>onChange&&onChange(localDate(y,m,d))},d)))))))});Calendar.displayName="Calendar";Object.assign(__ds_scope,{Calendar})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Calendar.jsx",error:String(e&&e.message||e)})}try{(()=>{const{mergeIds}=__ds_scope;const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Checkbox=React.forwardRef(function Checkbox2({label,description,disabled=false,className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const generatedId=React.useId();const hasLabel=Boolean(label)||label===0;const hasDescription=Boolean(description)||description===0;const labelId=hasLabel?generatedId+"-label":void 0;const descriptionId=hasDescription?generatedId+"-description":void 0;const labelledBy=props["aria-labelledby"]??(props["aria-label"]==null?labelId:void 0);const describedBy=mergeIds(props["aria-describedby"],descriptionId);return React.createElement("label",{className:cx("cs-check",disabled&&"is-disabled",className)},React.createElement("input",{type:"checkbox",disabled,...props,"aria-labelledby":labelledBy,"aria-describedby":describedBy,ref:mergedNativeRef}),React.createElement("span",{className:"cs-check__text"},React.createElement("span",{id:labelId},label),description||description===0?React.createElement("span",{id:descriptionId,className:"cs-check__desc"},description):null))});Checkbox.displayName="Checkbox";Object.assign(__ds_scope,{Checkbox})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Checkbox.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const FileUpload=React.forwardRef(function FileUpload2({controlRef,title,hint,accept,multiple=false,onFiles,icon,lang,className,rootProps},forwardedRef){const[drag,setDrag]=React.useState(false);const inputRef=React.useRef(null);const mergedControlRef=useComposedRefs(inputRef,controlRef);const pick=files=>{if(files&&files.length&&onFiles)onFiles(multiple?Array.from(files):[files[0]])};const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("FileUpload",L,localeMessages);const tt=title!=null?title:t("title");const hh=hint!=null?hint:t("hint");const id=React.useId();return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-dropzone",drag&&"is-dragging",className),"onDragOver":e=>{e.preventDefault();setDrag(true)},"onDragLeave":()=>setDrag(false),"onDrop":e=>{e.preventDefault();setDrag(false);pick(e.dataTransfer.files)},"onClick":()=>inputRef.current&&inputRef.current.click()},rootProps,[])},React.createElement("span",{className:"cs-dropzone__icon","aria-hidden":"true"},icon??React.createElement("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"},React.createElement("path",{d:"M12 16V4M7 9l5-5 5 5"}),React.createElement("path",{d:"M5 16v3a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-3"}))),React.createElement("label",{className:"cs-dropzone__title",htmlFor:id},tt),React.createElement("span",{className:"cs-dropzone__hint",id:id+"-hint"},hh),React.createElement("input",{id,ref:mergedControlRef,type:"file",accept,multiple,className:"cs-sr-only","aria-describedby":id+"-hint",onChange:e=>pick(e.target.files),onClick:e=>{e.stopPropagation();e.currentTarget.value=""}}))});FileUpload.displayName="FileUpload";Object.assign(__ds_scope,{FileUpload})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/FileUpload.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{fieldAssociationContext,associateFieldProps,mergeTargetProps}=__ds_scope;let FormCtx;function getFormCtx(){if(!FormCtx)FormCtx=React.createContext(null);return FormCtx}const arrayRowKeys=new WeakMap;let nextRowKey=0;function rowKeys(array){if(!arrayRowKeys.has(array))arrayRowKeys.set(array,Array.from(array,()=>++nextRowKey));const keys=arrayRowKeys.get(array);while(keys.length<array.length)keys.push(++nextRowKey);return keys}function clonePathContainer(value){if(!Array.isArray(value))return{...value||{}};const clone=[...value];arrayRowKeys.set(clone,[...rowKeys(value)]);return clone}function getPath(obj,path){if(!path)return void 0;const parts=String(path).split(".");let cur=obj;for(const p of parts){if(cur==null)return void 0;cur=cur[p]}return cur}function setPath(obj,path,value){const parts=String(path).split(".");const root=clonePathContainer(obj);let cur=root;for(let i=0;i<parts.length-1;i++){const p=parts[i];const nextKey=parts[i+1];const nextIsIndex=/^\d+$/.test(nextKey);const existing=cur[p];const clone=existing==null?nextIsIndex?[]:{}:clonePathContainer(existing);cur[p]=clone;cur=clone}cur[parts[parts.length-1]]=value;return root}function useFormController(seed){const[state,setState]=React.useState(()=>({values:seed||{},errors:{}}));const setValues=React.useCallback(change=>setState(current=>({...current,values:typeof change==="function"?change(current.values):change})),[]);const setRuleErrors=React.useCallback(change=>setState(current=>({...current,errors:typeof change==="function"?change(current.errors):change})),[]);const updateArray=React.useCallback((name,change)=>setState(current=>{const value=getPath(current.values,name);const list=Array.isArray(value)?value:[];const next=change(list);if(next===list)return current;const errors=Object.fromEntries(Object.entries(current.errors).filter(([key])=>key!==name&&!key.startsWith(name+".")));return{values:setPath(current.values,name,next),errors}}),[]);return{values:state.values,ruleErrors:state.errors,setValues,setRuleErrors,updateArray}}const Form=React.forwardRef(function Form2({onSubmit,onReset,errors={},rules,asyncRules,initialValues,children,lang,className,...props},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Form",L,localeMessages);const initialSeed=React.useRef(initialValues||{});const{values,ruleErrors,setValues,setRuleErrors,updateArray}=useFormController(initialSeed.current);const[pending,setPending]=React.useState(false);const pendingRef=React.useRef(false);const lifecycle=React.useRef(0);React.useEffect(()=>()=>{lifecycle.current++},[]);const[submissionError,setSubmissionError]=React.useState(null);const setValue=React.useCallback((name,v)=>{setValues(s=>String(name).includes(".")?setPath(s,name,v):{...s,[name]:v});setRuleErrors(e=>e[name]?{...e,[name]:void 0}:e)},[]);const merged={...ruleErrors,...errors};const keys=Object.keys(merged).filter(k=>merged[k]);const runRules=(v,ruleMap)=>{const map=ruleMap||rules;if(!map)return{};const out={};for(const[name,r]of Object.entries(map)){for(const rule of Array.isArray(r)?r:[r]){const fieldVal=String(name).includes(".")?getPath(v,name):v[name];const msg=rule==="required"?fieldVal==null||String(fieldVal).trim()===""?t("requiredField"):null:typeof rule==="function"?rule(fieldVal,v):null;if(msg){out[name]=msg;break}}}return out};const runAsyncRules=async(v,attempt)=>{if(!asyncRules)return{};const out={};for(const[name,fn]of Object.entries(asyncRules)){if(attempt!==lifecycle.current)return out;if(typeof fn!=="function")continue;try{const fieldVal=String(name).includes(".")?getPath(v,name):v[name];const msg=await fn(fieldVal,v);if(msg)out[name]=msg}catch(e){out[name]=String(e&&e.message||e)}}return out};const ctx={values,setValue,setValues,updateArray,errors:merged,pending,runRules,setRuleErrors,t,L};const Ctx=getFormCtx();return React.createElement(Ctx.Provider,{value:ctx},React.createElement("form",{...props,ref:mergedNativeRef,className:cx("cs-form",pending&&"is-pending",className),noValidate:true,"aria-busy":pending||void 0,onReset:event=>{onReset?.(event);if(event.defaultPrevented)return;lifecycle.current++;pendingRef.current=false;setPending(false);setValues(initialSeed.current);setRuleErrors({});setSubmissionError(null)},onSubmit:async e=>{e.preventDefault();if(pendingRef.current)return;setSubmissionError(null);const fd=new FormData(e.currentTarget);const v={};fd.forEach((val,k)=>{v[k]=val});Object.assign(v,values);const errs=runRules(v);if(Object.keys(errs).some(k=>errs[k])){setRuleErrors(errs);return}pendingRef.current=true;setPending(true);const attempt=lifecycle.current;try{const aerrs=await runAsyncRules(v,attempt);if(attempt!==lifecycle.current)return;setRuleErrors(aerrs);if(Object.keys(aerrs).some(k=>aerrs[k]))return;await onSubmit?.(v)}catch(error){if(attempt===lifecycle.current)setSubmissionError(String(error&&error.message||error))}finally{if(attempt===lifecycle.current){pendingRef.current=false;setPending(false)}}}},keys.length||submissionError?React.createElement("div",{className:"cs-form__summary",role:"alert"},React.createElement("b",null,t("summary")),React.createElement("ul",null,submissionError?React.createElement("li",null,submissionError):null,keys.map(k=>React.createElement("li",{key:k},merged[k])))):null,React.createElement("fieldset",{disabled:pending,style:{display:"contents"}},children)))});Form.displayName="Form";const FormField=React.forwardRef(function FormField2({label,name,required=false,hint,error,valueProp="value",children,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Form",L,localeMessages);const autoId=React.useId();const ctx=React.useContext(getFormCtx());const err=error!==void 0&&error!==null?error:name&&ctx?ctx.errors[name]:void 0;const hasError=Boolean(err)||err===0;const singleElement=React.isValidElement(children)&&React.Children.count(children)===1;const isNativeControl=singleElement&&typeof children.type==="string"&&/^(input|select|textarea)$/i.test(children.type);const controlId=singleElement?children.props.controlProps?.id??children.props.id??autoId:autoId;const hasLabel=typeof label==="string"?label.trim().length>0:Boolean(label)||label===0;const field={controlId,labelId:hasLabel?autoId+"-field-label":void 0,descriptionId:!hasError&&(hint||hint===0)?autoId+"-field-hint":void 0,errorId:hasError?autoId+"-field-error":void 0,invalid:hasError,required};const Association=fieldAssociationContext();let child=children;if(singleElement){const wire={};if(isNativeControl&&children.props.id===void 0)wire.id=controlId;if(name&&ctx){const cur=String(name).includes(".")?getPath(ctx.values,name):ctx.values[name];wire.name=name;wire[valueProp]=cur!==void 0?cur:valueProp==="checked"||valueProp==="pressed"?false:"";wire.onChange=ev=>{const val=ev&&ev.target?valueProp==="checked"?ev.target.checked:ev.target.value:ev;ctx.setValue(name,val);if(children.props.onChange)children.props.onChange(ev)}}if(isNativeControl)Object.assign(wire,associateFieldProps({...children.props,...wire},field,{nativeRequired:true}));if(Object.keys(wire).length)child=React.cloneElement(children,wire)}const LabelTag=isNativeControl?"label":"span";return React.createElement("div",{...mergeTargetProps({className:cx("cs-formfield",hasError&&"has-error",className)},rootProps),ref:mergedNativeRef},React.createElement(LabelTag,{id:field.labelId,className:"cs-formfield__label",htmlFor:isNativeControl?controlId:void 0},label,required?React.createElement(React.Fragment,null," ",React.createElement("em",{"aria-label":t("required")},"*")):null),React.createElement(Association.Provider,{value:field},typeof children==="function"?children(associateFieldProps({},field)):child),hasError?React.createElement("span",{id:field.errorId,className:"cs-formfield__error",role:"alert"},err):hint||hint===0?React.createElement("span",{id:field.descriptionId,className:"cs-formfield__hint"},hint):null)});FormField.displayName="FormField";const FormFieldArray=React.forwardRef(function FormFieldArray2({name,children,label,min=0,max=50,addLabel,defaultItem,className,rootProps,lang},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Form",L,localeMessages);const ctx=React.useContext(getFormCtx());if(!ctx){return React.createElement("div",{ref:mergedNativeRef,className:"cs-formfield__error",role:"alert"},t("arrayContext"))}const list=Array.isArray(getPath(ctx.values,name))?getPath(ctx.values,name):[];const blank=()=>defaultItem!=null?typeof defaultItem==="function"?defaultItem():{...defaultItem}:{};const updateList=change=>ctx.updateArray(name,change);const add=()=>{if(list.length>=max)return;const item=blank();updateList(current=>{if(current.length>=max)return current;const next=[...current,item];arrayRowKeys.set(next,[...rowKeys(current),++nextRowKey]);return next})};const removeAt=i=>{const target=list[i];const targetKey=rowKeys(list)[i];updateList(current=>{if(current.length<=min)return current;const index=rowKeys(current).indexOf(targetKey);if(index<0||current[index]!==target)return current;const next=current.filter((_,idx)=>idx!==index);arrayRowKeys.set(next,rowKeys(current).filter((_,idx)=>idx!==index));return next})};return React.createElement("div",{...mergeTargetProps({className:cx("cs-form-array",className),"data-name":name},rootProps,["data-name"]),ref:mergedNativeRef},label||label===0?React.createElement("div",{className:"cs-formfield__label",style:{marginBottom:8}},label):null,React.createElement("div",{className:"cs-form-array__rows"},list.map((item,index)=>React.createElement("div",{className:"cs-form-array__row",key:rowKeys(list)[index],"data-index":index},typeof children==="function"?children({index,item,remove:()=>removeAt(index),path:field=>`${name}.${index}.${field}`}):children))),React.createElement("button",{type:"button",className:"cs-button cs-button--secondary cs-button--sm",onClick:add,disabled:list.length>=max,style:{marginTop:8}},addLabel||t("addRow")))});FormFieldArray.displayName="FormFieldArray";const FormWizard=React.forwardRef(function FormWizard2({steps=[],initialValues,onComplete,lang,className,rootProps,nextLabel,backLabel,finishLabel},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Form",L,localeMessages);const[step,setStep]=React.useState(0);const{values,ruleErrors,setValues,setRuleErrors,updateArray}=useFormController(initialValues);const[pending,setPending]=React.useState(false);const pendingRef=React.useRef(false);const[submissionError,setSubmissionError]=React.useState(null);const setValue=React.useCallback((name,v)=>{setValues(s=>String(name).includes(".")?setPath(s,name,v):{...s,[name]:v});setRuleErrors(e=>e[name]?{...e,[name]:void 0}:e)},[]);const runRules=React.useCallback((v,ruleMap)=>{if(!ruleMap)return{};const out={};for(const[name,r]of Object.entries(ruleMap)){for(const rule of Array.isArray(r)?r:[r]){const fieldVal=String(name).includes(".")?getPath(v,name):v[name];const msg=rule==="required"?fieldVal==null||String(fieldVal).trim()===""?t("requiredField"):null:typeof rule==="function"?rule(fieldVal,v):null;if(msg){out[name]=msg;break}}}return out},[t]);const current=steps[step]||{};const ctx={values,setValue,setValues,updateArray,errors:ruleErrors,pending,runRules,setRuleErrors,t,L};const keys=Object.keys(ruleErrors).filter(k=>ruleErrors[k]);const goNext=async()=>{if(pendingRef.current)return;setSubmissionError(null);const errs=runRules(values,current.rules);if(Object.keys(errs).some(k=>errs[k])){setRuleErrors(errs);return}setRuleErrors({});if(step>=steps.length-1){pendingRef.current=true;setPending(true);try{await onComplete?.(values)}catch(error){setSubmissionError(String(error&&error.message||error))}finally{pendingRef.current=false;setPending(false)}return}setStep(s=>s+1)};const goBack=()=>{if(pendingRef.current)return;setSubmissionError(null);setRuleErrors({});setStep(s=>Math.max(0,s-1))};const Ctx=getFormCtx();return React.createElement(Ctx.Provider,{value:ctx},React.createElement("div",{...mergeTargetProps({className:cx("cs-form-wizard",className),"data-step":step,"aria-busy":pending||void 0},rootProps,["data-step","aria-busy"]),ref:mergedNativeRef},React.createElement("ol",{className:"cs-form-wizard__steps",style:{display:"flex",gap:10,listStyle:"none",padding:0,margin:"0 0 16px",flexWrap:"wrap"}},steps.map((s,i)=>React.createElement("li",{key:s.id||i,"aria-current":i===step?"step":void 0,style:{font:"700 11px/1 var(--cs-font-family-ui)",fontWeight:i===step?700:500,textTransform:"uppercase",letterSpacing:".06em",color:i===step?"var(--cs-color-text-primary)":"var(--cs-color-text-secondary)"}},i+1,". ",s.title||s.id||`${t("step")} ${i+1}`))),keys.length||submissionError?React.createElement("div",{className:"cs-form__summary",role:"alert"},React.createElement("b",null,t("summary")),React.createElement("ul",null,submissionError?React.createElement("li",null,submissionError):null,keys.map(k=>React.createElement("li",{key:k},ruleErrors[k])))):null,React.createElement("div",{className:"cs-form-wizard__body"},React.createElement("fieldset",{disabled:pending,style:{display:"contents"}},typeof current.render==="function"?current.render({values,step,setValue}):null)),React.createElement("div",{className:"cs-form-wizard__nav",style:{display:"flex",gap:10,marginTop:16}},React.createElement("button",{type:"button",className:"cs-button cs-button--secondary cs-button--sm",onClick:goBack,disabled:step===0||pending},backLabel||t("back")),React.createElement("button",{type:"button",className:"cs-button cs-button--sm",onClick:goNext,disabled:pending},step>=steps.length-1?finishLabel||t("finish"):nextLabel||t("next")))))});FormWizard.displayName="FormWizard";Object.assign(__ds_scope,{getPath,setPath,Form,FormField,FormFieldArray,FormWizard})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Form.jsx",error:String(e&&e.message||e)})}try{(()=>{const{mergeIds}=__ds_scope;const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const EYE=React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z"}),React.createElement("circle",{cx:"12",cy:"12",r:"3"}));const EYE_OFF=React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z"}),React.createElement("circle",{cx:"12",cy:"12",r:"3"}),React.createElement("path",{d:"M4 4l16 16"}));const X=React.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round","aria-hidden":"true"},React.createElement("path",{d:"M6 6l12 12M18 6L6 18"}));const InputGroup=React.forwardRef(function InputGroup2({id,label,prefix,suffix,clearable=false,password=false,value,onChange,defaultValue="",placeholder,disabled=false,readOnly=false,lang,className,...props},forwardedRef){const[inner,setInner]=React.useState(defaultValue);const val=value!=null?value:inner;const set=v=>{if(disabled||readOnly)return;if(value==null)setInner(v);onChange&&onChange(v)};const[show,setShow]=React.useState(false);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("InputGroup",L,localeMessages);const gid=React.useId();const sid=id??gid;const hasLabel=Boolean(label)||label===0;const labelId=hasLabel?sid+"-label":void 0;const labelledBy=props["aria-labelledby"]??(props["aria-label"]==null?labelId:void 0);return React.createElement("div",{ref:mergedNativeRef,className:cx("cs-field",disabled&&"is-disabled",className)},hasLabel?React.createElement("label",{id:labelId,className:"cs-field__label",htmlFor:sid},label):null,React.createElement("span",{className:"cs-igroup"},prefix!=null?React.createElement("span",{className:"cs-igroup__fix"},prefix):null,React.createElement("input",{...props,id:sid,type:password&&!show?"password":"text",value:val,placeholder,disabled,readOnly,"aria-labelledby":labelledBy,"aria-describedby":mergeIds(props["aria-describedby"]),"aria-label":props["aria-label"]??(hasLabel||props["aria-labelledby"]!=null?void 0:placeholder||t("input")),onChange:e=>set(e.target.value)}),clearable&&String(val).length?React.createElement("button",{type:"button",className:"cs-igroup__btn","aria-label":t("clear"),disabled:disabled||readOnly,onClick:()=>set("")},X):null,password?React.createElement("button",{type:"button",className:"cs-igroup__btn","aria-label":show?t("hide"):t("show"),"aria-pressed":show,disabled,onClick:()=>setShow(s=>!s)},show?EYE_OFF:EYE):null,suffix!=null?React.createElement("span",{className:"cs-igroup__fix cs-igroup__fix--suffix"},suffix):null))});InputGroup.displayName="InputGroup";Object.assign(__ds_scope,{InputGroup})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/InputGroup.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{renderCount}=__ds_scope;const InputOTP=React.forwardRef(function InputOTP2({length:requestedLength=6,value,onChange,onComplete,label,lang,disabled=false,className,id,description,error,required=false,rootProps,controlProps},forwardedRef){const length=renderCount(requestedLength,6);const[inner,setInner]=React.useState("");const val=(value!=null?value:inner).slice(0,length);const boxes=React.useRef([]);const set=v=>{if(disabled)return;v=v.replace(/\D/g,"").slice(0,length);if(value==null)setInner(v);onChange&&onChange(v);if(v.length===length&&onComplete)onComplete(v)};const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const lbl=label!=null?label:makeT("InputOTP",L,localeMessages)("label");const group=mergeTargetProps(mergeTargetProps({},rootProps,["role","name","value","required","aria-required"]),controlProps,["role","name","value","required","aria-required"]);const requiredDescription=required?makeT("Form",L,localeMessages)("required"):void 0;const control=useFieldAssociation({id:group.id??id,"aria-label":group["aria-label"]??(group["aria-labelledby"]?void 0:label),"aria-labelledby":group["aria-labelledby"],"aria-describedby":group["aria-describedby"],"aria-invalid":group["aria-invalid"]},{fallbackLabel:lbl,description,error,required,requiredSupported:false,requiredDescription});return React.createElement(React.Fragment,null,React.createElement("div",{...group,...control,ref:mergedNativeRef,className:cx("cs-otp",className,group.className),role:"group"},Array.from({length}).map((_,i)=>React.createElement(React.Fragment,{key:i},React.createElement("span",{id:control.id+"-digit-"+(i+1),style:{position:"absolute",width:1,height:1,overflow:"hidden",clipPath:"inset(50%)"}},i+1+"/"+length),React.createElement("input",{"aria-labelledby":control["aria-labelledby"]?control["aria-labelledby"]+" "+control.id+"-digit-"+(i+1):void 0,id:control.id+"-"+(i+1),"aria-describedby":control["aria-describedby"],"aria-invalid":control["aria-invalid"],ref:el=>boxes.current[i]=el,inputMode:"numeric",pattern:"[0-9]*",maxLength:1,disabled,value:val[i]||"","aria-label":(control["aria-label"]||lbl)+" "+(i+1)+"/"+length,onChange:e=>{if(e.target.value===""){set(val.slice(0,i)+val.slice(i+1));return}const c=e.target.value.replace(/\D/g,"");if(!c)return;set(val.slice(0,i)+c+val.slice(i+1));const nb=boxes.current[i+1];if(nb)nb.focus()},onKeyDown:e=>{if(e.nativeEvent.isComposing||e.keyCode===229||e.key!=="Backspace")return;e.preventDefault();const arr=val.split("");if(arr[i])arr.splice(i,1);else if(i>0)arr.splice(i-1,1);set(arr.join(""));const pb=boxes.current[Math.max(0,i-1)];if(pb)pb.focus()},onPaste:e=>{e.preventDefault();const p=(e.clipboardData.getData("text")||"").replace(/\D/g,"").slice(0,length);set(p);const nb=boxes.current[Math.min(length-1,p.length)];if(nb)nb.focus()}})))),fieldMessages(control,description,error,requiredDescription))});InputOTP.displayName="InputOTP";Object.assign(__ds_scope,{InputOTP})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/InputOTP.jsx",error:String(e&&e.message||e)})}try{(()=>{const{mergeIds}=__ds_scope;const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const NativeSelect=React.forwardRef(function NativeSelect2({id,label,error,options,children,disabled=false,size="md",className,value,defaultValue,onChange,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const hasError=Boolean(error)||error===0;const gid=React.useId();const sid=id??gid;const hasLabel=Boolean(label)||label===0;const labelId=hasLabel?sid+"-label":void 0;const labelledBy=props["aria-labelledby"]??(props["aria-label"]==null?labelId:void 0);const errId=hasError?sid+"-err":void 0;const describedBy=mergeIds(props["aria-describedby"],errId);return React.createElement("label",{className:cx("cs-field","cs-native-select-field",disabled&&"is-disabled",hasError&&"is-invalid",className),htmlFor:sid},label||label===0?React.createElement("span",{id:labelId,className:"cs-field__label"},label):null,React.createElement("span",{className:cx("cs-native-select",`cs-native-select--${size}`)},React.createElement("select",{...props,id:sid,disabled,value,defaultValue,onChange,"aria-invalid":hasError?true:props["aria-invalid"],"aria-labelledby":labelledBy,"aria-describedby":describedBy,className:"cs-field__control",ref:mergedNativeRef},options?options.map(o=>React.createElement("option",{key:o.value,value:o.value,disabled:o.disabled},o.label)):children),React.createElement("span",{className:"cs-native-select__chevron","aria-hidden":"true"},React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React.createElement("path",{d:"M6 9l6 6 6-6"})))),hasError?React.createElement("span",{id:errId,className:"cs-field__error",role:"alert"},error):null)});NativeSelect.displayName="NativeSelect";Object.assign(__ds_scope,{NativeSelect})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/NativeSelect.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const NumberField=React.forwardRef(function NumberField2({id,label,value,defaultValue=0,onChange,min,max,step=1,disabled=false,lang,className,children,rootProps,controlProps,description,error,required=false,...props},forwardedRef){const[inner,setInner]=React.useState(()=>defaultValue);const inputRef=React.useRef(null);const mergedNativeRef=useComposedRefs(inputRef,forwardedRef);const val=value!=null?value:inner;const clamp=n=>{if(min!=null)n=Math.max(min,n);if(max!=null)n=Math.min(max,n);return n};const set=n=>{const c=clamp(n);if(value==null)setInner(c);onChange?.(c)};const stepBy=direction=>{const input=inputRef.current;if(!input)return;const probe=input.cloneNode(false);probe.value=input.value;probe.stepUp(direction);if(Number.isFinite(probe.valueAsNumber))set(probe.valueAsNumber)};const[ref,L,localeMessages]=useLang(lang);const t=makeT("NumberField",L,localeMessages);const control=useFieldAssociation(mergeTargetProps({...props,id:controlProps?.id??id,type:"number",value:val,min,max,step,disabled,"aria-label":props["aria-label"]??label,onChange:e=>{const raw=e.target.value;if(raw===""){if(value==null)setInner("");return}const num=Number(raw);if(Number.isFinite(num))set(num)},onBlur:e=>{if(inner===""&&value==null)setInner(clamp(0));props.onBlur?.(e)}},controlProps,["role","type","value","defaultValue","onChange","min","max","step","disabled"]),{id:controlProps?.id??id,fallbackLabel:label?void 0:t("value"),nativeRequired:true,description,error,required});return React.createElement("div",{...mergeTargetProps({className:cx("cs-field",disabled&&"is-disabled",className)},rootProps),ref},label?React.createElement("label",{className:"cs-field__label",htmlFor:control.id},label):null,React.createElement("div",{className:"cs-stepper"},React.createElement("button",{type:"button","aria-label":t("decrease"),disabled:disabled||min!=null&&val!==""&&val<=min,onClick:()=>stepBy(-1)},"−"),React.createElement("input",{...control,ref:mergedNativeRef}),React.createElement("button",{type:"button","aria-label":t("increase"),disabled:disabled||max!=null&&val!==""&&val>=max,onClick:()=>stepBy(1)},"+")),fieldMessages(control,description,error))});NumberField.displayName="NumberField";Object.assign(__ds_scope,{NumberField})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/NumberField.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeIds,mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const Radio=React.forwardRef(function Radio2({label,description,disabled=false,className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const generatedId=React.useId();const hasLabel=Boolean(label)||label===0;const hasDescription=Boolean(description)||description===0;const labelId=hasLabel?generatedId+"-label":void 0;const descriptionId=hasDescription?generatedId+"-description":void 0;const labelledBy=props["aria-labelledby"]??(props["aria-label"]==null?labelId:void 0);const describedBy=mergeIds(props["aria-describedby"],descriptionId);return React.createElement("label",{className:cx("cs-radio",disabled&&"is-disabled",className)},React.createElement("input",{type:"radio",disabled,...props,"aria-labelledby":labelledBy,"aria-describedby":describedBy,ref:mergedNativeRef}),React.createElement("span",{className:"cs-radio__text"},React.createElement("span",{id:labelId},label),description||description===0?React.createElement("span",{id:descriptionId,className:"cs-radio__desc"},description):null))});Radio.displayName="Radio";const RadioGroup=React.forwardRef(function RadioGroup2({legend,name,value,onChange,options=[],className,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const gid=React.useId();const nm=name??gid;return React.createElement("fieldset",{...mergeTargetProps({"className":cx("cs-radio-group",className)},rootProps,[]),ref:mergedNativeRef},legend||legend===0?React.createElement("legend",null,legend):null,options.map(o=>React.createElement(Radio,{key:o.value,name:nm,value:o.value,label:o.label,description:o.description,disabled:o.disabled,checked:value===o.value,onChange:()=>onChange&&onChange(o.value)})))});RadioGroup.displayName="RadioGroup";Object.assign(__ds_scope,{Radio,RadioGroup})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/RadioGroup.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{renderCount}=__ds_scope;const STAR="M12 2l2.9 6.2 6.6.8-4.9 4.6 1.3 6.5L12 16.9 6.1 20l1.3-6.5L2.5 9l6.6-.8z";const Rating=React.forwardRef(function Rating2({value,defaultValue=0,onChange,max:requestedMax=5,readOnly=false,label,lang,className,id,description,error,required=false,rootProps,controlProps},forwardedRef){const max=renderCount(requestedMax,5);const[inner,setInner]=React.useState(defaultValue);const val=value!=null?value:inner;const commit=n=>{if(readOnly)return;if(value==null)setInner(n);onChange&&onChange(n)};const set=n=>commit(n===val?0:n);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const lbl=label!=null?label:makeT("Rating",L,localeMessages)("label");const group=mergeTargetProps(mergeTargetProps({},rootProps,["role","name","value","required"]),controlProps,["role","name","value","required"]);const requiredDescription=void 0;const control=useFieldAssociation({id:group.id??id,"aria-label":group["aria-label"]??(group["aria-labelledby"]?void 0:label?label+": "+val+" / "+max:void 0),"aria-labelledby":group["aria-labelledby"],"aria-describedby":group["aria-describedby"],"aria-invalid":group["aria-invalid"],"aria-required":group["aria-required"]},{fallbackLabel:lbl+": "+val+" / "+max,description,error,required,requiredSupported:true,requiredDescription});const refs=React.useRef([]);const focusIdx=val>0?Math.min(max,val)-1:0;const move=(from,delta)=>{if(readOnly)return;const next=Math.max(0,Math.min(max-1,from+delta));commit(next+1);const b=refs.current[next];if(b)b.focus()};const onKeyDown=(e,i)=>{if(readOnly||e.nativeEvent.isComposing||e.keyCode===229)return;if(e.key==="ArrowRight"||e.key==="ArrowUp"){e.preventDefault();move(i,1)}else if(e.key==="ArrowLeft"||e.key==="ArrowDown"){e.preventDefault();move(i,-1)}else if(e.key==="Home"){e.preventDefault();move(i,-i)}else if(e.key==="End"){e.preventDefault();move(i,max-1-i)}};return React.createElement(React.Fragment,null,React.createElement("div",{...group,...control,ref:mergedNativeRef,className:cx("cs-rating",className,group.className),role:"radiogroup","data-readonly":readOnly?"true":void 0},Array.from({length:max}).map((_,i)=>React.createElement("button",{key:i,type:"button",role:"radio","aria-checked":i+1===val,"aria-label":i+1+" / "+max,className:i<val?"on":void 0,onClick:()=>set(i+1),tabIndex:readOnly?-1:i===focusIdx?0:-1,ref:el=>{refs.current[i]=el},onKeyDown:e=>onKeyDown(e,i)},React.createElement("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:i<val?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:STAR}))))),fieldMessages(control,description,error,requiredDescription))});Rating.displayName="Rating";Object.assign(__ds_scope,{Rating})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Rating.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const SearchField=React.forwardRef(function SearchField2({value,defaultValue="",onChange,onClear,disabled=false,readOnly=false,placeholder,lang,className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const[inner,setInner]=React.useState(()=>defaultValue==null?"":String(defaultValue));const val=value!=null?value:inner;const set=v=>{if(disabled||readOnly)return;if(value==null)setInner(v);onChange?.(v)};const[ref,L,localeMessages]=useLang(lang);const t=makeT("SearchField",L,localeMessages);const ph=placeholder!=null?placeholder:t("placeholder");return React.createElement("div",{ref,className:cx("cs-search",className)},React.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("circle",{cx:"11",cy:"11",r:"7"}),React.createElement("path",{d:"M21 21l-4.3-4.3"})),React.createElement("input",{"aria-label":props["aria-label"]||(props["aria-labelledby"]?void 0:ph),...props,type:"text",role:"searchbox",value:val,disabled,readOnly,placeholder:ph,onChange:e=>set(e.target.value),ref:mergedNativeRef}),String(val).length?React.createElement("button",{type:"button",className:"cs-search__clear","aria-label":t("clear"),disabled:disabled||readOnly,onClick:()=>{if(disabled||readOnly)return;set("");onClear&&onClear()}},React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},React.createElement("path",{d:"M6 6l12 12M18 6L6 18"}))):null)});SearchField.displayName="SearchField";Object.assign(__ds_scope,{SearchField})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/SearchField.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const SegmentedControl=React.forwardRef(function SegmentedControl2({options=[],value,onChange,mode,role,className,...props},forwardedRef){if(role!==void 0&&role!=="tablist"&&role!=="radiogroup")throw new TypeError("Unsupported SegmentedControl role: "+role);const effectiveMode=mode===void 0?role==="tablist"?"tabs":"radio":mode;if(effectiveMode!=="radio"&&effectiveMode!=="tabs")throw new TypeError("Unsupported SegmentedControl mode: "+effectiveMode);const tabs=effectiveMode==="tabs";const mergedNativeRef=useComposedRefs(forwardedRef);const refs=React.useRef([]);const idx=Math.max(0,options.findIndex(o=>o.value===value));const vertical=props["aria-orientation"]==="vertical";const key=(e,i)=>{if(e.defaultPrevented||e.isComposing||e.nativeEvent?.isComposing||e.keyCode===229)return;let n=null;if(e.key===(vertical?"ArrowDown":"ArrowRight"))n=(i+1)%options.length;else if(e.key===(vertical?"ArrowUp":"ArrowLeft"))n=(i-1+options.length)%options.length;else if(e.key==="Home")n=0;else if(e.key==="End")n=options.length-1;if(n==null)return;e.preventDefault();if(onChange)onChange(options[n].value);const b=refs.current[n];if(b)b.focus()};return React.createElement("div",{...props,role:tabs?"tablist":"radiogroup","aria-orientation":vertical?"vertical":"horizontal",className:cx("cs-segmented",className),ref:mergedNativeRef},options.map((o,i)=>React.createElement("button",{key:o.value,type:"button",role:tabs?"tab":"radio",id:o.id,"aria-controls":o["aria-controls"],"aria-selected":tabs?value===o.value:void 0,"aria-checked":tabs?void 0:value===o.value,tabIndex:i===idx?0:-1,ref:el=>refs.current[i]=el,onKeyDown:e=>key(e,i),onClick:()=>onChange&&onChange(o.value)},o.icon||o.icon===0?React.createElement("span",{"aria-hidden":"true"},o.icon):null,o.label)))});SegmentedControl.displayName="SegmentedControl";Object.assign(__ds_scope,{SegmentedControl})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/SegmentedControl.jsx",error:String(e&&e.message||e)})}try{(()=>{const{mergeIds}=__ds_scope;const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Select=React.forwardRef(function Select2({id,label,description,error,options,children,disabled=false,lang,className,placeholder,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const[ref,L,localeMessages]=useLang(lang);const t=makeT("Select",L,localeMessages);const hasError=Boolean(error)||error===0;const hasDescription=Boolean(description)||description===0;const gid=React.useId();const sid=id??gid;const hasLabel=Boolean(label)||label===0;const labelId=hasLabel?sid+"-label":void 0;const labelledBy=props["aria-labelledby"]??(props["aria-label"]==null?labelId:void 0);const descId=hasDescription?sid+"-desc":void 0;const errId=hasError?sid+"-err":void 0;const describedBy=mergeIds(props["aria-describedby"],descId,errId);return React.createElement("label",{ref,className:cx("cs-field",disabled&&"is-disabled",hasError&&"is-invalid",className),htmlFor:sid},label||label===0?React.createElement("span",{id:labelId,className:"cs-field__label"},label):null,hasDescription?React.createElement("span",{id:descId,className:"cs-field__description"},description):null,React.createElement("span",{className:"cs-select"},React.createElement("select",{...props,id:sid,disabled,"aria-invalid":hasError?true:props["aria-invalid"],"aria-labelledby":labelledBy,"aria-describedby":describedBy,className:"cs-field__control",ref:mergedNativeRef},placeholder!=null||!children?React.createElement("option",{value:"",disabled:true,hidden:true},placeholder??t("placeholder")):null,options?options.map(o=>React.createElement("option",{key:o.value,value:o.value},o.label)):children),React.createElement("span",{className:"cs-select__chevron","aria-hidden":"true"},React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React.createElement("path",{d:"M6 9l6 6 6-6"})))),hasError?React.createElement("span",{id:errId,className:"cs-field__error",role:"alert"},error):null)});Select.displayName="Select";Object.assign(__ds_scope,{Select})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Select.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Slider=React.forwardRef(function Slider2({className,children,lang,"aria-label":ariaLabel,...props},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Slider",L,localeMessages);return React.createElement("input",{ref:mergedNativeRef,type:"range",className:cx("cs-slider",className),"aria-label":ariaLabel??t("label"),...props})});Slider.displayName="Slider";Object.assign(__ds_scope,{Slider})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Slider.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Switch=React.forwardRef(function Switch2({label,disabled=false,className,children,lang,"aria-label":ariaLabel,"aria-labelledby":ariaLabelledby,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const[ref,L,localeMessages]=useLang(lang);const t=makeT("Switch",L,localeMessages);const hasLabel=Boolean(label)||label===0;const named=!!(hasLabel||ariaLabel||ariaLabelledby);const fallback=t("label");const{onChange,...rest}=props;return React.createElement("label",{ref,className:cx("cs-switch",disabled&&"is-disabled",className)},React.createElement("input",{type:"checkbox",role:"switch",disabled,"aria-label":ariaLabel??(named?void 0:fallback),"aria-labelledby":ariaLabelledby,onChange:e=>{if(onChange)onChange(e)},...rest,ref:mergedNativeRef}),React.createElement("span",{className:"cs-switch__track","aria-hidden":"true"}),hasLabel?React.createElement("span",{className:"cs-switch__label"},label):null)});Switch.displayName="Switch";Object.assign(__ds_scope,{Switch})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Switch.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const TagInput=React.forwardRef(function TagInput2({controlRef,id,label,value,defaultValue=[],onChange,placeholder,max,disabled=false,lang,className,description,error,required=false,rootProps,controlProps},forwardedRef){const mergedControlRef=useComposedRefs(controlRef);const[inner,setInner]=React.useState(defaultValue);const tags=value!=null?value:inner;const[q,setQ]=React.useState("");const set=arr=>{if(disabled)return;if(value==null)setInner(arr);onChange&&onChange(arr)};const add=s=>{if(disabled)return;s=s.trim();if(!s)return;if(tags.includes(s)){setQ("");return}if(max!=null&&tags.length>=max)return;set([...tags,s]);setQ("")};const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("TagInput",L,localeMessages);const ph=placeholder!=null?placeholder:t("placeholder");const control=useFieldAssociation({id:controlProps?.id??id,"aria-label":controlProps?.["aria-label"],"aria-labelledby":controlProps?.["aria-labelledby"],"aria-describedby":controlProps?.["aria-describedby"],"aria-invalid":controlProps?.["aria-invalid"],"aria-required":controlProps?.["aria-required"]},{fallbackLabel:label?void 0:ph,description,error,required,requiredSupported:true});const sid=control.id;if(label&&!controlProps?.["aria-labelledby"]&&!controlProps?.["aria-label"])control["aria-labelledby"]=sid+"-label";return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-field",disabled&&"is-disabled",className)},rootProps)},label?React.createElement("label",{id:sid+"-label",className:"cs-field__label",htmlFor:sid},label):null,React.createElement("div",{className:"cs-taginput"},tags.map(tag=>React.createElement("span",{key:tag,className:"cs-tag"},tag,React.createElement("button",{type:"button",className:"cs-tag__close","aria-label":t("remove")+" "+tag,onClick:()=>set(tags.filter(x=>x!==tag)),disabled},React.createElement("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round","aria-hidden":"true"},React.createElement("path",{d:"M6 6l12 12M18 6L6 18"}))))),React.createElement("input",{...mergeTargetProps({...control,value:q,placeholder:tags.length?"":ph,disabled,onChange:e=>setQ(e.target.value),onKeyDown:e=>{if(disabled||e.nativeEvent.isComposing||e.keyCode===229)return;if(e.key==="Enter"||e.key===","){e.preventDefault();add(q)}else if(e.key==="Backspace"&&!q&&tags.length){set(tags.slice(0,-1))}},onBlur:()=>add(q)},controlProps,["id","role","type","name","value","defaultValue","disabled","required","aria-required","aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-haspopup","aria-expanded","aria-controls","aria-activedescendant","onChange"]),ref:mergedControlRef})),fieldMessages(control,description,error))});TagInput.displayName="TagInput";Object.assign(__ds_scope,{TagInput})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/TagInput.jsx",error:String(e&&e.message||e)})}try{(()=>{const{mergeIds}=__ds_scope;const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Textarea=React.forwardRef(function Textarea2({id,label,description,error,disabled=false,rows=4,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const hasError=Boolean(error)||error===0;const hasDescription=Boolean(description)||description===0;const gid=React.useId();const tid=id??gid;const hasLabel=Boolean(label)||label===0;const labelId=hasLabel?tid+"-label":void 0;const labelledBy=props["aria-labelledby"]??(props["aria-label"]==null?labelId:void 0);const descId=hasDescription?tid+"-desc":void 0;const errId=hasError?tid+"-err":void 0;const describedBy=mergeIds(props["aria-describedby"],descId,errId);return React.createElement("label",{className:cx("cs-field",disabled&&"is-disabled",hasError&&"is-invalid",className),htmlFor:tid},label||label===0?React.createElement("span",{id:labelId,className:"cs-field__label"},label):null,hasDescription?React.createElement("span",{id:descId,className:"cs-field__description"},description):null,React.createElement("textarea",{...props,id:tid,rows,disabled,"aria-invalid":hasError?true:props["aria-invalid"],"aria-labelledby":labelledBy,"aria-describedby":describedBy,className:"cs-field__control",ref:mergedNativeRef}),hasError?React.createElement("span",{id:errId,className:"cs-field__error",role:"alert"},error):null)});Textarea.displayName="Textarea";Object.assign(__ds_scope,{Textarea})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Textarea.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const CLOCK=React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("circle",{cx:"12",cy:"12",r:"9"}),React.createElement("path",{d:"M12 7v5l3 3"}));const TimePicker=React.forwardRef(function TimePicker2({controlRef,value="09:00",onChange,step=30,label,"aria-labelledby":ariaLabelledBy,disabled=false,lang,className,rootProps},forwardedRef){const mergedControlRef=useComposedRefs(controlRef);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("TimePicker",L,localeMessages);const stepMin=Number(step);const safeStep=Number.isInteger(stepMin)&&stepMin>=1&&stepMin<=1440?stepMin:30;const opts=[];for(let m=0;m<24*60;m+=safeStep){opts.push(String(Math.floor(m/60)).padStart(2,"0")+":"+String(m%60).padStart(2,"0"))}return React.createElement("span",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-timepicker",className)},rootProps,[])},CLOCK,React.createElement("select",{"aria-label":label!=null?label:ariaLabelledBy?void 0:t("label"),"aria-labelledby":ariaLabelledBy,disabled,value,onChange:e=>onChange&&onChange(e.target.value),ref:mergedControlRef},opts.map(o=>React.createElement("option",{key:o,value:o},o))))});TimePicker.displayName="TimePicker";Object.assign(__ds_scope,{TimePicker})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/TimePicker.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Toggle=React.forwardRef(function Toggle2({pressed,defaultPressed=false,onChange,onClick,icon,children,disabled=false,lang,className,"aria-label":ariaLabel,...props},forwardedRef){const[inner,setInner]=React.useState(defaultPressed);const on=pressed!=null?pressed:inner;const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Toggle",L,localeMessages);const hasContent=React.Children.toArray(children).some(child=>typeof child!=="string"||child.trim().length>0);const flip=()=>{const v=!on;if(pressed==null)setInner(v);onChange&&onChange(v)};return React.createElement("button",{ref:mergedNativeRef,type:"button",className:cx("cs-toggle",className),"aria-pressed":on,"aria-label":ariaLabel??(hasContent?void 0:t("label")),disabled,onClick:event=>{onClick?.(event);if(!event.defaultPrevented)flip()},...props},icon||icon===0?React.createElement("span",{"aria-hidden":"true",style:{display:"inline-flex"}},icon):null,children)});Toggle.displayName="Toggle";Object.assign(__ds_scope,{Toggle})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Toggle.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Transfer=React.forwardRef(function Transfer2({items=[],value=[],onChange,titles,lang,className,rootProps},forwardedRef){const[checked,setChecked]=React.useState([]);React.useEffect(()=>{setChecked(current=>{const next=current.filter(key=>items.some(item=>item.key===key));return next.length===current.length?current:next})},[items]);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Transfer",L,localeMessages);const tt=titles||[t("source"),t("target")];const inTarget=k=>value.includes(k);const toggle=k=>setChecked(c=>c.includes(k)?c.filter(x=>x!==k):[...c,k]);const move=toTarget=>{const mv=checked.filter(k=>items.some(item=>item.key===k)&&inTarget(k)!==toTarget);if(!mv.length)return;onChange&&onChange(toTarget?[...value,...mv]:value.filter(k=>!mv.includes(k)));setChecked([])};const renderList=target=>React.createElement("div",{className:"cs-transfer__list"},React.createElement("div",{className:"cs-transfer__title"},target?tt[1]:tt[0]),React.createElement("ul",null,items.filter(it=>inTarget(it.key)===target).map(it=>React.createElement("li",{key:it.key},React.createElement("label",null,React.createElement("input",{type:"checkbox",checked:checked.includes(it.key),onChange:()=>toggle(it.key)})," ",it.label)))));return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-transfer",className)},rootProps,[])},renderList(false),React.createElement("div",{className:"cs-transfer__ops"},React.createElement("button",{type:"button",className:"cs-button cs-button--secondary cs-button--xs","aria-label":t("toTarget"),onClick:()=>move(true)},"›"),React.createElement("button",{type:"button",className:"cs-button cs-button--secondary cs-button--xs","aria-label":t("toSource"),onClick:()=>move(false)},"‹")),renderList(true))});Transfer.displayName="Transfer";Object.assign(__ds_scope,{Transfer})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Transfer.jsx",error:String(e&&e.message||e)})}try{(()=>{const parseEditorFragment=(()=>{var editorParser=(()=>{var de=Object.defineProperty;var Wt=Object.getOwnPropertyDescriptor;var Xt=Object.getOwnPropertyNames;var Jt=Object.prototype.hasOwnProperty;var Kt=(e,t,a)=>t in e?de(e,t,{enumerable:true,configurable:true,writable:true,value:a}):e[t]=a;var Gt=(e,t)=>{for(var a in t)de(e,a,{get:t[a],enumerable:true})},jt=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let E of Xt(t))!Jt.call(e,E)&&E!==a&&de(e,E,{get:()=>t[E],enumerable:!(n=Wt(t,E))||n.enumerable});return e};var Qt=e=>jt(de({},"__esModule",{value:true}),e);var H=(e,t,a)=>Kt(e,typeof t!="symbol"?t+"":t,a);var hr={};Gt(hr,{parseFragment:()=>Yt});var Vt=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),f="�",r;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(r||(r={}));var P={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ae(e){return e>=55296&&e<=57343}function Qe(e){return e>=56320&&e<=57343}function Ve(e,t){return(e-55296)*1024+9216+t}function me(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Re(e){return e>=64976&&e<=65007||Vt.has(e)}var T;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(T||(T={}));var zt=65536,fe=class{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=false,this.lastChunkWritten=false,this.endOfChunkHit=false,this.bufferWaterline=zt,this.isEol=false,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,a){let{line:n,col:E,offset:_}=this,u=E+a,d=_+a;return{code:t,startLine:n,endLine:n,startCol:u,endCol:u,startOffset:d,endOffset:d}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){let a=this.html.charCodeAt(this.pos+1);if(Qe(a))return this.pos++,this._addGap(),Ve(t,a)}else if(!this.lastChunkWritten)return this.endOfChunkHit=true,r.EOF;return this._err(T.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,a){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=false,this.lastChunkWritten=a}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=false}startsWith(t,a){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,false;if(a)return this.html.startsWith(t,this.pos);for(let n=0;n<t.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==t.charCodeAt(n))return false;return true}peek(t){let a=this.pos+t;if(a>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,r.EOF;let n=this.html.charCodeAt(a);return n===r.CARRIAGE_RETURN?r.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=false,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,r.EOF;let t=this.html.charCodeAt(this.pos);return t===r.CARRIAGE_RETURN?(this.isEol=true,this.skipNextNewLine=true,r.LINE_FEED):t===r.LINE_FEED&&(this.isEol=true,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=false,this._addGap(),this.advance()):(this.skipNextNewLine=false,Ae(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===r.LINE_FEED||t===r.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){me(t)?this._err(T.controlCharacterInInputStream):Re(t)&&this._err(T.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=false}};var R;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(R||(R={}));function Ne(e,t){for(let a=e.attrs.length-1;a>=0;a--)if(e.attrs[a].name===t)return e.attrs[a].value;return null}var $t=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];function qe(e){return e===0||e>=55296&&e<=57343||e>1114111}function ze(e){return qe(e)?65533:e>=128&&e<=159&&$t[e-128]||e}function Ze(e){return qe(e)?65533:e}var F=(()=>{let e=new Uint8Array(127),t=0;for(let a=33;a<=126;a++)a!==34&&a!==36&&a!==92&&(e[a]=t++);return e})();function $e(e,t,a,n,E,_){let d=e.length,m=_*90,A=0,O=()=>{let C=F[e.charCodeAt(A++)];return C<_?C:C*91-m+F[e.charCodeAt(A++)]},v=a-n,j=a+E,N=new Int32Array(j);N.fill(-1,n,_),N.fill(-1,_+v,j);let M=new Int32Array(j),b=new Int32Array(j);function z(C,U){let L=0,k=U,W=U+C;for(;k<W;){let X=F[e.charCodeAt(A++)];if(X<89)L+=X,N[k++]=L;else if(X===89){let Q=F[e.charCodeAt(A++)]+2;for(;Q--;)N[k++]=++L}else{let Q=F[e.charCodeAt(A++)];L+=89+(Q<90?Q*91+F[e.charCodeAt(A++)]:F[e.charCodeAt(A++)]*8281+F[e.charCodeAt(A++)]*91+F[e.charCodeAt(A++)]),N[k++]=L}}}z(n,0),z(v,_);let K=new Int32Array(E*2),Z=0,_e=0;function Ke(C,U){for(let L=0;L<C;L++){let k=U+L,W=O(),X=O();K[_e*2]=W,K[_e*2+1]=X,_e+=1,M[k]=Z;let Q=(N[W]<0?b[W]:1)+(N[X]<0?b[X]:1);b[k]=Q,Z+=Q}}Ke(E-_+n,_+v),Ke(_-n,n);let ue=new Uint16Array(Z),Ge=0;for(let C=0;C<_e;C++)for(let U=0;U<2;U++){let L=K[C*2+U],k=N[L];if(k<0){let W=M[L],X=W+b[L];for(;W<X;)ue[Ge++]=ue[W++]}else ue[Ge++]=k}let He=new Uint16Array(t),je=0;for(;A<d;){let C=F[e.charCodeAt(A++)];C>=_&&(C=C*91-m+F[e.charCodeAt(A++)]);let U=N[C];if(U<0){let L=M[C],k=L+b[C];for(;L<k;)He[je++]=ue[L++]}else He[je++]=U}return He}var Fe=$e("!}.&u%}'&}*'~!6*)%&,~!J~!J~%L~y<~!R,~~%Lu~~#GD~~#|)1#%}^%}2%+#.##%##%}&%##%'#%##&%#%#'%#&#%#&#'#%%#&#%##%#)%''%&%#%#'%#%%#%%}%%%#%#&(23#%%#&-%0%('1#(##%#'##+%'*.:1}#%#6-+(%'%%#%%%}#L'2351&('%}&/N'(0(/*-%(%%}#'+&T%7.2}#&%&#%#36/5##%&%%#&#%%#))2%%##%&&'0~!#*+&'%1~!%).'3q?&%'1~!.##%6(~!+%%%(Gw'rT~!E#<nA%#jZ~!H%(~!42##~!*31&~!G%U~#)5~#`3~!J~!Z~%]~%Y~%C~!q~!u~#kz~%#~!6'~!D~!U~!?~#T~!c%~!G#'~%7|~!G~!J~!G&~#pb~(Df}#%}*&}#%##%##%##&#-}&'#'&%#.++}%mI,#,@&(}*%}*'%&##&#%##%}&0}#.},U},%}+%}&%}#%##&}B%(}(%}+%)})%##%#&}&%##%&}<%}>%#%&}*%}(%}9%}/%})%}*%}*%}?&}&%}3%}&*#%})%#%#)}#&#-#+*%E%%'%'#%}#*V##&##I}#&&##%&%#&&Qf%%))w/0+&%#(#.%-''''++++7}>%4'',##1,#%#&%##&#'##&#*#9)%&%}#*}%,#+P(%A&%#'&##wSD',9E00#y#@}(+}&%&>~!#~!X}#*}(&&}(&}(,%}%&#+&}#&}I%#%}%)#(},'%#*}4%%#%}(''}#/##(##),%-##%%)#&}(.}&%#&}%%}*&#%},&&}&%}#%*'#%})%}D&}&%}-&}6&#&}-,%}#%})-(~+`~,=?~I9'9%~!,#%})%})%}@%}?%}(~!?~#<~#pP~#BG~#=1#%K+~#?#~%;)~#A~#mF1~#A'~'X%'~#lR~#N~'N~#r~#m#-~#i'?%#'%~#B%##%,%#~#_%#0%~#]732~,w~2+#:&#%&'0%&>%}#>##F+)#%&&#(+_}4&}-%}(&}@&}O7Fdf0@+/v4}&WU##&/0#&'('B#%}.%}'+#%}#%%&#&%#%##+#&#)#6#'#.},%}c%},%#%##%&#&%#&~#>'*-.%##%##%}#%%}%'~#)D1}#%*&~#_%%'(~#S2%'.}#~#=##*'*-%}&'%'##&&~'E%.#&~#M4}%%##&'%#~#O1##%&#'+~#<B%##%%'%+~#;#@%}#&%#&&%#(~#H1}'%'##&&~#?A}&'~#D#%32}'&&&&~#[}'(#%}'~#;C})&}%%#%~#=&%,3}%'(#%%~#^'#&&)#%'~#Y%-~#d-%'~#^%%&#&&&}#~#b~2t*&'~&(~&@~0%~e~3}%*''0})&}+~!9##-}#%-hD*)1fC#%/&/fB#40~!+#)*4~!+~!K'&:~!/*7~!.#~!H~!L':~%x&~!H#~!*~%1~!I#~!+A~#p'~!F~~#-#~,,(~.Z~!V~%;'B'mq-W~!N~%I%#&&#&}#%},%%}'%}+X#%}#&}(%}'%}<%}#%}%%'}'%}:~![)9@~%>~#UA%-%##&~!C%~!-.9:~!1~!-^2/:a~!y,D*J#-5)/4~%23,~#G~!L1~!0X3`~!2+~!!0-~&E~!W~!o,>Y&]~%cZx_&~#O*9#A#'#+I'%#)~!0B*-5A+-((F&*M#)(-7-5+'-3a5Vi~!Y~!?+[)%3),ERHm~!+:D,VG.+)?fB%%*(%)'(#&80%1'8`K8?`+'Z#&O&'H5#*9)A%%5&3))0%39+.*7#()&&*=4@**L)<'_&*+..;(#*+)./&0#3)%')-8(4ixD(&.}%,('aI:,)%,k2231T)I'#/-W7,/'Q#.'Y24+h')37</31&83##&0#),H(?'&?/1##%#&&#%''-%&&&#(&''&#.-'%#%%(,')*'&#&#'##%(%(#%('#&##%%%%('%#%#%%#%#&%##h>w+v<ayvyvcg.uuhKr}g/v|g>u9i[~>g5uI~=RvdwEg;v/g;uk!!TTSx]@RT!U!#!@VBRUU!'UTe-d0c`e&gSdicedFcrdTaqb.kYcAohdYd@a3e+d}dMdtd.aJ#bqcK`dle/e.e'dwdPdodddjbEb}ogd^ofdpduc6j?l%d{drdqc)d7bacOdQ%T#Y)X.sR[yH>6Vyv3[xwLu>vo'!*.[yBacahoj>6Rew3[xqdZa#!a&#^(X-[yG>6Vyu3[xvg3sEr|g.u/Ri9db0T#^(Xa)!-[y;>6Vylg4wKs{JwNZt3@3r=c4Z([xlg;wKt!cpq's@v7A'*a(a+!-a#[y<3Dt?3Dt'>6Vym3[xmg9rxsNJwLZt4~?r?db1T#`-!(Xa,!0[yS>6Vz%NuQs.g4wKtnJwNZtS@3r>c4Z([y%g;wKtrdga8!a(!#&T*Y-Xa#!a0<or[yc3Dtq>6Vz43[y3JwNZtf@3s!Ju}!%Dti:pm3c_%X#tjB5pkd6q!r]u?voC'*-a.a2!0a&a+[yI3DtI3Ds~3DtH>6Vyw3[xx;:s#~<5pKJwNZtE@3r~d`a)!a2T#a.(!+U.X1[yT3Dt`3Dtv>6Vz&3[y&g9rxwzcxstPu.<rAJwLZtT~?r@dZa%!a.&^*Za(/Reu[ya>6Vz23[y1g3sEr}wkg{NuQRg{ci(U#5@b`~,cg#U(2WnH5wugcRh7dX#T(Y,a'Ta!!a,[yZ<]mj>6Vz,3[y+Pv#5ReZKu+=,%!H}7ABwkaS?Rh:BcW(X#<]mrj:ubv/ARekdg%!(!a.*Ta(Y.X1!#sP>Rl*Dt6[y>>6Vyo3Wf*jOvuumvuRgRJuq*!:9<B@bX~3jVv&v@s@5Re[d/rQt{uAvo&a&a*)a2!,0Wf!3Dt0=Bs'>6Re}3[xy~<5s%JwJZt1~Gs)c;&!#2sJkNuXvzq7rxu,Re8dka4!a8(aEZ+a@Y.X1Xa)[yd=Bs(3DtP>6Vz53[y4cX#X&Re:avRe9~<5s&JwJZtQ~Gs*i^rzvdRg+Jv{%!2sbB@bX}kdga,!Za?&^*T1/!a'Dt+[y6>6Vyf3Wf%g/u;s4hGu6?Rh-JvZ,!c%#&RoX54Rivj7uyvf8RgTKvZB%*!2sGh<vu5Rgq<=C::9bb~#dZ#T&Ta6Y.X*Dt>[y93Wf)coZ(T,6VyifluvRgC@95@B@bX~/hFu34cC#T,k/unq8w8Q5RkUklwQuzunq8w8Q5Rk8d/rJu?v8w9)-&!a0a;a&aIWejg3sEr/h1s<DtDJvyZqY5aws3Jvy!&Wei~Hr1:au5@Bag>23E~5c:Z&bX};kKv?w&unuVu5Rjc;>bs)#~@:Rh.=ay<a]C;b`}Vd6s/t{uAvoaxa()!a,a7%-a#a2Dt,[yF2Wo[>6Vyt3[xuNuPRi&NuPwpi#RoWh?vf8Ri%Jv]!%Ri:KvxD!.'2WeAjZu`q9rxu,Re7woeAg-unLq(qA_/*2Wg_g3u5q^9:4E}/jTrxrzv=Wkkd~0UX#^^Xa-a1a5T&a=U1a'*aEa]!a*aPaA-adok[y54Rn>;:p3~Dp5g9rpsFNvZqjg3uJp4~<5p0Pw;5qlJwNZt*@3p1Pw:5p/Ou!5p2JvG'!6Vye=<qnJvh_[xhg3v,Rh3kOwOw-sDuev/Re^dha[a%!%!a+#Ta7)-5TaCaO!aka!a)sf[yb2>Rl!9ARiq5E}Qg=ucRkBE|oJrJ_@Wk~@Wk{JrJ_@Wk|@WkyJrJ_@Wk}@WkzJvO_[y2g-vMRmiKuYC!)&>Ri;>Ri<@3RkNc](X#@9Rk=g5vuRmhKvDB!+'=]meg3u4Rmgd)#Y'Vz3CARmfd`a+!%T'!+#Ta1Ta6TaM-sTDt9[yA9sYd'%Y#s[[xpj:ueunaXRgEjRq,v-vuqdd2'`#6Rev<32@5>:2<E}5xIo9a*X#Y(;5RePJvD_g>vyRgNj8w)v8<wggs:RgXiZt|vjx,hSq3ah!-(~@:Ro/Ou!5RhWj^v(pyw8unRhUdx-UY#^Ua.a3a70!)%UX1TaDa)'omRiRRhE[y:3Dsz=Br,>6Vyj3[xkg6ruwjcqsrPw;5r*Ku]D'Zt-@3r(~?r.i[vwv]dU1a--U#`a4(g/vsRhPOu!5RhLj:rmu9Wo!~@:wdh@g/vsRiTjXuvvNr}:RhBj^v(pyw8unRn]dz1UYa'a+^Y(!aETZalaRY.Ta?a4[yDJw1!#qLsW>6Vyrfzq-pLflpwRe|Js>%!Dt@3Dt&Jvy_[xs~HrnjMuwpsw'RecKu+D#'!t<~Grl~?rjg5u-x,gwp{ah!-(~@:Rg~Ou!5Rh'jXuvvNr}:Rh#cW#X/c;&!#2sLi[v7u7RgpJv)(!iLrxu,Re6j7v@s@5Se[e7d`aW!Za(a`T.a#!a3!&aDa-!9)Dt_=6s+3[x~~DR|h~DS6avhGun5RkZj3w)v-]mkKunB!&*]kb97R|i<ARk<c:Z(6Vy}Juh'!wziMRoS:F|vkLuauJv5vtvQRh1d='T+Y#VyO~DR|jcF#T'7R|g97R|kJv3'!ay<Rj,Jvh&!:ReXcsa6*a+#a#_aIRf9aLRf?c,Z&Rf5Rf7c.Z&Rf;Rf>cQ#%T'p-Rf8Rf=ct#%'(*!,p,Rf4p+Rf6Rf:Rf<d~'Ua%U*^UYa(!a,-!#a4YaTalaEX0a8a<Weo3Dt/3Dsx=Br93Wen~Dr;~<5p<JwNZt2@3p=Pw:5p;Ou!5r3c7&!#:p>3Ds}KvGB)_6Vyk2sM=<r7x'eovA(!hFu1ARf}cV#X&@r5j6rvwQa^Rf3c=Za'wkghJv__g;unRggA53B9=b^}%j6uduo5Jq;!(hIv%2Re`Ou4ARe_e%a#^^^Xa&!a*a2!&a6YaP!*ad!#a:aE/5Rn?[y@>6Vyp;:pE~DrY~<5pBJwNZt8@3pCh=rt3rWPw:5pAJup_[xoNuPpF9c!#'45pD5ARn)d8#X'X*3@rU72s]h>v<<sSjJpqvewOJq/(!hNw'5ReBk0s2u3w/w'5ReE5@Jq.!a+JQ!&WeU23d(#Y&RjG5]jBk!u7w&u0udARjEe#+^^^Ub#!a2/a`Z(agT1!a-a;|@TaG!aS[yV=Re~fow'RguNuPRe?bz#'>RoUWeL>:Cbb|?JwPZtVg6ruRmzJvD'!6Vz(g/vmRh~Jvy_[y(g9voRgyx*cy(#2>Ri2B9b]~9kIw9u7rluJu3Rg]dI#a%UY'@=p%CAx.gQZ&RhwwygtRm{x5g_Z'+ABqR9Woa=Bp&dV#^*Xa'!&@o{g4v]Rk;Jv{!%Rk[wkkiA5RkiwwfUB=x,fUuqC&*!>RfTg8v0RfV~ARfSd;rJsAuAv9wR'ae+/aO!a@aza/a#[yQ@Wg!2Wemg3sEr0JvB_g>uvReWg2v+Re=KupB_+[y!2AbY~-~Hr2AJwD!(h<~El>h<~El?Kun@+_:9b`}Kg-v/Ri3g;vtwyk_9]k_d=&T#*U.6qh@Ab`|K9:H|CJv[!&3Dtex'fDwC%!Rf[9WlMd[(^X,!a%Z06Vz!@WgBg=v~Rgvg,QRe@awd,#Y+jTv|Q~EfWj]uNr|~FRfXdy#Y&^Ua%!aO.!(a)Ua;=!a@aKap!a-,a!Ta]a[rSa]p?[y82sK=Bq~;:p:~<5p8Pw:5p7d'#Y'Wf(;RnRi[u4w&RgJJvG'!6Vyh=<r#ijuuv/sIKuYD'ZtG@3p9~Gr&d2#`(g<vtRgFj`u5w&rqpxRf2CJuY!+:wfnTOu!5Rg}jNs1ucv&RfwJvA!&3@q|BDcC#T,k/unq8w8Q5RkTklwQuzunq8w8Q5Rk9dga#!a'!a=#a0!:+Tb*b@aO.a4!aba8aFJv^}?!VyR~Dr<g;u%Rn.~<5p[x'e`wNZtR@3p]Pw:5pZhNvjBp.woe_g5u-r4JwF!%DtO3:ooc7&!#:p^3DtpLuGw(!+%)Dtk6Vz#2sd=<r8d'#Y([y#<x3gJt`w@!)%}MRiowzikRij=]ilxAf3,U(#B2Rf#g0v-Rm[ck{`U#]giKv3>)!&6Ri154s,KuGB_%@r68r:dJ|t`#X(9<E|u2@H|rx3gJu?w'!+'1Nu7Reg4=H~+9<wxgY95Rm]xLggZ-`(X}U2:Ri4h<uOawRmsJv__5@bb{jbV~3dka#a'a]!,#a+U=a>b6a3b%!/aKa/)!arwve^VyJ;:pR~DpTg3uJpS~<5pOPw;5qmPw:5pNOu!5pQJvG'!6Vyx=<qoJvA!{~Jup!%@qk7Rn/KvyD!}''[xz;>wkh'?Rh,x8gyt`w5D!&),(SgyccRgztJ@3pPB5p#d'(Y#<]mmifubw&RgoJvE&!82s^JvF&!8Rf,ADb]~;x=h'rNu]vK!,%'*0RnORh)4Rh*AqQg-vaRnNg;wHwkh'ba~4cE#Ta*x3gctyw@'!+%RnFRnD<4Rn@hFvK5RnCxWg[#`&a0Ua()`1Rm75Rg[c]%X#qi8Rg^NvdRj>BwzgZauwji7Rm6A4wgg]d1#&(*,.0a#Rm;Rm<Rm=Rm>Rm?Rm@RmARmBe%#^^^Xaea?aC/b+(,!a+a#!a/!>a&Ta<aKbD!2wphBRnk[yPw}hE|.=Br-3Dtm>6Vy~g6urRf.x,hPrNav!%'RnqRo%Ro#Nu;q[Pw;5r+JwNZtM@3r)d'#Y'Weh;xChL#`&RnmRnoKu}>%(!Rne~Bs-;2wjcussJv+'!aYSO}6@B<5?ba~8LrNvj!.%*ROwungw~ng~:9;Ri^>wtnig;wHRnixDh@|(UZ.x1h@|)!#:2<H|*xHn]#-UX'3Ro)z=iT}6ARns=Bwsn_wpnaRncw]aR(#UXa&Ua*a/=]iPd'#Y&Ro'WnXf{QRm2hNvj]nZd`'T~&1`{|`#9b]{}c:'!#Wl{>@=be}]?cl{{U#:5Abb}Jds#^YaF!a*b4a#a3aPa>&Tb!bH!*a_!Eau?/a&RjY<]gj>6Vz*;:pe~DrZg,QRj1JwNZtX@wihspcJvZ&!VyX9WmOJu|!|N2WmHJvh&!]ht~Bpbcn&T(!#RmQ<s7Nu;padH#X'`+WmJ@>RmKCARhnKup=!)&Wf+:RhqNuPpf9c!#'45pd5AwghpARn(Ls@w!%,)!RmP@Wfe<E|IJva!&WmNg8vsRmLd`*.`#Y'Xa!axRn*]hrA8Rhug5s@rXg8u!RmMd8#X'X*3@rV72smdI*#UY&RmICARho~GsgxVgd)Ta'U-Y&Xa!T#RnEWnA@Wffg1uDRi0hFvK5RnBxGnG&#`%owp)@wsf+bX}Ze-*1!a*^^^Ua|!#a.aq&Ya2!a>.a6!a:aO`aJDtL[y`@Wg#>6Vz12@wzoYRoZNuPRi!NuPRhzg=ucRi,@=b`{Yg=ucRi-ACJvB!&Sh[ebSh]ebi`wUuFRm4Jw2_[y0JvB!.<Ju(!&SoG}6Shd}6<Ju(!&SoH}6She}6Kur@._g5vHRieJvx!{L2G{Kx6gd'T#?Rh82Wi5cZ#X(g1w)Rm5dW-Y(Ta#!a)!#aYa=wnfE=su2>>bU{0j9udv:<svj8uQv-7RgHdE%#^'sq9sp=>Bb_{TJv`!&g/r|snj6v(us5d,#Y(56H}[978H}]Jw5!&g1rushJvB!+j;v{u5?zDhd}6}bj;v{u5?zDhe}6}ce*#`(^^^a[aea!=!a6a*aoXb1a.!aAbL!b>,b'aL!aV@Wf|2Wlg3[y/JwNZt^@3piPw:5pgJunZou3@rsJva&!Vy_g<v~Rm#JvG'!6Vz0=<r{Ju{%!:pj@WfsiXuJu3Rm:JvZ&!WfA~Bph@c4Z&Dtwax5rubx(#:awRk1@d,#Y&RfjRfid1#,Y(@Wfp2Wlrg5s@ryKu[@!,'=]ig9wlk?Rk>g5u-rqJvy'!@9RkQcH(T#=>Ri~@<wkj(Wj(KuZB*!&<7rw@9RkRcH(T#=>Ri}@<wkj)Wj)dg(Ta2Xa9X#`-!a*CARhg@@=I}d9x;c~#X%so=<sj>2@@=aybb}XjWv0Q~EfEj3vLv;<d,#Y(56H}`978H}_dgaPaFa'a/!#a3Y0a_a;a|!1(a7-[yE3[xt;:pJNvZrrg3uJrvJwNZt=@3pIh=rt3rxPw:5pGOu!5rpJvG'!6Vys=<rz@c4Z&Dt(ax5rtJvZ!&~BpH@wsfNg-vaRlNci*U#=<wei<F}a5@Jq.!a*JQ!%@qZ23d(#Y&RjH5]jCk!u7w&u0udARjFd/prq=tyvpaEa(a:.!a1aZ(@@=I}:9wpd%=<sX55w_h}@@=I{t=ay<aU@@=I}T=ay<2@@=I})?C9:9au@9Cb]}DP~=x-fAZ(2Wl1=ay<aU@@=I}>5@d##Y+jTv|vV~EfFj]uNpn~FRfGdgaK!Z2&!a8a-Tb({E!acTbM*!a(DtY[yYd'%Y#sl[y*hHvh>Re5x2c{Z}.j4uCvcawRiMd+#X+_x&d!},<5RkX;2Hzw@x,gavfB-!{CcF&T#Roe;RodwWbBg5urRgaKvHC*_6Vz+<4opieuew&Rmq@d]&Y)X,T#X0Rh}<BqP=4qS9:ReMg/ujReNJw0!/<Jui%!bd{kawwnemRelAxUa?a3#*.&UX(Ya+a/RhvRnQ<o}9Wmtd-#Y&RgSRmw9;Rmxay=Rmyg-vaRmuxEhSrNu,v-voC!%(aR.a(a7+1Ro1>Ro5CE{A9b]{@;5x#eO{:g;urRi+KrNA!%(Ro3>Ro79;Ri_Ku@>{;&!x%gX|{KunA_+g5QRj/g3u5Rj#g>uERj%wio/xRhS&!,!#^1U}wba{8>>@=be}qC@:D5ba{7Ku+A&!}x?ba}t>>@=be}se(aA^^^Uat!b0#{pa+awUazbGa#aLb9bgaWac'a5TbS=Br!d1#`%scp_Jvl!#rT>Re0JvX&!VyN=H{Fcm#U&:pY=ReaJv2&!]h0=]nUJvG'!6Vy|=<r%JrM_=]h2@Wlud'#)U'Wf'b]{i=]h/Jvh!&~BpWg=v]RnMx+ny#'Nu;pVwjnu=]nwxJnx,T#`&Reqwjnt=]nvieu9vrRjLLuYwP(#+!th@wih5pX~Gr'g5v/Rh4KunA'!-CARnP@wwiN:Rm_9x'cvw>!|l=<saKvAA!0&3@q}>w^e1bp#&Re2Re3BDx7gH#T|f5H|eKuZ>!%(:qNAH{]Jv6!+3B2B9=b^{X<5<B92:E{ZLvhwA(a;a%!igQuyRmad+#Y}m@3Rh5d8#X'X*:AqUAHzmaxwbh<aXRnVcF}RT#Nw&cj#U(BWnug/vsRntdka)(a3+.Zb7aYYan1!bVa@Xa}[y^@b[{G=H{+hFu73Rj&Pv#5ReQcK%T#sig1v{Rj'Ku+D#'!t]~Grm~?rkKuMB!01d5#`'Vy.ta3Dtu~Hroc8#'{^45s85AwZbP&!#Rn!wghxWn#KvEA!)&2RlA2RlBx:h|#(T,=]j09Wobz>x]z/@awRoTd+#Y(az]hFhCrm4d,#Y+jTv|Q~EfMj]uNr|~FRfOdCa!Xa9_X#@<plJvf!%b`{(9;Rgwc;.!#2x7cw#T|UDb]|T5Ju={(!=@E{&Jv)&!Ab`{'awJvf!~*>>@=be{#KuY>!+&4Ezyi[ugv&RjIdea+T)#UXa&T-T&a!Rh9auRmW=]kLg5vuRn+g3u4Rn-Ow6ARn,hHus5xNk?#UX(U~)/g8v0RkD~AwkkF?Ri.OuNBwkkA?Ri/d|a2`a*^UYa.!aBTZaTa'Xa;!(!2!-a#b2[yC>6Vyq3[xr2Wi?g1rusVh%s?DtF~<5rbJs;%!DtBfswKtCj[uvuSsEu3RgVx3o:u+wN'*Zt;@3rd~Grh~?rfg8w)Lq)qE&-a%!>bI|`jWv0vV~EfCjTv|vV~Ef@j]uNpn~FRfBcK#T']gWNu7x,k7q4ai(0!hHv8<RhmkMu9vrsBuev/RhlCJvB!,g<v{wchh~@:Rhji[vrv{wchi~@:RhkdS&a5UY#Ta!RgPwwiI5BwciI~@:Rh`x'iJvj'!5]iJPu8Bwch]~@:Rhach)U#h3rp]gLh@t|Ax,hTq3ah!-(~@:Ro0Ou!5RhXj^v(pyw8unRhVd|)`,^UYas!a?/a2Z'a^Ta{Tb7Ta(a#!a,Wf&9sZ3DtAadamov=Bqt3[xig8vsRm~>waiL2b`{QJv*_Ouv2qgj<v]v2BqfdR'X*X#Y-@3qr~Gqv~?p6hHv-]glPup5Lq+q?_%*b_{qF{n9b^{rOu4ARhpKvCD!+&~Bqp:5Dbb}nwoiKl&unuTuBv]v+ueunaXRf0=Jvh!0nKufu8v1w&w7q%w&uHrz:Rgnj5w,uxDJq/(!hNw'5ReCk0s2u3w/w'5ReFd>Za&!*UaA=<wkgsRnSJv^!%Refifw3vyRgOKu_B'!,<]gkiiu:w&Rh<=C@a^<B57@2F{[<B5@aW:=3away9A5aW=<B=C@a^<B57@2F{Ie-#`(^^^bCara.b8aza6!/bZ,!adTbnTbOb+aFaS!aAT9@Wf~2Wli3Dtl2@d,#Y&RfnRfmJwJZtN~GqyJva&!VyMg<v~Rm%iXuJu3Rm9Jv[_=]ih9wlkDRkCd1#`(@Wg>2Wls3cH#T(@<Rj*=>Ri|b~'#23s9h<~El.d'#Y&Dtxi^rzvdRl#d*#U%(o|B2s`hJwSaxRmDKv4B&!1:Rmdd5#`'Vx}to~Hq{x'f1v3(!BA5ba|bJv_&!Wfug1v]ReIdO+U/Y#&G}-8wze=Rh{g1v]ReHg/uQRf/by#)ibQwERl/cH#T(@<Rj+=>Ri{cNu+vlax-!(#a0qa9<Rii2;;bU{H;x<i=&X#Rk`<4wwi=C9H~8xAI(Y#<azRi@45wXI<B9;5bb~7dL(X#Xa(+!aL6Vy{g5QqOau:5au2@ay547EzbxOcU(UX-T#Ta#:Cbb|A?wjh/b_|SOw6ARgtihr}u7Rhy<d1#T)X1@@=I|~=ay<2@@=aybb}Sj3vLv;<d,#Y(56H}A978H}@dGpvs@uAu`vcw9*!aFa+ai%(b!aXa8.a?a[ozWey=sU2@G}Nch&U#Rf_WexKu+D#'!t:~Gr`~?r^j]uNr|~FRg*j^psurwJt|RmcKv)@&!)7Rkv~Br[@wxfO:Rl3co#U'6Rezj_q#vIuavjRltwzeyh@vr5JqD0!>aY?C9:9au@9Cb]}9cl#U*5;5<H||jbuus1ucv&Rfvg1v~d/pppzqFr^a--a~!aMat1(hFv;Wiz@@=Izoj5uuv-7Rix~Cw`fk2WlVcZ#X,k)u3vWs@u2]ktg;wEx'fBq(_2Wg/jTv|vV~EfoJv]!15x'hzqG!(P~EfU~CRl_j6v(us5x4i-#T(2WmZ?C2F|d>Kq<aj1!*jTqIsBv=Wl`~Cw`fi2WlWj`v0u*~>RlR=c>Z,k#u3vWs@u2]kr<c1Z+jTqIsBv=Wla~Cw`fm2WlXdmb3!a{(arZa`bkTa%TbQTa-a9+c'!aM!/[yL=Bqug.w'RifhFvyDRj.g>vgwyk^9]k^Jv3_@WfbAARkhJw2_[x|JvB_wkoIRoKwkoJRoLd'(Y#<]gm=<9<H|yd'%_X#skDtb3awwqkgNulRkgdB#^',9:p'hJwSaxRmEBwVb8@4=H|qLu+w50&!)@3qs~?pU>Awwn;;Rn=c:Z'ARn<=<qwKvC@!/&~BqqJv6!&]eVb^z^xRge'/a%+^`#Sge}6<4Rn3=]n0Pw2>Rn8Jw0!&>Rn:>Rn6cY#a7+!a&=<wkaNw~h3z_c5Z{=wjh#=]nLKv^D!&)Vyz=bW|swYb<WetcG#T(2wxa@qVx@gD#Y&b^|V5JwG&!5bb|pg/w&RgD@x=kHs=uAvn!a%%/'+RmSRh694Ro`g-vaRmRhHv-]mlxCcS#`&ba~.5cD#Ta)P~=d,#Y(56H{>978H{Dd_#{2^Y%_+qbbb{6g3sERhsbU{?dfa.,`a(Xa<!aiX#(55RiG54RiHcI#T'WiU3RiVNvdwtfcRlKNvdd,#Y&RlHRlExQgf.1*^T'X#Sgf}6Wn4=]hfPrk>Rn7Jw0!&>Rn5>Rn9Lunw?&a2!,5<oq@@wqfdRlJj5Q~=d,#Y(~ARfcOuN]fdDKw;ay(}i!547E}j?cI#T(@5bV}iCbV}hdv(^^Tb?a40,b##Tbo!a*bR!a<b|a/!aKai!aU[yK=]o^g:v>ReGJwPZtK<7Rh+h<~El,Pv#5ReR@awwxjCg,ulRjDJv6&!]j!z?aQeeg>w=Sh<eeJw;!&axEzOg,Qosc!#*:wkeJ]eJ>x'h-u(!%Ro.w~h.zPdNZ(X,Ya![x{;9ReY;wkgxRiF:x?ap#Y&RmUg<s2Rkod]+UY0TZ'!a&A9sw<=bczLNvuw{gqzNhJwSaxRmCKuLay!#&s_Rf-55b^{uJvZa!!c%#(55Ri654wmiu5RiuawLu,vp!+}^%b_}Y9;wkgxba}o>A9:=b^}zKuh=a''!3awRk3c*'!#aHRk6c+Z&Rk5Rk4Jv)&!awRjSawd9*`#0?C2@EzMj8u<uJ5RmbjQrquJu3x,k>uq@_+=ayb^|W~ARkEOuN]k@7dhzV^X/X&a-#zRzSb`zXcJzTT#2WkVKvDBzW!%FzY9;5bbzWjQrquJu3Jw3%!b`zU=ayb^zQd:#X(T-a!6Vyywxh}=b]{Jg=u1RiAdGp~qHtzv!w(wA+a+a;<!aJaYai'anasb(=azRmV:Cbb{MLq2vb!%')RjuRjrRjtRjqx3jnqCw3!%')Rk(Rk+Rk&Rk)Lq2vb!%')Rj{RjxRjzRjwLq2vb!%')RjsRjpRjfRjex3jcqCw3!%')Rk'Rk*RjkRjl9<CbbzfOu4ARhxLq2vb!%')RjyRjvRjhRjgx=joq*uKvb!%')+-Rk.Rk%Rj~Rk-Rk#Rj}x=jdq*uKvb!%')+-Rk,Rk!Rj|RjmRjjRjidAq&qKs@uAv8Aa.'*-a@a&0!aM@a5[y73Dsy3Ds|3Dt):wxgI2sHJwJZt.~Gqxwsf0ikrzt}Rl0Jvy_[xj~HqzKv_A|D!&WfP8axRoVcf,U#k(v]v+ueunaXRf1Ju}'!g8u#Ri=jQw!sCunLprq>!,')~<5qeGzq9F{W=c##%s5au:5aU3CBE|;d4#X(D!a&6Vygx(b;#(=]ed?C2F{N<capoq2r[a&!aPa9,'Pw;5s:@@=I|,55w_h|@@=IzcP~=x'fCqB_2Wl2>aU@@=I|1OuNBc1Z+jTqIsBv=Wlc~Cw`fl2WlZ~AcTa%!Z+jTqIsBv=Wlb~Cw`fh2WlYk+uNqJsBv=WlSg,u3dca3#UXaMYa)TaB-=cM|7T#<bI}l5@B932:aV2G{BOuNBJq:|M!5Ezt=<B=C@a^<B57@2F{v>cB{/T#=ay<bI{3Jv6!a.6BKq0ah&+!5E}HP~Ef{978BaU@@=Iza<7d#.Y#978BaU@@=IzH~AJq0!(@@=IzG978BaU@@=IzFe,aU*Y&^^^bvJb,b:bFad!a,c2Ta>aL.bo6!a#CbTa'T#Re{2Wlh2@G{yg6t~Ro_NvdRfticuRQRllJv3&!x&c|zs@Jw3!%RflwpfkRlpKuL;%(!Re<@G|C2GzdhIvuBwgjAg-u0RjAKQB%!(GzZ@G|5NuuRl7d='T+Y#Vy[g<v~Rm!==G|>JvA!)@wma=]m1ifuaw&RmnLs@vT'!|/+[y,g:v>ReTJw1!#qX=x!eC{bLu+wT&)ZtZauq_~Graci&U#F|89:r_Lupvq!.)&2RlG8RfaC=x!eF{_h?rpWlmd&'!#X|&]k::xJey#`'T|+<E|&2@H|%dE#(^,g;u.RiEg6vjRiC9xCkA{O|zY#g=ucRmXKs0@!&*@G|m@awRknJuh!,3d(}gY}eJvj!%Rm):Jw3!%Rm+Rm-Ls0w(&!a(a#@b[|6cZ#X'7RkxWgAOu4ARn'dH'U#Y*Vz-Wm'CARm}d]*#a%^a*T'aK!a<9bV{PC=p*Jw4!&SgxcbB5r]idw(wBRmF7xFkt#&`(Rm/Rm8E|!JuY_9:Rl5=wrgr2:bbxd@xXfB(a*#T+!.X0X1Ta/a'T&RlDRfL>RlyARl9b[z[>RfZ:RlL:RfRwlg/ARl;9;RlxKv,A/!%7s69<74=BA5ba{-8Bde#`a<XaKYa1,a'P~=wxfB2bZ}}?C972@@=I}r8@55B9;5bb}G978B2@@=aybb}3j3vLv;<Jw3&!>Rfk=ayb^}4~Ad1#`*@@=aybb{w2@>==<bbz]dx+UY#^UaF!a9!bB'Ya1.!ajXa#%olRhD[y=3Dt#Ov5BrHKuMB%!(Rf^Wep~HrJwkiQjKr|~FRg)Ku+D#'!t5~GrF~?rDdV)UY,Z/_7RkuG{<~BrBg,rlsO:235B@bX}|d?a1!#`(6Vyn5@d##Y+jTv|vV~EfIj]uNpn~FRfH7Lq2vb1!a9-978BaU@@=Iz9978BbU}#~AJq0!(@@=Iz8978BaU@@=Iz7~AJQ|}!978BbU}!JvkaK!AdUa21-U#`a+(g/vsRn~Ou!5RPj:rmu9WhOjXuvvNr}:RhAj^v(pyw8unRn[kPr}p|u7vwv]RiSBd;pppzq@qHQa?(b.!a.a`@.|xa(hFv;Wiyj5uuv-7Riw~Cw`fg2WlU978BbU|wOuNBJqG!(P~EfD~CRlQcZ#X,k)u3vWs@u2]ksg;wEx'f@q1_2Wg.j]uNpn~FRfqJv]!15x'h{qG!(@@=IzK~CRl^j6v(us5x4i,#T(2WmY?C2F{1>Kq<aj1!*jTqIsBv=Wld~Cw`fj2Wl[j`v0u*~>RlT=c>Z,k#u3vWs@u2]kq<c1Z+jTqIsBv=Wle~Cw`fn2Wl]dn1#c(a(b^a2!b/bAT(bj!aDa7bu,a_a{c0!2T0g:v>ReD2@G{42@G{5~DpM~<5rc=Bx6i>{RT#RnI@zCx]y]z:2Jv[!zr5Awyk]9]k]dD(Y+X#6Vz.g=wKtgwhaCwgmTWj2Lu,w%_+/[y-B;b^xeg3u3Rj-2@bX{*KrJ<!+'@Wg(g?QRlC@Jv`!%b[zIwsfII}8JQ_@w|kW|=Jv(%!AqcOuNBJvEzh!bYzjLs@wP#(0!oy@>RkdJwMZtc3Dtd@BcG#T'9bWxg2@2Fznd*#Y+;2x'c}w<zizixNgwa#Z'U+!/!a'!a+w~g~z6wcn{Rn}wcnzRn|5Rh%=]nJg5vuRmvNvdRlvcprJu}w*az*a#!%.a.'Bot9qT]kj@Wg'ay2Gzv@Jv`!%b[zEwsfHI}1;ck#Ux`<Cbbx_Lu+w!a&0*!wko*wwo,So,}6Juqxf!E}PigQuyRm`d3(`#8>Rn%:A5B;bZ~%KvhCa!a2!x>k7#Uxb@b{#xaRk7Jw0!)>wwhlShl}6>wwhmShm}6CJvB!.x'hhvj{!!5Bwkhhbaz}x'hivjz~!5Bwkhibaz|xEhTrNu,v-vpD!a%&/)a3a.,%Ro2t[CE{)@3re9b]{%wjo09:rgc:Z&Ro6=<riifuaw&RmoKrNA!%(Ro4>Ro89;Ri`dSaL'UYzxZb)7Rka3xRhT&!,!#^1U}vbaz{>>@=be}yC@:D5bazzKu+A&!}{?ba}y>>@=be}wxBh[t`u~vJvr!%a!a()a,a0a4RoC=]o;Ju(!%RoGRhdwjh`=]oAg>w#Ro?g5vuRo=NvdRl|Ku]C.!&;RoEJvB!%RoORoMBx'h[v+_?w~h`}~5?w~hd~!xKh]oiptu-utv.vp!#%&a30a@a'a+(a/aOp(o~p!RoDJu(!%RoHRhewjha=]oBNvdRl}g>w#Ro@g5vuRo>c[#X']o<CauRoRAd-#Y':RkpauRoQKu]C.!&;RoFJvB!%RoNRoPBx'h]v+_?w~ha}t5?w~he}ue!/UbhYacXaW^Tc&a;b:a-c/#b&aja1(!cL+!bKbt!bmcRc9aIc?8[yW3Dtt94Rg`Jv}!&SiRMzBhEebShEMNuPRe>x7gL#TzuwjirRipc<Z&>on;>z=h-MSh.Mwqczx'a7vj&!>Re4@=ResJt__NuPRi*NuPRi)j]uNr|~FRfzKrJ>_+@Wfy@Wf]2WocKrJ<!+'@Wg%g/QRl@@Jv`!&awRl<wsfFIzgLu(w*!.*&ShBMwvhIRhI9;RhNx1hK'!#Sn]Mx1hK~0!#:2<H~7cNu+w7D*'1ZtW>Rn1~?rOc:Z&Rn2=<rQ<7wjh&=BSnLMc]#X(6Vz)w[b=a!U#9wzgMc3#&(RgMRitRis<x,gKt`ax!&+SioM=BSilMc3#&(RgKRinRimKurB,!&SiQMzBhDebShDM6BJQ!(P~Efx978B2@@=I}WLrJw!!,a*&@G}O@9wkibRid@@x'fKwC!&SlDMSfLMjUv~Q~EfKKv3@a+!(hFv-]mpx/hYZ(C5RiWz<o/MwkhY?So/M@x,gbvfB*&!SgEM:SoeeehFu3:Rgbda(,^TZa)X/7Sg[eb:2RgI~BrMC@wgkc:wwkcRerx3h(uUvK!&*,SnOM4Sh*MArRg;wHRh(x=h;rJvPwI!a4',a'0@Wg&=BSh/Mg>w=Rh=g3w*wwgGRgGcW(X#;Sg}M2Gzk@Jv`!&awRl=wsfGIz`dKZ*T'Y-:RhR7RhQg5u-p`j6v(us5d,#Y+~Awkia?RicOuNBwkibba}Ld6p~tyu_vbAa'a+!a/'a3aEa8a!>Sh,ebJv{!&Sh@ebSaReb9;SgwebNuPRi(NvdRl)NuPRi'hHu^<Rm^Jvv_@Wl(g;u1Si/ebKu'B&!*Sh?eb@Wl'z@aPeb95Si.ebcpputyvjB)!,&a+0a%ShAMWeK@G}C@WfJ9;RhMwvhH9w{ia}ix,hJvRA1(!zAn[MRhHx1hJ~*!#hFv(BSn[MBJQ!(@@=I~'978B2@@=I}2db.Ua<'X}+T#a0XaG2G}E;wkg|wuh!Rh!x,hZu,@)!&So0MVy)C5RiXACJvB!&5RiY5RiZg8w)cG}*T#2@bU}=KsA>(!a.3wkhZba~(x,h^u(A!&(SoCMRhb5Bz=h[eb?w~hb~6x,h_u(A!&(SoDMRhc5Bz=h]eb?w~hc~6e)aA1T#T,^^^c-bMb&blcPaP(a/!0!bA=b5c@a(!bfbrc#2afwmhARnjwchORnp2Wlf3DtsNvdRl-2@wpa<]m0bx(#:awRk2@Jw3!%RfhwpfgRlnKQB%!(G{V@G|'NuuRl6d='T+Y#VyUg<v~Rl~==G|<Jv+'!aYShC}6@B<5?ba~8@Jw3'!g2QRljhLrpWlOd+#Y'g.w'rIg>w*wgj@g-u0Rj@Lu+wT&)ZtUauq]~GrGci&U#F|39:rELrNvj!.%*RhCwunfw~nf~:9;Ri]>wtnhg;wHRnhx3hDs@v~!/+'@Wfr@9RkSNu&Rlo=@<5GzoKs0@_+@Wl+@awRkmJuh!-3d(}pY#qWJvj!%Rm(:Jw3!%Rm,Rm*de&!1U-U#`)Re;@G|.@9Ri82@wjfvRlq=@<5GzpLvOvr!).&2RlF8Rf`C=x!eE{.Jw3_g2QRlkhLrpWlPde(!#U{s,UXa*Ta'[y'g:v>ReS;x0PZ&RnlRnn~HrKJw1}f!=x!eB|2w]aP(#Xa&a*Ta.Ua2a7=]iOd'#Y&Ro&WnWg;u.RiDg6vjRiBNvdRlzhNvj]nYJuW_2Wm3x)kFze{9d])!a.!,Y01!#&aC!a3RndC=ox~BrC@2b^{pg,rlse7x'ksuq!%Rm.E{xidw(wBRmGx9o+)X#wwo-So-}69:Rl4@xSf@a#XZ'X)X,Ta(/ARl8b[xc>RfY:RlI:RfQwlg.ARl:9;Rlwdn'#^XafaQa1X1TaHTa)@b[{zcZ#X'7RkwWg@Ou4ARn&x)kG#{,g7u/RkGdH'U#Y*Vz'Wm&CARm|bx#(A]gUbUzJj9Q~=d,#Y(56H}l978H{U7d,0#U*2>ABb_xZ978BbU{e~AJQ{g!978BbU{hxMh?ad{oUYZ.x1h?{l!#:2<H{mx3n[t{vl!,&a%3Ro(z=iS}6ARnr=Bwsn^wvn`Rnbd`*T}B0!#^X'BG{c9b]{a>>@=be}F?JvS!&BG{d7BG}(Bde#`a1X,Ya@!a'P~=wxf@2bZ}I56B2@@=aybb}08@55B9;5bb}<j3vLv;<Jw3&!>Rfg=ayb^}&OuNBKuLA!)a!P~=x#fD{f2@>==<bbzl?C972@@=Ix^d6rSu,v7w*C(0a)a6#B+a%!sQ[y?3Dt%3[xn~<5rLOu!5p@Ku+D#'!t7~GrP~?rNKvlaya7'!h+v-5qMg=t|cd,U#5AAaa5Abb{S@52B5@a[@52B5Gx[iXueu;d<#`a(!/549C;ag>23ExY5@Dah89b^~689Jv)!~2b[~1Lv'w(%*!a#bX|aPrmawRe]keu7uhv-q6rxu,q`xTo]/a5aU!bNaDXbi!b-!ao!b<bwA!#5@B932:aV2G|:d-)Y#hJrL>RhG<7@C5<H|_=Cau:5aj5@B932:bJ|ng>vIbs)#?C2F|9jPv0w.vISh-MKvUaz(.!9ABbb|[5;5<H|Eg>unwfh;9:4E|YjQsBt|vjx'hYq3!(?C2F|J:2<BaY?C2F|GOu!5x,g|p{ah!-(?C2F|c9:4E|OjXuvvNr}:Rh&i[w*t|cd+U#jJvsu)vsSn~Mkfrmu9p}u7vwv]So!McW#Xa!ax5@A5aY:5;5<H|>kJv~vYrquJu3x4ib#T)2@SmZM?C2F|Bj:rmu9@xPhI(a*a#U#`a3-5Abb|L~@:RhK9:4E|0@52B5G|#C::aY?C2F|-:2<BaY?C2F|.5Jvk!a)javYrquJu3x4ia#T)2@SmYM?C2F|HAxPhH(!a#U#`a*-5Abb|4~@:RhJ9:4E|R@52B5G|F:2<BaY?C2F|Sc^#Xa2j=Qq5CJvB!-g<v{z;hhM?C2F|Zi[vrv{z;hiM?C2F|XKsA>!a)-g<v{z;h[eb?C2F|]i[vrv{z;h]eb?C2F|^iZu.vix,hZq3ah!.(?C2F|QOu!5ShXM:2<BaY?C2F|P",13494,2713,49,25,61);var et=new Uint16Array([512,26465,29036,7,0,2,4,116,24638,116,24636,8693,29807,24610,621,1,0,0,3,112,24614,111,115,24615]);var I;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE",e[e.VALUE_MASK=8191]="VALUE_MASK"})(I||(I={}));var g;(function(e){e[e.AMP=38]="AMP",e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_X=120]="LOWER_X"})(g||(g={}));var Ce=32;function tt(e){return e-g.ZERO>>>0<=9}function es(e){return(e|Ce)-g.LOWER_A>>>0<=5}function ts(e){return(e|Ce)-g.LOWER_A>>>0<=25}function ss(e){return e===g.EQUALS||ts(e)||tt(e)}var S;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(S||(S={}));var Y;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Y||(Y={}));var Ie=class{constructor(t,a,n){H(this,"decodeTree");H(this,"emitCodePoint");H(this,"errors");H(this,"state",S.EntityStart);H(this,"consumed",1);H(this,"result",0);H(this,"treeIndex",0);H(this,"excess",1);H(this,"decodeMode",Y.Strict);H(this,"runConsumed",0);this.decodeTree=t,this.emitCodePoint=a,this.errors=n}startEntity(t){this.decodeMode=t,this.state=S.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(t,a){switch(this.state){case S.EntityStart:return t.charCodeAt(a)===g.NUM?(this.state=S.NumericStart,this.consumed+=1,this.stateNumericStart(t,a+1)):(this.state=S.NamedEntity,this.stateNamedEntity(t,a));case S.NumericStart:return this.stateNumericStart(t,a);case S.NumericDecimal:return this.stateNumericDecimal(t,a);case S.NumericHex:return this.stateNumericHex(t,a);default:return this.stateNamedEntity(t,a)}}stateNumericStart(t,a){return a>=t.length?-1:(t.charCodeAt(a)|Ce)===g.LOWER_X?(this.state=S.NumericHex,this.consumed+=1,this.stateNumericHex(t,a+1)):(this.state=S.NumericDecimal,this.stateNumericDecimal(t,a))}stateNumericHex(t,a){let n=t.length,{result:E}=this,{consumed:_}=this;for(;a<n;){let u=t.charCodeAt(a);if(tt(u)||es(u)){let d=u<=g.NINE?u-g.ZERO:(u|Ce)-g.LOWER_A+10;E=E*16+d,_+=1,a+=1}else return this.result=E,this.consumed=_,this.emitNumericEntity(u,3)}return this.result=E,this.consumed=_,-1}stateNumericDecimal(t,a){let n=t.length,{result:E}=this,{consumed:_}=this;for(;a<n;){let u=t.charCodeAt(a)-g.ZERO;if(u>>>0>9)return this.result=E,this.consumed=_,this.emitNumericEntity(u+g.ZERO,2);E=E*10+u,_+=1,a+=1}return this.result=E,this.consumed=_,-1}emitNumericEntity(t,a){if(this.consumed<=a)return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===g.SEMI)this.consumed+=1;else if(this.decodeMode===Y.Strict)return 0;return this.emitCodePoint((this.decodeTree===et?Ze:ze)(this.result),this.consumed),this.errors&&(t!==g.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}flushAndEmitLegacyOrReject(t,a,n,E){return this.consumed=t,this.excess=a,this.result===0||this.decodeMode===Y.Attribute&&(E===0||a>1||ss(n))?0:this.emitNotTerminatedNamedEntity()}stateNamedEntity(t,a){let{decodeTree:n}=this,E=t.length,_=this.decodeMode===Y.Strict,{treeIndex:u}=this,{excess:d}=this,{consumed:m}=this,A=n[u];for(;a<E;){for(;(A&(I.VALUE_LENGTH|I.FLAG13))===0&&(A&I.JUMP_TABLE)!==0;){let N=t.charCodeAt(a),M=A&I.JUMP_TABLE,b=(A&I.BRANCH_LENGTH)>>7;if(b===0){if(N!==M)return this.flushAndEmitLegacyOrReject(m,d,N,0);u+=1}else{let z=N-M;if(z>>>0>=b)return this.flushAndEmitLegacyOrReject(m,d,N,0);let K=n[u+1+z];if(K===0)return this.flushAndEmitLegacyOrReject(m,d,N,0);u=u+b+K&65535}if(A=n[u],a+=1,d+=1,a>=E)break}if(a>=E)break;if((A&(I.VALUE_LENGTH|I.FLAG13))===I.FLAG13){let N=(A&I.BRANCH_LENGTH)>>7,{runConsumed:M}=this;if(M===0){let b=t.charCodeAt(a);if(b!==(A&I.JUMP_TABLE))return this.flushAndEmitLegacyOrReject(m,d,b,0);a+=1,d+=1,M=1}for(;M<N;){if(a>=E)return this.treeIndex=u,this.excess=d,this.consumed=m,this.runConsumed=M,-1;let b=M-1,K=n[u+1+(b>>1)]>>((b&1)<<3)&255,Z=t.charCodeAt(a);if(Z!==K)return this.runConsumed=0,this.flushAndEmitLegacyOrReject(m,d,Z,0);a+=1,d+=1,M+=1}this.runConsumed=0,u+=1+(N>>1),A=n[u];continue}let O=A>>>14,v=t.charCodeAt(a);if(O!==0){if(!_&&(A&I.FLAG13)===0&&(this.result=u,m+=d-1,d=1),v===g.SEMI)return this.emitNamedEntityData(u,O,m+d);if(O===1)return this.flushAndEmitLegacyOrReject(m,d,v,O)}let j=as(n,A,u+(O||1),v);if(j<0)return this.flushAndEmitLegacyOrReject(m,d,v,O);u=j,A=n[u],a+=1,d+=1}return!_&&A>>>14&&(A&I.FLAG13)===0&&(this.result=u,m+=d-1,d=1),this.treeIndex=u,this.excess=d,this.consumed=m,-1}emitNotTerminatedNamedEntity(){let{result:t,decodeTree:a}=this,n=a[t]>>>14;return this.emitNamedEntityData(t,n,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,a,n){let{decodeTree:E}=this;return this.emitCodePoint(a===1?E[t]&I.VALUE_MASK:E[t+1],n),a===3&&this.emitCodePoint(E[t+2],n),n}end(){switch(this.state){case S.NamedEntity:return this.result!==0&&(this.decodeMode!==Y.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case S.NumericDecimal:return this.emitNumericEntity(0,2);case S.NumericHex:return this.emitNumericEntity(0,3);case S.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;default:return 0}}};function as(e,t,a,n){let E=(t&I.BRANCH_LENGTH)>>7,_=t&I.JUMP_TABLE;if(_){if(E===0)return n===_?a:-1;let m=n-_;if(m>>>0>=E)return-1;let A=e[a+m];return A===0?-1:a+E+A-1&65535}if(E===0)return-1;let u=E+1>>1,d=a+u+E;for(let m=0;m<E;m++){let O=e[a+(m>>1)]>>((m&1)<<3)&255;if(O===n){let v=a+u+m;return d+e[v]&65535}if(O>n)return-1}return-1}var h;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(h||(h={}));var J;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(J||(J={}));var B;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(B||(B={}));var c;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(c||(c={}));var s;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(s||(s={}));var rs=new Map([[c.A,s.A],[c.ADDRESS,s.ADDRESS],[c.ANNOTATION_XML,s.ANNOTATION_XML],[c.APPLET,s.APPLET],[c.AREA,s.AREA],[c.ARTICLE,s.ARTICLE],[c.ASIDE,s.ASIDE],[c.B,s.B],[c.BASE,s.BASE],[c.BASEFONT,s.BASEFONT],[c.BGSOUND,s.BGSOUND],[c.BIG,s.BIG],[c.BLOCKQUOTE,s.BLOCKQUOTE],[c.BODY,s.BODY],[c.BR,s.BR],[c.BUTTON,s.BUTTON],[c.CAPTION,s.CAPTION],[c.CENTER,s.CENTER],[c.CODE,s.CODE],[c.COL,s.COL],[c.COLGROUP,s.COLGROUP],[c.DD,s.DD],[c.DESC,s.DESC],[c.DETAILS,s.DETAILS],[c.DIALOG,s.DIALOG],[c.DIR,s.DIR],[c.DIV,s.DIV],[c.DL,s.DL],[c.DT,s.DT],[c.EM,s.EM],[c.EMBED,s.EMBED],[c.FIELDSET,s.FIELDSET],[c.FIGCAPTION,s.FIGCAPTION],[c.FIGURE,s.FIGURE],[c.FONT,s.FONT],[c.FOOTER,s.FOOTER],[c.FOREIGN_OBJECT,s.FOREIGN_OBJECT],[c.FORM,s.FORM],[c.FRAME,s.FRAME],[c.FRAMESET,s.FRAMESET],[c.H1,s.H1],[c.H2,s.H2],[c.H3,s.H3],[c.H4,s.H4],[c.H5,s.H5],[c.H6,s.H6],[c.HEAD,s.HEAD],[c.HEADER,s.HEADER],[c.HGROUP,s.HGROUP],[c.HR,s.HR],[c.HTML,s.HTML],[c.I,s.I],[c.IMG,s.IMG],[c.IMAGE,s.IMAGE],[c.INPUT,s.INPUT],[c.IFRAME,s.IFRAME],[c.KEYGEN,s.KEYGEN],[c.LABEL,s.LABEL],[c.LI,s.LI],[c.LINK,s.LINK],[c.LISTING,s.LISTING],[c.MAIN,s.MAIN],[c.MALIGNMARK,s.MALIGNMARK],[c.MARQUEE,s.MARQUEE],[c.MATH,s.MATH],[c.MENU,s.MENU],[c.META,s.META],[c.MGLYPH,s.MGLYPH],[c.MI,s.MI],[c.MO,s.MO],[c.MN,s.MN],[c.MS,s.MS],[c.MTEXT,s.MTEXT],[c.NAV,s.NAV],[c.NOBR,s.NOBR],[c.NOFRAMES,s.NOFRAMES],[c.NOEMBED,s.NOEMBED],[c.NOSCRIPT,s.NOSCRIPT],[c.OBJECT,s.OBJECT],[c.OL,s.OL],[c.OPTGROUP,s.OPTGROUP],[c.OPTION,s.OPTION],[c.P,s.P],[c.PARAM,s.PARAM],[c.PLAINTEXT,s.PLAINTEXT],[c.PRE,s.PRE],[c.RB,s.RB],[c.RP,s.RP],[c.RT,s.RT],[c.RTC,s.RTC],[c.RUBY,s.RUBY],[c.S,s.S],[c.SCRIPT,s.SCRIPT],[c.SEARCH,s.SEARCH],[c.SECTION,s.SECTION],[c.SELECT,s.SELECT],[c.SOURCE,s.SOURCE],[c.SMALL,s.SMALL],[c.SPAN,s.SPAN],[c.STRIKE,s.STRIKE],[c.STRONG,s.STRONG],[c.STYLE,s.STYLE],[c.SUB,s.SUB],[c.SUMMARY,s.SUMMARY],[c.SUP,s.SUP],[c.TABLE,s.TABLE],[c.TBODY,s.TBODY],[c.TEMPLATE,s.TEMPLATE],[c.TEXTAREA,s.TEXTAREA],[c.TFOOT,s.TFOOT],[c.TD,s.TD],[c.TH,s.TH],[c.THEAD,s.THEAD],[c.TITLE,s.TITLE],[c.TR,s.TR],[c.TRACK,s.TRACK],[c.TT,s.TT],[c.U,s.U],[c.UL,s.UL],[c.SVG,s.SVG],[c.VAR,s.VAR],[c.WBR,s.WBR],[c.XMP,s.XMP]]);function V(e){var t;return(t=rs.get(e))!==null&&t!==void 0?t:s.UNKNOWN}var l=s,st={[h.HTML]:new Set([l.ADDRESS,l.APPLET,l.AREA,l.ARTICLE,l.ASIDE,l.BASE,l.BASEFONT,l.BGSOUND,l.BLOCKQUOTE,l.BODY,l.BR,l.BUTTON,l.CAPTION,l.CENTER,l.COL,l.COLGROUP,l.DD,l.DETAILS,l.DIR,l.DIV,l.DL,l.DT,l.EMBED,l.FIELDSET,l.FIGCAPTION,l.FIGURE,l.FOOTER,l.FORM,l.FRAME,l.FRAMESET,l.H1,l.H2,l.H3,l.H4,l.H5,l.H6,l.HEAD,l.HEADER,l.HGROUP,l.HR,l.HTML,l.IFRAME,l.IMG,l.INPUT,l.LI,l.LINK,l.LISTING,l.MAIN,l.MARQUEE,l.MENU,l.META,l.NAV,l.NOEMBED,l.NOFRAMES,l.NOSCRIPT,l.OBJECT,l.OL,l.P,l.PARAM,l.PLAINTEXT,l.PRE,l.SCRIPT,l.SECTION,l.SELECT,l.SOURCE,l.STYLE,l.SUMMARY,l.TABLE,l.TBODY,l.TD,l.TEMPLATE,l.TEXTAREA,l.TFOOT,l.TH,l.THEAD,l.TITLE,l.TR,l.TRACK,l.UL,l.WBR,l.XMP]),[h.MATHML]:new Set([l.MI,l.MO,l.MN,l.MS,l.MTEXT,l.ANNOTATION_XML]),[h.SVG]:new Set([l.TITLE,l.FOREIGN_OBJECT,l.DESC]),[h.XLINK]:new Set,[h.XML]:new Set,[h.XMLNS]:new Set},ee=new Set([l.H1,l.H2,l.H3,l.H4,l.H5,l.H6]),Pr=new Set([c.STYLE,c.SCRIPT,c.XMP,c.IFRAME,c.NOEMBED,c.NOFRAMES,c.PLAINTEXT]);var i;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(i||(i={}));var D={DATA:i.DATA,RCDATA:i.RCDATA,RAWTEXT:i.RAWTEXT,SCRIPT_DATA:i.SCRIPT_DATA,PLAINTEXT:i.PLAINTEXT,CDATA_SECTION:i.CDATA_SECTION};function is(e){return e>=r.DIGIT_0&&e<=r.DIGIT_9}function te(e){return e>=r.LATIN_CAPITAL_A&&e<=r.LATIN_CAPITAL_Z}function os(e){return e>=r.LATIN_SMALL_A&&e<=r.LATIN_SMALL_Z}function G(e){return os(e)||te(e)}function at(e){return G(e)||is(e)}function Oe(e){return e+32}function nt(e){return e===r.SPACE||e===r.LINE_FEED||e===r.TABULATION||e===r.FORM_FEED}function rt(e){return nt(e)||e===r.SOLIDUS||e===r.GREATER_THAN_SIGN}function cs(e){return e===r.NULL?T.nullCharacterReference:e>1114111?T.characterReferenceOutsideUnicodeRange:Ae(e)?T.surrogateCharacterReference:Re(e)?T.noncharacterCharacterReference:me(e)||e===r.CARRIAGE_RETURN?T.controlCharacterReference:null}var se=class{constructor(t,a){this.options=t,this.handler=a,this.paused=false,this.inLoop=false,this.inForeignNode=false,this.lastStartTagName="",this.active=false,this.state=i.DATA,this.returnState=i.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new fe(a),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Ie(Fe,(n,E)=>{this.preprocessor.pos=this.entityStartPos+E-1,this._flushCodePointConsumedAsCharacterReference(n)},a.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(T.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(T.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{let E=cs(n);E&&this._err(E,1)}}:void 0)}_err(t,a=0){var n,E;(E=(n=this.handler).onParseError)===null||E===void 0||E.call(n,this.preprocessor.getError(t,a))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=true;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=false}}pause(){this.paused=true}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=false,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,a,n){this.active=true,this.preprocessor.write(t,a),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(t){this.active=true,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=false,true):false}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let a=0;a<t;a++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,a){return this.preprocessor.startsWith(t,a)?(this._advanceBy(t.length-1),true):false}_createStartTagToken(){this.currentToken={type:R.START_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:false,ackSelfClosing:false,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:R.END_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:false,ackSelfClosing:false,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:R.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:R.DOCTYPE,name:t,forceQuirks:false,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,a){this.currentCharacterToken={type:t,chars:a,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,a;let n=this.currentToken;if(Ne(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){let E=(t=(a=n.location).attrs)!==null&&t!==void 0?t:a.attrs=Object.create(null);E[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(T.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let t=this.currentToken;this.prepareToken(t),t.tagID=V(t.tagName),t.type===R.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(T.endTagWithAttributes),t.selfClosing&&this._err(T.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case R.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case R.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case R.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){let t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:R.EOF,location:t}),this.active=false}_appendCharToCurrentCharacterToken(t,a){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=a;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,a)}_emitCodePoint(t){let a=nt(t)?R.WHITESPACE_CHARACTER:t===r.NULL?R.NULL_CHARACTER:R.CHARACTER;this._appendCharToCurrentCharacterToken(a,t<65536?String.fromCharCode(t):String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(R.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=i.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Y.Attribute:Y.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===i.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===i.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===i.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case i.DATA:{this._stateData(t);break}case i.RCDATA:{this._stateRcdata(t);break}case i.RAWTEXT:{this._stateRawtext(t);break}case i.SCRIPT_DATA:{this._stateScriptData(t);break}case i.PLAINTEXT:{this._statePlaintext(t);break}case i.TAG_OPEN:{this._stateTagOpen(t);break}case i.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case i.TAG_NAME:{this._stateTagName(t);break}case i.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case i.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case i.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case i.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case i.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case i.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case i.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case i.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case i.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case i.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case i.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case i.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case i.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case i.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case i.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case i.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case i.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case i.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case i.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case i.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case i.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case i.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case i.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case i.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case i.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case i.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case i.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case i.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case i.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case i.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case i.BOGUS_COMMENT:{this._stateBogusComment(t);break}case i.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case i.COMMENT_START:{this._stateCommentStart(t);break}case i.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case i.COMMENT:{this._stateComment(t);break}case i.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case i.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case i.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case i.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case i.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case i.COMMENT_END:{this._stateCommentEnd(t);break}case i.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case i.DOCTYPE:{this._stateDoctype(t);break}case i.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case i.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case i.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case i.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case i.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case i.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case i.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case i.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case i.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case i.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case i.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case i.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case i.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case i.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case i.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case i.CDATA_SECTION:{this._stateCdataSection(t);break}case i.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case i.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case i.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case i.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case r.LESS_THAN_SIGN:{this.state=i.TAG_OPEN;break}case r.AMPERSAND:{this._startCharacterReference();break}case r.NULL:{this._err(T.unexpectedNullCharacter),this._emitCodePoint(t);break}case r.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case r.AMPERSAND:{this._startCharacterReference();break}case r.LESS_THAN_SIGN:{this.state=i.RCDATA_LESS_THAN_SIGN;break}case r.NULL:{this._err(T.unexpectedNullCharacter),this._emitChars(f);break}case r.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case r.LESS_THAN_SIGN:{this.state=i.RAWTEXT_LESS_THAN_SIGN;break}case r.NULL:{this._err(T.unexpectedNullCharacter),this._emitChars(f);break}case r.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case r.LESS_THAN_SIGN:{this.state=i.SCRIPT_DATA_LESS_THAN_SIGN;break}case r.NULL:{this._err(T.unexpectedNullCharacter),this._emitChars(f);break}case r.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case r.NULL:{this._err(T.unexpectedNullCharacter),this._emitChars(f);break}case r.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(G(t))this._createStartTagToken(),this.state=i.TAG_NAME,this._stateTagName(t);else switch(t){case r.EXCLAMATION_MARK:{this.state=i.MARKUP_DECLARATION_OPEN;break}case r.SOLIDUS:{this.state=i.END_TAG_OPEN;break}case r.QUESTION_MARK:{this._err(T.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=i.BOGUS_COMMENT,this._stateBogusComment(t);break}case r.EOF:{this._err(T.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(T.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=i.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(G(t))this._createEndTagToken(),this.state=i.TAG_NAME,this._stateTagName(t);else switch(t){case r.GREATER_THAN_SIGN:{this._err(T.missingEndTagName),this.state=i.DATA;break}case r.EOF:{this._err(T.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(T.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=i.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:{this.state=i.BEFORE_ATTRIBUTE_NAME;break}case r.SOLIDUS:{this.state=i.SELF_CLOSING_START_TAG;break}case r.GREATER_THAN_SIGN:{this.state=i.DATA,this.emitCurrentTagToken();break}case r.NULL:{this._err(T.unexpectedNullCharacter),a.tagName+=f;break}case r.EOF:{this._err(T.eofInTag),this._emitEOFToken();break}default:a.tagName+=String.fromCodePoint(te(t)?Oe(t):t)}}_stateRcdataLessThanSign(t){t===r.SOLIDUS?this.state=i.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=i.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){G(t)?(this.state=i.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=i.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,false))return!this._ensureHibernation();this._createEndTagToken();let a=this.currentToken;switch(a.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=i.BEFORE_ATTRIBUTE_NAME,false;case r.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=i.SELF_CLOSING_START_TAG,false;case r.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=i.DATA,false;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=i.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===r.SOLIDUS?this.state=i.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=i.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){G(t)?(this.state=i.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=i.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=i.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case r.SOLIDUS:{this.state=i.SCRIPT_DATA_END_TAG_OPEN;break}case r.EXCLAMATION_MARK:{this.state=i.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=i.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){G(t)?(this.state=i.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=i.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=i.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===r.HYPHEN_MINUS?(this.state=i.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=i.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===r.HYPHEN_MINUS?(this.state=i.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=i.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case r.HYPHEN_MINUS:{this.state=i.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case r.LESS_THAN_SIGN:{this.state=i.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case r.NULL:{this._err(T.unexpectedNullCharacter),this._emitChars(f);break}case r.EOF:{this._err(T.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case r.HYPHEN_MINUS:{this.state=i.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case r.LESS_THAN_SIGN:{this.state=i.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case r.NULL:{this._err(T.unexpectedNullCharacter),this.state=i.SCRIPT_DATA_ESCAPED,this._emitChars(f);break}case r.EOF:{this._err(T.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=i.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case r.HYPHEN_MINUS:{this._emitChars("-");break}case r.LESS_THAN_SIGN:{this.state=i.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case r.GREATER_THAN_SIGN:{this.state=i.SCRIPT_DATA,this._emitChars(">");break}case r.NULL:{this._err(T.unexpectedNullCharacter),this.state=i.SCRIPT_DATA_ESCAPED,this._emitChars(f);break}case r.EOF:{this._err(T.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=i.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===r.SOLIDUS?this.state=i.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:G(t)?(this._emitChars("<"),this.state=i.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=i.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){G(t)?(this.state=i.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=i.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=i.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(P.SCRIPT,false)&&rt(this.preprocessor.peek(P.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<P.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=i.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case r.HYPHEN_MINUS:{this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case r.LESS_THAN_SIGN:{this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case r.NULL:{this._err(T.unexpectedNullCharacter),this._emitChars(f);break}case r.EOF:{this._err(T.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case r.HYPHEN_MINUS:{this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case r.LESS_THAN_SIGN:{this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case r.NULL:{this._err(T.unexpectedNullCharacter),this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(f);break}case r.EOF:{this._err(T.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case r.HYPHEN_MINUS:{this._emitChars("-");break}case r.LESS_THAN_SIGN:{this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case r.GREATER_THAN_SIGN:{this.state=i.SCRIPT_DATA,this._emitChars(">");break}case r.NULL:{this._err(T.unexpectedNullCharacter),this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(f);break}case r.EOF:{this._err(T.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===r.SOLIDUS?(this.state=i.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(P.SCRIPT,false)&&rt(this.preprocessor.peek(P.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<P.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=i.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.SOLIDUS:case r.GREATER_THAN_SIGN:case r.EOF:{this.state=i.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case r.EQUALS_SIGN:{this._err(T.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=i.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=i.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:case r.SOLIDUS:case r.GREATER_THAN_SIGN:case r.EOF:{this._leaveAttrName(),this.state=i.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case r.EQUALS_SIGN:{this._leaveAttrName(),this.state=i.BEFORE_ATTRIBUTE_VALUE;break}case r.QUOTATION_MARK:case r.APOSTROPHE:case r.LESS_THAN_SIGN:{this._err(T.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case r.NULL:{this._err(T.unexpectedNullCharacter),this.currentAttr.name+=f;break}default:this.currentAttr.name+=String.fromCodePoint(te(t)?Oe(t):t)}}_stateAfterAttributeName(t){switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.SOLIDUS:{this.state=i.SELF_CLOSING_START_TAG;break}case r.EQUALS_SIGN:{this.state=i.BEFORE_ATTRIBUTE_VALUE;break}case r.GREATER_THAN_SIGN:{this.state=i.DATA,this.emitCurrentTagToken();break}case r.EOF:{this._err(T.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=i.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.QUOTATION_MARK:{this.state=i.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case r.APOSTROPHE:{this.state=i.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case r.GREATER_THAN_SIGN:{this._err(T.missingAttributeValue),this.state=i.DATA,this.emitCurrentTagToken();break}default:this.state=i.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case r.QUOTATION_MARK:{this.state=i.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case r.AMPERSAND:{this._startCharacterReference();break}case r.NULL:{this._err(T.unexpectedNullCharacter),this.currentAttr.value+=f;break}case r.EOF:{this._err(T.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case r.APOSTROPHE:{this.state=i.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case r.AMPERSAND:{this._startCharacterReference();break}case r.NULL:{this._err(T.unexpectedNullCharacter),this.currentAttr.value+=f;break}case r.EOF:{this._err(T.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:{this._leaveAttrValue(),this.state=i.BEFORE_ATTRIBUTE_NAME;break}case r.AMPERSAND:{this._startCharacterReference();break}case r.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=i.DATA,this.emitCurrentTagToken();break}case r.NULL:{this._err(T.unexpectedNullCharacter),this.currentAttr.value+=f;break}case r.QUOTATION_MARK:case r.APOSTROPHE:case r.LESS_THAN_SIGN:case r.EQUALS_SIGN:case r.GRAVE_ACCENT:{this._err(T.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case r.EOF:{this._err(T.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:{this._leaveAttrValue(),this.state=i.BEFORE_ATTRIBUTE_NAME;break}case r.SOLIDUS:{this._leaveAttrValue(),this.state=i.SELF_CLOSING_START_TAG;break}case r.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=i.DATA,this.emitCurrentTagToken();break}case r.EOF:{this._err(T.eofInTag),this._emitEOFToken();break}default:this._err(T.missingWhitespaceBetweenAttributes),this.state=i.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case r.GREATER_THAN_SIGN:{let a=this.currentToken;a.selfClosing=true,this.state=i.DATA,this.emitCurrentTagToken();break}case r.EOF:{this._err(T.eofInTag),this._emitEOFToken();break}default:this._err(T.unexpectedSolidusInTag),this.state=i.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){let a=this.currentToken;switch(t){case r.GREATER_THAN_SIGN:{this.state=i.DATA,this.emitCurrentComment(a);break}case r.EOF:{this.emitCurrentComment(a),this._emitEOFToken();break}case r.NULL:{this._err(T.unexpectedNullCharacter),a.data+=f;break}default:a.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(P.DASH_DASH,true)?(this._createCommentToken(P.DASH_DASH.length+1),this.state=i.COMMENT_START):this._consumeSequenceIfMatch(P.DOCTYPE,false)?(this.currentLocation=this.getCurrentLocation(P.DOCTYPE.length+1),this.state=i.DOCTYPE):this._consumeSequenceIfMatch(P.CDATA_START,true)?this.inForeignNode?this.state=i.CDATA_SECTION:(this._err(T.cdataInHtmlContent),this._createCommentToken(P.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=i.BOGUS_COMMENT):this._ensureHibernation()||(this._err(T.incorrectlyOpenedComment),this._createCommentToken(2),this.state=i.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case r.HYPHEN_MINUS:{this.state=i.COMMENT_START_DASH;break}case r.GREATER_THAN_SIGN:{this._err(T.abruptClosingOfEmptyComment),this.state=i.DATA;let a=this.currentToken;this.emitCurrentComment(a);break}default:this.state=i.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){let a=this.currentToken;switch(t){case r.HYPHEN_MINUS:{this.state=i.COMMENT_END;break}case r.GREATER_THAN_SIGN:{this._err(T.abruptClosingOfEmptyComment),this.state=i.DATA,this.emitCurrentComment(a);break}case r.EOF:{this._err(T.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=i.COMMENT,this._stateComment(t)}}_stateComment(t){let a=this.currentToken;switch(t){case r.HYPHEN_MINUS:{this.state=i.COMMENT_END_DASH;break}case r.LESS_THAN_SIGN:{a.data+="<",this.state=i.COMMENT_LESS_THAN_SIGN;break}case r.NULL:{this._err(T.unexpectedNullCharacter),a.data+=f;break}case r.EOF:{this._err(T.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){let a=this.currentToken;switch(t){case r.EXCLAMATION_MARK:{a.data+="!",this.state=i.COMMENT_LESS_THAN_SIGN_BANG;break}case r.LESS_THAN_SIGN:{a.data+="<";break}default:this.state=i.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===r.HYPHEN_MINUS?this.state=i.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=i.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===r.HYPHEN_MINUS?this.state=i.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=i.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==r.GREATER_THAN_SIGN&&t!==r.EOF&&this._err(T.nestedComment),this.state=i.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){let a=this.currentToken;switch(t){case r.HYPHEN_MINUS:{this.state=i.COMMENT_END;break}case r.EOF:{this._err(T.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=i.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){let a=this.currentToken;switch(t){case r.GREATER_THAN_SIGN:{this.state=i.DATA,this.emitCurrentComment(a);break}case r.EXCLAMATION_MARK:{this.state=i.COMMENT_END_BANG;break}case r.HYPHEN_MINUS:{a.data+="-";break}case r.EOF:{this._err(T.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--",this.state=i.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){let a=this.currentToken;switch(t){case r.HYPHEN_MINUS:{a.data+="--!",this.state=i.COMMENT_END_DASH;break}case r.GREATER_THAN_SIGN:{this._err(T.incorrectlyClosedComment),this.state=i.DATA,this.emitCurrentComment(a);break}case r.EOF:{this._err(T.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--!",this.state=i.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:{this.state=i.BEFORE_DOCTYPE_NAME;break}case r.GREATER_THAN_SIGN:{this.state=i.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case r.EOF:{this._err(T.eofInDoctype),this._createDoctypeToken(null);let a=this.currentToken;a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(T.missingWhitespaceBeforeDoctypeName),this.state=i.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(te(t))this._createDoctypeToken(String.fromCharCode(Oe(t))),this.state=i.DOCTYPE_NAME;else switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.NULL:{this._err(T.unexpectedNullCharacter),this._createDoctypeToken(f),this.state=i.DOCTYPE_NAME;break}case r.GREATER_THAN_SIGN:{this._err(T.missingDoctypeName),this._createDoctypeToken(null);let a=this.currentToken;a.forceQuirks=true,this.emitCurrentDoctype(a),this.state=i.DATA;break}case r.EOF:{this._err(T.eofInDoctype),this._createDoctypeToken(null);let a=this.currentToken;a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=i.DOCTYPE_NAME}}_stateDoctypeName(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:{this.state=i.AFTER_DOCTYPE_NAME;break}case r.GREATER_THAN_SIGN:{this.state=i.DATA,this.emitCurrentDoctype(a);break}case r.NULL:{this._err(T.unexpectedNullCharacter),a.name+=f;break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.name+=String.fromCodePoint(te(t)?Oe(t):t)}}_stateAfterDoctypeName(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.GREATER_THAN_SIGN:{this.state=i.DATA,this.emitCurrentDoctype(a);break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(P.PUBLIC,false)?this.state=i.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(P.SYSTEM,false)?this.state=i.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(T.invalidCharacterSequenceAfterDoctypeName),a.forceQuirks=true,this.state=i.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:{this.state=i.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case r.QUOTATION_MARK:{this._err(T.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=i.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case r.APOSTROPHE:{this._err(T.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=i.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case r.GREATER_THAN_SIGN:{this._err(T.missingDoctypePublicIdentifier),a.forceQuirks=true,this.state=i.DATA,this.emitCurrentDoctype(a);break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(T.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=true,this.state=i.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.QUOTATION_MARK:{a.publicId="",this.state=i.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case r.APOSTROPHE:{a.publicId="",this.state=i.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case r.GREATER_THAN_SIGN:{this._err(T.missingDoctypePublicIdentifier),a.forceQuirks=true,this.state=i.DATA,this.emitCurrentDoctype(a);break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(T.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=true,this.state=i.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){let a=this.currentToken;switch(t){case r.QUOTATION_MARK:{this.state=i.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case r.NULL:{this._err(T.unexpectedNullCharacter),a.publicId+=f;break}case r.GREATER_THAN_SIGN:{this._err(T.abruptDoctypePublicIdentifier),a.forceQuirks=true,this.emitCurrentDoctype(a),this.state=i.DATA;break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){let a=this.currentToken;switch(t){case r.APOSTROPHE:{this.state=i.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case r.NULL:{this._err(T.unexpectedNullCharacter),a.publicId+=f;break}case r.GREATER_THAN_SIGN:{this._err(T.abruptDoctypePublicIdentifier),a.forceQuirks=true,this.emitCurrentDoctype(a),this.state=i.DATA;break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:{this.state=i.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case r.GREATER_THAN_SIGN:{this.state=i.DATA,this.emitCurrentDoctype(a);break}case r.QUOTATION_MARK:{this._err(T.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=i.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case r.APOSTROPHE:{this._err(T.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=i.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(T.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=true,this.state=i.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=i.DATA;break}case r.QUOTATION_MARK:{a.systemId="",this.state=i.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case r.APOSTROPHE:{a.systemId="",this.state=i.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(T.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=true,this.state=i.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:{this.state=i.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case r.QUOTATION_MARK:{this._err(T.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=i.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case r.APOSTROPHE:{this._err(T.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=i.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case r.GREATER_THAN_SIGN:{this._err(T.missingDoctypeSystemIdentifier),a.forceQuirks=true,this.state=i.DATA,this.emitCurrentDoctype(a);break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(T.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=true,this.state=i.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.QUOTATION_MARK:{a.systemId="",this.state=i.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case r.APOSTROPHE:{a.systemId="",this.state=i.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case r.GREATER_THAN_SIGN:{this._err(T.missingDoctypeSystemIdentifier),a.forceQuirks=true,this.state=i.DATA,this.emitCurrentDoctype(a);break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(T.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=true,this.state=i.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){let a=this.currentToken;switch(t){case r.QUOTATION_MARK:{this.state=i.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case r.NULL:{this._err(T.unexpectedNullCharacter),a.systemId+=f;break}case r.GREATER_THAN_SIGN:{this._err(T.abruptDoctypeSystemIdentifier),a.forceQuirks=true,this.emitCurrentDoctype(a),this.state=i.DATA;break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){let a=this.currentToken;switch(t){case r.APOSTROPHE:{this.state=i.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case r.NULL:{this._err(T.unexpectedNullCharacter),a.systemId+=f;break}case r.GREATER_THAN_SIGN:{this._err(T.abruptDoctypeSystemIdentifier),a.forceQuirks=true,this.emitCurrentDoctype(a),this.state=i.DATA;break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=i.DATA;break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(T.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=i.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){let a=this.currentToken;switch(t){case r.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=i.DATA;break}case r.NULL:{this._err(T.unexpectedNullCharacter);break}case r.EOF:{this.emitCurrentDoctype(a),this._emitEOFToken();break}default:}}_stateCdataSection(t){switch(t){case r.RIGHT_SQUARE_BRACKET:{this.state=i.CDATA_SECTION_BRACKET;break}case r.EOF:{this._err(T.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===r.RIGHT_SQUARE_BRACKET?this.state=i.CDATA_SECTION_END:(this._emitChars("]"),this.state=i.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case r.GREATER_THAN_SIGN:{this.state=i.DATA;break}case r.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=i.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=false,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=true;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(r.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&at(this.preprocessor.peek(1))?i.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){at(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===r.SEMICOLON&&this._err(T.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};var Et=new Set([s.DD,s.DT,s.LI,s.OPTGROUP,s.OPTION,s.P,s.RB,s.RP,s.RT,s.RTC]),it=new Set([...Et,s.CAPTION,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]),Le=new Set([s.APPLET,s.CAPTION,s.HTML,s.MARQUEE,s.OBJECT,s.TABLE,s.TD,s.TEMPLATE,s.TH]),Es=new Set([...Le,s.OL,s.UL]),Ts=new Set([...Le,s.BUTTON]),ot=new Set([s.ANNOTATION_XML,s.MI,s.MN,s.MO,s.MS,s.MTEXT]),ct=new Set([s.DESC,s.FOREIGN_OBJECT,s.TITLE]),hs=new Set([s.TR,s.TEMPLATE,s.HTML]),ls=new Set([s.TBODY,s.TFOOT,s.THEAD,s.TEMPLATE,s.HTML]),_s=new Set([s.TABLE,s.TEMPLATE,s.HTML]),us=new Set([s.TD,s.TH]),Se=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,a,n){this.treeAdapter=a,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=s.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===s.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===h.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,a){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=a,this.currentTagId=a,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,a,true)}pop(){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,true)}replace(t,a){let n=this._indexOf(t);this.items[n]=a,n===this.stackTop&&(this.current=a)}insertAfter(t,a,n){let E=this._indexOf(t)+1;this.items.splice(E,0,a),this.tagIDs.splice(E,0,n),this.stackTop++,E===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,E===this.stackTop)}popUntilTagNamePopped(t){let a=this.stackTop+1;do a=this.tagIDs.lastIndexOf(t,a-1);while(a>0&&this.treeAdapter.getNamespaceURI(this.items[a])!==h.HTML);this.shortenToLength(Math.max(a,0))}shortenToLength(t){for(;this.stackTop>=t;){let a=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(a,this.stackTop<t)}}popUntilElementPopped(t){let a=this._indexOf(t);this.shortenToLength(Math.max(a,0))}popUntilPopped(t,a){let n=this._indexOfTagNames(t,a);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(ee,h.HTML)}popUntilTableCellPopped(){this.popUntilPopped(us,h.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,a){for(let n=this.stackTop;n>=0;n--)if(t.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===a)return n;return-1}clearBackTo(t,a){let n=this._indexOfTagNames(t,a);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(_s,h.HTML)}clearBackToTableBodyContext(){this.clearBackTo(ls,h.HTML)}clearBackToTableRowContext(){this.clearBackTo(hs,h.HTML)}remove(t){let a=this._indexOf(t);a>=0&&(a===this.stackTop?this.pop():(this.items.splice(a,1),this.tagIDs.splice(a,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,false)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===s.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){let a=this._indexOf(t)-1;return a>=0?this.items[a]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===s.HTML}hasInDynamicScope(t,a){for(let n=this.stackTop;n>=0;n--){let E=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case h.HTML:{if(E===t)return true;if(a.has(E))return false;break}case h.SVG:{if(ct.has(E))return false;break}case h.MATHML:{if(ot.has(E))return false;break}}}return true}hasInScope(t){return this.hasInDynamicScope(t,Le)}hasInListItemScope(t){return this.hasInDynamicScope(t,Es)}hasInButtonScope(t){return this.hasInDynamicScope(t,Ts)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){let a=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case h.HTML:{if(ee.has(a))return true;if(Le.has(a))return false;break}case h.SVG:{if(ct.has(a))return false;break}case h.MATHML:{if(ot.has(a))return false;break}}}return true}hasInTableScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===h.HTML)switch(this.tagIDs[a]){case t:return true;case s.TABLE:case s.HTML:return false}return true}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===h.HTML)switch(this.tagIDs[t]){case s.TBODY:case s.THEAD:case s.TFOOT:return true;case s.TABLE:case s.HTML:return false}return true}hasInSelectScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===h.HTML)switch(this.tagIDs[a]){case t:return true;case s.OPTION:case s.OPTGROUP:break;default:return false}return true}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Et.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&it.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&it.has(this.currentTagId);)this.pop()}};var w;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(w||(w={}));var Tt={type:w.Marker},ge=class{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,a){let n=[],E=a.length,_=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let d=0;d<this.entries.length;d++){let m=this.entries[d];if(m.type===w.Marker)break;let{element:A}=m;if(this.treeAdapter.getTagName(A)===_&&this.treeAdapter.getNamespaceURI(A)===u){let O=this.treeAdapter.getAttrList(A);O.length===E&&n.push({idx:d,attrs:O})}}return n}_ensureNoahArkCondition(t){if(this.entries.length<3)return;let a=this.treeAdapter.getAttrList(t),n=this._getNoahArkConditionCandidates(t,a);if(n.length<3)return;let E=new Map(a.map(u=>[u.name,u.value])),_=0;for(let u=0;u<n.length;u++){let d=n[u];d.attrs.every(m=>E.get(m.name)===m.value)&&(_+=1,_>=3&&this.entries.splice(d.idx,1))}}insertMarker(){this.entries.unshift(Tt)}pushElement(t,a){this._ensureNoahArkCondition(t),this.entries.unshift({type:w.Element,element:t,token:a})}insertElementAfterBookmark(t,a){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:w.Element,element:t,token:a})}removeEntry(t){let a=this.entries.indexOf(t);a!==-1&&this.entries.splice(a,1)}clearToLastMarker(){let t=this.entries.indexOf(Tt);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){let a=this.entries.find(n=>n.type===w.Marker||this.treeAdapter.getTagName(n.element)===t);return a&&a.type===w.Element?a:null}getElementEntry(t){return this.entries.find(a=>a.type===w.Element&&a.element===t)}};var x={createDocument(){return{nodeName:"#document",mode:B.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,a){return{nodeName:e,tagName:e,attrs:a,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,a){let n=e.childNodes.indexOf(a);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,a,n){let E=e.childNodes.find(_=>_.nodeName==="#documentType");if(E)E.name=t,E.publicId=a,E.systemId=n;else{let _={nodeName:"#documentType",name:t,publicId:a,systemId:n,parentNode:null};x.appendChild(e,_)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let a=e.childNodes[e.childNodes.length-1];if(x.isTextNode(a)){a.value+=t;return}}x.appendChild(e,x.createTextNode(t))},insertTextBefore(e,t,a){let n=e.childNodes[e.childNodes.indexOf(a)-1];n&&x.isTextNode(n)?n.value+=t:x.insertBefore(e,x.createTextNode(t),a)},adoptAttributes(e,t){let a=new Set(e.attrs.map(n=>n.name));for(let n=0;n<t.length;n++)a.has(t[n].name)||e.attrs.push(t[n])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};var lt="html",ds="about:legacy-compat",As="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",_t=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],ms=[..._t,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Rs=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),ut=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],fs=[...ut,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ht(e,t){return t.some(a=>e.startsWith(a))}function dt(e){return e.name===lt&&e.publicId===null&&(e.systemId===null||e.systemId===ds)}function At(e){if(e.name!==lt)return B.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===As)return B.QUIRKS;let{publicId:a}=e;if(a!==null){if(a=a.toLowerCase(),Rs.has(a))return B.QUIRKS;let n=t===null?ms:_t;if(ht(a,n))return B.QUIRKS;if(n=t===null?ut:fs,ht(a,n))return B.LIMITED_QUIRKS}return B.NO_QUIRKS}var mt={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Cs="definitionurl",Is="definitionURL",Os=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Ls=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:h.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:h.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:h.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:h.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:h.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:h.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:h.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:h.XML}],["xml:space",{prefix:"xml",name:"space",namespace:h.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:h.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:h.XMLNS}]]),Ss=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),gs=new Set([s.B,s.BIG,s.BLOCKQUOTE,s.BODY,s.BR,s.CENTER,s.CODE,s.DD,s.DIV,s.DL,s.DT,s.EM,s.EMBED,s.H1,s.H2,s.H3,s.H4,s.H5,s.H6,s.HEAD,s.HR,s.I,s.IMG,s.LI,s.LISTING,s.MENU,s.META,s.NOBR,s.OL,s.P,s.PRE,s.RUBY,s.S,s.SMALL,s.SPAN,s.STRONG,s.STRIKE,s.SUB,s.SUP,s.TABLE,s.TT,s.U,s.UL,s.VAR]);function Rt(e){let t=e.tagID;return t===s.FONT&&e.attrs.some(({name:n})=>n===J.COLOR||n===J.SIZE||n===J.FACE)||gs.has(t)}function we(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Cs){e.attrs[t].name=Is;break}}function xe(e){for(let t=0;t<e.attrs.length;t++){let a=Os.get(e.attrs[t].name);a!=null&&(e.attrs[t].name=a)}}function De(e){for(let t=0;t<e.attrs.length;t++){let a=Ls.get(e.attrs[t].name);a&&(e.attrs[t].prefix=a.prefix,e.attrs[t].name=a.name,e.attrs[t].namespace=a.namespace)}}function ft(e){let t=Ss.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=V(e.tagName))}function Ds(e,t){return t===h.MATHML&&(e===s.MI||e===s.MO||e===s.MN||e===s.MS||e===s.MTEXT)}function ps(e,t,a){if(t===h.MATHML&&e===s.ANNOTATION_XML){for(let n=0;n<a.length;n++)if(a[n].name===J.ENCODING){let E=a[n].value.toLowerCase();return E===mt.TEXT_HTML||E===mt.APPLICATION_XML}}return t===h.SVG&&(e===s.FOREIGN_OBJECT||e===s.DESC||e===s.TITLE)}function Nt(e,t,a,n){return(!n||n===h.HTML)&&ps(e,t,a)||(!n||n===h.MATHML)&&Ds(e,t)}var bs="hidden",Ps=8,Bs=3,o;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(o||(o={}));var Ms={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},St=new Set([s.TABLE,s.TBODY,s.TFOOT,s.THEAD,s.TR]),It={scriptingEnabled:true,sourceCodeLocationInfo:false,treeAdapter:x,onParseError:null},Te=class{constructor(t,a,n=null,E=null){this.fragmentContext=n,this.scriptHandler=E,this.currentToken=null,this.stopped=false,this.insertionMode=o.INITIAL,this.originalInsertionMode=o.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=false,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=false,this.framesetOk=true,this.skipNextNewLine=false,this.fosterParentingEnabled=false,this.options={...It,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=true),this.document=a??this.treeAdapter.createDocument(),this.tokenizer=new se(this.options,this),this.activeFormattingElements=new ge(this.treeAdapter),this.fragmentContextID=n?V(this.treeAdapter.getTagName(n)):s.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new Se(this.document,this.treeAdapter,this)}static parse(t,a){let n=new this(a);return n.tokenizer.write(t,true),n.document}static getFragmentParser(t,a){let n={...It,...a};t??(t=n.treeAdapter.createElement(c.TEMPLATE,h.HTML,[]));let E=n.treeAdapter.createElement("documentmock",h.HTML,[]),_=new this(n,E,t);return _.fragmentContextID===s.TEMPLATE&&_.tmplInsertionModeStack.unshift(o.IN_TEMPLATE),_._initTokenizerForFragmentParsing(),_._insertFakeRootElement(),_._resetInsertionMode(),_._findFormInFragmentContext(),_}getFragment(){let t=this.treeAdapter.getFirstChild(this.document),a=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,a),a}_err(t,a,n){var E;if(!this.onParseError)return;let _=(E=t.location)!==null&&E!==void 0?E:Ms,u={code:a,startLine:_.startLine,startCol:_.startCol,startOffset:_.startOffset,endLine:n?_.startLine:_.endLine,endCol:n?_.startCol:_.endCol,endOffset:n?_.startOffset:_.endOffset};this.onParseError(u)}onItemPush(t,a,n){var E,_;(_=(E=this.treeAdapter).onItemPush)===null||_===void 0||_.call(E,t),n&&this.openElements.stackTop>0&&this._setContextModes(t,a)}onItemPop(t,a){var n,E;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(E=(n=this.treeAdapter).onItemPop)===null||E===void 0||E.call(n,t,this.openElements.current),a){let _,u;this.openElements.stackTop===0&&this.fragmentContext?(_=this.fragmentContext,u=this.fragmentContextID):{current:_,currentTagId:u}=this.openElements,this._setContextModes(_,u)}}_setContextModes(t,a){let n=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===h.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&t!==void 0&&a!==void 0&&!this._isIntegrationPoint(a,t)}_switchToTextParsing(t,a){this._insertElement(t,h.HTML),this.tokenizer.state=a,this.originalInsertionMode=this.insertionMode,this.insertionMode=o.TEXT}switchToPlaintextParsing(){this.insertionMode=o.TEXT,this.originalInsertionMode=o.IN_BODY,this.tokenizer.state=D.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===c.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==h.HTML))switch(this.fragmentContextID){case s.TITLE:case s.TEXTAREA:{this.tokenizer.state=D.RCDATA;break}case s.STYLE:case s.XMP:case s.IFRAME:case s.NOEMBED:case s.NOFRAMES:case s.NOSCRIPT:{this.tokenizer.state=D.RAWTEXT;break}case s.SCRIPT:{this.tokenizer.state=D.SCRIPT_DATA;break}case s.PLAINTEXT:{this.tokenizer.state=D.PLAINTEXT;break}default:}}_setDocumentType(t){let a=t.name||"",n=t.publicId||"",E=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,a,n,E),t.location){let u=this.treeAdapter.getChildNodes(this.document).find(d=>this.treeAdapter.isDocumentTypeNode(d));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,a){if(this.options.sourceCodeLocationInfo){let n=a&&{...a,startTag:a};this.treeAdapter.setNodeSourceCodeLocation(t,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{let n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,t)}}_appendElement(t,a){let n=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(n,t.location)}_insertElement(t,a){let n=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID)}_insertFakeElement(t,a){let n=this.treeAdapter.createElement(t,h.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,a)}_insertTemplate(t){let a=this.treeAdapter.createElement(t.tagName,h.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(a,n),this._attachElementToTree(a,t.location),this.openElements.push(a,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let t=this.treeAdapter.createElement(c.HTML,h.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,s.HTML)}_appendCommentNode(t,a){let n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(a,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,t.location)}_insertCharacters(t){let a,n;if(this._shouldFosterParentOnInsertion()?({parent:a,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(a,t.chars,n):this.treeAdapter.insertText(a,t.chars)):(a=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(a,t.chars)),!t.location)return;let E=this.treeAdapter.getChildNodes(a),_=n?E.lastIndexOf(n):E.length,u=E[_-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){let{endLine:m,endCol:A,endOffset:O}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:m,endCol:A,endOffset:O})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,a){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(a,n)}_setEndLocation(t,a){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&a.location){let n=a.location,E=this.treeAdapter.getTagName(t),_=a.type===R.END_TAG&&E===a.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,_)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return false;let a,n;return this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,n=this.fragmentContextID):{current:a,currentTagId:n}=this.openElements,t.tagID===s.SVG&&this.treeAdapter.getTagName(a)===c.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(a)===h.MATHML?false:this.tokenizer.inForeignNode||(t.tagID===s.MGLYPH||t.tagID===s.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,a,h.HTML)}_processToken(t){switch(t.type){case R.CHARACTER:{this.onCharacter(t);break}case R.NULL_CHARACTER:{this.onNullCharacter(t);break}case R.COMMENT:{this.onComment(t);break}case R.DOCTYPE:{this.onDoctype(t);break}case R.START_TAG:{this._processStartTag(t);break}case R.END_TAG:{this.onEndTag(t);break}case R.EOF:{this.onEof(t);break}case R.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,a,n){let E=this.treeAdapter.getNamespaceURI(a),_=this.treeAdapter.getAttrList(a);return Nt(t,E,_,n)}_reconstructActiveFormattingElements(){let t=this.activeFormattingElements.entries.length;if(t){let a=this.activeFormattingElements.entries.findIndex(E=>E.type===w.Marker||this.openElements.contains(E.element)),n=a===-1?t-1:a-1;for(let E=n;E>=0;E--){let _=this.activeFormattingElements.entries[E];this._insertElement(_.token,this.treeAdapter.getNamespaceURI(_.element)),_.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=o.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(s.P),this.openElements.popUntilTagNamePopped(s.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case s.TR:{this.insertionMode=o.IN_ROW;return}case s.TBODY:case s.THEAD:case s.TFOOT:{this.insertionMode=o.IN_TABLE_BODY;return}case s.CAPTION:{this.insertionMode=o.IN_CAPTION;return}case s.COLGROUP:{this.insertionMode=o.IN_COLUMN_GROUP;return}case s.TABLE:{this.insertionMode=o.IN_TABLE;return}case s.BODY:{this.insertionMode=o.IN_BODY;return}case s.FRAMESET:{this.insertionMode=o.IN_FRAMESET;return}case s.SELECT:{this._resetInsertionModeForSelect(t);return}case s.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case s.HTML:{this.insertionMode=this.headElement?o.AFTER_HEAD:o.BEFORE_HEAD;return}case s.TD:case s.TH:{if(t>0){this.insertionMode=o.IN_CELL;return}break}case s.HEAD:{if(t>0){this.insertionMode=o.IN_HEAD;return}break}}this.insertionMode=o.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let a=t-1;a>0;a--){let n=this.openElements.tagIDs[a];if(n===s.TEMPLATE)break;if(n===s.TABLE){this.insertionMode=o.IN_SELECT_IN_TABLE;return}}this.insertionMode=o.IN_SELECT}_isElementCausesFosterParenting(t){return St.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){let a=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case s.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(a)===h.HTML)return{parent:this.treeAdapter.getTemplateContent(a),beforeElement:null};break}case s.TABLE:{let n=this.treeAdapter.getParentNode(a);return n?{parent:n,beforeElement:a}:{parent:this.openElements.items[t-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){let a=this._findFosterParentingLocation();a.beforeElement?this.treeAdapter.insertBefore(a.parent,t,a.beforeElement):this.treeAdapter.appendChild(a.parent,t)}_isSpecialElement(t,a){let n=this.treeAdapter.getNamespaceURI(t);return st[n].has(a)}onCharacter(t){if(this.skipNextNewLine=false,this.tokenizer.inForeignNode){cr(this,t);return}switch(this.insertionMode){case o.INITIAL:{ae(this,t);break}case o.BEFORE_HTML:{ne(this,t);break}case o.BEFORE_HEAD:{ie(this,t);break}case o.IN_HEAD:{oe(this,t);break}case o.IN_HEAD_NO_SCRIPT:{ce(this,t);break}case o.AFTER_HEAD:{Ee(this,t);break}case o.IN_BODY:case o.IN_CAPTION:case o.IN_CELL:case o.IN_TEMPLATE:{Dt(this,t);break}case o.TEXT:case o.IN_SELECT:case o.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case o.IN_TABLE:case o.IN_TABLE_BODY:case o.IN_ROW:{ye(this,t);break}case o.IN_TABLE_TEXT:{kt(this,t);break}case o.IN_COLUMN_GROUP:{be(this,t);break}case o.AFTER_BODY:{Pe(this,t);break}case o.AFTER_AFTER_BODY:{pe(this,t);break}default:}}onNullCharacter(t){if(this.skipNextNewLine=false,this.tokenizer.inForeignNode){or(this,t);return}switch(this.insertionMode){case o.INITIAL:{ae(this,t);break}case o.BEFORE_HTML:{ne(this,t);break}case o.BEFORE_HEAD:{ie(this,t);break}case o.IN_HEAD:{oe(this,t);break}case o.IN_HEAD_NO_SCRIPT:{ce(this,t);break}case o.AFTER_HEAD:{Ee(this,t);break}case o.TEXT:{this._insertCharacters(t);break}case o.IN_TABLE:case o.IN_TABLE_BODY:case o.IN_ROW:{ye(this,t);break}case o.IN_COLUMN_GROUP:{be(this,t);break}case o.AFTER_BODY:{Pe(this,t);break}case o.AFTER_AFTER_BODY:{pe(this,t);break}default:}}onComment(t){if(this.skipNextNewLine=false,this.currentNotInHTML){ve(this,t);return}switch(this.insertionMode){case o.INITIAL:case o.BEFORE_HTML:case o.BEFORE_HEAD:case o.IN_HEAD:case o.IN_HEAD_NO_SCRIPT:case o.AFTER_HEAD:case o.IN_BODY:case o.IN_TABLE:case o.IN_CAPTION:case o.IN_COLUMN_GROUP:case o.IN_TABLE_BODY:case o.IN_ROW:case o.IN_CELL:case o.IN_SELECT:case o.IN_SELECT_IN_TABLE:case o.IN_TEMPLATE:case o.IN_FRAMESET:case o.AFTER_FRAMESET:{ve(this,t);break}case o.IN_TABLE_TEXT:{re(this,t);break}case o.AFTER_BODY:{ys(this,t);break}case o.AFTER_AFTER_BODY:case o.AFTER_AFTER_FRAMESET:{vs(this,t);break}default:}}onDoctype(t){switch(this.skipNextNewLine=false,this.insertionMode){case o.INITIAL:{Ys(this,t);break}case o.BEFORE_HEAD:case o.IN_HEAD:case o.IN_HEAD_NO_SCRIPT:case o.AFTER_HEAD:{this._err(t,T.misplacedDoctype);break}case o.IN_TABLE_TEXT:{re(this,t);break}default:}}onStartTag(t){this.skipNextNewLine=false,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,T.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Er(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case o.INITIAL:{ae(this,t);break}case o.BEFORE_HTML:{Ws(this,t);break}case o.BEFORE_HEAD:{Js(this,t);break}case o.IN_HEAD:{y(this,t);break}case o.IN_HEAD_NO_SCRIPT:{js(this,t);break}case o.AFTER_HEAD:{Vs(this,t);break}case o.IN_BODY:{p(this,t);break}case o.IN_TABLE:{$(this,t);break}case o.IN_TABLE_TEXT:{re(this,t);break}case o.IN_CAPTION:{Ka(this,t);break}case o.IN_COLUMN_GROUP:{Je(this,t);break}case o.IN_TABLE_BODY:{ke(this,t);break}case o.IN_ROW:{Ue(this,t);break}case o.IN_CELL:{Qa(this,t);break}case o.IN_SELECT:{Ft(this,t);break}case o.IN_SELECT_IN_TABLE:{qa(this,t);break}case o.IN_TEMPLATE:{Za(this,t);break}case o.AFTER_BODY:{er(this,t);break}case o.IN_FRAMESET:{tr(this,t);break}case o.AFTER_FRAMESET:{ar(this,t);break}case o.AFTER_AFTER_BODY:{nr(this,t);break}case o.AFTER_AFTER_FRAMESET:{ir(this,t);break}default:}}onEndTag(t){this.skipNextNewLine=false,this.currentToken=t,this.currentNotInHTML?Tr(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case o.INITIAL:{ae(this,t);break}case o.BEFORE_HTML:{Xs(this,t);break}case o.BEFORE_HEAD:{Ks(this,t);break}case o.IN_HEAD:{Gs(this,t);break}case o.IN_HEAD_NO_SCRIPT:{Qs(this,t);break}case o.AFTER_HEAD:{qs(this,t);break}case o.IN_BODY:{Me(this,t);break}case o.TEXT:{Ha(this,t);break}case o.IN_TABLE:{he(this,t);break}case o.IN_TABLE_TEXT:{re(this,t);break}case o.IN_CAPTION:{Ga(this,t);break}case o.IN_COLUMN_GROUP:{ja(this,t);break}case o.IN_TABLE_BODY:{Ye(this,t);break}case o.IN_ROW:{Ht(this,t);break}case o.IN_CELL:{Va(this,t);break}case o.IN_SELECT:{wt(this,t);break}case o.IN_SELECT_IN_TABLE:{za(this,t);break}case o.IN_TEMPLATE:{$a(this,t);break}case o.AFTER_BODY:{yt(this,t);break}case o.IN_FRAMESET:{sr(this,t);break}case o.AFTER_FRAMESET:{rr(this,t);break}case o.AFTER_AFTER_BODY:{pe(this,t);break}default:}}onEof(t){switch(this.insertionMode){case o.INITIAL:{ae(this,t);break}case o.BEFORE_HTML:{ne(this,t);break}case o.BEFORE_HEAD:{ie(this,t);break}case o.IN_HEAD:{oe(this,t);break}case o.IN_HEAD_NO_SCRIPT:{ce(this,t);break}case o.AFTER_HEAD:{Ee(this,t);break}case o.IN_BODY:case o.IN_TABLE:case o.IN_CAPTION:case o.IN_COLUMN_GROUP:case o.IN_TABLE_BODY:case o.IN_ROW:case o.IN_CELL:case o.IN_SELECT:case o.IN_SELECT_IN_TABLE:{Bt(this,t);break}case o.TEXT:{Fa(this,t);break}case o.IN_TABLE_TEXT:{re(this,t);break}case o.IN_TEMPLATE:{xt(this,t);break}case o.AFTER_BODY:case o.IN_FRAMESET:case o.AFTER_FRAMESET:case o.AFTER_AFTER_BODY:case o.AFTER_AFTER_FRAMESET:{Xe(this,t);break}default:}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=false,t.chars.charCodeAt(0)===r.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case o.IN_HEAD:case o.IN_HEAD_NO_SCRIPT:case o.AFTER_HEAD:case o.TEXT:case o.IN_COLUMN_GROUP:case o.IN_SELECT:case o.IN_SELECT_IN_TABLE:case o.IN_FRAMESET:case o.AFTER_FRAMESET:{this._insertCharacters(t);break}case o.IN_BODY:case o.IN_CAPTION:case o.IN_CELL:case o.IN_TEMPLATE:case o.AFTER_BODY:case o.AFTER_AFTER_BODY:case o.AFTER_AFTER_FRAMESET:{gt(this,t);break}case o.IN_TABLE:case o.IN_TABLE_BODY:case o.IN_ROW:{ye(this,t);break}case o.IN_TABLE_TEXT:{Mt(this,t);break}default:}}};function ks(e,t){let a=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return a?e.openElements.contains(a.element)?e.openElements.hasInScope(t.tagID)||(a=null):(e.activeFormattingElements.removeEntry(a),a=null):Pt(e,t),a}function Us(e,t){let a=null,n=e.openElements.stackTop;for(;n>=0;n--){let E=e.openElements.items[n];if(E===t.element)break;e._isSpecialElement(E,e.openElements.tagIDs[n])&&(a=E)}return a||(e.openElements.shortenToLength(Math.max(n,0)),e.activeFormattingElements.removeEntry(t)),a}function Hs(e,t,a){let n=t,E=e.openElements.getCommonAncestor(t);for(let _=0,u=E;u!==a;_++,u=E){E=e.openElements.getCommonAncestor(u);let d=e.activeFormattingElements.getElementEntry(u),m=d&&_>=Bs;!d||m?(m&&e.activeFormattingElements.removeEntry(d),e.openElements.remove(u)):(u=Fs(e,d),n===t&&(e.activeFormattingElements.bookmark=d),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(u,n),n=u)}return n}function Fs(e,t){let a=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,a,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function ws(e,t,a){let n=e.treeAdapter.getTagName(t),E=V(n);if(e._isElementCausesFosterParenting(E))e._fosterParentElement(a);else{let _=e.treeAdapter.getNamespaceURI(t);E===s.TEMPLATE&&_===h.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,a)}}function xs(e,t,a){let n=e.treeAdapter.getNamespaceURI(a.element),{token:E}=a,_=e.treeAdapter.createElement(E.tagName,n,E.attrs);e._adoptNodes(t,_),e.treeAdapter.appendChild(t,_),e.activeFormattingElements.insertElementAfterBookmark(_,E),e.activeFormattingElements.removeEntry(a),e.openElements.remove(a.element),e.openElements.insertAfter(t,_,E.tagID)}function We(e,t){for(let a=0;a<Ps;a++){let n=ks(e,t);if(!n)break;let E=Us(e,n);if(!E)break;e.activeFormattingElements.bookmark=n;let _=Hs(e,E,n.element),u=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(_),u&&ws(e,u,_),xs(e,E,n)}}function ve(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function ys(e,t){e._appendCommentNode(t,e.openElements.items[0])}function vs(e,t){e._appendCommentNode(t,e.document)}function Xe(e,t){if(e.stopped=true,t.location){let a=e.fragmentContext?0:2;for(let n=e.openElements.stackTop;n>=a;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],E=e.treeAdapter.getNodeSourceCodeLocation(n);if(E&&!E.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let _=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(_);u&&!u.endTag&&e._setEndLocation(_,t)}}}}function Ys(e,t){e._setDocumentType(t);let a=t.forceQuirks?B.QUIRKS:At(t);dt(t)||e._err(t,T.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,a),e.insertionMode=o.BEFORE_HTML}function ae(e,t){e._err(t,T.missingDoctype,true),e.treeAdapter.setDocumentMode(e.document,B.QUIRKS),e.insertionMode=o.BEFORE_HTML,e._processToken(t)}function Ws(e,t){t.tagID===s.HTML?(e._insertElement(t,h.HTML),e.insertionMode=o.BEFORE_HEAD):ne(e,t)}function Xs(e,t){let a=t.tagID;(a===s.HTML||a===s.HEAD||a===s.BODY||a===s.BR)&&ne(e,t)}function ne(e,t){e._insertFakeRootElement(),e.insertionMode=o.BEFORE_HEAD,e._processToken(t)}function Js(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.HEAD:{e._insertElement(t,h.HTML),e.headElement=e.openElements.current,e.insertionMode=o.IN_HEAD;break}default:ie(e,t)}}function Ks(e,t){let a=t.tagID;a===s.HEAD||a===s.BODY||a===s.HTML||a===s.BR?ie(e,t):e._err(t,T.endTagWithoutMatchingOpenElement)}function ie(e,t){e._insertFakeElement(c.HEAD,s.HEAD),e.headElement=e.openElements.current,e.insertionMode=o.IN_HEAD,e._processToken(t)}function y(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:{e._appendElement(t,h.HTML),t.ackSelfClosing=true;break}case s.TITLE:{e._switchToTextParsing(t,D.RCDATA);break}case s.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,D.RAWTEXT):(e._insertElement(t,h.HTML),e.insertionMode=o.IN_HEAD_NO_SCRIPT);break}case s.NOFRAMES:case s.STYLE:{e._switchToTextParsing(t,D.RAWTEXT);break}case s.SCRIPT:{e._switchToTextParsing(t,D.SCRIPT_DATA);break}case s.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=false,e.insertionMode=o.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(o.IN_TEMPLATE);break}case s.HEAD:{e._err(t,T.misplacedStartTagForHeadElement);break}default:oe(e,t)}}function Gs(e,t){switch(t.tagID){case s.HEAD:{e.openElements.pop(),e.insertionMode=o.AFTER_HEAD;break}case s.BODY:case s.BR:case s.HTML:{oe(e,t);break}case s.TEMPLATE:{q(e,t);break}default:e._err(t,T.endTagWithoutMatchingOpenElement)}}function q(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==s.TEMPLATE&&e._err(t,T.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,T.endTagWithoutMatchingOpenElement)}function oe(e,t){e.openElements.pop(),e.insertionMode=o.AFTER_HEAD,e._processToken(t)}function js(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.BASEFONT:case s.BGSOUND:case s.HEAD:case s.LINK:case s.META:case s.NOFRAMES:case s.STYLE:{y(e,t);break}case s.NOSCRIPT:{e._err(t,T.nestedNoscriptInHead);break}default:ce(e,t)}}function Qs(e,t){switch(t.tagID){case s.NOSCRIPT:{e.openElements.pop(),e.insertionMode=o.IN_HEAD;break}case s.BR:{ce(e,t);break}default:e._err(t,T.endTagWithoutMatchingOpenElement)}}function ce(e,t){let a=t.type===R.EOF?T.openElementsLeftAfterEof:T.disallowedContentInNoscriptInHead;e._err(t,a),e.openElements.pop(),e.insertionMode=o.IN_HEAD,e._processToken(t)}function Vs(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.BODY:{e._insertElement(t,h.HTML),e.framesetOk=false,e.insertionMode=o.IN_BODY;break}case s.FRAMESET:{e._insertElement(t,h.HTML),e.insertionMode=o.IN_FRAMESET;break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{e._err(t,T.abandonedHeadElementChild),e.openElements.push(e.headElement,s.HEAD),y(e,t),e.openElements.remove(e.headElement);break}case s.HEAD:{e._err(t,T.misplacedStartTagForHeadElement);break}default:Ee(e,t)}}function qs(e,t){switch(t.tagID){case s.BODY:case s.HTML:case s.BR:{Ee(e,t);break}case s.TEMPLATE:{q(e,t);break}default:e._err(t,T.endTagWithoutMatchingOpenElement)}}function Ee(e,t){e._insertFakeElement(c.BODY,s.BODY),e.insertionMode=o.IN_BODY,Be(e,t)}function Be(e,t){switch(t.type){case R.CHARACTER:{Dt(e,t);break}case R.WHITESPACE_CHARACTER:{gt(e,t);break}case R.COMMENT:{ve(e,t);break}case R.START_TAG:{p(e,t);break}case R.END_TAG:{Me(e,t);break}case R.EOF:{Bt(e,t);break}default:}}function gt(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Dt(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=false}function zs(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Zs(e,t){let a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e.openElements.tmplCount===0&&(e.framesetOk=false,e.treeAdapter.adoptAttributes(a,t.attrs))}function $s(e,t){let a=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&a&&(e.treeAdapter.detachNode(a),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,h.HTML),e.insertionMode=o.IN_FRAMESET)}function ea(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,h.HTML)}function ta(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&ee.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,h.HTML)}function sa(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,h.HTML),e.skipNextNewLine=true,e.framesetOk=false}function aa(e,t){let a=e.openElements.tmplCount>0;(!e.formElement||a)&&(e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,h.HTML),a||(e.formElement=e.openElements.current))}function ra(e,t){e.framesetOk=false;let a=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){let E=e.openElements.tagIDs[n];if(a===s.LI&&E===s.LI||(a===s.DD||a===s.DT)&&(E===s.DD||E===s.DT)){e.openElements.generateImpliedEndTagsWithExclusion(E),e.openElements.popUntilTagNamePopped(E);break}if(E!==s.ADDRESS&&E!==s.DIV&&E!==s.P&&e._isSpecialElement(e.openElements.items[n],E))break}e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,h.HTML)}function na(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,h.HTML),e.tokenizer.state=D.PLAINTEXT}function ia(e,t){e.openElements.hasInScope(s.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,h.HTML),e.framesetOk=false}function oa(e,t){let a=e.activeFormattingElements.getElementEntryInScopeWithTagName(c.A);a&&(We(e,t),e.openElements.remove(a.element),e.activeFormattingElements.removeEntry(a)),e._reconstructActiveFormattingElements(),e._insertElement(t,h.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ca(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,h.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ea(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(s.NOBR)&&(We(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,h.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ta(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,h.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=false}function ha(e,t){e.treeAdapter.getDocumentMode(e.document)!==B.QUIRKS&&e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,h.HTML),e.framesetOk=false,e.insertionMode=o.IN_TABLE}function pt(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,h.HTML),e.framesetOk=false,t.ackSelfClosing=true}function bt(e){let t=Ne(e,J.TYPE);return t!=null&&t.toLowerCase()===bs}function la(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,h.HTML),bt(t)||(e.framesetOk=false),t.ackSelfClosing=true}function _a(e,t){e._appendElement(t,h.HTML),t.ackSelfClosing=true}function ua(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._appendElement(t,h.HTML),e.framesetOk=false,t.ackSelfClosing=true}function da(e,t){t.tagName=c.IMG,t.tagID=s.IMG,pt(e,t)}function Aa(e,t){e._insertElement(t,h.HTML),e.skipNextNewLine=true,e.tokenizer.state=D.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=false,e.insertionMode=o.TEXT}function ma(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=false,e._switchToTextParsing(t,D.RAWTEXT)}function Ra(e,t){e.framesetOk=false,e._switchToTextParsing(t,D.RAWTEXT)}function Ot(e,t){e._switchToTextParsing(t,D.RAWTEXT)}function fa(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,h.HTML),e.framesetOk=false,e.insertionMode=e.insertionMode===o.IN_TABLE||e.insertionMode===o.IN_CAPTION||e.insertionMode===o.IN_TABLE_BODY||e.insertionMode===o.IN_ROW||e.insertionMode===o.IN_CELL?o.IN_SELECT_IN_TABLE:o.IN_SELECT}function Na(e,t){e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,h.HTML)}function Ca(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,h.HTML)}function Ia(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(s.RTC),e._insertElement(t,h.HTML)}function Oa(e,t){e._reconstructActiveFormattingElements(),we(t),De(t),t.selfClosing?e._appendElement(t,h.MATHML):e._insertElement(t,h.MATHML),t.ackSelfClosing=true}function La(e,t){e._reconstructActiveFormattingElements(),xe(t),De(t),t.selfClosing?e._appendElement(t,h.SVG):e._insertElement(t,h.SVG),t.ackSelfClosing=true}function Lt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,h.HTML)}function p(e,t){switch(t.tagID){case s.I:case s.S:case s.B:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.SMALL:case s.STRIKE:case s.STRONG:{ca(e,t);break}case s.A:{oa(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{ta(e,t);break}case s.P:case s.DL:case s.OL:case s.UL:case s.DIV:case s.DIR:case s.NAV:case s.MAIN:case s.MENU:case s.ASIDE:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.DETAILS:case s.ADDRESS:case s.ARTICLE:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{ea(e,t);break}case s.LI:case s.DD:case s.DT:{ra(e,t);break}case s.BR:case s.IMG:case s.WBR:case s.AREA:case s.EMBED:case s.KEYGEN:{pt(e,t);break}case s.HR:{ua(e,t);break}case s.RB:case s.RTC:{Ca(e,t);break}case s.RT:case s.RP:{Ia(e,t);break}case s.PRE:case s.LISTING:{sa(e,t);break}case s.XMP:{ma(e,t);break}case s.SVG:{La(e,t);break}case s.HTML:{zs(e,t);break}case s.BASE:case s.LINK:case s.META:case s.STYLE:case s.TITLE:case s.SCRIPT:case s.BGSOUND:case s.BASEFONT:case s.TEMPLATE:{y(e,t);break}case s.BODY:{Zs(e,t);break}case s.FORM:{aa(e,t);break}case s.NOBR:{Ea(e,t);break}case s.MATH:{Oa(e,t);break}case s.TABLE:{ha(e,t);break}case s.INPUT:{la(e,t);break}case s.PARAM:case s.TRACK:case s.SOURCE:{_a(e,t);break}case s.IMAGE:{da(e,t);break}case s.BUTTON:{ia(e,t);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{Ta(e,t);break}case s.IFRAME:{Ra(e,t);break}case s.SELECT:{fa(e,t);break}case s.OPTION:case s.OPTGROUP:{Na(e,t);break}case s.NOEMBED:case s.NOFRAMES:{Ot(e,t);break}case s.FRAMESET:{$s(e,t);break}case s.TEXTAREA:{Aa(e,t);break}case s.NOSCRIPT:{e.options.scriptingEnabled?Ot(e,t):Lt(e,t);break}case s.PLAINTEXT:{na(e,t);break}case s.COL:case s.TH:case s.TD:case s.TR:case s.HEAD:case s.FRAME:case s.TBODY:case s.TFOOT:case s.THEAD:case s.CAPTION:case s.COLGROUP:break;default:Lt(e,t)}}function Sa(e,t){if(e.openElements.hasInScope(s.BODY)&&(e.insertionMode=o.AFTER_BODY,e.options.sourceCodeLocationInfo)){let a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e._setEndLocation(a,t)}}function ga(e,t){e.openElements.hasInScope(s.BODY)&&(e.insertionMode=o.AFTER_BODY,yt(e,t))}function Da(e,t){let a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a))}function pa(e){let t=e.openElements.tmplCount>0,{formElement:a}=e;t||(e.formElement=null),(a||t)&&e.openElements.hasInScope(s.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(s.FORM):a&&e.openElements.remove(a))}function ba(e){e.openElements.hasInButtonScope(s.P)||e._insertFakeElement(c.P,s.P),e._closePElement()}function Pa(e){e.openElements.hasInListItemScope(s.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(s.LI),e.openElements.popUntilTagNamePopped(s.LI))}function Ba(e,t){let a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a))}function Ma(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function ka(e,t){let a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker())}function Ua(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(c.BR,s.BR),e.openElements.pop(),e.framesetOk=false}function Pt(e,t){let a=t.tagName,n=t.tagID;for(let E=e.openElements.stackTop;E>0;E--){let _=e.openElements.items[E],u=e.openElements.tagIDs[E];if(n===u&&(n!==s.UNKNOWN||e.treeAdapter.getTagName(_)===a)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=E&&e.openElements.shortenToLength(E);break}if(e._isSpecialElement(_,u))break}}function Me(e,t){switch(t.tagID){case s.A:case s.B:case s.I:case s.S:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.NOBR:case s.SMALL:case s.STRIKE:case s.STRONG:{We(e,t);break}case s.P:{ba(e);break}case s.DL:case s.UL:case s.OL:case s.DIR:case s.DIV:case s.NAV:case s.PRE:case s.MAIN:case s.MENU:case s.ASIDE:case s.BUTTON:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.ADDRESS:case s.ARTICLE:case s.DETAILS:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.LISTING:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{Da(e,t);break}case s.LI:{Pa(e);break}case s.DD:case s.DT:{Ba(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{Ma(e);break}case s.BR:{Ua(e);break}case s.BODY:{Sa(e,t);break}case s.HTML:{ga(e,t);break}case s.FORM:{pa(e);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{ka(e,t);break}case s.TEMPLATE:{q(e,t);break}default:Pt(e,t)}}function Bt(e,t){e.tmplInsertionModeStack.length>0?xt(e,t):Xe(e,t)}function Ha(e,t){var a;t.tagID===s.SCRIPT&&((a=e.scriptHandler)===null||a===void 0||a.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Fa(e,t){e._err(t,T.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ye(e,t){if(e.openElements.currentTagId!==void 0&&St.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=false,e.originalInsertionMode=e.insertionMode,e.insertionMode=o.IN_TABLE_TEXT,t.type){case R.CHARACTER:{kt(e,t);break}case R.WHITESPACE_CHARACTER:{Mt(e,t);break}}else le(e,t)}function wa(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,h.HTML),e.insertionMode=o.IN_CAPTION}function xa(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,h.HTML),e.insertionMode=o.IN_COLUMN_GROUP}function ya(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(c.COLGROUP,s.COLGROUP),e.insertionMode=o.IN_COLUMN_GROUP,Je(e,t)}function va(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,h.HTML),e.insertionMode=o.IN_TABLE_BODY}function Ya(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(c.TBODY,s.TBODY),e.insertionMode=o.IN_TABLE_BODY,ke(e,t)}function Wa(e,t){e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Xa(e,t){bt(t)?e._appendElement(t,h.HTML):le(e,t),t.ackSelfClosing=true}function Ja(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,h.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function $(e,t){switch(t.tagID){case s.TD:case s.TH:case s.TR:{Ya(e,t);break}case s.STYLE:case s.SCRIPT:case s.TEMPLATE:{y(e,t);break}case s.COL:{ya(e,t);break}case s.FORM:{Ja(e,t);break}case s.TABLE:{Wa(e,t);break}case s.TBODY:case s.TFOOT:case s.THEAD:{va(e,t);break}case s.INPUT:{Xa(e,t);break}case s.CAPTION:{wa(e,t);break}case s.COLGROUP:{xa(e,t);break}default:le(e,t)}}function he(e,t){switch(t.tagID){case s.TABLE:{e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode());break}case s.TEMPLATE:{q(e,t);break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:le(e,t)}}function le(e,t){let a=e.fosterParentingEnabled;e.fosterParentingEnabled=true,Be(e,t),e.fosterParentingEnabled=a}function Mt(e,t){e.pendingCharacterTokens.push(t)}function kt(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=true}function re(e,t){let a=0;if(e.hasNonWhitespacePendingCharacterToken)for(;a<e.pendingCharacterTokens.length;a++)le(e,e.pendingCharacterTokens[a]);else for(;a<e.pendingCharacterTokens.length;a++)e._insertCharacters(e.pendingCharacterTokens[a]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var Ut=new Set([s.CAPTION,s.COL,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]);function Ka(e,t){let a=t.tagID;Ut.has(a)?e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=o.IN_TABLE,$(e,t)):p(e,t)}function Ga(e,t){let a=t.tagID;switch(a){case s.CAPTION:case s.TABLE:{e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=o.IN_TABLE,a===s.TABLE&&he(e,t));break}case s.BODY:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:Me(e,t)}}function Je(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.COL:{e._appendElement(t,h.HTML),t.ackSelfClosing=true;break}case s.TEMPLATE:{y(e,t);break}default:be(e,t)}}function ja(e,t){switch(t.tagID){case s.COLGROUP:{e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=o.IN_TABLE);break}case s.TEMPLATE:{q(e,t);break}case s.COL:break;default:be(e,t)}}function be(e,t){e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=o.IN_TABLE,e._processToken(t))}function ke(e,t){switch(t.tagID){case s.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,h.HTML),e.insertionMode=o.IN_ROW;break}case s.TH:case s.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(c.TR,s.TR),e.insertionMode=o.IN_ROW,Ue(e,t);break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=o.IN_TABLE,$(e,t));break}default:$(e,t)}}function Ye(e,t){let a=t.tagID;switch(t.tagID){case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasInTableScope(a)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=o.IN_TABLE);break}case s.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=o.IN_TABLE,he(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:case s.TR:break;default:he(e,t)}}function Ue(e,t){switch(t.tagID){case s.TH:case s.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,h.HTML),e.insertionMode=o.IN_CELL,e.activeFormattingElements.insertMarker();break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=o.IN_TABLE_BODY,ke(e,t));break}default:$(e,t)}}function Ht(e,t){switch(t.tagID){case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=o.IN_TABLE_BODY);break}case s.TABLE:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=o.IN_TABLE_BODY,Ye(e,t));break}case s.TBODY:case s.TFOOT:case s.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(s.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=o.IN_TABLE_BODY,Ye(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:break;default:he(e,t)}}function Qa(e,t){let a=t.tagID;Ut.has(a)?(e.openElements.hasInTableScope(s.TD)||e.openElements.hasInTableScope(s.TH))&&(e._closeTableCell(),Ue(e,t)):p(e,t)}function Va(e,t){let a=t.tagID;switch(a){case s.TD:case s.TH:{e.openElements.hasInTableScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=o.IN_ROW);break}case s.TABLE:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(a)&&(e._closeTableCell(),Ht(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:break;default:Me(e,t)}}function Ft(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._insertElement(t,h.HTML);break}case s.OPTGROUP:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._insertElement(t,h.HTML);break}case s.HR:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._appendElement(t,h.HTML),t.ackSelfClosing=true;break}case s.INPUT:case s.KEYGEN:case s.TEXTAREA:case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),t.tagID!==s.SELECT&&e._processStartTag(t));break}case s.SCRIPT:case s.TEMPLATE:{y(e,t);break}default:}}function wt(e,t){switch(t.tagID){case s.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===s.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===s.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop();break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop();break}case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode());break}case s.TEMPLATE:{q(e,t);break}default:}}function qa(e,t){let a=t.tagID;a===s.CAPTION||a===s.TABLE||a===s.TBODY||a===s.TFOOT||a===s.THEAD||a===s.TR||a===s.TD||a===s.TH?(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ft(e,t)}function za(e,t){let a=t.tagID;a===s.CAPTION||a===s.TABLE||a===s.TBODY||a===s.TFOOT||a===s.THEAD||a===s.TR||a===s.TD||a===s.TH?e.openElements.hasInTableScope(a)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e.onEndTag(t)):wt(e,t)}function Za(e,t){switch(t.tagID){case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{y(e,t);break}case s.CAPTION:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.tmplInsertionModeStack[0]=o.IN_TABLE,e.insertionMode=o.IN_TABLE,$(e,t);break}case s.COL:{e.tmplInsertionModeStack[0]=o.IN_COLUMN_GROUP,e.insertionMode=o.IN_COLUMN_GROUP,Je(e,t);break}case s.TR:{e.tmplInsertionModeStack[0]=o.IN_TABLE_BODY,e.insertionMode=o.IN_TABLE_BODY,ke(e,t);break}case s.TD:case s.TH:{e.tmplInsertionModeStack[0]=o.IN_ROW,e.insertionMode=o.IN_ROW,Ue(e,t);break}default:e.tmplInsertionModeStack[0]=o.IN_BODY,e.insertionMode=o.IN_BODY,p(e,t)}}function $a(e,t){t.tagID===s.TEMPLATE&&q(e,t)}function xt(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Xe(e,t)}function er(e,t){t.tagID===s.HTML?p(e,t):Pe(e,t)}function yt(e,t){var a;if(t.tagID===s.HTML){if(e.fragmentContext||(e.insertionMode=o.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===s.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!(!((a=e.treeAdapter.getNodeSourceCodeLocation(n))===null||a===void 0)&&a.endTag)&&e._setEndLocation(n,t)}}else Pe(e,t)}function Pe(e,t){e.insertionMode=o.IN_BODY,Be(e,t)}function tr(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.FRAMESET:{e._insertElement(t,h.HTML);break}case s.FRAME:{e._appendElement(t,h.HTML),t.ackSelfClosing=true;break}case s.NOFRAMES:{y(e,t);break}default:}}function sr(e,t){t.tagID===s.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==s.FRAMESET&&(e.insertionMode=o.AFTER_FRAMESET))}function ar(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.NOFRAMES:{y(e,t);break}default:}}function rr(e,t){t.tagID===s.HTML&&(e.insertionMode=o.AFTER_AFTER_FRAMESET)}function nr(e,t){t.tagID===s.HTML?p(e,t):pe(e,t)}function pe(e,t){e.insertionMode=o.IN_BODY,Be(e,t)}function ir(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.NOFRAMES:{y(e,t);break}default:}}function or(e,t){t.chars=f,e._insertCharacters(t)}function cr(e,t){e._insertCharacters(t),e.framesetOk=false}function vt(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==h.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Er(e,t){if(Rt(t))vt(e),e._startTagOutsideForeignContent(t);else{let a=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(a);n===h.MATHML?we(t):n===h.SVG&&(ft(t),xe(t)),De(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=true}}function Tr(e,t){if(t.tagID===s.P||t.tagID===s.BR){vt(e),e._endTagOutsideForeignContent(t);return}for(let a=e.openElements.stackTop;a>0;a--){let n=e.openElements.items[a];if(e.treeAdapter.getNamespaceURI(n)===h.HTML){e._endTagOutsideForeignContent(t);break}let E=e.treeAdapter.getTagName(n);if(E.toLowerCase()===t.tagName){t.tagName=E,e.openElements.shortenToLength(a);break}}}var sn=new Set([c.AREA,c.BASE,c.BASEFONT,c.BGSOUND,c.BR,c.COL,c.EMBED,c.FRAME,c.HR,c.IMG,c.INPUT,c.KEYGEN,c.LINK,c.META,c.PARAM,c.SOURCE,c.TRACK,c.WBR]);function Yt(e,t,a){typeof e=="string"&&(a=t,t=e,e=null);let n=Te.getFragmentParser(e,a);return n.tokenizer.write(t,true),n.getFragment()}return Qt(hr)})();return editorParser.parseFragment})();Object.assign(__ds_scope,{parseEditorFragment})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/editor-parser.js",error:String(e&&e.message||e)})}try{(()=>{const{parseEditorFragment}=__ds_scope;const EDITOR_SCHEMA=Object.freeze({tags:Object.freeze(["p","br","b","i","strong","em","ul","ol","li","div","span"]),attrs:Object.freeze({})});const ALLOWED=new Set(EDITOR_SCHEMA.tags);const HTML_NAMESPACE="http://www.w3.org/1999/xhtml";const DROP_CONTENT=new Set(["script","style","iframe","object","embed","link","meta","base","template","noscript","noframes","xmp","plaintext","textarea","title"]);function escapeEditorText(text){return String(text).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function sanitizeHtml(html){if(html==null||html==="")return"";const fragment=parseEditorFragment(String(html),{scriptingEnabled:true});const pending=[...fragment.childNodes].reverse();const output=[];while(pending.length){const node=pending.pop();if(typeof node==="string"){output.push(node);continue}if(node.nodeName==="#text"){output.push(escapeEditorText(node.value));continue}const tag=node.tagName;if(!tag||node.namespaceURI!==HTML_NAMESPACE||DROP_CONTENT.has(tag))continue;if(ALLOWED.has(tag)){output.push(`<${tag}>`);if(tag==="br")continue;pending.push(`</${tag}>`)}for(let i=(node.childNodes?.length||0)-1;i>=0;i--)pending.push(node.childNodes[i])}return output.join("")}Object.assign(__ds_scope,{EDITOR_SCHEMA,escapeEditorText,sanitizeHtml})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/editor-schema.js",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{useClientLayoutEffect}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{EDITOR_SCHEMA,sanitizeHtml,escapeEditorText}=__ds_scope;function EditorToolbarButton({command,label,pressed,onCommand,children}){return React.createElement("button",{type:"button",className:"cs-toolbar__btn","aria-label":label,"aria-pressed":pressed,onMouseDown:e=>e.preventDefault(),onClick:()=>onCommand(command)},children)}const Editor=React.forwardRef(function Editor2({controlRef,defaultValue="",unsafeHtml,onChange,minHeight=120,lang,className,rootProps},forwardedRef){const box=React.useRef(null);const mergedControlRef=useComposedRefs(box,controlRef);const seeded=React.useRef(false);const selection=React.useRef(null);const[formatting,setFormatting]=React.useState({bold:false,italic:false,insertUnorderedList:false});const syncFormatting=range=>{const commands=["bold","italic","insertUnorderedList"];const samples=[];if(!range.collapsed){const walker=document.createTreeWalker(box.current,NodeFilter.SHOW_TEXT);let node;while(node=walker.nextNode()){if(!node.length||!range.intersectsNode(node)||range.startContainer===node&&range.startOffset===node.length||range.endContainer===node&&range.endOffset===0)continue;const style=getComputedStyle(node.parentElement);samples.push({bold:Number.parseInt(style.fontWeight,10)>=600,italic:/^(italic|oblique)/.test(style.fontStyle),insertUnorderedList:node.parentElement.closest("ul,ol")?.tagName==="UL"})}}const next=Object.fromEntries(commands.map(command=>{const values=samples.map(sample=>sample[command]);const value=values.length?values.every(Boolean)?true:values.some(Boolean)?"mixed":false:document.queryCommandIndeterm(command)?"mixed":document.queryCommandState(command);return[command,value]}));setFormatting(previous=>commands.every(key=>previous[key]===next[key])?previous:next)};const lastEmitted=React.useRef(null);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Editor",L,localeMessages);const rememberSelection=()=>{const s=window.getSelection();if(s?.rangeCount&&box.current?.contains(s.getRangeAt(0).commonAncestorContainer)){selection.current=s.getRangeAt(0).cloneRange();syncFormatting(s.getRangeAt(0))}};React.useEffect(()=>{document.addEventListener("selectionchange",rememberSelection);return()=>document.removeEventListener("selectionchange",rememberSelection)},[]);const restoreSelection=()=>{const el=box.current;if(!el)return;el.focus();const s=window.getSelection();const r=selection.current;if(r&&el.contains(r.commonAncestorContainer)){s.removeAllRanges();s.addRange(r)}else{const end=document.createRange();end.selectNodeContents(el);end.collapse(false);s.removeAllRanges();s.addRange(end)}};const cmd=c=>{restoreSelection();document.execCommand(c);emit()};const emit=()=>{if(!box.current)return;const clean=sanitizeHtml(box.current.innerHTML);if(box.current.innerHTML!==clean){box.current.innerHTML=clean;selection.current=null;restoreSelection()}rememberSelection();if(lastEmitted.current!==clean){lastEmitted.current=clean;onChange?.(clean)}};const insertTransfer=data=>{if(!data)return;const html=data.getData("text/html");const clean=html?sanitizeHtml(html):escapeEditorText(data.getData("text/plain")).replace(/\r?\n/g,"<br>");restoreSelection();if(!document.execCommand("insertHTML",false,clean)){const s=window.getSelection();if(!s?.rangeCount)return;const r=s.getRangeAt(0);const tpl=document.createElement("template");tpl.innerHTML=clean;const last=tpl.content.lastChild;r.deleteContents();r.insertNode(tpl.content);if(last)r.setStartAfter(last);r.collapse(true);s.removeAllRanges();s.addRange(r)}emit()};const paste=e=>{e.preventDefault();rememberSelection();insertTransfer(e.clipboardData)};const drop=e=>{e.preventDefault();const point=document.caretPositionFromPoint?.(e.clientX,e.clientY);let r=document.caretRangeFromPoint?.(e.clientX,e.clientY);if(!r&&point){r=document.createRange();r.setStart(point.offsetNode,point.offset);r.collapse(true)}if(r&&box.current?.contains(r.commonAncestorContainer))selection.current=r;insertTransfer(e.dataTransfer)};useClientLayoutEffect(()=>{if(!box.current||seeded.current)return;box.current.innerHTML=unsafeHtml!=null?String(unsafeHtml):sanitizeHtml(defaultValue);lastEmitted.current=sanitizeHtml(box.current.innerHTML);seeded.current=true},[defaultValue,unsafeHtml]);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-editor",className)},rootProps,[])},React.createElement("div",{className:"cs-editor__bar",role:"toolbar","aria-label":t("toolbar")},React.createElement(EditorToolbarButton,{onCommand:cmd,pressed:formatting.bold,command:"bold",label:t("bold")},React.createElement("b",null,"B")),React.createElement(EditorToolbarButton,{onCommand:cmd,pressed:formatting.italic,command:"italic",label:t("italic")},React.createElement("i",null,"I")),React.createElement(EditorToolbarButton,{onCommand:cmd,pressed:formatting.insertUnorderedList,command:"insertUnorderedList",label:t("list")},"≔")),React.createElement("div",{ref:mergedControlRef,className:"cs-editor__area",contentEditable:true,suppressContentEditableWarning:true,role:"textbox","aria-multiline":"true","aria-label":t("area"),style:{minHeight},onInput:emit,onSelect:rememberSelection,onBlur:rememberSelection,onPaste:paste,onDrop:drop,onDragOver:e=>e.preventDefault()}))});Editor.displayName="Editor";Object.assign(__ds_scope,{Editor})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Editor.jsx",error:String(e&&e.message||e)})}try{(()=>{const{localeMessagesContext,snapshotLocaleMessages,makeT}=__ds_scope;function LocaleProvider({messages,children}){const Context=localeMessagesContext();const parent=React.useContext(Context);const snapshot=React.useMemo(()=>snapshotLocaleMessages(messages),[messages]);const value=React.useMemo(()=>Object.freeze({messages:snapshot,parent}),[snapshot,parent]);return React.createElement(Context.Provider,{value},children)}function useMessages(namespace,lang){const messages=React.useContext(localeMessagesContext());return React.useMemo(()=>makeT(namespace,lang,messages),[namespace,lang,messages])}Object.assign(__ds_scope,{LocaleProvider,useMessages})})()}catch(e){__ds_ns.__errors.push({path:"components/i18n/LocaleProvider.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const CS_ICONS={close:{viewBox:"0 0 24 24",els:[["path",{d:"M6 6l12 12M18 6L6 18"}]]},sun:{viewBox:"0 0 24 24",els:[["circle",{cx:12,cy:12,r:4}],["path",{d:"M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M19.1 4.9l-1.4 1.4M6.3 17.7l-1.4 1.4"}]]},moon:{viewBox:"0 0 24 24",els:[["path",{d:"M20 13.5A8 8 0 1 1 10.5 4a6.5 6.5 0 0 0 9.5 9.5z"}]]},"arrow-right":{viewBox:"0 0 24 24",els:[["path",{d:"M5 12h14M13 6l6 6-6 6"}]]},check:{viewBox:"0 0 24 24",els:[["path",{d:"M4 12.5l5 5 11-11"}]]},sparkle:{viewBox:"0 0 24 24",els:[["path",{d:"M12 3l1.8 5.4L19 10l-5.2 1.6L12 17l-1.8-5.4L5 10l5.2-1.6z"}]]},chat:{viewBox:"0 0 24 24",els:[["path",{d:"M4 5h16v11H8l-4 4z"}]]},"sound-on":{viewBox:"0 0 24 24",els:[["path",{d:"M5 9v6h3l4 4V5L8 9z"}],["path",{d:"M15 9.5a4 4 0 0 1 0 5M17.6 7a8 8 0 0 1 0 10"}]]},"sound-off":{viewBox:"0 0 24 24",els:[["path",{d:"M5 9v6h3l4 4V5L8 9z"}],["path",{d:"M16 9.5l4.5 5M20.5 9.5l-4.5 5"}]]},search:{viewBox:"0 0 24 24",els:[["circle",{cx:11,cy:11,r:6}],["path",{d:"M20 20l-4.2-4.2"}]]},sliders:{viewBox:"0 0 24 24",els:[["path",{d:"M4 6h16M4 12h16M4 18h16"}],["circle",{cx:9,cy:6,r:2}],["circle",{cx:15,cy:12,r:2}],["circle",{cx:7,cy:18,r:2}]]},upload:{viewBox:"0 0 24 24",els:[["path",{d:"M12 15V4M7 8.5L12 4l5 4.5"}],["path",{d:"M4 19h16"}]]},download:{viewBox:"0 0 24 24",els:[["path",{d:"M12 4v11M7 10.5L12 15l5-4.5"}],["path",{d:"M4 19h16"}]]},calendar:{viewBox:"0 0 24 24",els:[["rect",{x:4,y:6,width:16,height:14,rx:2}],["path",{d:"M4 10.5h16M8 3.5v4M16 3.5v4"}]]},user:{viewBox:"0 0 24 24",els:[["circle",{cx:12,cy:8.5,r:3.5}],["path",{d:"M5 19.5c1.6-3.4 4-5 7-5s5.4 1.6 7 5"}]]},plus:{viewBox:"0 0 24 24",els:[["path",{d:"M12 5v14M5 12h14"}]]},trash:{viewBox:"0 0 24 24",els:[["path",{d:"M5 7h14M9.5 7V4.5h5V7"}],["path",{d:"M7 7l.8 12.5h8.4L17 7M10 11v5M14 11v5"}]]},external:{viewBox:"0 0 24 24",els:[["path",{d:"M14 4h6v6M20 4l-8 8"}],["path",{d:"M18 13v6H5V6h6"}]]},menu:{viewBox:"0 0 24 24",els:[["path",{d:"M4 7h16M4 12h16M4 17h16"}]]},"chevron-down":{viewBox:"0 0 24 24",els:[["path",{d:"M6 9l6 6 6-6"}]]},"chevron-up":{viewBox:"0 0 24 24",els:[["path",{d:"M6 15l6-6 6 6"}]]},"chevron-left":{viewBox:"0 0 24 24",els:[["path",{d:"M15 6l-6 6 6 6"}]]},"chevron-right":{viewBox:"0 0 24 24",els:[["path",{d:"M9 6l6 6-6 6"}]]},edit:{viewBox:"0 0 24 24",els:[["path",{d:"M4 20h4L18.5 9.5a2.12 2.12 0 0 0-3-3L5 17z"}],["path",{d:"M13.5 6.5l3 3"}]]},copy:{viewBox:"0 0 24 24",els:[["rect",{x:8,y:8,width:12,height:12,rx:2}],["path",{d:"M4 16V6a2 2 0 0 1 2-2h10"}]]},info:{viewBox:"0 0 24 24",els:[["circle",{cx:12,cy:12,r:9}],["path",{d:"M12 11v5M12 7.75v.01"}]]},"alert-triangle":{viewBox:"0 0 24 24",els:[["path",{d:"M12 3.5l9 16H3z"}],["path",{d:"M12 10v4M12 17.5v.01"}]]},pin:{viewBox:"0 0 24 24",els:[["path",{d:"M12 21v-7"}],["path",{d:"M8.5 3.5h7l-1.2 6.5h2.7L12 14.5 6.999 10h2.7z"}]]}};const Icon=React.forwardRef(function Icon2({name,size="md",label,className,strokeWidth=1.75,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const def=CS_ICONS[name]||CS_ICONS.sparkle;const dim=`var(--cs-icon-${size}, 20px)`;const a11y=label?{role:"img","aria-label":label}:{"aria-hidden":true,focusable:false};return React.createElement("svg",{...props,className,viewBox:def.viewBox,style:{width:dim,height:dim,display:"inline-block",flex:"none",...props.style||{}},fill:"none",stroke:"currentColor",strokeWidth,strokeLinecap:"round",strokeLinejoin:"round",...a11y,ref:mergedNativeRef},def.els.map(([tag,attrs],i)=>React.createElement(tag,{key:i,...attrs})))});Icon.displayName="Icon";Object.assign(__ds_scope,{CS_ICONS,Icon})})()}catch(e){__ds_ns.__errors.push({path:"components/icon/Icon.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{Icon}=__ds_scope;const{cx}=__ds_scope;const{useClientLayoutEffect}=__ds_scope;const DataGrid=React.forwardRef(function DataGrid2({columns=[],rows=[],rowKey="id",selectable=false,selected=[],onSelect,height=280,caption,empty,lang,className,rootProps,filterText,filterKeys,virtual=false,virtualThreshold=80,rowHeight=36,persistKey},forwardedRef){const[sort,setSort]=React.useState(null);const nameId=React.useId();const[scrollTop,setScrollTop]=React.useState(0);const estimate=Number.isFinite(rowHeight)&&rowHeight>0?rowHeight:36;const[measuredRowHeight,setMeasuredRowHeight]=React.useState(estimate);const effectiveRowHeight=Math.max(estimate,measuredRowHeight);const[colOrder,setColOrder]=React.useState(null);useClientLayoutEffect(()=>{if(!persistKey){setColOrder(null);return}try{const raw=localStorage.getItem("cs:datagrid:cols:"+persistKey);const arr=raw?JSON.parse(raw):null;setColOrder(Array.isArray(arr)?arr:null)}catch(e){setColOrder(null)}},[persistKey]);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("DataGrid",L,localeMessages);const orderedColumns=React.useMemo(()=>{if(!colOrder||!colOrder.length)return columns;const map=new Map(columns.map(c=>[c.key,c]));const out=[];for(const k of colOrder)if(map.has(k)){out.push(map.get(k));map.delete(k)}for(const c of map.values())out.push(c);return out},[columns,colOrder]);const filtered=React.useMemo(()=>{const q=(filterText==null?"":String(filterText)).trim().toLowerCase();if(!q)return rows;const keys=filterKeys&&filterKeys.length?filterKeys:orderedColumns.map(c=>c.key);return rows.filter(r=>keys.some(k=>String(r[k]==null?"":r[k]).toLowerCase().includes(q)))},[rows,filterText,filterKeys,orderedColumns]);const sorted=React.useMemo(()=>{if(!sort)return filtered;const col=orderedColumns.find(c=>c.key===sort.key);const val=r=>col&&col.sortValue?col.sortValue(r):r[sort.key];return[...filtered].sort((a,b)=>{const x=val(a),y=val(b);return(x>y?1:x<y?-1:0)*(sort.dir==="asc"?1:-1)})},[filtered,sort,orderedColumns]);const useVirtual=virtual||sorted.length>=virtualThreshold;const bodyH=Math.max(0,height-40);const visibleCount=useVirtual?Math.ceil(bodyH/effectiveRowHeight)+8:sorted.length;const start=useVirtual?Math.min(Math.max(0,sorted.length-visibleCount),Math.max(0,Math.floor(scrollTop/effectiveRowHeight)-4)):0;const end=useVirtual?Math.min(sorted.length,start+visibleCount):sorted.length;const slice=sorted.slice(start,end);const padTop=useVirtual?start*effectiveRowHeight:0;const padBottom=useVirtual?Math.max(0,(sorted.length-end)*effectiveRowHeight):0;useClientLayoutEffect(()=>{const host=ref.current;if(!host||!useVirtual)return;const rows2=[...host.querySelectorAll('tbody > tr:not([aria-hidden="true"])')];if(!slice.length||!rows2.length)return;const measure=()=>{const old=rows2.map(row=>row.style.height);rows2.forEach(row=>{row.style.height=""});const next=Math.max(estimate,...rows2.map(row=>row.getBoundingClientRect().height));rows2.forEach((row,i)=>{row.style.height=old[i]});setMeasuredRowHeight(previous=>Math.abs(previous-next)>.01?next:previous)};measure();const resize=typeof ResizeObserver==="undefined"?null:new ResizeObserver(measure);resize?.observe(host);rows2.forEach(row=>resize?.observe(row));const ancestors=new MutationObserver(measure);for(let node=host;node;node=node.parentElement){ancestors.observe(node,{attributes:true,attributeFilter:["class","style","lang","data-cs-density","data-cs-element","data-cs-variant"]})}const coarse=window.matchMedia("(pointer: coarse)");coarse.addEventListener("change",measure);document.fonts?.addEventListener("loadingdone",measure);return()=>{resize?.disconnect();ancestors.disconnect();coarse.removeEventListener("change",measure);document.fonts?.removeEventListener("loadingdone",measure)}},[useVirtual,slice,estimate,ref]);const allSel=selectable&&filtered.length&&filtered.every(r=>selected.includes(r[rowKey]));const toggleAll=()=>onSelect&&onSelect(allSel?[]:filtered.map(r=>r[rowKey]));const toggle=k=>onSelect&&onSelect(selected.includes(k)?selected.filter(x=>x!==k):[...selected,k]);const pinColumn=key=>{if(!persistKey)return;const keys=orderedColumns.map(c=>c.key);const next=[key,...keys.filter(k=>k!==key)];setColOrder(next);try{localStorage.setItem("cs:datagrid:cols:"+persistKey,JSON.stringify(next))}catch(e){}};return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-datagrid",useVirtual&&"cs-datagrid--virtual",className),onScroll:useVirtual?e=>setScrollTop(e.currentTarget.scrollTop):void 0},rootProps,["data-virtual","data-row-count","data-row-height"]),style:{...rootProps?.style,maxBlockSize:height,overflow:"auto"},"data-virtual":useVirtual?"true":"false","data-row-count":sorted.length,"data-row-height":useVirtual?effectiveRowHeight:void 0},React.createElement("table",{className:"cs-table","aria-rowcount":useVirtual?Math.max(2,sorted.length+1):void 0},caption||caption===0?React.createElement("caption",null,caption):null,React.createElement("thead",null,React.createElement("tr",{"aria-rowindex":useVirtual?1:void 0},selectable?React.createElement("th",{scope:"col",className:"cs-datagrid__selcol"},React.createElement("label",{className:"cs-datagrid__check"},React.createElement("input",{type:"checkbox","aria-label":t("selectAll"),checked:!!allSel,onChange:toggleAll}))):null,orderedColumns.map((c,columnIndex)=>React.createElement("th",{key:c.key,scope:"col",className:c.pinned?"cs-datagrid__pinned":void 0,style:c.pinned?{position:"sticky",insetInlineStart:0,zIndex:1,background:"var(--cs-color-surface-panel)"}:void 0,"aria-sort":sort&&sort.key===c.key?sort.dir==="asc"?"ascending":"descending":void 0},c.sortable?React.createElement("button",{type:"button",className:"cs-datagrid__sort",onClick:()=>setSort(s=>!s||s.key!==c.key?{key:c.key,dir:"asc"}:s.dir==="asc"?{key:c.key,dir:"desc"}:null)},React.createElement("span",{id:nameId+"-header-"+columnIndex},c.header),React.createElement("span",{"aria-hidden":"true"},sort&&sort.key===c.key?sort.dir==="asc"?" ▲":" ▼":" ↕")):React.createElement("span",{id:nameId+"-header-"+columnIndex},c.header),persistKey?React.createElement("button",{type:"button",className:"cs-datagrid__pin",title:t("pin"),onClick:()=>pinColumn(c.key),"aria-label":c.header==null?t("pinNamed").replace("{name}",c.key):void 0,"aria-labelledby":c.header==null?void 0:nameId+"-pin-start-"+columnIndex+" "+nameId+"-header-"+columnIndex+" "+nameId+"-pin-end-"+columnIndex},React.createElement("span",{className:"cs-sr-only",id:nameId+"-pin-start-"+columnIndex},t("pinNamed").split("{name}")[0]),React.createElement(Icon,{name:"pin",size:"sm"}),React.createElement("span",{className:"cs-sr-only",id:nameId+"-pin-end-"+columnIndex},t("pinNamed").split("{name}")[1])):null)))),React.createElement("tbody",null,sorted.length===0?React.createElement("tr",{"aria-rowindex":useVirtual?2:void 0},React.createElement("td",{colSpan:orderedColumns.length+(selectable?1:0),className:"cs-table__empty"},empty!=null?empty:t("empty"))):React.createElement(React.Fragment,null,padTop>0?React.createElement("tr",{"aria-hidden":"true"},React.createElement("td",{colSpan:orderedColumns.length+(selectable?1:0),style:{height:padTop,padding:0,border:0}})):null,slice.map((r,i)=>{const k=r[rowKey]!=null?r[rowKey]:start+i;return React.createElement("tr",{key:k,"aria-rowindex":useVirtual?start+i+2:void 0,"aria-selected":selectable?selected.includes(k):void 0,className:selected.includes(k)?"is-selected":void 0,style:useVirtual?{height:effectiveRowHeight}:void 0},selectable?React.createElement("td",{className:"cs-datagrid__selcol"},React.createElement("label",{className:"cs-datagrid__check"},React.createElement("input",{type:"checkbox","aria-label":`${t("selectRow")}: ${String(orderedColumns.map(c=>r[c.key]).find(v=>typeof v==="string"&&v.trim())??k)}`,checked:selected.includes(k),onChange:()=>toggle(k)}))):null,orderedColumns.map(c=>React.createElement("td",{key:c.key,className:c.pinned?"cs-datagrid__pinned":void 0,style:c.pinned?{position:"sticky",insetInlineStart:0,background:"var(--cs-color-surface-panel)"}:void 0},c.render?c.render(r):r[c.key])))}),padBottom>0?React.createElement("tr",{"aria-hidden":"true"},React.createElement("td",{colSpan:orderedColumns.length+(selectable?1:0),style:{height:padBottom,padding:0,border:0}})):null))))});DataGrid.displayName="DataGrid";Object.assign(__ds_scope,{DataGrid})})()}catch(e){__ds_ns.__errors.push({path:"components/datatable/DataGrid.jsx",error:String(e&&e.message||e)})}try{(()=>{const CS_LOGO_VIEWBOX="0 0 1007 1007";const CS_LOGO_MARK_INNER='<path fill="#45210E" opacity="1.000000" stroke="none" \n d="\nM560.000000,1008.000000 \n C373.333344,1008.000000 187.166672,1008.000000 1.000000,1008.000000 \n C1.000000,672.333313 1.000000,336.666656 1.000000,1.000000 \n C336.666656,1.000000 672.333313,1.000000 1008.000000,1.000000 \n C1008.000000,336.666656 1008.000000,672.333313 1008.000000,1008.000000 \n C858.833313,1008.000000 709.666687,1008.000000 560.000000,1008.000000 \nM440.743774,105.242386 \n C438.572540,107.309639 436.344940,109.321198 434.238464,111.452431 \n C396.510132,149.623566 372.276398,194.939011 363.356293,247.940109 \n C360.996429,261.961884 358.946777,276.673065 360.603027,290.610352 \n C365.030243,327.864777 394.910004,357.905762 431.834900,364.830811 \n C436.723083,365.747589 441.737213,365.993011 447.763702,366.669525 \n C446.254150,363.858124 445.507843,362.409912 444.709564,360.990906 \n C439.517578,351.761383 436.885193,341.740936 437.455444,331.277863 \n C439.589569,292.120056 458.815063,264.154144 494.094208,247.402267 \n C503.544983,242.914673 513.742554,238.863556 524.373901,240.455948 \n C548.543213,244.076111 568.703491,255.555466 584.000793,274.713074 \n C599.847656,294.559021 607.550598,317.209198 603.764282,342.677429 \n C602.575073,350.677063 598.728027,358.281586 595.936157,366.544159 \n C600.137085,366.074554 604.740540,365.758667 609.275574,365.021576 \n C646.763123,358.928711 678.394348,326.946808 681.791199,289.350922 \n C683.086792,275.012085 681.404419,259.972870 678.550415,245.760666 \n C660.577881,156.262833 608.759338,93.666801 525.888672,56.228947 \n C522.563171,54.726585 519.736023,54.769550 516.419739,56.200459 \n C488.640594,68.186523 463.511292,84.231010 440.743774,105.242386 \nM286.676636,492.678345 \n C287.329773,493.793732 287.835724,495.033447 288.657562,496.006378 \n C309.770172,521.000305 334.755707,541.223022 364.045837,555.811401 \n C374.407410,560.972046 385.114655,566.593323 396.291962,568.749573 \n C432.863312,575.804749 469.791931,575.543579 506.608704,569.950623 \n C542.882812,564.440125 577.636902,553.955383 610.255371,536.938660 \n C635.979919,523.518494 665.744080,527.108459 687.312561,546.611755 \n C690.823608,549.786621 693.878845,553.465637 697.214539,556.985291 \n C719.173889,537.685486 738.051208,516.184204 753.920410,491.916840 \n C752.879761,490.957520 752.286987,490.387451 751.669678,489.845367 \n C716.653381,459.096100 676.901917,436.766174 632.377991,423.023193 \n C629.713745,422.200836 626.423889,422.161865 623.725525,422.882690 \n C590.944153,431.639587 558.238403,440.679779 525.448730,449.404907 \n C522.300964,450.242554 518.534851,450.164001 515.372437,449.321808 \n C482.598022,440.593750 449.897797,431.587128 417.141144,422.791412 \n C414.867096,422.180786 412.115295,422.006958 409.909119,422.683990 \n C363.870605,436.812317 322.877258,459.923096 286.676636,492.678345 \nM638.193726,649.759216 \n C618.869507,656.015442 599.040955,658.948853 578.743958,658.635498 \n C561.320618,658.366577 544.380371,654.932678 527.565796,650.671387 \n C525.521851,650.153320 523.254150,649.859985 521.196533,650.169861 \n C512.810059,651.432678 504.514069,653.468018 496.093933,654.298462 \n C480.882416,655.798584 465.515686,658.255371 450.375763,657.410278 \n C421.185272,655.780762 394.125427,646.062805 369.145020,630.771667 \n C368.008179,630.075806 366.770874,629.544006 364.879761,628.577820 \n C379.822174,677.662048 402.386169,721.588440 433.601837,761.123535 \n C468.862305,805.781311 475.313782,854.488708 452.707825,906.779114 \n C449.580719,914.012512 445.212494,920.709351 441.423889,927.657288 \n C573.221985,890.897766 675.186523,765.328125 681.092896,630.672180 \n C667.338623,636.799011 653.131897,643.127319 638.193726,649.759216 \nM451.496307,582.220520 \n C442.351196,581.799133 433.142700,581.909058 424.076202,580.828186 \n C411.400055,579.317017 398.218109,578.681030 386.332123,574.558289 \n C354.337128,563.460327 326.346069,545.236816 301.709656,521.949341 \n C300.020294,520.352478 298.291534,518.797302 295.873596,516.571472 \n C296.025665,518.456909 295.980042,519.134644 296.144836,519.756653 \n C304.310333,550.579102 319.447479,577.592346 342.608459,599.413086 \n C382.985504,637.453735 430.264038,654.771729 486.434967,647.405457 \n C555.692078,638.323059 618.847046,614.520935 675.700134,573.984924 \n C680.675537,570.437500 685.476868,566.646118 690.581665,562.800293 \n C677.023743,544.661377 659.575134,536.325806 637.562927,537.450195 \n C626.043884,538.038574 616.340271,543.514893 606.234131,548.288513 \n C557.596436,571.262329 506.255249,582.294250 451.496307,582.220520 \nM539.676270,436.107300 \n C577.955139,425.690460 616.233948,415.273621 655.757202,404.518158 \n C635.089294,395.015900 615.544373,386.029968 595.877441,376.987946 \n C594.662292,379.021637 593.749573,380.591156 592.797180,382.136292 \n C586.595276,392.197998 578.925293,400.845184 568.666138,406.952454 \n C534.791809,427.117798 492.288269,422.383606 462.337891,394.876129 \n C456.381653,389.405701 451.112213,383.187500 445.401093,377.182709 \n C426.206024,386.105682 406.958923,395.052887 386.824615,404.412476 \n C389.268799,405.156464 390.645874,405.614380 392.043884,405.995544 \n C429.426819,416.187622 466.920624,425.996552 504.132446,436.778748 \n C515.781982,440.154175 526.683472,441.361206 537.944458,436.636871 \n C538.251221,436.508148 538.570312,436.408813 539.676270,436.107300 \nM636.169495,641.720032 \n C693.203857,621.317932 729.752136,581.965942 745.785767,523.547119 \n C689.811462,583.441650 622.343140,624.064514 542.504456,645.372620 \n C570.121521,652.872437 603.639343,651.544189 636.169495,641.720032 \nz"/>\n<path fill="#F4BA17" opacity="1.000000" stroke="none" \n d="\nM441.015747,105.015450 \n C463.511292,84.231010 488.640594,68.186523 516.419739,56.200459 \n C519.736023,54.769550 522.563171,54.726585 525.888672,56.228947 \n C608.759338,93.666801 660.577881,156.262833 678.550415,245.760666 \n C681.404419,259.972870 683.086792,275.012085 681.791199,289.350922 \n C678.394348,326.946808 646.763123,358.928711 609.275574,365.021576 \n C604.740540,365.758667 600.137085,366.074554 595.936157,366.544159 \n C598.728027,358.281586 602.575073,350.677063 603.764282,342.677429 \n C607.550598,317.209198 599.847656,294.559021 584.000793,274.713074 \n C568.703491,255.555466 548.543213,244.076111 524.373901,240.455948 \n C513.742554,238.863556 503.544983,242.914673 494.094208,247.402267 \n C458.815063,264.154144 439.589569,292.120056 437.455444,331.277863 \n C436.885193,341.740936 439.517578,351.761383 444.709564,360.990906 \n C445.507843,362.409912 446.254150,363.858124 447.763702,366.669525 \n C441.737213,365.993011 436.723083,365.747589 431.834900,364.830811 \n C394.910004,357.905762 365.030243,327.864777 360.603027,290.610352 \n C358.946777,276.673065 360.996429,261.961884 363.356293,247.940109 \n C372.276398,194.939011 396.510132,149.623566 434.238464,111.452431 \n C436.344940,109.321198 438.572540,107.309639 441.015747,105.015450 \nM523.796143,200.964203 \n C522.979370,200.806061 522.153381,200.684708 521.347168,200.484161 \n C511.964752,198.150375 505.739960,190.440384 506.015442,181.511810 \n C506.292053,172.544968 512.964478,165.113678 522.410034,163.391052 \n C528.999146,162.189362 534.425354,164.852509 539.153198,168.766846 \n C541.656067,166.404358 544.030029,164.163544 546.391113,161.934906 \n C535.207764,149.868927 515.326111,149.927109 503.764648,161.836975 \n C492.335419,173.610657 493.100830,193.056198 505.417236,203.820190 \n C517.457336,214.342712 537.192993,213.508774 546.093628,202.189407 \n C543.863281,199.842941 541.645081,197.509277 539.426880,195.175613 \n C539.477722,195.664429 539.528503,196.153259 539.579346,196.642075 \n C534.598694,198.089890 529.617981,199.537689 523.796143,200.964203 \nz"/>\n<path fill="#F4BA17" opacity="1.000000" stroke="none" \n d="\nM286.857971,492.402985 \n C322.877258,459.923096 363.870605,436.812317 409.909119,422.683990 \n C412.115295,422.006958 414.867096,422.180786 417.141144,422.791412 \n C449.897797,431.587128 482.598022,440.593750 515.372437,449.321808 \n C518.534851,450.164001 522.300964,450.242554 525.448730,449.404907 \n C558.238403,440.679779 590.944153,431.639587 623.725525,422.882690 \n C626.423889,422.161865 629.713745,422.200836 632.377991,423.023193 \n C676.901917,436.766174 716.653381,459.096100 751.669678,489.845367 \n C752.286987,490.387451 752.879761,490.957520 753.920410,491.916840 \n C738.051208,516.184204 719.173889,537.685486 697.214539,556.985291 \n C693.878845,553.465637 690.823608,549.786621 687.312561,546.611755 \n C665.744080,527.108459 635.979919,523.518494 610.255371,536.938660 \n C577.636902,553.955383 542.882812,564.440125 506.608704,569.950623 \n C469.791931,575.543579 432.863312,575.804749 396.291962,568.749573 \n C385.114655,566.593323 374.407410,560.972046 364.045837,555.811401 \n C334.755707,541.223022 309.770172,521.000305 288.657562,496.006378 \n C287.835724,495.033447 287.329773,493.793732 286.857971,492.402985 \nz"/>\n<path fill="#F4BA17" opacity="1.000000" stroke="none" \n d="\nM638.559448,649.607422 \n C653.131897,643.127319 667.338623,636.799011 681.092896,630.672180 \n C675.186523,765.328125 573.221985,890.897766 441.421356,927.655945 \n C445.212494,920.709351 449.580719,914.012512 452.707825,906.779114 \n C475.313782,854.488708 468.862305,805.781311 433.601837,761.123535 \n C402.386169,721.588440 379.822174,677.662048 364.879761,628.577820 \n C366.770874,629.544006 368.008179,630.075806 369.145020,630.771667 \n C394.125427,646.062805 421.185272,655.780762 450.375763,657.410278 \n C465.515686,658.255371 480.882416,655.798584 496.093933,654.298462 \n C504.514069,653.468018 512.810059,651.432678 521.196533,650.169861 \n C523.254150,649.859985 525.521851,650.153320 527.565796,650.671387 \n C544.380371,654.932678 561.320618,658.366577 578.743958,658.635498 \n C599.040955,658.948853 618.869507,656.015442 638.559448,649.607422 \nz"/>\n<path fill="#F3B917" opacity="1.000000" stroke="none" \n d="\nM451.996887,582.225220 \n C506.255249,582.294250 557.596436,571.262329 606.234131,548.288513 \n C616.340271,543.514893 626.043884,538.038574 637.562927,537.450195 \n C659.575134,536.325806 677.023743,544.661377 690.581665,562.800293 \n C685.476868,566.646118 680.675537,570.437500 675.700134,573.984924 \n C618.847046,614.520935 555.692078,638.323059 486.434967,647.405457 \n C430.264038,654.771729 382.985504,637.453735 342.608459,599.413086 \n C319.447479,577.592346 304.310333,550.579102 296.144836,519.756653 \n C295.980042,519.134644 296.025665,518.456909 295.873596,516.571472 \n C298.291534,518.797302 300.020294,520.352478 301.709656,521.949341 \n C326.346069,545.236816 354.337128,563.460327 386.332123,574.558289 \n C398.218109,578.681030 411.400055,579.317017 424.076202,580.828186 \n C433.142700,581.909058 442.351196,581.799133 451.996887,582.225220 \nz"/>\n<path fill="#F2B817" opacity="1.000000" stroke="none" \n d="\nM539.279968,436.201538 \n C538.570312,436.408813 538.251221,436.508148 537.944458,436.636871 \n C526.683472,441.361206 515.781982,440.154175 504.132446,436.778748 \n C466.920624,425.996552 429.426819,416.187622 392.043884,405.995544 \n C390.645874,405.614380 389.268799,405.156464 386.824615,404.412476 \n C406.958923,395.052887 426.206024,386.105682 445.401093,377.182709 \n C451.112213,383.187500 456.381653,389.405701 462.337891,394.876129 \n C492.288269,422.383606 534.791809,427.117798 568.666138,406.952454 \n C578.925293,400.845184 586.595276,392.197998 592.797180,382.136292 \n C593.749573,380.591156 594.662292,379.021637 595.877441,376.987946 \n C615.544373,386.029968 635.089294,395.015900 655.757202,404.518158 \n C616.233948,415.273621 577.955139,425.690460 539.279968,436.201538 \nz"/>\n<path fill="#F2B817" opacity="1.000000" stroke="none" \n d="\nM635.789856,641.836487 \n C603.639343,651.544189 570.121521,652.872437 542.504456,645.372620 \n C622.343140,624.064514 689.811462,583.441650 745.785767,523.547119 \n C729.752136,581.965942 693.203857,621.317932 635.789856,641.836487 \nz"/>\n<path fill="#48240F" opacity="1.000000" stroke="none" \n d="\nM524.216736,200.974854 \n C529.617981,199.537689 534.598694,198.089890 539.579346,196.642075 \n C539.528503,196.153259 539.477722,195.664429 539.426880,195.175613 \n C541.645081,197.509277 543.863281,199.842941 546.093628,202.189407 \n C537.192993,213.508774 517.457336,214.342712 505.417236,203.820190 \n C493.100830,193.056198 492.335419,173.610657 503.764648,161.836975 \n C515.326111,149.927109 535.207764,149.868927 546.391113,161.934906 \n C544.030029,164.163544 541.656067,166.404358 539.153198,168.766846 \n C534.425354,164.852509 528.999146,162.189362 522.410034,163.391052 \n C512.964478,165.113678 506.292053,172.544968 506.015442,181.511810 \n C505.739960,190.440384 511.964752,198.150375 521.347168,200.484161 \n C522.153381,200.684708 522.979370,200.806061 524.216736,200.974854 \nz"/>';Object.assign(__ds_scope,{CS_LOGO_VIEWBOX,CS_LOGO_MARK_INNER,__ds_default_components_logo_logo_data_4vwi3g:CS_LOGO_MARK_INNER})})()}catch(e){__ds_ns.__errors.push({path:"components/logo/logo-data.js",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{CS_LOGO_VIEWBOX,CS_LOGO_MARK_INNER}=__ds_scope;const{cx}=__ds_scope;const Logo=React.forwardRef(function Logo2({size=32,title="CyberSkill",decorative=false,className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const safeTitle=String(title).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return React.createElement("svg",{...props,className:cx("cs-logo",className),width:size,height:size,viewBox:CS_LOGO_VIEWBOX,xmlns:"http://www.w3.org/2000/svg",role:decorative?void 0:"img","aria-hidden":decorative?true:void 0,"aria-label":decorative?void 0:title,dangerouslySetInnerHTML:{__html:(decorative?"":`<title>${safeTitle}</title>`)+CS_LOGO_MARK_INNER},ref:mergedNativeRef})});Logo.displayName="Logo";Object.assign(__ds_scope,{Logo})})()}catch(e){__ds_ns.__errors.push({path:"components/logo/Logo.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Anchor=React.forwardRef(function Anchor2({items=[],title,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const titleId=React.useId();const hasTitle=Boolean(title)||title===0;const[act,setAct]=React.useState(items.length?items[0].id:null);React.useEffect(()=>{const els=items.map(it=>document.getElementById(it.id)).filter(Boolean);if(!els.length)return;const visible=new Set;const io=new IntersectionObserver(es=>{for(const entry of es){if(entry.isIntersecting)visible.add(entry.target);else visible.delete(entry.target)}const vis=[...visible].filter(el=>el.isConnected).sort((a,b)=>a.getBoundingClientRect().top-b.getBoundingClientRect().top);if(vis[0])setAct(vis[0].id)},{rootMargin:"-20% 0px -70% 0px"});els.forEach(el=>io.observe(el));return()=>io.disconnect()},[items]);return React.createElement("nav",{className:cx("cs-anchor",className),"aria-labelledby":hasTitle?titleId:void 0,...props,ref:mergedNativeRef},hasTitle?React.createElement("div",{id:titleId,className:"cs-anchor__title"},title):null,items.map(it=>React.createElement("a",{key:it.id,href:"#"+it.id,className:cx("cs-anchor__item",act===it.id&&"is-active"),"aria-current":act===it.id?"location":void 0},it.label)))});Anchor.displayName="Anchor";Object.assign(__ds_scope,{Anchor})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Anchor.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const BackTop=React.forwardRef(function BackTop2({threshold=320,label,lang,className,rootProps},forwardedRef){const[show,setShow]=React.useState(false);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const lbl=label!=null?label:makeT("BackTop",L,localeMessages)("label");React.useEffect(()=>{const on=()=>setShow(window.scrollY>threshold);on();window.addEventListener("scroll",on,{passive:true});return()=>window.removeEventListener("scroll",on)},[threshold]);if(!show)return React.createElement("span",{ref,style:{display:"none"}});return React.createElement("button",{ref:mergedNativeRef,type:"button",...mergeTargetProps({"className":cx("cs-backtop",className),"onClick":()=>window.scrollTo({top:0,behavior:window.matchMedia("(prefers-reduced-motion: reduce)").matches?"instant":"smooth"})},rootProps,["type","aria-label"]),"aria-label":lbl},React.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M12 19V5M5 12l7-7 7 7"})))});BackTop.displayName="BackTop";Object.assign(__ds_scope,{BackTop})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/BackTop.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Breadcrumb=React.forwardRef(function Breadcrumb2({items=[],lang,className,...props},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);return React.createElement("nav",{ref:mergedNativeRef,"aria-label":makeT("Breadcrumb",L,localeMessages)("label"),...props},React.createElement("ol",{className:cx("cs-breadcrumb",className)},items.map((it,i)=>{const last=i===items.length-1;return React.createElement("li",{key:i},last?React.createElement("span",{className:"cs-breadcrumb__current","aria-current":"page"},it.label):React.createElement(React.Fragment,null,React.createElement("a",{href:it.href||"#"},it.label),React.createElement("span",{className:"cs-breadcrumb__sep","aria-hidden":"true"},"/")))})))});Breadcrumb.displayName="Breadcrumb";Object.assign(__ds_scope,{Breadcrumb})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Breadcrumb.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const Dock=React.forwardRef(function Dock2({items=[],label,className,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const[hov,setHov]=React.useState(null);return React.createElement("div",{...mergeTargetProps({"className":cx("cs-dock",className),"onMouseLeave":()=>setHov(null)},rootProps,["role","aria-label"]),role:"toolbar","aria-label":label,ref:mergedNativeRef},items.map((it,i)=>{const d=hov==null?3:Math.abs(i-hov);const scale=d===0?1.35:d===1?1.15:1;return React.createElement("button",{key:i,type:"button",className:cx("cs-dock__item",it.active&&"is-active"),"aria-label":it.label,title:it.label,style:{transform:`scale(${scale}) translateY(${d===0?-6:d===1?-2:0}px)`},onMouseEnter:()=>setHov(i),onFocus:()=>setHov(i),onBlur:()=>setHov(null),onClick:()=>it.onSelect&&it.onSelect()},it.icon)}))});Dock.displayName="Dock";Object.assign(__ds_scope,{Dock})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Dock.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Link=React.forwardRef(function Link2({href="#",variant="default",external=false,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("a",{href,className:cx("cs-link",variant!=="default"&&"cs-link--"+variant,className),target:external?"_blank":void 0,rel:external?"noopener noreferrer":void 0,...props,ref:mergedNativeRef},children,external?React.createElement("span",{"aria-hidden":"true"}," ↗"):variant==="standalone"?React.createElement("span",{"aria-hidden":"true"}," →"):null)});Link.displayName="Link";Object.assign(__ds_scope,{Link})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Link.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;function pages(page,count){if(count<=7)return Array.from({length:count},(_,i)=>i+1);const out=[1];const lo=Math.max(2,page-1),hi=Math.min(count-1,page+1);if(lo>2)out.push("…");for(let p=lo;p<=hi;p++)out.push(p);if(hi<count-1)out.push("…");out.push(count);return out}const Pagination=React.forwardRef(function Pagination2({page=1,pageCount=1,onChange,lang,className,...props},forwardedRef){const go=p=>onChange&&p>=1&&p<=pageCount&&p!==page&&onChange(p);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Pagination",L,localeMessages);return React.createElement("nav",{ref:mergedNativeRef,"aria-label":t("label"),className:cx("cs-pagination",className),...props},React.createElement("button",{type:"button",onClick:()=>go(page-1),disabled:page<=1,"aria-label":t("prev")},"‹"),pages(page,pageCount).map((p,i)=>p==="…"?React.createElement("span",{key:"e"+i,className:"cs-pagination__ellipsis","aria-hidden":"true"},"…"):React.createElement("button",{key:p,type:"button","aria-current":p===page?"page":void 0,onClick:()=>go(p)},p)),React.createElement("button",{type:"button",onClick:()=>go(page+1),disabled:page>=pageCount,"aria-label":t("next")},"›"))});Pagination.displayName="Pagination";Object.assign(__ds_scope,{Pagination})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Pagination.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Sidebar=React.forwardRef(function Sidebar2({label,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const labelId=React.useId();const hasLabel=Boolean(label)||label===0;return React.createElement("nav",{className:cx("cs-sidebar",className),"aria-labelledby":hasLabel?labelId:void 0,...props,ref:mergedNativeRef},hasLabel?React.createElement("div",{id:labelId,className:"cs-sidebar__label"},label):null,children)});Sidebar.displayName="Sidebar";const NavItem=React.forwardRef(function NavItem2({icon,active=false,trail,href,onClick,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const Tag=href?"a":"button";return React.createElement(Tag,{type:Tag==="button"?"button":void 0,className:cx("cs-nav-item",active&&"is-active",className),href,"aria-current":active?"page":void 0,onClick,...props,ref:mergedNativeRef},icon||icon===0?React.createElement("span",{className:"cs-nav-item__icon"},icon):null,React.createElement("span",null,children),trail!=null?React.createElement("span",{className:"cs-nav-item__trail"},trail):null)});NavItem.displayName="NavItem";Object.assign(__ds_scope,{Sidebar,NavItem})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Sidebar.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Steps=React.forwardRef(function Steps2({steps=[],current=0,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Steps",L,localeMessages);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-steps",className)},rootProps,["role","aria-label"]),role:"list","aria-label":t("label")},steps.map((s,i)=>{const state=i<current?"done":i===current?"active":"todo";return React.createElement("div",{key:i,className:cx("cs-step",`cs-step--${state}`),role:"listitem","aria-current":state==="active"?"step":void 0},React.createElement("span",{className:"cs-step__marker"},state==="done"?"✓":s.n??i+1),React.createElement("span",{className:"cs-step__title"},s.title),s.body!=null?React.createElement("span",{className:"cs-step__body"},s.body):null)}))});Steps.displayName="Steps";Object.assign(__ds_scope,{Steps})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Steps.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Tabs=React.forwardRef(function Tabs2({tabs=[],value,onChange,lang,className,"aria-label":ariaLabel,...props},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Tabs",L,localeMessages);const refs=React.useRef([]);const idx=Math.max(0,tabs.findIndex(tab=>tab.value===value));const vertical=props["aria-orientation"]==="vertical";const key=(e,i)=>{let n=null;if(e.key===(vertical?"ArrowDown":"ArrowRight"))n=(i+1)%tabs.length;else if(e.key===(vertical?"ArrowUp":"ArrowLeft"))n=(i-1+tabs.length)%tabs.length;else if(e.key==="Home")n=0;else if(e.key==="End")n=tabs.length-1;if(n==null)return;e.preventDefault();if(onChange)onChange(tabs[n].value);const b=refs.current[n];if(b)b.focus()};return React.createElement("div",{ref:mergedNativeRef,role:"tablist","aria-label":ariaLabel??t("list"),className:cx("cs-tabs",className),...props},tabs.map((t2,i)=>React.createElement("button",{key:t2.value,type:"button",role:"tab",id:t2.id,"aria-controls":t2["aria-controls"],"aria-selected":value===t2.value,tabIndex:i===idx?0:-1,ref:el=>refs.current[i]=el,onKeyDown:e=>key(e,i),className:"cs-tab",onClick:()=>onChange&&onChange(t2.value)},t2.label,t2.count!=null?React.createElement("span",{className:"cs-tab__count"},t2.count):null)))});Tabs.displayName="Tabs";const Tab=React.forwardRef(function Tab2({selected=false,count,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("button",{type:"button",role:"tab","aria-selected":selected,className:cx("cs-tab",className),...props,ref:mergedNativeRef},children,count!=null?React.createElement("span",{className:"cs-tab__count"},count):null)});Tab.displayName="Tab";Object.assign(__ds_scope,{Tabs,Tab})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Tabs.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useClientLayoutEffect}=__ds_scope;const focusableSelector=["a[href]","area[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","audio[controls]","video[controls]","summary","iframe",'[contenteditable]:not([contenteditable="false"])','[tabindex]:not([tabindex="-1"])'].join(",");function visibleFocusables(roots){return[...new Set(roots.flatMap(root=>[...root.matches?.(focusableSelector)?[root]:[],...root.querySelectorAll(focusableSelector)]))].filter(el=>el.tabIndex>=0&&!el.disabled&&!el.matches(":disabled")&&!el.closest('[inert], [hidden], [aria-hidden="true"]')&&el.getClientRects().length>0&&getComputedStyle(el).visibility!=="hidden")}function attachFocusTrap(panelEl,{handleEscape=false,onEscape,isActive=()=>true,scopeElements=()=>[panelEl],focusOrder}={}){if(!panelEl)return()=>{};const inside=el=>scopeElements().some(root=>root?.contains(el));const focusables=(backwards=false)=>focusOrder?focusOrder(backwards):visibleFocusables(scopeElements());const focusFirst=()=>(focusables()[0]||panelEl).focus();const onFocus=e=>{if(isActive()&&!inside(e.target))focusFirst()};const k=e=>{if(!isActive()||e.isComposing||e.keyCode===229)return;if(handleEscape&&e.key==="Escape"&&!e.isComposing&&e.keyCode!==229){e.preventDefault();onEscape&&onEscape();return}if(e.key!=="Tab")return;const f=focusables(e.shiftKey);if(!f.length){e.preventDefault();panelEl.focus();return}const active=document.activeElement;if(e.defaultPrevented)return;const index=f.indexOf(active);const next=index<0?e.shiftKey?f.length-1:0:(index+(e.shiftKey?-1:1)+f.length)%f.length;e.preventDefault();f[next].focus()};document.addEventListener("keydown",k);document.addEventListener("focusin",onFocus);return()=>{document.removeEventListener("keydown",k);document.removeEventListener("focusin",onFocus)}}function createOverlayManager(){const layers=[];let prevOverflow="";let prevOverflowPriority="";let locked=false;let escapeBound=false;const inertBefore=new Map;const ownedScopes=new Set;let observer=null;const isBelow=(a,b,visited=new Set)=>{if(!a.panelEl||!b.panelEl||a===b||visited.has(b))return false;if(a.panelEl.contains(b.panelEl))return true;visited.add(b);const parentEl=b.parentRef?.current||b.parentEl;if(parentEl&&a.panelEl.contains(parentEl))return true;const parent=layers.find(layer=>layer.panelEl===parentEl);return parent?isBelow(a,parent,visited):false};const resort=()=>{layers.sort((a,b)=>{if(isBelow(a,b))return-1;if(isBelow(b,a))return 1;return(a.seq||0)-(b.seq||0)})};const applyScroll=()=>{const need=layers.some(l=>l.kind==="modal"&&l.lockScroll!==false);if(need&&!locked){prevOverflow=document.body.style.overflow;prevOverflowPriority=document.body.style.getPropertyPriority("overflow");document.body.style.overflow="hidden";locked=true}else if(!need&&locked){document.body.style.setProperty("overflow",prevOverflow,prevOverflowPriority);locked=false}};const activeModal=()=>{resort();return[...layers].reverse().find(layer=>layer.kind==="modal"&&layer.panelEl?.isConnected)||null};const focusScope=()=>{const modal=activeModal();if(!modal)return[];const roots=[...new Set([...layers.slice(layers.indexOf(modal)),...layers.filter(layer=>layer.kind==="toast")].map(layer=>layer.panelEl).filter(el=>el?.isConnected))];let added=true;while(added){added=false;for(const scope of ownedScopes){if(scope.panelEl?.isConnected&&!roots.includes(scope.panelEl)&&roots.some(root=>root.contains(scope.parentEl))){roots.push(scope.panelEl);added=true}}}const belowScope=(ancestor,descendant,visited=new Set)=>{if(!ancestor||!descendant||ancestor===descendant||visited.has(descendant))return false;if(ancestor.contains(descendant))return true;visited.add(descendant);return[...ownedScopes].some(scope=>scope.panelEl===descendant&&(ancestor.contains(scope.parentEl)||belowScope(ancestor,scope.parentEl,new Set(visited))))};roots.sort((a,b)=>belowScope(a,b)?-1:belowScope(b,a)?1:0);return roots};const applyInert=()=>{const modal=activeModal();const blocked=new Set;if(modal){const allowed=[...focusScope(),modal.backdropEl].filter(el=>el?.isConnected);const walk=parent=>{for(const el of parent.children){if(allowed.includes(el))continue;if(allowed.some(root=>el.contains(root)))walk(el);else blocked.add(el)}};walk(document.body)}for(const[el,prior]of inertBefore){if(!blocked.has(el)){el.inert=prior;inertBefore.delete(el)}}for(const el of blocked){if(!inertBefore.has(el))inertBefore.set(el,el.inert);el.inert=true}if(modal&&!observer){observer=new MutationObserver(applyInert);observer.observe(document.body,{childList:true,subtree:true})}else if(!modal&&observer){observer.disconnect();observer=null}};const onDocEscape=e=>{if(e.key!=="Escape"||e.isComposing||e.keyCode===229)return;if(!layers.length)return;resort();const top=[...layers].reverse().find(layer=>layer.kind!=="toast");if(!top||typeof top.onEscape!=="function")return;e.preventDefault();e.stopPropagation();top.onEscape()};const ensureEscape=()=>{if(escapeBound)return;escapeBound=true;document.addEventListener("keydown",onDocEscape,true)};let seq=0;return{registerScope(scope){ownedScopes.add(scope);applyInert();return()=>{ownedScopes.delete(scope);applyInert()}},register(layer){ensureEscape();let id=layer.id;if(!id)do{id=`cs-ov-${++seq}`}while(layers.some(entry2=>entry2.id===id));const entry={...layer,id,seq:++seq};layers.push(entry);resort();applyScroll();applyInert();return()=>{resort();const i=layers.indexOf(entry);const wasTop=[...layers].reverse().find(layer2=>layer2.kind!=="toast")===entry;if(i>=0)layers.splice(i,1);applyScroll();applyInert();if(!layers.length&&escapeBound){document.removeEventListener("keydown",onDocEscape,true);escapeBound=false}const active=document.activeElement;const ownedFocus=active===document.body||active===entry.restoreEl||entry.panelEl?.contains(active);if(wasTop&&ownedFocus&&entry.restoreEl?.isConnected&&!entry.restoreEl.closest("[inert], [hidden]")&&typeof entry.restoreEl.focus==="function"){try{entry.restoreEl.focus()}catch{}}}},top(){resort();return layers[layers.length-1]||null},topDismissible(){resort();return[...layers].reverse().find(layer=>layer.kind!=="toast")||null},containsOwned(panelEl,target){if(!panelEl||!target)return false;const roots=[...new Set([panelEl,...layers.filter(layer=>isBelow({panelEl},layer)).map(layer=>layer.panelEl)].filter(Boolean))];let added=true;while(added){added=false;for(const scope of ownedScopes)if(scope.panelEl?.isConnected&&!roots.includes(scope.panelEl)&&roots.some(root=>root.contains(scope.parentEl))){roots.push(scope.panelEl);added=true}}return roots.some(root=>root.contains(target))},focusOrder({backwards=false,roots,logical=true}={}){const containerRoots=roots||(activeModal()?focusScope():[document.body]);let controls=visibleFocusables(containerRoots);for(const scope of logical?ownedScopes:[]){const anchor=scope.anchorEl;if(!anchor||!scope.panelEl?.isConnected)continue;const anchors=controls.filter(el=>el===anchor||anchor.contains(el));if(!anchors.length)continue;const moving=controls.filter(el=>!anchors.includes(el)&&this.containsOwned(scope.panelEl,el));if(!moving.length)continue;controls=controls.filter(el=>!moving.includes(el));const index=scope.tabOrder==="before"?controls.indexOf(anchors[0]):controls.indexOf(anchors[anchors.length-1])+1;controls.splice(index,0,...moving)}controls.sort((a,b)=>(a.tabIndex>0?a.tabIndex:Infinity)-(b.tabIndex>0?b.tabIndex:Infinity));return controls.filter(el=>{if(el.tagName!=="INPUT"||el.type!=="radio"||!el.name)return true;const group=controls.filter(other=>other.tagName==="INPUT"&&other.type==="radio"&&other.name===el.name&&other.form===el.form&&other.getRootNode()===el.getRootNode());return el===(group.find(radio=>radio.checked)||(backwards?group[group.length-1]:group[0]))})},activeModal,focusScope,get scrollLocked(){return locked},get depth(){return layers.length}}}const registryKey=Symbol.for("@cyberskill/design/overlay-manager");const registryProtocol="cyberskill.overlay-manager/1";const serverManager=createOverlayManager();const serverContexts={manager:React.createContext(null),scope:React.createContext(null)};function documentRegistry(){if(typeof document==="undefined")return null;const descriptor=Object.getOwnPropertyDescriptor(document,registryKey);if(descriptor){if(!("value"in descriptor))throw new Error("Incompatible CyberSkill overlay registry: accessor records are unsupported");const record2=descriptor.value;const value=name=>Object.getOwnPropertyDescriptor(record2||{},name)?.value;const manager=value("manager"),contexts2=value("contexts");const methods=["register","registerScope","top","topDismissible","activeModal","focusScope","containsOwned","focusOrder"];if(value("protocol")!==registryProtocol||!manager||methods.some(name=>typeof manager[name]!=="function")||!(contexts2 instanceof WeakMap)||typeof value("nextProviderId")!=="function"||!Number.isSafeInteger(manager.depth)||manager.depth<0||typeof manager.scrollLocked!=="boolean"){throw new Error("Incompatible CyberSkill overlay registry: expected "+registryProtocol+"; align compiled runtime copies before mounting overlays")}return record2}let providerSequence=0;const record=Object.freeze({protocol:registryProtocol,manager:createOverlayManager(),contexts:new WeakMap,nextProviderId:()=>{let id;do{id="cs-overlay-root-"+ ++providerSequence}while(document.getElementById(id));return id}});Object.defineProperty(document,registryKey,{value:record,configurable:false,writable:false});return record}function sharedContexts(){const registry=documentRegistry();if(!registry)return serverContexts;let contexts2=registry.contexts.get(React);if(!contexts2){contexts2={manager:React.createContext(null),scope:React.createContext(null)};registry.contexts.set(React,contexts2)}if(!contexts2.manager?.Provider||!contexts2.scope?.Provider)throw new Error("Incompatible CyberSkill overlay registry: invalid React ownership contexts");return contexts2}const contexts=sharedContexts();const OverlayContext=contexts.manager;const overlayScopeContext=contexts.scope;function getOverlayManager(){return documentRegistry()?.manager||serverManager}function OverlayProvider({children}){const marker=React.useRef(null);const api=getOverlayManager();useClientLayoutEffect(()=>{const element=marker.current;if(!element)return;const id=documentRegistry().nextProviderId();element.id=id;return()=>{if(element.id===id)element.removeAttribute("id")}},[]);return React.createElement(OverlayContext.Provider,{value:api},React.createElement("div",{ref:marker,"data-cs-overlay-root":""}),children)}function useOverlayLayer({open,kind="modal",trapFocus=false,lockScroll,onEscape,panelRef,backdropRef,preferFocusSelector,restoreFocus=true,surfaceKey}){const ctx=React.useContext(OverlayContext);const parentScope=React.useContext(overlayScopeContext);const mgr=ctx||getOverlayManager();const escapeRef=React.useRef(onEscape);escapeRef.current=onEscape;const scopeBinding=React.useRef(null);useClientLayoutEffect(()=>{const panelEl=panelRef?.current;const previous=scopeBinding.current;if(previous?.panelEl===panelEl&&previous?.parentScope===parentScope)return;previous?.cleanup();scopeBinding.current=panelEl&&parentScope?{panelEl,parentScope,cleanup:mgr.registerScope({panelEl,get parentEl(){return parentScope.current}})}:null});useClientLayoutEffect(()=>()=>{scopeBinding.current?.cleanup();scopeBinding.current=null},[]);useClientLayoutEffect(()=>{if(!open)return void 0;const restoreEl=typeof document!=="undefined"?document.activeElement:null;const panel=panelRef&&panelRef.current;const unregister=mgr.register({kind,lockScroll:lockScroll!=null?lockScroll:kind==="modal",onEscape:()=>escapeRef.current&&escapeRef.current(),restoreEl:restoreFocus?restoreEl:null,panelEl:panel||null,backdropEl:backdropRef?.current||null,parentRef:parentScope});let detachTrap=()=>{};const ownsModalFocus=mgr.activeModal()?.panelEl===panel;if(trapFocus&&panel&&ownsModalFocus&&!mgr.focusScope().some(root=>root.contains(document.activeElement))){const preferred=preferFocusSelector&&panel.querySelector(preferFocusSelector)||visibleFocusables([panel])[0]||panel;preferred&&preferred.focus&&preferred.focus()}if(trapFocus&&panel){detachTrap=attachFocusTrap(panel,{isActive:()=>mgr.activeModal()?.panelEl===panel,scopeElements:()=>mgr.focusScope(),focusOrder:backwards=>mgr.focusOrder({backwards})})}return()=>{detachTrap();unregister()}},[open,kind,trapFocus,lockScroll,mgr,panelRef,backdropRef,parentScope,preferFocusSelector,restoreFocus,surfaceKey]);return{manager:mgr,scope:open&&panelRef?panelRef:parentScope}}Object.assign(__ds_scope,{focusableSelector,attachFocusTrap,overlayScopeContext,getOverlayManager,OverlayProvider,useOverlayLayer})})()}catch(e){__ds_ns.__errors.push({path:"components/overlays/OverlayManager.jsx",error:String(e&&e.message||e)})}try{(()=>{const{floatingPlacements,floatingPosition}=__ds_scope;const createPortal=(...args)=>{if(typeof ReactDOM==="undefined"||typeof ReactDOM.createPortal!=="function")throw new Error("ReactDOM.createPortal peer is required to render a portal");return ReactDOM.createPortal(...args)};const{getOverlayManager,overlayScopeContext}=__ds_scope;const{useClientLayoutEffect}=__ds_scope;const placements=new Set(floatingPlacements);const axes=["lang","dir","data-theme","data-cs-density","data-cs-contrast","data-cs-element","data-cs-variant","data-cs-style","data-managed"];const inherited=["font-family","font-size","font-style","font-weight","line-height","letter-spacing","color","direction","writing-mode","text-align","visibility","pointer-events","user-select"];const geometry=["position","inset","left","top","right","bottom","z-index","max-width","min-width","max-height","min-height","box-sizing","overflow-y","transform","transition-property","margin","width"];function scopeHost(host,anchor,boundary,open,lang){if(!anchor||!host)return;const computed=getComputedStyle(anchor);host.removeAttribute("class");for(const name of axes){const value=name==="lang"&&lang!=null&&String(lang).trim()||anchor.closest("["+name+"]")?.getAttribute(name);if(value!=null)host.setAttribute(name,value);else host.removeAttribute(name)}host.setAttribute("data-open",String(Boolean(open)));const hidden=!anchor.getClientRects().length;host.style.display=hidden?"none":"contents";host.inert=Boolean(anchor.closest("[inert]"));if(hidden||host.inert||anchor.closest('[aria-hidden="true"]'))host.setAttribute("aria-hidden","true");else host.removeAttribute("aria-hidden");for(const name of inherited)host.style.setProperty(name,computed.getPropertyValue(name));const current=new Set;for(let index=0;index<computed.length;index++){const name=computed[index];if(name.startsWith("--")){current.add(name);host.style.setProperty(name,computed.getPropertyValue(name))}}for(let index=host.style.length-1;index>=0;index--){const name=host.style[index];if(name.startsWith("--")&&!current.has(name))host.style.removeProperty(name)}}function useFloatingPanel({open,anchorRef,boundaryRef=anchorRef,panelRef,portal=true,placement="bottom-start",gap=8,matchWidth=false,scroll=true,point,lang,identity,getAnchor,getInlineParent,getTabAnchor,tabOrder="after",manageTabOrder=true}){if(!placements.has(placement))throw new TypeError("Unsupported floating placement: "+placement);const parentScope=React.useContext(overlayScopeContext);const boundaryBinding=React.useRef(null);const panelBinding=React.useRef(null);useClientLayoutEffect(()=>{const panelEl=boundaryRef.current;const previous=boundaryBinding.current;if(previous?.panelEl===panelEl&&previous?.parentScope===parentScope)return;previous?.cleanup();boundaryBinding.current=panelEl&&parentScope?{panelEl,parentScope,cleanup:getOverlayManager().registerScope({panelEl,get parentEl(){return parentScope.current}})}:null});useClientLayoutEffect(()=>()=>{boundaryBinding.current?.cleanup();boundaryBinding.current=null},[]);useClientLayoutEffect(()=>{const panelEl=panelRef.current;const boundaryEl=boundaryRef.current;const previous=panelBinding.current;if(previous?.panelEl===panelEl&&previous?.boundaryEl===boundaryEl)return;previous?.cleanup();panelBinding.current=panelEl&&boundaryEl?{panelEl,boundaryEl,cleanup:getOverlayManager().registerScope({panelEl,get parentEl(){return boundaryRef.current},get anchorEl(){return options.current.getTabAnchor?.()||anchorElement()},get tabOrder(){return options.current.tabOrder}})}:null});useClientLayoutEffect(()=>()=>{panelBinding.current?.cleanup();panelBinding.current=null},[]);const[host,setHost]=React.useState(null);const[nativeInline,setNativeInline]=React.useState(false);const lastFocused=React.useRef(null);const activeHost=portal?host:null;const options=React.useRef(null);const schedulePosition=React.useRef(()=>{});options.current={open,anchorRef,boundaryRef,panelRef,placement,gap,matchWidth,point,lang,getAnchor,getInlineParent,getTabAnchor,tabOrder};const anchorElement=()=>{const candidate=options.current.getAnchor?.()||options.current.anchorRef.current;return host?.contains(candidate)?options.current.anchorRef.current:candidate};const inlineParentElement=()=>options.current.getInlineParent?.()||options.current.boundaryRef.current;const placeHost=(element,sourceMoved=false)=>{const parent=inlineParentElement();const local=Boolean(parent?.closest("form,fieldset"));const target=local?parent:document.body;const anchor=options.current.getTabAnchor?.()||anchorElement();const before=local&&options.current.tabOrder==="before"&&anchor?.parentElement===target?anchor:null;if(element.parentElement!==target||before&&element.nextSibling!==before){const focused=element.contains(document.activeElement)?document.activeElement:sourceMoved&&document.activeElement===document.body&&element.contains(lastFocused.current)?lastFocused.current:null;const selection=focused&&typeof focused.selectionStart==="number"?[focused.selectionStart,focused.selectionEnd,focused.selectionDirection]:null;if(element.isConnected&&typeof target.moveBefore==="function")target.moveBefore(element,before);else target.insertBefore(element,before);if(focused?.isConnected&&document.activeElement!==focused&&!focused.matches(":disabled")&&!focused.closest("[inert]")){focused.focus({preventScroll:true});if(selection)focused.setSelectionRange(...selection)}}if(local){element.setAttribute("data-cs-floating-inline","");element.removeAttribute("style");element.style.display="contents";for(const axis of axes)element.removeAttribute(axis);element.removeAttribute("aria-hidden");element.inert=false;element.setAttribute("data-open",String(Boolean(options.current.open)));if(options.current.lang!=null)element.lang=String(options.current.lang)}else{element.removeAttribute("data-cs-floating-inline");scopeHost(element,anchorElement(),boundaryRef.current,options.current.open,options.current.lang)}setNativeInline(previous=>previous===local?previous:local)};useClientLayoutEffect(()=>{if(!portal){setHost(null);setNativeInline(false);return}const element=document.createElement("span");element.setAttribute("data-cs-floating-root","");element.style.display="contents";let focusTimer;const onFocusOut=event=>{if(event.relatedTarget!=null){lastFocused.current=null;return}clearTimeout(focusTimer);focusTimer=setTimeout(()=>{lastFocused.current=null},0)};const onFocusIn=event=>{clearTimeout(focusTimer);lastFocused.current=event.target};element.addEventListener("focusout",onFocusOut);element.addEventListener("focusin",onFocusIn);placeHost(element);setHost(element);return()=>{clearTimeout(focusTimer);lastFocused.current=null;element.removeEventListener("focusout",onFocusOut);element.removeEventListener("focusin",onFocusIn);element.remove()}},[portal]);const ready=!portal||Boolean(host?.isConnected);useClientLayoutEffect(()=>{const anchor=anchorElement();if(!ready||!anchor)return;const observeAncestors=()=>{observer.disconnect();const nodes=new Set;for(const start of[anchorElement(),inlineParentElement()])for(let node=start;node;node=node.parentElement)nodes.add(node);for(const node of nodes)observer.observe(node,{attributes:true,childList:Boolean(activeHost),attributeFilter:[...axes,"class","style","hidden","inert","aria-hidden"]})};const updateScope=records=>{const parent=inlineParentElement();const sourceMoved=Array.isArray(records)&&records.some(record=>record.type==="childList"&&[...record.removedNodes].some(node=>node===parent||node.contains?.(parent)));if(activeHost)placeHost(activeHost,sourceMoved);observeAncestors();schedulePosition.current()};const observer=new MutationObserver(updateScope);updateScope();const media=["(prefers-color-scheme: dark)","(forced-colors: active)","(prefers-contrast: more)","(prefers-reduced-motion: reduce)","(pointer: coarse)"].map(query=>matchMedia(query));for(const query of media)query.addEventListener("change",updateScope);return()=>{observer.disconnect();for(const query of media)query.removeEventListener("change",updateScope)}},[ready,activeHost,boundaryRef,anchorRef,open,lang,identity]);useClientLayoutEffect(()=>{const panel=panelRef.current;const anchor=anchorElement();if(!open||!ready||!panel||!anchor)return;const before=new Map(geometry.map(name=>[name,[panel.style.getPropertyValue(name),panel.style.getPropertyPriority(name)]]));let owned=null;const readGeometry=()=>new Map(geometry.map(name=>[name,[panel.style.getPropertyValue(name),panel.style.getPropertyPriority(name)]]));const captureCallerStyles=()=>{if(!owned)return false;let changed=false;for(const[name,value]of readGeometry()){const last=owned.get(name);if(value[0]!==last[0]||value[1]!==last[1]){before.set(name,value);changed=true}}return changed};const priorPlacement=panel.getAttribute("data-cs-placement");let frame=null;let positionedScroll=null;const position=()=>{frame=null;const anchor2=anchorElement();if(!panel.isConnected||!anchor2?.isConnected)return;captureCallerStyles();const scrollLeft=panel.scrollLeft,scrollTop=panel.scrollTop;const view=window.visualViewport;const viewport={left:(view?.offsetLeft||0)+8,top:(view?.offsetTop||0)+8,right:(view?.offsetLeft||0)+(view?.width||document.documentElement.clientWidth)-8,bottom:(view?.offsetTop||0)+(view?.height||window.innerHeight)-8};for(const name of["min-width","max-width","min-height","max-height","width"]){const[value,priority]=before.get(name);if(value)panel.style.setProperty(name,value,priority);else panel.style.removeProperty(name)}const rect=anchor2.getBoundingClientRect();const naturalStyle=getComputedStyle(panel);const minWidth=naturalStyle.minWidth.endsWith("%")?rect.width*parseFloat(naturalStyle.minWidth)/100:parseFloat(naturalStyle.minWidth)||0;const heightLimit=parseFloat(naturalStyle.maxHeight),widthLimit=parseFloat(naturalStyle.maxWidth);const maxHeight=Number.isFinite(heightLimit)?heightLimit:Infinity;const maxWidth=Number.isFinite(widthLimit)?widthLimit:Infinity;const cursor=options.current.point;const box=cursor?{left:cursor.x+(cursor.relative?rect.left:0),right:cursor.x+(cursor.relative?rect.left:0),top:cursor.y+(cursor.relative?rect.top:0),bottom:cursor.y+(cursor.relative?rect.top:0),width:0,height:0}:rect;const transitions=naturalStyle.transitionProperty.split(",").map(value=>value.trim());panel.style.transitionProperty=transitions.includes("all")?"opacity, color, background-color, border-color, box-shadow":transitions.filter(value=>!["transform","translate","left","right","top","bottom","inset","width","height","max-width","max-height"].includes(value)).join(",")||"none";panel.style.position=portal&&!nativeInline?"fixed":"absolute";panel.style.inset="auto";panel.style.transform="none";panel.style.margin="0";panel.style.boxSizing="border-box";panel.style.maxWidth=Math.min(maxWidth,Math.max(0,viewport.right-viewport.left))+"px";panel.style.minWidth=Math.min(minWidth,Math.max(0,viewport.right-viewport.left))+"px";panel.style.maxHeight=Math.min(maxHeight,Math.max(0,viewport.bottom-viewport.top))+"px";panel.style.minHeight="0";panel.style.overflowY=scroll?"auto":"visible";if(matchWidth)panel.style.width=Math.min(rect.width,Math.max(0,viewport.right-viewport.left))+"px";const initial=floatingPosition(box,panel.getBoundingClientRect(),viewport,placement,gap,getComputedStyle(anchor2).direction);panel.style.maxWidth=Math.min(maxWidth,initial.maxWidth)+"px";panel.style.minWidth=Math.min(minWidth,initial.maxWidth)+"px";panel.style.maxHeight=Math.min(maxHeight,initial.maxHeight)+"px";const result=floatingPosition(box,panel.getBoundingClientRect(),viewport,initial.placement,gap,getComputedStyle(anchor2).direction);let zIndex=parseInt(getComputedStyle(panel).zIndex,10)||0;for(let parent=anchor2;parent;parent=parent.parentElement)zIndex=Math.max(zIndex,(parseInt(getComputedStyle(parent).zIndex,10)||0)+1);panel.style.zIndex=String(zIndex);if(portal&&!nativeInline){panel.style.left=result.left+"px";panel.style.top=result.top+"px"}else{panel.style.left="0px";panel.style.top="0px";const origin=panel.getBoundingClientRect();const scaleX=panel.offsetWidth?origin.width/panel.offsetWidth:1;const scaleY=panel.offsetHeight?origin.height/panel.offsetHeight:1;panel.style.left=(result.left-origin.left)/(scaleX||1)+"px";panel.style.top=(result.top-origin.top)/(scaleY||1)+"px"}panel.setAttribute("data-cs-placement",result.placement);panel.scrollLeft=scrollLeft;panel.scrollTop=scrollTop;positionedScroll={left:panel.scrollLeft,top:panel.scrollTop};owned=readGeometry()};const schedule=()=>{if(frame==null)frame=requestAnimationFrame(position)};schedulePosition.current=schedule;position();const onScroll=event=>{if(event.target===panel&&positionedScroll&&panel.scrollLeft===positionedScroll.left&&panel.scrollTop===positionedScroll.top)return;schedule()};const resize=new ResizeObserver(schedule);resize.observe(anchor);resize.observe(panel);const styleObserver=new MutationObserver(()=>{if(captureCallerStyles())schedule()});styleObserver.observe(panel,{attributes:true,attributeFilter:["style"]});window.addEventListener("resize",schedule);window.addEventListener("scroll",onScroll,true);window.visualViewport?.addEventListener("resize",schedule);window.visualViewport?.addEventListener("scroll",schedule);return()=>{captureCallerStyles();styleObserver.disconnect();resize.disconnect();if(frame!=null)cancelAnimationFrame(frame);if(schedulePosition.current===schedule)schedulePosition.current=()=>{};window.removeEventListener("resize",schedule);window.removeEventListener("scroll",onScroll,true);window.visualViewport?.removeEventListener("resize",schedule);window.visualViewport?.removeEventListener("scroll",schedule);for(const[name,[value,priority]]of before){if(value)panel.style.setProperty(name,value,priority);else panel.style.removeProperty(name)}if(priorPlacement==null)panel.removeAttribute("data-cs-placement");else panel.setAttribute("data-cs-placement",priorPlacement)}},[open,ready,activeHost,portal,nativeInline,anchorRef,panelRef,placement,gap,matchWidth,scroll,point?.x,point?.y,identity]);React.useEffect(()=>{if(!open||!ready||!manageTabOrder)return;const restoreTimers=new Map;const onTab=event=>{const manager=getOverlayManager();const panel=panelRef.current;if(event.key!=="Tab"||event.defaultPrevented||event.isComposing||event.keyCode===229||manager.topDismissible()?.panelEl!==panel)return;const controls=manager.focusOrder({backwards:event.shiftKey});const index=controls.indexOf(document.activeElement);if(index<0)return;const next=index+(event.shiftKey?-1:1);const target=controls[next]||(manager.activeModal()?controls[(next+controls.length)%controls.length]:null);const native=manager.focusOrder({backwards:event.shiftKey,logical:false});const nativeIndex=native.indexOf(document.activeElement);const nativeTarget=native[nativeIndex+(event.shiftKey?-1:1)]||null;if(target===nativeTarget&&!manager.activeModal())return;if(target){event.preventDefault();target.focus()}else if(manager.containsOwned(panel,event.target)){const stops=native.filter(el=>manager.containsOwned(panel,el));const prior=stops.map(el=>[el,el.getAttribute("tabindex")]);for(const el of stops)el.tabIndex=-1;const anchor=options.current.getTabAnchor?.()||anchorElement();const anchorControl=native.find(el=>el===anchor||anchor?.contains(el));anchorControl?.focus();const restore=()=>{for(const[el,value]of prior)if(el.isConnected&&el.getAttribute("tabindex")==="-1"){if(value==null)el.removeAttribute("tabindex");else el.setAttribute("tabindex",value)}};const timer=setTimeout(()=>{restore();restoreTimers.delete(timer)},0);restoreTimers.set(timer,restore)}};document.addEventListener("keydown",onTab);return()=>{document.removeEventListener("keydown",onTab);for(const[timer,restore]of restoreTimers){clearTimeout(timer);restore()}}},[open,ready,manageTabOrder,panelRef,boundaryRef,identity]);const surfaceKey=React.useMemo(()=>({portal,host:activeHost,identity}),[portal,activeHost,identity]);return{ready,surfaceKey,contains:node=>Boolean(node&&(boundaryRef.current?.contains(node)||getOverlayManager().containsOwned(panelRef.current,node))),render:node=>portal?host?createPortal(node,host):null:node}}Object.assign(__ds_scope,{useFloatingPanel})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/floating-panel.js",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const AIDisclosureBadge=React.forwardRef(function AIDisclosureBadge2({portal=true,placement,controlRef,label,details,lang,sources=[],className,rootProps},forwardedRef){const floatingRef=React.useRef(null);const mergedControlRef=useComposedRefs(controlRef);const[ref,L,localeMessages]=useLang(lang);const t=makeT("AIDisclosureBadge",L,localeMessages);const[open,setOpen]=React.useState(false);const panel=React.useRef(null);const mergedNativeRef=useComposedRefs(panel,ref,forwardedRef);const floating=useFloatingPanel({open,anchorRef:panel,panelRef:floatingRef,portal,placement:placement??"bottom-start",gap:8,getAnchor:()=>panel.current?.querySelector(".cs-ai-disclosure__badge"),lang});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"popover",panelRef:floatingRef,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(false)});const panelId=React.useId();const sourceList=(sources||[]).filter(Boolean);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("span",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-ai-disclosure",className)},rootProps,[])},React.createElement("button",{type:"button",className:"cs-ai-disclosure__badge","aria-expanded":open,"aria-controls":open?panelId:void 0,onClick:()=>setOpen(v=>!v),ref:mergedControlRef},label??t("label")),open?floating.render(React.createElement("span",{ref:floatingRef,id:panelId,role:"status",className:"cs-ai-disclosure__panel"},React.createElement("span",{className:"cs-ai-disclosure__details"},details??t("details")),sourceList.length?React.createElement("span",{className:"cs-ai-disclosure__sources"},t("sources"),": ",sourceList.join(", ")):null)):null))});AIDisclosureBadge.displayName="AIDisclosureBadge";Object.assign(__ds_scope,{AIDisclosureBadge})})()}catch(e){__ds_ns.__errors.push({path:"components/ai/AIDisclosureBadge.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const FloatingActionButton=React.forwardRef(function FloatingActionButton2({portal=true,placement,controlRef,icon,label,actions=[],onClick,position="fixed",className,rootProps},forwardedRef){const floatingRef=React.useRef(null);const mergedControlRef=useComposedRefs(controlRef);const[open,setOpen]=React.useState(false);const panel=React.useRef(null);const mergedNativeRef=useComposedRefs(panel,forwardedRef);const floating=useFloatingPanel({open:open&&actions.length>0,anchorRef:panel,panelRef:floatingRef,portal,placement:placement??"top-end",gap:10,tabOrder:"before",getAnchor:()=>panel.current?.querySelector(".cs-fab__main")});const{scope}=useOverlayLayer({open:open&&actions.length>0&&floating.ready,kind:"dropdown",panelRef:floatingRef,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(false)});const main=()=>{if(actions.length)setOpen(o=>!o);else onClick&&onClick()};return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-fab",position==="static"&&"cs-fab--static",className)},rootProps,[])},open&&actions.length?floating.render(React.createElement("div",{ref:floatingRef,className:cx("cs-fab__dial",position==="static"&&"cs-fab__dial--static")},actions.map((a,i)=>React.createElement("button",{key:i,type:"button",className:"cs-fab__mini","aria-label":a.label,title:a.label,onClick:()=>{setOpen(false);a.onSelect&&a.onSelect()}},a.icon)))):null,React.createElement("button",{type:"button",className:"cs-fab__main","aria-label":label,"aria-expanded":actions.length?open:void 0,onClick:main,ref:mergedControlRef},icon)))});FloatingActionButton.displayName="FloatingActionButton";Object.assign(__ds_scope,{FloatingActionButton})})()}catch(e){__ds_ns.__errors.push({path:"components/button/FloatingActionButton.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{Icon}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const{useClientLayoutEffect}=__ds_scope;const Image=React.forwardRef(function Image2({src,alt="",ratio,preview=false,fallback,lang,className,...props},forwardedRef){const[load,setLoad]=React.useState({src,state:"loading"});const imgRef=React.useRef(null);const mergedNativeRef=useComposedRefs(imgRef,forwardedRef);if(load.src!==src)setLoad({src,state:"loading"});const state=load.src===src?load.state:"loading";useClientLayoutEffect(()=>{const img=imgRef.current;if(!img||!img.complete||!img.getAttribute("src"))return;if(img.naturalWidth>0){setLoad(cur=>cur.src===src&&cur.state==="ok"?cur:{src,state:"ok"})}},[src]);const[zoom,setZoom]=React.useState(false);React.useEffect(()=>setZoom(false),[src,preview]);const previewOpen=zoom&&preview&&state==="ok";const[ref,L,localeMessages]=useLang(lang);const t=makeT("Image",L,localeMessages);const panel=React.useRef(null);const{scope}=useOverlayLayer({open:previewOpen,kind:"modal",trapFocus:true,panelRef:panel,onEscape:()=>setZoom(false)});const openPreview=()=>setZoom(true);const onPreviewKey=e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault();openPreview()}};const body=state==="error"?React.createElement("span",{className:"cs-image__fallback"},fallback||fallback===0?fallback:React.createElement("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),React.createElement("circle",{cx:"9",cy:"9",r:"2"}),React.createElement("path",{d:"M21 15l-5-5-9 9"}))):React.createElement("img",{...props,ref:mergedNativeRef,key:src,src,alt,onLoad:()=>setLoad({src,state:"ok"}),onError:()=>setLoad({src,state:"error"})});const canPreview=preview&&state==="ok";return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement(React.Fragment,null,React.createElement("span",{ref,className:cx("cs-image",state==="loading"&&"is-loading",canPreview&&"is-zoomable",className),style:ratio?{aspectRatio:ratio}:void 0,onClick:canPreview?openPreview:void 0,onKeyDown:canPreview?onPreviewKey:void 0,role:canPreview?"button":void 0,tabIndex:canPreview?0:void 0,"aria-label":canPreview?t("preview")+(alt?": "+alt:""):void 0},body),previewOpen?React.createElement("span",{ref:panel,tabIndex:-1,className:"cs-image__zoom",role:"dialog","aria-modal":"true","aria-label":alt||t("preview"),onClick:()=>setZoom(false)},React.createElement("img",{src,alt}),React.createElement("button",{type:"button","aria-label":t("close"),onClick:()=>setZoom(false)},React.createElement(Icon,{name:"close",size:"sm",style:{verticalAlign:"middle"}}))):null))});Image.displayName="Image";Object.assign(__ds_scope,{Image})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Image.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const Tooltip=React.forwardRef(function Tooltip2({portal=true,placement,label,children,lang,className,rootProps},forwardedRef){const bubbleRef=React.useRef(null);const mergedNativeRef=useComposedRefs(bubbleRef,forwardedRef);const[ref,L,localeMessages]=useLang(lang);const t=makeT("Tooltip",L,localeMessages);const id=React.useId();const[hovered,setHovered]=React.useState(false);const[focused,setFocused]=React.useState(false);const[dismissed,setDismissed]=React.useState(false);const open=(hovered||focused)&&!dismissed;const floating=useFloatingPanel({open,anchorRef:ref,panelRef:bubbleRef,portal,placement:placement??"top",gap:8,scroll:false,getAnchor:()=>ref.current?.firstElementChild,lang});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"popover",panelRef:bubbleRef,surfaceKey:floating.surfaceKey,restoreFocus:false,onEscape:()=>setDismissed(true)});const child=React.isValidElement(children)&&children.type!==React.Fragment?React.cloneElement(children,{"aria-describedby":[children.props["aria-describedby"],id].filter(Boolean).join(" ")}):React.createElement("span",{tabIndex:0,"aria-describedby":id},children);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("span",{ref,...mergeTargetProps({className:cx("cs-tooltip",className),onMouseEnter:()=>{setHovered(true);setDismissed(false)},onMouseLeave:()=>setHovered(false),onFocus:()=>{setFocused(true);setDismissed(false)},onBlur:e=>{if(!floating.contains(e.relatedTarget))setFocused(false)}},rootProps,["data-managed","data-open"]),"data-managed":"","data-open":open?"true":"false"},child,floating.render(React.createElement("span",{id,className:"cs-tooltip__bubble",role:"tooltip",hidden:!open,ref:mergedNativeRef},label??t("label")))))});Tooltip.displayName="Tooltip";Object.assign(__ds_scope,{Tooltip})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Tooltip.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{Icon}=__ds_scope;const{cx}=__ds_scope;const{overlaySurfaceClass,useOverlaySurface}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{hasDismiss,notifyClosed}=__ds_scope;const Dialog=React.forwardRef(function Dialog2({open,title,children,actions,onClose,onOpenChange,className,closeLabel,lang,...props},forwardedRef){const baseId=React.useId();const titleId=baseId+"-title";const bodyId=children==null?void 0:baseId+"-body";const[ref,L,localeMessages]=useLang(lang);const panel=React.useRef(null);const mergedNativeRef=useComposedRefs(panel,forwardedRef);const backdrop=React.useRef(null);const material=overlaySurfaceClass(className);const surface=useOverlaySurface(!!open,panel,material);const closeRef=React.useRef(null);closeRef.current=()=>notifyClosed(onOpenChange,onClose);const{scope}=useOverlayLayer({open:!!open,kind:"modal",trapFocus:true,onEscape:()=>closeRef.current&&closeRef.current(),panelRef:panel,backdropRef:backdrop});const cl=closeLabel!=null?closeLabel:makeT("Dialog",L,localeMessages)("close");if(!open)return null;return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref,className:"cs-dialog-layer"},React.createElement("div",{ref:backdrop,className:"cs-dialog__overlay",onClick:()=>closeRef.current(),"aria-hidden":"true"}),material?React.createElement("div",{ref:surface,className:cx("cs-overlay-surface",material),"aria-hidden":"true"}):null,React.createElement("section",{...props,ref:mergedNativeRef,"data-cs-overlay-material":material||void 0,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":titleId,"aria-describedby":Object.prototype.hasOwnProperty.call(props,"aria-describedby")?props["aria-describedby"]||void 0:bodyId,className:cx("cs-dialog",className)},React.createElement("header",{className:"cs-dialog__header"},React.createElement("h2",{id:titleId,className:"cs-dialog__title"},title),hasDismiss(onOpenChange,onClose)?React.createElement("button",{type:"button",className:"cs-button cs-button--ghost cs-button--sm",onClick:()=>closeRef.current(),"aria-label":cl},React.createElement(Icon,{name:"close",size:"sm"})):null),React.createElement("div",{id:bodyId,className:"cs-dialog__body"},children),actions||actions===0?React.createElement("footer",{className:"cs-dialog__actions"},actions):null)))});Dialog.displayName="Dialog";Object.assign(__ds_scope,{Dialog})})()}catch(e){__ds_ns.__errors.push({path:"components/dialog/Dialog.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const{hasDismiss,notifyClosed}=__ds_scope;const PATHS={default:"M12 8h.01M11 12h1v4h1 M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z",success:"M4 12.5l5 5 11-11",danger:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z M9 9l6 6 M15 9l-6 6"};function DefaultIcon({variant}){return React.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:PATHS[variant]||PATHS.default}))}const ToastStack=React.forwardRef(function ToastStack2({children,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-toast-stack",className)},rootProps,["role","aria-label"]),role:"region","aria-label":makeT("Toast",L,localeMessages)("notifications")},children)});ToastStack.displayName="ToastStack";const Toast=React.forwardRef(function Toast2({variant="default",title,icon,onClose,onOpenChange,lang,children,className,...props},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const{scope}=useOverlayLayer({open:true,kind:"toast",panelRef:ref,restoreFocus:false});return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:mergedNativeRef,className:cx("cs-toast",`cs-toast--${variant}`,className),role:"status",...props},React.createElement("span",{className:"cs-toast__icon","aria-hidden":"true"},icon??React.createElement(DefaultIcon,{variant})),React.createElement("div",null,title||title===0?React.createElement("div",{className:"cs-toast__title"},title):null,children||children===0?React.createElement("div",{className:"cs-toast__body"},children):null),hasDismiss(onOpenChange,onClose)?React.createElement("button",{type:"button",className:"cs-toast__close","aria-label":makeT("Toast",L,localeMessages)("dismiss"),onClick:()=>notifyClosed(onOpenChange,onClose)},React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},React.createElement("path",{d:"M6 6l12 12M18 6L6 18"}))):null))});Toast.displayName="Toast";Object.assign(__ds_scope,{ToastStack,Toast})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/Toast.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const EMPTY_PATH=[];const Cascader=React.forwardRef(function Cascader2({portal=true,placement,controlRef,nodes=[],value=EMPTY_PATH,onChange,placeholder,label,"aria-labelledby":ariaLabelledBy,disabled=false,lang,className,id,description,error,required=false,rootProps,controlProps},forwardedRef){const floatingRef=React.useRef(null);const mergedControlRef=useComposedRefs(controlRef);const[requestedOpen,setOpen]=React.useState(false);const open=requestedOpen&&!disabled;React.useEffect(()=>{if(disabled)setOpen(false)},[disabled]);const[path,setPath]=React.useState(value);const wrap=React.useRef(null);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(wrap,ref,forwardedRef);const t=makeT("Cascader",L,localeMessages);const ph=placeholder!=null?placeholder:t("placeholder");const requiredDescription=required?makeT("Form",L,localeMessages)("required"):void 0;const control=useFieldAssociation({id:controlProps?.id??id,"aria-label":controlProps?.["aria-label"]??(controlProps?.["aria-labelledby"]||ariaLabelledBy?void 0:label),"aria-labelledby":controlProps?.["aria-labelledby"]??ariaLabelledBy,"aria-describedby":controlProps?.["aria-describedby"],"aria-invalid":controlProps?.["aria-invalid"]},{fallbackLabel:label,description,error,requiredDescription});const valueKey=Array.isArray(value)?value.join("\0"):"";React.useEffect(()=>{setPath(Array.isArray(value)?value:EMPTY_PATH)},[valueKey]);const floating=useFloatingPanel({open,anchorRef:wrap,panelRef:floatingRef,portal,placement:placement??"bottom-start",gap:6,getAnchor:()=>wrap.current?.querySelector(":scope > button"),lang});const{manager,scope}=useOverlayLayer({open:open&&floating.ready,kind:"dropdown",panelRef:floatingRef,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(false)});React.useEffect(()=>{if(!open)return;const d=e=>{if(!floating.contains(e.target))setOpen(false)};const k=e=>{if(manager.topDismissible()?.panelEl!==floatingRef.current)return;if(e.defaultPrevented||e.isComposing||e.keyCode===229)return;if(!floating.contains(e.target))return;const opts=[...floatingRef.current.querySelectorAll('[role="option"]')];if(!opts.length)return;const active=document.activeElement;const idx=opts.indexOf(active);if(e.key==="ArrowDown"){e.preventDefault();(opts[idx<0?0:Math.min(opts.length-1,idx+1)]||opts[0]).focus()}else if(e.key==="ArrowUp"){e.preventDefault();(opts[idx<0?opts.length-1:Math.max(0,idx-1)]||opts[0]).focus()}else if(e.key==="Home"){e.preventDefault();opts[0].focus()}else if(e.key==="End"){e.preventDefault();opts[opts.length-1].focus()}else if(e.key==="ArrowRight"&&idx>=0){active.click&&active.click()}else if(e.key==="ArrowLeft"){e.preventDefault();if(path.length){const columns=[...floatingRef.current.querySelectorAll('[role="listbox"]')];const column=active?.closest('[role="listbox"]');const depth=columns.indexOf(column);const parentDepth=depth>0?depth-1:Math.max(0,path.length-1);const parent=columns[parentDepth]?.querySelector('[role="option"][aria-selected="true"]');parent?.focus();setPath(path.slice(0,parentDepth))}else{setOpen(false);const field=wrap.current.querySelector(".cs-treeselect__field");field&&field.focus&&field.focus()}}};document.addEventListener("mousedown",d);document.addEventListener("keydown",k);return()=>{document.removeEventListener("mousedown",d);document.removeEventListener("keydown",k)}},[open,path]);const cols=[];let level=nodes;for(let i=0;level&&level.length;i++){cols.push(level);const pick=level.find(n=>n.key===path[i]);level=pick&&pick.children}const labels=[];{let lv=nodes;for(const k of value){const n=(lv||[]).find(x=>x.key===k);if(!n)break;labels.push(n.label);lv=n.children}}return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-cascader",className)},rootProps)},React.createElement("button",{...mergeTargetProps({...control,type:"button",className:"cs-treeselect__field",disabled,"aria-haspopup":"listbox","aria-expanded":open,onClick:()=>setOpen(o=>!o),onKeyDown:e=>{if(e.defaultPrevented||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;if(open&&e.key==="ArrowDown")return;if(e.key==="ArrowDown"||e.key==="Enter"||e.key===" "){e.preventDefault();setOpen(true)}}},controlProps,["id","role","type","name","value","defaultValue","disabled","required","aria-required","aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-haspopup","aria-expanded","aria-controls","aria-activedescendant"]),ref:mergedControlRef},React.createElement("span",{className:labels.length?void 0:"ph"},labels.length?labels.map((label2,index)=>React.createElement(React.Fragment,{key:index},index?React.createElement(React.Fragment,null," ",React.createElement("span",{"aria-hidden":"true"},"/")," "):null,label2)):ph),React.createElement("span",{"aria-hidden":"true"},"▾")),open?floating.render(React.createElement("div",{ref:floatingRef,className:"cs-cascader__pop"},cols.map((col,i)=>React.createElement("ul",{key:i,role:"listbox","aria-labelledby":control["aria-labelledby"]||control.id,className:"cs-cascader__col"},col.map(n=>React.createElement("li",{key:n.key,role:"none"},React.createElement("button",{type:"button",role:"option","aria-selected":path[i]===n.key,className:cx("cs-cascader__opt",path[i]===n.key&&"on"),"data-cs-focusable":"",onClick:()=>{const next=[...path.slice(0,i),n.key];setPath(next);if(!(n.children&&n.children.length)){onChange&&onChange(next);setOpen(false)}}},n.label,n.children&&n.children.length?React.createElement("span",{"aria-hidden":"true"}," ›"):null))))))):null,fieldMessages(control,description,error,requiredDescription)))});Cascader.displayName="Cascader";Object.assign(__ds_scope,{Cascader})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Cascader.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const SWATCHES=["#F4BA17","#C77B4A","#E0632B","#C43D1F","#7A9B57","#3E5A2E","#4E8E9B","#2E5E7E","#BFB29B","#45210E"];const ColorPicker=React.forwardRef(function ColorPicker2({portal=true,placement,controlRef,value="#F4BA17",onChange,swatches=SWATCHES,label,"aria-labelledby":ariaLabelledBy,lang,className,id,description,error,required=false,rootProps,controlProps},forwardedRef){const floatingRef=React.useRef(null);const mergedControlRef=useComposedRefs(controlRef);const[open,setOpen]=React.useState(false);const[hex,setHex]=React.useState(value);const wrap=React.useRef(null);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(wrap,ref,forwardedRef);const t=makeT("ColorPicker",L,localeMessages);const requiredDescription=required?makeT("Form",L,localeMessages)("required"):void 0;const control=useFieldAssociation({id:controlProps?.id??id,"aria-label":controlProps?.["aria-label"]??(controlProps?.["aria-labelledby"]||ariaLabelledBy?void 0:label?label+": "+value:void 0),"aria-labelledby":controlProps?.["aria-labelledby"]??ariaLabelledBy,"aria-describedby":controlProps?.["aria-describedby"],"aria-invalid":controlProps?.["aria-invalid"]},{fallbackLabel:(label||t("label"))+": "+value,description,error,requiredDescription});React.useEffect(()=>setHex(value),[value]);const floating=useFloatingPanel({open,anchorRef:wrap,panelRef:floatingRef,portal,placement:placement??"bottom-start",gap:6,getAnchor:()=>wrap.current?.querySelector(":scope > button"),lang});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"popover",panelRef:floatingRef,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(false)});React.useEffect(()=>{if(!open)return;const d=e=>{if(!floating.contains(e.target))setOpen(false)};document.addEventListener("mousedown",d);return()=>{document.removeEventListener("mousedown",d)}},[open]);const commit=v=>{if(/^#[0-9a-fA-F]{6}$/.test(v)){onChange&&onChange(v)}};return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("span",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-colorpicker",className)},rootProps)},React.createElement("button",{...mergeTargetProps({...control,type:"button",className:"cs-colorpicker__field","aria-expanded":open,onClick:()=>setOpen(o=>!o)},controlProps,["id","role","type","name","value","defaultValue","disabled","required","aria-required","aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-haspopup","aria-expanded","aria-controls","aria-activedescendant"]),ref:mergedControlRef},React.createElement("i",{style:{background:value}}),React.createElement("code",null,value)),open?floating.render(React.createElement("span",{ref:floatingRef,className:"cs-colorpicker__pop",role:"dialog","aria-label":control["aria-labelledby"]?void 0:controlProps?.["aria-label"]||label||t("label"),"aria-labelledby":control["aria-labelledby"]},React.createElement("span",{className:"cs-colorpicker__grid"},swatches.map(s=>React.createElement("button",{key:s,type:"button","aria-label":s,"aria-pressed":s.toLowerCase()===String(value).toLowerCase(),style:{background:s},className:s.toLowerCase()===String(value).toLowerCase()?"on":void 0,onClick:()=>{onChange&&onChange(s);setOpen(false)}}))),React.createElement("span",{className:"cs-colorpicker__hex"},React.createElement("input",{value:hex,"aria-label":t("hex"),onChange:e=>setHex(e.target.value),onKeyDown:e=>{if(e.nativeEvent.isComposing||e.keyCode===229)return;if(e.key==="Enter"){e.preventDefault();commit(hex);setOpen(false)}},onBlur:()=>commit(hex)})))):null,fieldMessages(control,description,error,requiredDescription)))});ColorPicker.displayName="ColorPicker";Object.assign(__ds_scope,{ColorPicker})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/ColorPicker.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const Combobox=React.forwardRef(function Combobox2({portal=true,placement,controlRef,options=[],value,onChange,placeholder,label,"aria-labelledby":ariaLabelledBy,disabled=false,lang,className,rootProps,controlProps,description,error,required=false},forwardedRef){const floatingRef=React.useRef(null);const mergedControlRef=useComposedRefs(controlRef);const[requestedOpen,setOpen]=React.useState(false);const open=requestedOpen&&!disabled;React.useEffect(()=>{if(disabled)setOpen(false)},[disabled]);const[q,setQ]=React.useState("");const[hl,setHl]=React.useState(0);const id=React.useId();const wrapRef=React.useRef(null);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(wrapRef,ref,forwardedRef);const t=makeT("Combobox",L,localeMessages);const ph=placeholder!=null?placeholder:t("placeholder");const sel=options.find(o=>o.value===value)||null;const needle=q.trim().toLowerCase();const shown=needle?options.filter(o=>String(o.label).toLowerCase().includes(needle)):options;const floating=useFloatingPanel({open,anchorRef:wrapRef,panelRef:floatingRef,portal,placement:placement??"bottom-start",gap:6,getAnchor:()=>wrapRef.current?.querySelector(":scope > input"),matchWidth:true,lang});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"dropdown",panelRef:floatingRef,surfaceKey:floating.surfaceKey,restoreFocus:false,onEscape:()=>setOpen(false)});React.useEffect(()=>{if(!open)return;const d=e=>{if(!floating.contains(e.target))setOpen(false)};document.addEventListener("mousedown",d);return()=>document.removeEventListener("mousedown",d)},[open]);const pick=o=>{onChange&&onChange(o.value);setQ("");setOpen(false)};const key=e=>{if(e.nativeEvent.isComposing||e.keyCode===229)return;if(e.key==="ArrowDown"){e.preventDefault();setOpen(true);setHl(h=>shown.length?Math.min(shown.length-1,h+1):0)}else if(e.key==="ArrowUp"){e.preventDefault();setHl(h=>Math.max(0,h-1))}else if(e.key==="Enter"){if(open&&shown[hl]){e.preventDefault();pick(shown[hl])}}};const control=useFieldAssociation(mergeTargetProps({role:"combobox","aria-expanded":open,"aria-controls":open?id:void 0,"aria-autocomplete":"list","aria-label":label,"aria-labelledby":ariaLabelledBy,"aria-activedescendant":open&&shown[hl]?id+"-"+hl:void 0,disabled,placeholder:ph,value:open?q:sel?sel.label:q,onClick:()=>{if(!disabled)setOpen(true)},onFocus:()=>{setOpen(true);setHl(0)},onChange:e=>{setQ(e.target.value);setOpen(true);setHl(0)},onKeyDown:key},controlProps,["type","role","value","defaultValue","onChange","disabled","name","required","aria-haspopup","aria-expanded","aria-controls","aria-autocomplete","aria-activedescendant"]),{fallbackLabel:t("label"),requiredSupported:true,description,error,required});return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-combobox",className),onBlur:e=>{if(!floating.contains(e.relatedTarget))setOpen(false)}},rootProps)},React.createElement("input",{...control,ref:mergedControlRef}),fieldMessages(control,description,error),React.createElement("span",{className:"cs-combobox__caret","aria-hidden":"true"},"▾"),open?floating.render(React.createElement("div",{ref:floatingRef,className:"cs-combobox__popup"},React.createElement("ul",{className:"cs-combobox__list",role:"listbox",id,"aria-label":label||(ariaLabelledBy?void 0:t("label")),"aria-labelledby":control["aria-labelledby"]},shown.map((o,i)=>React.createElement("li",{key:o.value,id:id+"-"+i,role:"option","aria-selected":o.value===value,className:cx("cs-combobox__opt",i===hl&&"hl"),onMouseEnter:()=>setHl(i),onMouseDown:e=>{e.preventDefault();pick(o)}},o.label))),!shown.length?React.createElement("div",{role:"status",className:"cs-combobox__empty"},t("empty")):null)):null))});Combobox.displayName="Combobox";Object.assign(__ds_scope,{Combobox})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Combobox.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{makeT,useLang,formatDate}=__ds_scope;const{Calendar}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const CAL_ICON=React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("rect",{x:"3",y:"5",width:"18",height:"16",rx:"2"}),React.createElement("path",{d:"M8 3v4M16 3v4M3 10h18"}));const DatePicker=React.forwardRef(function DatePicker2({portal=true,placement,controlRef,value,onChange,placeholder,label,"aria-labelledby":ariaLabelledBy,disabled=false,lang,className,rootProps,controlProps,description,error,required=false},forwardedRef){const mergedControlRef=useComposedRefs(controlRef);const[requestedOpen,setOpen]=React.useState(false);const open=requestedOpen&&!disabled;React.useEffect(()=>{if(disabled)setOpen(false)},[disabled]);const wrap=React.useRef(null);const popup=React.useRef(null);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(wrap,ref,forwardedRef);const t=makeT("DatePicker",L,localeMessages);const hasValue=Boolean(value)||value===0;const ph=placeholder!=null?placeholder:t("placeholder");const dialogLabel=label?.trim()||placeholder?.trim()||t("placeholder");const floating=useFloatingPanel({open,anchorRef:wrap,panelRef:popup,portal,placement:placement??"bottom-start",gap:6,getAnchor:()=>wrap.current?.querySelector(":scope > button"),lang});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"popover",panelRef:popup,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(false)});React.useEffect(()=>{if(!open||!floating.ready)return;const day=popup.current?.querySelector('[data-day][aria-pressed="true"]')||popup.current?.querySelector('[data-day][aria-current="date"]')||popup.current?.querySelector("button[data-day]");day?.focus();const d=e=>{if(!floating.contains(e.target))setOpen(false)};document.addEventListener("mousedown",d);return()=>{document.removeEventListener("mousedown",d)}},[open,floating.ready,floating.surfaceKey]);const requiredDescription=required?makeT("Form",L,localeMessages)("required"):void 0;const control=useFieldAssociation(mergeTargetProps({type:"button",className:"cs-datepicker__field",disabled,"aria-haspopup":"dialog","aria-expanded":open,"aria-label":label,"aria-labelledby":ariaLabelledBy,onClick:event=>{if(!open)event.currentTarget.focus();setOpen(o=>!o)}},controlProps,["role","aria-required","type","disabled","name","value","aria-haspopup","aria-expanded","aria-controls"]),{description,error,requiredDescription});return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-datepicker",className)},rootProps)},React.createElement("button",{...control,ref:mergedControlRef},CAL_ICON,React.createElement("span",{className:hasValue?void 0:"ph"},hasValue?formatDate(value,L):ph)),fieldMessages(control,description,error,requiredDescription),open?floating.render(React.createElement("div",{ref:popup,className:"cs-datepicker__pop",role:"dialog","aria-label":label?.trim()?dialogLabel:ariaLabelledBy?void 0:dialogLabel,"aria-labelledby":control["aria-labelledby"]},React.createElement(Calendar,{value,lang:L,onChange:d=>{onChange&&onChange(d);setOpen(false)}}))):null))});DatePicker.displayName="DatePicker";Object.assign(__ds_scope,{DatePicker})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/DatePicker.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const PEN=React.createElement("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M4 20l4.5-.9L20 7.6a2 2 0 0 0-2.8-2.8L5.7 16.3 4 20z"}));const InlineEdit=React.forwardRef(function InlineEdit2({controlRef,value,defaultValue="",onChange,label,lang,className,rootProps},forwardedRef){const mergedControlRef=useComposedRefs(controlRef);const[inner,setInner]=React.useState(defaultValue);const val=value!=null?value:inner;const[edit,setEdit]=React.useState(false);const[draft,setDraft]=React.useState(val);const cancellingRef=React.useRef(false);const commit=()=>{if(cancellingRef.current){cancellingRef.current=false;return}setEdit(false);if(draft!==val){if(value==null)setInner(draft);onChange&&onChange(draft)}};const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("InlineEdit",L,localeMessages);const{scope}=useOverlayLayer({open:edit,kind:"popover",panelRef:ref,restoreFocus:false,onEscape:()=>{cancellingRef.current=true;setDraft(val);setEdit(false);requestAnimationFrame(()=>ref.current?.querySelector("button")?.focus())}});return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("span",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-inline-edit",className)},rootProps,[])},edit?React.createElement("input",{autoFocus:true,value:draft,"aria-label":label||t("edit"),onChange:e=>setDraft(e.target.value),onBlur:commit,onKeyDown:e=>{if(!e.nativeEvent.isComposing&&e.keyCode!==229&&e.key==="Enter")commit()},ref:mergedControlRef}):React.createElement("button",{type:"button",className:"cs-inline-edit__view","aria-label":t("edit")+(label?": "+label:""),onClick:()=>{cancellingRef.current=false;setDraft(val);setEdit(true)}},React.createElement("span",{className:val?void 0:"ph"},val||t("empty")),PEN)))});InlineEdit.displayName="InlineEdit";Object.assign(__ds_scope,{InlineEdit})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/InlineEdit.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const Mentions=React.forwardRef(function Mentions2({portal=true,placement,value,defaultValue="",onChange,users=[],placeholder,rows=3,lang,className,"aria-label":ariaLabel,rootProps},forwardedRef){const floatingRef=React.useRef(null);const mergedNativeRef=useComposedRefs(forwardedRef);const[inner,setInner]=React.useState(defaultValue);const val=value!=null?value:inner;const set=v=>{if(value==null)setInner(v);onChange&&onChange(v)};const[q,setQ]=React.useState(null);const[activeIndex,setActiveIndex]=React.useState(0);const caretRef=React.useRef(null);const listId=React.useId();const[ref,L,localeMessages]=useLang(lang);const t=makeT("Mentions",L,localeMessages);const ph=placeholder!=null?placeholder:t("placeholder");const hits=q==null?[]:users.filter(u=>u.toLowerCase().includes(q)).slice(0,6);const open=hits.length>0;const floating=useFloatingPanel({open,anchorRef:ref,panelRef:floatingRef,portal,placement:placement??"bottom-start",gap:0,getAnchor:()=>ref.current?.querySelector(":scope > textarea"),lang});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"dropdown",panelRef:floatingRef,surfaceKey:floating.surfaceKey,restoreFocus:false,onEscape:()=>setQ(null)});React.useEffect(()=>{if(!open)return;const onDoc=e=>{if(!floating.contains(e.target))setQ(null)};document.addEventListener("mousedown",onDoc);return()=>document.removeEventListener("mousedown",onDoc)},[open]);React.useEffect(()=>{setActiveIndex(i=>hits.length?Math.min(i,hits.length-1):0)},[q,users]);const onInput=e=>{const v=e.target.value;set(v);const caret=typeof e.target.selectionStart==="number"?e.target.selectionStart:v.length;caretRef.current=caret;const head=v.slice(0,caret);const m=/(^|\s)@(\w*)$/.exec(head);const next=m?m[2].toLowerCase():null;setQ(next);if(next!=null)setActiveIndex(0)};const pick=u=>{const caret=typeof caretRef.current==="number"?caretRef.current:val.length;const head=val.slice(0,caret);const tail=val.slice(caret);set(head.replace(/(^|\s)@\w*$/,"$1@"+u+" ")+tail);setQ(null)};const optionId=i=>listId+"-opt-"+i;const onKeyDown=e=>{if(e.nativeEvent.isComposing||e.keyCode===229)return;if(!open)return;if(e.key==="ArrowDown"){e.preventDefault();setActiveIndex(i=>Math.min(hits.length-1,i+1))}else if(e.key==="ArrowUp"){e.preventDefault();setActiveIndex(i=>Math.max(0,i-1))}else if(e.key==="Enter"){if(hits[activeIndex]){e.preventDefault();pick(hits[activeIndex])}}};return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("span",{ref,...mergeTargetProps({"className":cx("cs-mentions",className),"onBlur":e=>{if(!floating.contains(e.relatedTarget))setQ(null)}},rootProps,[])},React.createElement("textarea",{className:"cs-field__control",rows,value:val,placeholder:ph,"aria-label":ariaLabel||ph,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":open?listId:void 0,"aria-activedescendant":open&&hits[activeIndex]?optionId(activeIndex):void 0,onChange:onInput,onKeyDown,ref:mergedNativeRef}),open?floating.render(React.createElement("span",{ref:floatingRef,className:"cs-mentions__pop",role:"listbox",id:listId},hits.map((u,i)=>React.createElement("button",{key:u,type:"button",id:optionId(i),role:"option",tabIndex:-1,"aria-selected":i===activeIndex,className:cx(i===activeIndex&&"hl"),onMouseEnter:()=>setActiveIndex(i),onMouseDown:e=>{e.preventDefault();pick(u)}},"@",u)))):null))});Mentions.displayName="Mentions";Object.assign(__ds_scope,{Mentions})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Mentions.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const{makeT,useLang}=__ds_scope;const{Tree}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const TreeSelect=React.forwardRef(function TreeSelect2({portal=true,placement,controlRef,nodes=[],value,onChange,placeholder,label,"aria-labelledby":ariaLabelledBy,disabled=false,lang,className,id,description,error,required=false,rootProps,controlProps},forwardedRef){const floatingRef=React.useRef(null);const mergedControlRef=useComposedRefs(controlRef);const[requestedOpen,setOpen]=React.useState(false);const open=requestedOpen&&!disabled;React.useEffect(()=>{if(disabled)setOpen(false)},[disabled]);const wrap=React.useRef(null);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(wrap,ref,forwardedRef);const t=makeT("TreeSelect",L,localeMessages);const ph=placeholder!=null?placeholder:t("placeholder");const requiredDescription=required?makeT("Form",L,localeMessages)("required"):void 0;const control=useFieldAssociation({id:controlProps?.id??id,"aria-label":controlProps?.["aria-label"]??(controlProps?.["aria-labelledby"]||ariaLabelledBy?void 0:label),"aria-labelledby":controlProps?.["aria-labelledby"]??ariaLabelledBy,"aria-describedby":controlProps?.["aria-describedby"],"aria-invalid":controlProps?.["aria-invalid"]},{fallbackLabel:label,description,error,requiredDescription});const find=ns=>{for(const n of ns){if(n.key===value)return n;const c=n.children&&find(n.children);if(c)return c}return null};const sel=find(nodes);const floating=useFloatingPanel({open,anchorRef:wrap,panelRef:floatingRef,portal,placement:placement??"bottom-start",gap:6,getAnchor:()=>wrap.current?.querySelector(":scope > button"),lang});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"popover",panelRef:floatingRef,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(false)});React.useEffect(()=>{if(!open)return;const d=e=>{if(!floating.contains(e.target))setOpen(false)};document.addEventListener("mousedown",d);return()=>{document.removeEventListener("mousedown",d)}},[open]);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-treeselect",className)},rootProps)},React.createElement("button",{...mergeTargetProps({...control,type:"button",className:"cs-treeselect__field",disabled,"aria-haspopup":"tree","aria-expanded":open,onClick:()=>setOpen(o=>!o)},controlProps,["id","role","type","name","value","defaultValue","disabled","required","aria-required","aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-haspopup","aria-expanded","aria-controls","aria-activedescendant"]),ref:mergedControlRef},React.createElement("span",{className:sel?void 0:"ph"},sel?sel.label:ph),React.createElement("span",{"aria-hidden":"true"},"▾")),open?floating.render(React.createElement("div",{ref:floatingRef,className:"cs-treeselect__pop"},React.createElement(Tree,{"aria-label":control["aria-label"]||(control["aria-labelledby"]?void 0:ph),"aria-labelledby":control["aria-labelledby"],nodes,selected:value,defaultOpen:true,lang:L,onSelect:(k,n)=>{if(!(n.children&&n.children.length)){onChange&&onChange(k,n);setOpen(false)}}}))):null,fieldMessages(control,description,error,requiredDescription)))});TreeSelect.displayName="TreeSelect";Object.assign(__ds_scope,{TreeSelect})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/TreeSelect.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{formatNumber,makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{notifyClosed}=__ds_scope;const CommandPalette=React.forwardRef(function CommandPalette2({controlRef,open,onClose,onOpenChange,placeholder,groups=[],lang,className,rootProps},forwardedRef){const mergedControlRef=useComposedRefs(controlRef);const mergedNativeRef=useComposedRefs(forwardedRef);const[q,setQ]=React.useState("");const panel=React.useRef(null);const closeRef=React.useRef(null);closeRef.current=()=>notifyClosed(onOpenChange,onClose);const{scope}=useOverlayLayer({open:!!open,kind:"modal",trapFocus:true,preferFocusSelector:".cs-cmdk__search input",onEscape:()=>closeRef.current&&closeRef.current(),panelRef:panel});React.useEffect(()=>{if(!open)setQ("")},[open]);const[ref,L,localeMessages]=useLang(lang);const t=makeT("CommandPalette",L,localeMessages);const ph=placeholder!=null?placeholder:t("placeholder");if(!open)return null;const needle=q.trim().toLowerCase();const filteredGroups=groups.map(g=>({...g,items:(g.items||[]).filter(it=>!needle||String(it.label).toLowerCase().includes(needle))}));const resultCount=filteredGroups.reduce((count,group)=>count+group.items.length,0);const resultStatus=resultCount===0?t("empty"):t(resultCount===1?"oneResult":"results").replace("{count}",formatNumber(resultCount,L));return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:el=>{ref.current=el;panel.current=el},className:"cs-cmdk-scrim",onClick:()=>closeRef.current()},React.createElement("div",{...mergeTargetProps({"className":cx("cs-cmdk",className),"onClick":e=>e.stopPropagation()},rootProps,["role","aria-modal","aria-label"]),role:"dialog","aria-modal":"true","aria-label":t("aria"),ref:mergedNativeRef},React.createElement("div",{className:"cs-cmdk__search"},React.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("circle",{cx:"11",cy:"11",r:"7"}),React.createElement("path",{d:"M21 21l-4.3-4.3"})),React.createElement("input",{"aria-label":ph,value:q,onChange:e=>setQ(e.target.value),placeholder:ph,ref:mergedControlRef}),React.createElement("span",{className:"cs-kbd"},t("esc"))),React.createElement("div",{className:"cs-cmdk__list"},React.createElement("div",{className:"cs-cmdk__status",role:"status","aria-live":"polite","aria-atomic":"true"},resultStatus),filteredGroups.map((g,gi)=>{const items=g.items;if(!items.length)return null;return React.createElement(React.Fragment,{key:gi},g.label||g.label===0?React.createElement("div",{className:"cs-cmdk__label"},g.label):null,items.map((it,ii)=>React.createElement("button",{key:ii,type:"button",className:"cs-cmdk__item",onClick:()=>{it.onSelect&&it.onSelect();setQ("");closeRef.current()}},it.icon||it.icon===0?React.createElement("span",{"aria-hidden":"true"},it.icon):null,React.createElement("span",null,it.label),it.shortcut||it.shortcut===0?React.createElement("span",{className:"cs-kbd"},it.shortcut):null)))})))))});CommandPalette.displayName="CommandPalette";Object.assign(__ds_scope,{CommandPalette})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/CommandPalette.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;function match(combo,e){const parts=combo.toLowerCase().split("+").map(part=>part.trim());const key=parts.pop();if(!key||parts.some(part=>!["mod","ctrl","meta","shift","alt"].includes(part)))return false;const has=name=>parts.includes(name);const control=has("mod")?(e.metaKey||e.ctrlKey)&&(!has("ctrl")||e.ctrlKey)&&(!has("meta")||e.metaKey):e.ctrlKey===has("ctrl")&&e.metaKey===has("meta");return control&&e.shiftKey===has("shift")&&e.altKey===has("alt")&&e.key.toLowerCase()===key}const HotKeys=React.forwardRef(function HotKeys2({bindings=[],help=true,children,lang,className,rootProps},forwardedRef){const[show,setShow]=React.useState(false);const[ref,L,localeMessages]=useLang(lang);const t=makeT("HotKeys",L,localeMessages);const panel=React.useRef(null);const mergedNativeRef=useComposedRefs(panel,forwardedRef);const backdrop=React.useRef(null);const{scope}=useOverlayLayer({open:show,kind:"modal",trapFocus:true,panelRef:panel,backdropRef:backdrop,onEscape:()=>setShow(false)});React.useEffect(()=>{const on=e=>{if(e.defaultPrevented||e.isComposing||e.keyCode===229)return;const path=e.composedPath?.()||[e.target];if(path.some(node=>node?.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(node?.tagName)))return;if(help&&e.key==="?"&&!e.ctrlKey&&!e.metaKey&&!e.altKey){if(!show&&[...document.querySelectorAll('[role="dialog"][aria-modal="true"], [role="alertdialog"][aria-modal="true"]')].some(m=>m!==panel.current&&!m.contains(ref.current)))return;setShow(s=>!s);return}for(const b of bindings)if(match(b.keys,e)){e.preventDefault();b.onTrigger&&b.onTrigger();return}};document.addEventListener("keydown",on);return()=>document.removeEventListener("keydown",on)},[bindings,help,show]);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref,...mergeTargetProps({"className":cx("cs-hotkeys",className)},rootProps,[])},children,show?React.createElement("div",{ref:backdrop,className:"cs-hotkeys__sheet",onClick:()=>setShow(false)},React.createElement("div",{ref:mergedNativeRef,tabIndex:-1,className:"cs-hotkeys__card",role:"dialog","aria-modal":"true","aria-label":t("title"),onClick:e=>e.stopPropagation()},React.createElement("b",null,t("title")),React.createElement("ul",null,bindings.map((b,i)=>React.createElement("li",{key:i},React.createElement("span",null,b.description),React.createElement("kbd",{className:"cs-kbd"},b.keys))),React.createElement("li",null,React.createElement("span",null,t("toggle")),React.createElement("kbd",{className:"cs-kbd"},"?"))))):null))});HotKeys.displayName="HotKeys";Object.assign(__ds_scope,{HotKeys})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/HotKeys.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext,focusableSelector}=__ds_scope;const{cx}=__ds_scope;const Menu=React.forwardRef(function Menu2({portal=true,placement,trigger,children,align="start",open:controlledOpen,onOpenChange,lang,className,rootProps},forwardedRef){const[uOpen,setUOpen]=React.useState(false);const open=controlledOpen!=null?controlledOpen:uOpen;const set=v=>{if(controlledOpen==null)setUOpen(v);onOpenChange?.(v)};const[ref,L,localeMessages]=useLang(lang);const t=makeT("Menu",L,localeMessages);const triggerRef=React.useRef(null);const triggerSupportsRef=React.isValidElement(trigger)&&(typeof trigger.type==="string"||Number.parseInt(React.version,10)>=19||trigger.type?.$$typeof===Symbol.for("react.forward_ref"));const originalTriggerRef=triggerSupportsRef?Number.parseInt(React.version,10)>=19?trigger.props.ref:trigger.ref:void 0;const mergedTriggerRef=useComposedRefs(triggerRef,originalTriggerRef);const listRef=React.useRef(null);const mergedNativeRef=useComposedRefs(listRef,forwardedRef);const openingEdge=React.useRef("first");const search=React.useRef({text:"",time:0});const enabledItems=()=>listRef.current?[...listRef.current.querySelectorAll('[role="menuitem"]:not([disabled]):not(:disabled):not([aria-disabled="true"])')]:[];const focusItem=item=>{for(const option of enabledItems())option.tabIndex=option===item?0:-1;item?.focus()};const floating=useFloatingPanel({open,anchorRef:ref,panelRef:listRef,portal,manageTabOrder:false,placement:placement??(align==="end"?"bottom-end":"bottom-start"),gap:6,getAnchor:()=>triggerRef.current||ref.current?.querySelector('[aria-haspopup="menu"]'),lang});const{manager,scope}=useOverlayLayer({open:open&&floating.ready,kind:"dropdown",panelRef:listRef,surfaceKey:floating.surfaceKey,onEscape:()=>set(false)});React.useEffect(()=>{if(!open||!floating.ready)return;const options=enabledItems();focusItem(openingEdge.current==="last"?options.at(-1):options[0]);openingEdge.current="first";search.current={text:"",time:0};const onDoc=e=>{if(!floating.contains(e.target))set(false)};const onKey=e=>{if(e.defaultPrevented||e.isComposing||e.keyCode===229)return;if(!floating.contains(e.target))return;const opts=enabledItems();if(manager.topDismissible()?.panelEl!==listRef.current)return;if(!opts.length)return;const active=document.activeElement;const idx=opts.indexOf(active);if(e.key==="ArrowDown"){e.preventDefault();focusItem(opts[(idx+1)%opts.length])}else if(e.key==="ArrowUp"){e.preventDefault();focusItem(opts[(idx-1+opts.length)%opts.length])}else if(e.key==="Home"){e.preventDefault();focusItem(opts[0])}else if(e.key==="End"){e.preventDefault();focusItem(opts[opts.length-1])}else if(e.key.length===1&&e.key!==" "&&!e.altKey&&!e.ctrlKey&&!e.metaKey){const char=e.key.toLocaleLowerCase();const now=Date.now();const text=now-search.current.time<500?search.current.text+char:char;search.current={text,time:now};const needle=[...text].every(letter=>letter===char)?char:text;const option=[...opts.slice(idx+1),...opts.slice(0,idx+1)].find(item=>item.textContent.trim().toLocaleLowerCase().startsWith(needle));if(option){e.preventDefault();focusItem(option)}}};document.addEventListener("mousedown",onDoc);document.addEventListener("keydown",onKey);return()=>{document.removeEventListener("mousedown",onDoc);document.removeEventListener("keydown",onKey)}},[open,floating.ready,floating.surfaceKey]);const toggle=event=>{triggerRef.current=event.currentTarget;if(!open)event.currentTarget.focus();set(!open)};const triggerKey=event=>{if(event.defaultPrevented||event.nativeEvent?.isComposing||event.keyCode===229)return;if(event.key!=="ArrowDown"&&event.key!=="ArrowUp")return;event.preventDefault();triggerRef.current=event.currentTarget;event.currentTarget.focus();const edge=event.key==="ArrowUp"?"last":"first";if(open){const options=enabledItems();focusItem(edge==="last"?options.at(-1):options[0])}else{openingEdge.current=edge;set(true)}};const triggerNode=React.isValidElement(trigger)?React.cloneElement(trigger,{...triggerSupportsRef?{ref:mergedTriggerRef}:{},"aria-haspopup":"menu","aria-expanded":open,onKeyDown:event=>{trigger.props.onKeyDown?.(event);triggerKey(event)},onClick:e=>{if(typeof trigger.props.onClick==="function")trigger.props.onClick(e);if(!e.defaultPrevented)toggle(e)}}):React.createElement("button",{type:"button",ref:mergedTriggerRef,"aria-haspopup":"menu","aria-expanded":open,onKeyDown:triggerKey,onClick:toggle},trigger);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{...mergeTargetProps({"className":cx("cs-menu",className)},rootProps,[]),ref},triggerNode,open?floating.render(React.createElement("div",{ref:mergedNativeRef,className:cx("cs-menu__list",align==="end"&&"cs-menu__list--end"),role:"menu","aria-label":t("menu"),onFocus:event=>{const item=event.target.closest?.('[role="menuitem"]');if(item)for(const option of enabledItems())option.tabIndex=option===item?0:-1},onKeyDown:event=>{if(event.defaultPrevented||event.nativeEvent.isComposing||event.keyCode===229||event.key!=="Tab")return;const modal=manager.activeModal();const roots=modal?manager.focusScope():[document.body];let options=[...new Set(roots.flatMap(root=>[...root.querySelectorAll(focusableSelector)]))].filter(el=>el.tabIndex>=0&&!el.disabled&&!el.matches(":disabled")&&!listRef.current?.contains(el)&&!el.closest('[inert], [hidden], [aria-hidden="true"]')&&el.getClientRects().length>0&&getComputedStyle(el).visibility!=="hidden");options.sort((a,b)=>(a.tabIndex>0?a.tabIndex:Infinity)-(b.tabIndex>0?b.tabIndex:Infinity));options=options.filter(el=>{if(el.tagName!=="INPUT"||el.type!=="radio"||!el.name)return true;const group=options.filter(other=>other.tagName==="INPUT"&&other.type==="radio"&&other.name===el.name&&other.form===el.form&&other.getRootNode()===el.getRootNode());return el===(group.find(radio=>radio.checked)||(event.shiftKey?group.at(-1):group[0]))});const triggerElement=triggerRef.current||ref.current?.querySelector('[aria-haspopup="menu"]');const index=options.indexOf(triggerElement);const next=index+(event.shiftKey?-1:1);const target=options[next]||(modal?options[(next+options.length)%options.length]:null);if(target){event.preventDefault();target.focus()}else{for(const option of enabledItems())option.tabIndex=-1;triggerElement?.focus()}set(false)},onClick:e=>{if(e.defaultPrevented)return;const item=e.target.closest?.('[role="menuitem"]:not([disabled])');if(item&&listRef.current?.contains(item))set(false)}},children)):null))});Menu.displayName="Menu";const MenuItem=React.forwardRef(function MenuItem2({danger=false,icon,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("button",{type:"button",role:"menuitem",tabIndex:-1,className:cx("cs-menu__item",danger&&"cs-menu__item--danger",className),...props,ref:mergedNativeRef},icon||icon===0?React.createElement("span",{"aria-hidden":"true"},icon):null,children)});MenuItem.displayName="MenuItem";Object.assign(__ds_scope,{Menu,MenuItem})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Menu.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{useClientLayoutEffect}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Menubar=React.forwardRef(function Menubar2({portal=true,placement,menus=[],className,"aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy,rootProps},forwardedRef){const floatingRef=React.useRef(null);const[open,setOpen]=React.useState(null);const[focusI,setFocusI]=React.useState(0);const[wrap,L,localeMessages]=useLang();const mergedNativeRef=useComposedRefs(wrap,forwardedRef);const t=makeT("Menubar",L,localeMessages);const id=React.useId();const itemFocus=React.useRef(null);const menuRefs=React.useRef([]);const btns=React.useRef([]);const floating=useFloatingPanel({open:open!=null,anchorRef:wrap,panelRef:floatingRef,portal,manageTabOrder:false,placement:placement??"bottom-start",gap:5,getAnchor:()=>btns.current[open],getInlineParent:()=>btns.current[open]?.parentElement,identity:open});const{scope}=useOverlayLayer({open:open!=null&&floating.ready,kind:"dropdown",panelRef:floatingRef,surfaceKey:floating.surfaceKey,restoreFocus:false,onEscape:()=>{setOpen(null);btns.current[open]?.focus()}});useClientLayoutEffect(()=>{if(open==null||itemFocus.current==null||!floating.ready)return;const items=menuRefs.current[open]?.querySelectorAll('[role="menuitem"]');const target=itemFocus.current;itemFocus.current=null;(target===-1?items?.[items.length-1]:items?.[0])?.focus()},[open,floating.ready,floating.surfaceKey]);React.useEffect(()=>{if(open==null)return;const d=e=>{if(!floating.contains(e.target))setOpen(null)};document.addEventListener("mousedown",d);return()=>{document.removeEventListener("mousedown",d)}},[open]);const nav=(e,i)=>{let n=null;if(e.key==="ArrowRight")n=(i+1)%menus.length;else if(e.key==="ArrowLeft")n=(i-1+menus.length)%menus.length;else if(e.key==="Home")n=0;else if(e.key==="End")n=menus.length-1;else if(["ArrowDown","ArrowUp","Enter"," "].includes(e.key)){e.preventDefault();itemFocus.current=e.key==="ArrowUp"?-1:0;if(open===i){const items=menuRefs.current[i]?.querySelectorAll('[role="menuitem"]');(itemFocus.current===-1?items?.[items.length-1]:items?.[0])?.focus();itemFocus.current=null}else setOpen(i);return}if(n==null)return;e.preventDefault();setFocusI(n);if(open!=null)setOpen(n);const b=btns.current[n];if(b)b.focus()};return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-menubar",className)},rootProps,["role","aria-label","aria-labelledby"]),role:"menubar","aria-label":ariaLabel??(ariaLabelledBy?void 0:t("label")),"aria-labelledby":ariaLabelledBy},menus.map((m,i)=>React.createElement("span",{key:i,className:"cs-menubar__wrap"},React.createElement("button",{id:`${id}-top-${i}`,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":open===i,tabIndex:i===focusI?0:-1,ref:el=>btns.current[i]=el,onKeyDown:e=>nav(e,i),onFocus:()=>setFocusI(i),className:cx("cs-menubar__top",open===i&&"is-open"),onClick:()=>setOpen(open===i?null:i),onMouseEnter:()=>{if(open!=null&&open!==i)setOpen(i)}},m.label),open===i?floating.render(React.createElement("span",{className:"cs-menu__list",role:"menu","aria-labelledby":`${id}-top-${i}`,ref:el=>{menuRefs.current[i]=el;floatingRef.current=el},onKeyDown:e=>{const items=[...e.currentTarget.querySelectorAll('[role="menuitem"]')];const current=items.indexOf(document.activeElement);let next;if(e.key==="ArrowDown")next=(current+1)%items.length;else if(e.key==="ArrowUp")next=(current-1+items.length)%items.length;else if(e.key==="Home")next=0;else if(e.key==="End")next=items.length-1;else if(e.key==="ArrowRight"||e.key==="ArrowLeft"){e.preventDefault();const target=(i+(e.key==="ArrowRight"?1:-1)+menus.length)%menus.length;itemFocus.current=0;setFocusI(target);setOpen(target);return}else if(e.key==="Tab"){e.preventDefault();setOpen(null);btns.current[i]?.focus();return}else return;e.preventDefault();items[next]?.focus()}},m.items.map((it,j)=>it==="-"?React.createElement("span",{key:j,className:"cs-menu__sep",role:"separator"}):React.createElement("button",{key:j,type:"button",role:"menuitem",tabIndex:-1,className:cx("cs-menu__item",it.danger&&"cs-menu__item--danger"),onClick:()=>{setOpen(null);btns.current[i]?.focus();it.onSelect&&it.onSelect()}},it.label)))):null))))});Menubar.displayName="Menubar";Object.assign(__ds_scope,{Menubar})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Menubar.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const NavigationMenu=React.forwardRef(function NavigationMenu2({portal=true,placement,items=[],className,...props},forwardedRef){const[open,setOpen]=React.useState(null);const wrap=React.useRef(null);const mergedNativeRef=useComposedRefs(wrap,forwardedRef);const popup=React.useRef(null);const floating=useFloatingPanel({open:open!=null,anchorRef:wrap,panelRef:popup,portal,placement:placement??"bottom-start",gap:8,getAnchor:()=>wrap.current?.querySelector('button[aria-expanded="true"]'),getInlineParent:()=>wrap.current?.querySelector('button[aria-expanded="true"]')?.parentElement,identity:open});const{scope}=useOverlayLayer({open:open!=null&&floating.ready,kind:"dropdown",panelRef:popup,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(null)});React.useEffect(()=>{if(open==null)return;const d=e=>{if(!floating.contains(e.target))setOpen(null)};document.addEventListener("mousedown",d);return()=>{document.removeEventListener("mousedown",d)}},[open]);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("nav",{ref:mergedNativeRef,className:cx("cs-navmenu",className),...props},items.map((it,i)=>it.panel?React.createElement("span",{key:i,className:"cs-navmenu__wrap"},React.createElement("button",{type:"button",className:cx("cs-navmenu__top",open===i&&"is-open"),"aria-expanded":open===i,onClick:()=>setOpen(open===i?null:i),onMouseEnter:()=>{if(open!=null&&open!==i)setOpen(i)}},it.label," ",React.createElement("span",{"aria-hidden":"true"},"▾")),open===i?floating.render(React.createElement("span",{ref:popup,className:"cs-navmenu__panel"},it.panel.map((p,j)=>React.createElement("a",{key:j,href:p.href||"#",className:"cs-navmenu__card",onClick:()=>setOpen(null)},React.createElement("b",null,p.label),p.desc||p.desc===0?React.createElement("small",null,p.desc):null)))):null):React.createElement("a",{key:i,href:it.href||"#",className:"cs-navmenu__top"},it.label))))});NavigationMenu.displayName="NavigationMenu";Object.assign(__ds_scope,{NavigationMenu})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/NavigationMenu.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const Toolbar=React.forwardRef(function Toolbar2({portal=true,placement,items=[],overflowAfter,label,lang,className,rootProps},forwardedRef){const floatingRef=React.useRef(null);const[open,setOpen]=React.useState(false);const[focusIdx,setFocusIdx]=React.useState(0);const wrap=React.useRef(null);const btnRefs=React.useRef([]);const menuRefs=React.useRef([]);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(wrap,ref,forwardedRef);const t=makeT("Toolbar",L,localeMessages);const cut=overflowAfter!=null?overflowAfter:items.length;const head=items.slice(0,cut);const tail=items.slice(cut).filter(x=>x!=="-");const hasMore=tail.length>0;const controlMeta=[];head.forEach((it,i)=>{if(it!=="-")controlMeta.push({kind:"head",headIndex:i})});if(hasMore)controlMeta.push({kind:"more"});const floating=useFloatingPanel({open:open&&hasMore,anchorRef:wrap,panelRef:floatingRef,portal,placement:placement??"bottom-end",gap:6,getAnchor:()=>wrap.current?.querySelector(".cs-toolbar__more > button"),getInlineParent:()=>wrap.current?.querySelector(".cs-toolbar__more"),lang});const{scope}=useOverlayLayer({open:open&&hasMore&&floating.ready,kind:"dropdown",panelRef:floatingRef,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(false)});React.useEffect(()=>{if(!open)return;const d=e=>{if(!floating.contains(e.target))setOpen(false)};document.addEventListener("mousedown",d);return()=>document.removeEventListener("mousedown",d)},[open]);React.useEffect(()=>{if(focusIdx>=controlMeta.length)setFocusIdx(Math.max(0,controlMeta.length-1))},[focusIdx,controlMeta.length]);const focusControl=i=>{const next=Math.max(0,Math.min(controlMeta.length-1,i));setFocusIdx(next);requestAnimationFrame(()=>{const el=btnRefs.current[next];if(el)el.focus()})};const onToolbarKeyDown=(e,i)=>{if(e.nativeEvent.isComposing||e.keyCode===229)return;if(e.key==="ArrowRight"){e.preventDefault();focusControl(i+1)}else if(e.key==="ArrowLeft"){e.preventDefault();focusControl(i-1)}else if(e.key==="Home"){e.preventDefault();focusControl(0)}else if(e.key==="End"){e.preventDefault();focusControl(controlMeta.length-1)}};const onMenuKeyDown=(e,i)=>{if(e.nativeEvent.isComposing||e.keyCode===229)return;if(e.key==="ArrowDown"){e.preventDefault();const n=Math.min(tail.length-1,i+1);const el=menuRefs.current[n];if(el)el.focus()}else if(e.key==="ArrowUp"){e.preventDefault();const n=Math.max(0,i-1);const el=menuRefs.current[n];if(el)el.focus()}else if(e.key==="Home"){e.preventDefault();const el=menuRefs.current[0];if(el)el.focus()}else if(e.key==="End"){e.preventDefault();const el=menuRefs.current[tail.length-1];if(el)el.focus()}};let controlI=0;return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-toolbar",className)},rootProps,["role","aria-label","aria-orientation"]),role:"toolbar","aria-label":label,"aria-orientation":"horizontal"},head.map((it,i)=>{if(it==="-")return React.createElement("span",{key:"sep-"+i,className:"cs-toolbar__sep","aria-hidden":"true"});const ci=controlI++;return React.createElement("button",{key:"btn-"+i,type:"button",className:"cs-toolbar__btn",tabIndex:ci===focusIdx?0:-1,ref:el=>{btnRefs.current[ci]=el},onFocus:()=>setFocusIdx(ci),onKeyDown:e=>onToolbarKeyDown(e,ci),onClick:()=>it.onSelect&&it.onSelect()},it.icon,it.label||it.label===0?React.createElement("span",null,it.label):null)}),hasMore?(()=>{const ci=controlI++;return React.createElement("span",{className:"cs-toolbar__more"},React.createElement("button",{type:"button",className:"cs-toolbar__btn","aria-haspopup":"menu","aria-expanded":open,"aria-label":t("more"),tabIndex:ci===focusIdx?0:-1,ref:el=>{btnRefs.current[ci]=el},onFocus:()=>setFocusIdx(ci),onKeyDown:e=>{onToolbarKeyDown(e,ci);if(e.key==="ArrowDown"||e.key==="Enter"||e.key===" "){if(!open){e.preventDefault();setOpen(true);requestAnimationFrame(()=>{const el=menuRefs.current[0];if(el)el.focus()})}}},onClick:()=>setOpen(o=>!o)},"⋯"),open?floating.render(React.createElement("span",{ref:floatingRef,className:"cs-menu__list",role:"menu"},tail.map((it,i)=>React.createElement("button",{key:i,type:"button",role:"menuitem",className:"cs-menu__item",ref:el=>{menuRefs.current[i]=el},onKeyDown:e=>onMenuKeyDown(e,i),onClick:()=>{setOpen(false);it.onSelect&&it.onSelect()}},it.label)))):null)})():null))});Toolbar.displayName="Toolbar";Object.assign(__ds_scope,{Toolbar})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Toolbar.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{overlaySurfaceClass,useOverlaySurface}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const AlertDialog=React.forwardRef(function AlertDialog2({open,defaultOpen=false,onOpenChange,title,description,children,confirmLabel,cancelLabel,tone,variant,onConfirm,onCancel,lang,className,...props},forwardedRef){const baseId=React.useId();const titleId=baseId+"-title";const descId=baseId+"-desc";const[ref,L,localeMessages]=useLang(lang);const t=makeT("AlertDialog",L,localeMessages);const panel=React.useRef(null);const mergedNativeRef=useComposedRefs(panel,forwardedRef);const backdrop=React.useRef(null);const uncontrolled=open===void 0;const[internal,setInternal]=React.useState(!!defaultOpen);const isOpen=uncontrolled?internal:!!open;const material=overlaySurfaceClass(className);const surface=useOverlaySurface(isOpen,panel,material);const setOpen=next=>{if(uncontrolled)setInternal(next);onOpenChange?.(next)};const destructive=(tone??variant)==="destructive";const confirmRef=React.useRef(onConfirm);confirmRef.current=onConfirm;const cancelRef=React.useRef(onCancel);cancelRef.current=onCancel;const setOpenRef=React.useRef(setOpen);setOpenRef.current=setOpen;const{scope}=useOverlayLayer({open:isOpen,kind:"modal",trapFocus:true,preferFocusSelector:destructive?".cs-alert-dialog__cancel":".cs-alert-dialog__confirm",onEscape:()=>{setOpenRef.current(false);cancelRef.current?.()},panelRef:panel,backdropRef:backdrop});const cl=cancelLabel!=null?cancelLabel:t("cancel");const cf=confirmLabel!=null?confirmLabel:t("confirm");const body=description??children;const hasDesc=body!=null&&body!==false&&body!=="";if(!isOpen)return null;return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref,className:"cs-dialog-layer cs-alert-dialog-layer"},React.createElement("div",{ref:backdrop,className:"cs-dialog__overlay",onClick:()=>{setOpen(false);cancelRef.current?.()},"aria-hidden":"true"}),material?React.createElement("div",{ref:surface,className:cx("cs-overlay-surface",material),"aria-hidden":"true"}):null,React.createElement("section",{...props,ref:mergedNativeRef,"data-cs-overlay-material":material||void 0,tabIndex:-1,role:"alertdialog","aria-modal":"true","aria-labelledby":titleId,"aria-describedby":hasDesc?descId:void 0,className:cx("cs-dialog","cs-alert-dialog",destructive&&"cs-alert-dialog--destructive",className)},React.createElement("header",{className:"cs-dialog__header"},React.createElement("h2",{id:titleId,className:"cs-dialog__title"},title)),hasDesc?React.createElement("div",{id:descId,className:"cs-dialog__body"},body):null,React.createElement("footer",{className:"cs-dialog__actions"},React.createElement("button",{type:"button",className:"cs-button cs-button--ghost cs-button--md cs-alert-dialog__cancel",onClick:()=>{setOpen(false);cancelRef.current?.()}},cl),React.createElement("button",{type:"button",className:cx("cs-button","cs-button--md","cs-alert-dialog__confirm",destructive?"cs-button--danger":"cs-button--primary"),onClick:()=>{setOpen(false);confirmRef.current?.()}},cf)))))});AlertDialog.displayName="AlertDialog";Object.assign(__ds_scope,{AlertDialog})})()}catch(e){__ds_ns.__errors.push({path:"components/overlays/AlertDialog.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const ContextMenu=React.forwardRef(function ContextMenu2({portal=true,placement,items=[],children,lang,className,tabIndex=0,rootProps},forwardedRef){const[pos,setPos]=React.useState(null);const[active,setActive]=React.useState(0);const[ref,L,localeMessages]=useLang(lang);const list=React.useRef(null);const mergedNativeRef=useComposedRefs(list,forwardedRef);const opener=React.useRef(null);const pointerOpener=React.useRef(null);const closeTimer=React.useRef(null);const t=makeT("ContextMenu",L,localeMessages);const dismiss=(restore=true)=>{clearTimeout(closeTimer.current);setPos(null);const el=opener.current;if(restore&&el?.isConnected&&!el.closest("[inert], [hidden]"))el.focus()};const floating=useFloatingPanel({open:Boolean(pos),anchorRef:ref,panelRef:list,portal,manageTabOrder:false,placement:placement??"bottom-start",gap:0,lang,getTabAnchor:()=>opener.current||ref.current,point:pos?{...pos,relative:true}:null});const{manager,scope}=useOverlayLayer({open:Boolean(pos)&&floating.ready,kind:"dropdown",panelRef:list,surfaceKey:floating.surfaceKey,restoreFocus:false,onEscape:()=>dismiss()});const openAt=(point,trigger=document.activeElement)=>{clearTimeout(closeTimer.current);const first=items.findIndex(item=>item!=="-");if(first<0)return;if(!pos)opener.current=trigger;setActive(first);setPos(point)};React.useEffect(()=>{if(!pos||!floating.ready)return;const options=()=>[...list.current?.querySelectorAll('[role="menuitem"]')||[]];const opts=options();if(!opts.length){dismiss(document.activeElement===document.body||list.current?.contains(document.activeElement));return}if(!list.current?.contains(document.activeElement))opts[0].focus();const close=()=>dismiss(false);const onKey=e=>{if(manager.topDismissible()?.panelEl!==list.current||!list.current?.contains(e.target))return;if(e.isComposing||e.nativeEvent?.isComposing||e.keyCode===229)return;if(e.key==="Tab"){clearTimeout(closeTimer.current);if(!e.defaultPrevented){const controls=manager.focusOrder({backwards:e.shiftKey});const index2=controls.indexOf(document.activeElement);const next2=index2+(e.shiftKey?-1:1);const target=controls[next2]||(manager.activeModal()?controls[(next2+controls.length)%controls.length]:null);if(target){e.preventDefault();target.focus();dismiss(false);return}}closeTimer.current=setTimeout(()=>dismiss(false),0);return}if(e.defaultPrevented)return;const opts2=options(),index=opts2.indexOf(document.activeElement);if(!opts2.length)return;let next;if(e.key==="ArrowDown")next=Math.min(opts2.length-1,index+1);else if(e.key==="ArrowUp")next=index<0?opts2.length-1:Math.max(0,index-1);else if(e.key==="Home")next=0;else if(e.key==="End")next=opts2.length-1;else return;e.preventDefault();opts2[next].focus()};document.addEventListener("click",close);document.addEventListener("keydown",onKey);return()=>{clearTimeout(closeTimer.current);document.removeEventListener("click",close);document.removeEventListener("keydown",onKey)}},[pos,items,floating.ready,floating.surfaceKey]);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref,...mergeTargetProps({"className":cx("cs-ctxmenu-zone",className),"onBlur":e=>{if(pos&&!floating.contains(e.relatedTarget))dismiss(false)},"onKeyDown":e=>{if(pos||e.defaultPrevented||e.isComposing||e.nativeEvent?.isComposing||e.keyCode===229)return;if(e.key==="ContextMenu"||e.key==="F10"&&e.shiftKey){e.preventDefault();pointerOpener.current=null;openAt({x:0,y:e.currentTarget.getBoundingClientRect().height})}},"onPointerDownCapture":e=>{pointerOpener.current=e.button===2&&e.currentTarget.contains(document.activeElement)?document.activeElement:null},"onContextMenu":e=>{const trigger=pointerOpener.current;pointerOpener.current=null;if(e.defaultPrevented)return;e.preventDefault();if(!e.currentTarget.contains(document.activeElement))e.currentTarget.focus();const box=e.currentTarget.getBoundingClientRect();openAt({x:e.clientX-box.left,y:e.clientY-box.top},trigger?.isConnected&&e.currentTarget.contains(trigger)?trigger:document.activeElement)}},rootProps,["role","aria-label","tabIndex"]),role:"group","aria-label":t("menu"),tabIndex},children,pos?floating.render(React.createElement("div",{ref:mergedNativeRef,className:"cs-menu__list",role:"menu","aria-label":t("menu"),style:{position:"absolute",insetInlineStart:pos.x,insetBlockStart:pos.y}},items.map((it,i)=>it==="-"?React.createElement("div",{key:i,className:"cs-menu__sep",role:"separator"}):React.createElement("button",{key:i,type:"button",role:"menuitem",tabIndex:active===i?0:-1,onFocus:()=>setActive(i),className:cx("cs-menu__item",it.danger&&"cs-menu__item--danger"),onClick:()=>{dismiss();it.onSelect&&it.onSelect()}},it.label)))):null))});ContextMenu.displayName="ContextMenu";Object.assign(__ds_scope,{ContextMenu})})()}catch(e){__ds_ns.__errors.push({path:"components/overlays/ContextMenu.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useClientLayoutEffect}=__ds_scope;const{cx}=__ds_scope;const{overlaySurfaceClass,useOverlaySurface}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{notifyClosed}=__ds_scope;const Drawer=React.forwardRef(function Drawer2({open,onClose,onOpenChange,title,side="right",children,actions,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const titleId=React.useId();const hasTitle=Boolean(title)||title===0;const panel=React.useRef(null);const mergedNativeRef=useComposedRefs(panel,ref,forwardedRef);const body=React.useRef(null);const[bodyScrollable,setBodyScrollable]=React.useState(false);const backdrop=React.useRef(null);const material=overlaySurfaceClass(className);const surface=useOverlaySurface(!!open,panel,material);useClientLayoutEffect(()=>{const el=body.current;if(!open||!el)return;const measure=()=>setBodyScrollable(el.scrollHeight>el.clientHeight+1||el.scrollWidth>el.clientWidth+1);measure();const observer=new ResizeObserver(measure);observer.observe(el);for(const child of el.children)observer.observe(child);return()=>observer.disconnect()},[open,children]);const closeRef=React.useRef(null);closeRef.current=()=>notifyClosed(onOpenChange,onClose);const{scope}=useOverlayLayer({open:!!open,kind:"modal",trapFocus:true,onEscape:()=>closeRef.current&&closeRef.current(),panelRef:panel,backdropRef:backdrop});const t=makeT("Drawer",L,localeMessages);if(!open)return null;return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement(React.Fragment,null,React.createElement("div",{ref:backdrop,className:"cs-drawer-scrim",onClick:()=>closeRef.current(),"aria-hidden":"true"}),material?React.createElement("div",{ref:surface,className:cx("cs-overlay-surface",material),"aria-hidden":"true"}):null,React.createElement("div",{...mergeTargetProps({className:cx("cs-drawer",side==="left"&&"cs-drawer--left",className)},rootProps,["role","tabIndex","aria-modal","aria-labelledby","aria-label","data-cs-overlay-material"]),ref:mergedNativeRef,"data-cs-overlay-material":material||void 0,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":hasTitle?titleId:void 0,"aria-label":hasTitle?void 0:t("panel")},React.createElement("div",{className:"cs-drawer__header"},hasTitle?React.createElement("h2",{id:titleId,className:"cs-drawer__title"},title):null,React.createElement("button",{type:"button",className:"cs-drawer__close","aria-label":t("close"),onClick:()=>closeRef.current()},React.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},React.createElement("path",{d:"M6 6l12 12M18 6L6 18"})))),React.createElement("div",{ref:body,className:"cs-drawer__body",tabIndex:bodyScrollable?0:void 0},children),actions||actions===0?React.createElement("div",{className:"cs-drawer__footer"},actions):null)))});Drawer.displayName="Drawer";Object.assign(__ds_scope,{Drawer})})()}catch(e){__ds_ns.__errors.push({path:"components/overlays/Drawer.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{useOverlayLayer,overlayScopeContext,focusableSelector}=__ds_scope;const{cx}=__ds_scope;const HoverCard=React.forwardRef(function HoverCard2({portal=true,placement,trigger,children,openDelay=150,closeDelay=200,className,"aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy,rootProps},forwardedRef){const floatingRef=React.useRef(null);const mergedNativeRef=useComposedRefs(floatingRef,forwardedRef);const[open,setOpen]=React.useState(false);const panel=React.useRef(null);const timer=React.useRef();const hovered=React.useRef(false);const focused=React.useRef(false);const triggerFocus=React.useRef(null);const sync=()=>{clearTimeout(timer.current);const next=hovered.current||focused.current;timer.current=setTimeout(()=>setOpen(next),next?openDelay:closeDelay)};const dismiss=()=>{clearTimeout(timer.current);const content=floatingRef.current;if(content?.contains(document.activeElement)){const targets=[...panel.current.querySelectorAll(focusableSelector)].filter(el=>!content.contains(el)&&el.tabIndex>=0&&!el.disabled&&!el.closest('[inert], [hidden], [aria-hidden="true"]')&&el.getClientRects().length>0&&getComputedStyle(el).visibility!=="hidden");const target=targets.includes(triggerFocus.current)?triggerFocus.current:targets[0];target?.focus()}clearTimeout(timer.current);setOpen(false)};const floating=useFloatingPanel({open,anchorRef:panel,panelRef:floatingRef,portal,placement:placement??"bottom-start",gap:8,getAnchor:()=>panel.current?.firstElementChild});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"popover",panelRef:floatingRef,surfaceKey:floating.surfaceKey,restoreFocus:false,onEscape:dismiss});React.useEffect(()=>()=>clearTimeout(timer.current),[]);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("span",{ref:panel,...mergeTargetProps({"className":cx("cs-hovercard",className),"onMouseEnter":()=>{hovered.current=true;sync()},"onMouseLeave":()=>{hovered.current=false;if(!focused.current)sync()},"onFocus":e=>{if(!floatingRef.current?.contains(e.target))triggerFocus.current=e.target;if(!floating.contains(e.relatedTarget)){focused.current=true;sync()}},"onBlur":e=>{if(!floating.contains(e.relatedTarget)){focused.current=false;if(!hovered.current)sync()}}},rootProps,[])},trigger,open?floating.render(React.createElement("span",{className:"cs-hovercard__panel",role:"dialog","aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy,ref:mergedNativeRef},children)):null))});HoverCard.displayName="HoverCard";Object.assign(__ds_scope,{HoverCard})})()}catch(e){__ds_ns.__errors.push({path:"components/overlays/HoverCard.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const Popconfirm=React.forwardRef(function Popconfirm2({portal=true,placement,trigger,title,onConfirm,onCancel,okLabel,cancelLabel,lang,className,rootProps},forwardedRef){const floatingRef=React.useRef(null);const mergedNativeRef=useComposedRefs(floatingRef,forwardedRef);const[open,setOpen]=React.useState(false);const titleId=React.useId();const wrap=React.useRef(null);const[ref,L,localeMessages]=useLang(lang);const t=makeT("Popconfirm",L,localeMessages);const floating=useFloatingPanel({open,anchorRef:wrap,panelRef:floatingRef,portal,placement:placement??"bottom-start",gap:8,getAnchor:()=>wrap.current?.querySelector('[aria-haspopup="dialog"]'),lang});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"popover",panelRef:floatingRef,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(false)});React.useEffect(()=>{if(!open)return;const d=e=>{if(!floating.contains(e.target))setOpen(false)};document.addEventListener("mousedown",d);return()=>{document.removeEventListener("mousedown",d)}},[open]);const toggle=event=>{if(!open)event.currentTarget.focus();setOpen(o=>!o)};const triggerNode=React.isValidElement(trigger)?React.cloneElement(trigger,{"aria-haspopup":"dialog","aria-expanded":open,onClick:e=>{if(typeof trigger.props.onClick==="function")trigger.props.onClick(e);if(!e.defaultPrevented)toggle(e)}}):React.createElement("button",{type:"button","aria-haspopup":"dialog","aria-expanded":open,onClick:toggle},trigger);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("span",{ref:el=>{wrap.current=el;ref.current=el},...mergeTargetProps({"className":cx("cs-popconfirm",className)},rootProps,[])},triggerNode,open?floating.render(React.createElement("span",{className:"cs-popconfirm__panel",role:"alertdialog","aria-labelledby":titleId,ref:mergedNativeRef},React.createElement("span",{id:titleId,className:"cs-popconfirm__title"},title),React.createElement("span",{className:"cs-popconfirm__actions"},React.createElement("button",{type:"button",className:"cs-button cs-button--ghost cs-button--xs",onClick:()=>{setOpen(false);onCancel&&onCancel()}},cancelLabel!=null?cancelLabel:t("cancel")),React.createElement("button",{type:"button",className:"cs-button cs-button--primary cs-button--xs",onClick:()=>{setOpen(false);onConfirm&&onConfirm()}},okLabel!=null?okLabel:t("ok"))))):null))});Popconfirm.displayName="Popconfirm";Object.assign(__ds_scope,{Popconfirm})})()}catch(e){__ds_ns.__errors.push({path:"components/overlays/Popconfirm.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Popover=React.forwardRef(function Popover2({portal=true,placement,trigger,children,align="start",open:controlled,onOpenChange,className,rootProps,"aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy},forwardedRef){const floatingRef=React.useRef(null);const mergedNativeRef=useComposedRefs(floatingRef,forwardedRef);const[u,setU]=React.useState(false);const open=controlled!=null?controlled:u;const set=v=>{if(controlled==null)setU(v);onOpenChange?.(v)};const[ref,L,localeMessages]=useLang();const t=makeT("Popover",L,localeMessages);const floating=useFloatingPanel({open,anchorRef:ref,panelRef:floatingRef,portal,placement:placement??(align==="end"?"bottom-end":"bottom-start"),gap:8,getAnchor:()=>ref.current?.querySelector('[aria-haspopup="dialog"]')});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"popover",panelRef:floatingRef,surfaceKey:floating.surfaceKey,onEscape:()=>set(false)});React.useEffect(()=>{if(!open)return;const d=e=>{if(!floating.contains(e.target))set(false)};document.addEventListener("mousedown",d);return()=>{document.removeEventListener("mousedown",d)}},[open]);const toggle=event=>{if(!open)event.currentTarget.focus();set(!open)};const triggerNode=React.isValidElement(trigger)?React.cloneElement(trigger,{"aria-haspopup":"dialog","aria-expanded":open,onClick:e=>{if(typeof trigger.props.onClick==="function")trigger.props.onClick(e);if(!e.defaultPrevented)toggle(e)}}):React.createElement("button",{type:"button","aria-haspopup":"dialog","aria-expanded":open,onClick:toggle},trigger);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("span",{...mergeTargetProps({className:cx("cs-popover",className)},rootProps),ref},triggerNode,open?floating.render(React.createElement("div",{className:cx("cs-popover__panel",align==="end"&&"cs-popover__panel--end"),role:"dialog","aria-label":ariaLabel??(ariaLabelledBy?void 0:t("panel")),"aria-labelledby":ariaLabelledBy,ref:mergedNativeRef},children)):null))});Popover.displayName="Popover";Object.assign(__ds_scope,{Popover})})()}catch(e){__ds_ns.__errors.push({path:"components/overlays/Popover.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const{notifyClosed}=__ds_scope;const Tour=React.forwardRef(function Tour2({steps=[],open,onClose,onOpenChange,lang,className,rootProps},forwardedRef){const[storedIndex,setI]=React.useState(0);const i=Math.max(0,Math.min(storedIndex,steps.length-1));if(storedIndex!==i)setI(i);const[rect,setRect]=React.useState(null);const[pop,setPop]=React.useState({top:80,left:40});const[ref,L,localeMessages]=useLang(lang);const t=makeT("Tour",L,localeMessages);const panel=React.useRef(null);const mergedNativeRef=useComposedRefs(panel,forwardedRef);const titleId=React.useId();const backdrop=React.useRef(null);const closeRef=React.useRef(null);closeRef.current=()=>notifyClosed(onOpenChange,onClose);const{scope}=useOverlayLayer({open:!!open&&steps.length>0,kind:"modal",trapFocus:true,panelRef:panel,backdropRef:backdrop,onEscape:()=>closeRef.current()});React.useEffect(()=>{if(open)setI(0)},[open]);const target=steps[i]?.target;React.useEffect(()=>{if(!open||!target){setRect(null);setPop({top:80,left:40});return void 0}let frame;let previous;const measure=()=>{let el=null;try{el=document.querySelector(target)}catch(e){el=null}const r=el?.getBoundingClientRect();const next=r?{x:r.left-6,y:r.top-6,w:r.width+12,h:r.height+12}:null;const position=next?{top:Math.min(window.innerHeight-170,next.y+next.h+12),left:Math.max(12,Math.min(window.innerWidth-292,next.x))}:{top:80,left:40};const signature=JSON.stringify([next,position]);if(signature!==previous){previous=signature;setRect(next);setPop(position)}frame=requestAnimationFrame(measure)};measure();return()=>cancelAnimationFrame(frame)},[open,target]);if(!open||!steps.length)return React.createElement("span",{ref,style:{display:"none"}});const s=steps[i];const last=i===steps.length-1;return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref,...mergeTargetProps({"className":cx("cs-tour",className)},rootProps,[])},React.createElement("div",{ref:backdrop,className:"cs-tour__scrim",onClick:()=>closeRef.current()}),rect?React.createElement("div",{className:"cs-tour__hole",style:{left:rect.x,top:rect.y,width:rect.w,height:rect.h}}):null,React.createElement("div",{ref:mergedNativeRef,tabIndex:-1,className:"cs-tour__pop",role:"dialog","aria-modal":"true","aria-labelledby":titleId,style:{left:pop.left,top:pop.top}},React.createElement("b",{id:titleId},s.title),s.body||s.body===0?React.createElement("p",null,s.body):null,React.createElement("div",{className:"cs-tour__bar"},React.createElement("span",{className:"cs-tour__count"},i+1+" / "+steps.length),React.createElement("span",{className:"cs-tour__btns"},React.createElement("button",{type:"button",className:"cs-button cs-button--ghost cs-button--xs",onClick:()=>closeRef.current()},t("skip")),i>0?React.createElement("button",{type:"button",className:"cs-button cs-button--secondary cs-button--xs",onClick:()=>setI(i-1)},t("back")):null,React.createElement("button",{type:"button",className:"cs-button cs-button--primary cs-button--xs",onClick:()=>last?closeRef.current():setI(i+1)},last?t("done"):t("next")))))))});Tour.displayName="Tour";Object.assign(__ds_scope,{Tour})})()}catch(e){__ds_ns.__errors.push({path:"components/overlays/Tour.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFieldAssociation}=__ds_scope;const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const TextField=React.forwardRef(function TextField2({id,label,description,error,disabled=false,readOnly=false,className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const hasError=Boolean(error)||error===0;const hasDescription=Boolean(description)||description===0;const generatedId=React.useId();const inputId=id??generatedId;const hasLabel=typeof label==="string"?label.trim().length>0:Boolean(label)||label===0;const labelId=hasLabel?inputId+"-label":void 0;const labelledBy=props["aria-labelledby"]??(props["aria-label"]==null?labelId:void 0);const descriptionId=hasDescription?`${inputId}-description`:void 0;const errorId=hasError?`${inputId}-error`:void 0;const control=useFieldAssociation({...props,id:inputId,"aria-labelledby":labelledBy},{description,error,nativeRequired:true,requiredSupported:true});if(props["aria-labelledby"]!=null||props["aria-label"]!=null){control["aria-labelledby"]=labelledBy;control["aria-label"]=props["aria-label"]}const invalid=control["aria-invalid"]===true||control["aria-invalid"]==="true";return React.createElement("label",{className:cx("cs-field",disabled&&"is-disabled",invalid&&"is-invalid",className),htmlFor:inputId},React.createElement("span",{id:labelId,className:"cs-field__label"},label),hasDescription?React.createElement("span",{id:descriptionId,className:"cs-field__description"},description):null,React.createElement("input",{...control,id:inputId,disabled,readOnly,"aria-invalid":control["aria-invalid"],"aria-labelledby":control["aria-labelledby"],"aria-describedby":control["aria-describedby"],className:"cs-field__control",ref:mergedNativeRef}),hasError?React.createElement("span",{id:errorId,className:"cs-field__error",role:"alert"},error):null)});TextField.displayName="TextField";Object.assign(__ds_scope,{TextField})})()}catch(e){__ds_ns.__errors.push({path:"components/textfield/TextField.jsx",error:String(e&&e.message||e)})}try{(()=>{const tokens={"$meta":{"system":"CyberSkill Design System","version":"2.4.0","generated":"2026-07-23","note":"Generated from tokens/*.css. Root grouped by category; theme/element scopes carry overrides only. Regenerate after any token change (see docs/conventions.md).","declarationGraph":{"path":"declarations.json","schemaVersion":1,"sha256":"676b6bdeeee3c3ec26610b391935e7a5bfc6cde882ef271d13cd505ad9a76490","declarations":1080,"publicDeclarations":397,"publicNames":216,"privateDeclarations":683}},"root":{"color":{"--cs-color-brand-umber":"#45210E","--cs-color-brand-ochre":"#F4BA17","--cs-color-surface-page":"#FFFDF8","--cs-color-surface-panel":"#FFFFFF","--cs-color-surface-raised":"#FBF4E9","--cs-color-text-primary":"#45210E","--cs-color-text-inverse":"#FFFFFF","--cs-color-text-accent":"#6E3B0E","--cs-color-text-muted":"#3F2D21","--cs-color-semantic-success":"#166534","--cs-color-semantic-danger":"#B42318","--cs-color-semantic-warning":"#92400E","--cs-color-semantic-info":"#1D4ED8","--cs-color-semantic-success-fg":"#FFFFFF","--cs-color-semantic-danger-fg":"#FFFFFF","--cs-color-semantic-warning-fg":"#FFFFFF","--cs-color-semantic-info-fg":"#FFFFFF","--cs-color-accent-ochre":"#F4BA17","--cs-color-border-default":"#E7D9C6","--cs-color-link":"#6E3B0E","--cs-color-link-hover":"#45210E","--cs-color-semantic-success-text":"#042D13","--cs-color-semantic-danger-text":"#4B0502","--cs-color-semantic-warning-text":"#441801","--cs-color-semantic-info-text":"#000A75"},"component":{"--cs-component-button-primary-bg":"#45210E","--cs-component-button-primary-fg":"#FFFFFF","--cs-component-button-gap":"8px","--cs-component-button-radius":"8px","--cs-component-button-xs-paddingY":"var(--cs-component-button-xs-padding-y)","--cs-component-button-xs-paddingX":"var(--cs-component-button-xs-padding-x)","--cs-component-button-xs-minHeight":"var(--cs-component-button-xs-min-height)","--cs-component-button-xs-minWidth":"var(--cs-component-button-xs-min-width)","--cs-component-button-xs-minHeight-coarse":"var(--cs-component-button-xs-min-height-coarse)","--cs-component-button-sm-paddingY":"var(--cs-component-button-sm-padding-y)","--cs-component-button-sm-paddingX":"var(--cs-component-button-sm-padding-x)","--cs-component-button-sm-minHeight":"var(--cs-component-button-sm-min-height)","--cs-component-button-sm-minHeight-coarse":"var(--cs-component-button-sm-min-height-coarse)","--cs-component-button-md-paddingY":"var(--cs-component-button-md-padding-y)","--cs-component-button-md-paddingX":"var(--cs-component-button-md-padding-x)","--cs-component-button-md-minHeight":"var(--cs-component-button-md-min-height)","--cs-component-button-md-minHeight-coarse":"var(--cs-component-button-md-min-height-coarse)","--cs-component-button-lg-paddingY":"var(--cs-component-button-lg-padding-y)","--cs-component-button-lg-paddingX":"var(--cs-component-button-lg-padding-x)","--cs-component-button-lg-minHeight":"var(--cs-component-button-lg-min-height)","--cs-component-textfield-border-default":"#BFA58F","--cs-component-textfield-paddingY":"var(--cs-component-textfield-padding-y)","--cs-component-textfield-paddingX":"var(--cs-component-textfield-padding-x)","--cs-component-textfield-minHeight":"var(--cs-component-textfield-min-height)","--cs-focus-ring":"3px","--cs-component-button-xs-padding-y":"4px","--cs-component-button-xs-padding-x":"10px","--cs-component-button-xs-min-height":"28px","--cs-component-button-xs-min-width":"28px","--cs-component-button-xs-min-height-coarse":"44px","--cs-component-button-sm-padding-y":"8px","--cs-component-button-sm-padding-x":"14px","--cs-component-button-sm-min-height":"36px","--cs-component-button-sm-min-height-coarse":"44px","--cs-component-button-md-padding-y":"12px","--cs-component-button-md-padding-x":"20px","--cs-component-button-md-min-height":"44px","--cs-component-button-md-min-height-coarse":"44px","--cs-component-button-lg-padding-y":"16px","--cs-component-button-lg-padding-x":"28px","--cs-component-button-lg-min-height":"52px","--cs-component-textfield-padding-y":"10px","--cs-component-textfield-padding-x":"12px","--cs-component-textfield-min-height":"44px"},"accent":{"--cs-accent":"#F4BA17","--cs-accent-strong":"#916D11","--cs-accent-bright":"#F4BA17","--cs-accent-on":"#45210E","--cs-accent-tint":"#FBF4E9","--cs-accent-ink":"#45210E","--cs-accent-glow":"rgba(244, 186, 23, 0.48)","--cs-accent-grad-a":"#F4BA17","--cs-accent-grad-b":"#C4B78F","--cs-accent-on-strong":"#FFFFFF"},"depth":{"--cs-depth-bg":"0","--cs-depth-section":"5","--cs-depth-card":"10","--cs-depth-nav":"50","--cs-depth-modal":"100","--cs-depth-toast":"200","--cs-depth-dropdown":"60","--cs-depth-overlay":"80"},"glass":{"--cs-glass-whisper-blur":"8px","--cs-glass-whisper-saturate":"110%","--cs-glass-whisper-opacity":"60%","--cs-glass-light-blur":"12px","--cs-glass-light-saturate":"130%","--cs-glass-light-opacity":"70%","--cs-glass-standard-blur":"16px","--cs-glass-standard-saturate":"150%","--cs-glass-standard-opacity":"80%","--cs-glass-heavy-blur":"24px","--cs-glass-heavy-saturate":"180%","--cs-glass-heavy-opacity":"90%"},"shadow":{"--cs-shadow-xs":"0 1px 2px rgba(69, 33, 14, 0.06)","--cs-shadow-sm":"0 1px 3px rgba(69, 33, 14, 0.04), 0 8px 24px rgba(69, 33, 14, 0.06)","--cs-shadow-md":"0 12px 30px rgba(31, 19, 11, 0.18)","--cs-shadow-lg":"0 20px 60px rgba(69, 33, 14, 0.18)","--cs-shadow-xl":"0 24px 80px rgba(31, 19, 11, 0.26)"},"duration":{"--cs-duration-instant":"80ms","--cs-duration-fast":"120ms","--cs-duration-base":"200ms","--cs-duration-slow":"320ms"},"ease":{"--cs-ease-standard":"cubic-bezier(0.2, 0, 0, 1)","--cs-ease-entrance":"cubic-bezier(0, 0, 0, 1)","--cs-ease-exit":"cubic-bezier(0.4, 0, 1, 1)","--cs-ease-emphasized":"cubic-bezier(0.2, 0, 0, 1)"},"space":{"--cs-space-0":"0px","--cs-space-1":"4px","--cs-space-2":"8px","--cs-space-3":"12px","--cs-space-4":"16px","--cs-space-5":"20px","--cs-space-6":"24px","--cs-space-8":"32px","--cs-space-10":"40px","--cs-space-12":"48px","--cs-space-16":"64px","--cs-space-20":"80px","--cs-space-24":"96px"},"radius":{"--cs-radius-sm":"4px","--cs-radius-md":"8px","--cs-radius-lg":"14px","--cs-radius-full":"999px"},"breakpoint":{"--cs-breakpoint-xs":"0px","--cs-breakpoint-phone":"360px","--cs-breakpoint-sm":"640px","--cs-breakpoint-md":"768px","--cs-breakpoint-lg":"1024px","--cs-breakpoint-xl":"1280px","--cs-breakpoint-2xl":"1536px"},"container":{"--cs-container-max":"1320px","--cs-prose-measure":"45rem","--cs-scroll-padding-block-start":"var(--cs-space-4)","--cs-scroll-padding-block-end":"var(--cs-space-4)"},"font":{"--cs-font-family-ui":"'Be Vietnam Pro', ui-sans-serif, system-ui, sans-serif","--cs-font-family-display":"'Space Grotesk', 'Be Vietnam Pro', ui-sans-serif, system-ui, sans-serif","--cs-font-family-mono":"'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace","--cs-font-weight-regular":"400","--cs-font-weight-medium":"500","--cs-font-weight-semibold":"600","--cs-font-weight-bold":"700","--cs-font-weight-extrabold":"800","--cs-font-lineHeight-body":"var(--cs-font-line-height-body)","--cs-font-lineHeight-heading":"var(--cs-font-line-height-heading)","--cs-font-lineHeight-tight":"var(--cs-font-line-height-tight)","--cs-font-size-2xs":"0.6875rem","--cs-font-size-xs":"0.75rem","--cs-font-size-sm":"0.875rem","--cs-font-size-base":"1rem","--cs-font-size-md":"1.125rem","--cs-font-size-lg":"1.25rem","--cs-font-size-xl":"1.5rem","--cs-font-size-2xl":"1.875rem","--cs-font-size-3xl":"2.25rem","--cs-font-size-4xl":"3rem","--cs-font-size-5xl":"3.75rem","--cs-font-line-height-body":"1.5","--cs-font-line-height-heading":"1.35","--cs-font-line-height-tight":"1.15"},"text":{"--cs-text-display":"var(--cs-font-size-5xl)","--cs-text-h1":"var(--cs-font-size-3xl)","--cs-text-h2":"var(--cs-font-size-2xl)","--cs-text-h3":"var(--cs-font-size-xl)","--cs-text-h4":"var(--cs-font-size-lg)","--cs-text-body-lg":"var(--cs-font-size-md)","--cs-text-body":"var(--cs-font-size-base)","--cs-text-secondary":"var(--cs-font-size-sm)","--cs-text-micro":"var(--cs-font-size-2xs)","--cs-text-caption":"var(--cs-font-size-xs)","--cs-text-eyebrow":"var(--cs-font-size-xs)"},"letter":{"--cs-letter-spacing-tight":"-0.01em","--cs-letter-spacing-normal":"0","--cs-letter-spacing-caps":"0.08em"},"heading":{"--cs-heading-family":"var(--cs-font-family-ui)","--cs-heading-weight-strong":"var(--cs-font-weight-extrabold)","--cs-heading-weight":"var(--cs-font-weight-bold)","--cs-heading-tracking":"var(--cs-letter-spacing-tight)"},"icon":{"--cs-icon-sm":"16px","--cs-icon-md":"20px","--cs-icon-lg":"24px"},"doc":{"--cs-doc-ink":"#1A1614","--cs-doc-slate":"#26323A","--cs-doc-fill":"#FDE68A","--cs-doc-fill-ink":"#1A1614"},"density":{"--cs-density-space-1":"var(--cs-space-1)","--cs-density-space-2":"var(--cs-space-2)","--cs-density-space-3":"var(--cs-space-3)","--cs-density-space-4":"var(--cs-space-4)","--cs-density-space-5":"var(--cs-space-5)","--cs-density-space-6":"var(--cs-space-6)","--cs-density-control-gap":"var(--cs-component-button-gap)"}},"themes":{"dark":{"--cs-color-surface-page":"#1a1108","--cs-color-surface-panel":"#221710","--cs-color-surface-raised":"#2b1e14","--cs-color-text-primary":"#f5ead9","--cs-color-text-inverse":"#1a1108","--cs-color-text-accent":"#FECD5D","--cs-color-text-muted":"#E9D6C2","--cs-color-semantic-success":"#4ADE80","--cs-color-semantic-danger":"#FC9895","--cs-color-semantic-warning":"#FBBF24","--cs-color-semantic-info":"#B5D4FD","--cs-color-semantic-success-fg":"#1a1108","--cs-color-semantic-danger-fg":"#1a1108","--cs-color-semantic-warning-fg":"#1a1108","--cs-color-semantic-info-fg":"#1a1108","--cs-color-semantic-success-text":"#68F798","--cs-color-semantic-danger-text":"#FFD2CF","--cs-color-semantic-warning-text":"#FFD887","--cs-color-semantic-info-text":"#C7DFFF","--cs-color-border-default":"#4a3a2c","--cs-color-link":"#FECD5D","--cs-color-link-hover":"#f5ead9","--cs-component-button-primary-bg":"#f4ba17","--cs-component-button-primary-fg":"#1a1108","--cs-component-textfield-border-default":"#5a4636","--cs-shadow-xs":"0 1px 2px rgba(0, 0, 0, 0.40)","--cs-shadow-sm":"0 1px 3px rgba(0, 0, 0, 0.34), 0 8px 24px rgba(0, 0, 0, 0.42)","--cs-shadow-md":"0 12px 30px rgba(0, 0, 0, 0.50)","--cs-shadow-lg":"0 20px 60px rgba(0, 0, 0, 0.55)","--cs-shadow-xl":"0 24px 80px rgba(0, 0, 0, 0.62)"},"system":{"--cs-color-surface-page":"#1a1108","--cs-color-surface-panel":"#221710","--cs-color-surface-raised":"#2b1e14","--cs-color-text-primary":"#f5ead9","--cs-color-text-inverse":"#1a1108","--cs-color-text-accent":"#FECD5D","--cs-color-text-muted":"#E9D6C2","--cs-color-semantic-success":"#4ADE80","--cs-color-semantic-danger":"#FC9895","--cs-color-semantic-warning":"#FBBF24","--cs-color-semantic-info":"#B5D4FD","--cs-color-semantic-success-fg":"#1a1108","--cs-color-semantic-danger-fg":"#1a1108","--cs-color-semantic-warning-fg":"#1a1108","--cs-color-semantic-info-fg":"#1a1108","--cs-color-semantic-success-text":"#68F798","--cs-color-semantic-danger-text":"#FFD2CF","--cs-color-semantic-warning-text":"#FFD887","--cs-color-semantic-info-text":"#C7DFFF","--cs-color-border-default":"#4a3a2c","--cs-color-link":"#FECD5D","--cs-color-link-hover":"#f5ead9","--cs-component-button-primary-bg":"#f4ba17","--cs-component-button-primary-fg":"#1a1108","--cs-component-textfield-border-default":"#5a4636","--cs-shadow-xs":"0 1px 2px rgba(0, 0, 0, 0.40)","--cs-shadow-sm":"0 1px 3px rgba(0, 0, 0, 0.34), 0 8px 24px rgba(0, 0, 0, 0.42)","--cs-shadow-md":"0 12px 30px rgba(0, 0, 0, 0.50)","--cs-shadow-lg":"0 20px 60px rgba(0, 0, 0, 0.55)","--cs-shadow-xl":"0 24px 80px rgba(0, 0, 0, 0.62)"}},"elements":{"tho.sand":{"--cs-accent":"#F9E3A7","--cs-accent-strong":"#856A03","--cs-accent-bright":"#FDEAB7","--cs-accent-on":"#271E06","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#FEF8E7","--cs-accent-ink":"#292108","--cs-accent-glow":"rgba(249, 227, 167, 0.48)","--cs-accent-grad-a":"#F9E3A7","--cs-accent-grad-b":"#C4B78F","--cs-color-text-accent":"#695300","--cs-color-link":"#695300"},"tho":{"--cs-accent":"#F4BA17","--cs-accent-strong":"#916D11","--cs-accent-bright":"#F4BA17","--cs-accent-on":"#45210E","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#FBF4E9","--cs-accent-ink":"#45210E","--cs-accent-glow":"rgba(244, 186, 23, 0.48)","--cs-accent-grad-a":"#F4BA17","--cs-accent-grad-b":"#C4B78F","--cs-color-text-accent":"#6E3B0E","--cs-color-link":"#644A05"},"tho.clay":{"--cs-accent":"#723E06","--cs-accent-strong":"#5A3004","--cs-accent-bright":"#F2C5A3","--cs-accent-on":"#080200","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#FCEEE3","--cs-accent-ink":"#321B07","--cs-accent-glow":"rgba(114, 62, 6, 0.48)","--cs-accent-grad-a":"#723E06","--cs-accent-grad-b":"#C4B78F","--cs-color-text-accent":"#462402","--cs-color-link":"#462402"},"hoa.plasma":{"--cs-accent":"#FEDBDC","--cs-accent-strong":"#896163","--cs-accent-bright":"#FFE3E4","--cs-accent-on":"#281B1C","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#FFF5F5","--cs-accent-ink":"#2B1E1E","--cs-accent-glow":"rgba(254, 219, 220, 0.48)","--cs-accent-grad-a":"#FEDBDC","--cs-accent-grad-b":"#F4BA17","--cs-color-text-accent":"#714B4D","--cs-color-link":"#714B4D"},"hoa":{"--cs-accent":"#FC9C69","--cs-accent-strong":"#96440B","--cs-accent-bright":"#FFD3BD","--cs-accent-on":"#361402","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#FFF1EA","--cs-accent-ink":"#3A1501","--cs-accent-glow":"rgba(252, 156, 105, 0.48)","--cs-accent-grad-a":"#FC9C69","--cs-accent-grad-b":"#F4BA17","--cs-color-text-accent":"#793609","--cs-color-link":"#793609"},"hoa.lava":{"--cs-accent":"#93050F","--cs-accent-strong":"#760008","--cs-accent-bright":"#FFBCB4","--cs-accent-on":"#0D0000","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#FFEBE9","--cs-accent-ink":"#400C0B","--cs-accent-glow":"rgba(147, 5, 15, 0.48)","--cs-accent-grad-a":"#93050F","--cs-accent-grad-b":"#F4BA17","--cs-color-text-accent":"#550306","--cs-color-link":"#550306"},"thuy.mist":{"--cs-accent":"#9DF7F5","--cs-accent-strong":"#037D7D","--cs-accent-bright":"#B1FBF9","--cs-accent-on":"#012525","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#E6FDFC","--cs-accent-ink":"#032727","--cs-accent-glow":"rgba(157, 247, 245, 0.48)","--cs-accent-grad-a":"#9DF7F5","--cs-accent-grad-b":"#82CF66","--cs-color-text-accent":"#116060","--cs-color-link":"#116060"},"thuy":{"--cs-accent":"#00CEE4","--cs-accent-strong":"#166B76","--cs-accent-bright":"#94EFFD","--cs-accent-on":"#012429","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#DFFBFF","--cs-accent-ink":"#03272C","--cs-accent-glow":"rgba(0, 206, 228, 0.48)","--cs-accent-grad-a":"#00CEE4","--cs-accent-grad-b":"#82CF66","--cs-color-text-accent":"#0D535C","--cs-color-link":"#0D535C"},"thuy.ocean":{"--cs-accent":"#06556F","--cs-accent-strong":"#034257","--cs-accent-bright":"#A9D8ED","--cs-accent-on":"#001721","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#E5F3FA","--cs-accent-ink":"#092531","--cs-accent-glow":"rgba(6, 85, 111, 0.48)","--cs-accent-grad-a":"#06556F","--cs-accent-grad-b":"#82CF66","--cs-color-text-accent":"#003142","--cs-color-link":"#003142"},"moc.bamboo":{"--cs-accent":"#DAEFAA","--cs-accent-strong":"#62780E","--cs-accent-bright":"#E2F4BA","--cs-accent-on":"#1C2307","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#F5FBE8","--cs-accent-ink":"#1E250A","--cs-accent-glow":"rgba(218, 239, 170, 0.48)","--cs-accent-grad-a":"#DAEFAA","--cs-accent-grad-b":"#FC9C69","--cs-color-text-accent":"#4A5B02","--cs-color-link":"#4A5B02"},"moc":{"--cs-accent":"#82CF66","--cs-accent-strong":"#2B7100","--cs-accent-bright":"#B9F0A6","--cs-accent-on":"#0A2700","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#EAFAE5","--cs-accent-ink":"#0D2902","--cs-accent-glow":"rgba(130, 207, 102, 0.48)","--cs-accent-grad-a":"#82CF66","--cs-accent-grad-b":"#FC9C69","--cs-color-text-accent":"#24570B","--cs-color-link":"#24570B"},"moc.forest":{"--cs-accent":"#105C36","--cs-accent-strong":"#0A4829","--cs-accent-bright":"#ACDDBD","--cs-accent-on":"#011C0D","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#E6F5EB","--cs-accent-ink":"#0B2818","--cs-accent-glow":"rgba(16, 92, 54, 0.48)","--cs-accent-grad-a":"#105C36","--cs-accent-grad-b":"#FC9C69","--cs-color-text-accent":"#04361D","--cs-color-link":"#04361D"},"kim.titanium":{"--cs-accent":"#D3E7FC","--cs-accent-strong":"#56708B","--cs-accent-bright":"#DDEDFF","--cs-accent-on":"#182029","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#F3F8FE","--cs-accent-ink":"#1A232B","--cs-accent-glow":"rgba(211, 231, 252, 0.48)","--cs-accent-grad-a":"#D3E7FC","--cs-accent-grad-b":"#00CEE4","--cs-color-text-accent":"#3D5670","--cs-color-link":"#3D5670"},"kim":{"--cs-accent":"#C4B78F","--cs-accent-strong":"#6A5E3A","--cs-accent-bright":"#E8DEBD","--cs-accent-on":"#241F0F","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#F8F4EA","--cs-accent-ink":"#262112","--cs-accent-glow":"rgba(196, 183, 143, 0.48)","--cs-accent-grad-a":"#C4B78F","--cs-accent-grad-b":"#00CEE4","--cs-color-text-accent":"#564B27","--cs-color-link":"#564B27"},"kim.steel":{"--cs-accent":"#384D72","--cs-accent-strong":"#293C5C","--cs-accent-bright":"#BED0F0","--cs-accent-on":"#020818","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#EBF1FB","--cs-accent-ink":"#182232","--cs-accent-glow":"rgba(56, 77, 114, 0.48)","--cs-accent-grad-a":"#384D72","--cs-accent-grad-b":"#00CEE4","--cs-color-text-accent":"#1B2E4C","--cs-color-link":"#1B2E4C"}},"densities":{"compact":{"--cs-density-space-1":"3px","--cs-density-space-2":"6px","--cs-density-space-3":"9px","--cs-density-space-4":"12px","--cs-density-space-5":"16px","--cs-density-space-6":"18px","--cs-density-control-gap":"6px","--cs-component-button-gap":"6px","--cs-component-button-xs-paddingY":"var(--cs-component-button-xs-padding-y)","--cs-component-button-xs-padding-y":"3px","--cs-component-button-xs-paddingX":"var(--cs-component-button-xs-padding-x)","--cs-component-button-xs-padding-x":"8px","--cs-component-button-sm-paddingY":"var(--cs-component-button-sm-padding-y)","--cs-component-button-sm-padding-y":"6px","--cs-component-button-sm-paddingX":"var(--cs-component-button-sm-padding-x)","--cs-component-button-sm-padding-x":"12px","--cs-component-button-md-paddingY":"var(--cs-component-button-md-padding-y)","--cs-component-button-md-padding-y":"10px","--cs-component-button-md-paddingX":"var(--cs-component-button-md-padding-x)","--cs-component-button-md-padding-x":"16px","--cs-component-button-lg-paddingY":"var(--cs-component-button-lg-padding-y)","--cs-component-button-lg-padding-y":"12px","--cs-component-button-lg-paddingX":"var(--cs-component-button-lg-padding-x)","--cs-component-button-lg-padding-x":"22px","--cs-component-textfield-paddingY":"var(--cs-component-textfield-padding-y)","--cs-component-textfield-padding-y":"8px","--cs-component-textfield-paddingX":"var(--cs-component-textfield-padding-x)","--cs-component-textfield-padding-x":"10px"},"comfortable":{"--cs-density-space-1":"var(--cs-space-1)","--cs-density-space-2":"var(--cs-space-2)","--cs-density-space-3":"var(--cs-space-3)","--cs-density-space-4":"var(--cs-space-4)","--cs-density-space-5":"var(--cs-space-5)","--cs-density-space-6":"var(--cs-space-6)","--cs-density-control-gap":"var(--cs-component-button-gap)","--cs-component-button-gap":"8px","--cs-component-button-xs-padding-y":"4px","--cs-component-button-xs-paddingY":"var(--cs-component-button-xs-padding-y)","--cs-component-button-xs-padding-x":"10px","--cs-component-button-xs-paddingX":"var(--cs-component-button-xs-padding-x)","--cs-component-button-sm-padding-y":"8px","--cs-component-button-sm-paddingY":"var(--cs-component-button-sm-padding-y)","--cs-component-button-sm-padding-x":"14px","--cs-component-button-sm-paddingX":"var(--cs-component-button-sm-padding-x)","--cs-component-button-md-padding-y":"12px","--cs-component-button-md-paddingY":"var(--cs-component-button-md-padding-y)","--cs-component-button-md-padding-x":"20px","--cs-component-button-md-paddingX":"var(--cs-component-button-md-padding-x)","--cs-component-button-lg-padding-y":"16px","--cs-component-button-lg-paddingY":"var(--cs-component-button-lg-padding-y)","--cs-component-button-lg-padding-x":"28px","--cs-component-button-lg-paddingX":"var(--cs-component-button-lg-padding-x)","--cs-component-textfield-padding-y":"10px","--cs-component-textfield-paddingY":"var(--cs-component-textfield-padding-y)","--cs-component-textfield-padding-x":"12px","--cs-component-textfield-paddingX":"var(--cs-component-textfield-padding-x)"}},"contrasts":{"high-light":{"--cs-color-border-default":"#9a8060","--cs-color-text-muted":"#45210E"},"high-dark":{"--cs-color-border-default":"#7a6450","--cs-color-text-muted":"#F5EAD9"}}};Object.assign(__ds_scope,{tokens,__ds_default_tokens_tokens_9gob35:tokens})})()}catch(e){__ds_ns.__errors.push({path:"tokens/tokens.js",error:String(e&&e.message||e)})}__ds_ns.AIDisclosureBadge=__ds_scope.AIDisclosureBadge;__ds_ns.ChatMessage=__ds_scope.ChatMessage;__ds_ns.CitationList=__ds_scope.CitationList;__ds_ns.ConfidenceMeter=__ds_scope.ConfidenceMeter;__ds_ns.HumanReviewGate=__ds_scope.HumanReviewGate;__ds_ns.PromptInput=__ds_scope.PromptInput;__ds_ns.PromptSuggestions=__ds_scope.PromptSuggestions;__ds_ns.TypingIndicator=__ds_scope.TypingIndicator;__ds_ns.LumiAvatar=__ds_scope.LumiAvatar;__ds_ns.Button=__ds_scope.Button;__ds_ns.ButtonGroup=__ds_scope.ButtonGroup;__ds_ns.FloatingActionButton=__ds_scope.FloatingActionButton;__ds_ns.Accordion=__ds_scope.Accordion;__ds_ns.AspectRatio=__ds_scope.AspectRatio;__ds_ns.Avatar=__ds_scope.Avatar;__ds_ns.AvatarGroup=__ds_scope.AvatarGroup;__ds_ns.Card=__ds_scope.Card;__ds_ns.CardHeader=__ds_scope.CardHeader;__ds_ns.CardBody=__ds_scope.CardBody;__ds_ns.CardFooter=__ds_scope.CardFooter;__ds_ns.Carousel=__ds_scope.Carousel;__ds_ns.Chart=__ds_scope.Chart;__ds_ns.CodeBlock=__ds_scope.CodeBlock;__ds_ns.Collapsible=__ds_scope.Collapsible;__ds_ns.Comment=__ds_scope.Comment;__ds_ns.DescriptionList=__ds_scope.DescriptionList;__ds_ns.Divider=__ds_scope.Divider;__ds_ns.Image=__ds_scope.Image;__ds_ns.Item=__ds_scope.Item;__ds_ns.Kbd=__ds_scope.Kbd;__ds_ns.List=__ds_scope.List;__ds_ns.ListItem=__ds_scope.ListItem;__ds_ns.Masonry=__ds_scope.Masonry;__ds_ns.QRCode=__ds_scope.QRCode;__ds_ns.ScrollArea=__ds_scope.ScrollArea;__ds_ns.Sortable=__ds_scope.Sortable;__ds_ns.Splitter=__ds_scope.Splitter;__ds_ns.Stat=__ds_scope.Stat;__ds_ns.Terminal=__ds_scope.Terminal;__ds_ns.Timeline=__ds_scope.Timeline;__ds_ns.Tooltip=__ds_scope.Tooltip;__ds_ns.Tree=__ds_scope.Tree;__ds_ns.Watermark=__ds_scope.Watermark;__ds_ns.DataGrid=__ds_scope.DataGrid;__ds_ns.DataTable=__ds_scope.DataTable;__ds_ns.TreeTable=__ds_scope.TreeTable;__ds_ns.Dialog=__ds_scope.Dialog;__ds_ns.Alert=__ds_scope.Alert;__ds_ns.Badge=__ds_scope.Badge;__ds_ns.EmptyState=__ds_scope.EmptyState;__ds_ns.ProgressBar=__ds_scope.ProgressBar;__ds_ns.Result=__ds_scope.Result;__ds_ns.Skeleton=__ds_scope.Skeleton;__ds_ns.Spinner=__ds_scope.Spinner;__ds_ns.StatusIndicator=__ds_scope.StatusIndicator;__ds_ns.Tag=__ds_scope.Tag;__ds_ns.ToastStack=__ds_scope.ToastStack;__ds_ns.Toast=__ds_scope.Toast;__ds_ns.Calendar=__ds_scope.Calendar;__ds_ns.Cascader=__ds_scope.Cascader;__ds_ns.Checkbox=__ds_scope.Checkbox;__ds_ns.ColorPicker=__ds_scope.ColorPicker;__ds_ns.Combobox=__ds_scope.Combobox;__ds_ns.DatePicker=__ds_scope.DatePicker;__ds_ns.Editor=__ds_scope.Editor;__ds_ns.FileUpload=__ds_scope.FileUpload;__ds_ns.Form=__ds_scope.Form;__ds_ns.FormField=__ds_scope.FormField;__ds_ns.FormFieldArray=__ds_scope.FormFieldArray;__ds_ns.FormWizard=__ds_scope.FormWizard;__ds_ns.InlineEdit=__ds_scope.InlineEdit;__ds_ns.InputGroup=__ds_scope.InputGroup;__ds_ns.InputOTP=__ds_scope.InputOTP;__ds_ns.Mentions=__ds_scope.Mentions;__ds_ns.NativeSelect=__ds_scope.NativeSelect;__ds_ns.NumberField=__ds_scope.NumberField;__ds_ns.Radio=__ds_scope.Radio;__ds_ns.RadioGroup=__ds_scope.RadioGroup;__ds_ns.Rating=__ds_scope.Rating;__ds_ns.SearchField=__ds_scope.SearchField;__ds_ns.SegmentedControl=__ds_scope.SegmentedControl;__ds_ns.Select=__ds_scope.Select;__ds_ns.Slider=__ds_scope.Slider;__ds_ns.Switch=__ds_scope.Switch;__ds_ns.TagInput=__ds_scope.TagInput;__ds_ns.Textarea=__ds_scope.Textarea;__ds_ns.TimePicker=__ds_scope.TimePicker;__ds_ns.Toggle=__ds_scope.Toggle;__ds_ns.Transfer=__ds_scope.Transfer;__ds_ns.TreeSelect=__ds_scope.TreeSelect;__ds_ns.EDITOR_SCHEMA=__ds_scope.EDITOR_SCHEMA;__ds_ns.LocaleProvider=__ds_scope.LocaleProvider;__ds_ns.useMessages=__ds_scope.useMessages;__ds_ns.CS_ICONS=__ds_scope.CS_ICONS;__ds_ns.Icon=__ds_scope.Icon;__ds_ns.Logo=__ds_scope.Logo;__ds_ns.CS_LOGO_VIEWBOX=__ds_scope.CS_LOGO_VIEWBOX;__ds_ns.CS_LOGO_MARK_INNER=__ds_scope.CS_LOGO_MARK_INNER;__ds_ns.Anchor=__ds_scope.Anchor;__ds_ns.BackTop=__ds_scope.BackTop;__ds_ns.Breadcrumb=__ds_scope.Breadcrumb;__ds_ns.CommandPalette=__ds_scope.CommandPalette;__ds_ns.Dock=__ds_scope.Dock;__ds_ns.HotKeys=__ds_scope.HotKeys;__ds_ns.Link=__ds_scope.Link;__ds_ns.Menu=__ds_scope.Menu;__ds_ns.MenuItem=__ds_scope.MenuItem;__ds_ns.Menubar=__ds_scope.Menubar;__ds_ns.NavigationMenu=__ds_scope.NavigationMenu;__ds_ns.Pagination=__ds_scope.Pagination;__ds_ns.Sidebar=__ds_scope.Sidebar;__ds_ns.NavItem=__ds_scope.NavItem;__ds_ns.Steps=__ds_scope.Steps;__ds_ns.Tabs=__ds_scope.Tabs;__ds_ns.Tab=__ds_scope.Tab;__ds_ns.Toolbar=__ds_scope.Toolbar;__ds_ns.AlertDialog=__ds_scope.AlertDialog;__ds_ns.ContextMenu=__ds_scope.ContextMenu;__ds_ns.Drawer=__ds_scope.Drawer;__ds_ns.HoverCard=__ds_scope.HoverCard;__ds_ns.OverlayProvider=__ds_scope.OverlayProvider;__ds_ns.Popconfirm=__ds_scope.Popconfirm;__ds_ns.Popover=__ds_scope.Popover;__ds_ns.Tour=__ds_scope.Tour;__ds_ns.TextField=__ds_scope.TextField})();
1
+ /* @ds-bundle: {"format":4,"namespace":"CyberSkillDesignSystem_847b3c","components":[{"name":"AIDisclosureBadge","sourcePath":"components/ai/AIDisclosureBadge.jsx"},{"name":"ChatMessage","sourcePath":"components/ai/ChatMessage.jsx"},{"name":"CitationList","sourcePath":"components/ai/CitationList.jsx"},{"name":"ConfidenceMeter","sourcePath":"components/ai/ConfidenceMeter.jsx"},{"name":"HumanReviewGate","sourcePath":"components/ai/HumanReviewGate.jsx"},{"name":"PromptInput","sourcePath":"components/ai/PromptInput.jsx"},{"name":"PromptSuggestions","sourcePath":"components/ai/PromptSuggestions.jsx"},{"name":"TypingIndicator","sourcePath":"components/ai/TypingIndicator.jsx"},{"name":"LumiAvatar","sourcePath":"components/brand/LumiAvatar.jsx"},{"name":"Button","sourcePath":"components/button/Button.jsx"},{"name":"ButtonGroup","sourcePath":"components/button/ButtonGroup.jsx"},{"name":"FloatingActionButton","sourcePath":"components/button/FloatingActionButton.jsx"},{"name":"Accordion","sourcePath":"components/data/Accordion.jsx"},{"name":"AspectRatio","sourcePath":"components/data/AspectRatio.jsx"},{"name":"Avatar","sourcePath":"components/data/Avatar.jsx"},{"name":"AvatarGroup","sourcePath":"components/data/Avatar.jsx"},{"name":"Card","sourcePath":"components/data/Card.jsx"},{"name":"CardHeader","sourcePath":"components/data/Card.jsx"},{"name":"CardBody","sourcePath":"components/data/Card.jsx"},{"name":"CardFooter","sourcePath":"components/data/Card.jsx"},{"name":"Carousel","sourcePath":"components/data/Carousel.jsx"},{"name":"Chart","sourcePath":"components/data/Chart.jsx"},{"name":"CodeBlock","sourcePath":"components/data/CodeBlock.jsx"},{"name":"Collapsible","sourcePath":"components/data/Collapsible.jsx"},{"name":"Comment","sourcePath":"components/data/Comment.jsx"},{"name":"DescriptionList","sourcePath":"components/data/DescriptionList.jsx"},{"name":"Divider","sourcePath":"components/data/Divider.jsx"},{"name":"Image","sourcePath":"components/data/Image.jsx"},{"name":"Item","sourcePath":"components/data/Item.jsx"},{"name":"Kbd","sourcePath":"components/data/Kbd.jsx"},{"name":"List","sourcePath":"components/data/List.jsx"},{"name":"ListItem","sourcePath":"components/data/List.jsx"},{"name":"Masonry","sourcePath":"components/data/Masonry.jsx"},{"name":"QRCode","sourcePath":"components/data/QRCode.jsx"},{"name":"ScrollArea","sourcePath":"components/data/ScrollArea.jsx"},{"name":"Sortable","sourcePath":"components/data/Sortable.jsx"},{"name":"Splitter","sourcePath":"components/data/Splitter.jsx"},{"name":"Stat","sourcePath":"components/data/Stat.jsx"},{"name":"Terminal","sourcePath":"components/data/Terminal.jsx"},{"name":"Timeline","sourcePath":"components/data/Timeline.jsx"},{"name":"Tooltip","sourcePath":"components/data/Tooltip.jsx"},{"name":"Tree","sourcePath":"components/data/Tree.jsx"},{"name":"Watermark","sourcePath":"components/data/Watermark.jsx"},{"name":"DataGrid","sourcePath":"components/datatable/DataGrid.jsx"},{"name":"DataTable","sourcePath":"components/datatable/DataTable.jsx"},{"name":"TreeTable","sourcePath":"components/datatable/TreeTable.jsx"},{"name":"Dialog","sourcePath":"components/dialog/Dialog.jsx"},{"name":"Alert","sourcePath":"components/feedback/Alert.jsx"},{"name":"Badge","sourcePath":"components/feedback/Badge.jsx"},{"name":"EmptyState","sourcePath":"components/feedback/EmptyState.jsx"},{"name":"ProgressBar","sourcePath":"components/feedback/ProgressBar.jsx"},{"name":"Result","sourcePath":"components/feedback/Result.jsx"},{"name":"Skeleton","sourcePath":"components/feedback/Skeleton.jsx"},{"name":"Spinner","sourcePath":"components/feedback/Spinner.jsx"},{"name":"StatusIndicator","sourcePath":"components/feedback/StatusIndicator.jsx"},{"name":"Tag","sourcePath":"components/feedback/Tag.jsx"},{"name":"ToastStack","sourcePath":"components/feedback/Toast.jsx"},{"name":"Toast","sourcePath":"components/feedback/Toast.jsx"},{"name":"Calendar","sourcePath":"components/forms/Calendar.jsx"},{"name":"Cascader","sourcePath":"components/forms/Cascader.jsx"},{"name":"Checkbox","sourcePath":"components/forms/Checkbox.jsx"},{"name":"ColorPicker","sourcePath":"components/forms/ColorPicker.jsx"},{"name":"Combobox","sourcePath":"components/forms/Combobox.jsx"},{"name":"DatePicker","sourcePath":"components/forms/DatePicker.jsx"},{"name":"Editor","sourcePath":"components/forms/Editor.jsx"},{"name":"FileUpload","sourcePath":"components/forms/FileUpload.jsx"},{"name":"Form","sourcePath":"components/forms/Form.jsx"},{"name":"FormField","sourcePath":"components/forms/Form.jsx"},{"name":"FormFieldArray","sourcePath":"components/forms/Form.jsx"},{"name":"FormWizard","sourcePath":"components/forms/Form.jsx"},{"name":"InlineEdit","sourcePath":"components/forms/InlineEdit.jsx"},{"name":"InputGroup","sourcePath":"components/forms/InputGroup.jsx"},{"name":"InputOTP","sourcePath":"components/forms/InputOTP.jsx"},{"name":"Mentions","sourcePath":"components/forms/Mentions.jsx"},{"name":"NativeSelect","sourcePath":"components/forms/NativeSelect.jsx"},{"name":"NumberField","sourcePath":"components/forms/NumberField.jsx"},{"name":"Radio","sourcePath":"components/forms/RadioGroup.jsx"},{"name":"RadioGroup","sourcePath":"components/forms/RadioGroup.jsx"},{"name":"Rating","sourcePath":"components/forms/Rating.jsx"},{"name":"SearchField","sourcePath":"components/forms/SearchField.jsx"},{"name":"SegmentedControl","sourcePath":"components/forms/SegmentedControl.jsx"},{"name":"Select","sourcePath":"components/forms/Select.jsx"},{"name":"Slider","sourcePath":"components/forms/Slider.jsx"},{"name":"Switch","sourcePath":"components/forms/Switch.jsx"},{"name":"TagInput","sourcePath":"components/forms/TagInput.jsx"},{"name":"Textarea","sourcePath":"components/forms/Textarea.jsx"},{"name":"TimePicker","sourcePath":"components/forms/TimePicker.jsx"},{"name":"Toggle","sourcePath":"components/forms/Toggle.jsx"},{"name":"Transfer","sourcePath":"components/forms/Transfer.jsx"},{"name":"TreeSelect","sourcePath":"components/forms/TreeSelect.jsx"},{"name":"EDITOR_SCHEMA","sourcePath":"components/forms/editor-schema.js"},{"name":"LocaleProvider","sourcePath":"components/i18n/LocaleProvider.jsx"},{"name":"useMessages","sourcePath":"components/i18n/LocaleProvider.jsx"},{"name":"CS_ICONS","sourcePath":"components/icon/Icon.jsx"},{"name":"Icon","sourcePath":"components/icon/Icon.jsx"},{"name":"Logo","sourcePath":"components/logo/Logo.jsx"},{"name":"CS_LOGO_VIEWBOX","sourcePath":"components/logo/logo-data.js"},{"name":"CS_LOGO_MARK_INNER","sourcePath":"components/logo/logo-data.js"},{"name":"Anchor","sourcePath":"components/navigation/Anchor.jsx"},{"name":"BackTop","sourcePath":"components/navigation/BackTop.jsx"},{"name":"Breadcrumb","sourcePath":"components/navigation/Breadcrumb.jsx"},{"name":"CommandPalette","sourcePath":"components/navigation/CommandPalette.jsx"},{"name":"Dock","sourcePath":"components/navigation/Dock.jsx"},{"name":"HotKeys","sourcePath":"components/navigation/HotKeys.jsx"},{"name":"Link","sourcePath":"components/navigation/Link.jsx"},{"name":"Menu","sourcePath":"components/navigation/Menu.jsx"},{"name":"MenuItem","sourcePath":"components/navigation/Menu.jsx"},{"name":"Menubar","sourcePath":"components/navigation/Menubar.jsx"},{"name":"NavigationMenu","sourcePath":"components/navigation/NavigationMenu.jsx"},{"name":"Pagination","sourcePath":"components/navigation/Pagination.jsx"},{"name":"Sidebar","sourcePath":"components/navigation/Sidebar.jsx"},{"name":"NavItem","sourcePath":"components/navigation/Sidebar.jsx"},{"name":"Steps","sourcePath":"components/navigation/Steps.jsx"},{"name":"Tabs","sourcePath":"components/navigation/Tabs.jsx"},{"name":"Tab","sourcePath":"components/navigation/Tabs.jsx"},{"name":"Toolbar","sourcePath":"components/navigation/Toolbar.jsx"},{"name":"AlertDialog","sourcePath":"components/overlays/AlertDialog.jsx"},{"name":"ContextMenu","sourcePath":"components/overlays/ContextMenu.jsx"},{"name":"Drawer","sourcePath":"components/overlays/Drawer.jsx"},{"name":"HoverCard","sourcePath":"components/overlays/HoverCard.jsx"},{"name":"OverlayProvider","sourcePath":"components/overlays/OverlayManager.jsx"},{"name":"Popconfirm","sourcePath":"components/overlays/Popconfirm.jsx"},{"name":"Popover","sourcePath":"components/overlays/Popover.jsx"},{"name":"Tour","sourcePath":"components/overlays/Tour.jsx"},{"name":"TextField","sourcePath":"components/textfield/TextField.jsx"}],"sourceHashes":{"components/_i18n/i18n.js":"ea69f4f43816","components/_i18n/strings.js":"ffedd19ed9ea","components/_utils/cx.js":"ad6a747ea116","components/_utils/field-association.js":"692c40e3e1be","components/_utils/floating-panel.js":"23239258bd82","components/_utils/floating-position.js":"b8ca0a589a5a","components/_utils/open-change.js":"7038e3bb290c","components/_utils/refs.js":"e3bc17a04584","components/_utils/renderCount.js":"bee2dce5fdd6","components/_utils/use-client-layout-effect.js":"ad9fb69fd4a4","components/_utils/use-overlay-surface.js":"3e73a204593b","components/ai/AIDisclosureBadge.jsx":"3b9d32551351","components/ai/ChatMessage.jsx":"b6fe36ea61af","components/ai/CitationList.jsx":"dc3f9e04b716","components/ai/ConfidenceMeter.jsx":"90ee1079775f","components/ai/HumanReviewGate.jsx":"0b0ce36ffa11","components/ai/PromptInput.jsx":"af962b0e65d4","components/ai/PromptSuggestions.jsx":"c4c6fca2eb27","components/ai/TypingIndicator.jsx":"a367cad65800","components/brand/LumiAvatar.jsx":"aef2a9a8be4e","components/button/Button.jsx":"198c46d2c90a","components/button/ButtonGroup.jsx":"64726fc0b33a","components/button/FloatingActionButton.jsx":"2c13907fa52c","components/data/Accordion.jsx":"2bd0ed6b7ddb","components/data/AspectRatio.jsx":"702957661817","components/data/Avatar.jsx":"9088033b5797","components/data/Card.jsx":"37a0eb43b0fd","components/data/Carousel.jsx":"21422bad1971","components/data/Chart.jsx":"04ada47476df","components/data/CodeBlock.jsx":"a0bbfb0874c1","components/data/Collapsible.jsx":"6dfb148c5938","components/data/Comment.jsx":"08be70ef2910","components/data/DescriptionList.jsx":"8aed2b747130","components/data/Divider.jsx":"28239cea9e76","components/data/Image.jsx":"7341c2593dfb","components/data/Item.jsx":"525c6e1034e5","components/data/Kbd.jsx":"f171f19f669a","components/data/List.jsx":"f33cd6ae9b7c","components/data/Masonry.jsx":"86ffb4c1e1fb","components/data/QRCode.jsx":"0df916a87ae5","components/data/ScrollArea.jsx":"2bdf99b2f7c2","components/data/Sortable.jsx":"de39e14bb065","components/data/Splitter.jsx":"dba77796d22d","components/data/Stat.jsx":"748ee679d2fc","components/data/Terminal.jsx":"0e3c5aff1c9d","components/data/Timeline.jsx":"3289633a5729","components/data/Tooltip.jsx":"092338240216","components/data/Tree.jsx":"09a331fb6048","components/data/Watermark.jsx":"1f478e37babe","components/data/qr-encode.js":"844b78fabee5","components/datatable/DataGrid.jsx":"e1c12c99dee3","components/datatable/DataTable.jsx":"2982f89295d1","components/datatable/TreeTable.jsx":"0f050c7e325b","components/dialog/Dialog.jsx":"69ea5f27ca85","components/feedback/Alert.jsx":"00beec82c17f","components/feedback/Badge.jsx":"6eeac438173e","components/feedback/EmptyState.jsx":"324d3ac33620","components/feedback/ProgressBar.jsx":"6b5e69900ba7","components/feedback/Result.jsx":"3977aaa50e38","components/feedback/Skeleton.jsx":"56b00bf55c72","components/feedback/Spinner.jsx":"dc4addb99ec3","components/feedback/StatusIndicator.jsx":"b969e7713b3e","components/feedback/Tag.jsx":"8b6415fd3811","components/feedback/Toast.jsx":"600f0efdcc28","components/forms/Calendar.jsx":"9300c818b4a4","components/forms/Cascader.jsx":"60217f041dd7","components/forms/Checkbox.jsx":"19491fd53a0a","components/forms/ColorPicker.jsx":"64da95eccfc3","components/forms/Combobox.jsx":"bae42bd62970","components/forms/DatePicker.jsx":"7a2fadb7759d","components/forms/Editor.jsx":"dcb9dd625cac","components/forms/FileUpload.jsx":"5a37afe44694","components/forms/Form.jsx":"fc33716feb9f","components/forms/InlineEdit.jsx":"45b36df70b17","components/forms/InputGroup.jsx":"0bd2e8f408f1","components/forms/InputOTP.jsx":"fe278664ea6b","components/forms/Mentions.jsx":"324a1ef9e7b9","components/forms/NativeSelect.jsx":"fc49d3ff729c","components/forms/NumberField.jsx":"f2dfbf219d37","components/forms/RadioGroup.jsx":"b72f44677071","components/forms/Rating.jsx":"3d545ce0192b","components/forms/SearchField.jsx":"44a861064011","components/forms/SegmentedControl.jsx":"acf7e576e168","components/forms/Select.jsx":"a87c83c27831","components/forms/Slider.jsx":"409856d4cdba","components/forms/Switch.jsx":"a321971bc38a","components/forms/TagInput.jsx":"775a7e229226","components/forms/Textarea.jsx":"8a7c960a4b7b","components/forms/TimePicker.jsx":"0537c564b214","components/forms/Toggle.jsx":"0527c9533072","components/forms/Transfer.jsx":"2a1c824ff9a0","components/forms/TreeSelect.jsx":"3d5d1ef69f6e","components/forms/editor-parser.js":"1306c442e12d","components/forms/editor-schema.js":"a996ec9b4b88","components/i18n/LocaleProvider.jsx":"5545f338df72","components/icon/Icon.jsx":"c1d7d63c7309","components/logo/Logo.jsx":"a4c5fe0cf5cb","components/logo/logo-data.js":"f1a251a50c8f","components/navigation/Anchor.jsx":"8907d6bfe9ae","components/navigation/BackTop.jsx":"d8ad1e190a86","components/navigation/Breadcrumb.jsx":"205de44c5157","components/navigation/CommandPalette.jsx":"4d01c61f1a03","components/navigation/Dock.jsx":"77956d94bda2","components/navigation/HotKeys.jsx":"bcdf9afdf1b9","components/navigation/Link.jsx":"d4406a6a38f0","components/navigation/Menu.jsx":"d52fc45cfca5","components/navigation/Menubar.jsx":"c53128a82420","components/navigation/NavigationMenu.jsx":"2d8e2f9cc80d","components/navigation/Pagination.jsx":"1f8c7370a149","components/navigation/Sidebar.jsx":"f2a96bdbab2d","components/navigation/Steps.jsx":"82b14258d351","components/navigation/Tabs.jsx":"551a0dc725d8","components/navigation/Toolbar.jsx":"37051ca58d60","components/overlays/AlertDialog.jsx":"4da78ce1d38a","components/overlays/ContextMenu.jsx":"31ac2665583b","components/overlays/Drawer.jsx":"4fa7fd441117","components/overlays/HoverCard.jsx":"575ff663edf9","components/overlays/OverlayManager.jsx":"32ffa7dcba29","components/overlays/Popconfirm.jsx":"53d59355a442","components/overlays/Popover.jsx":"1ca5d2905995","components/overlays/Tour.jsx":"74775e9b0740","components/textfield/TextField.jsx":"878810214bb3","tokens/tokens.js":"8413707b6c19"},"inlinedExternals":[],"unexposedExports":[{"name":"associateFieldProps","sourcePath":"components/_utils/field-association.js"},{"name":"attachFocusTrap","sourcePath":"components/overlays/OverlayManager.jsx"},{"name":"cx","sourcePath":"components/_utils/cx.js"},{"name":"escapeEditorText","sourcePath":"components/forms/editor-schema.js"},{"name":"fieldAssociationContext","sourcePath":"components/_utils/field-association.js"},{"name":"fieldMessages","sourcePath":"components/_utils/field-association.js"},{"name":"floatingPlacements","sourcePath":"components/_utils/floating-position.js"},{"name":"floatingPosition","sourcePath":"components/_utils/floating-position.js"},{"name":"focusableSelector","sourcePath":"components/overlays/OverlayManager.jsx"},{"name":"formatCurrency","sourcePath":"components/_i18n/i18n.js"},{"name":"formatDate","sourcePath":"components/_i18n/i18n.js"},{"name":"formatNumber","sourcePath":"components/_i18n/i18n.js"},{"name":"getOverlayManager","sourcePath":"components/overlays/OverlayManager.jsx"},{"name":"getPath","sourcePath":"components/forms/Form.jsx"},{"name":"hasDismiss","sourcePath":"components/_utils/open-change.js"},{"name":"knownLocales","sourcePath":"components/_i18n/i18n.js"},{"name":"localeMessagesContext","sourcePath":"components/_i18n/i18n.js"},{"name":"makeT","sourcePath":"components/_i18n/i18n.js"},{"name":"mergeIds","sourcePath":"components/_utils/field-association.js"},{"name":"mergeTargetProps","sourcePath":"components/_utils/field-association.js"},{"name":"monthName","sourcePath":"components/_i18n/i18n.js"},{"name":"notifyClosed","sourcePath":"components/_utils/open-change.js"},{"name":"notifyDismiss","sourcePath":"components/_utils/open-change.js"},{"name":"overlayScopeContext","sourcePath":"components/overlays/OverlayManager.jsx"},{"name":"overlaySurfaceClass","sourcePath":"components/_utils/use-overlay-surface.js"},{"name":"parseEditorFragment","sourcePath":"components/forms/editor-parser.js"},{"name":"primaryLang","sourcePath":"components/_i18n/i18n.js"},{"name":"qrMatrix","sourcePath":"components/data/qr-encode.js"},{"name":"renderCount","sourcePath":"components/_utils/renderCount.js"},{"name":"reorderItems","sourcePath":"components/data/Sortable.jsx"},{"name":"resolveLang","sourcePath":"components/_i18n/i18n.js"},{"name":"sanitizeHtml","sourcePath":"components/forms/editor-schema.js"},{"name":"setPath","sourcePath":"components/forms/Form.jsx"},{"name":"snapshotLocaleMessages","sourcePath":"components/_i18n/i18n.js"},{"name":"strings","sourcePath":"components/_i18n/strings.js"},{"name":"tokens","sourcePath":"tokens/tokens.js"},{"name":"tr","sourcePath":"components/_i18n/i18n.js"},{"name":"useClientLayoutEffect","sourcePath":"components/_utils/use-client-layout-effect.js"},{"name":"useComposedRefs","sourcePath":"components/_utils/refs.js"},{"name":"useFieldAssociation","sourcePath":"components/_utils/field-association.js"},{"name":"useFloatingPanel","sourcePath":"components/_utils/floating-panel.js"},{"name":"useLang","sourcePath":"components/_i18n/i18n.js"},{"name":"useOverlayLayer","sourcePath":"components/overlays/OverlayManager.jsx"},{"name":"useOverlaySurface","sourcePath":"components/_utils/use-overlay-surface.js"}]} */
2
+ (()=>{const __ds_ns=window.CyberSkillDesignSystem_847b3c=window.CyberSkillDesignSystem_847b3c||{};const __ds_scope={};__ds_ns.__errors=__ds_ns.__errors||[];try{(()=>{const strings={Chart:{en:{empty:"Chart with no data"},vi:{empty:"Biểu đồ chưa có dữ liệu"}},AIDisclosureBadge:{en:{label:"AI assisted",details:"This content was generated or transformed with AI assistance.",sources:"Sources"},vi:{label:"Có AI hỗ trợ",details:"Nội dung này được tạo hoặc chuyển đổi với sự hỗ trợ của AI.",sources:"Nguồn"}},CodeBlock:{en:{code:"code",copy:"Copy",copied:"Copied ✓"},vi:{code:"mã",copy:"Sao chép",copied:"Đã sao chép ✓"}},Pagination:{en:{label:"Pagination",prev:"Previous page",next:"Next page"},vi:{label:"Phân trang",prev:"Trang trước",next:"Trang sau"},ja:{label:"ページネーション",prev:"前のページ",next:"次のページ"}},Breadcrumb:{en:{label:"Breadcrumb"},vi:{label:"Đường dẫn"},ja:{label:"パンくずリスト"}},CommandPalette:{en:{placeholder:"Type a command or search…",empty:"No results",oneResult:"{count} result",results:"{count} results",aria:"Command palette",esc:"Esc"},vi:{placeholder:"Nhập lệnh hoặc tìm kiếm…",empty:"Không có kết quả",oneResult:"{count} kết quả",results:"{count} kết quả",aria:"Bảng lệnh",esc:"Esc"}},SearchField:{en:{placeholder:"Search…",clear:"Clear search"},vi:{placeholder:"Tìm kiếm…",clear:"Xóa tìm kiếm"},ja:{placeholder:"検索…",clear:"検索をクリア"}},NumberField:{en:{decrease:"Decrease",increase:"Increase",value:"Value"},vi:{decrease:"Giảm",increase:"Tăng",value:"Giá trị"}},FileUpload:{en:{title:"Drop files here or browse",hint:"PNG, JPG, or PDF up to 10MB"},vi:{title:"Kéo tệp vào đây hoặc chọn",hint:"PNG, JPG hoặc PDF, tối đa 10MB"}},Dialog:{en:{close:"Close",confirm:"Confirm",cancel:"Cancel"},vi:{close:"Đóng",confirm:"Xác nhận",cancel:"Hủy"},ja:{close:"閉じる",confirm:"確認",cancel:"キャンセル"}},AlertDialog:{en:{confirm:"Confirm",cancel:"Cancel"},vi:{confirm:"Xác nhận",cancel:"Hủy"}},Drawer:{en:{close:"Close",panel:"Side panel"},vi:{close:"Đóng",panel:"Bảng bên"}},TreeTable:{en:{empty:"No results",expand:"Expand",collapse:"Collapse"},vi:{empty:"Không có kết quả",expand:"Mở rộng",collapse:"Thu gọn"}},DataTable:{en:{empty:"No results",loading:"Loading table",error:"We couldn't load this table",errorHint:"Check your connection, then try again."},vi:{empty:"Không có kết quả",loading:"Đang tải bảng",error:"Không tải được bảng này",errorHint:"Kiểm tra kết nối, rồi thử lại."}},ConfidenceMeter:{en:{label:"Confidence",low:"Low",medium:"Medium",high:"High"},vi:{label:"Độ tin cậy",low:"Thấp",medium:"Trung bình",high:"Cao"}},Spinner:{en:{label:"Loading"},vi:{label:"Đang tải"}},Tag:{en:{remove:"Remove"},vi:{remove:"Gỡ"}},Toast:{en:{notifications:"Notifications",dismiss:"Close"},vi:{notifications:"Thông báo",dismiss:"Đóng"}},TypingIndicator:{en:{label:"Lumi is typing"},vi:{label:"Lumi đang nhập"}},Editor:{en:{toolbar:"Formatting",bold:"Bold",italic:"Italic",list:"Bullet list",area:"Rich text"},vi:{toolbar:"Định dạng",bold:"Đậm",italic:"Nghiêng",list:"Danh sách",area:"Văn bản"}},Terminal:{en:{input:"Terminal input",title:"cyberskill — zsh"},vi:{input:"Ô nhập lệnh",title:"cyberskill — zsh"}},DataGrid:{en:{empty:"No results",selectAll:"Select all rows",selectRow:"Select row",pin:"Pin this column",pinNamed:"Pin column {name}"},vi:{empty:"Không có kết quả",selectAll:"Chọn tất cả",selectRow:"Chọn dòng",pin:"Ghim cột này",pinNamed:"Ghim cột {name}"}},Splitter:{en:{label:"Resize panes"},vi:{label:"Đổi kích thước khung"}},HotKeys:{en:{title:"Keyboard shortcuts",toggle:"Toggle this sheet"},vi:{title:"Phím tắt",toggle:"Bật/tắt bảng này"}},ColorPicker:{en:{label:"Color",hex:"Hex value"},vi:{label:"Màu",hex:"Giá trị hex"}},Tour:{en:{skip:"Skip",back:"Back",next:"Next",done:"Done"},vi:{skip:"Bỏ qua",back:"Quay lại",next:"Tiếp",done:"Xong"}},TreeSelect:{en:{placeholder:"Select…"},vi:{placeholder:"Chọn…"}},Cascader:{en:{placeholder:"Select…"},vi:{placeholder:"Chọn…"}},Transfer:{en:{source:"Available",target:"Selected",toTarget:"Move to selected",toSource:"Move to available"},vi:{source:"Có sẵn",target:"Đã chọn",toTarget:"Chuyển sang đã chọn",toSource:"Chuyển về có sẵn"}},Mentions:{en:{placeholder:"Add a note — @ to mention"},vi:{placeholder:"Thêm ghi chú — gõ @ để nhắc tên"}},Sortable:{en:{moveUp:"Move up",moveDown:"Move down"},vi:{moveUp:"Di chuyển lên",moveDown:"Di chuyển xuống"}},Form:{en:{summary:"Please fix the following:",required:"required",requiredField:"Enter a value",arrayContext:"FormFieldArray must be used inside Form",addRow:"Add row",back:"Back",finish:"Finish",next:"Next",step:"Step"},vi:{summary:"Vui lòng sửa các mục sau:",required:"bắt buộc",requiredField:"Vui lòng nhập giá trị",arrayContext:"FormFieldArray phải được đặt bên trong Form",addRow:"Thêm dòng",back:"Quay lại",finish:"Hoàn tất",next:"Tiếp",step:"Bước"}},BackTop:{en:{label:"Back to top"},vi:{label:"Về đầu trang"}},Carousel:{en:{prev:"Previous slide",next:"Next slide",slide:"Slide"},vi:{prev:"Ảnh trước",next:"Ảnh sau",slide:"Ảnh"}},Comment:{en:{reply:"Reply"},vi:{reply:"Trả lời"}},Image:{en:{preview:"Preview image",close:"Close"},vi:{preview:"Xem ảnh",close:"Đóng"}},Toolbar:{en:{more:"More actions"},vi:{more:"Thao tác khác"}},Popconfirm:{en:{ok:"Confirm",cancel:"Cancel"},vi:{ok:"Xác nhận",cancel:"Hủy"}},Result:{en:{success:"Done",error:"We couldn't complete that",warning:"Please check",info:"Here's what happened"},vi:{success:"Hoàn tất",error:"Chưa thực hiện được thao tác này",warning:"Vui lòng kiểm tra",info:"Thông tin chi tiết"}},InlineEdit:{en:{edit:"Edit",empty:"Add text"},vi:{edit:"Sửa",empty:"Thêm nội dung"}},Calendar:{en:{prev:"Previous month",next:"Next month"},vi:{prev:"Tháng trước",next:"Tháng sau"},ja:{prev:"前の月",next:"次の月"}},DatePicker:{en:{placeholder:"Select a date"},vi:{placeholder:"Chọn ngày"}},TimePicker:{en:{label:"Time"},vi:{label:"Giờ"}},Combobox:{en:{placeholder:"Select or type…",label:"Choose an option",empty:"No results"},vi:{placeholder:"Chọn hoặc nhập…",label:"Chọn mục",empty:"Không có kết quả"}},InputGroup:{en:{clear:"Clear",show:"Show password",hide:"Hide password",input:"Input"},vi:{clear:"Xóa",show:"Hiện mật khẩu",hide:"Ẩn mật khẩu",input:"Ô nhập"}},TagInput:{en:{placeholder:"Add a tag…",remove:"Remove"},vi:{placeholder:"Thêm thẻ…",remove:"Gỡ"}},Rating:{en:{label:"Rating"},vi:{label:"Đánh giá"}},InputOTP:{en:{label:"One-time code"},vi:{label:"Mã dùng một lần"}},PromptInput:{en:{placeholder:"Type your wish…",send:"Send",hint:"Lumi replies, then hands clear wishes to a human."},vi:{placeholder:"Nhập điều ước của bạn…",send:"Gửi",hint:"Lumi phản hồi trước, rồi chuyển điều ước rõ ràng đến đội ngũ."}},HumanReviewGate:{en:{aria:"Human review gate",risk:"review required",approve:"Approve",reject:"Reject",reviewer:"Reviewer"},vi:{aria:"Bước duyệt của người phụ trách",risk:"cần xem xét",approve:"Phê duyệt",reject:"Từ chối",reviewer:"Người duyệt"}},Switch:{en:{label:"Setting"},vi:{label:"Cài đặt"}},Tabs:{en:{list:"Tabs"},vi:{list:"Tab"}},EmptyState:{en:{title:"Nothing here yet",action:"Create your first item"},vi:{title:"Chưa có gì ở đây",action:"Tạo mục đầu tiên"}},Alert:{en:{dismiss:"Close"},vi:{dismiss:"Đóng"}},Select:{en:{placeholder:"Select…"},vi:{placeholder:"Chọn…"}},Slider:{en:{label:"Slider"},vi:{label:"Thanh trượt"}},Steps:{en:{label:"Steps"},vi:{label:"Các bước"}},Toggle:{en:{label:"Toggle"},vi:{label:"Nút bật tắt"}},Menu:{en:{menu:"Menu"},vi:{menu:"Trình đơn"}},Popover:{en:{panel:"Details"},vi:{panel:"Chi tiết"}},Menubar:{en:{label:"Application menu"},vi:{label:"Trình đơn ứng dụng"}},ContextMenu:{en:{menu:"Context menu"},vi:{menu:"Trình đơn ngữ cảnh"}},Tooltip:{en:{label:"Tooltip"},vi:{label:"Chú thích"}},CitationList:{en:{sources:"Sources"},vi:{sources:"Nguồn"}},ProgressBar:{en:{label:"Progress"},vi:{label:"Tiến độ"}},ChatMessage:{en:{you:"You"},vi:{you:"Bạn"}}};for(const namespace of Object.values(strings)){for(const table of Object.values(namespace))Object.freeze(table);Object.freeze(namespace)}Object.freeze(strings);Object.assign(__ds_scope,{strings})})()}catch(e){__ds_ns.__errors.push({path:"components/_i18n/strings.js",error:String(e&&e.message||e)})}try{(()=>{function cx(...c){return c.filter(Boolean).join(" ")}Object.assign(__ds_scope,{cx})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/cx.js",error:String(e&&e.message||e)})}try{(()=>{let FieldContext;function fieldAssociationContext(){if(!FieldContext)FieldContext=React.createContext(null);return FieldContext}function mergeIds(...values){return[...new Set(values.filter(Boolean).flatMap(value=>String(value).trim().split(/\s+/)).filter(Boolean))].join(" ")||void 0}function associateFieldProps(props,field,{id,fallbackLabel,requiredSupported=false,nativeRequired=false}={}){const explicitLabel=typeof props["aria-label"]==="string"&&props["aria-label"].trim()?props["aria-label"]:void 0;const labelledBy=mergeIds(props["aria-labelledby"])||(!explicitLabel?field?.labelId:void 0);const result={...props,id:props.id??id??field?.controlId,"aria-labelledby":labelledBy,"aria-label":explicitLabel??(labelledBy?void 0:fallbackLabel),"aria-describedby":mergeIds(props["aria-describedby"],field?.descriptionId,field?.errorId),"aria-invalid":field?.invalid?true:props["aria-invalid"]};if(requiredSupported)result["aria-required"]=field?.required?true:props["aria-required"];if(nativeRequired)result.required=field?.required?true:props.required;return result}function useFieldAssociation(props={},options={}){const field=React.useContext(fieldAssociationContext());const generated=React.useId();const id=props.id??options.id??generated;const hasError=Boolean(options.error)||options.error===0;const hasDescription=Boolean(options.description)||options.description===0;const result=associateFieldProps(props,field,{...options,id});result["aria-describedby"]=mergeIds(result["aria-describedby"],hasDescription?id+"-description":void 0,hasError?id+"-error":void 0,options.requiredDescription?id+"-required":void 0);if(hasError)result["aria-invalid"]=true;if(options.requiredSupported&&options.required)result["aria-required"]=true;if(options.nativeRequired&&options.required)result.required=true;return result}function fieldMessages(control,description,error,requiredDescription){const hasError=Boolean(error)||error===0;const hasDescription=Boolean(description)||description===0;return React.createElement(React.Fragment,null,requiredDescription?React.createElement("span",{id:control.id+"-required",style:{position:"absolute",width:1,height:1,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap"}},requiredDescription):null,hasDescription?React.createElement("span",{id:control.id+"-description",className:"cs-field__description"},description):null,hasError?React.createElement("span",{id:control.id+"-error",className:"cs-field__error",role:"alert"},error):null)}function mergeTargetProps(base={},extra={},protectedKeys=[]){const denied=new Set(["__proto__","constructor","prototype","ref","key","children","dangerouslySetInnerHTML",...protectedKeys]);const result={...base};for(const[key,value]of Object.entries(extra||{})){if(denied.has(key)||value===void 0)continue;if(key==="className")result.className=[base.className,value].filter(Boolean).join(" ");else if(key==="style")result.style={...base.style,...value};else if(/^on[A-Z]/.test(key)&&typeof base[key]==="function"){if(typeof value==="function")result[key]=(...args)=>{base[key](...args);value(...args)}}else result[key]=value}return result}Object.assign(__ds_scope,{fieldAssociationContext,mergeIds,associateFieldProps,useFieldAssociation,fieldMessages,mergeTargetProps})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/field-association.js",error:String(e&&e.message||e)})}try{(()=>{const floatingPlacements=Object.freeze(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"]);const placements=new Set(floatingPlacements);const clamp=(value,start,end)=>Math.max(start,Math.min(value,Math.max(start,end)));function floatingPosition(anchor,panel,viewport,placement="bottom-start",gap=8,direction="ltr"){if(!placements.has(placement))throw new TypeError("Unsupported floating placement: "+placement);const[preferred,alignment]=placement.split("-");const opposite={top:"bottom",bottom:"top",left:"right",right:"left"};const available={top:anchor.top-viewport.top-gap,bottom:viewport.bottom-anchor.bottom-gap,left:anchor.left-viewport.left-gap,right:viewport.right-anchor.right-gap};const dimension=preferred==="top"||preferred==="bottom"?panel.height:panel.width;const side=dimension>available[preferred]&&available[opposite[preferred]]>available[preferred]?opposite[preferred]:preferred;const vertical=side==="top"||side==="bottom";const align=vertical&&direction==="rtl"?alignment==="start"?"end":alignment==="end"?"start":void 0:alignment;let left=vertical?align==="start"?anchor.left:align==="end"?anchor.right-panel.width:anchor.left+(anchor.width-panel.width)/2:side==="left"?anchor.left-gap-panel.width:anchor.right+gap;let top=vertical?side==="top"?anchor.top-gap-panel.height:anchor.bottom+gap:align==="start"?anchor.top:align==="end"?anchor.bottom-panel.height:anchor.top+(anchor.height-panel.height)/2;left=clamp(left,viewport.left,viewport.right-panel.width);top=clamp(top,viewport.top,viewport.bottom-panel.height);return{left,top,placement:side+(alignment?"-"+alignment:""),maxWidth:Math.max(0,vertical?viewport.right-viewport.left:available[side]),maxHeight:Math.max(0,vertical?available[side]:viewport.bottom-viewport.top)}}Object.assign(__ds_scope,{floatingPlacements,floatingPosition})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/floating-position.js",error:String(e&&e.message||e)})}try{(()=>{function hasDismiss(onOpenChange,onClose,onDismiss){return typeof onOpenChange==="function"||typeof onClose==="function"||typeof onDismiss==="function"}function notifyClosed(onOpenChange,onClose){onOpenChange?.(false);onClose?.()}function notifyDismiss(event,onOpenChange,onClose,onDismiss){onOpenChange?.(false);onClose?.();onDismiss?.(event)}Object.assign(__ds_scope,{hasDismiss,notifyClosed,notifyDismiss})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/open-change.js",error:String(e&&e.message||e)})}try{(()=>{function assignRef(ref,node){if(typeof ref==="function")return ref(node);if(ref&&typeof ref==="object"&&"current"in ref){ref.current=node;return}throw new TypeError("A native ref must be a callback or an object with current")}function useComposedRefs(...refs){return React.useMemo(()=>{const unique=[...new Set(refs.filter(ref=>ref!=null))];if(!unique.length)return void 0;const cleanupSupported=Number.parseInt(React.version,10)>=19;return node=>{if(node==null){unique.forEach(ref=>assignRef(ref,null));return}const cleanups=unique.map(ref=>assignRef(ref,node));if(!cleanupSupported)return;return()=>{let failure;unique.forEach((ref,index)=>{try{if(typeof cleanups[index]==="function")cleanups[index]();else assignRef(ref,null)}catch(error){failure??(failure=error)}});if(failure)throw failure}}},refs)}Object.assign(__ds_scope,{useComposedRefs})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/refs.js",error:String(e&&e.message||e)})}try{(()=>{function renderCount(value,fallback,minimum=0){if(!Number.isFinite(value)||value>=2**32)return fallback;return Math.max(minimum,Math.trunc(value))}Object.assign(__ds_scope,{renderCount})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/renderCount.js",error:String(e&&e.message||e)})}try{(()=>{const useClientLayoutEffect=typeof document==="undefined"?React.useEffect:React.useLayoutEffect;Object.assign(__ds_scope,{useClientLayoutEffect})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/use-client-layout-effect.js",error:String(e&&e.message||e)})}try{(()=>{const{useClientLayoutEffect}=__ds_scope;const{strings:STRINGS}=__ds_scope;const knownLocales=Object.freeze(["vi","en","ja"]);function primaryLang(tag){if(tag==null)return null;const raw=String(tag).trim();if(!raw)return null;const lower=raw.toLowerCase().replace(/_/g,"-");if(lower==="tiếng việt"||lower==="tieng viet")return"vi";if(lower==="english")return"en";if(lower==="日本語"||lower==="japanese")return"ja";const primary=lower.split("-")[0];return primary||null}function resolveLang(propLang,el){let l=primaryLang(propLang);if(!l&&el&&el.closest){const a=el.closest("[lang]");if(a)l=primaryLang(a.getAttribute("lang"))}if(!l&&typeof document!=="undefined"){l=primaryLang(document.documentElement.getAttribute("lang"))}return l||"vi"}const forbiddenMessageKeys=new Set(["__proto__","prototype","constructor"]);let MessageContext;function localeMessagesContext(){if(!MessageContext)MessageContext=React.createContext(null);return MessageContext}function messageEntries(value,label){if(!value||typeof value!=="object"||Array.isArray(value)||![Object.prototype,null].includes(Object.getPrototypeOf(value)))throw new TypeError(label+" must be a plain message record");return Reflect.ownKeys(value).map(key=>{if(typeof key!=="string"||!key.trim()||forbiddenMessageKeys.has(key))throw new TypeError("Unsafe message key");const descriptor=Object.getOwnPropertyDescriptor(value,key);if(!descriptor||!Object.prototype.hasOwnProperty.call(descriptor,"value"))throw new TypeError("Message accessors are not supported");return[key,descriptor.value]})}function snapshotLocaleMessages(messages){const result=Object.create(null);for(const[namespace,locales]of messageEntries(messages,"messages")){const normalized=Object.create(null);for(const[tag,values]of messageEntries(locales,namespace)){const locale=primaryLang(tag);if(!locale||forbiddenMessageKeys.has(locale))throw new TypeError("Unsafe message locale");if(Object.prototype.hasOwnProperty.call(normalized,locale))throw new TypeError("Message locale aliases collide in "+namespace+": "+locale);const table=Object.create(null);for(const[key,value]of messageEntries(values,namespace+"."+tag)){if(typeof value!=="string")throw new TypeError("Messages must be strings");table[key]=value}normalized[locale]=Object.freeze(table)}result[namespace]=Object.freeze(normalized)}return Object.freeze(result)}function tr(component,key,lang,messages=null){const c=Object.prototype.hasOwnProperty.call(STRINGS,component)?STRINGS[component]:{};const want=primaryLang(lang)||"vi";for(const locale of new Set([want,"en","vi"])){for(let layer=messages;layer;layer=layer.parent){const table2=layer.messages[component]?.[locale];if(table2&&Object.prototype.hasOwnProperty.call(table2,key))return table2[key]}const table=c[locale];if(table&&Object.prototype.hasOwnProperty.call(table,key)&&table[key]!=null)return table[key]}return key}function makeT(component,lang,messages=null){return key=>tr(component,key,lang,messages)}function useLang(propLang){const messages=React.useContext(localeMessagesContext());const ref=React.useRef(null);const binding=React.useRef(null);const[lang,setLang]=React.useState(()=>resolveLang(propLang,null));useClientLayoutEffect(()=>{const el=ref.current;setLang(resolveLang(propLang,el));const ancestors=[];for(let node=el;node;node=node.parentElement)ancestors.push(node);const previous=binding.current;if(previous&&previous.propLang===propLang&&previous.ancestors.length===ancestors.length&&previous.ancestors.every((node,i)=>node===ancestors[i]))return;previous?.observer?.disconnect();binding.current={propLang,ancestors,observer:null};if(!el||primaryLang(propLang))return;const obs=new MutationObserver(()=>setLang(resolveLang(propLang,el)));for(const node of ancestors){obs.observe(node,{attributes:true,attributeFilter:["lang"]})}binding.current.observer=obs});useClientLayoutEffect(()=>()=>{binding.current?.observer?.disconnect();binding.current=null},[]);return[ref,lang,messages]}const VI_MONTHS=["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"];function formatDate(d,lang){const dt=d instanceof Date?d:new Date(d);if(isNaN(dt.getTime()))return"";const L=primaryLang(lang)||"vi";if(L==="vi"){const p=n=>String(n).padStart(2,"0");return p(dt.getDate())+"/"+p(dt.getMonth()+1)+"/"+dt.getFullYear()}if(L==="ja"){return dt.toLocaleDateString("ja-JP",{year:"numeric",month:"2-digit",day:"2-digit"})}return dt.toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}function monthName(i,lang){const L=primaryLang(lang)||"vi";if(L==="vi")return VI_MONTHS[i];if(L==="ja")return new Date(2e3,i,1).toLocaleDateString("ja-JP",{month:"long"});return new Date(2e3,i,1).toLocaleDateString("en-US",{month:"long"})}function formatNumber(n,lang){if(n==null||isNaN(n))return"";const L=primaryLang(lang)||"vi";const locale=L==="vi"?"vi-VN":L==="ja"?"ja-JP":"en-US";return new Intl.NumberFormat(locale).format(n)}function formatCurrency(n,langOrOpts){if(n==null||isNaN(n))return"";const opts=langOrOpts&&typeof langOrOpts==="object"?langOrOpts:null;if(opts&&opts.currency){let locale=opts.locale;if(!locale){const L2=primaryLang(opts.lang)||"en";locale=L2==="vi"?"vi-VN":L2==="ja"?"ja-JP":"en-US"}return new Intl.NumberFormat(locale,{style:"currency",currency:String(opts.currency).toUpperCase(),currencyDisplay:"symbol"}).format(Number(n))}const lang=typeof langOrOpts==="string"?langOrOpts:opts&&opts.lang||"en";const L=primaryLang(lang)||"en";return L==="vi"?new Intl.NumberFormat("vi-VN").format(n)+" ₫":"$"+new Intl.NumberFormat("en-US").format(n)}Object.assign(__ds_scope,{knownLocales,primaryLang,resolveLang,localeMessagesContext,snapshotLocaleMessages,tr,makeT,useLang,formatDate,monthName,formatNumber,formatCurrency})})()}catch(e){__ds_ns.__errors.push({path:"components/_i18n/i18n.js",error:String(e&&e.message||e)})}try{(()=>{const{useClientLayoutEffect}=__ds_scope;function overlaySurfaceClass(className){const classes=new Set(String(className||"").split(/\s+/));return["cs-surface-matte","cs-surface-solid","cs-surface-heavy","cs-surface-standard","cs-glass-card","cs-surface-light","cs-surface-whisper"].find(name=>classes.has(name))||""}function useOverlaySurface(open,panelRef,material){const surfaceRef=React.useRef(null);useClientLayoutEffect(()=>{const panel=panelRef.current,surface=surfaceRef.current;if(!open||!material||!panel||!surface)return void 0;panel.setAttribute("data-cs-overlay-surface-ready","");let frame=0,disposed=false;const update=()=>{if(disposed)return;const css=getComputedStyle(panel),rect=panel.getBoundingClientRect();for(const name of css)if(name.startsWith("--cs-"))surface.style.setProperty(name,css.getPropertyValue(name));surface.style.position=css.position==="fixed"?"fixed":"absolute";const parent=surface.offsetParent;const origin=surface.style.position==="absolute"&&parent?parent.getBoundingClientRect():{left:0,top:0};surface.style.left=`${rect.left-origin.left-(parent?.clientLeft||0)+(parent?.scrollLeft||0)}px`;surface.style.top=`${rect.top-origin.top-(parent?.clientTop||0)+(parent?.scrollTop||0)}px`;surface.style.width=`${rect.width}px`;surface.style.height=`${rect.height}px`;surface.style.borderRadius=css.borderRadius;surface.style.zIndex=css.zIndex;surface.style.opacity=css.opacity;if(panel.getAnimations().some(animation=>animation.playState==="running")&&!frame)frame=requestAnimationFrame(()=>{frame=0;update()})};update();const resize=new ResizeObserver(update);resize.observe(panel);const mutation=new MutationObserver(update);for(let ancestor=panel;ancestor;ancestor=ancestor.parentElement)mutation.observe(ancestor,{attributes:true});const preferences=["prefers-color-scheme: dark","prefers-reduced-transparency: reduce","forced-colors: active","prefers-contrast: more"].map(query=>matchMedia(`(${query})`));for(const preference of preferences)preference.addEventListener("change",update);window.addEventListener("resize",update);return()=>{disposed=true;cancelAnimationFrame(frame);resize.disconnect();mutation.disconnect();for(const preference of preferences)preference.removeEventListener("change",update);window.removeEventListener("resize",update);panel.removeAttribute("data-cs-overlay-surface-ready")}},[open,panelRef,material]);return surfaceRef}Object.assign(__ds_scope,{overlaySurfaceClass,useOverlaySurface})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/use-overlay-surface.js",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const ChatMessage=React.forwardRef(function ChatMessage2({role="lumi",name,avatar,lang,className,children,rootProps},forwardedRef){const isUser=role==="user";const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("ChatMessage",L,localeMessages);const you=t("you");const defaultAvatar=isUser?React.createElement("span",{"aria-hidden":"true"},you):React.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M12 3l1.8 5.4L19 10l-5.2 1.6L12 17l-1.8-5.4L5 10l5.2-1.6z"}));return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-chat-msg",isUser?"cs-chat-msg--user":"cs-chat-msg--lumi",className)},rootProps,[])},React.createElement("div",{className:"cs-chat-msg__avatar"},avatar??defaultAvatar),React.createElement("div",{className:"cs-chat-msg__col"},React.createElement("div",{className:"cs-chat-msg__name"},name??(isUser?you:"Lumi")),React.createElement("div",{className:"cs-chat-msg__bubble"},children)))});ChatMessage.displayName="ChatMessage";Object.assign(__ds_scope,{ChatMessage})})()}catch(e){__ds_ns.__errors.push({path:"components/ai/ChatMessage.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const{makeT,useLang}=__ds_scope;const CitationList=React.forwardRef(function CitationList2({label,items=[],lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const heading=label!==void 0?label:makeT("CitationList",L,localeMessages)("sources");return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-citations",className)},rootProps,[])},heading||heading===0?React.createElement("div",{className:"cs-citations__label"},heading):null,items.map((it,i)=>{const inner=React.createElement(React.Fragment,null,React.createElement("span",{className:"cs-citation__num"},i+1),React.createElement("span",{className:"cs-citation__text"},it.title,it.source||it.source===0?React.createElement("span",{className:"cs-citation__src"}," · ",it.source):null));return it.href?React.createElement("a",{key:i,className:"cs-citation",href:it.href,target:"_blank",rel:"noreferrer"},inner):React.createElement("div",{key:i,className:"cs-citation"},inner)}))});CitationList.displayName="CitationList";Object.assign(__ds_scope,{CitationList})})()}catch(e){__ds_ns.__errors.push({path:"components/ai/CitationList.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{renderCount}=__ds_scope;const TONE={low:{color:"var(--cs-color-semantic-danger)",textColor:"var(--cs-color-semantic-danger-text)",label:"Low",fill:2},medium:{color:"var(--cs-color-semantic-warning)",textColor:"var(--cs-color-semantic-warning-text)",label:"Medium",fill:3},high:{color:"var(--cs-color-semantic-success)",textColor:"var(--cs-color-semantic-success-text)",label:"High",fill:5}};const ConfidenceMeter=React.forwardRef(function ConfidenceMeter2({value,level,segments=5,label,lang,className,rootProps},forwardedRef){let tone,filled;const segs=renderCount(Number(segments)||5,5,1);if(value!=null){const v=Math.max(0,Math.min(1,Number(value)||0));tone=v<.4?"low":v<.75?"medium":"high";filled=Math.max(0,Math.min(segs,Math.round(v*segs)))}else{tone=TONE[level]?level:"medium";filled=Math.max(0,Math.min(segs,Math.round(TONE[tone].fill/5*segs)))}const meta=TONE[tone];const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const nameId=React.useId();const t=makeT("ConfidenceMeter",L,localeMessages);const lbl=label!=null?label:t("label");const levelText=t(tone);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-confidence",className)},rootProps,[])},React.createElement("div",{className:"cs-confidence__head"},React.createElement("span",{id:nameId+"-label"},lbl),React.createElement("span",{id:nameId+"-level",className:"cs-confidence__level",style:{color:meta.textColor}},levelText)),React.createElement("div",{className:"cs-confidence__track",role:"meter","aria-valuemin":0,"aria-valuemax":segs,"aria-valuenow":filled,"aria-labelledby":nameId+"-label "+nameId+"-level"},Array.from({length:segs}).map((_,i)=>React.createElement("span",{key:i,className:"cs-confidence__seg",style:i<filled?{background:meta.color}:void 0}))))});ConfidenceMeter.displayName="ConfidenceMeter";Object.assign(__ds_scope,{ConfidenceMeter})})()}catch(e){__ds_ns.__errors.push({path:"components/ai/ConfidenceMeter.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const HumanReviewGate=React.forwardRef(function HumanReviewGate2({risk,summary,reviewer,onApprove,onReject,approveLabel,rejectLabel,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("HumanReviewGate",L,localeMessages);const rk=risk!=null?risk:t("risk");const al=approveLabel!=null?approveLabel:t("approve");const rl=rejectLabel!=null?rejectLabel:t("reject");return React.createElement("section",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-review-gate",className)},rootProps,["aria-label"]),"aria-label":t("aria")},React.createElement("div",{className:"cs-review-gate__risk"},rk),React.createElement("p",{className:"cs-review-gate__summary"},summary),reviewer||reviewer===0?React.createElement("p",{className:"cs-review-gate__reviewer"},t("reviewer"),": ",reviewer):null,React.createElement("div",{className:"cs-review-gate__actions"},React.createElement("button",{type:"button",className:"cs-button cs-button--secondary",onClick:onReject},rl),React.createElement("button",{type:"button",className:"cs-button cs-button--primary",onClick:onApprove},al)))});HumanReviewGate.displayName="HumanReviewGate";Object.assign(__ds_scope,{HumanReviewGate})})()}catch(e){__ds_ns.__errors.push({path:"components/ai/HumanReviewGate.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const PromptInput=React.forwardRef(function PromptInput2({controlRef,value,onChange,onSubmit,placeholder,sendLabel,hint,lang,disabled=false,busy=false,className,"aria-label":ariaLabel,rootProps},forwardedRef){const mergedControlRef=useComposedRefs(controlRef);const[inner,setInner]=React.useState("");const val=value!=null?value:inner;const setVal=v=>{if(value==null)setInner(v);onChange?.(v)};const submit=()=>{if(!disabled&&!busy&&String(val).trim())onSubmit&&onSubmit(val)};const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("PromptInput",L,localeMessages);const ph=placeholder!=null?placeholder:t("placeholder");const sl=sendLabel!=null?sendLabel:t("send");const ht=hint!==void 0?hint:t("hint");return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-prompt",className)},rootProps,[])},React.createElement("textarea",{className:"cs-prompt__field",rows:1,value:val,placeholder:ph,"aria-label":ariaLabel||ph,disabled,onChange:e=>setVal(e.target.value),onKeyDown:e=>{if(e.key==="Enter"&&!e.shiftKey&&!e.nativeEvent.isComposing&&e.keyCode!==229){e.preventDefault();submit()}},ref:mergedControlRef}),React.createElement("div",{className:"cs-prompt__bar"},ht||ht===0?React.createElement("span",{className:"cs-prompt__hint"},React.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M12 3l1.8 5.4L19 10l-5.2 1.6L12 17l-1.8-5.4L5 10l5.2-1.6z"})),ht):null,React.createElement("button",{type:"button",className:"cs-button cs-button--primary cs-button--sm",onClick:submit,disabled:disabled||busy},busy?React.createElement("span",{className:"cs-button__spinner","aria-hidden":"true"}):null,sl)))});PromptInput.displayName="PromptInput";Object.assign(__ds_scope,{PromptInput})})()}catch(e){__ds_ns.__errors.push({path:"components/ai/PromptInput.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const PromptSuggestions=React.forwardRef(function PromptSuggestions2({suggestions=[],onSelect,className,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{...mergeTargetProps({"className":cx("cs-suggest",className)},rootProps,[]),ref:mergedNativeRef},suggestions.map((s,i)=>{const label=typeof s==="string"?s:s.label;const icon=typeof s==="string"?null:s.icon;return React.createElement("button",{key:i,type:"button",onClick:()=>onSelect&&onSelect(label)},icon??React.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M12 3l1.8 5.4L19 10l-5.2 1.6L12 17l-1.8-5.4L5 10l5.2-1.6z"})),label)}))});PromptSuggestions.displayName="PromptSuggestions";Object.assign(__ds_scope,{PromptSuggestions})})()}catch(e){__ds_ns.__errors.push({path:"components/ai/PromptSuggestions.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const TypingIndicator=React.forwardRef(function TypingIndicator2({label,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const lbl=label!=null?label:makeT("TypingIndicator",L,localeMessages)("label");return React.createElement("span",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-typing",className)},rootProps,["role","aria-label"]),role:"status","aria-label":lbl},React.createElement("span",null),React.createElement("span",null),React.createElement("span",null))});TypingIndicator.displayName="TypingIndicator";Object.assign(__ds_scope,{TypingIndicator})})()}catch(e){__ds_ns.__errors.push({path:"components/ai/TypingIndicator.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const LumiAvatar=React.forwardRef(function LumiAvatar2({src,size="md",ring=false,alt="Lumi",className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("span",{className:cx("cs-lumi",`cs-lumi--${size}`,ring&&"cs-lumi--ring",className),role:!src&&alt?"img":void 0,"aria-label":!src&&alt?alt:void 0,...props,ref:mergedNativeRef},src?React.createElement("img",{src,alt}):React.createElement("span",{"aria-hidden":"true"},"✦"))});LumiAvatar.displayName="LumiAvatar";Object.assign(__ds_scope,{LumiAvatar})})()}catch(e){__ds_ns.__errors.push({path:"components/brand/LumiAvatar.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Button=React.forwardRef(function Button2({variant="primary",size="md",loading=false,disabled=false,fullWidth=false,icon,children,className,type="button",...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const isDisabled=disabled||loading;return React.createElement("button",{...props,type,disabled:isDisabled,"aria-busy":loading||void 0,className:cx("cs-button",`cs-button--${variant}`,`cs-button--${size}`,fullWidth&&"cs-button--full",isDisabled&&"is-disabled",loading&&"is-loading",className),ref:mergedNativeRef},icon||icon===0?React.createElement("span",{className:"cs-button__icon","aria-hidden":"true"},icon):null,React.createElement("span",{className:"cs-button__label"},children),loading?React.createElement("span",{className:"cs-button__spinner","aria-hidden":"true"}):null)});Button.displayName="Button";Object.assign(__ds_scope,{Button})})()}catch(e){__ds_ns.__errors.push({path:"components/button/Button.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const ButtonGroup=React.forwardRef(function ButtonGroup2({children,label,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{className:cx("cs-btngroup",className),role:"group","aria-label":label,...props,ref:mergedNativeRef},children)});ButtonGroup.displayName="ButtonGroup";Object.assign(__ds_scope,{ButtonGroup})})()}catch(e){__ds_ns.__errors.push({path:"components/button/ButtonGroup.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const Accordion=React.forwardRef(function Accordion2({items=[],defaultOpen=0,allowMultiple=false,className,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const id=React.useId();const[open,setOpen]=React.useState(()=>defaultOpen!=null&&defaultOpen>=0?[defaultOpen]:[]);React.useEffect(()=>{if(!allowMultiple)setOpen(current=>current.length>1?current.slice(0,1):current)},[allowMultiple]);const isOpen=i=>allowMultiple?open.includes(i):open[0]===i;const toggle=i=>{if(allowMultiple)setOpen(o=>o.includes(i)?o.filter(x=>x!==i):[...o,i]);else setOpen(o=>o[0]===i?[]:[i])};return React.createElement("div",{...mergeTargetProps({"className":cx("cs-accordion",className)},rootProps,[]),ref:mergedNativeRef},items.map((it,i)=>React.createElement("div",{className:"cs-accordion__item",key:i},React.createElement("h3",{style:{margin:0,font:"inherit"}},React.createElement("button",{id:`${id}-trigger-${i}`,type:"button",className:"cs-accordion__trigger","aria-expanded":isOpen(i),"aria-controls":isOpen(i)?`${id}-panel-${i}`:void 0,onClick:()=>toggle(i)},it.title,React.createElement("span",{className:"cs-accordion__chevron","aria-hidden":"true"},React.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React.createElement("path",{d:"M6 9l6 6 6-6"}))))),isOpen(i)?React.createElement("div",{id:`${id}-panel-${i}`,"aria-labelledby":`${id}-trigger-${i}`,className:"cs-accordion__panel"},it.content):null)))});Accordion.displayName="Accordion";Object.assign(__ds_scope,{Accordion})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Accordion.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const AspectRatio=React.forwardRef(function AspectRatio2({ratio="16 / 9",children,className,style,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const ar=typeof ratio==="number"?String(ratio):ratio;return React.createElement("div",{className:cx("cs-aspect-ratio",className),style:{...style||{},aspectRatio:ar},...props,ref:mergedNativeRef},children)});AspectRatio.displayName="AspectRatio";Object.assign(__ds_scope,{AspectRatio})})()}catch(e){__ds_ns.__errors.push({path:"components/data/AspectRatio.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const Avatar=React.forwardRef(function Avatar2({src,name="",size="md",square=false,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const initials=name?name.trim().split(/\s+/).map(w=>w[0]).slice(0,2).join("").toUpperCase():"";return React.createElement("span",{className:cx("cs-avatar",`cs-avatar--${size}`,square&&"cs-avatar--square",className),role:!src&&name?"img":void 0,"aria-label":!src&&name?name:void 0,title:name||void 0,...props,ref:mergedNativeRef},src?React.createElement("img",{src,alt:name}):React.createElement("span",{"aria-hidden":"true"},initials))});Avatar.displayName="Avatar";const AvatarGroup=React.forwardRef(function AvatarGroup2({className,children,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{...mergeTargetProps({"className":cx("cs-avatar-group",className)},rootProps,[]),ref:mergedNativeRef},children)});AvatarGroup.displayName="AvatarGroup";Object.assign(__ds_scope,{Avatar,AvatarGroup})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Avatar.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Card=React.forwardRef(function Card2({interactive=false,flat=false,as,className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const Tag=as||(interactive?"button":"div");return React.createElement(Tag,{type:Tag==="button"?"button":void 0,className:cx("cs-card",flat&&"cs-card--flat",interactive&&"cs-card--interactive",className),...props,ref:mergedNativeRef},children)});Card.displayName="Card";const CardHeader=React.forwardRef(function CardHeader2({title,subtitle,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{className:cx("cs-card__header",className),...props,ref:mergedNativeRef},title||title===0?React.createElement("h3",{className:"cs-card__title"},title):null,subtitle||subtitle===0?React.createElement("p",{className:"cs-card__subtitle"},subtitle):null,children)});CardHeader.displayName="CardHeader";const CardBody=React.forwardRef(function CardBody2({className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{className:cx("cs-card__body",className),...props,ref:mergedNativeRef},children)});CardBody.displayName="CardBody";const CardFooter=React.forwardRef(function CardFooter2({className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{className:cx("cs-card__footer",className),...props,ref:mergedNativeRef},children)});CardFooter.displayName="CardFooter";Object.assign(__ds_scope,{Card,CardHeader,CardBody,CardFooter})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Card.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Carousel=React.forwardRef(function Carousel2({children,startIndex=0,label,lang,className,rootProps},forwardedRef){const slides=React.Children.toArray(children);const clampIndex=n=>Math.max(0,Math.min(Number.isFinite(n)?Math.trunc(n):0,slides.length-1));const[i,setI]=React.useState(()=>clampIndex(startIndex));const active=clampIndex(i);if(i!==active)setI(active);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Carousel",L,localeMessages);const go=n=>{if(slides.length)setI((n+slides.length)%slides.length)};return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-carousel",className)},rootProps,["role","aria-roledescription","aria-label"]),role:"group","aria-roledescription":"carousel","aria-label":label},React.createElement("div",{className:"cs-carousel__view"},React.createElement("div",{className:"cs-carousel__window"},React.createElement("div",{className:"cs-carousel__track",style:{transform:"translateX(-"+active*100+"%)"}},slides.map((s,j)=>React.createElement("div",{key:j,className:"cs-carousel__slide",role:"group","aria-roledescription":"slide","aria-label":`${t("slide")} ${j+1}/${slides.length}`,"aria-hidden":j!==active,ref:el=>{if(el)el.inert=j!==active}},s)))),React.createElement("button",{type:"button",className:"cs-carousel__nav prev","aria-label":t("prev"),disabled:slides.length<2,onClick:()=>go(active-1)},"‹"),React.createElement("button",{type:"button",className:"cs-carousel__nav next","aria-label":t("next"),disabled:slides.length<2,onClick:()=>go(active+1)},"›")),React.createElement("div",{className:"cs-sr-only",role:"status","aria-live":"polite","aria-atomic":"true"},slides.length?`${t("slide")} ${active+1}/${slides.length}`:""),React.createElement("div",{className:"cs-carousel__dots"},slides.map((_,j)=>React.createElement("button",{key:j,type:"button","aria-label":t("slide")+" "+(j+1)+"/"+slides.length,"aria-current":j===active,onClick:()=>setI(j)}))))});Carousel.displayName="Carousel";Object.assign(__ds_scope,{Carousel})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Carousel.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Chart=React.forwardRef(function Chart2({type="bar",data=[],height=160,color="var(--cs-accent)",showValues=false,label,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const dataName=data.map(d=>d.label+": "+d.value).join(", ");const accessibleName=typeof label==="string"&&label.trim()?label:dataName||makeT("Chart",L,localeMessages)("empty");const W=320,H=height,max=Math.max(1,...data.map(d=>d.value));let body=null;if(type==="pie"){const total=data.reduce((a,d)=>a+d.value,0)||1;const cols=[color,"var(--cs-accent-strong)","var(--cs-accent-grad-b)","var(--cs-color-text-muted)","var(--cs-color-border-default)"];let a0=-Math.PI/2;body=React.createElement("svg",{viewBox:"0 0 120 120",width:H,height:H,"aria-hidden":"true"},data.map((d,i)=>{if(d.value===0)return null;if(d.value===total)return React.createElement("circle",{key:i,cx:"60",cy:"60",r:"50",fill:cols[i%cols.length],stroke:"var(--cs-color-surface-panel)",strokeWidth:"1.5"});const a1=a0+d.value/total*Math.PI*2;const large=a1-a0>Math.PI?1:0;const p=`M60 60 L${60+50*Math.cos(a0)} ${60+50*Math.sin(a0)} A50 50 0 ${large} 1 ${60+50*Math.cos(a1)} ${60+50*Math.sin(a1)} Z`;a0=a1;return React.createElement("path",{key:i,d:p,fill:cols[i%cols.length],stroke:"var(--cs-color-surface-panel)",strokeWidth:"1.5"})}))}else if(type==="line"||type==="spark"){const pts=data.map((d,i)=>`${i/Math.max(1,data.length-1)*(W-8)+4},${H-6-d.value/max*(H-24)}`).join(" ");body=React.createElement("svg",{viewBox:`0 0 ${W} ${H}`,width:"100%",height:H,preserveAspectRatio:"none","aria-hidden":"true"},React.createElement("polyline",{points:pts,fill:"none",stroke:color,strokeWidth:"2.4",strokeLinejoin:"round",strokeLinecap:"round"}),type==="line"?data.map((d,i)=>React.createElement("circle",{key:i,cx:i/Math.max(1,data.length-1)*(W-8)+4,cy:H-6-d.value/max*(H-24),r:"3.4",fill:color})):null)}else{const bw=(W-8)/data.length;const min=Math.min(0,...data.map(d=>Number(d.value)||0));const span=max-min||1;const zeroY=min<0?6+max/span*(H-26):H-20;body=React.createElement("svg",{viewBox:`0 0 ${W} ${H}`,width:"100%",height:H,preserveAspectRatio:"none","aria-hidden":"true"},data.map((d,i)=>{const val=Number(d.value)||0;const h=min<0?Math.abs(val)/span*(H-26):Math.max(0,Math.max(0,val)/max*(H-26));const y=min<0?val>=0?zeroY-h:zeroY:H-20-h;return React.createElement("rect",{key:i,x:4+i*bw+bw*.14,y,width:bw*.72,height:h,rx:"3",fill:color})}))}return React.createElement("figure",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-chart",className)},rootProps,["role","aria-label"]),role:"img","aria-label":accessibleName},body,type!=="spark"?React.createElement("figcaption",{className:"cs-chart__legend"},data.map((d,i)=>React.createElement("span",{key:i},d.label,showValues?React.createElement("b",null," ",d.value):null))):null)});Chart.displayName="Chart";Object.assign(__ds_scope,{Chart})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Chart.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const CodeBlock=React.forwardRef(function CodeBlock2({code="",filename,language,showBar=true,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("CodeBlock",L,localeMessages);const[copied,setCopied]=React.useState(false);const attempt=React.useRef(0);const timer=React.useRef(null);React.useEffect(()=>{setCopied(false);return()=>{attempt.current++;clearTimeout(timer.current)}},[code]);const copy=async()=>{const current=++attempt.current;clearTimeout(timer.current);setCopied(false);try{if(!navigator.clipboard?.writeText)return;await navigator.clipboard.writeText(code);if(current!==attempt.current)return;setCopied(true);timer.current=setTimeout(()=>{if(current===attempt.current)setCopied(false)},1400)}catch{}};return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-code",className)},rootProps,[])},showBar?React.createElement("div",{className:"cs-code__bar"},React.createElement("span",null,filename||(language===void 0?t("code"):language)),React.createElement("button",{type:"button",className:"cs-code__copy",onClick:copy},copied?t("copied"):t("copy"))):null,React.createElement("pre",null,React.createElement("code",null,code)))});CodeBlock.displayName="CodeBlock";Object.assign(__ds_scope,{CodeBlock})})()}catch(e){__ds_ns.__errors.push({path:"components/data/CodeBlock.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Collapsible=React.forwardRef(function Collapsible2({controlRef,open,defaultOpen=false,onOpenChange,title,trigger,children,className,...props},forwardedRef){const mergedControlRef=useComposedRefs(controlRef);const mergedNativeRef=useComposedRefs(forwardedRef);const uncontrolled=open===void 0;const[internal,setInternal]=React.useState(!!defaultOpen);const isOpen=uncontrolled?internal:!!open;const setOpen=next=>{if(uncontrolled)setInternal(next);onOpenChange?.(next)};const label=title??trigger;const panelId=React.useId();const triggerId=React.useId();return React.createElement("div",{className:cx("cs-collapsible",className),...props,ref:mergedNativeRef},React.createElement("button",{type:"button",id:triggerId,className:"cs-collapsible__trigger","aria-expanded":isOpen,"aria-controls":isOpen?panelId:void 0,onClick:()=>setOpen(!isOpen),ref:mergedControlRef},React.createElement("span",{className:"cs-collapsible__label"},label),React.createElement("span",{className:"cs-collapsible__chevron","aria-hidden":"true"},React.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React.createElement("path",{d:"M6 9l6 6 6-6"})))),isOpen?React.createElement("div",{id:panelId,role:"region","aria-labelledby":triggerId,className:"cs-collapsible__panel"},children):null)});Collapsible.displayName="Collapsible";Object.assign(__ds_scope,{Collapsible})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Collapsible.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Comment=React.forwardRef(function Comment2({avatar,author,meta,children,actions=[],replies,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Comment",L,localeMessages);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-comment",className)},rootProps,[])},avatar||avatar===0?React.createElement("span",{className:"cs-comment__avatar"},avatar):null,React.createElement("div",{className:"cs-comment__main"},React.createElement("div",{className:"cs-comment__head"},React.createElement("b",null,author),meta||meta===0?React.createElement("span",{className:"cs-comment__meta"},meta):null),React.createElement("div",{className:"cs-comment__body"},children),React.createElement("div",{className:"cs-comment__actions"},(actions.length?actions:[{label:t("reply")}]).map((a,i)=>React.createElement("button",{key:i,type:"button",onClick:()=>a.onSelect&&a.onSelect()},a.label))),replies||replies===0?React.createElement("div",{className:"cs-comment__replies"},replies):null))});Comment.displayName="Comment";Object.assign(__ds_scope,{Comment})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Comment.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const DescriptionList=React.forwardRef(function DescriptionList2({items=[],className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("dl",{className:cx("cs-dl",className),...props,ref:mergedNativeRef},items.map((it,i)=>React.createElement("div",{key:i},React.createElement("dt",null,it.term),React.createElement("dd",null,it.value))))});DescriptionList.displayName="DescriptionList";Object.assign(__ds_scope,{DescriptionList})})()}catch(e){__ds_ns.__errors.push({path:"components/data/DescriptionList.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Divider=React.forwardRef(function Divider2({vertical=false,label,className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);if(label||label===0){return React.createElement("div",{className:cx("cs-divider","cs-divider--label",className),role:"separator",...props,ref:mergedNativeRef},label)}return React.createElement("hr",{className:cx("cs-divider",vertical&&"cs-divider--vertical",className),"aria-orientation":vertical?"vertical":"horizontal",...props,ref:mergedNativeRef})});Divider.displayName="Divider";Object.assign(__ds_scope,{Divider})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Divider.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Item=React.forwardRef(function Item2({leading,trailing,title,description,selected=false,disabled=false,href,onClick,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const interactive=href!=null||typeof onClick==="function";const Tag=href!=null?"a":interactive?"button":"div";const rowProps={...props};if(Tag==="a"){if(disabled){rowProps["aria-disabled"]="true";rowProps.tabIndex=-1;rowProps.role=rowProps.role??"link";rowProps.onClick=e=>e.preventDefault()}else{rowProps.href=href;rowProps.onClick=onClick}}else if(Tag==="button"){rowProps.type="button";rowProps.disabled=disabled||void 0;rowProps.onClick=!disabled?onClick:void 0}if(selected)rowProps["aria-current"]=rowProps["aria-current"]??"true";const trailExplicit=trailing!==void 0;const trailNode=trailExplicit?trailing:title!=null?children:null;const mainExtra=trailExplicit?children:title==null?children:null;return React.createElement(Tag,{className:cx("cs-item",interactive&&!disabled&&"cs-item--interactive",selected&&"is-selected",disabled&&"is-disabled",className),...rowProps,ref:mergedNativeRef},leading!=null?React.createElement("span",{className:"cs-item__leading"},leading):null,React.createElement("span",{className:"cs-item__main"},title!=null?React.createElement("span",{className:"cs-item__title"},title):null,description!=null?React.createElement("span",{className:"cs-item__description"},description):null,mainExtra),trailNode!=null&&trailNode!==false?React.createElement("span",{className:"cs-item__trailing"},trailNode):null)});Item.displayName="Item";Object.assign(__ds_scope,{Item})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Item.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Kbd=React.forwardRef(function Kbd2({children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("kbd",{className:cx("cs-kbd",className),...props,ref:mergedNativeRef},children)});Kbd.displayName="Kbd";Object.assign(__ds_scope,{Kbd})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Kbd.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const List=React.forwardRef(function List2({className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{role:"list",className:cx("cs-list",className),...props,ref:mergedNativeRef},children)});List.displayName="List";const ListItem=React.forwardRef(function ListItem2({lead,title,subtitle,trail,onClick,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const interactive=!!onClick;const Tag=interactive?"button":"div";const row=React.createElement(Tag,{ref:interactive?void 0:mergedNativeRef,type:Tag==="button"?"button":void 0,role:interactive?void 0:"listitem",className:cx("cs-list__item",interactive&&"cs-list__item--button",className),onClick,...props},lead!=null?React.createElement("span",{className:"cs-list__lead"},lead):null,React.createElement("span",{className:"cs-list__main"},title!=null?React.createElement("span",{className:"cs-list__title"},title):null,subtitle!=null?React.createElement("span",{className:"cs-list__sub"},subtitle):null,children),trail!=null?React.createElement("span",{className:"cs-list__trail"},trail):null);return interactive?React.createElement("div",{role:"listitem",ref:mergedNativeRef},row):row});ListItem.displayName="ListItem";Object.assign(__ds_scope,{List,ListItem})})()}catch(e){__ds_ns.__errors.push({path:"components/data/List.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const Masonry=React.forwardRef(function Masonry2({columns=3,gap=16,children,className,style,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{...mergeTargetProps({"className":cx("cs-masonry",className)},rootProps,[]),style:{...rootProps?.style,...{columnCount:columns,columnGap:gap,...style}},ref:mergedNativeRef},React.Children.map(children,c=>React.createElement("div",{className:"cs-masonry__item",style:{marginBottom:gap}},c)))});Masonry.displayName="Masonry";Object.assign(__ds_scope,{Masonry})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Masonry.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const ScrollArea=React.forwardRef(function ScrollArea2({children,maxHeight,className,style,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const max=maxHeight==null?void 0:typeof maxHeight==="number"?`${maxHeight}px`:maxHeight;return React.createElement("div",{className:cx("cs-scroll-area",className),tabIndex:0,style:{...style||{},...max!=null?{maxBlockSize:max}:{}},...props,ref:mergedNativeRef},children)});ScrollArea.displayName="ScrollArea";Object.assign(__ds_scope,{ScrollArea})})()}catch(e){__ds_ns.__errors.push({path:"components/data/ScrollArea.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;function reorderItems(items,from,to){if(from<0||to<0||from>=items.length||to>=items.length||from===to)return items;const next=[...items];next.splice(to,0,next.splice(from,1)[0]);return next}const Sortable=React.forwardRef(function Sortable2({items=[],onChange,lang,className,rootProps},forwardedRef){const[dragKey,setDragKey]=React.useState(null);const[over,setOver]=React.useState(null);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Sortable",L,localeMessages);const move=(from,to)=>{const next=reorderItems(items,from,to);if(next!==items)onChange&&onChange(next)};const drop=()=>{if(dragKey==null||over==null||dragKey===over){setDragKey(null);setOver(null);return}const from=items.findIndex(i=>i.key===dragKey);const to=items.findIndex(i=>i.key===over);move(from,to);setDragKey(null);setOver(null)};return React.createElement("ul",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-sortable",className)},rootProps,[])},items.map((it,idx)=>React.createElement("li",{key:it.key,draggable:true,className:cx("cs-sortable__item",dragKey===it.key&&"is-dragging",over===it.key&&"is-over"),onDragStart:e=>{if(e.target.closest&&e.target.closest(".cs-sortable__ops")){e.preventDefault();return}setDragKey(it.key)},onDragOver:e=>{e.preventDefault();setOver(it.key)},onDrop:drop,onDragEnd:()=>{setDragKey(null);setOver(null)}},React.createElement("span",{className:"cs-sortable__grip","aria-hidden":"true"},"⠿"),React.createElement("span",{className:"cs-sortable__label"},it.label),React.createElement("span",{className:"cs-sortable__ops",onMouseDown:e=>e.stopPropagation()},React.createElement("button",{type:"button",className:"cs-button cs-button--secondary cs-button--xs","aria-label":t("moveUp"),disabled:idx===0,onClick:e=>{const sibling=idx-1===0?e.currentTarget.nextElementSibling:null;move(idx,idx-1);if(sibling)requestAnimationFrame(()=>sibling.focus())}},"↑"),React.createElement("button",{type:"button",className:"cs-button cs-button--secondary cs-button--xs","aria-label":t("moveDown"),disabled:idx===items.length-1,onClick:e=>{const sibling=idx+1===items.length-1?e.currentTarget.previousElementSibling:null;move(idx,idx+1);if(sibling)requestAnimationFrame(()=>sibling.focus())}},"↓")))))});Sortable.displayName="Sortable";Object.assign(__ds_scope,{reorderItems,Sortable})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Sortable.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Splitter=React.forwardRef(function Splitter2({start,end,initial=50,min=20,max=80,height=240,lang,className,rootProps},forwardedRef){const clamp=value=>Math.min(max,Math.max(min,value));const[storedPct,setPct]=React.useState(()=>clamp(initial));const pct=clamp(storedPct);const stopDrag=React.useRef(null);React.useEffect(()=>()=>stopDrag.current?.(),[min,max]);const wrap=React.useRef(null);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(wrap,ref,forwardedRef);const t=makeT("Splitter",L,localeMessages);const drag=e=>{if(e.button!==0)return;e.preventDefault();stopDrag.current?.();const pointerId=e.pointerId;const grabX=e.clientX;const startPct=pct;const handle=e.currentTarget;const move=ev=>{if(ev.pointerId!==pointerId||!wrap.current)return;const available=wrap.current.clientWidth-handle.getBoundingClientRect().width;if(available>0){const distance=(ev.clientX-grabX)*(getComputedStyle(wrap.current).direction==="rtl"?-1:1);setPct(clamp(startPct+distance/available*100))}};const cleanup=()=>{document.removeEventListener("pointermove",move);document.removeEventListener("pointerup",up);document.removeEventListener("pointercancel",up);stopDrag.current=null};const up=ev=>{if(ev.pointerId===pointerId)cleanup()};stopDrag.current=cleanup;document.addEventListener("pointermove",move);document.addEventListener("pointerup",up);document.addEventListener("pointercancel",up)};return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-splitter",className)},rootProps,[]),style:{...rootProps?.style,...{height,display:"grid",gridTemplateColumns:`minmax(0, ${pct}fr) auto minmax(0, ${100-pct}fr)`}}},React.createElement("div",{className:"cs-splitter__pane"},start),React.createElement("div",{className:"cs-splitter__bar",role:"separator","aria-orientation":"vertical","aria-label":t("label"),"aria-valuenow":pct,"aria-valuemin":min,"aria-valuemax":max,tabIndex:0,onPointerDown:drag,onKeyDown:e=>{if(e.nativeEvent.isComposing||e.keyCode===229||!["ArrowLeft","ArrowRight"].includes(e.key))return;e.preventDefault();const rtl=getComputedStyle(wrap.current).direction==="rtl";const delta=(e.key==="ArrowRight"?2:-2)*(rtl?-1:1);setPct(p=>clamp(clamp(p)+delta))}}),React.createElement("div",{className:"cs-splitter__pane"},end))});Splitter.displayName="Splitter";Object.assign(__ds_scope,{Splitter})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Splitter.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Stat=React.forwardRef(function Stat2({label,value,delta,trend="flat",className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const arrow=trend==="up"?"M12 5v14M6 11l6-6 6 6":trend==="down"?"M12 5v14M6 13l6 6 6-6":"M5 12h14";return React.createElement("div",{className:cx("cs-stat",className),...props,ref:mergedNativeRef},React.createElement("div",{className:"cs-stat__label"},label),React.createElement("div",{className:"cs-stat__value"},value),delta!=null?React.createElement("div",{className:cx("cs-stat__delta",`cs-stat__delta--${trend}`)},React.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:arrow})),delta):null)});Stat.displayName="Stat";Object.assign(__ds_scope,{Stat})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Stat.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const hasOutput=value=>value!=null&&typeof value!=="boolean"&&value!=="";const Terminal=React.forwardRef(function Terminal2({title,welcome,onCommand,prompt="➜",lang,className,rootProps},forwardedRef){const[hist,setHist]=React.useState(()=>hasOutput(welcome)?[{out:welcome}]:[]);const[q,setQ]=React.useState("");const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Terminal",L,localeMessages);const barTitle=title??t("title");const run=()=>{if(!q.trim())return;const res=onCommand?onCommand(q.trim()):"";setHist(h=>[...h,{cmd:q},...hasOutput(res)?[{out:res}]:[]]);setQ("")};return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-terminal",className)},rootProps,[])},React.createElement("div",{className:"cs-terminal__bar"},React.createElement("i",null),React.createElement("i",null),React.createElement("i",null),React.createElement("span",null,barTitle)),React.createElement("div",{className:"cs-terminal__body"},hist.map((l,i)=>l.cmd!=null?React.createElement("div",{key:i,className:"cs-terminal__line"},React.createElement("span",{className:"p"},prompt)," ",l.cmd):React.createElement("div",{key:i,className:"cs-terminal__out"},l.out)),React.createElement("div",{className:"cs-terminal__line"},React.createElement("span",{className:"p"},prompt),React.createElement("input",{value:q,"aria-label":t("input"),spellCheck:false,onChange:e=>setQ(e.target.value),onKeyDown:e=>{if(e.nativeEvent.isComposing||e.keyCode===229)return;if(e.key==="Enter"){e.preventDefault();run()}}}))))});Terminal.displayName="Terminal";Object.assign(__ds_scope,{Terminal})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Terminal.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const Timeline=React.forwardRef(function Timeline2({items=[],className,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("div",{...mergeTargetProps({className:cx("cs-timeline",className)},rootProps),ref:mergedNativeRef},items.map((it,i)=>React.createElement("div",{key:i,className:cx("cs-timeline__item",it.state==="now"&&"cs-timeline__item--now",it.state==="todo"&&"cs-timeline__item--todo")},React.createElement("span",{className:"cs-timeline__marker","aria-hidden":"true"},it.state==="todo"?"":it.state==="now"?"→":"✓"),React.createElement("div",null,React.createElement("div",{className:"cs-timeline__title"},it.title),it.meta||it.meta===0?React.createElement("div",{className:"cs-timeline__meta"},it.meta):null,it.body||it.body===0?React.createElement("div",{className:"cs-timeline__body"},it.body):null))))});Timeline.displayName="Timeline";Object.assign(__ds_scope,{Timeline})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Timeline.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;function collectVisible(nodes,openMap,out=[]){for(const n of nodes){out.push(n);const kids=n.children||[];if(kids.length&&openMap[n.key])collectVisible(kids,openMap,out)}return out}function parentOf(nodes,key,parent=null){for(const n of nodes){if(n.key===key)return parent;const kids=n.children||[];if(kids.length){const p=parentOf(kids,key,n);if(p!==void 0)return p}}return void 0}function findNode(nodes,key){for(const n of nodes){if(n.key===key)return n;const kids=n.children||[];if(kids.length){const hit=findNode(kids,key);if(hit)return hit}}return null}function seedOpen(nodes,defaultOpen,map=Object.create(null)){for(const n of nodes){const kids=n.children||[];if(kids.length){map[n.key]=!!defaultOpen;seedOpen(kids,defaultOpen,map)}}return map}const Tree=React.forwardRef(function Tree2({nodes=[],selected,onSelect,defaultOpen=false,className,"aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const[openMap,setOpenMap]=React.useState(()=>seedOpen(nodes,defaultOpen));const[focusKey,setFocusKey]=React.useState(()=>{if(selected!=null&&findNode(nodes,selected))return selected;return nodes[0]?nodes[0].key:null});const itemRefs=React.useRef(new Map);const treeId=React.useId();const search=React.useRef({text:"",time:0});React.useEffect(()=>{setOpenMap(prev=>{const next=seedOpen(nodes,defaultOpen);for(const k of Object.keys(next))if(Object.hasOwn(prev,k))next[k]=prev[k];return next})},[nodes,defaultOpen]);const visible=React.useMemo(()=>collectVisible(nodes,openMap),[nodes,openMap]);React.useEffect(()=>{if(!visible.length){setFocusKey(null);return}if(focusKey==null||!visible.some(n=>n.key===focusKey))setFocusKey(visible[0].key)},[visible,focusKey]);const toggle=key=>setOpenMap(m=>Object.assign(Object.create(null),m,{[key]:!m[key]}));const focusItem=key=>{setFocusKey(key);requestAnimationFrame(()=>{const el=itemRefs.current.get(key);if(el)el.focus()})};const onKeyDown=(e,key)=>{if(e.target!==e.currentTarget)return;if(e.nativeEvent.isComposing||e.keyCode===229)return;if(["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Home","End","Enter"," "].includes(e.key))e.stopPropagation();const idx=visible.findIndex(n=>n.key===key);if(idx<0)return;const node=visible[idx];const kids=node.children||[];const open=!!openMap[key];if(e.key==="*"){e.preventDefault();const parent=parentOf(nodes,key);const siblings=parent?parent.children:nodes;setOpenMap(current=>{const next=Object.assign(Object.create(null),current);for(const sibling of siblings)if(sibling.children?.length)next[sibling.key]=true;return next})}else if(e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key!==" "){const now=Date.now();const char=e.key.toLocaleLowerCase();const text=now-search.current.time<500?search.current.text+char:char;search.current={text,time:now};const needle=[...text].every(letter=>letter===char)?char:text;const ordered=[...visible.slice(idx+1),...visible.slice(0,idx+1)];const found=ordered.find(n=>itemRefs.current.get(n.key)?.querySelector(".cs-tree__label")?.textContent?.trim().toLocaleLowerCase().startsWith(needle));if(found){e.preventDefault();focusItem(found.key)}}else if(e.key==="ArrowDown"){e.preventDefault();if(idx<visible.length-1)focusItem(visible[idx+1].key)}else if(e.key==="ArrowUp"){e.preventDefault();if(idx>0)focusItem(visible[idx-1].key)}else if(e.key==="Home"){e.preventDefault();focusItem(visible[0].key)}else if(e.key==="End"){e.preventDefault();focusItem(visible[visible.length-1].key)}else if(e.key==="ArrowRight"){e.preventDefault();if(kids.length&&!open)toggle(key);else if(kids.length&&open)focusItem(kids[0].key)}else if(e.key==="ArrowLeft"){e.preventDefault();if(kids.length&&open)toggle(key);else{const p=parentOf(nodes,key);if(p)focusItem(p.key)}}else if(e.key==="Enter"||e.key===" "){e.preventDefault();onSelect&&onSelect(key,node);if(kids.length)toggle(key)}};const renderNodes=(list,depth)=>list.map(n=>{const kids=n.children||[];const open=!!openMap[n.key];const selectNode=e=>{e.stopPropagation();focusItem(n.key);onSelect&&onSelect(n.key,n);if(kids.length)toggle(n.key)};return React.createElement("li",{key:n.key,role:"treeitem","aria-expanded":kids.length?open:void 0,"aria-selected":selected===n.key,"aria-labelledby":treeId+"-"+encodeURIComponent(n.key),tabIndex:focusKey===n.key?0:-1,ref:el=>{if(el)itemRefs.current.set(n.key,el);else itemRefs.current.delete(n.key)},onKeyDown:e=>onKeyDown(e,n.key),onFocus:e=>{if(e.target===e.currentTarget)setFocusKey(n.key)}},React.createElement("span",{className:cx("cs-tree__row",selected===n.key&&"is-selected"),style:{paddingInlineStart:depth*18+6},onClick:selectNode},kids.length?React.createElement("span",{className:"cs-tree__twist","aria-hidden":"true",onClick:e=>{e.stopPropagation();focusItem(n.key);toggle(n.key)}},open?"▾":"▸"):React.createElement("span",{className:"cs-tree__twist","aria-hidden":"true"}),React.createElement("span",{id:treeId+"-"+encodeURIComponent(n.key),className:"cs-tree__label",onClick:selectNode},n.label)),kids.length&&open?React.createElement("ul",{role:"group"},renderNodes(kids,depth+1)):null)});return React.createElement("ul",{role:"tree","aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy,...mergeTargetProps({"className":cx("cs-tree",className)},rootProps,["role","aria-label","aria-labelledby"]),ref:mergedNativeRef},renderNodes(nodes,0))});Tree.displayName="Tree";Object.assign(__ds_scope,{Tree})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Tree.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const Watermark=React.forwardRef(function Watermark2({text="CyberSkill",opacity=.09,gap=140,rotate=-22,children,className,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const svg=encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="${gap}" height="${gap}"><text x="50%" y="50%" font-family="Be Vietnam Pro, sans-serif" font-size="14" font-weight="700" fill="black" fill-opacity="${opacity}" text-anchor="middle" transform="rotate(${rotate} ${gap/2} ${gap/2})">${String(text).replace(/&/g,"&amp;").replace(/</g,"&lt;")}</text></svg>`);return React.createElement("div",{...mergeTargetProps({className:cx("cs-watermark",className)},rootProps),style:{...rootProps?.style,position:"relative"},ref:mergedNativeRef},children,React.createElement("div",{"aria-hidden":"true",style:{position:"absolute",inset:0,pointerEvents:"none",backgroundColor:"var(--cs-color-text-primary, #45210E)",maskImage:`url("data:image/svg+xml,${svg}")`,WebkitMaskImage:`url("data:image/svg+xml,${svg}")`,maskRepeat:"repeat",WebkitMaskRepeat:"repeat"}}))});Watermark.displayName="Watermark";Object.assign(__ds_scope,{Watermark})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Watermark.jsx",error:String(e&&e.message||e)})}try{(()=>{const EC={1:7,2:10,3:15,4:20};const TOTAL={1:26,2:44,3:70,4:100};const CAP={1:17,2:32,3:53,4:78};const ALIGN={1:[],2:[6,18],3:[6,22],4:[6,26]};const FORMAT=Array.from({length:15},(_,i)=>30660>>i&1);const EXP=new Array(512),LOG=new Array(256);(function(){let x=1;for(let i=0;i<255;i++){EXP[i]=x;LOG[x]=i;x<<=1;if(x&256)x^=285}for(let i=255;i<512;i++)EXP[i]=EXP[i-255]})();function rs(data,ecLen){let gen=[1];for(let i=0;i<ecLen;i++){const next=new Array(gen.length+1).fill(0);for(let j=0;j<gen.length;j++){next[j]^=gen[j];if(gen[j])next[j+1]^=EXP[(LOG[gen[j]]+i)%255]}gen=next}const res=data.concat(new Array(ecLen).fill(0));for(let i=0;i<data.length;i++){const f=res[i];if(f===0)continue;for(let j=0;j<gen.length;j++)if(gen[j])res[i+j]^=EXP[(LOG[gen[j]]+LOG[f])%255]}return res.slice(data.length)}function qrMatrix(text){const bytes=Array.from(new TextEncoder().encode(text));let v=0;for(const cand of[1,2,3,4])if(bytes.length<=CAP[cand]){v=cand;break}if(!v)throw new Error("too long");const dataLen=TOTAL[v]-EC[v];const bits=[];const push=(val,n2)=>{for(let i=n2-1;i>=0;i--)bits.push(val>>i&1)};push(4,4);push(bytes.length,8);bytes.forEach(b=>push(b,8));push(0,Math.min(4,dataLen*8-bits.length));while(bits.length%8)bits.push(0);const cw=[];for(let i=0;i<bits.length;i+=8)cw.push(parseInt(bits.slice(i,i+8).join(""),2));const pads=[236,17];let p=0;while(cw.length<dataLen)cw.push(pads[p++%2]);const all=cw.concat(rs(cw,EC[v]));const n=17+v*4;const M=Array.from({length:n},()=>new Array(n).fill(null));const setF=(x,y,val)=>{if(y>=0&&y<n&&x>=0&&x<n)M[y][x]=val};const finder=(cx0,cy0)=>{for(let y=-1;y<=7;y++)for(let x=-1;x<=7;x++){const in7=x>=0&&x<7&&y>=0&&y<7;const on=in7&&(x===0||x===6||y===0||y===6||x>=2&&x<=4&&y>=2&&y<=4);setF(cx0+x,cy0+y,on?1:0)}};finder(0,0);finder(n-7,0);finder(0,n-7);for(let i=8;i<n-8;i++){const on=i%2===0?1:0;if(M[6][i]==null)M[6][i]=on;if(M[i][6]==null)M[i][6]=on}const ap=ALIGN[v];for(const ay of ap)for(const ax of ap){if(M[ay][ax]!=null)continue;for(let y=-2;y<=2;y++)for(let x=-2;x<=2;x++)setF(ax+x,ay+y,Math.max(Math.abs(x),Math.abs(y))!==1?1:0)}M[n-8][8]=1;const fpos1=[[8,0],[8,1],[8,2],[8,3],[8,4],[8,5],[8,7],[8,8],[7,8],[5,8],[4,8],[3,8],[2,8],[1,8],[0,8]];const fpos2=[[n-1,8],[n-2,8],[n-3,8],[n-4,8],[n-5,8],[n-6,8],[n-7,8],[n-8,8],[8,n-7],[8,n-6],[8,n-5],[8,n-4],[8,n-3],[8,n-2],[8,n-1]];FORMAT.forEach((b,i)=>{const[x1,y1]=fpos1[i];M[y1][x1]=b;const[x2,y2]=fpos2[i];M[y2][x2]=b});let bi=0;const bit=i=>i<all.length*8?all[i>>3]>>7-(i&7)&1:0;for(let col=n-1;col>0;col-=2){if(col===6)col--;for(let i=0;i<n;i++){for(let dx=0;dx<2;dx++){const x=col-dx;const y=(col+1&2)===0?n-1-i:i;if(M[y][x]!=null)continue;let b=bit(bi++);if((y+x)%2===0)b^=1;M[y][x]=b}}}return M}Object.assign(__ds_scope,{qrMatrix})})()}catch(e){__ds_ns.__errors.push({path:"components/data/qr-encode.js",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{qrMatrix}=__ds_scope;const{cx}=__ds_scope;const QRCode=React.forwardRef(function QRCode2({value="",size=128,color="var(--cs-color-text-primary)",label,className,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const m=React.useMemo(()=>{try{return qrMatrix(String(value))}catch(e){return null}},[value]);if(!m)return React.createElement("span",{...mergeTargetProps({className:cx("cs-qrcode",className)},rootProps,["role","aria-label"]),role:"img","aria-label":label||value,ref:mergedNativeRef},"—");const n=m.length,cell=size/n;let d="";for(let y=0;y<n;y++)for(let x=0;x<n;x++)if(m[y][x])d+=`M${x*cell} ${y*cell}h${cell}v${cell}h${-cell}z`;return React.createElement("span",{...mergeTargetProps({className:cx("cs-qrcode",className)},rootProps,["role","aria-label"]),role:"img","aria-label":label||value,ref:mergedNativeRef},React.createElement("svg",{width:size,height:size,viewBox:`0 0 ${size} ${size}`,"aria-hidden":"true"},React.createElement("path",{d,fill:color})))});QRCode.displayName="QRCode";Object.assign(__ds_scope,{QRCode})})()}catch(e){__ds_ns.__errors.push({path:"components/data/QRCode.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;function nodeRowId(prefix,key){return prefix+"-row-"+String(key).split("").map(unit=>unit.charCodeAt(0).toString(16).padStart(4,"0")).join("")}function Row({n,depth,columns,expanded,setExpanded,t,treeId}){const labelId=React.useId();const actionId=labelId+"-action";const rowId=nodeRowId(treeId,n.key);const kids=n.children||[];const open=expanded.includes(n.key);return React.createElement(React.Fragment,null,React.createElement("tr",{id:rowId},columns.map((c,i)=>React.createElement("td",{key:c.key},i===0?React.createElement("span",{className:"cs-treetable__cell",style:{paddingInlineStart:depth*18}},kids.length?React.createElement("button",{type:"button",className:"cs-tree__twist","aria-expanded":open,"aria-controls":open?kids.map(child=>nodeRowId(treeId,child.key)).join(" "):void 0,"aria-labelledby":actionId+" "+labelId,onClick:()=>setExpanded(current=>current.includes(n.key)?current.filter(k=>k!==n.key):[...current,n.key])},React.createElement("span",{id:actionId,className:"cs-sr-only"},t(open?"collapse":"expand")),React.createElement("span",{"aria-hidden":"true"},open?"▾":"▸")):React.createElement("span",{className:"cs-tree__twist","aria-hidden":"true"}),React.createElement("span",{id:labelId},c.render?c.render(n):n[c.key])):c.render?c.render(n):n[c.key]))),open?kids.map(k=>React.createElement(Row,{key:k.key,n:k,depth:depth+1,columns,expanded,setExpanded,t,treeId})):null)}const TreeTable=React.forwardRef(function TreeTable2({columns=[],nodes=[],caption,defaultExpanded=[],lang,className,rootProps},forwardedRef){const[expanded,setExpanded]=React.useState(defaultExpanded);const treeId=React.useId();const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("TreeTable",L,localeMessages);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-table-wrap",className)},rootProps,[])},React.createElement("table",{className:"cs-table cs-treetable"},caption||caption===0?React.createElement("caption",null,caption):null,React.createElement("thead",null,React.createElement("tr",null,columns.map(c=>React.createElement("th",{key:c.key,scope:"col"},c.header)))),React.createElement("tbody",null,nodes.length===0?React.createElement("tr",null,React.createElement("td",{colSpan:columns.length,className:"cs-table__empty"},t("empty"))):nodes.map(n=>React.createElement(Row,{key:n.key,n,depth:0,columns,expanded,setExpanded,t,treeId})))))});TreeTable.displayName="TreeTable";Object.assign(__ds_scope,{TreeTable})})()}catch(e){__ds_ns.__errors.push({path:"components/datatable/TreeTable.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{hasDismiss,notifyDismiss}=__ds_scope;const PATHS={info:"M12 8h.01M11 12h1v4h1 M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z",success:"M4 12.5l5 5 11-11",warning:"M12 3l9 16H3z M12 10v4 M12 17h.01",danger:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z M9 9l6 6 M15 9l-6 6"};function DefaultIcon({variant}){return React.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:PATHS[variant]||PATHS.info}))}const Alert=React.forwardRef(function Alert2({variant="info",title,icon,children,onDismiss,onClose,onOpenChange,lang,className,...props},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Alert",L,localeMessages);return React.createElement("div",{ref:mergedNativeRef,role:"status",className:cx("cs-alert",`cs-alert--${variant}`,className),...props},React.createElement("span",{className:"cs-alert__icon"},icon??React.createElement(DefaultIcon,{variant})),React.createElement("div",null,title||title===0?React.createElement("p",{className:"cs-alert__title"},title):null,children||children===0?React.createElement("div",{className:"cs-alert__body"},children):null),hasDismiss(onOpenChange,onClose,onDismiss)?React.createElement("button",{type:"button",className:"cs-alert__dismiss","aria-label":t("dismiss"),onClick:event=>notifyDismiss(event,onOpenChange,onClose,onDismiss)},"×"):null)});Alert.displayName="Alert";Object.assign(__ds_scope,{Alert})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/Alert.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Badge=React.forwardRef(function Badge2({variant="neutral",dot=false,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("span",{className:cx("cs-badge",variant!=="neutral"&&`cs-badge--${variant}`,className),...props,ref:mergedNativeRef},dot?React.createElement("span",{className:"cs-badge__dot","aria-hidden":"true"}):null,children)});Badge.displayName="Badge";Object.assign(__ds_scope,{Badge})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/Badge.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const EmptyState=React.forwardRef(function EmptyState2({icon,title,children,actions,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("EmptyState",L,localeMessages);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-empty",className)},rootProps)},React.createElement("span",{className:"cs-empty__icon"},icon??React.createElement("svg",{width:"26",height:"26",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M3 8l2-4h14l2 4M3 8v10a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V8M3 8h6l1 3h4l1-3h6"}))),React.createElement("div",{className:"cs-empty__title"},title??t("title")),children||children===0?React.createElement("div",{className:"cs-empty__body"},children):null,actions||actions===0?React.createElement("div",{className:"cs-empty__actions"},actions):null)});EmptyState.displayName="EmptyState";Object.assign(__ds_scope,{EmptyState})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/EmptyState.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const ProgressBar=React.forwardRef(function ProgressBar2({value=0,max=100,variant,label,lang,className,rootProps},forwardedRef){const safeMax=Number.isFinite(max)&&max>0?max:100;const clamped=Math.max(0,Math.min(safeMax,Number(value)||0));const pct=Math.max(0,Math.min(100,clamped/safeMax*100));const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("ProgressBar",L,localeMessages);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-progress",variant&&`cs-progress--${variant}`,className)},rootProps,["role","aria-valuenow","aria-valuemin","aria-valuemax","aria-label"]),role:"progressbar","aria-valuenow":clamped,"aria-valuemin":0,"aria-valuemax":safeMax,"aria-label":label??t("label")},React.createElement("span",{className:"cs-progress__fill",style:{inlineSize:pct+"%",width:pct+"%"}}))});ProgressBar.displayName="ProgressBar";Object.assign(__ds_scope,{ProgressBar})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/ProgressBar.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const ART={success:React.createElement("svg",{width:"30",height:"30",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M4 12.5l5 5 11-11"})),error:React.createElement("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round","aria-hidden":"true"},React.createElement("path",{d:"M6 6l12 12M18 6L6 18"})),warning:React.createElement("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M12 3l10 18H2z"}),React.createElement("path",{d:"M12 10v5M12 18.2v.1"})),info:React.createElement("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round","aria-hidden":"true"},React.createElement("circle",{cx:"12",cy:"12",r:"9"}),React.createElement("path",{d:"M12 11v6M12 7.2v.1"}))};const Result=React.forwardRef(function Result2({status="info",title,children,actions,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Result",L,localeMessages);const tt=title!=null?title:t(status);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-result","cs-result--"+status,className)},rootProps,["role"]),role:"status"},React.createElement("span",{className:"cs-result__icon","aria-hidden":"true"},ART[status]||ART.info),React.createElement("h2",{className:"cs-result__title"},tt),children||children===0?React.createElement("div",{className:"cs-result__body"},children):null,actions||actions===0?React.createElement("div",{className:"cs-result__actions"},actions):null)});Result.displayName="Result";Object.assign(__ds_scope,{Result})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/Result.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const{renderCount}=__ds_scope;const Skeleton=React.forwardRef(function Skeleton2({variant="block",width,height,lines:requestedLines,radius,className,style,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const lines=renderCount(requestedLines,0);if(lines){return React.createElement("div",{...mergeTargetProps({"className":className},rootProps,["aria-hidden","role"]),"aria-hidden":"true",role:"presentation",ref:mergedNativeRef},Array.from({length:lines}).map((_,i)=>React.createElement("span",{key:i,className:"cs-skeleton cs-skeleton--text",style:{width:i===lines-1?"70%":"100%"}})))}return React.createElement("span",{...mergeTargetProps({"className":cx("cs-skeleton",variant==="circle"&&"cs-skeleton--circle",className)},rootProps,["aria-hidden","role"]),style:{...rootProps?.style,...{display:"block",width,height,borderRadius:radius,...style}},"aria-hidden":"true",ref:mergedNativeRef})});Skeleton.displayName="Skeleton";Object.assign(__ds_scope,{Skeleton})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/Skeleton.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{Skeleton}=__ds_scope;const{Result}=__ds_scope;const{cx}=__ds_scope;const{renderCount}=__ds_scope;const DataTable=React.forwardRef(function DataTable2({caption,columns,rows,rowKey="id",emptyState,state="idle",errorState,loadingState,loadingRows:requestedLoadingRows=5,lang,className,rootProps},forwardedRef){const normalized=Array.isArray(rows)?rows:[];const loadingRows=renderCount(requestedLoadingRows,5,1);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("DataTable",L,localeMessages);const es=emptyState!=null?emptyState:t("empty");const colCount=Math.max(1,columns&&columns.length||1);if(state==="loading"){return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-table-wrap",className)},rootProps,["aria-busy","role"]),"aria-busy":"true"},React.createElement("span",{className:"cs-sr-only"},t("loading")),loadingState!=null?loadingState:React.createElement("table",{className:"cs-table"},caption||caption===0?React.createElement("caption",null,caption):null,React.createElement("thead",null,React.createElement("tr",null,(columns||[]).map(c=>React.createElement("th",{key:c.key,scope:"col"},c.header)))),React.createElement("tbody",{"aria-hidden":"true"},Array.from({length:loadingRows}).map((_,i)=>React.createElement("tr",{key:i},Array.from({length:colCount}).map((__,j)=>React.createElement("td",{key:j},React.createElement(Skeleton,{lines:1}))))))))}if(state==="error"){return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-table-wrap","cs-table-wrap--status",className)},rootProps,["aria-busy","role"]),role:"alert"},errorState!=null?errorState:React.createElement(Result,{status:"error",lang:L,title:t("error")},t("errorHint")))}return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-table-wrap",className)},rootProps,["aria-busy","role"])},React.createElement("table",{className:"cs-table"},caption||caption===0?React.createElement("caption",null,caption):null,React.createElement("thead",null,React.createElement("tr",null,(columns||[]).map(c=>React.createElement("th",{key:c.key,scope:"col"},c.header)))),React.createElement("tbody",null,normalized.length===0?React.createElement("tr",null,React.createElement("td",{colSpan:colCount,className:"cs-table__empty"},es)):normalized.map((row,i)=>React.createElement("tr",{key:row[rowKey]??i},(columns||[]).map(c=>React.createElement("td",{key:c.key},c.render?c.render(row):row[c.key])))))))});DataTable.displayName="DataTable";Object.assign(__ds_scope,{DataTable})})()}catch(e){__ds_ns.__errors.push({path:"components/datatable/DataTable.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Spinner=React.forwardRef(function Spinner2({size=20,label,lang,className,style,...props},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const lbl=label!=null?label:makeT("Spinner",L,localeMessages)("label");return React.createElement("span",{ref:mergedNativeRef,role:"status","aria-label":lbl,className:cx("cs-spinner",className),style:{inlineSize:size,blockSize:size,width:size,height:size,...style},...props})});Spinner.displayName="Spinner";Object.assign(__ds_scope,{Spinner})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/Spinner.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const StatusIndicator=React.forwardRef(function StatusIndicator2({status="offline",pulse=false,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("span",{className:cx("cs-status",`cs-status--${status}`,pulse&&"cs-status--pulse",className),...props,ref:mergedNativeRef},React.createElement("span",{className:"cs-status__dot","aria-hidden":"true"}),children)});StatusIndicator.displayName="StatusIndicator";Object.assign(__ds_scope,{StatusIndicator})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/StatusIndicator.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Tag=React.forwardRef(function Tag2({children,onRemove,removeLabel,lang,className,...props},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const rl=removeLabel!=null?removeLabel:makeT("Tag",L,localeMessages)("remove");return React.createElement("span",{ref:mergedNativeRef,className:cx("cs-tag",className),...props},children,onRemove?React.createElement("button",{type:"button",className:"cs-tag__close","aria-label":rl,onClick:onRemove},React.createElement("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round"},React.createElement("path",{d:"M6 6l12 12M18 6L6 18"}))):null)});Tag.displayName="Tag";Object.assign(__ds_scope,{Tag})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/Tag.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang,monthName,primaryLang}=__ds_scope;const{useClientLayoutEffect}=__ds_scope;const{cx}=__ds_scope;const WD={en:["Mo","Tu","We","Th","Fr","Sa","Su"],vi:["T2","T3","T4","T5","T6","T7","CN"],ja:["月","火","水","木","金","土","日"]};function localDate(year,month,day){const date=new Date(0);date.setFullYear(year,month,day);date.setHours(0,0,0,0);return date}function grid(year,month){const first=localDate(year,month,1);const lead=(first.getDay()+6)%7;const days=localDate(year,month+1,0).getDate();const cells=[];for(let i=0;i<lead;i++)cells.push(null);for(let d=1;d<=days;d++)cells.push(d);while(cells.length%7)cells.push(null);return cells}const Calendar=React.forwardRef(function Calendar2({value,onChange,lang,className,rootProps},forwardedRef){const parsed=value!=null?new Date(value):null;const sel=parsed&&Number.isFinite(parsed.getTime())?parsed:null;const selectedYear=sel?.getFullYear(),selectedMonth=sel?.getMonth(),selectedDay=sel?.getDate();const today=new Date;const[view,setView]=React.useState(()=>sel?[sel.getFullYear(),sel.getMonth()]:[today.getFullYear(),today.getMonth()]);React.useEffect(()=>{if(selectedYear!=null&&selectedMonth!=null){setView([selectedYear,selectedMonth]);setFocusedDay(selectedDay)}},[selectedYear,selectedMonth,selectedDay]);const[y,m]=view;const[focusedDay,setFocusedDay]=React.useState(()=>sel?.getDate()??today.getDate());const pendingFocus=React.useRef(false);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Calendar",L,localeMessages);const cells=grid(y,m);const maxDay=localDate(y,m+1,0).getDate();const activeDay=Math.min(focusedDay,maxDay);const monthId=React.useId();useClientLayoutEffect(()=>{if(!pendingFocus.current)return;pendingFocus.current=false;ref.current?.querySelector(`button[data-day="${activeDay}"]`)?.focus()},[y,m,activeDay]);const moveFocus=date=>{pendingFocus.current=true;setFocusedDay(date.getDate());setView([date.getFullYear(),date.getMonth()])};const dateLabel=d=>new Intl.DateTimeFormat(primaryLang(L)==="vi"?"vi-VN":primaryLang(L)==="ja"?"ja-JP":"en-US",{weekday:"long",day:"numeric",month:"long",year:"numeric"}).format(localDate(y,m,d));const isSel=d=>sel&&d===sel.getDate()&&m===sel.getMonth()&&y===sel.getFullYear();const isToday=d=>d===today.getDate()&&m===today.getMonth()&&y===today.getFullYear();return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-cal",className)},rootProps,[])},React.createElement("div",{className:"cs-cal__head"},React.createElement("button",{type:"button","aria-label":t("prev"),onClick:()=>setView(([yy,mm])=>mm?[yy,mm-1]:[yy-1,11])},"‹"),React.createElement("b",{id:monthId,"aria-live":"polite"},monthName(m,L)," ",y),React.createElement("button",{type:"button","aria-label":t("next"),onClick:()=>setView(([yy,mm])=>mm===11?[yy+1,0]:[yy,mm+1])},"›")),React.createElement("div",{className:"cs-cal__wd"},WD[WD[L]?L:"en"].map(w=>React.createElement("span",{key:w},w))),React.createElement("div",{className:"cs-cal__grid",role:"grid","aria-labelledby":monthId,onKeyDown:e=>{const btn=e.target.closest("button[data-day]");if(!btn)return;const cur=Number(btn.getAttribute("data-day"));let next=null;if(e.key==="ArrowLeft")next=localDate(y,m,cur-1);else if(e.key==="ArrowRight")next=localDate(y,m,cur+1);else if(e.key==="ArrowUp")next=localDate(y,m,cur-7);else if(e.key==="ArrowDown")next=localDate(y,m,cur+7);else if(e.key==="Home")next=localDate(y,m,1);else if(e.key==="End")next=localDate(y,m,maxDay);else if(e.key==="PageUp"||e.key==="PageDown"){const offset=(e.key==="PageUp"?-1:1)*(e.shiftKey?12:1);const target=localDate(y,m+offset,1);next=localDate(target.getFullYear(),target.getMonth(),Math.min(cur,localDate(target.getFullYear(),target.getMonth()+1,0).getDate()))}if(next){e.preventDefault();moveFocus(next)}}},Array.from({length:cells.length/7},(_,week)=>React.createElement("div",{role:"row",key:week,style:{display:"contents"}},cells.slice(week*7,week*7+7).map((d,i)=>d==null?React.createElement("span",{role:"gridcell",key:i}):React.createElement("span",{role:"gridcell","aria-selected":!!isSel(d),key:i,style:{display:"contents"}},React.createElement("button",{type:"button","data-day":d,tabIndex:d===activeDay?0:-1,onFocus:()=>setFocusedDay(d),className:cx(isSel(d)&&"sel",isToday(d)&&"today"),"aria-pressed":isSel(d)||void 0,"aria-current":isToday(d)?"date":void 0,"aria-label":dateLabel(d),onClick:()=>onChange&&onChange(localDate(y,m,d))},d)))))))});Calendar.displayName="Calendar";Object.assign(__ds_scope,{Calendar})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Calendar.jsx",error:String(e&&e.message||e)})}try{(()=>{const{mergeIds}=__ds_scope;const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Checkbox=React.forwardRef(function Checkbox2({label,description,disabled=false,className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const generatedId=React.useId();const hasLabel=Boolean(label)||label===0;const hasDescription=Boolean(description)||description===0;const labelId=hasLabel?generatedId+"-label":void 0;const descriptionId=hasDescription?generatedId+"-description":void 0;const labelledBy=props["aria-labelledby"]??(props["aria-label"]==null?labelId:void 0);const describedBy=mergeIds(props["aria-describedby"],descriptionId);return React.createElement("label",{className:cx("cs-check",disabled&&"is-disabled",className)},React.createElement("input",{type:"checkbox",disabled,...props,"aria-labelledby":labelledBy,"aria-describedby":describedBy,ref:mergedNativeRef}),React.createElement("span",{className:"cs-check__text"},React.createElement("span",{id:labelId},label),description||description===0?React.createElement("span",{id:descriptionId,className:"cs-check__desc"},description):null))});Checkbox.displayName="Checkbox";Object.assign(__ds_scope,{Checkbox})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Checkbox.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const FileUpload=React.forwardRef(function FileUpload2({controlRef,title,hint,accept,multiple=false,onFiles,icon,lang,className,rootProps},forwardedRef){const[drag,setDrag]=React.useState(false);const inputRef=React.useRef(null);const mergedControlRef=useComposedRefs(inputRef,controlRef);const pick=files=>{if(files&&files.length&&onFiles)onFiles(multiple?Array.from(files):[files[0]])};const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("FileUpload",L,localeMessages);const tt=title!=null?title:t("title");const hh=hint!=null?hint:t("hint");const id=React.useId();return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-dropzone",drag&&"is-dragging",className),"onDragOver":e=>{e.preventDefault();setDrag(true)},"onDragLeave":()=>setDrag(false),"onDrop":e=>{e.preventDefault();setDrag(false);pick(e.dataTransfer.files)},"onClick":()=>inputRef.current&&inputRef.current.click()},rootProps,[])},React.createElement("span",{className:"cs-dropzone__icon","aria-hidden":"true"},icon??React.createElement("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"},React.createElement("path",{d:"M12 16V4M7 9l5-5 5 5"}),React.createElement("path",{d:"M5 16v3a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-3"}))),React.createElement("label",{className:"cs-dropzone__title",htmlFor:id},tt),React.createElement("span",{className:"cs-dropzone__hint",id:id+"-hint"},hh),React.createElement("input",{id,ref:mergedControlRef,type:"file",accept,multiple,className:"cs-sr-only","aria-describedby":id+"-hint",onChange:e=>pick(e.target.files),onClick:e=>{e.stopPropagation();e.currentTarget.value=""}}))});FileUpload.displayName="FileUpload";Object.assign(__ds_scope,{FileUpload})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/FileUpload.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{fieldAssociationContext,associateFieldProps,mergeTargetProps}=__ds_scope;let FormCtx;function getFormCtx(){if(!FormCtx)FormCtx=React.createContext(null);return FormCtx}const arrayRowKeys=new WeakMap;let nextRowKey=0;function rowKeys(array){if(!arrayRowKeys.has(array))arrayRowKeys.set(array,Array.from(array,()=>++nextRowKey));const keys=arrayRowKeys.get(array);while(keys.length<array.length)keys.push(++nextRowKey);return keys}function clonePathContainer(value){if(!Array.isArray(value))return{...value||{}};const clone=[...value];arrayRowKeys.set(clone,[...rowKeys(value)]);return clone}function getPath(obj,path){if(!path)return void 0;const parts=String(path).split(".");let cur=obj;for(const p of parts){if(cur==null)return void 0;cur=cur[p]}return cur}function setPath(obj,path,value){const parts=String(path).split(".");const root=clonePathContainer(obj);let cur=root;for(let i=0;i<parts.length-1;i++){const p=parts[i];const nextKey=parts[i+1];const nextIsIndex=/^\d+$/.test(nextKey);const existing=cur[p];const clone=existing==null?nextIsIndex?[]:{}:clonePathContainer(existing);cur[p]=clone;cur=clone}cur[parts[parts.length-1]]=value;return root}function useFormController(seed){const[state,setState]=React.useState(()=>({values:seed||{},errors:{}}));const setValues=React.useCallback(change=>setState(current=>({...current,values:typeof change==="function"?change(current.values):change})),[]);const setRuleErrors=React.useCallback(change=>setState(current=>({...current,errors:typeof change==="function"?change(current.errors):change})),[]);const updateArray=React.useCallback((name,change)=>setState(current=>{const value=getPath(current.values,name);const list=Array.isArray(value)?value:[];const next=change(list);if(next===list)return current;const errors=Object.fromEntries(Object.entries(current.errors).filter(([key])=>key!==name&&!key.startsWith(name+".")));return{values:setPath(current.values,name,next),errors}}),[]);return{values:state.values,ruleErrors:state.errors,setValues,setRuleErrors,updateArray}}const Form=React.forwardRef(function Form2({onSubmit,onReset,errors={},rules,asyncRules,initialValues,children,lang,className,...props},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Form",L,localeMessages);const initialSeed=React.useRef(initialValues||{});const{values,ruleErrors,setValues,setRuleErrors,updateArray}=useFormController(initialSeed.current);const[pending,setPending]=React.useState(false);const pendingRef=React.useRef(false);const lifecycle=React.useRef(0);React.useEffect(()=>()=>{lifecycle.current++},[]);const[submissionError,setSubmissionError]=React.useState(null);const setValue=React.useCallback((name,v)=>{setValues(s=>String(name).includes(".")?setPath(s,name,v):{...s,[name]:v});setRuleErrors(e=>e[name]?{...e,[name]:void 0}:e)},[]);const merged={...ruleErrors,...errors};const keys=Object.keys(merged).filter(k=>merged[k]);const runRules=(v,ruleMap)=>{const map=ruleMap||rules;if(!map)return{};const out={};for(const[name,r]of Object.entries(map)){for(const rule of Array.isArray(r)?r:[r]){const fieldVal=String(name).includes(".")?getPath(v,name):v[name];const msg=rule==="required"?fieldVal==null||String(fieldVal).trim()===""?t("requiredField"):null:typeof rule==="function"?rule(fieldVal,v):null;if(msg){out[name]=msg;break}}}return out};const runAsyncRules=async(v,attempt)=>{if(!asyncRules)return{};const out={};for(const[name,fn]of Object.entries(asyncRules)){if(attempt!==lifecycle.current)return out;if(typeof fn!=="function")continue;try{const fieldVal=String(name).includes(".")?getPath(v,name):v[name];const msg=await fn(fieldVal,v);if(msg)out[name]=msg}catch(e){out[name]=String(e&&e.message||e)}}return out};const ctx={values,setValue,setValues,updateArray,errors:merged,pending,runRules,setRuleErrors,t,L};const Ctx=getFormCtx();return React.createElement(Ctx.Provider,{value:ctx},React.createElement("form",{...props,ref:mergedNativeRef,className:cx("cs-form",pending&&"is-pending",className),noValidate:true,"aria-busy":pending||void 0,onReset:event=>{onReset?.(event);if(event.defaultPrevented)return;lifecycle.current++;pendingRef.current=false;setPending(false);setValues(initialSeed.current);setRuleErrors({});setSubmissionError(null)},onSubmit:async e=>{e.preventDefault();if(pendingRef.current)return;setSubmissionError(null);const fd=new FormData(e.currentTarget);const v={};fd.forEach((val,k)=>{v[k]=val});Object.assign(v,values);const errs=runRules(v);if(Object.keys(errs).some(k=>errs[k])){setRuleErrors(errs);return}pendingRef.current=true;setPending(true);const attempt=lifecycle.current;try{const aerrs=await runAsyncRules(v,attempt);if(attempt!==lifecycle.current)return;setRuleErrors(aerrs);if(Object.keys(aerrs).some(k=>aerrs[k]))return;await onSubmit?.(v)}catch(error){if(attempt===lifecycle.current)setSubmissionError(String(error&&error.message||error))}finally{if(attempt===lifecycle.current){pendingRef.current=false;setPending(false)}}}},keys.length||submissionError?React.createElement("div",{className:"cs-form__summary",role:"alert"},React.createElement("b",null,t("summary")),React.createElement("ul",null,submissionError?React.createElement("li",null,submissionError):null,keys.map(k=>React.createElement("li",{key:k},merged[k])))):null,React.createElement("fieldset",{disabled:pending,style:{display:"contents"}},children)))});Form.displayName="Form";const FormField=React.forwardRef(function FormField2({label,name,required=false,hint,error,valueProp="value",children,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Form",L,localeMessages);const autoId=React.useId();const ctx=React.useContext(getFormCtx());const err=error!==void 0&&error!==null?error:name&&ctx?ctx.errors[name]:void 0;const hasError=Boolean(err)||err===0;const singleElement=React.isValidElement(children)&&React.Children.count(children)===1;const isNativeControl=singleElement&&typeof children.type==="string"&&/^(input|select|textarea)$/i.test(children.type);const controlId=singleElement?children.props.controlProps?.id??children.props.id??autoId:autoId;const hasLabel=typeof label==="string"?label.trim().length>0:Boolean(label)||label===0;const field={controlId,labelId:hasLabel?autoId+"-field-label":void 0,descriptionId:!hasError&&(hint||hint===0)?autoId+"-field-hint":void 0,errorId:hasError?autoId+"-field-error":void 0,invalid:hasError,required};const Association=fieldAssociationContext();let child=children;if(singleElement){const wire={};if(isNativeControl&&children.props.id===void 0)wire.id=controlId;if(name&&ctx){const cur=String(name).includes(".")?getPath(ctx.values,name):ctx.values[name];wire.name=name;wire[valueProp]=cur!==void 0?cur:valueProp==="checked"||valueProp==="pressed"?false:"";wire.onChange=ev=>{const val=ev&&ev.target?valueProp==="checked"?ev.target.checked:ev.target.value:ev;ctx.setValue(name,val);if(children.props.onChange)children.props.onChange(ev)}}if(isNativeControl)Object.assign(wire,associateFieldProps({...children.props,...wire},field,{nativeRequired:true}));if(Object.keys(wire).length)child=React.cloneElement(children,wire)}const LabelTag=isNativeControl?"label":"span";return React.createElement("div",{...mergeTargetProps({className:cx("cs-formfield",hasError&&"has-error",className)},rootProps),ref:mergedNativeRef},React.createElement(LabelTag,{id:field.labelId,className:"cs-formfield__label",htmlFor:isNativeControl?controlId:void 0},label,required?React.createElement(React.Fragment,null," ",React.createElement("em",{"aria-label":t("required")},"*")):null),React.createElement(Association.Provider,{value:field},typeof children==="function"?children(associateFieldProps({},field)):child),hasError?React.createElement("span",{id:field.errorId,className:"cs-formfield__error",role:"alert"},err):hint||hint===0?React.createElement("span",{id:field.descriptionId,className:"cs-formfield__hint"},hint):null)});FormField.displayName="FormField";const FormFieldArray=React.forwardRef(function FormFieldArray2({name,children,label,min=0,max=50,addLabel,defaultItem,className,rootProps,lang},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Form",L,localeMessages);const ctx=React.useContext(getFormCtx());if(!ctx){return React.createElement("div",{ref:mergedNativeRef,className:"cs-formfield__error",role:"alert"},t("arrayContext"))}const list=Array.isArray(getPath(ctx.values,name))?getPath(ctx.values,name):[];const blank=()=>defaultItem!=null?typeof defaultItem==="function"?defaultItem():{...defaultItem}:{};const updateList=change=>ctx.updateArray(name,change);const add=()=>{if(list.length>=max)return;const item=blank();updateList(current=>{if(current.length>=max)return current;const next=[...current,item];arrayRowKeys.set(next,[...rowKeys(current),++nextRowKey]);return next})};const removeAt=i=>{const target=list[i];const targetKey=rowKeys(list)[i];updateList(current=>{if(current.length<=min)return current;const index=rowKeys(current).indexOf(targetKey);if(index<0||current[index]!==target)return current;const next=current.filter((_,idx)=>idx!==index);arrayRowKeys.set(next,rowKeys(current).filter((_,idx)=>idx!==index));return next})};return React.createElement("div",{...mergeTargetProps({className:cx("cs-form-array",className),"data-name":name},rootProps,["data-name"]),ref:mergedNativeRef},label||label===0?React.createElement("div",{className:"cs-formfield__label",style:{marginBottom:8}},label):null,React.createElement("div",{className:"cs-form-array__rows"},list.map((item,index)=>React.createElement("div",{className:"cs-form-array__row",key:rowKeys(list)[index],"data-index":index},typeof children==="function"?children({index,item,remove:()=>removeAt(index),path:field=>`${name}.${index}.${field}`}):children))),React.createElement("button",{type:"button",className:"cs-button cs-button--secondary cs-button--sm",onClick:add,disabled:list.length>=max,style:{marginTop:8}},addLabel||t("addRow")))});FormFieldArray.displayName="FormFieldArray";const FormWizard=React.forwardRef(function FormWizard2({steps=[],initialValues,onComplete,lang,className,rootProps,nextLabel,backLabel,finishLabel},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Form",L,localeMessages);const[step,setStep]=React.useState(0);const{values,ruleErrors,setValues,setRuleErrors,updateArray}=useFormController(initialValues);const[pending,setPending]=React.useState(false);const pendingRef=React.useRef(false);const[submissionError,setSubmissionError]=React.useState(null);const setValue=React.useCallback((name,v)=>{setValues(s=>String(name).includes(".")?setPath(s,name,v):{...s,[name]:v});setRuleErrors(e=>e[name]?{...e,[name]:void 0}:e)},[]);const runRules=React.useCallback((v,ruleMap)=>{if(!ruleMap)return{};const out={};for(const[name,r]of Object.entries(ruleMap)){for(const rule of Array.isArray(r)?r:[r]){const fieldVal=String(name).includes(".")?getPath(v,name):v[name];const msg=rule==="required"?fieldVal==null||String(fieldVal).trim()===""?t("requiredField"):null:typeof rule==="function"?rule(fieldVal,v):null;if(msg){out[name]=msg;break}}}return out},[t]);const current=steps[step]||{};const ctx={values,setValue,setValues,updateArray,errors:ruleErrors,pending,runRules,setRuleErrors,t,L};const keys=Object.keys(ruleErrors).filter(k=>ruleErrors[k]);const goNext=async()=>{if(pendingRef.current)return;setSubmissionError(null);const errs=runRules(values,current.rules);if(Object.keys(errs).some(k=>errs[k])){setRuleErrors(errs);return}setRuleErrors({});if(step>=steps.length-1){pendingRef.current=true;setPending(true);try{await onComplete?.(values)}catch(error){setSubmissionError(String(error&&error.message||error))}finally{pendingRef.current=false;setPending(false)}return}setStep(s=>s+1)};const goBack=()=>{if(pendingRef.current)return;setSubmissionError(null);setRuleErrors({});setStep(s=>Math.max(0,s-1))};const Ctx=getFormCtx();return React.createElement(Ctx.Provider,{value:ctx},React.createElement("div",{...mergeTargetProps({className:cx("cs-form-wizard",className),"data-step":step,"aria-busy":pending||void 0},rootProps,["data-step","aria-busy"]),ref:mergedNativeRef},React.createElement("ol",{className:"cs-form-wizard__steps",style:{display:"flex",gap:10,listStyle:"none",padding:0,margin:"0 0 16px",flexWrap:"wrap"}},steps.map((s,i)=>React.createElement("li",{key:s.id||i,"aria-current":i===step?"step":void 0,style:{font:"700 11px/1 var(--cs-font-family-ui)",fontWeight:i===step?700:500,textTransform:"uppercase",letterSpacing:".06em",color:i===step?"var(--cs-color-text-primary)":"var(--cs-color-text-secondary)"}},i+1,". ",s.title||s.id||`${t("step")} ${i+1}`))),keys.length||submissionError?React.createElement("div",{className:"cs-form__summary",role:"alert"},React.createElement("b",null,t("summary")),React.createElement("ul",null,submissionError?React.createElement("li",null,submissionError):null,keys.map(k=>React.createElement("li",{key:k},ruleErrors[k])))):null,React.createElement("div",{className:"cs-form-wizard__body"},React.createElement("fieldset",{disabled:pending,style:{display:"contents"}},typeof current.render==="function"?current.render({values,step,setValue}):null)),React.createElement("div",{className:"cs-form-wizard__nav",style:{display:"flex",gap:10,marginTop:16}},React.createElement("button",{type:"button",className:"cs-button cs-button--secondary cs-button--sm",onClick:goBack,disabled:step===0||pending},backLabel||t("back")),React.createElement("button",{type:"button",className:"cs-button cs-button--sm",onClick:goNext,disabled:pending},step>=steps.length-1?finishLabel||t("finish"):nextLabel||t("next")))))});FormWizard.displayName="FormWizard";Object.assign(__ds_scope,{getPath,setPath,Form,FormField,FormFieldArray,FormWizard})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Form.jsx",error:String(e&&e.message||e)})}try{(()=>{const{mergeIds}=__ds_scope;const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const EYE=React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z"}),React.createElement("circle",{cx:"12",cy:"12",r:"3"}));const EYE_OFF=React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z"}),React.createElement("circle",{cx:"12",cy:"12",r:"3"}),React.createElement("path",{d:"M4 4l16 16"}));const X=React.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round","aria-hidden":"true"},React.createElement("path",{d:"M6 6l12 12M18 6L6 18"}));const InputGroup=React.forwardRef(function InputGroup2({id,label,prefix,suffix,clearable=false,password=false,value,onChange,defaultValue="",placeholder,disabled=false,readOnly=false,lang,className,...props},forwardedRef){const[inner,setInner]=React.useState(defaultValue);const val=value!=null?value:inner;const set=v=>{if(disabled||readOnly)return;if(value==null)setInner(v);onChange&&onChange(v)};const[show,setShow]=React.useState(false);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("InputGroup",L,localeMessages);const gid=React.useId();const sid=id??gid;const hasLabel=Boolean(label)||label===0;const labelId=hasLabel?sid+"-label":void 0;const labelledBy=props["aria-labelledby"]??(props["aria-label"]==null?labelId:void 0);return React.createElement("div",{ref:mergedNativeRef,className:cx("cs-field",disabled&&"is-disabled",className)},hasLabel?React.createElement("label",{id:labelId,className:"cs-field__label",htmlFor:sid},label):null,React.createElement("span",{className:"cs-igroup"},prefix!=null?React.createElement("span",{className:"cs-igroup__fix"},prefix):null,React.createElement("input",{...props,id:sid,type:password&&!show?"password":"text",value:val,placeholder,disabled,readOnly,"aria-labelledby":labelledBy,"aria-describedby":mergeIds(props["aria-describedby"]),"aria-label":props["aria-label"]??(hasLabel||props["aria-labelledby"]!=null?void 0:placeholder||t("input")),onChange:e=>set(e.target.value)}),clearable&&String(val).length?React.createElement("button",{type:"button",className:"cs-igroup__btn","aria-label":t("clear"),disabled:disabled||readOnly,onClick:()=>set("")},X):null,password?React.createElement("button",{type:"button",className:"cs-igroup__btn","aria-label":show?t("hide"):t("show"),"aria-pressed":show,disabled,onClick:()=>setShow(s=>!s)},show?EYE_OFF:EYE):null,suffix!=null?React.createElement("span",{className:"cs-igroup__fix cs-igroup__fix--suffix"},suffix):null))});InputGroup.displayName="InputGroup";Object.assign(__ds_scope,{InputGroup})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/InputGroup.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{renderCount}=__ds_scope;const InputOTP=React.forwardRef(function InputOTP2({length:requestedLength=6,value,onChange,onComplete,label,lang,disabled=false,className,id,description,error,required=false,rootProps,controlProps},forwardedRef){const length=renderCount(requestedLength,6);const[inner,setInner]=React.useState("");const val=(value!=null?value:inner).slice(0,length);const boxes=React.useRef([]);const set=v=>{if(disabled)return;v=v.replace(/\D/g,"").slice(0,length);if(value==null)setInner(v);onChange&&onChange(v);if(v.length===length&&onComplete)onComplete(v)};const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const lbl=label!=null?label:makeT("InputOTP",L,localeMessages)("label");const group=mergeTargetProps(mergeTargetProps({},rootProps,["role","name","value","required","aria-required"]),controlProps,["role","name","value","required","aria-required"]);const requiredDescription=required?makeT("Form",L,localeMessages)("required"):void 0;const control=useFieldAssociation({id:group.id??id,"aria-label":group["aria-label"]??(group["aria-labelledby"]?void 0:label),"aria-labelledby":group["aria-labelledby"],"aria-describedby":group["aria-describedby"],"aria-invalid":group["aria-invalid"]},{fallbackLabel:lbl,description,error,required,requiredSupported:false,requiredDescription});return React.createElement(React.Fragment,null,React.createElement("div",{...group,...control,ref:mergedNativeRef,className:cx("cs-otp",className,group.className),role:"group"},Array.from({length}).map((_,i)=>React.createElement(React.Fragment,{key:i},React.createElement("span",{id:control.id+"-digit-"+(i+1),style:{position:"absolute",width:1,height:1,overflow:"hidden",clipPath:"inset(50%)"}},i+1+"/"+length),React.createElement("input",{"aria-labelledby":control["aria-labelledby"]?control["aria-labelledby"]+" "+control.id+"-digit-"+(i+1):void 0,id:control.id+"-"+(i+1),"aria-describedby":control["aria-describedby"],"aria-invalid":control["aria-invalid"],ref:el=>boxes.current[i]=el,inputMode:"numeric",pattern:"[0-9]*",maxLength:1,disabled,value:val[i]||"","aria-label":(control["aria-label"]||lbl)+" "+(i+1)+"/"+length,onChange:e=>{if(e.target.value===""){set(val.slice(0,i)+val.slice(i+1));return}const c=e.target.value.replace(/\D/g,"");if(!c)return;set(val.slice(0,i)+c+val.slice(i+1));const nb=boxes.current[i+1];if(nb)nb.focus()},onKeyDown:e=>{if(e.nativeEvent.isComposing||e.keyCode===229||e.key!=="Backspace")return;e.preventDefault();const arr=val.split("");if(arr[i])arr.splice(i,1);else if(i>0)arr.splice(i-1,1);set(arr.join(""));const pb=boxes.current[Math.max(0,i-1)];if(pb)pb.focus()},onPaste:e=>{e.preventDefault();const p=(e.clipboardData.getData("text")||"").replace(/\D/g,"").slice(0,length);set(p);const nb=boxes.current[Math.min(length-1,p.length)];if(nb)nb.focus()}})))),fieldMessages(control,description,error,requiredDescription))});InputOTP.displayName="InputOTP";Object.assign(__ds_scope,{InputOTP})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/InputOTP.jsx",error:String(e&&e.message||e)})}try{(()=>{const{mergeIds}=__ds_scope;const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const NativeSelect=React.forwardRef(function NativeSelect2({id,label,error,options,children,disabled=false,size="md",className,value,defaultValue,onChange,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const hasError=Boolean(error)||error===0;const gid=React.useId();const sid=id??gid;const hasLabel=Boolean(label)||label===0;const labelId=hasLabel?sid+"-label":void 0;const labelledBy=props["aria-labelledby"]??(props["aria-label"]==null?labelId:void 0);const errId=hasError?sid+"-err":void 0;const describedBy=mergeIds(props["aria-describedby"],errId);return React.createElement("label",{className:cx("cs-field","cs-native-select-field",disabled&&"is-disabled",hasError&&"is-invalid",className),htmlFor:sid},label||label===0?React.createElement("span",{id:labelId,className:"cs-field__label"},label):null,React.createElement("span",{className:cx("cs-native-select",`cs-native-select--${size}`)},React.createElement("select",{...props,id:sid,disabled,value,defaultValue,onChange,"aria-invalid":hasError?true:props["aria-invalid"],"aria-labelledby":labelledBy,"aria-describedby":describedBy,className:"cs-field__control",ref:mergedNativeRef},options?options.map(o=>React.createElement("option",{key:o.value,value:o.value,disabled:o.disabled},o.label)):children),React.createElement("span",{className:"cs-native-select__chevron","aria-hidden":"true"},React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React.createElement("path",{d:"M6 9l6 6 6-6"})))),hasError?React.createElement("span",{id:errId,className:"cs-field__error",role:"alert"},error):null)});NativeSelect.displayName="NativeSelect";Object.assign(__ds_scope,{NativeSelect})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/NativeSelect.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const NumberField=React.forwardRef(function NumberField2({id,label,value,defaultValue=0,onChange,min,max,step=1,disabled=false,lang,className,children,rootProps,controlProps,description,error,required=false,...props},forwardedRef){const[inner,setInner]=React.useState(()=>defaultValue);const inputRef=React.useRef(null);const mergedNativeRef=useComposedRefs(inputRef,forwardedRef);const val=value!=null?value:inner;const clamp=n=>{if(min!=null)n=Math.max(min,n);if(max!=null)n=Math.min(max,n);return n};const set=n=>{const c=clamp(n);if(value==null)setInner(c);onChange?.(c)};const stepBy=direction=>{const input=inputRef.current;if(!input)return;const probe=input.cloneNode(false);probe.value=input.value;probe.stepUp(direction);if(Number.isFinite(probe.valueAsNumber))set(probe.valueAsNumber)};const[ref,L,localeMessages]=useLang(lang);const t=makeT("NumberField",L,localeMessages);const control=useFieldAssociation(mergeTargetProps({...props,id:controlProps?.id??id,type:"number",value:val,min,max,step,disabled,"aria-label":props["aria-label"]??label,onChange:e=>{const raw=e.target.value;if(raw===""){if(value==null)setInner("");return}const num=Number(raw);if(Number.isFinite(num))set(num)},onBlur:e=>{if(inner===""&&value==null)setInner(clamp(0));props.onBlur?.(e)}},controlProps,["role","type","value","defaultValue","onChange","min","max","step","disabled"]),{id:controlProps?.id??id,fallbackLabel:label?void 0:t("value"),nativeRequired:true,description,error,required});return React.createElement("div",{...mergeTargetProps({className:cx("cs-field",disabled&&"is-disabled",className)},rootProps),ref},label?React.createElement("label",{className:"cs-field__label",htmlFor:control.id},label):null,React.createElement("div",{className:"cs-stepper"},React.createElement("button",{type:"button","aria-label":t("decrease"),disabled:disabled||min!=null&&val!==""&&val<=min,onClick:()=>stepBy(-1)},"−"),React.createElement("input",{...control,ref:mergedNativeRef}),React.createElement("button",{type:"button","aria-label":t("increase"),disabled:disabled||max!=null&&val!==""&&val>=max,onClick:()=>stepBy(1)},"+")),fieldMessages(control,description,error))});NumberField.displayName="NumberField";Object.assign(__ds_scope,{NumberField})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/NumberField.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeIds,mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const Radio=React.forwardRef(function Radio2({label,description,disabled=false,className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const generatedId=React.useId();const hasLabel=Boolean(label)||label===0;const hasDescription=Boolean(description)||description===0;const labelId=hasLabel?generatedId+"-label":void 0;const descriptionId=hasDescription?generatedId+"-description":void 0;const labelledBy=props["aria-labelledby"]??(props["aria-label"]==null?labelId:void 0);const describedBy=mergeIds(props["aria-describedby"],descriptionId);return React.createElement("label",{className:cx("cs-radio",disabled&&"is-disabled",className)},React.createElement("input",{type:"radio",disabled,...props,"aria-labelledby":labelledBy,"aria-describedby":describedBy,ref:mergedNativeRef}),React.createElement("span",{className:"cs-radio__text"},React.createElement("span",{id:labelId},label),description||description===0?React.createElement("span",{id:descriptionId,className:"cs-radio__desc"},description):null))});Radio.displayName="Radio";const RadioGroup=React.forwardRef(function RadioGroup2({legend,name,value,onChange,options=[],className,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const gid=React.useId();const nm=name??gid;return React.createElement("fieldset",{...mergeTargetProps({"className":cx("cs-radio-group",className)},rootProps,[]),ref:mergedNativeRef},legend||legend===0?React.createElement("legend",null,legend):null,options.map(o=>React.createElement(Radio,{key:o.value,name:nm,value:o.value,label:o.label,description:o.description,disabled:o.disabled,checked:value===o.value,onChange:()=>onChange&&onChange(o.value)})))});RadioGroup.displayName="RadioGroup";Object.assign(__ds_scope,{Radio,RadioGroup})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/RadioGroup.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{renderCount}=__ds_scope;const STAR="M12 2l2.9 6.2 6.6.8-4.9 4.6 1.3 6.5L12 16.9 6.1 20l1.3-6.5L2.5 9l6.6-.8z";const Rating=React.forwardRef(function Rating2({value,defaultValue=0,onChange,max:requestedMax=5,readOnly=false,label,lang,className,id,description,error,required=false,rootProps,controlProps},forwardedRef){const max=renderCount(requestedMax,5);const[inner,setInner]=React.useState(defaultValue);const val=value!=null?value:inner;const commit=n=>{if(readOnly)return;if(value==null)setInner(n);onChange&&onChange(n)};const set=n=>commit(n===val?0:n);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const lbl=label!=null?label:makeT("Rating",L,localeMessages)("label");const group=mergeTargetProps(mergeTargetProps({},rootProps,["role","name","value","required"]),controlProps,["role","name","value","required"]);const requiredDescription=void 0;const control=useFieldAssociation({id:group.id??id,"aria-label":group["aria-label"]??(group["aria-labelledby"]?void 0:label?label+": "+val+" / "+max:void 0),"aria-labelledby":group["aria-labelledby"],"aria-describedby":group["aria-describedby"],"aria-invalid":group["aria-invalid"],"aria-required":group["aria-required"]},{fallbackLabel:lbl+": "+val+" / "+max,description,error,required,requiredSupported:true,requiredDescription});const refs=React.useRef([]);const focusIdx=val>0?Math.min(max,val)-1:0;const move=(from,delta)=>{if(readOnly)return;const next=Math.max(0,Math.min(max-1,from+delta));commit(next+1);const b=refs.current[next];if(b)b.focus()};const onKeyDown=(e,i)=>{if(readOnly||e.nativeEvent.isComposing||e.keyCode===229)return;if(e.key==="ArrowRight"||e.key==="ArrowUp"){e.preventDefault();move(i,1)}else if(e.key==="ArrowLeft"||e.key==="ArrowDown"){e.preventDefault();move(i,-1)}else if(e.key==="Home"){e.preventDefault();move(i,-i)}else if(e.key==="End"){e.preventDefault();move(i,max-1-i)}};return React.createElement(React.Fragment,null,React.createElement("div",{...group,...control,ref:mergedNativeRef,className:cx("cs-rating",className,group.className),role:"radiogroup","data-readonly":readOnly?"true":void 0},Array.from({length:max}).map((_,i)=>React.createElement("button",{key:i,type:"button",role:"radio","aria-checked":i+1===val,"aria-label":i+1+" / "+max,className:i<val?"on":void 0,onClick:()=>set(i+1),tabIndex:readOnly?-1:i===focusIdx?0:-1,ref:el=>{refs.current[i]=el},onKeyDown:e=>onKeyDown(e,i)},React.createElement("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:i<val?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:STAR}))))),fieldMessages(control,description,error,requiredDescription))});Rating.displayName="Rating";Object.assign(__ds_scope,{Rating})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Rating.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const SearchField=React.forwardRef(function SearchField2({value,defaultValue="",onChange,onClear,disabled=false,readOnly=false,placeholder,lang,className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const[inner,setInner]=React.useState(()=>defaultValue==null?"":String(defaultValue));const val=value!=null?value:inner;const set=v=>{if(disabled||readOnly)return;if(value==null)setInner(v);onChange?.(v)};const[ref,L,localeMessages]=useLang(lang);const t=makeT("SearchField",L,localeMessages);const ph=placeholder!=null?placeholder:t("placeholder");return React.createElement("div",{ref,className:cx("cs-search",className)},React.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("circle",{cx:"11",cy:"11",r:"7"}),React.createElement("path",{d:"M21 21l-4.3-4.3"})),React.createElement("input",{"aria-label":props["aria-label"]||(props["aria-labelledby"]?void 0:ph),...props,type:"text",role:"searchbox",value:val,disabled,readOnly,placeholder:ph,onChange:e=>set(e.target.value),ref:mergedNativeRef}),String(val).length?React.createElement("button",{type:"button",className:"cs-search__clear","aria-label":t("clear"),disabled:disabled||readOnly,onClick:()=>{if(disabled||readOnly)return;set("");onClear&&onClear()}},React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},React.createElement("path",{d:"M6 6l12 12M18 6L6 18"}))):null)});SearchField.displayName="SearchField";Object.assign(__ds_scope,{SearchField})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/SearchField.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const SegmentedControl=React.forwardRef(function SegmentedControl2({options=[],value,onChange,mode,role,className,...props},forwardedRef){if(role!==void 0&&role!=="tablist"&&role!=="radiogroup")throw new TypeError("Unsupported SegmentedControl role: "+role);const effectiveMode=mode===void 0?role==="tablist"?"tabs":"radio":mode;if(effectiveMode!=="radio"&&effectiveMode!=="tabs")throw new TypeError("Unsupported SegmentedControl mode: "+effectiveMode);const tabs=effectiveMode==="tabs";const mergedNativeRef=useComposedRefs(forwardedRef);const refs=React.useRef([]);const idx=Math.max(0,options.findIndex(o=>o.value===value));const vertical=props["aria-orientation"]==="vertical";const key=(e,i)=>{if(e.defaultPrevented||e.isComposing||e.nativeEvent?.isComposing||e.keyCode===229)return;let n=null;if(e.key===(vertical?"ArrowDown":"ArrowRight"))n=(i+1)%options.length;else if(e.key===(vertical?"ArrowUp":"ArrowLeft"))n=(i-1+options.length)%options.length;else if(e.key==="Home")n=0;else if(e.key==="End")n=options.length-1;if(n==null)return;e.preventDefault();if(onChange)onChange(options[n].value);const b=refs.current[n];if(b)b.focus()};return React.createElement("div",{...props,role:tabs?"tablist":"radiogroup","aria-orientation":vertical?"vertical":"horizontal",className:cx("cs-segmented",className),ref:mergedNativeRef},options.map((o,i)=>React.createElement("button",{key:o.value,type:"button",role:tabs?"tab":"radio",id:o.id,"aria-controls":o["aria-controls"],"aria-selected":tabs?value===o.value:void 0,"aria-checked":tabs?void 0:value===o.value,tabIndex:i===idx?0:-1,ref:el=>refs.current[i]=el,onKeyDown:e=>key(e,i),onClick:()=>onChange&&onChange(o.value)},o.icon||o.icon===0?React.createElement("span",{"aria-hidden":"true"},o.icon):null,o.label)))});SegmentedControl.displayName="SegmentedControl";Object.assign(__ds_scope,{SegmentedControl})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/SegmentedControl.jsx",error:String(e&&e.message||e)})}try{(()=>{const{mergeIds}=__ds_scope;const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Select=React.forwardRef(function Select2({id,label,description,error,options,children,disabled=false,lang,className,placeholder,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const[ref,L,localeMessages]=useLang(lang);const t=makeT("Select",L,localeMessages);const hasError=Boolean(error)||error===0;const hasDescription=Boolean(description)||description===0;const gid=React.useId();const sid=id??gid;const hasLabel=Boolean(label)||label===0;const labelId=hasLabel?sid+"-label":void 0;const labelledBy=props["aria-labelledby"]??(props["aria-label"]==null?labelId:void 0);const descId=hasDescription?sid+"-desc":void 0;const errId=hasError?sid+"-err":void 0;const describedBy=mergeIds(props["aria-describedby"],descId,errId);return React.createElement("label",{ref,className:cx("cs-field",disabled&&"is-disabled",hasError&&"is-invalid",className),htmlFor:sid},label||label===0?React.createElement("span",{id:labelId,className:"cs-field__label"},label):null,hasDescription?React.createElement("span",{id:descId,className:"cs-field__description"},description):null,React.createElement("span",{className:"cs-select"},React.createElement("select",{...props,id:sid,disabled,"aria-invalid":hasError?true:props["aria-invalid"],"aria-labelledby":labelledBy,"aria-describedby":describedBy,className:"cs-field__control",ref:mergedNativeRef},placeholder!=null||!children?React.createElement("option",{value:"",disabled:true,hidden:true},placeholder??t("placeholder")):null,options?options.map(o=>React.createElement("option",{key:o.value,value:o.value},o.label)):children),React.createElement("span",{className:"cs-select__chevron","aria-hidden":"true"},React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React.createElement("path",{d:"M6 9l6 6 6-6"})))),hasError?React.createElement("span",{id:errId,className:"cs-field__error",role:"alert"},error):null)});Select.displayName="Select";Object.assign(__ds_scope,{Select})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Select.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Slider=React.forwardRef(function Slider2({className,children,lang,"aria-label":ariaLabel,...props},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Slider",L,localeMessages);return React.createElement("input",{ref:mergedNativeRef,type:"range",className:cx("cs-slider",className),"aria-label":ariaLabel??t("label"),...props})});Slider.displayName="Slider";Object.assign(__ds_scope,{Slider})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Slider.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Switch=React.forwardRef(function Switch2({label,disabled=false,className,children,lang,"aria-label":ariaLabel,"aria-labelledby":ariaLabelledby,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const[ref,L,localeMessages]=useLang(lang);const t=makeT("Switch",L,localeMessages);const hasLabel=Boolean(label)||label===0;const named=!!(hasLabel||ariaLabel||ariaLabelledby);const fallback=t("label");const{onChange,...rest}=props;return React.createElement("label",{ref,className:cx("cs-switch",disabled&&"is-disabled",className)},React.createElement("input",{type:"checkbox",role:"switch",disabled,"aria-label":ariaLabel??(named?void 0:fallback),"aria-labelledby":ariaLabelledby,onChange:e=>{if(onChange)onChange(e)},...rest,ref:mergedNativeRef}),React.createElement("span",{className:"cs-switch__track","aria-hidden":"true"}),hasLabel?React.createElement("span",{className:"cs-switch__label"},label):null)});Switch.displayName="Switch";Object.assign(__ds_scope,{Switch})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Switch.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const TagInput=React.forwardRef(function TagInput2({controlRef,id,label,value,defaultValue=[],onChange,placeholder,max,disabled=false,lang,className,description,error,required=false,rootProps,controlProps},forwardedRef){const mergedControlRef=useComposedRefs(controlRef);const[inner,setInner]=React.useState(defaultValue);const tags=value!=null?value:inner;const[q,setQ]=React.useState("");const set=arr=>{if(disabled)return;if(value==null)setInner(arr);onChange&&onChange(arr)};const add=s=>{if(disabled)return;s=s.trim();if(!s)return;if(tags.includes(s)){setQ("");return}if(max!=null&&tags.length>=max)return;set([...tags,s]);setQ("")};const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("TagInput",L,localeMessages);const ph=placeholder!=null?placeholder:t("placeholder");const control=useFieldAssociation({id:controlProps?.id??id,"aria-label":controlProps?.["aria-label"],"aria-labelledby":controlProps?.["aria-labelledby"],"aria-describedby":controlProps?.["aria-describedby"],"aria-invalid":controlProps?.["aria-invalid"],"aria-required":controlProps?.["aria-required"]},{fallbackLabel:label?void 0:ph,description,error,required,requiredSupported:true});const sid=control.id;if(label&&!controlProps?.["aria-labelledby"]&&!controlProps?.["aria-label"])control["aria-labelledby"]=sid+"-label";return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-field",disabled&&"is-disabled",className)},rootProps)},label?React.createElement("label",{id:sid+"-label",className:"cs-field__label",htmlFor:sid},label):null,React.createElement("div",{className:"cs-taginput"},tags.map(tag=>React.createElement("span",{key:tag,className:"cs-tag"},tag,React.createElement("button",{type:"button",className:"cs-tag__close","aria-label":t("remove")+" "+tag,onClick:()=>set(tags.filter(x=>x!==tag)),disabled},React.createElement("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round","aria-hidden":"true"},React.createElement("path",{d:"M6 6l12 12M18 6L6 18"}))))),React.createElement("input",{...mergeTargetProps({...control,value:q,placeholder:tags.length?"":ph,disabled,onChange:e=>setQ(e.target.value),onKeyDown:e=>{if(disabled||e.nativeEvent.isComposing||e.keyCode===229)return;if(e.key==="Enter"||e.key===","){e.preventDefault();add(q)}else if(e.key==="Backspace"&&!q&&tags.length){set(tags.slice(0,-1))}},onBlur:()=>add(q)},controlProps,["id","role","type","name","value","defaultValue","disabled","required","aria-required","aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-haspopup","aria-expanded","aria-controls","aria-activedescendant","onChange"]),ref:mergedControlRef})),fieldMessages(control,description,error))});TagInput.displayName="TagInput";Object.assign(__ds_scope,{TagInput})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/TagInput.jsx",error:String(e&&e.message||e)})}try{(()=>{const{mergeIds}=__ds_scope;const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Textarea=React.forwardRef(function Textarea2({id,label,description,error,disabled=false,rows=4,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const hasError=Boolean(error)||error===0;const hasDescription=Boolean(description)||description===0;const gid=React.useId();const tid=id??gid;const hasLabel=Boolean(label)||label===0;const labelId=hasLabel?tid+"-label":void 0;const labelledBy=props["aria-labelledby"]??(props["aria-label"]==null?labelId:void 0);const descId=hasDescription?tid+"-desc":void 0;const errId=hasError?tid+"-err":void 0;const describedBy=mergeIds(props["aria-describedby"],descId,errId);return React.createElement("label",{className:cx("cs-field",disabled&&"is-disabled",hasError&&"is-invalid",className),htmlFor:tid},label||label===0?React.createElement("span",{id:labelId,className:"cs-field__label"},label):null,hasDescription?React.createElement("span",{id:descId,className:"cs-field__description"},description):null,React.createElement("textarea",{...props,id:tid,rows,disabled,"aria-invalid":hasError?true:props["aria-invalid"],"aria-labelledby":labelledBy,"aria-describedby":describedBy,className:"cs-field__control",ref:mergedNativeRef}),hasError?React.createElement("span",{id:errId,className:"cs-field__error",role:"alert"},error):null)});Textarea.displayName="Textarea";Object.assign(__ds_scope,{Textarea})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Textarea.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const CLOCK=React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("circle",{cx:"12",cy:"12",r:"9"}),React.createElement("path",{d:"M12 7v5l3 3"}));const TimePicker=React.forwardRef(function TimePicker2({controlRef,value="09:00",onChange,step=30,label,"aria-labelledby":ariaLabelledBy,disabled=false,lang,className,rootProps},forwardedRef){const mergedControlRef=useComposedRefs(controlRef);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("TimePicker",L,localeMessages);const stepMin=Number(step);const safeStep=Number.isInteger(stepMin)&&stepMin>=1&&stepMin<=1440?stepMin:30;const opts=[];for(let m=0;m<24*60;m+=safeStep){opts.push(String(Math.floor(m/60)).padStart(2,"0")+":"+String(m%60).padStart(2,"0"))}return React.createElement("span",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-timepicker",className)},rootProps,[])},CLOCK,React.createElement("select",{"aria-label":label!=null?label:ariaLabelledBy?void 0:t("label"),"aria-labelledby":ariaLabelledBy,disabled,value,onChange:e=>onChange&&onChange(e.target.value),ref:mergedControlRef},opts.map(o=>React.createElement("option",{key:o,value:o},o))))});TimePicker.displayName="TimePicker";Object.assign(__ds_scope,{TimePicker})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/TimePicker.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Toggle=React.forwardRef(function Toggle2({pressed,defaultPressed=false,onChange,onClick,icon,children,disabled=false,lang,className,"aria-label":ariaLabel,...props},forwardedRef){const[inner,setInner]=React.useState(defaultPressed);const on=pressed!=null?pressed:inner;const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Toggle",L,localeMessages);const hasContent=React.Children.toArray(children).some(child=>typeof child!=="string"||child.trim().length>0);const flip=()=>{const v=!on;if(pressed==null)setInner(v);onChange&&onChange(v)};return React.createElement("button",{ref:mergedNativeRef,type:"button",className:cx("cs-toggle",className),"aria-pressed":on,"aria-label":ariaLabel??(hasContent?void 0:t("label")),disabled,onClick:event=>{onClick?.(event);if(!event.defaultPrevented)flip()},...props},icon||icon===0?React.createElement("span",{"aria-hidden":"true",style:{display:"inline-flex"}},icon):null,children)});Toggle.displayName="Toggle";Object.assign(__ds_scope,{Toggle})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Toggle.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Transfer=React.forwardRef(function Transfer2({items=[],value=[],onChange,titles,lang,className,rootProps},forwardedRef){const[checked,setChecked]=React.useState([]);React.useEffect(()=>{setChecked(current=>{const next=current.filter(key=>items.some(item=>item.key===key));return next.length===current.length?current:next})},[items]);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Transfer",L,localeMessages);const tt=titles||[t("source"),t("target")];const inTarget=k=>value.includes(k);const toggle=k=>setChecked(c=>c.includes(k)?c.filter(x=>x!==k):[...c,k]);const move=toTarget=>{const mv=checked.filter(k=>items.some(item=>item.key===k)&&inTarget(k)!==toTarget);if(!mv.length)return;onChange&&onChange(toTarget?[...value,...mv]:value.filter(k=>!mv.includes(k)));setChecked([])};const renderList=target=>React.createElement("div",{className:"cs-transfer__list"},React.createElement("div",{className:"cs-transfer__title"},target?tt[1]:tt[0]),React.createElement("ul",null,items.filter(it=>inTarget(it.key)===target).map(it=>React.createElement("li",{key:it.key},React.createElement("label",null,React.createElement("input",{type:"checkbox",checked:checked.includes(it.key),onChange:()=>toggle(it.key)})," ",it.label)))));return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-transfer",className)},rootProps,[])},renderList(false),React.createElement("div",{className:"cs-transfer__ops"},React.createElement("button",{type:"button",className:"cs-button cs-button--secondary cs-button--xs","aria-label":t("toTarget"),onClick:()=>move(true)},"›"),React.createElement("button",{type:"button",className:"cs-button cs-button--secondary cs-button--xs","aria-label":t("toSource"),onClick:()=>move(false)},"‹")),renderList(true))});Transfer.displayName="Transfer";Object.assign(__ds_scope,{Transfer})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Transfer.jsx",error:String(e&&e.message||e)})}try{(()=>{const parseEditorFragment=(()=>{var editorParser=(()=>{var de=Object.defineProperty;var Wt=Object.getOwnPropertyDescriptor;var Xt=Object.getOwnPropertyNames;var Jt=Object.prototype.hasOwnProperty;var Kt=(e,t,a)=>t in e?de(e,t,{enumerable:true,configurable:true,writable:true,value:a}):e[t]=a;var Gt=(e,t)=>{for(var a in t)de(e,a,{get:t[a],enumerable:true})},jt=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let E of Xt(t))!Jt.call(e,E)&&E!==a&&de(e,E,{get:()=>t[E],enumerable:!(n=Wt(t,E))||n.enumerable});return e};var Qt=e=>jt(de({},"__esModule",{value:true}),e);var H=(e,t,a)=>Kt(e,typeof t!="symbol"?t+"":t,a);var hr={};Gt(hr,{parseFragment:()=>Yt});var Vt=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),f="�",r;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(r||(r={}));var P={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ae(e){return e>=55296&&e<=57343}function Qe(e){return e>=56320&&e<=57343}function Ve(e,t){return(e-55296)*1024+9216+t}function me(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Re(e){return e>=64976&&e<=65007||Vt.has(e)}var T;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(T||(T={}));var zt=65536,fe=class{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=false,this.lastChunkWritten=false,this.endOfChunkHit=false,this.bufferWaterline=zt,this.isEol=false,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,a){let{line:n,col:E,offset:_}=this,u=E+a,d=_+a;return{code:t,startLine:n,endLine:n,startCol:u,endCol:u,startOffset:d,endOffset:d}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){let a=this.html.charCodeAt(this.pos+1);if(Qe(a))return this.pos++,this._addGap(),Ve(t,a)}else if(!this.lastChunkWritten)return this.endOfChunkHit=true,r.EOF;return this._err(T.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,a){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=false,this.lastChunkWritten=a}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=false}startsWith(t,a){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,false;if(a)return this.html.startsWith(t,this.pos);for(let n=0;n<t.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==t.charCodeAt(n))return false;return true}peek(t){let a=this.pos+t;if(a>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,r.EOF;let n=this.html.charCodeAt(a);return n===r.CARRIAGE_RETURN?r.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=false,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,r.EOF;let t=this.html.charCodeAt(this.pos);return t===r.CARRIAGE_RETURN?(this.isEol=true,this.skipNextNewLine=true,r.LINE_FEED):t===r.LINE_FEED&&(this.isEol=true,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=false,this._addGap(),this.advance()):(this.skipNextNewLine=false,Ae(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===r.LINE_FEED||t===r.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){me(t)?this._err(T.controlCharacterInInputStream):Re(t)&&this._err(T.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=false}};var R;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(R||(R={}));function Ne(e,t){for(let a=e.attrs.length-1;a>=0;a--)if(e.attrs[a].name===t)return e.attrs[a].value;return null}var $t=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];function qe(e){return e===0||e>=55296&&e<=57343||e>1114111}function ze(e){return qe(e)?65533:e>=128&&e<=159&&$t[e-128]||e}function Ze(e){return qe(e)?65533:e}var F=(()=>{let e=new Uint8Array(127),t=0;for(let a=33;a<=126;a++)a!==34&&a!==36&&a!==92&&(e[a]=t++);return e})();function $e(e,t,a,n,E,_){let d=e.length,m=_*90,A=0,O=()=>{let C=F[e.charCodeAt(A++)];return C<_?C:C*91-m+F[e.charCodeAt(A++)]},v=a-n,j=a+E,N=new Int32Array(j);N.fill(-1,n,_),N.fill(-1,_+v,j);let M=new Int32Array(j),b=new Int32Array(j);function z(C,U){let L=0,k=U,W=U+C;for(;k<W;){let X=F[e.charCodeAt(A++)];if(X<89)L+=X,N[k++]=L;else if(X===89){let Q=F[e.charCodeAt(A++)]+2;for(;Q--;)N[k++]=++L}else{let Q=F[e.charCodeAt(A++)];L+=89+(Q<90?Q*91+F[e.charCodeAt(A++)]:F[e.charCodeAt(A++)]*8281+F[e.charCodeAt(A++)]*91+F[e.charCodeAt(A++)]),N[k++]=L}}}z(n,0),z(v,_);let K=new Int32Array(E*2),Z=0,_e=0;function Ke(C,U){for(let L=0;L<C;L++){let k=U+L,W=O(),X=O();K[_e*2]=W,K[_e*2+1]=X,_e+=1,M[k]=Z;let Q=(N[W]<0?b[W]:1)+(N[X]<0?b[X]:1);b[k]=Q,Z+=Q}}Ke(E-_+n,_+v),Ke(_-n,n);let ue=new Uint16Array(Z),Ge=0;for(let C=0;C<_e;C++)for(let U=0;U<2;U++){let L=K[C*2+U],k=N[L];if(k<0){let W=M[L],X=W+b[L];for(;W<X;)ue[Ge++]=ue[W++]}else ue[Ge++]=k}let He=new Uint16Array(t),je=0;for(;A<d;){let C=F[e.charCodeAt(A++)];C>=_&&(C=C*91-m+F[e.charCodeAt(A++)]);let U=N[C];if(U<0){let L=M[C],k=L+b[C];for(;L<k;)He[je++]=ue[L++]}else He[je++]=U}return He}var Fe=$e("!}.&u%}'&}*'~!6*)%&,~!J~!J~%L~y<~!R,~~%Lu~~#GD~~#|)1#%}^%}2%+#.##%##%}&%##%'#%##&%#%#'%#&#%#&#'#%%#&#%##%#)%''%&%#%#'%#%%#%%}%%%#%#&(23#%%#&-%0%('1#(##%#'##+%'*.:1}#%#6-+(%'%%#%%%}#L'2351&('%}&/N'(0(/*-%(%%}#'+&T%7.2}#&%&#%#36/5##%&%%#&#%%#))2%%##%&&'0~!#*+&'%1~!%).'3q?&%'1~!.##%6(~!+%%%(Gw'rT~!E#<nA%#jZ~!H%(~!42##~!*31&~!G%U~#)5~#`3~!J~!Z~%]~%Y~%C~!q~!u~#kz~%#~!6'~!D~!U~!?~#T~!c%~!G#'~%7|~!G~!J~!G&~#pb~(Df}#%}*&}#%##%##%##&#-}&'#'&%#.++}%mI,#,@&(}*%}*'%&##&#%##%}&0}#.},U},%}+%}&%}#%##&}B%(}(%}+%)})%##%#&}&%##%&}<%}>%#%&}*%}(%}9%}/%})%}*%}*%}?&}&%}3%}&*#%})%#%#)}#&#-#+*%E%%'%'#%}#*V##&##I}#&&##%&%#&&Qf%%))w/0+&%#(#.%-''''++++7}>%4'',##1,#%#&%##&#'##&#*#9)%&%}#*}%,#+P(%A&%#'&##wSD',9E00#y#@}(+}&%&>~!#~!X}#*}(&&}(&}(,%}%&#+&}#&}I%#%}%)#(},'%#*}4%%#%}(''}#/##(##),%-##%%)#&}(.}&%#&}%%}*&#%},&&}&%}#%*'#%})%}D&}&%}-&}6&#&}-,%}#%})-(~+`~,=?~I9'9%~!,#%})%})%}@%}?%}(~!?~#<~#pP~#BG~#=1#%K+~#?#~%;)~#A~#mF1~#A'~'X%'~#lR~#N~'N~#r~#m#-~#i'?%#'%~#B%##%,%#~#_%#0%~#]732~,w~2+#:&#%&'0%&>%}#>##F+)#%&&#(+_}4&}-%}(&}@&}O7Fdf0@+/v4}&WU##&/0#&'('B#%}.%}'+#%}#%%&#&%#%##+#&#)#6#'#.},%}c%},%#%##%&#&%#&~#>'*-.%##%##%}#%%}%'~#)D1}#%*&~#_%%'(~#S2%'.}#~#=##*'*-%}&'%'##&&~'E%.#&~#M4}%%##&'%#~#O1##%&#'+~#<B%##%%'%+~#;#@%}#&%#&&%#(~#H1}'%'##&&~#?A}&'~#D#%32}'&&&&~#[}'(#%}'~#;C})&}%%#%~#=&%,3}%'(#%%~#^'#&&)#%'~#Y%-~#d-%'~#^%%&#&&&}#~#b~2t*&'~&(~&@~0%~e~3}%*''0})&}+~!9##-}#%-hD*)1fC#%/&/fB#40~!+#)*4~!+~!K'&:~!/*7~!.#~!H~!L':~%x&~!H#~!*~%1~!I#~!+A~#p'~!F~~#-#~,,(~.Z~!V~%;'B'mq-W~!N~%I%#&&#&}#%},%%}'%}+X#%}#&}(%}'%}<%}#%}%%'}'%}:~![)9@~%>~#UA%-%##&~!C%~!-.9:~!1~!-^2/:a~!y,D*J#-5)/4~%23,~#G~!L1~!0X3`~!2+~!!0-~&E~!W~!o,>Y&]~%cZx_&~#O*9#A#'#+I'%#)~!0B*-5A+-((F&*M#)(-7-5+'-3a5Vi~!Y~!?+[)%3),ERHm~!+:D,VG.+)?fB%%*(%)'(#&80%1'8`K8?`+'Z#&O&'H5#*9)A%%5&3))0%39+.*7#()&&*=4@**L)<'_&*+..;(#*+)./&0#3)%')-8(4ixD(&.}%,('aI:,)%,k2231T)I'#/-W7,/'Q#.'Y24+h')37</31&83##&0#),H(?'&?/1##%#&&#%''-%&&&#(&''&#.-'%#%%(,')*'&#&#'##%(%(#%('#&##%%%%('%#%#%%#%#&%##h>w+v<ayvyvcg.uuhKr}g/v|g>u9i[~>g5uI~=RvdwEg;v/g;uk!!TTSx]@RT!U!#!@VBRUU!'UTe-d0c`e&gSdicedFcrdTaqb.kYcAohdYd@a3e+d}dMdtd.aJ#bqcK`dle/e.e'dwdPdodddjbEb}ogd^ofdpduc6j?l%d{drdqc)d7bacOdQ%T#Y)X.sR[yH>6Vyv3[xwLu>vo'!*.[yBacahoj>6Rew3[xqdZa#!a&#^(X-[yG>6Vyu3[xvg3sEr|g.u/Ri9db0T#^(Xa)!-[y;>6Vylg4wKs{JwNZt3@3r=c4Z([xlg;wKt!cpq's@v7A'*a(a+!-a#[y<3Dt?3Dt'>6Vym3[xmg9rxsNJwLZt4~?r?db1T#`-!(Xa,!0[yS>6Vz%NuQs.g4wKtnJwNZtS@3r>c4Z([y%g;wKtrdga8!a(!#&T*Y-Xa#!a0<or[yc3Dtq>6Vz43[y3JwNZtf@3s!Ju}!%Dti:pm3c_%X#tjB5pkd6q!r]u?voC'*-a.a2!0a&a+[yI3DtI3Ds~3DtH>6Vyw3[xx;:s#~<5pKJwNZtE@3r~d`a)!a2T#a.(!+U.X1[yT3Dt`3Dtv>6Vz&3[y&g9rxwzcxstPu.<rAJwLZtT~?r@dZa%!a.&^*Za(/Reu[ya>6Vz23[y1g3sEr}wkg{NuQRg{ci(U#5@b`~,cg#U(2WnH5wugcRh7dX#T(Y,a'Ta!!a,[yZ<]mj>6Vz,3[y+Pv#5ReZKu+=,%!H}7ABwkaS?Rh:BcW(X#<]mrj:ubv/ARekdg%!(!a.*Ta(Y.X1!#sP>Rl*Dt6[y>>6Vyo3Wf*jOvuumvuRgRJuq*!:9<B@bX~3jVv&v@s@5Re[d/rQt{uAvo&a&a*)a2!,0Wf!3Dt0=Bs'>6Re}3[xy~<5s%JwJZt1~Gs)c;&!#2sJkNuXvzq7rxu,Re8dka4!a8(aEZ+a@Y.X1Xa)[yd=Bs(3DtP>6Vz53[y4cX#X&Re:avRe9~<5s&JwJZtQ~Gs*i^rzvdRg+Jv{%!2sbB@bX}kdga,!Za?&^*T1/!a'Dt+[y6>6Vyf3Wf%g/u;s4hGu6?Rh-JvZ,!c%#&RoX54Rivj7uyvf8RgTKvZB%*!2sGh<vu5Rgq<=C::9bb~#dZ#T&Ta6Y.X*Dt>[y93Wf)coZ(T,6VyifluvRgC@95@B@bX~/hFu34cC#T,k/unq8w8Q5RkUklwQuzunq8w8Q5Rk8d/rJu?v8w9)-&!a0a;a&aIWejg3sEr/h1s<DtDJvyZqY5aws3Jvy!&Wei~Hr1:au5@Bag>23E~5c:Z&bX};kKv?w&unuVu5Rjc;>bs)#~@:Rh.=ay<a]C;b`}Vd6s/t{uAvoaxa()!a,a7%-a#a2Dt,[yF2Wo[>6Vyt3[xuNuPRi&NuPwpi#RoWh?vf8Ri%Jv]!%Ri:KvxD!.'2WeAjZu`q9rxu,Re7woeAg-unLq(qA_/*2Wg_g3u5q^9:4E}/jTrxrzv=Wkkd~0UX#^^Xa-a1a5T&a=U1a'*aEa]!a*aPaA-adok[y54Rn>;:p3~Dp5g9rpsFNvZqjg3uJp4~<5p0Pw;5qlJwNZt*@3p1Pw:5p/Ou!5p2JvG'!6Vye=<qnJvh_[xhg3v,Rh3kOwOw-sDuev/Re^dha[a%!%!a+#Ta7)-5TaCaO!aka!a)sf[yb2>Rl!9ARiq5E}Qg=ucRkBE|oJrJ_@Wk~@Wk{JrJ_@Wk|@WkyJrJ_@Wk}@WkzJvO_[y2g-vMRmiKuYC!)&>Ri;>Ri<@3RkNc](X#@9Rk=g5vuRmhKvDB!+'=]meg3u4Rmgd)#Y'Vz3CARmfd`a+!%T'!+#Ta1Ta6TaM-sTDt9[yA9sYd'%Y#s[[xpj:ueunaXRgEjRq,v-vuqdd2'`#6Rev<32@5>:2<E}5xIo9a*X#Y(;5RePJvD_g>vyRgNj8w)v8<wggs:RgXiZt|vjx,hSq3ah!-(~@:Ro/Ou!5RhWj^v(pyw8unRhUdx-UY#^Ua.a3a70!)%UX1TaDa)'omRiRRhE[y:3Dsz=Br,>6Vyj3[xkg6ruwjcqsrPw;5r*Ku]D'Zt-@3r(~?r.i[vwv]dU1a--U#`a4(g/vsRhPOu!5RhLj:rmu9Wo!~@:wdh@g/vsRiTjXuvvNr}:RhBj^v(pyw8unRn]dz1UYa'a+^Y(!aETZalaRY.Ta?a4[yDJw1!#qLsW>6Vyrfzq-pLflpwRe|Js>%!Dt@3Dt&Jvy_[xs~HrnjMuwpsw'RecKu+D#'!t<~Grl~?rjg5u-x,gwp{ah!-(~@:Rg~Ou!5Rh'jXuvvNr}:Rh#cW#X/c;&!#2sLi[v7u7RgpJv)(!iLrxu,Re6j7v@s@5Se[e7d`aW!Za(a`T.a#!a3!&aDa-!9)Dt_=6s+3[x~~DR|h~DS6avhGun5RkZj3w)v-]mkKunB!&*]kb97R|i<ARk<c:Z(6Vy}Juh'!wziMRoS:F|vkLuauJv5vtvQRh1d='T+Y#VyO~DR|jcF#T'7R|g97R|kJv3'!ay<Rj,Jvh&!:ReXcsa6*a+#a#_aIRf9aLRf?c,Z&Rf5Rf7c.Z&Rf;Rf>cQ#%T'p-Rf8Rf=ct#%'(*!,p,Rf4p+Rf6Rf:Rf<d~'Ua%U*^UYa(!a,-!#a4YaTalaEX0a8a<Weo3Dt/3Dsx=Br93Wen~Dr;~<5p<JwNZt2@3p=Pw:5p;Ou!5r3c7&!#:p>3Ds}KvGB)_6Vyk2sM=<r7x'eovA(!hFu1ARf}cV#X&@r5j6rvwQa^Rf3c=Za'wkghJv__g;unRggA53B9=b^}%j6uduo5Jq;!(hIv%2Re`Ou4ARe_e%a#^^^Xa&!a*a2!&a6YaP!*ad!#a:aE/5Rn?[y@>6Vyp;:pE~DrY~<5pBJwNZt8@3pCh=rt3rWPw:5pAJup_[xoNuPpF9c!#'45pD5ARn)d8#X'X*3@rU72s]h>v<<sSjJpqvewOJq/(!hNw'5ReBk0s2u3w/w'5ReE5@Jq.!a+JQ!&WeU23d(#Y&RjG5]jBk!u7w&u0udARjEe#+^^^Ub#!a2/a`Z(agT1!a-a;|@TaG!aS[yV=Re~fow'RguNuPRe?bz#'>RoUWeL>:Cbb|?JwPZtVg6ruRmzJvD'!6Vz(g/vmRh~Jvy_[y(g9voRgyx*cy(#2>Ri2B9b]~9kIw9u7rluJu3Rg]dI#a%UY'@=p%CAx.gQZ&RhwwygtRm{x5g_Z'+ABqR9Woa=Bp&dV#^*Xa'!&@o{g4v]Rk;Jv{!%Rk[wkkiA5RkiwwfUB=x,fUuqC&*!>RfTg8v0RfV~ARfSd;rJsAuAv9wR'ae+/aO!a@aza/a#[yQ@Wg!2Wemg3sEr0JvB_g>uvReWg2v+Re=KupB_+[y!2AbY~-~Hr2AJwD!(h<~El>h<~El?Kun@+_:9b`}Kg-v/Ri3g;vtwyk_9]k_d=&T#*U.6qh@Ab`|K9:H|CJv[!&3Dtex'fDwC%!Rf[9WlMd[(^X,!a%Z06Vz!@WgBg=v~Rgvg,QRe@awd,#Y+jTv|Q~EfWj]uNr|~FRfXdy#Y&^Ua%!aO.!(a)Ua;=!a@aKap!a-,a!Ta]a[rSa]p?[y82sK=Bq~;:p:~<5p8Pw:5p7d'#Y'Wf(;RnRi[u4w&RgJJvG'!6Vyh=<r#ijuuv/sIKuYD'ZtG@3p9~Gr&d2#`(g<vtRgFj`u5w&rqpxRf2CJuY!+:wfnTOu!5Rg}jNs1ucv&RfwJvA!&3@q|BDcC#T,k/unq8w8Q5RkTklwQuzunq8w8Q5Rk9dga#!a'!a=#a0!:+Tb*b@aO.a4!aba8aFJv^}?!VyR~Dr<g;u%Rn.~<5p[x'e`wNZtR@3p]Pw:5pZhNvjBp.woe_g5u-r4JwF!%DtO3:ooc7&!#:p^3DtpLuGw(!+%)Dtk6Vz#2sd=<r8d'#Y([y#<x3gJt`w@!)%}MRiowzikRij=]ilxAf3,U(#B2Rf#g0v-Rm[ck{`U#]giKv3>)!&6Ri154s,KuGB_%@r68r:dJ|t`#X(9<E|u2@H|rx3gJu?w'!+'1Nu7Reg4=H~+9<wxgY95Rm]xLggZ-`(X}U2:Ri4h<uOawRmsJv__5@bb{jbV~3dka#a'a]!,#a+U=a>b6a3b%!/aKa/)!arwve^VyJ;:pR~DpTg3uJpS~<5pOPw;5qmPw:5pNOu!5pQJvG'!6Vyx=<qoJvA!{~Jup!%@qk7Rn/KvyD!}''[xz;>wkh'?Rh,x8gyt`w5D!&),(SgyccRgztJ@3pPB5p#d'(Y#<]mmifubw&RgoJvE&!82s^JvF&!8Rf,ADb]~;x=h'rNu]vK!,%'*0RnORh)4Rh*AqQg-vaRnNg;wHwkh'ba~4cE#Ta*x3gctyw@'!+%RnFRnD<4Rn@hFvK5RnCxWg[#`&a0Ua()`1Rm75Rg[c]%X#qi8Rg^NvdRj>BwzgZauwji7Rm6A4wgg]d1#&(*,.0a#Rm;Rm<Rm=Rm>Rm?Rm@RmARmBe%#^^^Xaea?aC/b+(,!a+a#!a/!>a&Ta<aKbD!2wphBRnk[yPw}hE|.=Br-3Dtm>6Vy~g6urRf.x,hPrNav!%'RnqRo%Ro#Nu;q[Pw;5r+JwNZtM@3r)d'#Y'Weh;xChL#`&RnmRnoKu}>%(!Rne~Bs-;2wjcussJv+'!aYSO}6@B<5?ba~8LrNvj!.%*ROwungw~ng~:9;Ri^>wtnig;wHRnixDh@|(UZ.x1h@|)!#:2<H|*xHn]#-UX'3Ro)z=iT}6ARns=Bwsn_wpnaRncw]aR(#UXa&Ua*a/=]iPd'#Y&Ro'WnXf{QRm2hNvj]nZd`'T~&1`{|`#9b]{}c:'!#Wl{>@=be}]?cl{{U#:5Abb}Jds#^YaF!a*b4a#a3aPa>&Tb!bH!*a_!Eau?/a&RjY<]gj>6Vz*;:pe~DrZg,QRj1JwNZtX@wihspcJvZ&!VyX9WmOJu|!|N2WmHJvh&!]ht~Bpbcn&T(!#RmQ<s7Nu;padH#X'`+WmJ@>RmKCARhnKup=!)&Wf+:RhqNuPpf9c!#'45pd5AwghpARn(Ls@w!%,)!RmP@Wfe<E|IJva!&WmNg8vsRmLd`*.`#Y'Xa!axRn*]hrA8Rhug5s@rXg8u!RmMd8#X'X*3@rV72smdI*#UY&RmICARho~GsgxVgd)Ta'U-Y&Xa!T#RnEWnA@Wffg1uDRi0hFvK5RnBxGnG&#`%owp)@wsf+bX}Ze-*1!a*^^^Ua|!#a.aq&Ya2!a>.a6!a:aO`aJDtL[y`@Wg#>6Vz12@wzoYRoZNuPRi!NuPRhzg=ucRi,@=b`{Yg=ucRi-ACJvB!&Sh[ebSh]ebi`wUuFRm4Jw2_[y0JvB!.<Ju(!&SoG}6Shd}6<Ju(!&SoH}6She}6Kur@._g5vHRieJvx!{L2G{Kx6gd'T#?Rh82Wi5cZ#X(g1w)Rm5dW-Y(Ta#!a)!#aYa=wnfE=su2>>bU{0j9udv:<svj8uQv-7RgHdE%#^'sq9sp=>Bb_{TJv`!&g/r|snj6v(us5d,#Y(56H}[978H}]Jw5!&g1rushJvB!+j;v{u5?zDhd}6}bj;v{u5?zDhe}6}ce*#`(^^^a[aea!=!a6a*aoXb1a.!aAbL!b>,b'aL!aV@Wf|2Wlg3[y/JwNZt^@3piPw:5pgJunZou3@rsJva&!Vy_g<v~Rm#JvG'!6Vz0=<r{Ju{%!:pj@WfsiXuJu3Rm:JvZ&!WfA~Bph@c4Z&Dtwax5rubx(#:awRk1@d,#Y&RfjRfid1#,Y(@Wfp2Wlrg5s@ryKu[@!,'=]ig9wlk?Rk>g5u-rqJvy'!@9RkQcH(T#=>Ri~@<wkj(Wj(KuZB*!&<7rw@9RkRcH(T#=>Ri}@<wkj)Wj)dg(Ta2Xa9X#`-!a*CARhg@@=I}d9x;c~#X%so=<sj>2@@=aybb}XjWv0Q~EfEj3vLv;<d,#Y(56H}`978H}_dgaPaFa'a/!#a3Y0a_a;a|!1(a7-[yE3[xt;:pJNvZrrg3uJrvJwNZt=@3pIh=rt3rxPw:5pGOu!5rpJvG'!6Vys=<rz@c4Z&Dt(ax5rtJvZ!&~BpH@wsfNg-vaRlNci*U#=<wei<F}a5@Jq.!a*JQ!%@qZ23d(#Y&RjH5]jCk!u7w&u0udARjFd/prq=tyvpaEa(a:.!a1aZ(@@=I}:9wpd%=<sX55w_h}@@=I{t=ay<aU@@=I}T=ay<2@@=I})?C9:9au@9Cb]}DP~=x-fAZ(2Wl1=ay<aU@@=I}>5@d##Y+jTv|vV~EfFj]uNpn~FRfGdgaK!Z2&!a8a-Tb({E!acTbM*!a(DtY[yYd'%Y#sl[y*hHvh>Re5x2c{Z}.j4uCvcawRiMd+#X+_x&d!},<5RkX;2Hzw@x,gavfB-!{CcF&T#Roe;RodwWbBg5urRgaKvHC*_6Vz+<4opieuew&Rmq@d]&Y)X,T#X0Rh}<BqP=4qS9:ReMg/ujReNJw0!/<Jui%!bd{kawwnemRelAxUa?a3#*.&UX(Ya+a/RhvRnQ<o}9Wmtd-#Y&RgSRmw9;Rmxay=Rmyg-vaRmuxEhSrNu,v-voC!%(aR.a(a7+1Ro1>Ro5CE{A9b]{@;5x#eO{:g;urRi+KrNA!%(Ro3>Ro79;Ri_Ku@>{;&!x%gX|{KunA_+g5QRj/g3u5Rj#g>uERj%wio/xRhS&!,!#^1U}wba{8>>@=be}qC@:D5ba{7Ku+A&!}x?ba}t>>@=be}se(aA^^^Uat!b0#{pa+awUazbGa#aLb9bgaWac'a5TbS=Br!d1#`%scp_Jvl!#rT>Re0JvX&!VyN=H{Fcm#U&:pY=ReaJv2&!]h0=]nUJvG'!6Vy|=<r%JrM_=]h2@Wlud'#)U'Wf'b]{i=]h/Jvh!&~BpWg=v]RnMx+ny#'Nu;pVwjnu=]nwxJnx,T#`&Reqwjnt=]nvieu9vrRjLLuYwP(#+!th@wih5pX~Gr'g5v/Rh4KunA'!-CARnP@wwiN:Rm_9x'cvw>!|l=<saKvAA!0&3@q}>w^e1bp#&Re2Re3BDx7gH#T|f5H|eKuZ>!%(:qNAH{]Jv6!+3B2B9=b^{X<5<B92:E{ZLvhwA(a;a%!igQuyRmad+#Y}m@3Rh5d8#X'X*:AqUAHzmaxwbh<aXRnVcF}RT#Nw&cj#U(BWnug/vsRntdka)(a3+.Zb7aYYan1!bVa@Xa}[y^@b[{G=H{+hFu73Rj&Pv#5ReQcK%T#sig1v{Rj'Ku+D#'!t]~Grm~?rkKuMB!01d5#`'Vy.ta3Dtu~Hroc8#'{^45s85AwZbP&!#Rn!wghxWn#KvEA!)&2RlA2RlBx:h|#(T,=]j09Wobz>x]z/@awRoTd+#Y(az]hFhCrm4d,#Y+jTv|Q~EfMj]uNr|~FRfOdCa!Xa9_X#@<plJvf!%b`{(9;Rgwc;.!#2x7cw#T|UDb]|T5Ju={(!=@E{&Jv)&!Ab`{'awJvf!~*>>@=be{#KuY>!+&4Ezyi[ugv&RjIdea+T)#UXa&T-T&a!Rh9auRmW=]kLg5vuRn+g3u4Rn-Ow6ARn,hHus5xNk?#UX(U~)/g8v0RkD~AwkkF?Ri.OuNBwkkA?Ri/d|a2`a*^UYa.!aBTZaTa'Xa;!(!2!-a#b2[yC>6Vyq3[xr2Wi?g1rusVh%s?DtF~<5rbJs;%!DtBfswKtCj[uvuSsEu3RgVx3o:u+wN'*Zt;@3rd~Grh~?rfg8w)Lq)qE&-a%!>bI|`jWv0vV~EfCjTv|vV~Ef@j]uNpn~FRfBcK#T']gWNu7x,k7q4ai(0!hHv8<RhmkMu9vrsBuev/RhlCJvB!,g<v{wchh~@:Rhji[vrv{wchi~@:RhkdS&a5UY#Ta!RgPwwiI5BwciI~@:Rh`x'iJvj'!5]iJPu8Bwch]~@:Rhach)U#h3rp]gLh@t|Ax,hTq3ah!-(~@:Ro0Ou!5RhXj^v(pyw8unRhVd|)`,^UYas!a?/a2Z'a^Ta{Tb7Ta(a#!a,Wf&9sZ3DtAadamov=Bqt3[xig8vsRm~>waiL2b`{QJv*_Ouv2qgj<v]v2BqfdR'X*X#Y-@3qr~Gqv~?p6hHv-]glPup5Lq+q?_%*b_{qF{n9b^{rOu4ARhpKvCD!+&~Bqp:5Dbb}nwoiKl&unuTuBv]v+ueunaXRf0=Jvh!0nKufu8v1w&w7q%w&uHrz:Rgnj5w,uxDJq/(!hNw'5ReCk0s2u3w/w'5ReFd>Za&!*UaA=<wkgsRnSJv^!%Refifw3vyRgOKu_B'!,<]gkiiu:w&Rh<=C@a^<B57@2F{[<B5@aW:=3away9A5aW=<B=C@a^<B57@2F{Ie-#`(^^^bCara.b8aza6!/bZ,!adTbnTbOb+aFaS!aAT9@Wf~2Wli3Dtl2@d,#Y&RfnRfmJwJZtN~GqyJva&!VyMg<v~Rm%iXuJu3Rm9Jv[_=]ih9wlkDRkCd1#`(@Wg>2Wls3cH#T(@<Rj*=>Ri|b~'#23s9h<~El.d'#Y&Dtxi^rzvdRl#d*#U%(o|B2s`hJwSaxRmDKv4B&!1:Rmdd5#`'Vx}to~Hq{x'f1v3(!BA5ba|bJv_&!Wfug1v]ReIdO+U/Y#&G}-8wze=Rh{g1v]ReHg/uQRf/by#)ibQwERl/cH#T(@<Rj+=>Ri{cNu+vlax-!(#a0qa9<Rii2;;bU{H;x<i=&X#Rk`<4wwi=C9H~8xAI(Y#<azRi@45wXI<B9;5bb~7dL(X#Xa(+!aL6Vy{g5QqOau:5au2@ay547EzbxOcU(UX-T#Ta#:Cbb|A?wjh/b_|SOw6ARgtihr}u7Rhy<d1#T)X1@@=I|~=ay<2@@=aybb}Sj3vLv;<d,#Y(56H}A978H}@dGpvs@uAu`vcw9*!aFa+ai%(b!aXa8.a?a[ozWey=sU2@G}Nch&U#Rf_WexKu+D#'!t:~Gr`~?r^j]uNr|~FRg*j^psurwJt|RmcKv)@&!)7Rkv~Br[@wxfO:Rl3co#U'6Rezj_q#vIuavjRltwzeyh@vr5JqD0!>aY?C9:9au@9Cb]}9cl#U*5;5<H||jbuus1ucv&Rfvg1v~d/pppzqFr^a--a~!aMat1(hFv;Wiz@@=Izoj5uuv-7Rix~Cw`fk2WlVcZ#X,k)u3vWs@u2]ktg;wEx'fBq(_2Wg/jTv|vV~EfoJv]!15x'hzqG!(P~EfU~CRl_j6v(us5x4i-#T(2WmZ?C2F|d>Kq<aj1!*jTqIsBv=Wl`~Cw`fi2WlWj`v0u*~>RlR=c>Z,k#u3vWs@u2]kr<c1Z+jTqIsBv=Wla~Cw`fm2WlXdmb3!a{(arZa`bkTa%TbQTa-a9+c'!aM!/[yL=Bqug.w'RifhFvyDRj.g>vgwyk^9]k^Jv3_@WfbAARkhJw2_[x|JvB_wkoIRoKwkoJRoLd'(Y#<]gm=<9<H|yd'%_X#skDtb3awwqkgNulRkgdB#^',9:p'hJwSaxRmEBwVb8@4=H|qLu+w50&!)@3qs~?pU>Awwn;;Rn=c:Z'ARn<=<qwKvC@!/&~BqqJv6!&]eVb^z^xRge'/a%+^`#Sge}6<4Rn3=]n0Pw2>Rn8Jw0!&>Rn:>Rn6cY#a7+!a&=<wkaNw~h3z_c5Z{=wjh#=]nLKv^D!&)Vyz=bW|swYb<WetcG#T(2wxa@qVx@gD#Y&b^|V5JwG&!5bb|pg/w&RgD@x=kHs=uAvn!a%%/'+RmSRh694Ro`g-vaRmRhHv-]mlxCcS#`&ba~.5cD#Ta)P~=d,#Y(56H{>978H{Dd_#{2^Y%_+qbbb{6g3sERhsbU{?dfa.,`a(Xa<!aiX#(55RiG54RiHcI#T'WiU3RiVNvdwtfcRlKNvdd,#Y&RlHRlExQgf.1*^T'X#Sgf}6Wn4=]hfPrk>Rn7Jw0!&>Rn5>Rn9Lunw?&a2!,5<oq@@wqfdRlJj5Q~=d,#Y(~ARfcOuN]fdDKw;ay(}i!547E}j?cI#T(@5bV}iCbV}hdv(^^Tb?a40,b##Tbo!a*bR!a<b|a/!aKai!aU[yK=]o^g:v>ReGJwPZtK<7Rh+h<~El,Pv#5ReR@awwxjCg,ulRjDJv6&!]j!z?aQeeg>w=Sh<eeJw;!&axEzOg,Qosc!#*:wkeJ]eJ>x'h-u(!%Ro.w~h.zPdNZ(X,Ya![x{;9ReY;wkgxRiF:x?ap#Y&RmUg<s2Rkod]+UY0TZ'!a&A9sw<=bczLNvuw{gqzNhJwSaxRmCKuLay!#&s_Rf-55b^{uJvZa!!c%#(55Ri654wmiu5RiuawLu,vp!+}^%b_}Y9;wkgxba}o>A9:=b^}zKuh=a''!3awRk3c*'!#aHRk6c+Z&Rk5Rk4Jv)&!awRjSawd9*`#0?C2@EzMj8u<uJ5RmbjQrquJu3x,k>uq@_+=ayb^|W~ARkEOuN]k@7dhzV^X/X&a-#zRzSb`zXcJzTT#2WkVKvDBzW!%FzY9;5bbzWjQrquJu3Jw3%!b`zU=ayb^zQd:#X(T-a!6Vyywxh}=b]{Jg=u1RiAdGp~qHtzv!w(wA+a+a;<!aJaYai'anasb(=azRmV:Cbb{MLq2vb!%')RjuRjrRjtRjqx3jnqCw3!%')Rk(Rk+Rk&Rk)Lq2vb!%')Rj{RjxRjzRjwLq2vb!%')RjsRjpRjfRjex3jcqCw3!%')Rk'Rk*RjkRjl9<CbbzfOu4ARhxLq2vb!%')RjyRjvRjhRjgx=joq*uKvb!%')+-Rk.Rk%Rj~Rk-Rk#Rj}x=jdq*uKvb!%')+-Rk,Rk!Rj|RjmRjjRjidAq&qKs@uAv8Aa.'*-a@a&0!aM@a5[y73Dsy3Ds|3Dt):wxgI2sHJwJZt.~Gqxwsf0ikrzt}Rl0Jvy_[xj~HqzKv_A|D!&WfP8axRoVcf,U#k(v]v+ueunaXRf1Ju}'!g8u#Ri=jQw!sCunLprq>!,')~<5qeGzq9F{W=c##%s5au:5aU3CBE|;d4#X(D!a&6Vygx(b;#(=]ed?C2F{N<capoq2r[a&!aPa9,'Pw;5s:@@=I|,55w_h|@@=IzcP~=x'fCqB_2Wl2>aU@@=I|1OuNBc1Z+jTqIsBv=Wlc~Cw`fl2WlZ~AcTa%!Z+jTqIsBv=Wlb~Cw`fh2WlYk+uNqJsBv=WlSg,u3dca3#UXaMYa)TaB-=cM|7T#<bI}l5@B932:aV2G{BOuNBJq:|M!5Ezt=<B=C@a^<B57@2F{v>cB{/T#=ay<bI{3Jv6!a.6BKq0ah&+!5E}HP~Ef{978BaU@@=Iza<7d#.Y#978BaU@@=IzH~AJq0!(@@=IzG978BaU@@=IzFe,aU*Y&^^^bvJb,b:bFad!a,c2Ta>aL.bo6!a#CbTa'T#Re{2Wlh2@G{yg6t~Ro_NvdRfticuRQRllJv3&!x&c|zs@Jw3!%RflwpfkRlpKuL;%(!Re<@G|C2GzdhIvuBwgjAg-u0RjAKQB%!(GzZ@G|5NuuRl7d='T+Y#Vy[g<v~Rm!==G|>JvA!)@wma=]m1ifuaw&RmnLs@vT'!|/+[y,g:v>ReTJw1!#qX=x!eC{bLu+wT&)ZtZauq_~Graci&U#F|89:r_Lupvq!.)&2RlG8RfaC=x!eF{_h?rpWlmd&'!#X|&]k::xJey#`'T|+<E|&2@H|%dE#(^,g;u.RiEg6vjRiC9xCkA{O|zY#g=ucRmXKs0@!&*@G|m@awRknJuh!,3d(}gY}eJvj!%Rm):Jw3!%Rm+Rm-Ls0w(&!a(a#@b[|6cZ#X'7RkxWgAOu4ARn'dH'U#Y*Vz-Wm'CARm}d]*#a%^a*T'aK!a<9bV{PC=p*Jw4!&SgxcbB5r]idw(wBRmF7xFkt#&`(Rm/Rm8E|!JuY_9:Rl5=wrgr2:bbxd@xXfB(a*#T+!.X0X1Ta/a'T&RlDRfL>RlyARl9b[z[>RfZ:RlL:RfRwlg/ARl;9;RlxKv,A/!%7s69<74=BA5ba{-8Bde#`a<XaKYa1,a'P~=wxfB2bZ}}?C972@@=I}r8@55B9;5bb}G978B2@@=aybb}3j3vLv;<Jw3&!>Rfk=ayb^}4~Ad1#`*@@=aybb{w2@>==<bbz]dx+UY#^UaF!a9!bB'Ya1.!ajXa#%olRhD[y=3Dt#Ov5BrHKuMB%!(Rf^Wep~HrJwkiQjKr|~FRg)Ku+D#'!t5~GrF~?rDdV)UY,Z/_7RkuG{<~BrBg,rlsO:235B@bX}|d?a1!#`(6Vyn5@d##Y+jTv|vV~EfIj]uNpn~FRfH7Lq2vb1!a9-978BaU@@=Iz9978BbU}#~AJq0!(@@=Iz8978BaU@@=Iz7~AJQ|}!978BbU}!JvkaK!AdUa21-U#`a+(g/vsRn~Ou!5RPj:rmu9WhOjXuvvNr}:RhAj^v(pyw8unRn[kPr}p|u7vwv]RiSBd;pppzq@qHQa?(b.!a.a`@.|xa(hFv;Wiyj5uuv-7Riw~Cw`fg2WlU978BbU|wOuNBJqG!(P~EfD~CRlQcZ#X,k)u3vWs@u2]ksg;wEx'f@q1_2Wg.j]uNpn~FRfqJv]!15x'h{qG!(@@=IzK~CRl^j6v(us5x4i,#T(2WmY?C2F{1>Kq<aj1!*jTqIsBv=Wld~Cw`fj2Wl[j`v0u*~>RlT=c>Z,k#u3vWs@u2]kq<c1Z+jTqIsBv=Wle~Cw`fn2Wl]dn1#c(a(b^a2!b/bAT(bj!aDa7bu,a_a{c0!2T0g:v>ReD2@G{42@G{5~DpM~<5rc=Bx6i>{RT#RnI@zCx]y]z:2Jv[!zr5Awyk]9]k]dD(Y+X#6Vz.g=wKtgwhaCwgmTWj2Lu,w%_+/[y-B;b^xeg3u3Rj-2@bX{*KrJ<!+'@Wg(g?QRlC@Jv`!%b[zIwsfII}8JQ_@w|kW|=Jv(%!AqcOuNBJvEzh!bYzjLs@wP#(0!oy@>RkdJwMZtc3Dtd@BcG#T'9bWxg2@2Fznd*#Y+;2x'c}w<zizixNgwa#Z'U+!/!a'!a+w~g~z6wcn{Rn}wcnzRn|5Rh%=]nJg5vuRmvNvdRlvcprJu}w*az*a#!%.a.'Bot9qT]kj@Wg'ay2Gzv@Jv`!%b[zEwsfHI}1;ck#Ux`<Cbbx_Lu+w!a&0*!wko*wwo,So,}6Juqxf!E}PigQuyRm`d3(`#8>Rn%:A5B;bZ~%KvhCa!a2!x>k7#Uxb@b{#xaRk7Jw0!)>wwhlShl}6>wwhmShm}6CJvB!.x'hhvj{!!5Bwkhhbaz}x'hivjz~!5Bwkhibaz|xEhTrNu,v-vpD!a%&/)a3a.,%Ro2t[CE{)@3re9b]{%wjo09:rgc:Z&Ro6=<riifuaw&RmoKrNA!%(Ro4>Ro89;Ri`dSaL'UYzxZb)7Rka3xRhT&!,!#^1U}vbaz{>>@=be}yC@:D5bazzKu+A&!}{?ba}y>>@=be}wxBh[t`u~vJvr!%a!a()a,a0a4RoC=]o;Ju(!%RoGRhdwjh`=]oAg>w#Ro?g5vuRo=NvdRl|Ku]C.!&;RoEJvB!%RoORoMBx'h[v+_?w~h`}~5?w~hd~!xKh]oiptu-utv.vp!#%&a30a@a'a+(a/aOp(o~p!RoDJu(!%RoHRhewjha=]oBNvdRl}g>w#Ro@g5vuRo>c[#X']o<CauRoRAd-#Y':RkpauRoQKu]C.!&;RoFJvB!%RoNRoPBx'h]v+_?w~ha}t5?w~he}ue!/UbhYacXaW^Tc&a;b:a-c/#b&aja1(!cL+!bKbt!bmcRc9aIc?8[yW3Dtt94Rg`Jv}!&SiRMzBhEebShEMNuPRe>x7gL#TzuwjirRipc<Z&>on;>z=h-MSh.Mwqczx'a7vj&!>Re4@=ResJt__NuPRi*NuPRi)j]uNr|~FRfzKrJ>_+@Wfy@Wf]2WocKrJ<!+'@Wg%g/QRl@@Jv`!&awRl<wsfFIzgLu(w*!.*&ShBMwvhIRhI9;RhNx1hK'!#Sn]Mx1hK~0!#:2<H~7cNu+w7D*'1ZtW>Rn1~?rOc:Z&Rn2=<rQ<7wjh&=BSnLMc]#X(6Vz)w[b=a!U#9wzgMc3#&(RgMRitRis<x,gKt`ax!&+SioM=BSilMc3#&(RgKRinRimKurB,!&SiQMzBhDebShDM6BJQ!(P~Efx978B2@@=I}WLrJw!!,a*&@G}O@9wkibRid@@x'fKwC!&SlDMSfLMjUv~Q~EfKKv3@a+!(hFv-]mpx/hYZ(C5RiWz<o/MwkhY?So/M@x,gbvfB*&!SgEM:SoeeehFu3:Rgbda(,^TZa)X/7Sg[eb:2RgI~BrMC@wgkc:wwkcRerx3h(uUvK!&*,SnOM4Sh*MArRg;wHRh(x=h;rJvPwI!a4',a'0@Wg&=BSh/Mg>w=Rh=g3w*wwgGRgGcW(X#;Sg}M2Gzk@Jv`!&awRl=wsfGIz`dKZ*T'Y-:RhR7RhQg5u-p`j6v(us5d,#Y+~Awkia?RicOuNBwkibba}Ld6p~tyu_vbAa'a+!a/'a3aEa8a!>Sh,ebJv{!&Sh@ebSaReb9;SgwebNuPRi(NvdRl)NuPRi'hHu^<Rm^Jvv_@Wl(g;u1Si/ebKu'B&!*Sh?eb@Wl'z@aPeb95Si.ebcpputyvjB)!,&a+0a%ShAMWeK@G}C@WfJ9;RhMwvhH9w{ia}ix,hJvRA1(!zAn[MRhHx1hJ~*!#hFv(BSn[MBJQ!(@@=I~'978B2@@=I}2db.Ua<'X}+T#a0XaG2G}E;wkg|wuh!Rh!x,hZu,@)!&So0MVy)C5RiXACJvB!&5RiY5RiZg8w)cG}*T#2@bU}=KsA>(!a.3wkhZba~(x,h^u(A!&(SoCMRhb5Bz=h[eb?w~hb~6x,h_u(A!&(SoDMRhc5Bz=h]eb?w~hc~6e)aA1T#T,^^^c-bMb&blcPaP(a/!0!bA=b5c@a(!bfbrc#2afwmhARnjwchORnp2Wlf3DtsNvdRl-2@wpa<]m0bx(#:awRk2@Jw3!%RfhwpfgRlnKQB%!(G{V@G|'NuuRl6d='T+Y#VyUg<v~Rl~==G|<Jv+'!aYShC}6@B<5?ba~8@Jw3'!g2QRljhLrpWlOd+#Y'g.w'rIg>w*wgj@g-u0Rj@Lu+wT&)ZtUauq]~GrGci&U#F|39:rELrNvj!.%*RhCwunfw~nf~:9;Ri]>wtnhg;wHRnhx3hDs@v~!/+'@Wfr@9RkSNu&Rlo=@<5GzoKs0@_+@Wl+@awRkmJuh!-3d(}pY#qWJvj!%Rm(:Jw3!%Rm,Rm*de&!1U-U#`)Re;@G|.@9Ri82@wjfvRlq=@<5GzpLvOvr!).&2RlF8Rf`C=x!eE{.Jw3_g2QRlkhLrpWlPde(!#U{s,UXa*Ta'[y'g:v>ReS;x0PZ&RnlRnn~HrKJw1}f!=x!eB|2w]aP(#Xa&a*Ta.Ua2a7=]iOd'#Y&Ro&WnWg;u.RiDg6vjRiBNvdRlzhNvj]nYJuW_2Wm3x)kFze{9d])!a.!,Y01!#&aC!a3RndC=ox~BrC@2b^{pg,rlse7x'ksuq!%Rm.E{xidw(wBRmGx9o+)X#wwo-So-}69:Rl4@xSf@a#XZ'X)X,Ta(/ARl8b[xc>RfY:RlI:RfQwlg.ARl:9;Rlwdn'#^XafaQa1X1TaHTa)@b[{zcZ#X'7RkwWg@Ou4ARn&x)kG#{,g7u/RkGdH'U#Y*Vz'Wm&CARm|bx#(A]gUbUzJj9Q~=d,#Y(56H}l978H{U7d,0#U*2>ABb_xZ978BbU{e~AJQ{g!978BbU{hxMh?ad{oUYZ.x1h?{l!#:2<H{mx3n[t{vl!,&a%3Ro(z=iS}6ARnr=Bwsn^wvn`Rnbd`*T}B0!#^X'BG{c9b]{a>>@=be}F?JvS!&BG{d7BG}(Bde#`a1X,Ya@!a'P~=wxf@2bZ}I56B2@@=aybb}08@55B9;5bb}<j3vLv;<Jw3&!>Rfg=ayb^}&OuNBKuLA!)a!P~=x#fD{f2@>==<bbzl?C972@@=Ix^d6rSu,v7w*C(0a)a6#B+a%!sQ[y?3Dt%3[xn~<5rLOu!5p@Ku+D#'!t7~GrP~?rNKvlaya7'!h+v-5qMg=t|cd,U#5AAaa5Abb{S@52B5@a[@52B5Gx[iXueu;d<#`a(!/549C;ag>23ExY5@Dah89b^~689Jv)!~2b[~1Lv'w(%*!a#bX|aPrmawRe]keu7uhv-q6rxu,q`xTo]/a5aU!bNaDXbi!b-!ao!b<bwA!#5@B932:aV2G|:d-)Y#hJrL>RhG<7@C5<H|_=Cau:5aj5@B932:bJ|ng>vIbs)#?C2F|9jPv0w.vISh-MKvUaz(.!9ABbb|[5;5<H|Eg>unwfh;9:4E|YjQsBt|vjx'hYq3!(?C2F|J:2<BaY?C2F|GOu!5x,g|p{ah!-(?C2F|c9:4E|OjXuvvNr}:Rh&i[w*t|cd+U#jJvsu)vsSn~Mkfrmu9p}u7vwv]So!McW#Xa!ax5@A5aY:5;5<H|>kJv~vYrquJu3x4ib#T)2@SmZM?C2F|Bj:rmu9@xPhI(a*a#U#`a3-5Abb|L~@:RhK9:4E|0@52B5G|#C::aY?C2F|-:2<BaY?C2F|.5Jvk!a)javYrquJu3x4ia#T)2@SmYM?C2F|HAxPhH(!a#U#`a*-5Abb|4~@:RhJ9:4E|R@52B5G|F:2<BaY?C2F|Sc^#Xa2j=Qq5CJvB!-g<v{z;hhM?C2F|Zi[vrv{z;hiM?C2F|XKsA>!a)-g<v{z;h[eb?C2F|]i[vrv{z;h]eb?C2F|^iZu.vix,hZq3ah!.(?C2F|QOu!5ShXM:2<BaY?C2F|P",13494,2713,49,25,61);var et=new Uint16Array([512,26465,29036,7,0,2,4,116,24638,116,24636,8693,29807,24610,621,1,0,0,3,112,24614,111,115,24615]);var I;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE",e[e.VALUE_MASK=8191]="VALUE_MASK"})(I||(I={}));var g;(function(e){e[e.AMP=38]="AMP",e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_X=120]="LOWER_X"})(g||(g={}));var Ce=32;function tt(e){return e-g.ZERO>>>0<=9}function es(e){return(e|Ce)-g.LOWER_A>>>0<=5}function ts(e){return(e|Ce)-g.LOWER_A>>>0<=25}function ss(e){return e===g.EQUALS||ts(e)||tt(e)}var S;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(S||(S={}));var Y;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Y||(Y={}));var Ie=class{constructor(t,a,n){H(this,"decodeTree");H(this,"emitCodePoint");H(this,"errors");H(this,"state",S.EntityStart);H(this,"consumed",1);H(this,"result",0);H(this,"treeIndex",0);H(this,"excess",1);H(this,"decodeMode",Y.Strict);H(this,"runConsumed",0);this.decodeTree=t,this.emitCodePoint=a,this.errors=n}startEntity(t){this.decodeMode=t,this.state=S.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(t,a){switch(this.state){case S.EntityStart:return t.charCodeAt(a)===g.NUM?(this.state=S.NumericStart,this.consumed+=1,this.stateNumericStart(t,a+1)):(this.state=S.NamedEntity,this.stateNamedEntity(t,a));case S.NumericStart:return this.stateNumericStart(t,a);case S.NumericDecimal:return this.stateNumericDecimal(t,a);case S.NumericHex:return this.stateNumericHex(t,a);default:return this.stateNamedEntity(t,a)}}stateNumericStart(t,a){return a>=t.length?-1:(t.charCodeAt(a)|Ce)===g.LOWER_X?(this.state=S.NumericHex,this.consumed+=1,this.stateNumericHex(t,a+1)):(this.state=S.NumericDecimal,this.stateNumericDecimal(t,a))}stateNumericHex(t,a){let n=t.length,{result:E}=this,{consumed:_}=this;for(;a<n;){let u=t.charCodeAt(a);if(tt(u)||es(u)){let d=u<=g.NINE?u-g.ZERO:(u|Ce)-g.LOWER_A+10;E=E*16+d,_+=1,a+=1}else return this.result=E,this.consumed=_,this.emitNumericEntity(u,3)}return this.result=E,this.consumed=_,-1}stateNumericDecimal(t,a){let n=t.length,{result:E}=this,{consumed:_}=this;for(;a<n;){let u=t.charCodeAt(a)-g.ZERO;if(u>>>0>9)return this.result=E,this.consumed=_,this.emitNumericEntity(u+g.ZERO,2);E=E*10+u,_+=1,a+=1}return this.result=E,this.consumed=_,-1}emitNumericEntity(t,a){if(this.consumed<=a)return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===g.SEMI)this.consumed+=1;else if(this.decodeMode===Y.Strict)return 0;return this.emitCodePoint((this.decodeTree===et?Ze:ze)(this.result),this.consumed),this.errors&&(t!==g.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}flushAndEmitLegacyOrReject(t,a,n,E){return this.consumed=t,this.excess=a,this.result===0||this.decodeMode===Y.Attribute&&(E===0||a>1||ss(n))?0:this.emitNotTerminatedNamedEntity()}stateNamedEntity(t,a){let{decodeTree:n}=this,E=t.length,_=this.decodeMode===Y.Strict,{treeIndex:u}=this,{excess:d}=this,{consumed:m}=this,A=n[u];for(;a<E;){for(;(A&(I.VALUE_LENGTH|I.FLAG13))===0&&(A&I.JUMP_TABLE)!==0;){let N=t.charCodeAt(a),M=A&I.JUMP_TABLE,b=(A&I.BRANCH_LENGTH)>>7;if(b===0){if(N!==M)return this.flushAndEmitLegacyOrReject(m,d,N,0);u+=1}else{let z=N-M;if(z>>>0>=b)return this.flushAndEmitLegacyOrReject(m,d,N,0);let K=n[u+1+z];if(K===0)return this.flushAndEmitLegacyOrReject(m,d,N,0);u=u+b+K&65535}if(A=n[u],a+=1,d+=1,a>=E)break}if(a>=E)break;if((A&(I.VALUE_LENGTH|I.FLAG13))===I.FLAG13){let N=(A&I.BRANCH_LENGTH)>>7,{runConsumed:M}=this;if(M===0){let b=t.charCodeAt(a);if(b!==(A&I.JUMP_TABLE))return this.flushAndEmitLegacyOrReject(m,d,b,0);a+=1,d+=1,M=1}for(;M<N;){if(a>=E)return this.treeIndex=u,this.excess=d,this.consumed=m,this.runConsumed=M,-1;let b=M-1,K=n[u+1+(b>>1)]>>((b&1)<<3)&255,Z=t.charCodeAt(a);if(Z!==K)return this.runConsumed=0,this.flushAndEmitLegacyOrReject(m,d,Z,0);a+=1,d+=1,M+=1}this.runConsumed=0,u+=1+(N>>1),A=n[u];continue}let O=A>>>14,v=t.charCodeAt(a);if(O!==0){if(!_&&(A&I.FLAG13)===0&&(this.result=u,m+=d-1,d=1),v===g.SEMI)return this.emitNamedEntityData(u,O,m+d);if(O===1)return this.flushAndEmitLegacyOrReject(m,d,v,O)}let j=as(n,A,u+(O||1),v);if(j<0)return this.flushAndEmitLegacyOrReject(m,d,v,O);u=j,A=n[u],a+=1,d+=1}return!_&&A>>>14&&(A&I.FLAG13)===0&&(this.result=u,m+=d-1,d=1),this.treeIndex=u,this.excess=d,this.consumed=m,-1}emitNotTerminatedNamedEntity(){let{result:t,decodeTree:a}=this,n=a[t]>>>14;return this.emitNamedEntityData(t,n,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,a,n){let{decodeTree:E}=this;return this.emitCodePoint(a===1?E[t]&I.VALUE_MASK:E[t+1],n),a===3&&this.emitCodePoint(E[t+2],n),n}end(){switch(this.state){case S.NamedEntity:return this.result!==0&&(this.decodeMode!==Y.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case S.NumericDecimal:return this.emitNumericEntity(0,2);case S.NumericHex:return this.emitNumericEntity(0,3);case S.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;default:return 0}}};function as(e,t,a,n){let E=(t&I.BRANCH_LENGTH)>>7,_=t&I.JUMP_TABLE;if(_){if(E===0)return n===_?a:-1;let m=n-_;if(m>>>0>=E)return-1;let A=e[a+m];return A===0?-1:a+E+A-1&65535}if(E===0)return-1;let u=E+1>>1,d=a+u+E;for(let m=0;m<E;m++){let O=e[a+(m>>1)]>>((m&1)<<3)&255;if(O===n){let v=a+u+m;return d+e[v]&65535}if(O>n)return-1}return-1}var h;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(h||(h={}));var J;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(J||(J={}));var B;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(B||(B={}));var c;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(c||(c={}));var s;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(s||(s={}));var rs=new Map([[c.A,s.A],[c.ADDRESS,s.ADDRESS],[c.ANNOTATION_XML,s.ANNOTATION_XML],[c.APPLET,s.APPLET],[c.AREA,s.AREA],[c.ARTICLE,s.ARTICLE],[c.ASIDE,s.ASIDE],[c.B,s.B],[c.BASE,s.BASE],[c.BASEFONT,s.BASEFONT],[c.BGSOUND,s.BGSOUND],[c.BIG,s.BIG],[c.BLOCKQUOTE,s.BLOCKQUOTE],[c.BODY,s.BODY],[c.BR,s.BR],[c.BUTTON,s.BUTTON],[c.CAPTION,s.CAPTION],[c.CENTER,s.CENTER],[c.CODE,s.CODE],[c.COL,s.COL],[c.COLGROUP,s.COLGROUP],[c.DD,s.DD],[c.DESC,s.DESC],[c.DETAILS,s.DETAILS],[c.DIALOG,s.DIALOG],[c.DIR,s.DIR],[c.DIV,s.DIV],[c.DL,s.DL],[c.DT,s.DT],[c.EM,s.EM],[c.EMBED,s.EMBED],[c.FIELDSET,s.FIELDSET],[c.FIGCAPTION,s.FIGCAPTION],[c.FIGURE,s.FIGURE],[c.FONT,s.FONT],[c.FOOTER,s.FOOTER],[c.FOREIGN_OBJECT,s.FOREIGN_OBJECT],[c.FORM,s.FORM],[c.FRAME,s.FRAME],[c.FRAMESET,s.FRAMESET],[c.H1,s.H1],[c.H2,s.H2],[c.H3,s.H3],[c.H4,s.H4],[c.H5,s.H5],[c.H6,s.H6],[c.HEAD,s.HEAD],[c.HEADER,s.HEADER],[c.HGROUP,s.HGROUP],[c.HR,s.HR],[c.HTML,s.HTML],[c.I,s.I],[c.IMG,s.IMG],[c.IMAGE,s.IMAGE],[c.INPUT,s.INPUT],[c.IFRAME,s.IFRAME],[c.KEYGEN,s.KEYGEN],[c.LABEL,s.LABEL],[c.LI,s.LI],[c.LINK,s.LINK],[c.LISTING,s.LISTING],[c.MAIN,s.MAIN],[c.MALIGNMARK,s.MALIGNMARK],[c.MARQUEE,s.MARQUEE],[c.MATH,s.MATH],[c.MENU,s.MENU],[c.META,s.META],[c.MGLYPH,s.MGLYPH],[c.MI,s.MI],[c.MO,s.MO],[c.MN,s.MN],[c.MS,s.MS],[c.MTEXT,s.MTEXT],[c.NAV,s.NAV],[c.NOBR,s.NOBR],[c.NOFRAMES,s.NOFRAMES],[c.NOEMBED,s.NOEMBED],[c.NOSCRIPT,s.NOSCRIPT],[c.OBJECT,s.OBJECT],[c.OL,s.OL],[c.OPTGROUP,s.OPTGROUP],[c.OPTION,s.OPTION],[c.P,s.P],[c.PARAM,s.PARAM],[c.PLAINTEXT,s.PLAINTEXT],[c.PRE,s.PRE],[c.RB,s.RB],[c.RP,s.RP],[c.RT,s.RT],[c.RTC,s.RTC],[c.RUBY,s.RUBY],[c.S,s.S],[c.SCRIPT,s.SCRIPT],[c.SEARCH,s.SEARCH],[c.SECTION,s.SECTION],[c.SELECT,s.SELECT],[c.SOURCE,s.SOURCE],[c.SMALL,s.SMALL],[c.SPAN,s.SPAN],[c.STRIKE,s.STRIKE],[c.STRONG,s.STRONG],[c.STYLE,s.STYLE],[c.SUB,s.SUB],[c.SUMMARY,s.SUMMARY],[c.SUP,s.SUP],[c.TABLE,s.TABLE],[c.TBODY,s.TBODY],[c.TEMPLATE,s.TEMPLATE],[c.TEXTAREA,s.TEXTAREA],[c.TFOOT,s.TFOOT],[c.TD,s.TD],[c.TH,s.TH],[c.THEAD,s.THEAD],[c.TITLE,s.TITLE],[c.TR,s.TR],[c.TRACK,s.TRACK],[c.TT,s.TT],[c.U,s.U],[c.UL,s.UL],[c.SVG,s.SVG],[c.VAR,s.VAR],[c.WBR,s.WBR],[c.XMP,s.XMP]]);function V(e){var t;return(t=rs.get(e))!==null&&t!==void 0?t:s.UNKNOWN}var l=s,st={[h.HTML]:new Set([l.ADDRESS,l.APPLET,l.AREA,l.ARTICLE,l.ASIDE,l.BASE,l.BASEFONT,l.BGSOUND,l.BLOCKQUOTE,l.BODY,l.BR,l.BUTTON,l.CAPTION,l.CENTER,l.COL,l.COLGROUP,l.DD,l.DETAILS,l.DIR,l.DIV,l.DL,l.DT,l.EMBED,l.FIELDSET,l.FIGCAPTION,l.FIGURE,l.FOOTER,l.FORM,l.FRAME,l.FRAMESET,l.H1,l.H2,l.H3,l.H4,l.H5,l.H6,l.HEAD,l.HEADER,l.HGROUP,l.HR,l.HTML,l.IFRAME,l.IMG,l.INPUT,l.LI,l.LINK,l.LISTING,l.MAIN,l.MARQUEE,l.MENU,l.META,l.NAV,l.NOEMBED,l.NOFRAMES,l.NOSCRIPT,l.OBJECT,l.OL,l.P,l.PARAM,l.PLAINTEXT,l.PRE,l.SCRIPT,l.SECTION,l.SELECT,l.SOURCE,l.STYLE,l.SUMMARY,l.TABLE,l.TBODY,l.TD,l.TEMPLATE,l.TEXTAREA,l.TFOOT,l.TH,l.THEAD,l.TITLE,l.TR,l.TRACK,l.UL,l.WBR,l.XMP]),[h.MATHML]:new Set([l.MI,l.MO,l.MN,l.MS,l.MTEXT,l.ANNOTATION_XML]),[h.SVG]:new Set([l.TITLE,l.FOREIGN_OBJECT,l.DESC]),[h.XLINK]:new Set,[h.XML]:new Set,[h.XMLNS]:new Set},ee=new Set([l.H1,l.H2,l.H3,l.H4,l.H5,l.H6]),Pr=new Set([c.STYLE,c.SCRIPT,c.XMP,c.IFRAME,c.NOEMBED,c.NOFRAMES,c.PLAINTEXT]);var i;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(i||(i={}));var D={DATA:i.DATA,RCDATA:i.RCDATA,RAWTEXT:i.RAWTEXT,SCRIPT_DATA:i.SCRIPT_DATA,PLAINTEXT:i.PLAINTEXT,CDATA_SECTION:i.CDATA_SECTION};function is(e){return e>=r.DIGIT_0&&e<=r.DIGIT_9}function te(e){return e>=r.LATIN_CAPITAL_A&&e<=r.LATIN_CAPITAL_Z}function os(e){return e>=r.LATIN_SMALL_A&&e<=r.LATIN_SMALL_Z}function G(e){return os(e)||te(e)}function at(e){return G(e)||is(e)}function Oe(e){return e+32}function nt(e){return e===r.SPACE||e===r.LINE_FEED||e===r.TABULATION||e===r.FORM_FEED}function rt(e){return nt(e)||e===r.SOLIDUS||e===r.GREATER_THAN_SIGN}function cs(e){return e===r.NULL?T.nullCharacterReference:e>1114111?T.characterReferenceOutsideUnicodeRange:Ae(e)?T.surrogateCharacterReference:Re(e)?T.noncharacterCharacterReference:me(e)||e===r.CARRIAGE_RETURN?T.controlCharacterReference:null}var se=class{constructor(t,a){this.options=t,this.handler=a,this.paused=false,this.inLoop=false,this.inForeignNode=false,this.lastStartTagName="",this.active=false,this.state=i.DATA,this.returnState=i.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new fe(a),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Ie(Fe,(n,E)=>{this.preprocessor.pos=this.entityStartPos+E-1,this._flushCodePointConsumedAsCharacterReference(n)},a.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(T.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(T.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{let E=cs(n);E&&this._err(E,1)}}:void 0)}_err(t,a=0){var n,E;(E=(n=this.handler).onParseError)===null||E===void 0||E.call(n,this.preprocessor.getError(t,a))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=true;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=false}}pause(){this.paused=true}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=false,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,a,n){this.active=true,this.preprocessor.write(t,a),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(t){this.active=true,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=false,true):false}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let a=0;a<t;a++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,a){return this.preprocessor.startsWith(t,a)?(this._advanceBy(t.length-1),true):false}_createStartTagToken(){this.currentToken={type:R.START_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:false,ackSelfClosing:false,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:R.END_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:false,ackSelfClosing:false,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:R.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:R.DOCTYPE,name:t,forceQuirks:false,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,a){this.currentCharacterToken={type:t,chars:a,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,a;let n=this.currentToken;if(Ne(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){let E=(t=(a=n.location).attrs)!==null&&t!==void 0?t:a.attrs=Object.create(null);E[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(T.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let t=this.currentToken;this.prepareToken(t),t.tagID=V(t.tagName),t.type===R.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(T.endTagWithAttributes),t.selfClosing&&this._err(T.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case R.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case R.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case R.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){let t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:R.EOF,location:t}),this.active=false}_appendCharToCurrentCharacterToken(t,a){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=a;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,a)}_emitCodePoint(t){let a=nt(t)?R.WHITESPACE_CHARACTER:t===r.NULL?R.NULL_CHARACTER:R.CHARACTER;this._appendCharToCurrentCharacterToken(a,t<65536?String.fromCharCode(t):String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(R.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=i.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Y.Attribute:Y.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===i.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===i.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===i.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case i.DATA:{this._stateData(t);break}case i.RCDATA:{this._stateRcdata(t);break}case i.RAWTEXT:{this._stateRawtext(t);break}case i.SCRIPT_DATA:{this._stateScriptData(t);break}case i.PLAINTEXT:{this._statePlaintext(t);break}case i.TAG_OPEN:{this._stateTagOpen(t);break}case i.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case i.TAG_NAME:{this._stateTagName(t);break}case i.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case i.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case i.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case i.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case i.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case i.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case i.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case i.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case i.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case i.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case i.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case i.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case i.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case i.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case i.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case i.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case i.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case i.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case i.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case i.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case i.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case i.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case i.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case i.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case i.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case i.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case i.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case i.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case i.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case i.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case i.BOGUS_COMMENT:{this._stateBogusComment(t);break}case i.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case i.COMMENT_START:{this._stateCommentStart(t);break}case i.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case i.COMMENT:{this._stateComment(t);break}case i.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case i.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case i.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case i.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case i.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case i.COMMENT_END:{this._stateCommentEnd(t);break}case i.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case i.DOCTYPE:{this._stateDoctype(t);break}case i.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case i.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case i.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case i.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case i.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case i.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case i.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case i.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case i.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case i.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case i.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case i.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case i.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case i.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case i.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case i.CDATA_SECTION:{this._stateCdataSection(t);break}case i.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case i.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case i.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case i.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case r.LESS_THAN_SIGN:{this.state=i.TAG_OPEN;break}case r.AMPERSAND:{this._startCharacterReference();break}case r.NULL:{this._err(T.unexpectedNullCharacter),this._emitCodePoint(t);break}case r.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case r.AMPERSAND:{this._startCharacterReference();break}case r.LESS_THAN_SIGN:{this.state=i.RCDATA_LESS_THAN_SIGN;break}case r.NULL:{this._err(T.unexpectedNullCharacter),this._emitChars(f);break}case r.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case r.LESS_THAN_SIGN:{this.state=i.RAWTEXT_LESS_THAN_SIGN;break}case r.NULL:{this._err(T.unexpectedNullCharacter),this._emitChars(f);break}case r.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case r.LESS_THAN_SIGN:{this.state=i.SCRIPT_DATA_LESS_THAN_SIGN;break}case r.NULL:{this._err(T.unexpectedNullCharacter),this._emitChars(f);break}case r.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case r.NULL:{this._err(T.unexpectedNullCharacter),this._emitChars(f);break}case r.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(G(t))this._createStartTagToken(),this.state=i.TAG_NAME,this._stateTagName(t);else switch(t){case r.EXCLAMATION_MARK:{this.state=i.MARKUP_DECLARATION_OPEN;break}case r.SOLIDUS:{this.state=i.END_TAG_OPEN;break}case r.QUESTION_MARK:{this._err(T.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=i.BOGUS_COMMENT,this._stateBogusComment(t);break}case r.EOF:{this._err(T.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(T.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=i.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(G(t))this._createEndTagToken(),this.state=i.TAG_NAME,this._stateTagName(t);else switch(t){case r.GREATER_THAN_SIGN:{this._err(T.missingEndTagName),this.state=i.DATA;break}case r.EOF:{this._err(T.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(T.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=i.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:{this.state=i.BEFORE_ATTRIBUTE_NAME;break}case r.SOLIDUS:{this.state=i.SELF_CLOSING_START_TAG;break}case r.GREATER_THAN_SIGN:{this.state=i.DATA,this.emitCurrentTagToken();break}case r.NULL:{this._err(T.unexpectedNullCharacter),a.tagName+=f;break}case r.EOF:{this._err(T.eofInTag),this._emitEOFToken();break}default:a.tagName+=String.fromCodePoint(te(t)?Oe(t):t)}}_stateRcdataLessThanSign(t){t===r.SOLIDUS?this.state=i.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=i.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){G(t)?(this.state=i.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=i.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,false))return!this._ensureHibernation();this._createEndTagToken();let a=this.currentToken;switch(a.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=i.BEFORE_ATTRIBUTE_NAME,false;case r.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=i.SELF_CLOSING_START_TAG,false;case r.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=i.DATA,false;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=i.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===r.SOLIDUS?this.state=i.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=i.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){G(t)?(this.state=i.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=i.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=i.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case r.SOLIDUS:{this.state=i.SCRIPT_DATA_END_TAG_OPEN;break}case r.EXCLAMATION_MARK:{this.state=i.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=i.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){G(t)?(this.state=i.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=i.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=i.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===r.HYPHEN_MINUS?(this.state=i.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=i.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===r.HYPHEN_MINUS?(this.state=i.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=i.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case r.HYPHEN_MINUS:{this.state=i.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case r.LESS_THAN_SIGN:{this.state=i.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case r.NULL:{this._err(T.unexpectedNullCharacter),this._emitChars(f);break}case r.EOF:{this._err(T.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case r.HYPHEN_MINUS:{this.state=i.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case r.LESS_THAN_SIGN:{this.state=i.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case r.NULL:{this._err(T.unexpectedNullCharacter),this.state=i.SCRIPT_DATA_ESCAPED,this._emitChars(f);break}case r.EOF:{this._err(T.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=i.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case r.HYPHEN_MINUS:{this._emitChars("-");break}case r.LESS_THAN_SIGN:{this.state=i.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case r.GREATER_THAN_SIGN:{this.state=i.SCRIPT_DATA,this._emitChars(">");break}case r.NULL:{this._err(T.unexpectedNullCharacter),this.state=i.SCRIPT_DATA_ESCAPED,this._emitChars(f);break}case r.EOF:{this._err(T.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=i.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===r.SOLIDUS?this.state=i.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:G(t)?(this._emitChars("<"),this.state=i.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=i.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){G(t)?(this.state=i.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=i.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=i.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(P.SCRIPT,false)&&rt(this.preprocessor.peek(P.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<P.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=i.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case r.HYPHEN_MINUS:{this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case r.LESS_THAN_SIGN:{this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case r.NULL:{this._err(T.unexpectedNullCharacter),this._emitChars(f);break}case r.EOF:{this._err(T.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case r.HYPHEN_MINUS:{this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case r.LESS_THAN_SIGN:{this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case r.NULL:{this._err(T.unexpectedNullCharacter),this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(f);break}case r.EOF:{this._err(T.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case r.HYPHEN_MINUS:{this._emitChars("-");break}case r.LESS_THAN_SIGN:{this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case r.GREATER_THAN_SIGN:{this.state=i.SCRIPT_DATA,this._emitChars(">");break}case r.NULL:{this._err(T.unexpectedNullCharacter),this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(f);break}case r.EOF:{this._err(T.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===r.SOLIDUS?(this.state=i.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(P.SCRIPT,false)&&rt(this.preprocessor.peek(P.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<P.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=i.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=i.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.SOLIDUS:case r.GREATER_THAN_SIGN:case r.EOF:{this.state=i.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case r.EQUALS_SIGN:{this._err(T.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=i.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=i.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:case r.SOLIDUS:case r.GREATER_THAN_SIGN:case r.EOF:{this._leaveAttrName(),this.state=i.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case r.EQUALS_SIGN:{this._leaveAttrName(),this.state=i.BEFORE_ATTRIBUTE_VALUE;break}case r.QUOTATION_MARK:case r.APOSTROPHE:case r.LESS_THAN_SIGN:{this._err(T.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case r.NULL:{this._err(T.unexpectedNullCharacter),this.currentAttr.name+=f;break}default:this.currentAttr.name+=String.fromCodePoint(te(t)?Oe(t):t)}}_stateAfterAttributeName(t){switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.SOLIDUS:{this.state=i.SELF_CLOSING_START_TAG;break}case r.EQUALS_SIGN:{this.state=i.BEFORE_ATTRIBUTE_VALUE;break}case r.GREATER_THAN_SIGN:{this.state=i.DATA,this.emitCurrentTagToken();break}case r.EOF:{this._err(T.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=i.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.QUOTATION_MARK:{this.state=i.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case r.APOSTROPHE:{this.state=i.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case r.GREATER_THAN_SIGN:{this._err(T.missingAttributeValue),this.state=i.DATA,this.emitCurrentTagToken();break}default:this.state=i.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case r.QUOTATION_MARK:{this.state=i.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case r.AMPERSAND:{this._startCharacterReference();break}case r.NULL:{this._err(T.unexpectedNullCharacter),this.currentAttr.value+=f;break}case r.EOF:{this._err(T.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case r.APOSTROPHE:{this.state=i.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case r.AMPERSAND:{this._startCharacterReference();break}case r.NULL:{this._err(T.unexpectedNullCharacter),this.currentAttr.value+=f;break}case r.EOF:{this._err(T.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:{this._leaveAttrValue(),this.state=i.BEFORE_ATTRIBUTE_NAME;break}case r.AMPERSAND:{this._startCharacterReference();break}case r.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=i.DATA,this.emitCurrentTagToken();break}case r.NULL:{this._err(T.unexpectedNullCharacter),this.currentAttr.value+=f;break}case r.QUOTATION_MARK:case r.APOSTROPHE:case r.LESS_THAN_SIGN:case r.EQUALS_SIGN:case r.GRAVE_ACCENT:{this._err(T.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case r.EOF:{this._err(T.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:{this._leaveAttrValue(),this.state=i.BEFORE_ATTRIBUTE_NAME;break}case r.SOLIDUS:{this._leaveAttrValue(),this.state=i.SELF_CLOSING_START_TAG;break}case r.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=i.DATA,this.emitCurrentTagToken();break}case r.EOF:{this._err(T.eofInTag),this._emitEOFToken();break}default:this._err(T.missingWhitespaceBetweenAttributes),this.state=i.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case r.GREATER_THAN_SIGN:{let a=this.currentToken;a.selfClosing=true,this.state=i.DATA,this.emitCurrentTagToken();break}case r.EOF:{this._err(T.eofInTag),this._emitEOFToken();break}default:this._err(T.unexpectedSolidusInTag),this.state=i.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){let a=this.currentToken;switch(t){case r.GREATER_THAN_SIGN:{this.state=i.DATA,this.emitCurrentComment(a);break}case r.EOF:{this.emitCurrentComment(a),this._emitEOFToken();break}case r.NULL:{this._err(T.unexpectedNullCharacter),a.data+=f;break}default:a.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(P.DASH_DASH,true)?(this._createCommentToken(P.DASH_DASH.length+1),this.state=i.COMMENT_START):this._consumeSequenceIfMatch(P.DOCTYPE,false)?(this.currentLocation=this.getCurrentLocation(P.DOCTYPE.length+1),this.state=i.DOCTYPE):this._consumeSequenceIfMatch(P.CDATA_START,true)?this.inForeignNode?this.state=i.CDATA_SECTION:(this._err(T.cdataInHtmlContent),this._createCommentToken(P.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=i.BOGUS_COMMENT):this._ensureHibernation()||(this._err(T.incorrectlyOpenedComment),this._createCommentToken(2),this.state=i.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case r.HYPHEN_MINUS:{this.state=i.COMMENT_START_DASH;break}case r.GREATER_THAN_SIGN:{this._err(T.abruptClosingOfEmptyComment),this.state=i.DATA;let a=this.currentToken;this.emitCurrentComment(a);break}default:this.state=i.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){let a=this.currentToken;switch(t){case r.HYPHEN_MINUS:{this.state=i.COMMENT_END;break}case r.GREATER_THAN_SIGN:{this._err(T.abruptClosingOfEmptyComment),this.state=i.DATA,this.emitCurrentComment(a);break}case r.EOF:{this._err(T.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=i.COMMENT,this._stateComment(t)}}_stateComment(t){let a=this.currentToken;switch(t){case r.HYPHEN_MINUS:{this.state=i.COMMENT_END_DASH;break}case r.LESS_THAN_SIGN:{a.data+="<",this.state=i.COMMENT_LESS_THAN_SIGN;break}case r.NULL:{this._err(T.unexpectedNullCharacter),a.data+=f;break}case r.EOF:{this._err(T.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){let a=this.currentToken;switch(t){case r.EXCLAMATION_MARK:{a.data+="!",this.state=i.COMMENT_LESS_THAN_SIGN_BANG;break}case r.LESS_THAN_SIGN:{a.data+="<";break}default:this.state=i.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===r.HYPHEN_MINUS?this.state=i.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=i.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===r.HYPHEN_MINUS?this.state=i.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=i.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==r.GREATER_THAN_SIGN&&t!==r.EOF&&this._err(T.nestedComment),this.state=i.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){let a=this.currentToken;switch(t){case r.HYPHEN_MINUS:{this.state=i.COMMENT_END;break}case r.EOF:{this._err(T.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=i.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){let a=this.currentToken;switch(t){case r.GREATER_THAN_SIGN:{this.state=i.DATA,this.emitCurrentComment(a);break}case r.EXCLAMATION_MARK:{this.state=i.COMMENT_END_BANG;break}case r.HYPHEN_MINUS:{a.data+="-";break}case r.EOF:{this._err(T.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--",this.state=i.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){let a=this.currentToken;switch(t){case r.HYPHEN_MINUS:{a.data+="--!",this.state=i.COMMENT_END_DASH;break}case r.GREATER_THAN_SIGN:{this._err(T.incorrectlyClosedComment),this.state=i.DATA,this.emitCurrentComment(a);break}case r.EOF:{this._err(T.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--!",this.state=i.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:{this.state=i.BEFORE_DOCTYPE_NAME;break}case r.GREATER_THAN_SIGN:{this.state=i.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case r.EOF:{this._err(T.eofInDoctype),this._createDoctypeToken(null);let a=this.currentToken;a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(T.missingWhitespaceBeforeDoctypeName),this.state=i.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(te(t))this._createDoctypeToken(String.fromCharCode(Oe(t))),this.state=i.DOCTYPE_NAME;else switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.NULL:{this._err(T.unexpectedNullCharacter),this._createDoctypeToken(f),this.state=i.DOCTYPE_NAME;break}case r.GREATER_THAN_SIGN:{this._err(T.missingDoctypeName),this._createDoctypeToken(null);let a=this.currentToken;a.forceQuirks=true,this.emitCurrentDoctype(a),this.state=i.DATA;break}case r.EOF:{this._err(T.eofInDoctype),this._createDoctypeToken(null);let a=this.currentToken;a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=i.DOCTYPE_NAME}}_stateDoctypeName(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:{this.state=i.AFTER_DOCTYPE_NAME;break}case r.GREATER_THAN_SIGN:{this.state=i.DATA,this.emitCurrentDoctype(a);break}case r.NULL:{this._err(T.unexpectedNullCharacter),a.name+=f;break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.name+=String.fromCodePoint(te(t)?Oe(t):t)}}_stateAfterDoctypeName(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.GREATER_THAN_SIGN:{this.state=i.DATA,this.emitCurrentDoctype(a);break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(P.PUBLIC,false)?this.state=i.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(P.SYSTEM,false)?this.state=i.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(T.invalidCharacterSequenceAfterDoctypeName),a.forceQuirks=true,this.state=i.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:{this.state=i.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case r.QUOTATION_MARK:{this._err(T.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=i.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case r.APOSTROPHE:{this._err(T.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=i.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case r.GREATER_THAN_SIGN:{this._err(T.missingDoctypePublicIdentifier),a.forceQuirks=true,this.state=i.DATA,this.emitCurrentDoctype(a);break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(T.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=true,this.state=i.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.QUOTATION_MARK:{a.publicId="",this.state=i.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case r.APOSTROPHE:{a.publicId="",this.state=i.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case r.GREATER_THAN_SIGN:{this._err(T.missingDoctypePublicIdentifier),a.forceQuirks=true,this.state=i.DATA,this.emitCurrentDoctype(a);break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(T.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=true,this.state=i.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){let a=this.currentToken;switch(t){case r.QUOTATION_MARK:{this.state=i.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case r.NULL:{this._err(T.unexpectedNullCharacter),a.publicId+=f;break}case r.GREATER_THAN_SIGN:{this._err(T.abruptDoctypePublicIdentifier),a.forceQuirks=true,this.emitCurrentDoctype(a),this.state=i.DATA;break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){let a=this.currentToken;switch(t){case r.APOSTROPHE:{this.state=i.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case r.NULL:{this._err(T.unexpectedNullCharacter),a.publicId+=f;break}case r.GREATER_THAN_SIGN:{this._err(T.abruptDoctypePublicIdentifier),a.forceQuirks=true,this.emitCurrentDoctype(a),this.state=i.DATA;break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:{this.state=i.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case r.GREATER_THAN_SIGN:{this.state=i.DATA,this.emitCurrentDoctype(a);break}case r.QUOTATION_MARK:{this._err(T.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=i.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case r.APOSTROPHE:{this._err(T.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=i.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(T.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=true,this.state=i.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=i.DATA;break}case r.QUOTATION_MARK:{a.systemId="",this.state=i.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case r.APOSTROPHE:{a.systemId="",this.state=i.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(T.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=true,this.state=i.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:{this.state=i.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case r.QUOTATION_MARK:{this._err(T.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=i.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case r.APOSTROPHE:{this._err(T.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=i.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case r.GREATER_THAN_SIGN:{this._err(T.missingDoctypeSystemIdentifier),a.forceQuirks=true,this.state=i.DATA,this.emitCurrentDoctype(a);break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(T.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=true,this.state=i.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.QUOTATION_MARK:{a.systemId="",this.state=i.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case r.APOSTROPHE:{a.systemId="",this.state=i.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case r.GREATER_THAN_SIGN:{this._err(T.missingDoctypeSystemIdentifier),a.forceQuirks=true,this.state=i.DATA,this.emitCurrentDoctype(a);break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(T.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=true,this.state=i.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){let a=this.currentToken;switch(t){case r.QUOTATION_MARK:{this.state=i.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case r.NULL:{this._err(T.unexpectedNullCharacter),a.systemId+=f;break}case r.GREATER_THAN_SIGN:{this._err(T.abruptDoctypeSystemIdentifier),a.forceQuirks=true,this.emitCurrentDoctype(a),this.state=i.DATA;break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){let a=this.currentToken;switch(t){case r.APOSTROPHE:{this.state=i.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case r.NULL:{this._err(T.unexpectedNullCharacter),a.systemId+=f;break}case r.GREATER_THAN_SIGN:{this._err(T.abruptDoctypeSystemIdentifier),a.forceQuirks=true,this.emitCurrentDoctype(a),this.state=i.DATA;break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){let a=this.currentToken;switch(t){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=i.DATA;break}case r.EOF:{this._err(T.eofInDoctype),a.forceQuirks=true,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(T.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=i.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){let a=this.currentToken;switch(t){case r.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=i.DATA;break}case r.NULL:{this._err(T.unexpectedNullCharacter);break}case r.EOF:{this.emitCurrentDoctype(a),this._emitEOFToken();break}default:}}_stateCdataSection(t){switch(t){case r.RIGHT_SQUARE_BRACKET:{this.state=i.CDATA_SECTION_BRACKET;break}case r.EOF:{this._err(T.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===r.RIGHT_SQUARE_BRACKET?this.state=i.CDATA_SECTION_END:(this._emitChars("]"),this.state=i.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case r.GREATER_THAN_SIGN:{this.state=i.DATA;break}case r.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=i.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=false,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=true;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(r.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&at(this.preprocessor.peek(1))?i.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){at(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===r.SEMICOLON&&this._err(T.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};var Et=new Set([s.DD,s.DT,s.LI,s.OPTGROUP,s.OPTION,s.P,s.RB,s.RP,s.RT,s.RTC]),it=new Set([...Et,s.CAPTION,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]),Le=new Set([s.APPLET,s.CAPTION,s.HTML,s.MARQUEE,s.OBJECT,s.TABLE,s.TD,s.TEMPLATE,s.TH]),Es=new Set([...Le,s.OL,s.UL]),Ts=new Set([...Le,s.BUTTON]),ot=new Set([s.ANNOTATION_XML,s.MI,s.MN,s.MO,s.MS,s.MTEXT]),ct=new Set([s.DESC,s.FOREIGN_OBJECT,s.TITLE]),hs=new Set([s.TR,s.TEMPLATE,s.HTML]),ls=new Set([s.TBODY,s.TFOOT,s.THEAD,s.TEMPLATE,s.HTML]),_s=new Set([s.TABLE,s.TEMPLATE,s.HTML]),us=new Set([s.TD,s.TH]),Se=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,a,n){this.treeAdapter=a,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=s.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===s.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===h.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,a){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=a,this.currentTagId=a,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,a,true)}pop(){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,true)}replace(t,a){let n=this._indexOf(t);this.items[n]=a,n===this.stackTop&&(this.current=a)}insertAfter(t,a,n){let E=this._indexOf(t)+1;this.items.splice(E,0,a),this.tagIDs.splice(E,0,n),this.stackTop++,E===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,E===this.stackTop)}popUntilTagNamePopped(t){let a=this.stackTop+1;do a=this.tagIDs.lastIndexOf(t,a-1);while(a>0&&this.treeAdapter.getNamespaceURI(this.items[a])!==h.HTML);this.shortenToLength(Math.max(a,0))}shortenToLength(t){for(;this.stackTop>=t;){let a=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(a,this.stackTop<t)}}popUntilElementPopped(t){let a=this._indexOf(t);this.shortenToLength(Math.max(a,0))}popUntilPopped(t,a){let n=this._indexOfTagNames(t,a);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(ee,h.HTML)}popUntilTableCellPopped(){this.popUntilPopped(us,h.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,a){for(let n=this.stackTop;n>=0;n--)if(t.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===a)return n;return-1}clearBackTo(t,a){let n=this._indexOfTagNames(t,a);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(_s,h.HTML)}clearBackToTableBodyContext(){this.clearBackTo(ls,h.HTML)}clearBackToTableRowContext(){this.clearBackTo(hs,h.HTML)}remove(t){let a=this._indexOf(t);a>=0&&(a===this.stackTop?this.pop():(this.items.splice(a,1),this.tagIDs.splice(a,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,false)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===s.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){let a=this._indexOf(t)-1;return a>=0?this.items[a]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===s.HTML}hasInDynamicScope(t,a){for(let n=this.stackTop;n>=0;n--){let E=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case h.HTML:{if(E===t)return true;if(a.has(E))return false;break}case h.SVG:{if(ct.has(E))return false;break}case h.MATHML:{if(ot.has(E))return false;break}}}return true}hasInScope(t){return this.hasInDynamicScope(t,Le)}hasInListItemScope(t){return this.hasInDynamicScope(t,Es)}hasInButtonScope(t){return this.hasInDynamicScope(t,Ts)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){let a=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case h.HTML:{if(ee.has(a))return true;if(Le.has(a))return false;break}case h.SVG:{if(ct.has(a))return false;break}case h.MATHML:{if(ot.has(a))return false;break}}}return true}hasInTableScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===h.HTML)switch(this.tagIDs[a]){case t:return true;case s.TABLE:case s.HTML:return false}return true}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===h.HTML)switch(this.tagIDs[t]){case s.TBODY:case s.THEAD:case s.TFOOT:return true;case s.TABLE:case s.HTML:return false}return true}hasInSelectScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===h.HTML)switch(this.tagIDs[a]){case t:return true;case s.OPTION:case s.OPTGROUP:break;default:return false}return true}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Et.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&it.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&it.has(this.currentTagId);)this.pop()}};var w;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(w||(w={}));var Tt={type:w.Marker},ge=class{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,a){let n=[],E=a.length,_=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let d=0;d<this.entries.length;d++){let m=this.entries[d];if(m.type===w.Marker)break;let{element:A}=m;if(this.treeAdapter.getTagName(A)===_&&this.treeAdapter.getNamespaceURI(A)===u){let O=this.treeAdapter.getAttrList(A);O.length===E&&n.push({idx:d,attrs:O})}}return n}_ensureNoahArkCondition(t){if(this.entries.length<3)return;let a=this.treeAdapter.getAttrList(t),n=this._getNoahArkConditionCandidates(t,a);if(n.length<3)return;let E=new Map(a.map(u=>[u.name,u.value])),_=0;for(let u=0;u<n.length;u++){let d=n[u];d.attrs.every(m=>E.get(m.name)===m.value)&&(_+=1,_>=3&&this.entries.splice(d.idx,1))}}insertMarker(){this.entries.unshift(Tt)}pushElement(t,a){this._ensureNoahArkCondition(t),this.entries.unshift({type:w.Element,element:t,token:a})}insertElementAfterBookmark(t,a){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:w.Element,element:t,token:a})}removeEntry(t){let a=this.entries.indexOf(t);a!==-1&&this.entries.splice(a,1)}clearToLastMarker(){let t=this.entries.indexOf(Tt);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){let a=this.entries.find(n=>n.type===w.Marker||this.treeAdapter.getTagName(n.element)===t);return a&&a.type===w.Element?a:null}getElementEntry(t){return this.entries.find(a=>a.type===w.Element&&a.element===t)}};var x={createDocument(){return{nodeName:"#document",mode:B.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,a){return{nodeName:e,tagName:e,attrs:a,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,a){let n=e.childNodes.indexOf(a);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,a,n){let E=e.childNodes.find(_=>_.nodeName==="#documentType");if(E)E.name=t,E.publicId=a,E.systemId=n;else{let _={nodeName:"#documentType",name:t,publicId:a,systemId:n,parentNode:null};x.appendChild(e,_)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let a=e.childNodes[e.childNodes.length-1];if(x.isTextNode(a)){a.value+=t;return}}x.appendChild(e,x.createTextNode(t))},insertTextBefore(e,t,a){let n=e.childNodes[e.childNodes.indexOf(a)-1];n&&x.isTextNode(n)?n.value+=t:x.insertBefore(e,x.createTextNode(t),a)},adoptAttributes(e,t){let a=new Set(e.attrs.map(n=>n.name));for(let n=0;n<t.length;n++)a.has(t[n].name)||e.attrs.push(t[n])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};var lt="html",ds="about:legacy-compat",As="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",_t=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],ms=[..._t,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Rs=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),ut=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],fs=[...ut,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ht(e,t){return t.some(a=>e.startsWith(a))}function dt(e){return e.name===lt&&e.publicId===null&&(e.systemId===null||e.systemId===ds)}function At(e){if(e.name!==lt)return B.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===As)return B.QUIRKS;let{publicId:a}=e;if(a!==null){if(a=a.toLowerCase(),Rs.has(a))return B.QUIRKS;let n=t===null?ms:_t;if(ht(a,n))return B.QUIRKS;if(n=t===null?ut:fs,ht(a,n))return B.LIMITED_QUIRKS}return B.NO_QUIRKS}var mt={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Cs="definitionurl",Is="definitionURL",Os=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Ls=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:h.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:h.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:h.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:h.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:h.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:h.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:h.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:h.XML}],["xml:space",{prefix:"xml",name:"space",namespace:h.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:h.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:h.XMLNS}]]),Ss=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),gs=new Set([s.B,s.BIG,s.BLOCKQUOTE,s.BODY,s.BR,s.CENTER,s.CODE,s.DD,s.DIV,s.DL,s.DT,s.EM,s.EMBED,s.H1,s.H2,s.H3,s.H4,s.H5,s.H6,s.HEAD,s.HR,s.I,s.IMG,s.LI,s.LISTING,s.MENU,s.META,s.NOBR,s.OL,s.P,s.PRE,s.RUBY,s.S,s.SMALL,s.SPAN,s.STRONG,s.STRIKE,s.SUB,s.SUP,s.TABLE,s.TT,s.U,s.UL,s.VAR]);function Rt(e){let t=e.tagID;return t===s.FONT&&e.attrs.some(({name:n})=>n===J.COLOR||n===J.SIZE||n===J.FACE)||gs.has(t)}function we(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Cs){e.attrs[t].name=Is;break}}function xe(e){for(let t=0;t<e.attrs.length;t++){let a=Os.get(e.attrs[t].name);a!=null&&(e.attrs[t].name=a)}}function De(e){for(let t=0;t<e.attrs.length;t++){let a=Ls.get(e.attrs[t].name);a&&(e.attrs[t].prefix=a.prefix,e.attrs[t].name=a.name,e.attrs[t].namespace=a.namespace)}}function ft(e){let t=Ss.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=V(e.tagName))}function Ds(e,t){return t===h.MATHML&&(e===s.MI||e===s.MO||e===s.MN||e===s.MS||e===s.MTEXT)}function ps(e,t,a){if(t===h.MATHML&&e===s.ANNOTATION_XML){for(let n=0;n<a.length;n++)if(a[n].name===J.ENCODING){let E=a[n].value.toLowerCase();return E===mt.TEXT_HTML||E===mt.APPLICATION_XML}}return t===h.SVG&&(e===s.FOREIGN_OBJECT||e===s.DESC||e===s.TITLE)}function Nt(e,t,a,n){return(!n||n===h.HTML)&&ps(e,t,a)||(!n||n===h.MATHML)&&Ds(e,t)}var bs="hidden",Ps=8,Bs=3,o;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(o||(o={}));var Ms={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},St=new Set([s.TABLE,s.TBODY,s.TFOOT,s.THEAD,s.TR]),It={scriptingEnabled:true,sourceCodeLocationInfo:false,treeAdapter:x,onParseError:null},Te=class{constructor(t,a,n=null,E=null){this.fragmentContext=n,this.scriptHandler=E,this.currentToken=null,this.stopped=false,this.insertionMode=o.INITIAL,this.originalInsertionMode=o.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=false,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=false,this.framesetOk=true,this.skipNextNewLine=false,this.fosterParentingEnabled=false,this.options={...It,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=true),this.document=a??this.treeAdapter.createDocument(),this.tokenizer=new se(this.options,this),this.activeFormattingElements=new ge(this.treeAdapter),this.fragmentContextID=n?V(this.treeAdapter.getTagName(n)):s.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new Se(this.document,this.treeAdapter,this)}static parse(t,a){let n=new this(a);return n.tokenizer.write(t,true),n.document}static getFragmentParser(t,a){let n={...It,...a};t??(t=n.treeAdapter.createElement(c.TEMPLATE,h.HTML,[]));let E=n.treeAdapter.createElement("documentmock",h.HTML,[]),_=new this(n,E,t);return _.fragmentContextID===s.TEMPLATE&&_.tmplInsertionModeStack.unshift(o.IN_TEMPLATE),_._initTokenizerForFragmentParsing(),_._insertFakeRootElement(),_._resetInsertionMode(),_._findFormInFragmentContext(),_}getFragment(){let t=this.treeAdapter.getFirstChild(this.document),a=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,a),a}_err(t,a,n){var E;if(!this.onParseError)return;let _=(E=t.location)!==null&&E!==void 0?E:Ms,u={code:a,startLine:_.startLine,startCol:_.startCol,startOffset:_.startOffset,endLine:n?_.startLine:_.endLine,endCol:n?_.startCol:_.endCol,endOffset:n?_.startOffset:_.endOffset};this.onParseError(u)}onItemPush(t,a,n){var E,_;(_=(E=this.treeAdapter).onItemPush)===null||_===void 0||_.call(E,t),n&&this.openElements.stackTop>0&&this._setContextModes(t,a)}onItemPop(t,a){var n,E;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(E=(n=this.treeAdapter).onItemPop)===null||E===void 0||E.call(n,t,this.openElements.current),a){let _,u;this.openElements.stackTop===0&&this.fragmentContext?(_=this.fragmentContext,u=this.fragmentContextID):{current:_,currentTagId:u}=this.openElements,this._setContextModes(_,u)}}_setContextModes(t,a){let n=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===h.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&t!==void 0&&a!==void 0&&!this._isIntegrationPoint(a,t)}_switchToTextParsing(t,a){this._insertElement(t,h.HTML),this.tokenizer.state=a,this.originalInsertionMode=this.insertionMode,this.insertionMode=o.TEXT}switchToPlaintextParsing(){this.insertionMode=o.TEXT,this.originalInsertionMode=o.IN_BODY,this.tokenizer.state=D.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===c.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==h.HTML))switch(this.fragmentContextID){case s.TITLE:case s.TEXTAREA:{this.tokenizer.state=D.RCDATA;break}case s.STYLE:case s.XMP:case s.IFRAME:case s.NOEMBED:case s.NOFRAMES:case s.NOSCRIPT:{this.tokenizer.state=D.RAWTEXT;break}case s.SCRIPT:{this.tokenizer.state=D.SCRIPT_DATA;break}case s.PLAINTEXT:{this.tokenizer.state=D.PLAINTEXT;break}default:}}_setDocumentType(t){let a=t.name||"",n=t.publicId||"",E=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,a,n,E),t.location){let u=this.treeAdapter.getChildNodes(this.document).find(d=>this.treeAdapter.isDocumentTypeNode(d));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,a){if(this.options.sourceCodeLocationInfo){let n=a&&{...a,startTag:a};this.treeAdapter.setNodeSourceCodeLocation(t,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{let n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,t)}}_appendElement(t,a){let n=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(n,t.location)}_insertElement(t,a){let n=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID)}_insertFakeElement(t,a){let n=this.treeAdapter.createElement(t,h.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,a)}_insertTemplate(t){let a=this.treeAdapter.createElement(t.tagName,h.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(a,n),this._attachElementToTree(a,t.location),this.openElements.push(a,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let t=this.treeAdapter.createElement(c.HTML,h.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,s.HTML)}_appendCommentNode(t,a){let n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(a,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,t.location)}_insertCharacters(t){let a,n;if(this._shouldFosterParentOnInsertion()?({parent:a,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(a,t.chars,n):this.treeAdapter.insertText(a,t.chars)):(a=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(a,t.chars)),!t.location)return;let E=this.treeAdapter.getChildNodes(a),_=n?E.lastIndexOf(n):E.length,u=E[_-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){let{endLine:m,endCol:A,endOffset:O}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:m,endCol:A,endOffset:O})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,a){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(a,n)}_setEndLocation(t,a){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&a.location){let n=a.location,E=this.treeAdapter.getTagName(t),_=a.type===R.END_TAG&&E===a.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,_)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return false;let a,n;return this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,n=this.fragmentContextID):{current:a,currentTagId:n}=this.openElements,t.tagID===s.SVG&&this.treeAdapter.getTagName(a)===c.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(a)===h.MATHML?false:this.tokenizer.inForeignNode||(t.tagID===s.MGLYPH||t.tagID===s.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,a,h.HTML)}_processToken(t){switch(t.type){case R.CHARACTER:{this.onCharacter(t);break}case R.NULL_CHARACTER:{this.onNullCharacter(t);break}case R.COMMENT:{this.onComment(t);break}case R.DOCTYPE:{this.onDoctype(t);break}case R.START_TAG:{this._processStartTag(t);break}case R.END_TAG:{this.onEndTag(t);break}case R.EOF:{this.onEof(t);break}case R.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,a,n){let E=this.treeAdapter.getNamespaceURI(a),_=this.treeAdapter.getAttrList(a);return Nt(t,E,_,n)}_reconstructActiveFormattingElements(){let t=this.activeFormattingElements.entries.length;if(t){let a=this.activeFormattingElements.entries.findIndex(E=>E.type===w.Marker||this.openElements.contains(E.element)),n=a===-1?t-1:a-1;for(let E=n;E>=0;E--){let _=this.activeFormattingElements.entries[E];this._insertElement(_.token,this.treeAdapter.getNamespaceURI(_.element)),_.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=o.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(s.P),this.openElements.popUntilTagNamePopped(s.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case s.TR:{this.insertionMode=o.IN_ROW;return}case s.TBODY:case s.THEAD:case s.TFOOT:{this.insertionMode=o.IN_TABLE_BODY;return}case s.CAPTION:{this.insertionMode=o.IN_CAPTION;return}case s.COLGROUP:{this.insertionMode=o.IN_COLUMN_GROUP;return}case s.TABLE:{this.insertionMode=o.IN_TABLE;return}case s.BODY:{this.insertionMode=o.IN_BODY;return}case s.FRAMESET:{this.insertionMode=o.IN_FRAMESET;return}case s.SELECT:{this._resetInsertionModeForSelect(t);return}case s.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case s.HTML:{this.insertionMode=this.headElement?o.AFTER_HEAD:o.BEFORE_HEAD;return}case s.TD:case s.TH:{if(t>0){this.insertionMode=o.IN_CELL;return}break}case s.HEAD:{if(t>0){this.insertionMode=o.IN_HEAD;return}break}}this.insertionMode=o.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let a=t-1;a>0;a--){let n=this.openElements.tagIDs[a];if(n===s.TEMPLATE)break;if(n===s.TABLE){this.insertionMode=o.IN_SELECT_IN_TABLE;return}}this.insertionMode=o.IN_SELECT}_isElementCausesFosterParenting(t){return St.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){let a=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case s.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(a)===h.HTML)return{parent:this.treeAdapter.getTemplateContent(a),beforeElement:null};break}case s.TABLE:{let n=this.treeAdapter.getParentNode(a);return n?{parent:n,beforeElement:a}:{parent:this.openElements.items[t-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){let a=this._findFosterParentingLocation();a.beforeElement?this.treeAdapter.insertBefore(a.parent,t,a.beforeElement):this.treeAdapter.appendChild(a.parent,t)}_isSpecialElement(t,a){let n=this.treeAdapter.getNamespaceURI(t);return st[n].has(a)}onCharacter(t){if(this.skipNextNewLine=false,this.tokenizer.inForeignNode){cr(this,t);return}switch(this.insertionMode){case o.INITIAL:{ae(this,t);break}case o.BEFORE_HTML:{ne(this,t);break}case o.BEFORE_HEAD:{ie(this,t);break}case o.IN_HEAD:{oe(this,t);break}case o.IN_HEAD_NO_SCRIPT:{ce(this,t);break}case o.AFTER_HEAD:{Ee(this,t);break}case o.IN_BODY:case o.IN_CAPTION:case o.IN_CELL:case o.IN_TEMPLATE:{Dt(this,t);break}case o.TEXT:case o.IN_SELECT:case o.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case o.IN_TABLE:case o.IN_TABLE_BODY:case o.IN_ROW:{ye(this,t);break}case o.IN_TABLE_TEXT:{kt(this,t);break}case o.IN_COLUMN_GROUP:{be(this,t);break}case o.AFTER_BODY:{Pe(this,t);break}case o.AFTER_AFTER_BODY:{pe(this,t);break}default:}}onNullCharacter(t){if(this.skipNextNewLine=false,this.tokenizer.inForeignNode){or(this,t);return}switch(this.insertionMode){case o.INITIAL:{ae(this,t);break}case o.BEFORE_HTML:{ne(this,t);break}case o.BEFORE_HEAD:{ie(this,t);break}case o.IN_HEAD:{oe(this,t);break}case o.IN_HEAD_NO_SCRIPT:{ce(this,t);break}case o.AFTER_HEAD:{Ee(this,t);break}case o.TEXT:{this._insertCharacters(t);break}case o.IN_TABLE:case o.IN_TABLE_BODY:case o.IN_ROW:{ye(this,t);break}case o.IN_COLUMN_GROUP:{be(this,t);break}case o.AFTER_BODY:{Pe(this,t);break}case o.AFTER_AFTER_BODY:{pe(this,t);break}default:}}onComment(t){if(this.skipNextNewLine=false,this.currentNotInHTML){ve(this,t);return}switch(this.insertionMode){case o.INITIAL:case o.BEFORE_HTML:case o.BEFORE_HEAD:case o.IN_HEAD:case o.IN_HEAD_NO_SCRIPT:case o.AFTER_HEAD:case o.IN_BODY:case o.IN_TABLE:case o.IN_CAPTION:case o.IN_COLUMN_GROUP:case o.IN_TABLE_BODY:case o.IN_ROW:case o.IN_CELL:case o.IN_SELECT:case o.IN_SELECT_IN_TABLE:case o.IN_TEMPLATE:case o.IN_FRAMESET:case o.AFTER_FRAMESET:{ve(this,t);break}case o.IN_TABLE_TEXT:{re(this,t);break}case o.AFTER_BODY:{ys(this,t);break}case o.AFTER_AFTER_BODY:case o.AFTER_AFTER_FRAMESET:{vs(this,t);break}default:}}onDoctype(t){switch(this.skipNextNewLine=false,this.insertionMode){case o.INITIAL:{Ys(this,t);break}case o.BEFORE_HEAD:case o.IN_HEAD:case o.IN_HEAD_NO_SCRIPT:case o.AFTER_HEAD:{this._err(t,T.misplacedDoctype);break}case o.IN_TABLE_TEXT:{re(this,t);break}default:}}onStartTag(t){this.skipNextNewLine=false,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,T.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Er(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case o.INITIAL:{ae(this,t);break}case o.BEFORE_HTML:{Ws(this,t);break}case o.BEFORE_HEAD:{Js(this,t);break}case o.IN_HEAD:{y(this,t);break}case o.IN_HEAD_NO_SCRIPT:{js(this,t);break}case o.AFTER_HEAD:{Vs(this,t);break}case o.IN_BODY:{p(this,t);break}case o.IN_TABLE:{$(this,t);break}case o.IN_TABLE_TEXT:{re(this,t);break}case o.IN_CAPTION:{Ka(this,t);break}case o.IN_COLUMN_GROUP:{Je(this,t);break}case o.IN_TABLE_BODY:{ke(this,t);break}case o.IN_ROW:{Ue(this,t);break}case o.IN_CELL:{Qa(this,t);break}case o.IN_SELECT:{Ft(this,t);break}case o.IN_SELECT_IN_TABLE:{qa(this,t);break}case o.IN_TEMPLATE:{Za(this,t);break}case o.AFTER_BODY:{er(this,t);break}case o.IN_FRAMESET:{tr(this,t);break}case o.AFTER_FRAMESET:{ar(this,t);break}case o.AFTER_AFTER_BODY:{nr(this,t);break}case o.AFTER_AFTER_FRAMESET:{ir(this,t);break}default:}}onEndTag(t){this.skipNextNewLine=false,this.currentToken=t,this.currentNotInHTML?Tr(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case o.INITIAL:{ae(this,t);break}case o.BEFORE_HTML:{Xs(this,t);break}case o.BEFORE_HEAD:{Ks(this,t);break}case o.IN_HEAD:{Gs(this,t);break}case o.IN_HEAD_NO_SCRIPT:{Qs(this,t);break}case o.AFTER_HEAD:{qs(this,t);break}case o.IN_BODY:{Me(this,t);break}case o.TEXT:{Ha(this,t);break}case o.IN_TABLE:{he(this,t);break}case o.IN_TABLE_TEXT:{re(this,t);break}case o.IN_CAPTION:{Ga(this,t);break}case o.IN_COLUMN_GROUP:{ja(this,t);break}case o.IN_TABLE_BODY:{Ye(this,t);break}case o.IN_ROW:{Ht(this,t);break}case o.IN_CELL:{Va(this,t);break}case o.IN_SELECT:{wt(this,t);break}case o.IN_SELECT_IN_TABLE:{za(this,t);break}case o.IN_TEMPLATE:{$a(this,t);break}case o.AFTER_BODY:{yt(this,t);break}case o.IN_FRAMESET:{sr(this,t);break}case o.AFTER_FRAMESET:{rr(this,t);break}case o.AFTER_AFTER_BODY:{pe(this,t);break}default:}}onEof(t){switch(this.insertionMode){case o.INITIAL:{ae(this,t);break}case o.BEFORE_HTML:{ne(this,t);break}case o.BEFORE_HEAD:{ie(this,t);break}case o.IN_HEAD:{oe(this,t);break}case o.IN_HEAD_NO_SCRIPT:{ce(this,t);break}case o.AFTER_HEAD:{Ee(this,t);break}case o.IN_BODY:case o.IN_TABLE:case o.IN_CAPTION:case o.IN_COLUMN_GROUP:case o.IN_TABLE_BODY:case o.IN_ROW:case o.IN_CELL:case o.IN_SELECT:case o.IN_SELECT_IN_TABLE:{Bt(this,t);break}case o.TEXT:{Fa(this,t);break}case o.IN_TABLE_TEXT:{re(this,t);break}case o.IN_TEMPLATE:{xt(this,t);break}case o.AFTER_BODY:case o.IN_FRAMESET:case o.AFTER_FRAMESET:case o.AFTER_AFTER_BODY:case o.AFTER_AFTER_FRAMESET:{Xe(this,t);break}default:}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=false,t.chars.charCodeAt(0)===r.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case o.IN_HEAD:case o.IN_HEAD_NO_SCRIPT:case o.AFTER_HEAD:case o.TEXT:case o.IN_COLUMN_GROUP:case o.IN_SELECT:case o.IN_SELECT_IN_TABLE:case o.IN_FRAMESET:case o.AFTER_FRAMESET:{this._insertCharacters(t);break}case o.IN_BODY:case o.IN_CAPTION:case o.IN_CELL:case o.IN_TEMPLATE:case o.AFTER_BODY:case o.AFTER_AFTER_BODY:case o.AFTER_AFTER_FRAMESET:{gt(this,t);break}case o.IN_TABLE:case o.IN_TABLE_BODY:case o.IN_ROW:{ye(this,t);break}case o.IN_TABLE_TEXT:{Mt(this,t);break}default:}}};function ks(e,t){let a=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return a?e.openElements.contains(a.element)?e.openElements.hasInScope(t.tagID)||(a=null):(e.activeFormattingElements.removeEntry(a),a=null):Pt(e,t),a}function Us(e,t){let a=null,n=e.openElements.stackTop;for(;n>=0;n--){let E=e.openElements.items[n];if(E===t.element)break;e._isSpecialElement(E,e.openElements.tagIDs[n])&&(a=E)}return a||(e.openElements.shortenToLength(Math.max(n,0)),e.activeFormattingElements.removeEntry(t)),a}function Hs(e,t,a){let n=t,E=e.openElements.getCommonAncestor(t);for(let _=0,u=E;u!==a;_++,u=E){E=e.openElements.getCommonAncestor(u);let d=e.activeFormattingElements.getElementEntry(u),m=d&&_>=Bs;!d||m?(m&&e.activeFormattingElements.removeEntry(d),e.openElements.remove(u)):(u=Fs(e,d),n===t&&(e.activeFormattingElements.bookmark=d),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(u,n),n=u)}return n}function Fs(e,t){let a=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,a,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function ws(e,t,a){let n=e.treeAdapter.getTagName(t),E=V(n);if(e._isElementCausesFosterParenting(E))e._fosterParentElement(a);else{let _=e.treeAdapter.getNamespaceURI(t);E===s.TEMPLATE&&_===h.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,a)}}function xs(e,t,a){let n=e.treeAdapter.getNamespaceURI(a.element),{token:E}=a,_=e.treeAdapter.createElement(E.tagName,n,E.attrs);e._adoptNodes(t,_),e.treeAdapter.appendChild(t,_),e.activeFormattingElements.insertElementAfterBookmark(_,E),e.activeFormattingElements.removeEntry(a),e.openElements.remove(a.element),e.openElements.insertAfter(t,_,E.tagID)}function We(e,t){for(let a=0;a<Ps;a++){let n=ks(e,t);if(!n)break;let E=Us(e,n);if(!E)break;e.activeFormattingElements.bookmark=n;let _=Hs(e,E,n.element),u=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(_),u&&ws(e,u,_),xs(e,E,n)}}function ve(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function ys(e,t){e._appendCommentNode(t,e.openElements.items[0])}function vs(e,t){e._appendCommentNode(t,e.document)}function Xe(e,t){if(e.stopped=true,t.location){let a=e.fragmentContext?0:2;for(let n=e.openElements.stackTop;n>=a;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],E=e.treeAdapter.getNodeSourceCodeLocation(n);if(E&&!E.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let _=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(_);u&&!u.endTag&&e._setEndLocation(_,t)}}}}function Ys(e,t){e._setDocumentType(t);let a=t.forceQuirks?B.QUIRKS:At(t);dt(t)||e._err(t,T.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,a),e.insertionMode=o.BEFORE_HTML}function ae(e,t){e._err(t,T.missingDoctype,true),e.treeAdapter.setDocumentMode(e.document,B.QUIRKS),e.insertionMode=o.BEFORE_HTML,e._processToken(t)}function Ws(e,t){t.tagID===s.HTML?(e._insertElement(t,h.HTML),e.insertionMode=o.BEFORE_HEAD):ne(e,t)}function Xs(e,t){let a=t.tagID;(a===s.HTML||a===s.HEAD||a===s.BODY||a===s.BR)&&ne(e,t)}function ne(e,t){e._insertFakeRootElement(),e.insertionMode=o.BEFORE_HEAD,e._processToken(t)}function Js(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.HEAD:{e._insertElement(t,h.HTML),e.headElement=e.openElements.current,e.insertionMode=o.IN_HEAD;break}default:ie(e,t)}}function Ks(e,t){let a=t.tagID;a===s.HEAD||a===s.BODY||a===s.HTML||a===s.BR?ie(e,t):e._err(t,T.endTagWithoutMatchingOpenElement)}function ie(e,t){e._insertFakeElement(c.HEAD,s.HEAD),e.headElement=e.openElements.current,e.insertionMode=o.IN_HEAD,e._processToken(t)}function y(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:{e._appendElement(t,h.HTML),t.ackSelfClosing=true;break}case s.TITLE:{e._switchToTextParsing(t,D.RCDATA);break}case s.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,D.RAWTEXT):(e._insertElement(t,h.HTML),e.insertionMode=o.IN_HEAD_NO_SCRIPT);break}case s.NOFRAMES:case s.STYLE:{e._switchToTextParsing(t,D.RAWTEXT);break}case s.SCRIPT:{e._switchToTextParsing(t,D.SCRIPT_DATA);break}case s.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=false,e.insertionMode=o.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(o.IN_TEMPLATE);break}case s.HEAD:{e._err(t,T.misplacedStartTagForHeadElement);break}default:oe(e,t)}}function Gs(e,t){switch(t.tagID){case s.HEAD:{e.openElements.pop(),e.insertionMode=o.AFTER_HEAD;break}case s.BODY:case s.BR:case s.HTML:{oe(e,t);break}case s.TEMPLATE:{q(e,t);break}default:e._err(t,T.endTagWithoutMatchingOpenElement)}}function q(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==s.TEMPLATE&&e._err(t,T.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,T.endTagWithoutMatchingOpenElement)}function oe(e,t){e.openElements.pop(),e.insertionMode=o.AFTER_HEAD,e._processToken(t)}function js(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.BASEFONT:case s.BGSOUND:case s.HEAD:case s.LINK:case s.META:case s.NOFRAMES:case s.STYLE:{y(e,t);break}case s.NOSCRIPT:{e._err(t,T.nestedNoscriptInHead);break}default:ce(e,t)}}function Qs(e,t){switch(t.tagID){case s.NOSCRIPT:{e.openElements.pop(),e.insertionMode=o.IN_HEAD;break}case s.BR:{ce(e,t);break}default:e._err(t,T.endTagWithoutMatchingOpenElement)}}function ce(e,t){let a=t.type===R.EOF?T.openElementsLeftAfterEof:T.disallowedContentInNoscriptInHead;e._err(t,a),e.openElements.pop(),e.insertionMode=o.IN_HEAD,e._processToken(t)}function Vs(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.BODY:{e._insertElement(t,h.HTML),e.framesetOk=false,e.insertionMode=o.IN_BODY;break}case s.FRAMESET:{e._insertElement(t,h.HTML),e.insertionMode=o.IN_FRAMESET;break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{e._err(t,T.abandonedHeadElementChild),e.openElements.push(e.headElement,s.HEAD),y(e,t),e.openElements.remove(e.headElement);break}case s.HEAD:{e._err(t,T.misplacedStartTagForHeadElement);break}default:Ee(e,t)}}function qs(e,t){switch(t.tagID){case s.BODY:case s.HTML:case s.BR:{Ee(e,t);break}case s.TEMPLATE:{q(e,t);break}default:e._err(t,T.endTagWithoutMatchingOpenElement)}}function Ee(e,t){e._insertFakeElement(c.BODY,s.BODY),e.insertionMode=o.IN_BODY,Be(e,t)}function Be(e,t){switch(t.type){case R.CHARACTER:{Dt(e,t);break}case R.WHITESPACE_CHARACTER:{gt(e,t);break}case R.COMMENT:{ve(e,t);break}case R.START_TAG:{p(e,t);break}case R.END_TAG:{Me(e,t);break}case R.EOF:{Bt(e,t);break}default:}}function gt(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Dt(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=false}function zs(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Zs(e,t){let a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e.openElements.tmplCount===0&&(e.framesetOk=false,e.treeAdapter.adoptAttributes(a,t.attrs))}function $s(e,t){let a=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&a&&(e.treeAdapter.detachNode(a),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,h.HTML),e.insertionMode=o.IN_FRAMESET)}function ea(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,h.HTML)}function ta(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&ee.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,h.HTML)}function sa(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,h.HTML),e.skipNextNewLine=true,e.framesetOk=false}function aa(e,t){let a=e.openElements.tmplCount>0;(!e.formElement||a)&&(e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,h.HTML),a||(e.formElement=e.openElements.current))}function ra(e,t){e.framesetOk=false;let a=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){let E=e.openElements.tagIDs[n];if(a===s.LI&&E===s.LI||(a===s.DD||a===s.DT)&&(E===s.DD||E===s.DT)){e.openElements.generateImpliedEndTagsWithExclusion(E),e.openElements.popUntilTagNamePopped(E);break}if(E!==s.ADDRESS&&E!==s.DIV&&E!==s.P&&e._isSpecialElement(e.openElements.items[n],E))break}e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,h.HTML)}function na(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,h.HTML),e.tokenizer.state=D.PLAINTEXT}function ia(e,t){e.openElements.hasInScope(s.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,h.HTML),e.framesetOk=false}function oa(e,t){let a=e.activeFormattingElements.getElementEntryInScopeWithTagName(c.A);a&&(We(e,t),e.openElements.remove(a.element),e.activeFormattingElements.removeEntry(a)),e._reconstructActiveFormattingElements(),e._insertElement(t,h.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ca(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,h.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ea(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(s.NOBR)&&(We(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,h.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ta(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,h.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=false}function ha(e,t){e.treeAdapter.getDocumentMode(e.document)!==B.QUIRKS&&e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,h.HTML),e.framesetOk=false,e.insertionMode=o.IN_TABLE}function pt(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,h.HTML),e.framesetOk=false,t.ackSelfClosing=true}function bt(e){let t=Ne(e,J.TYPE);return t!=null&&t.toLowerCase()===bs}function la(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,h.HTML),bt(t)||(e.framesetOk=false),t.ackSelfClosing=true}function _a(e,t){e._appendElement(t,h.HTML),t.ackSelfClosing=true}function ua(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._appendElement(t,h.HTML),e.framesetOk=false,t.ackSelfClosing=true}function da(e,t){t.tagName=c.IMG,t.tagID=s.IMG,pt(e,t)}function Aa(e,t){e._insertElement(t,h.HTML),e.skipNextNewLine=true,e.tokenizer.state=D.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=false,e.insertionMode=o.TEXT}function ma(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=false,e._switchToTextParsing(t,D.RAWTEXT)}function Ra(e,t){e.framesetOk=false,e._switchToTextParsing(t,D.RAWTEXT)}function Ot(e,t){e._switchToTextParsing(t,D.RAWTEXT)}function fa(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,h.HTML),e.framesetOk=false,e.insertionMode=e.insertionMode===o.IN_TABLE||e.insertionMode===o.IN_CAPTION||e.insertionMode===o.IN_TABLE_BODY||e.insertionMode===o.IN_ROW||e.insertionMode===o.IN_CELL?o.IN_SELECT_IN_TABLE:o.IN_SELECT}function Na(e,t){e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,h.HTML)}function Ca(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,h.HTML)}function Ia(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(s.RTC),e._insertElement(t,h.HTML)}function Oa(e,t){e._reconstructActiveFormattingElements(),we(t),De(t),t.selfClosing?e._appendElement(t,h.MATHML):e._insertElement(t,h.MATHML),t.ackSelfClosing=true}function La(e,t){e._reconstructActiveFormattingElements(),xe(t),De(t),t.selfClosing?e._appendElement(t,h.SVG):e._insertElement(t,h.SVG),t.ackSelfClosing=true}function Lt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,h.HTML)}function p(e,t){switch(t.tagID){case s.I:case s.S:case s.B:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.SMALL:case s.STRIKE:case s.STRONG:{ca(e,t);break}case s.A:{oa(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{ta(e,t);break}case s.P:case s.DL:case s.OL:case s.UL:case s.DIV:case s.DIR:case s.NAV:case s.MAIN:case s.MENU:case s.ASIDE:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.DETAILS:case s.ADDRESS:case s.ARTICLE:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{ea(e,t);break}case s.LI:case s.DD:case s.DT:{ra(e,t);break}case s.BR:case s.IMG:case s.WBR:case s.AREA:case s.EMBED:case s.KEYGEN:{pt(e,t);break}case s.HR:{ua(e,t);break}case s.RB:case s.RTC:{Ca(e,t);break}case s.RT:case s.RP:{Ia(e,t);break}case s.PRE:case s.LISTING:{sa(e,t);break}case s.XMP:{ma(e,t);break}case s.SVG:{La(e,t);break}case s.HTML:{zs(e,t);break}case s.BASE:case s.LINK:case s.META:case s.STYLE:case s.TITLE:case s.SCRIPT:case s.BGSOUND:case s.BASEFONT:case s.TEMPLATE:{y(e,t);break}case s.BODY:{Zs(e,t);break}case s.FORM:{aa(e,t);break}case s.NOBR:{Ea(e,t);break}case s.MATH:{Oa(e,t);break}case s.TABLE:{ha(e,t);break}case s.INPUT:{la(e,t);break}case s.PARAM:case s.TRACK:case s.SOURCE:{_a(e,t);break}case s.IMAGE:{da(e,t);break}case s.BUTTON:{ia(e,t);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{Ta(e,t);break}case s.IFRAME:{Ra(e,t);break}case s.SELECT:{fa(e,t);break}case s.OPTION:case s.OPTGROUP:{Na(e,t);break}case s.NOEMBED:case s.NOFRAMES:{Ot(e,t);break}case s.FRAMESET:{$s(e,t);break}case s.TEXTAREA:{Aa(e,t);break}case s.NOSCRIPT:{e.options.scriptingEnabled?Ot(e,t):Lt(e,t);break}case s.PLAINTEXT:{na(e,t);break}case s.COL:case s.TH:case s.TD:case s.TR:case s.HEAD:case s.FRAME:case s.TBODY:case s.TFOOT:case s.THEAD:case s.CAPTION:case s.COLGROUP:break;default:Lt(e,t)}}function Sa(e,t){if(e.openElements.hasInScope(s.BODY)&&(e.insertionMode=o.AFTER_BODY,e.options.sourceCodeLocationInfo)){let a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e._setEndLocation(a,t)}}function ga(e,t){e.openElements.hasInScope(s.BODY)&&(e.insertionMode=o.AFTER_BODY,yt(e,t))}function Da(e,t){let a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a))}function pa(e){let t=e.openElements.tmplCount>0,{formElement:a}=e;t||(e.formElement=null),(a||t)&&e.openElements.hasInScope(s.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(s.FORM):a&&e.openElements.remove(a))}function ba(e){e.openElements.hasInButtonScope(s.P)||e._insertFakeElement(c.P,s.P),e._closePElement()}function Pa(e){e.openElements.hasInListItemScope(s.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(s.LI),e.openElements.popUntilTagNamePopped(s.LI))}function Ba(e,t){let a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a))}function Ma(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function ka(e,t){let a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker())}function Ua(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(c.BR,s.BR),e.openElements.pop(),e.framesetOk=false}function Pt(e,t){let a=t.tagName,n=t.tagID;for(let E=e.openElements.stackTop;E>0;E--){let _=e.openElements.items[E],u=e.openElements.tagIDs[E];if(n===u&&(n!==s.UNKNOWN||e.treeAdapter.getTagName(_)===a)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=E&&e.openElements.shortenToLength(E);break}if(e._isSpecialElement(_,u))break}}function Me(e,t){switch(t.tagID){case s.A:case s.B:case s.I:case s.S:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.NOBR:case s.SMALL:case s.STRIKE:case s.STRONG:{We(e,t);break}case s.P:{ba(e);break}case s.DL:case s.UL:case s.OL:case s.DIR:case s.DIV:case s.NAV:case s.PRE:case s.MAIN:case s.MENU:case s.ASIDE:case s.BUTTON:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.ADDRESS:case s.ARTICLE:case s.DETAILS:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.LISTING:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{Da(e,t);break}case s.LI:{Pa(e);break}case s.DD:case s.DT:{Ba(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{Ma(e);break}case s.BR:{Ua(e);break}case s.BODY:{Sa(e,t);break}case s.HTML:{ga(e,t);break}case s.FORM:{pa(e);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{ka(e,t);break}case s.TEMPLATE:{q(e,t);break}default:Pt(e,t)}}function Bt(e,t){e.tmplInsertionModeStack.length>0?xt(e,t):Xe(e,t)}function Ha(e,t){var a;t.tagID===s.SCRIPT&&((a=e.scriptHandler)===null||a===void 0||a.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Fa(e,t){e._err(t,T.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ye(e,t){if(e.openElements.currentTagId!==void 0&&St.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=false,e.originalInsertionMode=e.insertionMode,e.insertionMode=o.IN_TABLE_TEXT,t.type){case R.CHARACTER:{kt(e,t);break}case R.WHITESPACE_CHARACTER:{Mt(e,t);break}}else le(e,t)}function wa(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,h.HTML),e.insertionMode=o.IN_CAPTION}function xa(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,h.HTML),e.insertionMode=o.IN_COLUMN_GROUP}function ya(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(c.COLGROUP,s.COLGROUP),e.insertionMode=o.IN_COLUMN_GROUP,Je(e,t)}function va(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,h.HTML),e.insertionMode=o.IN_TABLE_BODY}function Ya(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(c.TBODY,s.TBODY),e.insertionMode=o.IN_TABLE_BODY,ke(e,t)}function Wa(e,t){e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Xa(e,t){bt(t)?e._appendElement(t,h.HTML):le(e,t),t.ackSelfClosing=true}function Ja(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,h.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function $(e,t){switch(t.tagID){case s.TD:case s.TH:case s.TR:{Ya(e,t);break}case s.STYLE:case s.SCRIPT:case s.TEMPLATE:{y(e,t);break}case s.COL:{ya(e,t);break}case s.FORM:{Ja(e,t);break}case s.TABLE:{Wa(e,t);break}case s.TBODY:case s.TFOOT:case s.THEAD:{va(e,t);break}case s.INPUT:{Xa(e,t);break}case s.CAPTION:{wa(e,t);break}case s.COLGROUP:{xa(e,t);break}default:le(e,t)}}function he(e,t){switch(t.tagID){case s.TABLE:{e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode());break}case s.TEMPLATE:{q(e,t);break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:le(e,t)}}function le(e,t){let a=e.fosterParentingEnabled;e.fosterParentingEnabled=true,Be(e,t),e.fosterParentingEnabled=a}function Mt(e,t){e.pendingCharacterTokens.push(t)}function kt(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=true}function re(e,t){let a=0;if(e.hasNonWhitespacePendingCharacterToken)for(;a<e.pendingCharacterTokens.length;a++)le(e,e.pendingCharacterTokens[a]);else for(;a<e.pendingCharacterTokens.length;a++)e._insertCharacters(e.pendingCharacterTokens[a]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var Ut=new Set([s.CAPTION,s.COL,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]);function Ka(e,t){let a=t.tagID;Ut.has(a)?e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=o.IN_TABLE,$(e,t)):p(e,t)}function Ga(e,t){let a=t.tagID;switch(a){case s.CAPTION:case s.TABLE:{e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=o.IN_TABLE,a===s.TABLE&&he(e,t));break}case s.BODY:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:Me(e,t)}}function Je(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.COL:{e._appendElement(t,h.HTML),t.ackSelfClosing=true;break}case s.TEMPLATE:{y(e,t);break}default:be(e,t)}}function ja(e,t){switch(t.tagID){case s.COLGROUP:{e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=o.IN_TABLE);break}case s.TEMPLATE:{q(e,t);break}case s.COL:break;default:be(e,t)}}function be(e,t){e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=o.IN_TABLE,e._processToken(t))}function ke(e,t){switch(t.tagID){case s.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,h.HTML),e.insertionMode=o.IN_ROW;break}case s.TH:case s.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(c.TR,s.TR),e.insertionMode=o.IN_ROW,Ue(e,t);break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=o.IN_TABLE,$(e,t));break}default:$(e,t)}}function Ye(e,t){let a=t.tagID;switch(t.tagID){case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasInTableScope(a)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=o.IN_TABLE);break}case s.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=o.IN_TABLE,he(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:case s.TR:break;default:he(e,t)}}function Ue(e,t){switch(t.tagID){case s.TH:case s.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,h.HTML),e.insertionMode=o.IN_CELL,e.activeFormattingElements.insertMarker();break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=o.IN_TABLE_BODY,ke(e,t));break}default:$(e,t)}}function Ht(e,t){switch(t.tagID){case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=o.IN_TABLE_BODY);break}case s.TABLE:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=o.IN_TABLE_BODY,Ye(e,t));break}case s.TBODY:case s.TFOOT:case s.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(s.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=o.IN_TABLE_BODY,Ye(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:break;default:he(e,t)}}function Qa(e,t){let a=t.tagID;Ut.has(a)?(e.openElements.hasInTableScope(s.TD)||e.openElements.hasInTableScope(s.TH))&&(e._closeTableCell(),Ue(e,t)):p(e,t)}function Va(e,t){let a=t.tagID;switch(a){case s.TD:case s.TH:{e.openElements.hasInTableScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=o.IN_ROW);break}case s.TABLE:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(a)&&(e._closeTableCell(),Ht(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:break;default:Me(e,t)}}function Ft(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._insertElement(t,h.HTML);break}case s.OPTGROUP:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._insertElement(t,h.HTML);break}case s.HR:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._appendElement(t,h.HTML),t.ackSelfClosing=true;break}case s.INPUT:case s.KEYGEN:case s.TEXTAREA:case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),t.tagID!==s.SELECT&&e._processStartTag(t));break}case s.SCRIPT:case s.TEMPLATE:{y(e,t);break}default:}}function wt(e,t){switch(t.tagID){case s.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===s.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===s.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop();break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop();break}case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode());break}case s.TEMPLATE:{q(e,t);break}default:}}function qa(e,t){let a=t.tagID;a===s.CAPTION||a===s.TABLE||a===s.TBODY||a===s.TFOOT||a===s.THEAD||a===s.TR||a===s.TD||a===s.TH?(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ft(e,t)}function za(e,t){let a=t.tagID;a===s.CAPTION||a===s.TABLE||a===s.TBODY||a===s.TFOOT||a===s.THEAD||a===s.TR||a===s.TD||a===s.TH?e.openElements.hasInTableScope(a)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e.onEndTag(t)):wt(e,t)}function Za(e,t){switch(t.tagID){case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{y(e,t);break}case s.CAPTION:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.tmplInsertionModeStack[0]=o.IN_TABLE,e.insertionMode=o.IN_TABLE,$(e,t);break}case s.COL:{e.tmplInsertionModeStack[0]=o.IN_COLUMN_GROUP,e.insertionMode=o.IN_COLUMN_GROUP,Je(e,t);break}case s.TR:{e.tmplInsertionModeStack[0]=o.IN_TABLE_BODY,e.insertionMode=o.IN_TABLE_BODY,ke(e,t);break}case s.TD:case s.TH:{e.tmplInsertionModeStack[0]=o.IN_ROW,e.insertionMode=o.IN_ROW,Ue(e,t);break}default:e.tmplInsertionModeStack[0]=o.IN_BODY,e.insertionMode=o.IN_BODY,p(e,t)}}function $a(e,t){t.tagID===s.TEMPLATE&&q(e,t)}function xt(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Xe(e,t)}function er(e,t){t.tagID===s.HTML?p(e,t):Pe(e,t)}function yt(e,t){var a;if(t.tagID===s.HTML){if(e.fragmentContext||(e.insertionMode=o.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===s.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!(!((a=e.treeAdapter.getNodeSourceCodeLocation(n))===null||a===void 0)&&a.endTag)&&e._setEndLocation(n,t)}}else Pe(e,t)}function Pe(e,t){e.insertionMode=o.IN_BODY,Be(e,t)}function tr(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.FRAMESET:{e._insertElement(t,h.HTML);break}case s.FRAME:{e._appendElement(t,h.HTML),t.ackSelfClosing=true;break}case s.NOFRAMES:{y(e,t);break}default:}}function sr(e,t){t.tagID===s.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==s.FRAMESET&&(e.insertionMode=o.AFTER_FRAMESET))}function ar(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.NOFRAMES:{y(e,t);break}default:}}function rr(e,t){t.tagID===s.HTML&&(e.insertionMode=o.AFTER_AFTER_FRAMESET)}function nr(e,t){t.tagID===s.HTML?p(e,t):pe(e,t)}function pe(e,t){e.insertionMode=o.IN_BODY,Be(e,t)}function ir(e,t){switch(t.tagID){case s.HTML:{p(e,t);break}case s.NOFRAMES:{y(e,t);break}default:}}function or(e,t){t.chars=f,e._insertCharacters(t)}function cr(e,t){e._insertCharacters(t),e.framesetOk=false}function vt(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==h.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Er(e,t){if(Rt(t))vt(e),e._startTagOutsideForeignContent(t);else{let a=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(a);n===h.MATHML?we(t):n===h.SVG&&(ft(t),xe(t)),De(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=true}}function Tr(e,t){if(t.tagID===s.P||t.tagID===s.BR){vt(e),e._endTagOutsideForeignContent(t);return}for(let a=e.openElements.stackTop;a>0;a--){let n=e.openElements.items[a];if(e.treeAdapter.getNamespaceURI(n)===h.HTML){e._endTagOutsideForeignContent(t);break}let E=e.treeAdapter.getTagName(n);if(E.toLowerCase()===t.tagName){t.tagName=E,e.openElements.shortenToLength(a);break}}}var sn=new Set([c.AREA,c.BASE,c.BASEFONT,c.BGSOUND,c.BR,c.COL,c.EMBED,c.FRAME,c.HR,c.IMG,c.INPUT,c.KEYGEN,c.LINK,c.META,c.PARAM,c.SOURCE,c.TRACK,c.WBR]);function Yt(e,t,a){typeof e=="string"&&(a=t,t=e,e=null);let n=Te.getFragmentParser(e,a);return n.tokenizer.write(t,true),n.getFragment()}return Qt(hr)})();return editorParser.parseFragment})();Object.assign(__ds_scope,{parseEditorFragment})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/editor-parser.js",error:String(e&&e.message||e)})}try{(()=>{const{parseEditorFragment}=__ds_scope;const EDITOR_SCHEMA=Object.freeze({tags:Object.freeze(["p","br","b","i","strong","em","ul","ol","li","div","span"]),attrs:Object.freeze({})});const ALLOWED=new Set(EDITOR_SCHEMA.tags);const HTML_NAMESPACE="http://www.w3.org/1999/xhtml";const DROP_CONTENT=new Set(["script","style","iframe","object","embed","link","meta","base","template","noscript","noframes","xmp","plaintext","textarea","title"]);function escapeEditorText(text){return String(text).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function sanitizeHtml(html){if(html==null||html==="")return"";const fragment=parseEditorFragment(String(html),{scriptingEnabled:true});const pending=[...fragment.childNodes].reverse();const output=[];while(pending.length){const node=pending.pop();if(typeof node==="string"){output.push(node);continue}if(node.nodeName==="#text"){output.push(escapeEditorText(node.value));continue}const tag=node.tagName;if(!tag||node.namespaceURI!==HTML_NAMESPACE||DROP_CONTENT.has(tag))continue;if(ALLOWED.has(tag)){output.push(`<${tag}>`);if(tag==="br")continue;pending.push(`</${tag}>`)}for(let i=(node.childNodes?.length||0)-1;i>=0;i--)pending.push(node.childNodes[i])}return output.join("")}Object.assign(__ds_scope,{EDITOR_SCHEMA,escapeEditorText,sanitizeHtml})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/editor-schema.js",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{useClientLayoutEffect}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{EDITOR_SCHEMA,sanitizeHtml,escapeEditorText}=__ds_scope;function EditorToolbarButton({command,label,pressed,onCommand,children}){return React.createElement("button",{type:"button",className:"cs-toolbar__btn","aria-label":label,"aria-pressed":pressed,onMouseDown:e=>e.preventDefault(),onClick:()=>onCommand(command)},children)}const Editor=React.forwardRef(function Editor2({controlRef,defaultValue="",unsafeHtml,onChange,minHeight=120,lang,className,rootProps},forwardedRef){const box=React.useRef(null);const mergedControlRef=useComposedRefs(box,controlRef);const seeded=React.useRef(false);const selection=React.useRef(null);const[formatting,setFormatting]=React.useState({bold:false,italic:false,insertUnorderedList:false});const syncFormatting=range=>{const commands=["bold","italic","insertUnorderedList"];const samples=[];if(!range.collapsed){const walker=document.createTreeWalker(box.current,NodeFilter.SHOW_TEXT);let node;while(node=walker.nextNode()){if(!node.length||!range.intersectsNode(node)||range.startContainer===node&&range.startOffset===node.length||range.endContainer===node&&range.endOffset===0)continue;const style=getComputedStyle(node.parentElement);samples.push({bold:Number.parseInt(style.fontWeight,10)>=600,italic:/^(italic|oblique)/.test(style.fontStyle),insertUnorderedList:node.parentElement.closest("ul,ol")?.tagName==="UL"})}}const next=Object.fromEntries(commands.map(command=>{const values=samples.map(sample=>sample[command]);const value=values.length?values.every(Boolean)?true:values.some(Boolean)?"mixed":false:document.queryCommandIndeterm(command)?"mixed":document.queryCommandState(command);return[command,value]}));setFormatting(previous=>commands.every(key=>previous[key]===next[key])?previous:next)};const lastEmitted=React.useRef(null);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Editor",L,localeMessages);const rememberSelection=()=>{const s=window.getSelection();if(s?.rangeCount&&box.current?.contains(s.getRangeAt(0).commonAncestorContainer)){selection.current=s.getRangeAt(0).cloneRange();syncFormatting(s.getRangeAt(0))}};React.useEffect(()=>{document.addEventListener("selectionchange",rememberSelection);return()=>document.removeEventListener("selectionchange",rememberSelection)},[]);const restoreSelection=()=>{const el=box.current;if(!el)return;el.focus();const s=window.getSelection();const r=selection.current;if(r&&el.contains(r.commonAncestorContainer)){s.removeAllRanges();s.addRange(r)}else{const end=document.createRange();end.selectNodeContents(el);end.collapse(false);s.removeAllRanges();s.addRange(end)}};const cmd=c=>{restoreSelection();document.execCommand(c);emit()};const emit=()=>{if(!box.current)return;const clean=sanitizeHtml(box.current.innerHTML);if(box.current.innerHTML!==clean){box.current.innerHTML=clean;selection.current=null;restoreSelection()}rememberSelection();if(lastEmitted.current!==clean){lastEmitted.current=clean;onChange?.(clean)}};const insertTransfer=data=>{if(!data)return;const html=data.getData("text/html");const clean=html?sanitizeHtml(html):escapeEditorText(data.getData("text/plain")).replace(/\r?\n/g,"<br>");restoreSelection();if(!document.execCommand("insertHTML",false,clean)){const s=window.getSelection();if(!s?.rangeCount)return;const r=s.getRangeAt(0);const tpl=document.createElement("template");tpl.innerHTML=clean;const last=tpl.content.lastChild;r.deleteContents();r.insertNode(tpl.content);if(last)r.setStartAfter(last);r.collapse(true);s.removeAllRanges();s.addRange(r)}emit()};const paste=e=>{e.preventDefault();rememberSelection();insertTransfer(e.clipboardData)};const drop=e=>{e.preventDefault();const point=document.caretPositionFromPoint?.(e.clientX,e.clientY);let r=document.caretRangeFromPoint?.(e.clientX,e.clientY);if(!r&&point){r=document.createRange();r.setStart(point.offsetNode,point.offset);r.collapse(true)}if(r&&box.current?.contains(r.commonAncestorContainer))selection.current=r;insertTransfer(e.dataTransfer)};useClientLayoutEffect(()=>{if(!box.current||seeded.current)return;box.current.innerHTML=unsafeHtml!=null?String(unsafeHtml):sanitizeHtml(defaultValue);lastEmitted.current=sanitizeHtml(box.current.innerHTML);seeded.current=true},[defaultValue,unsafeHtml]);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-editor",className)},rootProps,[])},React.createElement("div",{className:"cs-editor__bar",role:"toolbar","aria-label":t("toolbar")},React.createElement(EditorToolbarButton,{onCommand:cmd,pressed:formatting.bold,command:"bold",label:t("bold")},React.createElement("b",null,"B")),React.createElement(EditorToolbarButton,{onCommand:cmd,pressed:formatting.italic,command:"italic",label:t("italic")},React.createElement("i",null,"I")),React.createElement(EditorToolbarButton,{onCommand:cmd,pressed:formatting.insertUnorderedList,command:"insertUnorderedList",label:t("list")},"≔")),React.createElement("div",{ref:mergedControlRef,className:"cs-editor__area",contentEditable:true,suppressContentEditableWarning:true,role:"textbox","aria-multiline":"true","aria-label":t("area"),style:{minHeight},onInput:emit,onSelect:rememberSelection,onBlur:rememberSelection,onPaste:paste,onDrop:drop,onDragOver:e=>e.preventDefault()}))});Editor.displayName="Editor";Object.assign(__ds_scope,{Editor})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Editor.jsx",error:String(e&&e.message||e)})}try{(()=>{const{localeMessagesContext,snapshotLocaleMessages,makeT}=__ds_scope;function LocaleProvider({messages,children}){const Context=localeMessagesContext();const parent=React.useContext(Context);const snapshot=React.useMemo(()=>snapshotLocaleMessages(messages),[messages]);const value=React.useMemo(()=>Object.freeze({messages:snapshot,parent}),[snapshot,parent]);return React.createElement(Context.Provider,{value},children)}function useMessages(namespace,lang){const messages=React.useContext(localeMessagesContext());return React.useMemo(()=>makeT(namespace,lang,messages),[namespace,lang,messages])}Object.assign(__ds_scope,{LocaleProvider,useMessages})})()}catch(e){__ds_ns.__errors.push({path:"components/i18n/LocaleProvider.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const CS_ICONS={close:{viewBox:"0 0 24 24",els:[["path",{d:"M6 6l12 12M18 6L6 18"}]]},sun:{viewBox:"0 0 24 24",els:[["circle",{cx:12,cy:12,r:4}],["path",{d:"M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M19.1 4.9l-1.4 1.4M6.3 17.7l-1.4 1.4"}]]},moon:{viewBox:"0 0 24 24",els:[["path",{d:"M20 13.5A8 8 0 1 1 10.5 4a6.5 6.5 0 0 0 9.5 9.5z"}]]},"arrow-right":{viewBox:"0 0 24 24",els:[["path",{d:"M5 12h14M13 6l6 6-6 6"}]]},check:{viewBox:"0 0 24 24",els:[["path",{d:"M4 12.5l5 5 11-11"}]]},sparkle:{viewBox:"0 0 24 24",els:[["path",{d:"M12 3l1.8 5.4L19 10l-5.2 1.6L12 17l-1.8-5.4L5 10l5.2-1.6z"}]]},chat:{viewBox:"0 0 24 24",els:[["path",{d:"M4 5h16v11H8l-4 4z"}]]},"sound-on":{viewBox:"0 0 24 24",els:[["path",{d:"M5 9v6h3l4 4V5L8 9z"}],["path",{d:"M15 9.5a4 4 0 0 1 0 5M17.6 7a8 8 0 0 1 0 10"}]]},"sound-off":{viewBox:"0 0 24 24",els:[["path",{d:"M5 9v6h3l4 4V5L8 9z"}],["path",{d:"M16 9.5l4.5 5M20.5 9.5l-4.5 5"}]]},search:{viewBox:"0 0 24 24",els:[["circle",{cx:11,cy:11,r:6}],["path",{d:"M20 20l-4.2-4.2"}]]},sliders:{viewBox:"0 0 24 24",els:[["path",{d:"M4 6h16M4 12h16M4 18h16"}],["circle",{cx:9,cy:6,r:2}],["circle",{cx:15,cy:12,r:2}],["circle",{cx:7,cy:18,r:2}]]},upload:{viewBox:"0 0 24 24",els:[["path",{d:"M12 15V4M7 8.5L12 4l5 4.5"}],["path",{d:"M4 19h16"}]]},download:{viewBox:"0 0 24 24",els:[["path",{d:"M12 4v11M7 10.5L12 15l5-4.5"}],["path",{d:"M4 19h16"}]]},calendar:{viewBox:"0 0 24 24",els:[["rect",{x:4,y:6,width:16,height:14,rx:2}],["path",{d:"M4 10.5h16M8 3.5v4M16 3.5v4"}]]},user:{viewBox:"0 0 24 24",els:[["circle",{cx:12,cy:8.5,r:3.5}],["path",{d:"M5 19.5c1.6-3.4 4-5 7-5s5.4 1.6 7 5"}]]},plus:{viewBox:"0 0 24 24",els:[["path",{d:"M12 5v14M5 12h14"}]]},trash:{viewBox:"0 0 24 24",els:[["path",{d:"M5 7h14M9.5 7V4.5h5V7"}],["path",{d:"M7 7l.8 12.5h8.4L17 7M10 11v5M14 11v5"}]]},external:{viewBox:"0 0 24 24",els:[["path",{d:"M14 4h6v6M20 4l-8 8"}],["path",{d:"M18 13v6H5V6h6"}]]},menu:{viewBox:"0 0 24 24",els:[["path",{d:"M4 7h16M4 12h16M4 17h16"}]]},"chevron-down":{viewBox:"0 0 24 24",els:[["path",{d:"M6 9l6 6 6-6"}]]},"chevron-up":{viewBox:"0 0 24 24",els:[["path",{d:"M6 15l6-6 6 6"}]]},"chevron-left":{viewBox:"0 0 24 24",els:[["path",{d:"M15 6l-6 6 6 6"}]]},"chevron-right":{viewBox:"0 0 24 24",els:[["path",{d:"M9 6l6 6-6 6"}]]},edit:{viewBox:"0 0 24 24",els:[["path",{d:"M4 20h4L18.5 9.5a2.12 2.12 0 0 0-3-3L5 17z"}],["path",{d:"M13.5 6.5l3 3"}]]},copy:{viewBox:"0 0 24 24",els:[["rect",{x:8,y:8,width:12,height:12,rx:2}],["path",{d:"M4 16V6a2 2 0 0 1 2-2h10"}]]},info:{viewBox:"0 0 24 24",els:[["circle",{cx:12,cy:12,r:9}],["path",{d:"M12 11v5M12 7.75v.01"}]]},"alert-triangle":{viewBox:"0 0 24 24",els:[["path",{d:"M12 3.5l9 16H3z"}],["path",{d:"M12 10v4M12 17.5v.01"}]]},pin:{viewBox:"0 0 24 24",els:[["path",{d:"M12 21v-7"}],["path",{d:"M8.5 3.5h7l-1.2 6.5h2.7L12 14.5 6.999 10h2.7z"}]]}};const Icon=React.forwardRef(function Icon2({name,size="md",label,className,strokeWidth=1.75,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const def=CS_ICONS[name]||CS_ICONS.sparkle;const dim=`var(--cs-icon-${size}, 20px)`;const a11y=label?{role:"img","aria-label":label}:{"aria-hidden":true,focusable:false};return React.createElement("svg",{...props,className,viewBox:def.viewBox,style:{width:dim,height:dim,display:"inline-block",flex:"none",...props.style||{}},fill:"none",stroke:"currentColor",strokeWidth,strokeLinecap:"round",strokeLinejoin:"round",...a11y,ref:mergedNativeRef},def.els.map(([tag,attrs],i)=>React.createElement(tag,{key:i,...attrs})))});Icon.displayName="Icon";Object.assign(__ds_scope,{CS_ICONS,Icon})})()}catch(e){__ds_ns.__errors.push({path:"components/icon/Icon.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{Icon}=__ds_scope;const{cx}=__ds_scope;const{useClientLayoutEffect}=__ds_scope;const DataGrid=React.forwardRef(function DataGrid2({columns=[],rows=[],rowKey="id",selectable=false,selected=[],onSelect,height=280,caption,empty,lang,className,rootProps,filterText,filterKeys,virtual=false,virtualThreshold=80,rowHeight=36,persistKey},forwardedRef){const[sort,setSort]=React.useState(null);const nameId=React.useId();const[scrollTop,setScrollTop]=React.useState(0);const estimate=Number.isFinite(rowHeight)&&rowHeight>0?rowHeight:36;const[measuredRowHeight,setMeasuredRowHeight]=React.useState(estimate);const effectiveRowHeight=Math.max(estimate,measuredRowHeight);const[colOrder,setColOrder]=React.useState(null);useClientLayoutEffect(()=>{if(!persistKey){setColOrder(null);return}try{const raw=localStorage.getItem("cs:datagrid:cols:"+persistKey);const arr=raw?JSON.parse(raw):null;setColOrder(Array.isArray(arr)?arr:null)}catch(e){setColOrder(null)}},[persistKey]);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("DataGrid",L,localeMessages);const orderedColumns=React.useMemo(()=>{if(!colOrder||!colOrder.length)return columns;const map=new Map(columns.map(c=>[c.key,c]));const out=[];for(const k of colOrder)if(map.has(k)){out.push(map.get(k));map.delete(k)}for(const c of map.values())out.push(c);return out},[columns,colOrder]);const filtered=React.useMemo(()=>{const q=(filterText==null?"":String(filterText)).trim().toLowerCase();if(!q)return rows;const keys=filterKeys&&filterKeys.length?filterKeys:orderedColumns.map(c=>c.key);return rows.filter(r=>keys.some(k=>String(r[k]==null?"":r[k]).toLowerCase().includes(q)))},[rows,filterText,filterKeys,orderedColumns]);const sorted=React.useMemo(()=>{if(!sort)return filtered;const col=orderedColumns.find(c=>c.key===sort.key);const val=r=>col&&col.sortValue?col.sortValue(r):r[sort.key];return[...filtered].sort((a,b)=>{const x=val(a),y=val(b);return(x>y?1:x<y?-1:0)*(sort.dir==="asc"?1:-1)})},[filtered,sort,orderedColumns]);const useVirtual=virtual||sorted.length>=virtualThreshold;const bodyH=Math.max(0,height-40);const visibleCount=useVirtual?Math.ceil(bodyH/effectiveRowHeight)+8:sorted.length;const start=useVirtual?Math.min(Math.max(0,sorted.length-visibleCount),Math.max(0,Math.floor(scrollTop/effectiveRowHeight)-4)):0;const end=useVirtual?Math.min(sorted.length,start+visibleCount):sorted.length;const slice=sorted.slice(start,end);const padTop=useVirtual?start*effectiveRowHeight:0;const padBottom=useVirtual?Math.max(0,(sorted.length-end)*effectiveRowHeight):0;useClientLayoutEffect(()=>{const host=ref.current;if(!host||!useVirtual)return;const rows2=[...host.querySelectorAll('tbody > tr:not([aria-hidden="true"])')];if(!slice.length||!rows2.length)return;const measure=()=>{const old=rows2.map(row=>row.style.height);rows2.forEach(row=>{row.style.height=""});const next=Math.max(estimate,...rows2.map(row=>row.getBoundingClientRect().height));rows2.forEach((row,i)=>{row.style.height=old[i]});setMeasuredRowHeight(previous=>Math.abs(previous-next)>.01?next:previous)};measure();const resize=typeof ResizeObserver==="undefined"?null:new ResizeObserver(measure);resize?.observe(host);rows2.forEach(row=>resize?.observe(row));const ancestors=new MutationObserver(measure);for(let node=host;node;node=node.parentElement){ancestors.observe(node,{attributes:true,attributeFilter:["class","style","lang","data-cs-density","data-cs-element","data-cs-variant"]})}const coarse=window.matchMedia("(pointer: coarse)");coarse.addEventListener("change",measure);document.fonts?.addEventListener("loadingdone",measure);return()=>{resize?.disconnect();ancestors.disconnect();coarse.removeEventListener("change",measure);document.fonts?.removeEventListener("loadingdone",measure)}},[useVirtual,slice,estimate,ref]);const allSel=selectable&&filtered.length&&filtered.every(r=>selected.includes(r[rowKey]));const toggleAll=()=>onSelect&&onSelect(allSel?[]:filtered.map(r=>r[rowKey]));const toggle=k=>onSelect&&onSelect(selected.includes(k)?selected.filter(x=>x!==k):[...selected,k]);const pinColumn=key=>{if(!persistKey)return;const keys=orderedColumns.map(c=>c.key);const next=[key,...keys.filter(k=>k!==key)];setColOrder(next);try{localStorage.setItem("cs:datagrid:cols:"+persistKey,JSON.stringify(next))}catch(e){}};return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-datagrid",useVirtual&&"cs-datagrid--virtual",className),onScroll:useVirtual?e=>setScrollTop(e.currentTarget.scrollTop):void 0},rootProps,["data-virtual","data-row-count","data-row-height"]),style:{...rootProps?.style,maxBlockSize:height,overflow:"auto"},"data-virtual":useVirtual?"true":"false","data-row-count":sorted.length,"data-row-height":useVirtual?effectiveRowHeight:void 0},React.createElement("table",{className:"cs-table","aria-rowcount":useVirtual?Math.max(2,sorted.length+1):void 0},caption||caption===0?React.createElement("caption",null,caption):null,React.createElement("thead",null,React.createElement("tr",{"aria-rowindex":useVirtual?1:void 0},selectable?React.createElement("th",{scope:"col",className:"cs-datagrid__selcol"},React.createElement("label",{className:"cs-datagrid__check"},React.createElement("input",{type:"checkbox","aria-label":t("selectAll"),checked:!!allSel,onChange:toggleAll}))):null,orderedColumns.map((c,columnIndex)=>React.createElement("th",{key:c.key,scope:"col",className:c.pinned?"cs-datagrid__pinned":void 0,style:c.pinned?{position:"sticky",insetInlineStart:0,zIndex:1,background:"var(--cs-color-surface-panel)"}:void 0,"aria-sort":sort&&sort.key===c.key?sort.dir==="asc"?"ascending":"descending":void 0},c.sortable?React.createElement("button",{type:"button",className:"cs-datagrid__sort",onClick:()=>setSort(s=>!s||s.key!==c.key?{key:c.key,dir:"asc"}:s.dir==="asc"?{key:c.key,dir:"desc"}:null)},React.createElement("span",{id:nameId+"-header-"+columnIndex},c.header),React.createElement("span",{"aria-hidden":"true"},sort&&sort.key===c.key?sort.dir==="asc"?" ▲":" ▼":" ↕")):React.createElement("span",{id:nameId+"-header-"+columnIndex},c.header),persistKey?React.createElement("button",{type:"button",className:"cs-datagrid__pin",title:t("pin"),onClick:()=>pinColumn(c.key),"aria-label":c.header==null?t("pinNamed").replace("{name}",c.key):void 0,"aria-labelledby":c.header==null?void 0:nameId+"-pin-start-"+columnIndex+" "+nameId+"-header-"+columnIndex+" "+nameId+"-pin-end-"+columnIndex},React.createElement("span",{className:"cs-sr-only",id:nameId+"-pin-start-"+columnIndex},t("pinNamed").split("{name}")[0]),React.createElement(Icon,{name:"pin",size:"sm"}),React.createElement("span",{className:"cs-sr-only",id:nameId+"-pin-end-"+columnIndex},t("pinNamed").split("{name}")[1])):null)))),React.createElement("tbody",null,sorted.length===0?React.createElement("tr",{"aria-rowindex":useVirtual?2:void 0},React.createElement("td",{colSpan:orderedColumns.length+(selectable?1:0),className:"cs-table__empty"},empty!=null?empty:t("empty"))):React.createElement(React.Fragment,null,padTop>0?React.createElement("tr",{"aria-hidden":"true"},React.createElement("td",{colSpan:orderedColumns.length+(selectable?1:0),style:{height:padTop,padding:0,border:0}})):null,slice.map((r,i)=>{const k=r[rowKey]!=null?r[rowKey]:start+i;return React.createElement("tr",{key:k,"aria-rowindex":useVirtual?start+i+2:void 0,"aria-selected":selectable?selected.includes(k):void 0,className:selected.includes(k)?"is-selected":void 0,style:useVirtual?{height:effectiveRowHeight}:void 0},selectable?React.createElement("td",{className:"cs-datagrid__selcol"},React.createElement("label",{className:"cs-datagrid__check"},React.createElement("input",{type:"checkbox","aria-label":`${t("selectRow")}: ${String(orderedColumns.map(c=>r[c.key]).find(v=>typeof v==="string"&&v.trim())??k)}`,checked:selected.includes(k),onChange:()=>toggle(k)}))):null,orderedColumns.map(c=>React.createElement("td",{key:c.key,className:c.pinned?"cs-datagrid__pinned":void 0,style:c.pinned?{position:"sticky",insetInlineStart:0,background:"var(--cs-color-surface-panel)"}:void 0},c.render?c.render(r):r[c.key])))}),padBottom>0?React.createElement("tr",{"aria-hidden":"true"},React.createElement("td",{colSpan:orderedColumns.length+(selectable?1:0),style:{height:padBottom,padding:0,border:0}})):null))))});DataGrid.displayName="DataGrid";Object.assign(__ds_scope,{DataGrid})})()}catch(e){__ds_ns.__errors.push({path:"components/datatable/DataGrid.jsx",error:String(e&&e.message||e)})}try{(()=>{const CS_LOGO_VIEWBOX="0 0 1007 1007";const CS_LOGO_MARK_INNER='<path fill="#45210E" opacity="1.000000" stroke="none" \n d="\nM560.000000,1008.000000 \n C373.333344,1008.000000 187.166672,1008.000000 1.000000,1008.000000 \n C1.000000,672.333313 1.000000,336.666656 1.000000,1.000000 \n C336.666656,1.000000 672.333313,1.000000 1008.000000,1.000000 \n C1008.000000,336.666656 1008.000000,672.333313 1008.000000,1008.000000 \n C858.833313,1008.000000 709.666687,1008.000000 560.000000,1008.000000 \nM440.743774,105.242386 \n C438.572540,107.309639 436.344940,109.321198 434.238464,111.452431 \n C396.510132,149.623566 372.276398,194.939011 363.356293,247.940109 \n C360.996429,261.961884 358.946777,276.673065 360.603027,290.610352 \n C365.030243,327.864777 394.910004,357.905762 431.834900,364.830811 \n C436.723083,365.747589 441.737213,365.993011 447.763702,366.669525 \n C446.254150,363.858124 445.507843,362.409912 444.709564,360.990906 \n C439.517578,351.761383 436.885193,341.740936 437.455444,331.277863 \n C439.589569,292.120056 458.815063,264.154144 494.094208,247.402267 \n C503.544983,242.914673 513.742554,238.863556 524.373901,240.455948 \n C548.543213,244.076111 568.703491,255.555466 584.000793,274.713074 \n C599.847656,294.559021 607.550598,317.209198 603.764282,342.677429 \n C602.575073,350.677063 598.728027,358.281586 595.936157,366.544159 \n C600.137085,366.074554 604.740540,365.758667 609.275574,365.021576 \n C646.763123,358.928711 678.394348,326.946808 681.791199,289.350922 \n C683.086792,275.012085 681.404419,259.972870 678.550415,245.760666 \n C660.577881,156.262833 608.759338,93.666801 525.888672,56.228947 \n C522.563171,54.726585 519.736023,54.769550 516.419739,56.200459 \n C488.640594,68.186523 463.511292,84.231010 440.743774,105.242386 \nM286.676636,492.678345 \n C287.329773,493.793732 287.835724,495.033447 288.657562,496.006378 \n C309.770172,521.000305 334.755707,541.223022 364.045837,555.811401 \n C374.407410,560.972046 385.114655,566.593323 396.291962,568.749573 \n C432.863312,575.804749 469.791931,575.543579 506.608704,569.950623 \n C542.882812,564.440125 577.636902,553.955383 610.255371,536.938660 \n C635.979919,523.518494 665.744080,527.108459 687.312561,546.611755 \n C690.823608,549.786621 693.878845,553.465637 697.214539,556.985291 \n C719.173889,537.685486 738.051208,516.184204 753.920410,491.916840 \n C752.879761,490.957520 752.286987,490.387451 751.669678,489.845367 \n C716.653381,459.096100 676.901917,436.766174 632.377991,423.023193 \n C629.713745,422.200836 626.423889,422.161865 623.725525,422.882690 \n C590.944153,431.639587 558.238403,440.679779 525.448730,449.404907 \n C522.300964,450.242554 518.534851,450.164001 515.372437,449.321808 \n C482.598022,440.593750 449.897797,431.587128 417.141144,422.791412 \n C414.867096,422.180786 412.115295,422.006958 409.909119,422.683990 \n C363.870605,436.812317 322.877258,459.923096 286.676636,492.678345 \nM638.193726,649.759216 \n C618.869507,656.015442 599.040955,658.948853 578.743958,658.635498 \n C561.320618,658.366577 544.380371,654.932678 527.565796,650.671387 \n C525.521851,650.153320 523.254150,649.859985 521.196533,650.169861 \n C512.810059,651.432678 504.514069,653.468018 496.093933,654.298462 \n C480.882416,655.798584 465.515686,658.255371 450.375763,657.410278 \n C421.185272,655.780762 394.125427,646.062805 369.145020,630.771667 \n C368.008179,630.075806 366.770874,629.544006 364.879761,628.577820 \n C379.822174,677.662048 402.386169,721.588440 433.601837,761.123535 \n C468.862305,805.781311 475.313782,854.488708 452.707825,906.779114 \n C449.580719,914.012512 445.212494,920.709351 441.423889,927.657288 \n C573.221985,890.897766 675.186523,765.328125 681.092896,630.672180 \n C667.338623,636.799011 653.131897,643.127319 638.193726,649.759216 \nM451.496307,582.220520 \n C442.351196,581.799133 433.142700,581.909058 424.076202,580.828186 \n C411.400055,579.317017 398.218109,578.681030 386.332123,574.558289 \n C354.337128,563.460327 326.346069,545.236816 301.709656,521.949341 \n C300.020294,520.352478 298.291534,518.797302 295.873596,516.571472 \n C296.025665,518.456909 295.980042,519.134644 296.144836,519.756653 \n C304.310333,550.579102 319.447479,577.592346 342.608459,599.413086 \n C382.985504,637.453735 430.264038,654.771729 486.434967,647.405457 \n C555.692078,638.323059 618.847046,614.520935 675.700134,573.984924 \n C680.675537,570.437500 685.476868,566.646118 690.581665,562.800293 \n C677.023743,544.661377 659.575134,536.325806 637.562927,537.450195 \n C626.043884,538.038574 616.340271,543.514893 606.234131,548.288513 \n C557.596436,571.262329 506.255249,582.294250 451.496307,582.220520 \nM539.676270,436.107300 \n C577.955139,425.690460 616.233948,415.273621 655.757202,404.518158 \n C635.089294,395.015900 615.544373,386.029968 595.877441,376.987946 \n C594.662292,379.021637 593.749573,380.591156 592.797180,382.136292 \n C586.595276,392.197998 578.925293,400.845184 568.666138,406.952454 \n C534.791809,427.117798 492.288269,422.383606 462.337891,394.876129 \n C456.381653,389.405701 451.112213,383.187500 445.401093,377.182709 \n C426.206024,386.105682 406.958923,395.052887 386.824615,404.412476 \n C389.268799,405.156464 390.645874,405.614380 392.043884,405.995544 \n C429.426819,416.187622 466.920624,425.996552 504.132446,436.778748 \n C515.781982,440.154175 526.683472,441.361206 537.944458,436.636871 \n C538.251221,436.508148 538.570312,436.408813 539.676270,436.107300 \nM636.169495,641.720032 \n C693.203857,621.317932 729.752136,581.965942 745.785767,523.547119 \n C689.811462,583.441650 622.343140,624.064514 542.504456,645.372620 \n C570.121521,652.872437 603.639343,651.544189 636.169495,641.720032 \nz"/>\n<path fill="#F4BA17" opacity="1.000000" stroke="none" \n d="\nM441.015747,105.015450 \n C463.511292,84.231010 488.640594,68.186523 516.419739,56.200459 \n C519.736023,54.769550 522.563171,54.726585 525.888672,56.228947 \n C608.759338,93.666801 660.577881,156.262833 678.550415,245.760666 \n C681.404419,259.972870 683.086792,275.012085 681.791199,289.350922 \n C678.394348,326.946808 646.763123,358.928711 609.275574,365.021576 \n C604.740540,365.758667 600.137085,366.074554 595.936157,366.544159 \n C598.728027,358.281586 602.575073,350.677063 603.764282,342.677429 \n C607.550598,317.209198 599.847656,294.559021 584.000793,274.713074 \n C568.703491,255.555466 548.543213,244.076111 524.373901,240.455948 \n C513.742554,238.863556 503.544983,242.914673 494.094208,247.402267 \n C458.815063,264.154144 439.589569,292.120056 437.455444,331.277863 \n C436.885193,341.740936 439.517578,351.761383 444.709564,360.990906 \n C445.507843,362.409912 446.254150,363.858124 447.763702,366.669525 \n C441.737213,365.993011 436.723083,365.747589 431.834900,364.830811 \n C394.910004,357.905762 365.030243,327.864777 360.603027,290.610352 \n C358.946777,276.673065 360.996429,261.961884 363.356293,247.940109 \n C372.276398,194.939011 396.510132,149.623566 434.238464,111.452431 \n C436.344940,109.321198 438.572540,107.309639 441.015747,105.015450 \nM523.796143,200.964203 \n C522.979370,200.806061 522.153381,200.684708 521.347168,200.484161 \n C511.964752,198.150375 505.739960,190.440384 506.015442,181.511810 \n C506.292053,172.544968 512.964478,165.113678 522.410034,163.391052 \n C528.999146,162.189362 534.425354,164.852509 539.153198,168.766846 \n C541.656067,166.404358 544.030029,164.163544 546.391113,161.934906 \n C535.207764,149.868927 515.326111,149.927109 503.764648,161.836975 \n C492.335419,173.610657 493.100830,193.056198 505.417236,203.820190 \n C517.457336,214.342712 537.192993,213.508774 546.093628,202.189407 \n C543.863281,199.842941 541.645081,197.509277 539.426880,195.175613 \n C539.477722,195.664429 539.528503,196.153259 539.579346,196.642075 \n C534.598694,198.089890 529.617981,199.537689 523.796143,200.964203 \nz"/>\n<path fill="#F4BA17" opacity="1.000000" stroke="none" \n d="\nM286.857971,492.402985 \n C322.877258,459.923096 363.870605,436.812317 409.909119,422.683990 \n C412.115295,422.006958 414.867096,422.180786 417.141144,422.791412 \n C449.897797,431.587128 482.598022,440.593750 515.372437,449.321808 \n C518.534851,450.164001 522.300964,450.242554 525.448730,449.404907 \n C558.238403,440.679779 590.944153,431.639587 623.725525,422.882690 \n C626.423889,422.161865 629.713745,422.200836 632.377991,423.023193 \n C676.901917,436.766174 716.653381,459.096100 751.669678,489.845367 \n C752.286987,490.387451 752.879761,490.957520 753.920410,491.916840 \n C738.051208,516.184204 719.173889,537.685486 697.214539,556.985291 \n C693.878845,553.465637 690.823608,549.786621 687.312561,546.611755 \n C665.744080,527.108459 635.979919,523.518494 610.255371,536.938660 \n C577.636902,553.955383 542.882812,564.440125 506.608704,569.950623 \n C469.791931,575.543579 432.863312,575.804749 396.291962,568.749573 \n C385.114655,566.593323 374.407410,560.972046 364.045837,555.811401 \n C334.755707,541.223022 309.770172,521.000305 288.657562,496.006378 \n C287.835724,495.033447 287.329773,493.793732 286.857971,492.402985 \nz"/>\n<path fill="#F4BA17" opacity="1.000000" stroke="none" \n d="\nM638.559448,649.607422 \n C653.131897,643.127319 667.338623,636.799011 681.092896,630.672180 \n C675.186523,765.328125 573.221985,890.897766 441.421356,927.655945 \n C445.212494,920.709351 449.580719,914.012512 452.707825,906.779114 \n C475.313782,854.488708 468.862305,805.781311 433.601837,761.123535 \n C402.386169,721.588440 379.822174,677.662048 364.879761,628.577820 \n C366.770874,629.544006 368.008179,630.075806 369.145020,630.771667 \n C394.125427,646.062805 421.185272,655.780762 450.375763,657.410278 \n C465.515686,658.255371 480.882416,655.798584 496.093933,654.298462 \n C504.514069,653.468018 512.810059,651.432678 521.196533,650.169861 \n C523.254150,649.859985 525.521851,650.153320 527.565796,650.671387 \n C544.380371,654.932678 561.320618,658.366577 578.743958,658.635498 \n C599.040955,658.948853 618.869507,656.015442 638.559448,649.607422 \nz"/>\n<path fill="#F3B917" opacity="1.000000" stroke="none" \n d="\nM451.996887,582.225220 \n C506.255249,582.294250 557.596436,571.262329 606.234131,548.288513 \n C616.340271,543.514893 626.043884,538.038574 637.562927,537.450195 \n C659.575134,536.325806 677.023743,544.661377 690.581665,562.800293 \n C685.476868,566.646118 680.675537,570.437500 675.700134,573.984924 \n C618.847046,614.520935 555.692078,638.323059 486.434967,647.405457 \n C430.264038,654.771729 382.985504,637.453735 342.608459,599.413086 \n C319.447479,577.592346 304.310333,550.579102 296.144836,519.756653 \n C295.980042,519.134644 296.025665,518.456909 295.873596,516.571472 \n C298.291534,518.797302 300.020294,520.352478 301.709656,521.949341 \n C326.346069,545.236816 354.337128,563.460327 386.332123,574.558289 \n C398.218109,578.681030 411.400055,579.317017 424.076202,580.828186 \n C433.142700,581.909058 442.351196,581.799133 451.996887,582.225220 \nz"/>\n<path fill="#F2B817" opacity="1.000000" stroke="none" \n d="\nM539.279968,436.201538 \n C538.570312,436.408813 538.251221,436.508148 537.944458,436.636871 \n C526.683472,441.361206 515.781982,440.154175 504.132446,436.778748 \n C466.920624,425.996552 429.426819,416.187622 392.043884,405.995544 \n C390.645874,405.614380 389.268799,405.156464 386.824615,404.412476 \n C406.958923,395.052887 426.206024,386.105682 445.401093,377.182709 \n C451.112213,383.187500 456.381653,389.405701 462.337891,394.876129 \n C492.288269,422.383606 534.791809,427.117798 568.666138,406.952454 \n C578.925293,400.845184 586.595276,392.197998 592.797180,382.136292 \n C593.749573,380.591156 594.662292,379.021637 595.877441,376.987946 \n C615.544373,386.029968 635.089294,395.015900 655.757202,404.518158 \n C616.233948,415.273621 577.955139,425.690460 539.279968,436.201538 \nz"/>\n<path fill="#F2B817" opacity="1.000000" stroke="none" \n d="\nM635.789856,641.836487 \n C603.639343,651.544189 570.121521,652.872437 542.504456,645.372620 \n C622.343140,624.064514 689.811462,583.441650 745.785767,523.547119 \n C729.752136,581.965942 693.203857,621.317932 635.789856,641.836487 \nz"/>\n<path fill="#48240F" opacity="1.000000" stroke="none" \n d="\nM524.216736,200.974854 \n C529.617981,199.537689 534.598694,198.089890 539.579346,196.642075 \n C539.528503,196.153259 539.477722,195.664429 539.426880,195.175613 \n C541.645081,197.509277 543.863281,199.842941 546.093628,202.189407 \n C537.192993,213.508774 517.457336,214.342712 505.417236,203.820190 \n C493.100830,193.056198 492.335419,173.610657 503.764648,161.836975 \n C515.326111,149.927109 535.207764,149.868927 546.391113,161.934906 \n C544.030029,164.163544 541.656067,166.404358 539.153198,168.766846 \n C534.425354,164.852509 528.999146,162.189362 522.410034,163.391052 \n C512.964478,165.113678 506.292053,172.544968 506.015442,181.511810 \n C505.739960,190.440384 511.964752,198.150375 521.347168,200.484161 \n C522.153381,200.684708 522.979370,200.806061 524.216736,200.974854 \nz"/>';Object.assign(__ds_scope,{CS_LOGO_VIEWBOX,CS_LOGO_MARK_INNER,__ds_default_components_logo_logo_data_4vwi3g:CS_LOGO_MARK_INNER})})()}catch(e){__ds_ns.__errors.push({path:"components/logo/logo-data.js",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{CS_LOGO_VIEWBOX,CS_LOGO_MARK_INNER}=__ds_scope;const{cx}=__ds_scope;const Logo=React.forwardRef(function Logo2({size=32,title="CyberSkill",decorative=false,className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const safeTitle=String(title).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return React.createElement("svg",{...props,className:cx("cs-logo",className),width:size,height:size,viewBox:CS_LOGO_VIEWBOX,xmlns:"http://www.w3.org/2000/svg",role:decorative?void 0:"img","aria-hidden":decorative?true:void 0,"aria-label":decorative?void 0:title,dangerouslySetInnerHTML:{__html:(decorative?"":`<title>${safeTitle}</title>`)+CS_LOGO_MARK_INNER},ref:mergedNativeRef})});Logo.displayName="Logo";Object.assign(__ds_scope,{Logo})})()}catch(e){__ds_ns.__errors.push({path:"components/logo/Logo.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Anchor=React.forwardRef(function Anchor2({items=[],title,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const titleId=React.useId();const hasTitle=Boolean(title)||title===0;const[act,setAct]=React.useState(items.length?items[0].id:null);React.useEffect(()=>{const els=items.map(it=>document.getElementById(it.id)).filter(Boolean);if(!els.length)return;const visible=new Set;const io=new IntersectionObserver(es=>{for(const entry of es){if(entry.isIntersecting)visible.add(entry.target);else visible.delete(entry.target)}const vis=[...visible].filter(el=>el.isConnected).sort((a,b)=>a.getBoundingClientRect().top-b.getBoundingClientRect().top);if(vis[0])setAct(vis[0].id)},{rootMargin:"-20% 0px -70% 0px"});els.forEach(el=>io.observe(el));return()=>io.disconnect()},[items]);return React.createElement("nav",{className:cx("cs-anchor",className),"aria-labelledby":hasTitle?titleId:void 0,...props,ref:mergedNativeRef},hasTitle?React.createElement("div",{id:titleId,className:"cs-anchor__title"},title):null,items.map(it=>React.createElement("a",{key:it.id,href:"#"+it.id,className:cx("cs-anchor__item",act===it.id&&"is-active"),"aria-current":act===it.id?"location":void 0},it.label)))});Anchor.displayName="Anchor";Object.assign(__ds_scope,{Anchor})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Anchor.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const BackTop=React.forwardRef(function BackTop2({threshold=320,label,lang,className,rootProps},forwardedRef){const[show,setShow]=React.useState(false);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const lbl=label!=null?label:makeT("BackTop",L,localeMessages)("label");React.useEffect(()=>{const on=()=>setShow(window.scrollY>threshold);on();window.addEventListener("scroll",on,{passive:true});return()=>window.removeEventListener("scroll",on)},[threshold]);if(!show)return React.createElement("span",{ref,style:{display:"none"}});return React.createElement("button",{ref:mergedNativeRef,type:"button",...mergeTargetProps({"className":cx("cs-backtop",className),"onClick":()=>window.scrollTo({top:0,behavior:window.matchMedia("(prefers-reduced-motion: reduce)").matches?"instant":"smooth"})},rootProps,["type","aria-label"]),"aria-label":lbl},React.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M12 19V5M5 12l7-7 7 7"})))});BackTop.displayName="BackTop";Object.assign(__ds_scope,{BackTop})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/BackTop.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Breadcrumb=React.forwardRef(function Breadcrumb2({items=[],lang,className,...props},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);return React.createElement("nav",{ref:mergedNativeRef,"aria-label":makeT("Breadcrumb",L,localeMessages)("label"),...props},React.createElement("ol",{className:cx("cs-breadcrumb",className)},items.map((it,i)=>{const last=i===items.length-1;return React.createElement("li",{key:i},last?React.createElement("span",{className:"cs-breadcrumb__current","aria-current":"page"},it.label):React.createElement(React.Fragment,null,React.createElement("a",{href:it.href||"#"},it.label),React.createElement("span",{className:"cs-breadcrumb__sep","aria-hidden":"true"},"/")))})))});Breadcrumb.displayName="Breadcrumb";Object.assign(__ds_scope,{Breadcrumb})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Breadcrumb.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{cx}=__ds_scope;const Dock=React.forwardRef(function Dock2({items=[],label,className,rootProps},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const[hov,setHov]=React.useState(null);return React.createElement("div",{...mergeTargetProps({"className":cx("cs-dock",className),"onMouseLeave":()=>setHov(null)},rootProps,["role","aria-label"]),role:"toolbar","aria-label":label,ref:mergedNativeRef},items.map((it,i)=>{const d=hov==null?3:Math.abs(i-hov);const scale=d===0?1.35:d===1?1.15:1;return React.createElement("button",{key:i,type:"button",className:cx("cs-dock__item",it.active&&"is-active"),"aria-label":it.label,title:it.label,style:{transform:`scale(${scale}) translateY(${d===0?-6:d===1?-2:0}px)`},onMouseEnter:()=>setHov(i),onFocus:()=>setHov(i),onBlur:()=>setHov(null),onClick:()=>it.onSelect&&it.onSelect()},it.icon)}))});Dock.displayName="Dock";Object.assign(__ds_scope,{Dock})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Dock.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Link=React.forwardRef(function Link2({href="#",variant="default",external=false,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("a",{href,className:cx("cs-link",variant!=="default"&&"cs-link--"+variant,className),target:external?"_blank":void 0,rel:external?"noopener noreferrer":void 0,...props,ref:mergedNativeRef},children,external?React.createElement("span",{"aria-hidden":"true"}," ↗"):variant==="standalone"?React.createElement("span",{"aria-hidden":"true"}," →"):null)});Link.displayName="Link";Object.assign(__ds_scope,{Link})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Link.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;function pages(page,count){if(count<=7)return Array.from({length:count},(_,i)=>i+1);const out=[1];const lo=Math.max(2,page-1),hi=Math.min(count-1,page+1);if(lo>2)out.push("…");for(let p=lo;p<=hi;p++)out.push(p);if(hi<count-1)out.push("…");out.push(count);return out}const Pagination=React.forwardRef(function Pagination2({page=1,pageCount=1,onChange,lang,className,...props},forwardedRef){const go=p=>onChange&&p>=1&&p<=pageCount&&p!==page&&onChange(p);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Pagination",L,localeMessages);return React.createElement("nav",{ref:mergedNativeRef,"aria-label":t("label"),className:cx("cs-pagination",className),...props},React.createElement("button",{type:"button",onClick:()=>go(page-1),disabled:page<=1,"aria-label":t("prev")},"‹"),pages(page,pageCount).map((p,i)=>p==="…"?React.createElement("span",{key:"e"+i,className:"cs-pagination__ellipsis","aria-hidden":"true"},"…"):React.createElement("button",{key:p,type:"button","aria-current":p===page?"page":void 0,onClick:()=>go(p)},p)),React.createElement("button",{type:"button",onClick:()=>go(page+1),disabled:page>=pageCount,"aria-label":t("next")},"›"))});Pagination.displayName="Pagination";Object.assign(__ds_scope,{Pagination})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Pagination.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const Sidebar=React.forwardRef(function Sidebar2({label,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const labelId=React.useId();const hasLabel=Boolean(label)||label===0;return React.createElement("nav",{className:cx("cs-sidebar",className),"aria-labelledby":hasLabel?labelId:void 0,...props,ref:mergedNativeRef},hasLabel?React.createElement("div",{id:labelId,className:"cs-sidebar__label"},label):null,children)});Sidebar.displayName="Sidebar";const NavItem=React.forwardRef(function NavItem2({icon,active=false,trail,href,onClick,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const Tag=href?"a":"button";return React.createElement(Tag,{type:Tag==="button"?"button":void 0,className:cx("cs-nav-item",active&&"is-active",className),href,"aria-current":active?"page":void 0,onClick,...props,ref:mergedNativeRef},icon||icon===0?React.createElement("span",{className:"cs-nav-item__icon"},icon):null,React.createElement("span",null,children),trail!=null?React.createElement("span",{className:"cs-nav-item__trail"},trail):null)});NavItem.displayName="NavItem";Object.assign(__ds_scope,{Sidebar,NavItem})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Sidebar.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Steps=React.forwardRef(function Steps2({steps=[],current=0,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Steps",L,localeMessages);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-steps",className)},rootProps,["role","aria-label"]),role:"list","aria-label":t("label")},steps.map((s,i)=>{const state=i<current?"done":i===current?"active":"todo";return React.createElement("div",{key:i,className:cx("cs-step",`cs-step--${state}`),role:"listitem","aria-current":state==="active"?"step":void 0},React.createElement("span",{className:"cs-step__marker"},state==="done"?"✓":s.n??i+1),React.createElement("span",{className:"cs-step__title"},s.title),s.body!=null?React.createElement("span",{className:"cs-step__body"},s.body):null)}))});Steps.displayName="Steps";Object.assign(__ds_scope,{Steps})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Steps.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Tabs=React.forwardRef(function Tabs2({tabs=[],value,onChange,lang,className,"aria-label":ariaLabel,...props},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("Tabs",L,localeMessages);const refs=React.useRef([]);const idx=Math.max(0,tabs.findIndex(tab=>tab.value===value));const vertical=props["aria-orientation"]==="vertical";const key=(e,i)=>{let n=null;if(e.key===(vertical?"ArrowDown":"ArrowRight"))n=(i+1)%tabs.length;else if(e.key===(vertical?"ArrowUp":"ArrowLeft"))n=(i-1+tabs.length)%tabs.length;else if(e.key==="Home")n=0;else if(e.key==="End")n=tabs.length-1;if(n==null)return;e.preventDefault();if(onChange)onChange(tabs[n].value);const b=refs.current[n];if(b)b.focus()};return React.createElement("div",{ref:mergedNativeRef,role:"tablist","aria-label":ariaLabel??t("list"),className:cx("cs-tabs",className),...props},tabs.map((t2,i)=>React.createElement("button",{key:t2.value,type:"button",role:"tab",id:t2.id,"aria-controls":t2["aria-controls"],"aria-selected":value===t2.value,tabIndex:i===idx?0:-1,ref:el=>refs.current[i]=el,onKeyDown:e=>key(e,i),className:"cs-tab",onClick:()=>onChange&&onChange(t2.value)},t2.label,t2.count!=null?React.createElement("span",{className:"cs-tab__count"},t2.count):null)))});Tabs.displayName="Tabs";const Tab=React.forwardRef(function Tab2({selected=false,count,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("button",{type:"button",role:"tab","aria-selected":selected,className:cx("cs-tab",className),...props,ref:mergedNativeRef},children,count!=null?React.createElement("span",{className:"cs-tab__count"},count):null)});Tab.displayName="Tab";Object.assign(__ds_scope,{Tabs,Tab})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Tabs.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useClientLayoutEffect}=__ds_scope;const focusableSelector=["a[href]","area[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","audio[controls]","video[controls]","summary","iframe",'[contenteditable]:not([contenteditable="false"])','[tabindex]:not([tabindex="-1"])'].join(",");function visibleFocusables(roots){return[...new Set(roots.flatMap(root=>[...root.matches?.(focusableSelector)?[root]:[],...root.querySelectorAll(focusableSelector)]))].filter(el=>el.tabIndex>=0&&!el.disabled&&!el.matches(":disabled")&&!el.closest('[inert], [hidden], [aria-hidden="true"]')&&el.getClientRects().length>0&&getComputedStyle(el).visibility!=="hidden")}function attachFocusTrap(panelEl,{handleEscape=false,onEscape,isActive=()=>true,scopeElements=()=>[panelEl],focusOrder}={}){if(!panelEl)return()=>{};const inside=el=>scopeElements().some(root=>root?.contains(el));const focusables=(backwards=false)=>focusOrder?focusOrder(backwards):visibleFocusables(scopeElements());const focusFirst=()=>(focusables()[0]||panelEl).focus();const onFocus=e=>{if(isActive()&&!inside(e.target))focusFirst()};const k=e=>{if(!isActive()||e.isComposing||e.keyCode===229)return;if(handleEscape&&e.key==="Escape"&&!e.isComposing&&e.keyCode!==229){e.preventDefault();onEscape&&onEscape();return}if(e.key!=="Tab")return;const f=focusables(e.shiftKey);if(!f.length){e.preventDefault();panelEl.focus();return}const active=document.activeElement;if(e.defaultPrevented)return;const index=f.indexOf(active);const next=index<0?e.shiftKey?f.length-1:0:(index+(e.shiftKey?-1:1)+f.length)%f.length;e.preventDefault();f[next].focus()};document.addEventListener("keydown",k);document.addEventListener("focusin",onFocus);return()=>{document.removeEventListener("keydown",k);document.removeEventListener("focusin",onFocus)}}function createOverlayManager(){const layers=[];let prevOverflow="";let prevOverflowPriority="";let locked=false;let escapeBound=false;const inertBefore=new Map;const ownedScopes=new Set;let observer=null;const isBelow=(a,b,visited=new Set)=>{if(!a.panelEl||!b.panelEl||a===b||visited.has(b))return false;if(a.panelEl.contains(b.panelEl))return true;visited.add(b);const parentEl=b.parentRef?.current||b.parentEl;if(parentEl&&a.panelEl.contains(parentEl))return true;const parent=layers.find(layer=>layer.panelEl===parentEl);return parent?isBelow(a,parent,visited):false};const resort=()=>{layers.sort((a,b)=>{if(isBelow(a,b))return-1;if(isBelow(b,a))return 1;return(a.seq||0)-(b.seq||0)})};const applyScroll=()=>{const need=layers.some(l=>l.kind==="modal"&&l.lockScroll!==false);if(need&&!locked){prevOverflow=document.body.style.overflow;prevOverflowPriority=document.body.style.getPropertyPriority("overflow");document.body.style.overflow="hidden";locked=true}else if(!need&&locked){document.body.style.setProperty("overflow",prevOverflow,prevOverflowPriority);locked=false}};const activeModal=()=>{resort();return[...layers].reverse().find(layer=>layer.kind==="modal"&&layer.panelEl?.isConnected)||null};const focusScope=()=>{const modal=activeModal();if(!modal)return[];const roots=[...new Set([...layers.slice(layers.indexOf(modal)),...layers.filter(layer=>layer.kind==="toast")].map(layer=>layer.panelEl).filter(el=>el?.isConnected))];let added=true;while(added){added=false;for(const scope of ownedScopes){if(scope.panelEl?.isConnected&&!roots.includes(scope.panelEl)&&roots.some(root=>root.contains(scope.parentEl))){roots.push(scope.panelEl);added=true}}}const belowScope=(ancestor,descendant,visited=new Set)=>{if(!ancestor||!descendant||ancestor===descendant||visited.has(descendant))return false;if(ancestor.contains(descendant))return true;visited.add(descendant);return[...ownedScopes].some(scope=>scope.panelEl===descendant&&(ancestor.contains(scope.parentEl)||belowScope(ancestor,scope.parentEl,new Set(visited))))};roots.sort((a,b)=>belowScope(a,b)?-1:belowScope(b,a)?1:0);return roots};const applyInert=()=>{const modal=activeModal();const blocked=new Set;if(modal){const allowed=[...focusScope(),modal.backdropEl].filter(el=>el?.isConnected);const walk=parent=>{for(const el of parent.children){if(allowed.includes(el))continue;if(allowed.some(root=>el.contains(root)))walk(el);else blocked.add(el)}};walk(document.body)}for(const[el,prior]of inertBefore){if(!blocked.has(el)){el.inert=prior;inertBefore.delete(el)}}for(const el of blocked){if(!inertBefore.has(el))inertBefore.set(el,el.inert);el.inert=true}if(modal&&!observer){observer=new MutationObserver(applyInert);observer.observe(document.body,{childList:true,subtree:true})}else if(!modal&&observer){observer.disconnect();observer=null}};const onDocEscape=e=>{if(e.key!=="Escape"||e.isComposing||e.keyCode===229)return;if(!layers.length)return;resort();const top=[...layers].reverse().find(layer=>layer.kind!=="toast");if(!top||typeof top.onEscape!=="function")return;e.preventDefault();e.stopPropagation();top.onEscape()};const ensureEscape=()=>{if(escapeBound)return;escapeBound=true;document.addEventListener("keydown",onDocEscape,true)};let seq=0;return{registerScope(scope){ownedScopes.add(scope);applyInert();return()=>{ownedScopes.delete(scope);applyInert()}},register(layer){ensureEscape();let id=layer.id;if(!id)do{id=`cs-ov-${++seq}`}while(layers.some(entry2=>entry2.id===id));const entry={...layer,id,seq:++seq};layers.push(entry);resort();applyScroll();applyInert();return()=>{resort();const i=layers.indexOf(entry);const wasTop=[...layers].reverse().find(layer2=>layer2.kind!=="toast")===entry;if(i>=0)layers.splice(i,1);applyScroll();applyInert();if(!layers.length&&escapeBound){document.removeEventListener("keydown",onDocEscape,true);escapeBound=false}const active=document.activeElement;const ownedFocus=active===document.body||active===entry.restoreEl||entry.panelEl?.contains(active);if(wasTop&&ownedFocus&&entry.restoreEl?.isConnected&&!entry.restoreEl.closest("[inert], [hidden]")&&typeof entry.restoreEl.focus==="function"){try{entry.restoreEl.focus()}catch{}}}},top(){resort();return layers[layers.length-1]||null},topDismissible(){resort();return[...layers].reverse().find(layer=>layer.kind!=="toast")||null},containsOwned(panelEl,target){if(!panelEl||!target)return false;const roots=[...new Set([panelEl,...layers.filter(layer=>isBelow({panelEl},layer)).map(layer=>layer.panelEl)].filter(Boolean))];let added=true;while(added){added=false;for(const scope of ownedScopes)if(scope.panelEl?.isConnected&&!roots.includes(scope.panelEl)&&roots.some(root=>root.contains(scope.parentEl))){roots.push(scope.panelEl);added=true}}return roots.some(root=>root.contains(target))},focusOrder({backwards=false,roots,logical=true}={}){const containerRoots=roots||(activeModal()?focusScope():[document.body]);let controls=visibleFocusables(containerRoots);for(const scope of logical?ownedScopes:[]){const anchor=scope.anchorEl;if(!anchor||!scope.panelEl?.isConnected)continue;const anchors=controls.filter(el=>el===anchor||anchor.contains(el));if(!anchors.length)continue;const moving=controls.filter(el=>!anchors.includes(el)&&this.containsOwned(scope.panelEl,el));if(!moving.length)continue;controls=controls.filter(el=>!moving.includes(el));const index=scope.tabOrder==="before"?controls.indexOf(anchors[0]):controls.indexOf(anchors[anchors.length-1])+1;controls.splice(index,0,...moving)}controls.sort((a,b)=>(a.tabIndex>0?a.tabIndex:Infinity)-(b.tabIndex>0?b.tabIndex:Infinity));return controls.filter(el=>{if(el.tagName!=="INPUT"||el.type!=="radio"||!el.name)return true;const group=controls.filter(other=>other.tagName==="INPUT"&&other.type==="radio"&&other.name===el.name&&other.form===el.form&&other.getRootNode()===el.getRootNode());return el===(group.find(radio=>radio.checked)||(backwards?group[group.length-1]:group[0]))})},activeModal,focusScope,get scrollLocked(){return locked},get depth(){return layers.length}}}const registryKey=Symbol.for("@cyberskill/design/overlay-manager");const registryProtocol="cyberskill.overlay-manager/1";const serverManager=createOverlayManager();const serverContexts={manager:React.createContext(null),scope:React.createContext(null)};function documentRegistry(){if(typeof document==="undefined")return null;const descriptor=Object.getOwnPropertyDescriptor(document,registryKey);if(descriptor){if(!("value"in descriptor))throw new Error("Incompatible CyberSkill overlay registry: accessor records are unsupported");const record2=descriptor.value;const value=name=>Object.getOwnPropertyDescriptor(record2||{},name)?.value;const manager=value("manager"),contexts2=value("contexts");const methods=["register","registerScope","top","topDismissible","activeModal","focusScope","containsOwned","focusOrder"];if(value("protocol")!==registryProtocol||!manager||methods.some(name=>typeof manager[name]!=="function")||!(contexts2 instanceof WeakMap)||typeof value("nextProviderId")!=="function"||!Number.isSafeInteger(manager.depth)||manager.depth<0||typeof manager.scrollLocked!=="boolean"){throw new Error("Incompatible CyberSkill overlay registry: expected "+registryProtocol+"; align compiled runtime copies before mounting overlays")}return record2}let providerSequence=0;const record=Object.freeze({protocol:registryProtocol,manager:createOverlayManager(),contexts:new WeakMap,nextProviderId:()=>{let id;do{id="cs-overlay-root-"+ ++providerSequence}while(document.getElementById(id));return id}});Object.defineProperty(document,registryKey,{value:record,configurable:false,writable:false});return record}function sharedContexts(){const registry=documentRegistry();if(!registry)return serverContexts;let contexts2=registry.contexts.get(React);if(!contexts2){contexts2={manager:React.createContext(null),scope:React.createContext(null)};registry.contexts.set(React,contexts2)}if(!contexts2.manager?.Provider||!contexts2.scope?.Provider)throw new Error("Incompatible CyberSkill overlay registry: invalid React ownership contexts");return contexts2}const contexts=sharedContexts();const OverlayContext=contexts.manager;const overlayScopeContext=contexts.scope;function getOverlayManager(){return documentRegistry()?.manager||serverManager}function OverlayProvider({children}){const marker=React.useRef(null);const api=getOverlayManager();useClientLayoutEffect(()=>{const element=marker.current;if(!element)return;const id=documentRegistry().nextProviderId();element.id=id;return()=>{if(element.id===id)element.removeAttribute("id")}},[]);return React.createElement(OverlayContext.Provider,{value:api},React.createElement("div",{ref:marker,"data-cs-overlay-root":""}),children)}function useOverlayLayer({open,kind="modal",trapFocus=false,lockScroll,onEscape,panelRef,backdropRef,preferFocusSelector,restoreFocus=true,surfaceKey}){const ctx=React.useContext(OverlayContext);const parentScope=React.useContext(overlayScopeContext);const mgr=ctx||getOverlayManager();const escapeRef=React.useRef(onEscape);escapeRef.current=onEscape;const scopeBinding=React.useRef(null);useClientLayoutEffect(()=>{const panelEl=panelRef?.current;const previous=scopeBinding.current;if(previous?.panelEl===panelEl&&previous?.parentScope===parentScope)return;previous?.cleanup();scopeBinding.current=panelEl&&parentScope?{panelEl,parentScope,cleanup:mgr.registerScope({panelEl,get parentEl(){return parentScope.current}})}:null});useClientLayoutEffect(()=>()=>{scopeBinding.current?.cleanup();scopeBinding.current=null},[]);useClientLayoutEffect(()=>{if(!open)return void 0;const restoreEl=typeof document!=="undefined"?document.activeElement:null;const panel=panelRef&&panelRef.current;const unregister=mgr.register({kind,lockScroll:lockScroll!=null?lockScroll:kind==="modal",onEscape:()=>escapeRef.current&&escapeRef.current(),restoreEl:restoreFocus?restoreEl:null,panelEl:panel||null,backdropEl:backdropRef?.current||null,parentRef:parentScope});let detachTrap=()=>{};const ownsModalFocus=mgr.activeModal()?.panelEl===panel;if(trapFocus&&panel&&ownsModalFocus&&!mgr.focusScope().some(root=>root.contains(document.activeElement))){const preferred=preferFocusSelector&&panel.querySelector(preferFocusSelector)||visibleFocusables([panel])[0]||panel;preferred&&preferred.focus&&preferred.focus()}if(trapFocus&&panel){detachTrap=attachFocusTrap(panel,{isActive:()=>mgr.activeModal()?.panelEl===panel,scopeElements:()=>mgr.focusScope(),focusOrder:backwards=>mgr.focusOrder({backwards})})}return()=>{detachTrap();unregister()}},[open,kind,trapFocus,lockScroll,mgr,panelRef,backdropRef,parentScope,preferFocusSelector,restoreFocus,surfaceKey]);return{manager:mgr,scope:open&&panelRef?panelRef:parentScope}}Object.assign(__ds_scope,{focusableSelector,attachFocusTrap,overlayScopeContext,getOverlayManager,OverlayProvider,useOverlayLayer})})()}catch(e){__ds_ns.__errors.push({path:"components/overlays/OverlayManager.jsx",error:String(e&&e.message||e)})}try{(()=>{const{floatingPlacements,floatingPosition}=__ds_scope;const createPortal=(...args)=>{if(typeof ReactDOM==="undefined"||typeof ReactDOM.createPortal!=="function")throw new Error("ReactDOM.createPortal peer is required to render a portal");return ReactDOM.createPortal(...args)};const{getOverlayManager,overlayScopeContext}=__ds_scope;const{useClientLayoutEffect}=__ds_scope;const placements=new Set(floatingPlacements);const axes=["lang","dir","data-theme","data-cs-density","data-cs-contrast","data-cs-element","data-cs-variant","data-cs-style","data-managed"];const inherited=["font-family","font-size","font-style","font-weight","line-height","letter-spacing","color","direction","writing-mode","text-align","visibility","pointer-events","user-select"];const geometry=["position","inset","left","top","right","bottom","z-index","max-width","min-width","max-height","min-height","box-sizing","overflow-y","transform","transition-property","margin","width"];function scopeHost(host,anchor,boundary,open,lang){if(!anchor||!host)return;const computed=getComputedStyle(anchor);host.removeAttribute("class");for(const name of axes){const value=name==="lang"&&lang!=null&&String(lang).trim()||anchor.closest("["+name+"]")?.getAttribute(name);if(value!=null)host.setAttribute(name,value);else host.removeAttribute(name)}host.setAttribute("data-open",String(Boolean(open)));const hidden=!anchor.getClientRects().length;host.style.display=hidden?"none":"contents";host.inert=Boolean(anchor.closest("[inert]"));if(hidden||host.inert||anchor.closest('[aria-hidden="true"]'))host.setAttribute("aria-hidden","true");else host.removeAttribute("aria-hidden");for(const name of inherited)host.style.setProperty(name,computed.getPropertyValue(name));const current=new Set;for(let index=0;index<computed.length;index++){const name=computed[index];if(name.startsWith("--")){current.add(name);host.style.setProperty(name,computed.getPropertyValue(name))}}for(let index=host.style.length-1;index>=0;index--){const name=host.style[index];if(name.startsWith("--")&&!current.has(name))host.style.removeProperty(name)}}function useFloatingPanel({open,anchorRef,boundaryRef=anchorRef,panelRef,portal=true,placement="bottom-start",gap=8,matchWidth=false,scroll=true,point,lang,identity,getAnchor,getInlineParent,getTabAnchor,tabOrder="after",manageTabOrder=true}){if(!placements.has(placement))throw new TypeError("Unsupported floating placement: "+placement);const parentScope=React.useContext(overlayScopeContext);const boundaryBinding=React.useRef(null);const panelBinding=React.useRef(null);useClientLayoutEffect(()=>{const panelEl=boundaryRef.current;const previous=boundaryBinding.current;if(previous?.panelEl===panelEl&&previous?.parentScope===parentScope)return;previous?.cleanup();boundaryBinding.current=panelEl&&parentScope?{panelEl,parentScope,cleanup:getOverlayManager().registerScope({panelEl,get parentEl(){return parentScope.current}})}:null});useClientLayoutEffect(()=>()=>{boundaryBinding.current?.cleanup();boundaryBinding.current=null},[]);useClientLayoutEffect(()=>{const panelEl=panelRef.current;const boundaryEl=boundaryRef.current;const previous=panelBinding.current;if(previous?.panelEl===panelEl&&previous?.boundaryEl===boundaryEl)return;previous?.cleanup();panelBinding.current=panelEl&&boundaryEl?{panelEl,boundaryEl,cleanup:getOverlayManager().registerScope({panelEl,get parentEl(){return boundaryRef.current},get anchorEl(){return options.current.getTabAnchor?.()||anchorElement()},get tabOrder(){return options.current.tabOrder}})}:null});useClientLayoutEffect(()=>()=>{panelBinding.current?.cleanup();panelBinding.current=null},[]);const[host,setHost]=React.useState(null);const[nativeInline,setNativeInline]=React.useState(false);const lastFocused=React.useRef(null);const activeHost=portal?host:null;const options=React.useRef(null);const schedulePosition=React.useRef(()=>{});options.current={open,anchorRef,boundaryRef,panelRef,placement,gap,matchWidth,point,lang,getAnchor,getInlineParent,getTabAnchor,tabOrder};const anchorElement=()=>{const candidate=options.current.getAnchor?.()||options.current.anchorRef.current;return host?.contains(candidate)?options.current.anchorRef.current:candidate};const inlineParentElement=()=>options.current.getInlineParent?.()||options.current.boundaryRef.current;const placeHost=(element,sourceMoved=false)=>{const parent=inlineParentElement();const local=Boolean(parent?.closest("form,fieldset"));const target=local?parent:document.body;const anchor=options.current.getTabAnchor?.()||anchorElement();const before=local&&options.current.tabOrder==="before"&&anchor?.parentElement===target?anchor:null;if(element.parentElement!==target||before&&element.nextSibling!==before){const focused=element.contains(document.activeElement)?document.activeElement:sourceMoved&&document.activeElement===document.body&&element.contains(lastFocused.current)?lastFocused.current:null;const selection=focused&&typeof focused.selectionStart==="number"?[focused.selectionStart,focused.selectionEnd,focused.selectionDirection]:null;if(element.isConnected&&typeof target.moveBefore==="function")target.moveBefore(element,before);else target.insertBefore(element,before);if(focused?.isConnected&&document.activeElement!==focused&&!focused.matches(":disabled")&&!focused.closest("[inert]")){focused.focus({preventScroll:true});if(selection)focused.setSelectionRange(...selection)}}if(local){element.setAttribute("data-cs-floating-inline","");element.removeAttribute("style");element.style.display="contents";for(const axis of axes)element.removeAttribute(axis);element.removeAttribute("aria-hidden");element.inert=false;element.setAttribute("data-open",String(Boolean(options.current.open)));if(options.current.lang!=null)element.lang=String(options.current.lang)}else{element.removeAttribute("data-cs-floating-inline");scopeHost(element,anchorElement(),boundaryRef.current,options.current.open,options.current.lang)}setNativeInline(previous=>previous===local?previous:local)};useClientLayoutEffect(()=>{if(!portal){setHost(null);setNativeInline(false);return}const element=document.createElement("span");element.setAttribute("data-cs-floating-root","");element.style.display="contents";let focusTimer;const onFocusOut=event=>{if(event.relatedTarget!=null){lastFocused.current=null;return}clearTimeout(focusTimer);focusTimer=setTimeout(()=>{lastFocused.current=null},0)};const onFocusIn=event=>{clearTimeout(focusTimer);lastFocused.current=event.target};element.addEventListener("focusout",onFocusOut);element.addEventListener("focusin",onFocusIn);placeHost(element);setHost(element);return()=>{clearTimeout(focusTimer);lastFocused.current=null;element.removeEventListener("focusout",onFocusOut);element.removeEventListener("focusin",onFocusIn);element.remove()}},[portal]);const ready=!portal||Boolean(host?.isConnected);useClientLayoutEffect(()=>{const anchor=anchorElement();if(!ready||!anchor)return;const observeAncestors=()=>{observer.disconnect();const nodes=new Set;for(const start of[anchorElement(),inlineParentElement()])for(let node=start;node;node=node.parentElement)nodes.add(node);for(const node of nodes)observer.observe(node,{attributes:true,childList:Boolean(activeHost),attributeFilter:[...axes,"class","style","hidden","inert","aria-hidden"]})};const updateScope=records=>{const parent=inlineParentElement();const sourceMoved=Array.isArray(records)&&records.some(record=>record.type==="childList"&&[...record.removedNodes].some(node=>node===parent||node.contains?.(parent)));if(activeHost)placeHost(activeHost,sourceMoved);observeAncestors();schedulePosition.current()};const observer=new MutationObserver(updateScope);updateScope();const media=["(prefers-color-scheme: dark)","(forced-colors: active)","(prefers-contrast: more)","(prefers-reduced-motion: reduce)","(pointer: coarse)"].map(query=>matchMedia(query));for(const query of media)query.addEventListener("change",updateScope);return()=>{observer.disconnect();for(const query of media)query.removeEventListener("change",updateScope)}},[ready,activeHost,boundaryRef,anchorRef,open,lang,identity]);useClientLayoutEffect(()=>{const panel=panelRef.current;const anchor=anchorElement();if(!open||!ready||!panel||!anchor)return;const before=new Map(geometry.map(name=>[name,[panel.style.getPropertyValue(name),panel.style.getPropertyPriority(name)]]));let owned=null;const readGeometry=()=>new Map(geometry.map(name=>[name,[panel.style.getPropertyValue(name),panel.style.getPropertyPriority(name)]]));const captureCallerStyles=()=>{if(!owned)return false;let changed=false;for(const[name,value]of readGeometry()){const last=owned.get(name);if(value[0]!==last[0]||value[1]!==last[1]){before.set(name,value);changed=true}}return changed};const priorPlacement=panel.getAttribute("data-cs-placement");let frame=null;let positionedScroll=null;const position=()=>{frame=null;const anchor2=anchorElement();if(!panel.isConnected||!anchor2?.isConnected)return;captureCallerStyles();const scrollLeft=panel.scrollLeft,scrollTop=panel.scrollTop;const view=window.visualViewport;const viewport={left:(view?.offsetLeft||0)+8,top:(view?.offsetTop||0)+8,right:(view?.offsetLeft||0)+(view?.width||document.documentElement.clientWidth)-8,bottom:(view?.offsetTop||0)+(view?.height||window.innerHeight)-8};for(const name of["min-width","max-width","min-height","max-height","width"]){const[value,priority]=before.get(name);if(value)panel.style.setProperty(name,value,priority);else panel.style.removeProperty(name)}const rect=anchor2.getBoundingClientRect();const naturalStyle=getComputedStyle(panel);const minWidth=naturalStyle.minWidth.endsWith("%")?rect.width*parseFloat(naturalStyle.minWidth)/100:parseFloat(naturalStyle.minWidth)||0;const heightLimit=parseFloat(naturalStyle.maxHeight),widthLimit=parseFloat(naturalStyle.maxWidth);const maxHeight=Number.isFinite(heightLimit)?heightLimit:Infinity;const maxWidth=Number.isFinite(widthLimit)?widthLimit:Infinity;const cursor=options.current.point;const box=cursor?{left:cursor.x+(cursor.relative?rect.left:0),right:cursor.x+(cursor.relative?rect.left:0),top:cursor.y+(cursor.relative?rect.top:0),bottom:cursor.y+(cursor.relative?rect.top:0),width:0,height:0}:rect;const transitions=naturalStyle.transitionProperty.split(",").map(value=>value.trim());panel.style.transitionProperty=transitions.includes("all")?"opacity, color, background-color, border-color, box-shadow":transitions.filter(value=>!["transform","translate","left","right","top","bottom","inset","width","height","max-width","max-height"].includes(value)).join(",")||"none";panel.style.position=portal&&!nativeInline?"fixed":"absolute";panel.style.inset="auto";panel.style.transform="none";panel.style.margin="0";panel.style.boxSizing="border-box";panel.style.maxWidth=Math.min(maxWidth,Math.max(0,viewport.right-viewport.left))+"px";panel.style.minWidth=Math.min(minWidth,Math.max(0,viewport.right-viewport.left))+"px";panel.style.maxHeight=Math.min(maxHeight,Math.max(0,viewport.bottom-viewport.top))+"px";panel.style.minHeight="0";panel.style.overflowY=scroll?"auto":"visible";if(matchWidth)panel.style.width=Math.min(rect.width,Math.max(0,viewport.right-viewport.left))+"px";const initial=floatingPosition(box,panel.getBoundingClientRect(),viewport,placement,gap,getComputedStyle(anchor2).direction);panel.style.maxWidth=Math.min(maxWidth,initial.maxWidth)+"px";panel.style.minWidth=Math.min(minWidth,initial.maxWidth)+"px";panel.style.maxHeight=Math.min(maxHeight,initial.maxHeight)+"px";const result=floatingPosition(box,panel.getBoundingClientRect(),viewport,initial.placement,gap,getComputedStyle(anchor2).direction);let zIndex=parseInt(getComputedStyle(panel).zIndex,10)||0;for(let parent=anchor2;parent;parent=parent.parentElement)zIndex=Math.max(zIndex,(parseInt(getComputedStyle(parent).zIndex,10)||0)+1);panel.style.zIndex=String(zIndex);if(portal&&!nativeInline){panel.style.left=result.left+"px";panel.style.top=result.top+"px"}else{panel.style.left="0px";panel.style.top="0px";const origin=panel.getBoundingClientRect();const scaleX=panel.offsetWidth?origin.width/panel.offsetWidth:1;const scaleY=panel.offsetHeight?origin.height/panel.offsetHeight:1;panel.style.left=(result.left-origin.left)/(scaleX||1)+"px";panel.style.top=(result.top-origin.top)/(scaleY||1)+"px"}panel.setAttribute("data-cs-placement",result.placement);panel.scrollLeft=scrollLeft;panel.scrollTop=scrollTop;positionedScroll={left:panel.scrollLeft,top:panel.scrollTop};owned=readGeometry()};const schedule=()=>{if(frame==null)frame=requestAnimationFrame(position)};schedulePosition.current=schedule;position();const onScroll=event=>{if(event.target===panel&&positionedScroll&&panel.scrollLeft===positionedScroll.left&&panel.scrollTop===positionedScroll.top)return;schedule()};const resize=new ResizeObserver(schedule);resize.observe(anchor);resize.observe(panel);const styleObserver=new MutationObserver(()=>{if(captureCallerStyles())schedule()});styleObserver.observe(panel,{attributes:true,attributeFilter:["style"]});window.addEventListener("resize",schedule);window.addEventListener("scroll",onScroll,true);window.visualViewport?.addEventListener("resize",schedule);window.visualViewport?.addEventListener("scroll",schedule);return()=>{captureCallerStyles();styleObserver.disconnect();resize.disconnect();if(frame!=null)cancelAnimationFrame(frame);if(schedulePosition.current===schedule)schedulePosition.current=()=>{};window.removeEventListener("resize",schedule);window.removeEventListener("scroll",onScroll,true);window.visualViewport?.removeEventListener("resize",schedule);window.visualViewport?.removeEventListener("scroll",schedule);for(const[name,[value,priority]]of before){if(value)panel.style.setProperty(name,value,priority);else panel.style.removeProperty(name)}if(priorPlacement==null)panel.removeAttribute("data-cs-placement");else panel.setAttribute("data-cs-placement",priorPlacement)}},[open,ready,activeHost,portal,nativeInline,anchorRef,panelRef,placement,gap,matchWidth,scroll,point?.x,point?.y,identity]);React.useEffect(()=>{if(!open||!ready||!manageTabOrder)return;const restoreTimers=new Map;const onTab=event=>{const manager=getOverlayManager();const panel=panelRef.current;if(event.key!=="Tab"||event.defaultPrevented||event.isComposing||event.keyCode===229||manager.topDismissible()?.panelEl!==panel)return;const controls=manager.focusOrder({backwards:event.shiftKey});const index=controls.indexOf(document.activeElement);if(index<0)return;const next=index+(event.shiftKey?-1:1);const target=controls[next]||(manager.activeModal()?controls[(next+controls.length)%controls.length]:null);const native=manager.focusOrder({backwards:event.shiftKey,logical:false});const nativeIndex=native.indexOf(document.activeElement);const nativeTarget=native[nativeIndex+(event.shiftKey?-1:1)]||null;if(target===nativeTarget&&!manager.activeModal())return;if(target){event.preventDefault();target.focus()}else if(manager.containsOwned(panel,event.target)){const stops=native.filter(el=>manager.containsOwned(panel,el));const prior=stops.map(el=>[el,el.getAttribute("tabindex")]);for(const el of stops)el.tabIndex=-1;const anchor=options.current.getTabAnchor?.()||anchorElement();const anchorControl=native.find(el=>el===anchor||anchor?.contains(el));anchorControl?.focus();const restore=()=>{for(const[el,value]of prior)if(el.isConnected&&el.getAttribute("tabindex")==="-1"){if(value==null)el.removeAttribute("tabindex");else el.setAttribute("tabindex",value)}};const timer=setTimeout(()=>{restore();restoreTimers.delete(timer)},0);restoreTimers.set(timer,restore)}};document.addEventListener("keydown",onTab);return()=>{document.removeEventListener("keydown",onTab);for(const[timer,restore]of restoreTimers){clearTimeout(timer);restore()}}},[open,ready,manageTabOrder,panelRef,boundaryRef,identity]);const surfaceKey=React.useMemo(()=>({portal,host:activeHost,identity}),[portal,activeHost,identity]);return{ready,surfaceKey,contains:node=>Boolean(node&&(boundaryRef.current?.contains(node)||getOverlayManager().containsOwned(panelRef.current,node))),render:node=>portal?host?createPortal(node,host):null:node}}Object.assign(__ds_scope,{useFloatingPanel})})()}catch(e){__ds_ns.__errors.push({path:"components/_utils/floating-panel.js",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const AIDisclosureBadge=React.forwardRef(function AIDisclosureBadge2({portal=true,placement,controlRef,label,details,lang,sources=[],className,rootProps},forwardedRef){const floatingRef=React.useRef(null);const mergedControlRef=useComposedRefs(controlRef);const[ref,L,localeMessages]=useLang(lang);const t=makeT("AIDisclosureBadge",L,localeMessages);const[open,setOpen]=React.useState(false);const panel=React.useRef(null);const mergedNativeRef=useComposedRefs(panel,ref,forwardedRef);const floating=useFloatingPanel({open,anchorRef:panel,panelRef:floatingRef,portal,placement:placement??"bottom-start",gap:8,getAnchor:()=>panel.current?.querySelector(".cs-ai-disclosure__badge"),lang});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"popover",panelRef:floatingRef,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(false)});const panelId=React.useId();const sourceList=(sources||[]).filter(Boolean);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("span",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-ai-disclosure",className)},rootProps,[])},React.createElement("button",{type:"button",className:"cs-ai-disclosure__badge","aria-expanded":open,"aria-controls":open?panelId:void 0,onClick:()=>setOpen(v=>!v),ref:mergedControlRef},label??t("label")),open?floating.render(React.createElement("span",{ref:floatingRef,id:panelId,role:"status",className:"cs-ai-disclosure__panel"},React.createElement("span",{className:"cs-ai-disclosure__details"},details??t("details")),sourceList.length?React.createElement("span",{className:"cs-ai-disclosure__sources"},t("sources"),": ",sourceList.join(", ")):null)):null))});AIDisclosureBadge.displayName="AIDisclosureBadge";Object.assign(__ds_scope,{AIDisclosureBadge})})()}catch(e){__ds_ns.__errors.push({path:"components/ai/AIDisclosureBadge.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const FloatingActionButton=React.forwardRef(function FloatingActionButton2({portal=true,placement,controlRef,icon,label,actions=[],onClick,position="fixed",className,rootProps},forwardedRef){const floatingRef=React.useRef(null);const mergedControlRef=useComposedRefs(controlRef);const[open,setOpen]=React.useState(false);const panel=React.useRef(null);const mergedNativeRef=useComposedRefs(panel,forwardedRef);const floating=useFloatingPanel({open:open&&actions.length>0,anchorRef:panel,panelRef:floatingRef,portal,placement:placement??"top-end",gap:10,tabOrder:"before",getAnchor:()=>panel.current?.querySelector(".cs-fab__main")});const{scope}=useOverlayLayer({open:open&&actions.length>0&&floating.ready,kind:"dropdown",panelRef:floatingRef,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(false)});const main=()=>{if(actions.length)setOpen(o=>!o);else onClick&&onClick()};return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-fab",position==="static"&&"cs-fab--static",className)},rootProps,[])},open&&actions.length?floating.render(React.createElement("div",{ref:floatingRef,className:cx("cs-fab__dial",position==="static"&&"cs-fab__dial--static")},actions.map((a,i)=>React.createElement("button",{key:i,type:"button",className:"cs-fab__mini","aria-label":a.label,title:a.label,onClick:()=>{setOpen(false);a.onSelect&&a.onSelect()}},a.icon)))):null,React.createElement("button",{type:"button",className:"cs-fab__main","aria-label":label,"aria-expanded":actions.length?open:void 0,onClick:main,ref:mergedControlRef},icon)))});FloatingActionButton.displayName="FloatingActionButton";Object.assign(__ds_scope,{FloatingActionButton})})()}catch(e){__ds_ns.__errors.push({path:"components/button/FloatingActionButton.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{Icon}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const{useClientLayoutEffect}=__ds_scope;const Image=React.forwardRef(function Image2({src,alt="",ratio,preview=false,fallback,lang,className,...props},forwardedRef){const[load,setLoad]=React.useState({src,state:"loading"});const imgRef=React.useRef(null);const mergedNativeRef=useComposedRefs(imgRef,forwardedRef);if(load.src!==src)setLoad({src,state:"loading"});const state=load.src===src?load.state:"loading";useClientLayoutEffect(()=>{const img=imgRef.current;if(!img||!img.complete||!img.getAttribute("src"))return;if(img.naturalWidth>0){setLoad(cur=>cur.src===src&&cur.state==="ok"?cur:{src,state:"ok"})}},[src]);const[zoom,setZoom]=React.useState(false);React.useEffect(()=>setZoom(false),[src,preview]);const previewOpen=zoom&&preview&&state==="ok";const[ref,L,localeMessages]=useLang(lang);const t=makeT("Image",L,localeMessages);const panel=React.useRef(null);const{scope}=useOverlayLayer({open:previewOpen,kind:"modal",trapFocus:true,panelRef:panel,onEscape:()=>setZoom(false)});const openPreview=()=>setZoom(true);const onPreviewKey=e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault();openPreview()}};const body=state==="error"?React.createElement("span",{className:"cs-image__fallback"},fallback||fallback===0?fallback:React.createElement("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),React.createElement("circle",{cx:"9",cy:"9",r:"2"}),React.createElement("path",{d:"M21 15l-5-5-9 9"}))):React.createElement("img",{...props,ref:mergedNativeRef,key:src,src,alt,onLoad:()=>setLoad({src,state:"ok"}),onError:()=>setLoad({src,state:"error"})});const canPreview=preview&&state==="ok";return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement(React.Fragment,null,React.createElement("span",{ref,className:cx("cs-image",state==="loading"&&"is-loading",canPreview&&"is-zoomable",className),style:ratio?{aspectRatio:ratio}:void 0,onClick:canPreview?openPreview:void 0,onKeyDown:canPreview?onPreviewKey:void 0,role:canPreview?"button":void 0,tabIndex:canPreview?0:void 0,"aria-label":canPreview?t("preview")+(alt?": "+alt:""):void 0},body),previewOpen?React.createElement("span",{ref:panel,tabIndex:-1,className:"cs-image__zoom",role:"dialog","aria-modal":"true","aria-label":alt||t("preview"),onClick:()=>setZoom(false)},React.createElement("img",{src,alt}),React.createElement("button",{type:"button","aria-label":t("close"),onClick:()=>setZoom(false)},React.createElement(Icon,{name:"close",size:"sm",style:{verticalAlign:"middle"}}))):null))});Image.displayName="Image";Object.assign(__ds_scope,{Image})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Image.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const Tooltip=React.forwardRef(function Tooltip2({portal=true,placement,label,children,lang,className,rootProps},forwardedRef){const bubbleRef=React.useRef(null);const mergedNativeRef=useComposedRefs(bubbleRef,forwardedRef);const[ref,L,localeMessages]=useLang(lang);const t=makeT("Tooltip",L,localeMessages);const id=React.useId();const[hovered,setHovered]=React.useState(false);const[focused,setFocused]=React.useState(false);const[dismissed,setDismissed]=React.useState(false);const open=(hovered||focused)&&!dismissed;const floating=useFloatingPanel({open,anchorRef:ref,panelRef:bubbleRef,portal,placement:placement??"top",gap:8,scroll:false,getAnchor:()=>ref.current?.firstElementChild,lang});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"popover",panelRef:bubbleRef,surfaceKey:floating.surfaceKey,restoreFocus:false,onEscape:()=>setDismissed(true)});const child=React.isValidElement(children)&&children.type!==React.Fragment?React.cloneElement(children,{"aria-describedby":[children.props["aria-describedby"],id].filter(Boolean).join(" ")}):React.createElement("span",{tabIndex:0,"aria-describedby":id},children);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("span",{ref,...mergeTargetProps({className:cx("cs-tooltip",className),onMouseEnter:()=>{setHovered(true);setDismissed(false)},onMouseLeave:()=>setHovered(false),onFocus:()=>{setFocused(true);setDismissed(false)},onBlur:e=>{if(!floating.contains(e.relatedTarget))setFocused(false)}},rootProps,["data-managed","data-open"]),"data-managed":"","data-open":open?"true":"false"},child,floating.render(React.createElement("span",{id,className:"cs-tooltip__bubble",role:"tooltip",hidden:!open,ref:mergedNativeRef},label??t("label")))))});Tooltip.displayName="Tooltip";Object.assign(__ds_scope,{Tooltip})})()}catch(e){__ds_ns.__errors.push({path:"components/data/Tooltip.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{Icon}=__ds_scope;const{cx}=__ds_scope;const{overlaySurfaceClass,useOverlaySurface}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{hasDismiss,notifyClosed}=__ds_scope;const Dialog=React.forwardRef(function Dialog2({open,title,children,actions,onClose,onOpenChange,className,closeLabel,lang,...props},forwardedRef){const baseId=React.useId();const titleId=baseId+"-title";const bodyId=children==null?void 0:baseId+"-body";const[ref,L,localeMessages]=useLang(lang);const panel=React.useRef(null);const mergedNativeRef=useComposedRefs(panel,forwardedRef);const backdrop=React.useRef(null);const material=overlaySurfaceClass(className);const surface=useOverlaySurface(!!open,panel,material);const closeRef=React.useRef(null);closeRef.current=()=>notifyClosed(onOpenChange,onClose);const{scope}=useOverlayLayer({open:!!open,kind:"modal",trapFocus:true,onEscape:()=>closeRef.current&&closeRef.current(),panelRef:panel,backdropRef:backdrop});const cl=closeLabel!=null?closeLabel:makeT("Dialog",L,localeMessages)("close");if(!open)return null;return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref,className:"cs-dialog-layer"},React.createElement("div",{ref:backdrop,className:"cs-dialog__overlay",onClick:()=>closeRef.current(),"aria-hidden":"true"}),material?React.createElement("div",{ref:surface,className:cx("cs-overlay-surface",material),"aria-hidden":"true"}):null,React.createElement("section",{...props,ref:mergedNativeRef,"data-cs-overlay-material":material||void 0,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":titleId,"aria-describedby":Object.prototype.hasOwnProperty.call(props,"aria-describedby")?props["aria-describedby"]||void 0:bodyId,className:cx("cs-dialog",className)},React.createElement("header",{className:"cs-dialog__header"},React.createElement("h2",{id:titleId,className:"cs-dialog__title"},title),hasDismiss(onOpenChange,onClose)?React.createElement("button",{type:"button",className:"cs-button cs-button--ghost cs-button--sm",onClick:()=>closeRef.current(),"aria-label":cl},React.createElement(Icon,{name:"close",size:"sm"})):null),React.createElement("div",{id:bodyId,className:"cs-dialog__body"},children),actions||actions===0?React.createElement("footer",{className:"cs-dialog__actions"},actions):null)))});Dialog.displayName="Dialog";Object.assign(__ds_scope,{Dialog})})()}catch(e){__ds_ns.__errors.push({path:"components/dialog/Dialog.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const{hasDismiss,notifyClosed}=__ds_scope;const PATHS={default:"M12 8h.01M11 12h1v4h1 M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z",success:"M4 12.5l5 5 11-11",danger:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z M9 9l6 6 M15 9l-6 6"};function DefaultIcon({variant}){return React.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:PATHS[variant]||PATHS.default}))}const ToastStack=React.forwardRef(function ToastStack2({children,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);return React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-toast-stack",className)},rootProps,["role","aria-label"]),role:"region","aria-label":makeT("Toast",L,localeMessages)("notifications")},children)});ToastStack.displayName="ToastStack";const Toast=React.forwardRef(function Toast2({variant="default",title,icon,onClose,onOpenChange,lang,children,className,...props},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const{scope}=useOverlayLayer({open:true,kind:"toast",panelRef:ref,restoreFocus:false});return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:mergedNativeRef,className:cx("cs-toast",`cs-toast--${variant}`,className),role:"status",...props},React.createElement("span",{className:"cs-toast__icon","aria-hidden":"true"},icon??React.createElement(DefaultIcon,{variant})),React.createElement("div",null,title||title===0?React.createElement("div",{className:"cs-toast__title"},title):null,children||children===0?React.createElement("div",{className:"cs-toast__body"},children):null),hasDismiss(onOpenChange,onClose)?React.createElement("button",{type:"button",className:"cs-toast__close","aria-label":makeT("Toast",L,localeMessages)("dismiss"),onClick:()=>notifyClosed(onOpenChange,onClose)},React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},React.createElement("path",{d:"M6 6l12 12M18 6L6 18"}))):null))});Toast.displayName="Toast";Object.assign(__ds_scope,{ToastStack,Toast})})()}catch(e){__ds_ns.__errors.push({path:"components/feedback/Toast.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const EMPTY_PATH=[];const Cascader=React.forwardRef(function Cascader2({portal=true,placement,controlRef,nodes=[],value=EMPTY_PATH,onChange,placeholder,label,"aria-labelledby":ariaLabelledBy,disabled=false,lang,className,id,description,error,required=false,rootProps,controlProps},forwardedRef){const floatingRef=React.useRef(null);const mergedControlRef=useComposedRefs(controlRef);const[requestedOpen,setOpen]=React.useState(false);const open=requestedOpen&&!disabled;React.useEffect(()=>{if(disabled)setOpen(false)},[disabled]);const[path,setPath]=React.useState(value);const wrap=React.useRef(null);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(wrap,ref,forwardedRef);const t=makeT("Cascader",L,localeMessages);const ph=placeholder!=null?placeholder:t("placeholder");const requiredDescription=required?makeT("Form",L,localeMessages)("required"):void 0;const control=useFieldAssociation({id:controlProps?.id??id,"aria-label":controlProps?.["aria-label"]??(controlProps?.["aria-labelledby"]||ariaLabelledBy?void 0:label),"aria-labelledby":controlProps?.["aria-labelledby"]??ariaLabelledBy,"aria-describedby":controlProps?.["aria-describedby"],"aria-invalid":controlProps?.["aria-invalid"]},{fallbackLabel:label,description,error,requiredDescription});const valueKey=Array.isArray(value)?value.join("\0"):"";React.useEffect(()=>{setPath(Array.isArray(value)?value:EMPTY_PATH)},[valueKey]);const floating=useFloatingPanel({open,anchorRef:wrap,panelRef:floatingRef,portal,placement:placement??"bottom-start",gap:6,getAnchor:()=>wrap.current?.querySelector(":scope > button"),lang});const{manager,scope}=useOverlayLayer({open:open&&floating.ready,kind:"dropdown",panelRef:floatingRef,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(false)});React.useEffect(()=>{if(!open)return;const d=e=>{if(!floating.contains(e.target))setOpen(false)};const k=e=>{if(manager.topDismissible()?.panelEl!==floatingRef.current)return;if(e.defaultPrevented||e.isComposing||e.keyCode===229)return;if(!floating.contains(e.target))return;const opts=[...floatingRef.current.querySelectorAll('[role="option"]')];if(!opts.length)return;const active=document.activeElement;const idx=opts.indexOf(active);if(e.key==="ArrowDown"){e.preventDefault();(opts[idx<0?0:Math.min(opts.length-1,idx+1)]||opts[0]).focus()}else if(e.key==="ArrowUp"){e.preventDefault();(opts[idx<0?opts.length-1:Math.max(0,idx-1)]||opts[0]).focus()}else if(e.key==="Home"){e.preventDefault();opts[0].focus()}else if(e.key==="End"){e.preventDefault();opts[opts.length-1].focus()}else if(e.key==="ArrowRight"&&idx>=0){active.click&&active.click()}else if(e.key==="ArrowLeft"){e.preventDefault();if(path.length){const columns=[...floatingRef.current.querySelectorAll('[role="listbox"]')];const column=active?.closest('[role="listbox"]');const depth=columns.indexOf(column);const parentDepth=depth>0?depth-1:Math.max(0,path.length-1);const parent=columns[parentDepth]?.querySelector('[role="option"][aria-selected="true"]');parent?.focus();setPath(path.slice(0,parentDepth))}else{setOpen(false);const field=wrap.current.querySelector(".cs-treeselect__field");field&&field.focus&&field.focus()}}};document.addEventListener("mousedown",d);document.addEventListener("keydown",k);return()=>{document.removeEventListener("mousedown",d);document.removeEventListener("keydown",k)}},[open,path]);const cols=[];let level=nodes;for(let i=0;level&&level.length;i++){cols.push(level);const pick=level.find(n=>n.key===path[i]);level=pick&&pick.children}const labels=[];{let lv=nodes;for(const k of value){const n=(lv||[]).find(x=>x.key===k);if(!n)break;labels.push(n.label);lv=n.children}}return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-cascader",className)},rootProps)},React.createElement("button",{...mergeTargetProps({...control,type:"button",className:"cs-treeselect__field",disabled,"aria-haspopup":"listbox","aria-expanded":open,onClick:()=>setOpen(o=>!o),onKeyDown:e=>{if(e.defaultPrevented||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;if(open&&e.key==="ArrowDown")return;if(e.key==="ArrowDown"||e.key==="Enter"||e.key===" "){e.preventDefault();setOpen(true)}}},controlProps,["id","role","type","name","value","defaultValue","disabled","required","aria-required","aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-haspopup","aria-expanded","aria-controls","aria-activedescendant"]),ref:mergedControlRef},React.createElement("span",{className:labels.length?void 0:"ph"},labels.length?labels.map((label2,index)=>React.createElement(React.Fragment,{key:index},index?React.createElement(React.Fragment,null," ",React.createElement("span",{"aria-hidden":"true"},"/")," "):null,label2)):ph),React.createElement("span",{"aria-hidden":"true"},"▾")),open?floating.render(React.createElement("div",{ref:floatingRef,className:"cs-cascader__pop"},cols.map((col,i)=>React.createElement("ul",{key:i,role:"listbox","aria-labelledby":control["aria-labelledby"]||control.id,className:"cs-cascader__col"},col.map(n=>React.createElement("li",{key:n.key,role:"none"},React.createElement("button",{type:"button",role:"option","aria-selected":path[i]===n.key,className:cx("cs-cascader__opt",path[i]===n.key&&"on"),"data-cs-focusable":"",onClick:()=>{const next=[...path.slice(0,i),n.key];setPath(next);if(!(n.children&&n.children.length)){onChange&&onChange(next);setOpen(false)}}},n.label,n.children&&n.children.length?React.createElement("span",{"aria-hidden":"true"}," ›"):null))))))):null,fieldMessages(control,description,error,requiredDescription)))});Cascader.displayName="Cascader";Object.assign(__ds_scope,{Cascader})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Cascader.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const SWATCHES=["#F4BA17","#C77B4A","#E0632B","#C43D1F","#7A9B57","#3E5A2E","#4E8E9B","#2E5E7E","#BFB29B","#45210E"];const ColorPicker=React.forwardRef(function ColorPicker2({portal=true,placement,controlRef,value="#F4BA17",onChange,swatches=SWATCHES,label,"aria-labelledby":ariaLabelledBy,lang,className,id,description,error,required=false,rootProps,controlProps},forwardedRef){const floatingRef=React.useRef(null);const mergedControlRef=useComposedRefs(controlRef);const[open,setOpen]=React.useState(false);const[hex,setHex]=React.useState(value);const wrap=React.useRef(null);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(wrap,ref,forwardedRef);const t=makeT("ColorPicker",L,localeMessages);const requiredDescription=required?makeT("Form",L,localeMessages)("required"):void 0;const control=useFieldAssociation({id:controlProps?.id??id,"aria-label":controlProps?.["aria-label"]??(controlProps?.["aria-labelledby"]||ariaLabelledBy?void 0:label?label+": "+value:void 0),"aria-labelledby":controlProps?.["aria-labelledby"]??ariaLabelledBy,"aria-describedby":controlProps?.["aria-describedby"],"aria-invalid":controlProps?.["aria-invalid"]},{fallbackLabel:(label||t("label"))+": "+value,description,error,requiredDescription});React.useEffect(()=>setHex(value),[value]);const floating=useFloatingPanel({open,anchorRef:wrap,panelRef:floatingRef,portal,placement:placement??"bottom-start",gap:6,getAnchor:()=>wrap.current?.querySelector(":scope > button"),lang});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"popover",panelRef:floatingRef,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(false)});React.useEffect(()=>{if(!open)return;const d=e=>{if(!floating.contains(e.target))setOpen(false)};document.addEventListener("mousedown",d);return()=>{document.removeEventListener("mousedown",d)}},[open]);const commit=v=>{if(/^#[0-9a-fA-F]{6}$/.test(v)){onChange&&onChange(v)}};return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("span",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-colorpicker",className)},rootProps)},React.createElement("button",{...mergeTargetProps({...control,type:"button",className:"cs-colorpicker__field","aria-expanded":open,onClick:()=>setOpen(o=>!o)},controlProps,["id","role","type","name","value","defaultValue","disabled","required","aria-required","aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-haspopup","aria-expanded","aria-controls","aria-activedescendant"]),ref:mergedControlRef},React.createElement("i",{style:{background:value}}),React.createElement("code",null,value)),open?floating.render(React.createElement("span",{ref:floatingRef,className:"cs-colorpicker__pop",role:"dialog","aria-label":control["aria-labelledby"]?void 0:controlProps?.["aria-label"]||label||t("label"),"aria-labelledby":control["aria-labelledby"]},React.createElement("span",{className:"cs-colorpicker__grid"},swatches.map(s=>React.createElement("button",{key:s,type:"button","aria-label":s,"aria-pressed":s.toLowerCase()===String(value).toLowerCase(),style:{background:s},className:s.toLowerCase()===String(value).toLowerCase()?"on":void 0,onClick:()=>{onChange&&onChange(s);setOpen(false)}}))),React.createElement("span",{className:"cs-colorpicker__hex"},React.createElement("input",{value:hex,"aria-label":t("hex"),onChange:e=>setHex(e.target.value),onKeyDown:e=>{if(e.nativeEvent.isComposing||e.keyCode===229)return;if(e.key==="Enter"){e.preventDefault();commit(hex);setOpen(false)}},onBlur:()=>commit(hex)})))):null,fieldMessages(control,description,error,requiredDescription)))});ColorPicker.displayName="ColorPicker";Object.assign(__ds_scope,{ColorPicker})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/ColorPicker.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const Combobox=React.forwardRef(function Combobox2({portal=true,placement,controlRef,options=[],value,onChange,placeholder,label,"aria-labelledby":ariaLabelledBy,disabled=false,lang,className,rootProps,controlProps,description,error,required=false},forwardedRef){const floatingRef=React.useRef(null);const mergedControlRef=useComposedRefs(controlRef);const[requestedOpen,setOpen]=React.useState(false);const open=requestedOpen&&!disabled;React.useEffect(()=>{if(disabled)setOpen(false)},[disabled]);const[q,setQ]=React.useState("");const[hl,setHl]=React.useState(0);const id=React.useId();const wrapRef=React.useRef(null);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(wrapRef,ref,forwardedRef);const t=makeT("Combobox",L,localeMessages);const ph=placeholder!=null?placeholder:t("placeholder");const sel=options.find(o=>o.value===value)||null;const needle=q.trim().toLowerCase();const shown=needle?options.filter(o=>String(o.label).toLowerCase().includes(needle)):options;const floating=useFloatingPanel({open,anchorRef:wrapRef,panelRef:floatingRef,portal,placement:placement??"bottom-start",gap:6,getAnchor:()=>wrapRef.current?.querySelector(":scope > input"),matchWidth:true,lang});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"dropdown",panelRef:floatingRef,surfaceKey:floating.surfaceKey,restoreFocus:false,onEscape:()=>setOpen(false)});React.useEffect(()=>{if(!open)return;const d=e=>{if(!floating.contains(e.target))setOpen(false)};document.addEventListener("mousedown",d);return()=>document.removeEventListener("mousedown",d)},[open]);const pick=o=>{onChange&&onChange(o.value);setQ("");setOpen(false)};const key=e=>{if(e.nativeEvent.isComposing||e.keyCode===229)return;if(e.key==="ArrowDown"){e.preventDefault();setOpen(true);setHl(h=>shown.length?Math.min(shown.length-1,h+1):0)}else if(e.key==="ArrowUp"){e.preventDefault();setHl(h=>Math.max(0,h-1))}else if(e.key==="Enter"){if(open&&shown[hl]){e.preventDefault();pick(shown[hl])}}};const control=useFieldAssociation(mergeTargetProps({role:"combobox","aria-expanded":open,"aria-controls":open?id:void 0,"aria-autocomplete":"list","aria-label":label,"aria-labelledby":ariaLabelledBy,"aria-activedescendant":open&&shown[hl]?id+"-"+hl:void 0,disabled,placeholder:ph,value:open?q:sel?sel.label:q,onClick:()=>{if(!disabled)setOpen(true)},onFocus:()=>{setOpen(true);setHl(0)},onChange:e=>{setQ(e.target.value);setOpen(true);setHl(0)},onKeyDown:key},controlProps,["type","role","value","defaultValue","onChange","disabled","name","required","aria-haspopup","aria-expanded","aria-controls","aria-autocomplete","aria-activedescendant"]),{fallbackLabel:t("label"),requiredSupported:true,description,error,required});return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-combobox",className),onBlur:e=>{if(!floating.contains(e.relatedTarget))setOpen(false)}},rootProps)},React.createElement("input",{...control,ref:mergedControlRef}),fieldMessages(control,description,error),React.createElement("span",{className:"cs-combobox__caret","aria-hidden":"true"},"▾"),open?floating.render(React.createElement("div",{ref:floatingRef,className:"cs-combobox__popup"},React.createElement("ul",{className:"cs-combobox__list",role:"listbox",id,"aria-label":label||(ariaLabelledBy?void 0:t("label")),"aria-labelledby":control["aria-labelledby"]},shown.map((o,i)=>React.createElement("li",{key:o.value,id:id+"-"+i,role:"option","aria-selected":o.value===value,className:cx("cs-combobox__opt",i===hl&&"hl"),onMouseEnter:()=>setHl(i),onMouseDown:e=>{e.preventDefault();pick(o)}},o.label))),!shown.length?React.createElement("div",{role:"status",className:"cs-combobox__empty"},t("empty")):null)):null))});Combobox.displayName="Combobox";Object.assign(__ds_scope,{Combobox})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Combobox.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{makeT,useLang,formatDate}=__ds_scope;const{Calendar}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const CAL_ICON=React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("rect",{x:"3",y:"5",width:"18",height:"16",rx:"2"}),React.createElement("path",{d:"M8 3v4M16 3v4M3 10h18"}));const DatePicker=React.forwardRef(function DatePicker2({portal=true,placement,controlRef,value,onChange,placeholder,label,"aria-labelledby":ariaLabelledBy,disabled=false,lang,className,rootProps,controlProps,description,error,required=false},forwardedRef){const mergedControlRef=useComposedRefs(controlRef);const[requestedOpen,setOpen]=React.useState(false);const open=requestedOpen&&!disabled;React.useEffect(()=>{if(disabled)setOpen(false)},[disabled]);const wrap=React.useRef(null);const popup=React.useRef(null);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(wrap,ref,forwardedRef);const t=makeT("DatePicker",L,localeMessages);const hasValue=Boolean(value)||value===0;const ph=placeholder!=null?placeholder:t("placeholder");const dialogLabel=label?.trim()||placeholder?.trim()||t("placeholder");const floating=useFloatingPanel({open,anchorRef:wrap,panelRef:popup,portal,placement:placement??"bottom-start",gap:6,getAnchor:()=>wrap.current?.querySelector(":scope > button"),lang});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"popover",panelRef:popup,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(false)});React.useEffect(()=>{if(!open||!floating.ready)return;const day=popup.current?.querySelector('[data-day][aria-pressed="true"]')||popup.current?.querySelector('[data-day][aria-current="date"]')||popup.current?.querySelector("button[data-day]");day?.focus();const d=e=>{if(!floating.contains(e.target))setOpen(false)};document.addEventListener("mousedown",d);return()=>{document.removeEventListener("mousedown",d)}},[open,floating.ready,floating.surfaceKey]);const requiredDescription=required?makeT("Form",L,localeMessages)("required"):void 0;const control=useFieldAssociation(mergeTargetProps({type:"button",className:"cs-datepicker__field",disabled,"aria-haspopup":"dialog","aria-expanded":open,"aria-label":label,"aria-labelledby":ariaLabelledBy,onClick:event=>{if(!open)event.currentTarget.focus();setOpen(o=>!o)}},controlProps,["role","aria-required","type","disabled","name","value","aria-haspopup","aria-expanded","aria-controls"]),{description,error,requiredDescription});return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-datepicker",className)},rootProps)},React.createElement("button",{...control,ref:mergedControlRef},CAL_ICON,React.createElement("span",{className:hasValue?void 0:"ph"},hasValue?formatDate(value,L):ph)),fieldMessages(control,description,error,requiredDescription),open?floating.render(React.createElement("div",{ref:popup,className:"cs-datepicker__pop",role:"dialog","aria-label":label?.trim()?dialogLabel:ariaLabelledBy?void 0:dialogLabel,"aria-labelledby":control["aria-labelledby"]},React.createElement(Calendar,{value,lang:L,onChange:d=>{onChange&&onChange(d);setOpen(false)}}))):null))});DatePicker.displayName="DatePicker";Object.assign(__ds_scope,{DatePicker})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/DatePicker.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const PEN=React.createElement("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("path",{d:"M4 20l4.5-.9L20 7.6a2 2 0 0 0-2.8-2.8L5.7 16.3 4 20z"}));const InlineEdit=React.forwardRef(function InlineEdit2({controlRef,value,defaultValue="",onChange,label,lang,className,rootProps},forwardedRef){const mergedControlRef=useComposedRefs(controlRef);const[inner,setInner]=React.useState(defaultValue);const val=value!=null?value:inner;const[edit,setEdit]=React.useState(false);const[draft,setDraft]=React.useState(val);const cancellingRef=React.useRef(false);const commit=()=>{if(cancellingRef.current){cancellingRef.current=false;return}setEdit(false);if(draft!==val){if(value==null)setInner(draft);onChange&&onChange(draft)}};const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(ref,forwardedRef);const t=makeT("InlineEdit",L,localeMessages);const{scope}=useOverlayLayer({open:edit,kind:"popover",panelRef:ref,restoreFocus:false,onEscape:()=>{cancellingRef.current=true;setDraft(val);setEdit(false);requestAnimationFrame(()=>ref.current?.querySelector("button")?.focus())}});return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("span",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-inline-edit",className)},rootProps,[])},edit?React.createElement("input",{autoFocus:true,value:draft,"aria-label":label||t("edit"),onChange:e=>setDraft(e.target.value),onBlur:commit,onKeyDown:e=>{if(!e.nativeEvent.isComposing&&e.keyCode!==229&&e.key==="Enter")commit()},ref:mergedControlRef}):React.createElement("button",{type:"button",className:"cs-inline-edit__view","aria-label":t("edit")+(label?": "+label:""),onClick:()=>{cancellingRef.current=false;setDraft(val);setEdit(true)}},React.createElement("span",{className:val?void 0:"ph"},val||t("empty")),PEN)))});InlineEdit.displayName="InlineEdit";Object.assign(__ds_scope,{InlineEdit})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/InlineEdit.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const Mentions=React.forwardRef(function Mentions2({portal=true,placement,value,defaultValue="",onChange,users=[],placeholder,rows=3,lang,className,"aria-label":ariaLabel,rootProps},forwardedRef){const floatingRef=React.useRef(null);const mergedNativeRef=useComposedRefs(forwardedRef);const[inner,setInner]=React.useState(defaultValue);const val=value!=null?value:inner;const set=v=>{if(value==null)setInner(v);onChange&&onChange(v)};const[q,setQ]=React.useState(null);const[activeIndex,setActiveIndex]=React.useState(0);const caretRef=React.useRef(null);const listId=React.useId();const[ref,L,localeMessages]=useLang(lang);const t=makeT("Mentions",L,localeMessages);const ph=placeholder!=null?placeholder:t("placeholder");const hits=q==null?[]:users.filter(u=>u.toLowerCase().includes(q)).slice(0,6);const open=hits.length>0;const floating=useFloatingPanel({open,anchorRef:ref,panelRef:floatingRef,portal,placement:placement??"bottom-start",gap:0,getAnchor:()=>ref.current?.querySelector(":scope > textarea"),lang});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"dropdown",panelRef:floatingRef,surfaceKey:floating.surfaceKey,restoreFocus:false,onEscape:()=>setQ(null)});React.useEffect(()=>{if(!open)return;const onDoc=e=>{if(!floating.contains(e.target))setQ(null)};document.addEventListener("mousedown",onDoc);return()=>document.removeEventListener("mousedown",onDoc)},[open]);React.useEffect(()=>{setActiveIndex(i=>hits.length?Math.min(i,hits.length-1):0)},[q,users]);const onInput=e=>{const v=e.target.value;set(v);const caret=typeof e.target.selectionStart==="number"?e.target.selectionStart:v.length;caretRef.current=caret;const head=v.slice(0,caret);const m=/(^|\s)@(\w*)$/.exec(head);const next=m?m[2].toLowerCase():null;setQ(next);if(next!=null)setActiveIndex(0)};const pick=u=>{const caret=typeof caretRef.current==="number"?caretRef.current:val.length;const head=val.slice(0,caret);const tail=val.slice(caret);set(head.replace(/(^|\s)@\w*$/,"$1@"+u+" ")+tail);setQ(null)};const optionId=i=>listId+"-opt-"+i;const onKeyDown=e=>{if(e.nativeEvent.isComposing||e.keyCode===229)return;if(!open)return;if(e.key==="ArrowDown"){e.preventDefault();setActiveIndex(i=>Math.min(hits.length-1,i+1))}else if(e.key==="ArrowUp"){e.preventDefault();setActiveIndex(i=>Math.max(0,i-1))}else if(e.key==="Enter"){if(hits[activeIndex]){e.preventDefault();pick(hits[activeIndex])}}};return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("span",{ref,...mergeTargetProps({"className":cx("cs-mentions",className),"onBlur":e=>{if(!floating.contains(e.relatedTarget))setQ(null)}},rootProps,[])},React.createElement("textarea",{className:"cs-field__control",rows,value:val,placeholder:ph,"aria-label":ariaLabel||ph,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":open?listId:void 0,"aria-activedescendant":open&&hits[activeIndex]?optionId(activeIndex):void 0,onChange:onInput,onKeyDown,ref:mergedNativeRef}),open?floating.render(React.createElement("span",{ref:floatingRef,className:"cs-mentions__pop",role:"listbox",id:listId},hits.map((u,i)=>React.createElement("button",{key:u,type:"button",id:optionId(i),role:"option",tabIndex:-1,"aria-selected":i===activeIndex,className:cx(i===activeIndex&&"hl"),onMouseEnter:()=>setActiveIndex(i),onMouseDown:e=>{e.preventDefault();pick(u)}},"@",u)))):null))});Mentions.displayName="Mentions";Object.assign(__ds_scope,{Mentions})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/Mentions.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{useFieldAssociation,mergeTargetProps,fieldMessages}=__ds_scope;const{makeT,useLang}=__ds_scope;const{Tree}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const TreeSelect=React.forwardRef(function TreeSelect2({portal=true,placement,controlRef,nodes=[],value,onChange,placeholder,label,"aria-labelledby":ariaLabelledBy,disabled=false,lang,className,id,description,error,required=false,rootProps,controlProps},forwardedRef){const floatingRef=React.useRef(null);const mergedControlRef=useComposedRefs(controlRef);const[requestedOpen,setOpen]=React.useState(false);const open=requestedOpen&&!disabled;React.useEffect(()=>{if(disabled)setOpen(false)},[disabled]);const wrap=React.useRef(null);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(wrap,ref,forwardedRef);const t=makeT("TreeSelect",L,localeMessages);const ph=placeholder!=null?placeholder:t("placeholder");const requiredDescription=required?makeT("Form",L,localeMessages)("required"):void 0;const control=useFieldAssociation({id:controlProps?.id??id,"aria-label":controlProps?.["aria-label"]??(controlProps?.["aria-labelledby"]||ariaLabelledBy?void 0:label),"aria-labelledby":controlProps?.["aria-labelledby"]??ariaLabelledBy,"aria-describedby":controlProps?.["aria-describedby"],"aria-invalid":controlProps?.["aria-invalid"]},{fallbackLabel:label,description,error,requiredDescription});const find=ns=>{for(const n of ns){if(n.key===value)return n;const c=n.children&&find(n.children);if(c)return c}return null};const sel=find(nodes);const floating=useFloatingPanel({open,anchorRef:wrap,panelRef:floatingRef,portal,placement:placement??"bottom-start",gap:6,getAnchor:()=>wrap.current?.querySelector(":scope > button"),lang});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"popover",panelRef:floatingRef,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(false)});React.useEffect(()=>{if(!open)return;const d=e=>{if(!floating.contains(e.target))setOpen(false)};document.addEventListener("mousedown",d);return()=>{document.removeEventListener("mousedown",d)}},[open]);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({className:cx("cs-treeselect",className)},rootProps)},React.createElement("button",{...mergeTargetProps({...control,type:"button",className:"cs-treeselect__field",disabled,"aria-haspopup":"tree","aria-expanded":open,onClick:()=>setOpen(o=>!o)},controlProps,["id","role","type","name","value","defaultValue","disabled","required","aria-required","aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-haspopup","aria-expanded","aria-controls","aria-activedescendant"]),ref:mergedControlRef},React.createElement("span",{className:sel?void 0:"ph"},sel?sel.label:ph),React.createElement("span",{"aria-hidden":"true"},"▾")),open?floating.render(React.createElement("div",{ref:floatingRef,className:"cs-treeselect__pop"},React.createElement(Tree,{"aria-label":control["aria-label"]||(control["aria-labelledby"]?void 0:ph),"aria-labelledby":control["aria-labelledby"],nodes,selected:value,defaultOpen:true,lang:L,onSelect:(k,n)=>{if(!(n.children&&n.children.length)){onChange&&onChange(k,n);setOpen(false)}}}))):null,fieldMessages(control,description,error,requiredDescription)))});TreeSelect.displayName="TreeSelect";Object.assign(__ds_scope,{TreeSelect})})()}catch(e){__ds_ns.__errors.push({path:"components/forms/TreeSelect.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{formatNumber,makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{notifyClosed}=__ds_scope;const CommandPalette=React.forwardRef(function CommandPalette2({controlRef,open,onClose,onOpenChange,placeholder,groups=[],lang,className,rootProps},forwardedRef){const mergedControlRef=useComposedRefs(controlRef);const mergedNativeRef=useComposedRefs(forwardedRef);const[q,setQ]=React.useState("");const panel=React.useRef(null);const closeRef=React.useRef(null);closeRef.current=()=>notifyClosed(onOpenChange,onClose);const{scope}=useOverlayLayer({open:!!open,kind:"modal",trapFocus:true,preferFocusSelector:".cs-cmdk__search input",onEscape:()=>closeRef.current&&closeRef.current(),panelRef:panel});React.useEffect(()=>{if(!open)setQ("")},[open]);const[ref,L,localeMessages]=useLang(lang);const t=makeT("CommandPalette",L,localeMessages);const ph=placeholder!=null?placeholder:t("placeholder");if(!open)return null;const needle=q.trim().toLowerCase();const filteredGroups=groups.map(g=>({...g,items:(g.items||[]).filter(it=>!needle||String(it.label).toLowerCase().includes(needle))}));const resultCount=filteredGroups.reduce((count,group)=>count+group.items.length,0);const resultStatus=resultCount===0?t("empty"):t(resultCount===1?"oneResult":"results").replace("{count}",formatNumber(resultCount,L));return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:el=>{ref.current=el;panel.current=el},className:"cs-cmdk-scrim",onClick:()=>closeRef.current()},React.createElement("div",{...mergeTargetProps({"className":cx("cs-cmdk",className),"onClick":e=>e.stopPropagation()},rootProps,["role","aria-modal","aria-label"]),role:"dialog","aria-modal":"true","aria-label":t("aria"),ref:mergedNativeRef},React.createElement("div",{className:"cs-cmdk__search"},React.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},React.createElement("circle",{cx:"11",cy:"11",r:"7"}),React.createElement("path",{d:"M21 21l-4.3-4.3"})),React.createElement("input",{"aria-label":ph,value:q,onChange:e=>setQ(e.target.value),placeholder:ph,ref:mergedControlRef}),React.createElement("span",{className:"cs-kbd"},t("esc"))),React.createElement("div",{className:"cs-cmdk__list"},React.createElement("div",{className:"cs-cmdk__status",role:"status","aria-live":"polite","aria-atomic":"true"},resultStatus),filteredGroups.map((g,gi)=>{const items=g.items;if(!items.length)return null;return React.createElement(React.Fragment,{key:gi},g.label||g.label===0?React.createElement("div",{className:"cs-cmdk__label"},g.label):null,items.map((it,ii)=>React.createElement("button",{key:ii,type:"button",className:"cs-cmdk__item",onClick:()=>{it.onSelect&&it.onSelect();setQ("");closeRef.current()}},it.icon||it.icon===0?React.createElement("span",{"aria-hidden":"true"},it.icon):null,React.createElement("span",null,it.label),it.shortcut||it.shortcut===0?React.createElement("span",{className:"cs-kbd"},it.shortcut):null)))})))))});CommandPalette.displayName="CommandPalette";Object.assign(__ds_scope,{CommandPalette})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/CommandPalette.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;function match(combo,e){const parts=combo.toLowerCase().split("+").map(part=>part.trim());const key=parts.pop();if(!key||parts.some(part=>!["mod","ctrl","meta","shift","alt"].includes(part)))return false;const has=name=>parts.includes(name);const control=has("mod")?(e.metaKey||e.ctrlKey)&&(!has("ctrl")||e.ctrlKey)&&(!has("meta")||e.metaKey):e.ctrlKey===has("ctrl")&&e.metaKey===has("meta");return control&&e.shiftKey===has("shift")&&e.altKey===has("alt")&&e.key.toLowerCase()===key}const HotKeys=React.forwardRef(function HotKeys2({bindings=[],help=true,children,lang,className,rootProps},forwardedRef){const[show,setShow]=React.useState(false);const[ref,L,localeMessages]=useLang(lang);const t=makeT("HotKeys",L,localeMessages);const panel=React.useRef(null);const mergedNativeRef=useComposedRefs(panel,forwardedRef);const backdrop=React.useRef(null);const{scope}=useOverlayLayer({open:show,kind:"modal",trapFocus:true,panelRef:panel,backdropRef:backdrop,onEscape:()=>setShow(false)});React.useEffect(()=>{const on=e=>{if(e.defaultPrevented||e.isComposing||e.keyCode===229)return;const path=e.composedPath?.()||[e.target];if(path.some(node=>node?.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(node?.tagName)))return;if(help&&e.key==="?"&&!e.ctrlKey&&!e.metaKey&&!e.altKey){if(!show&&[...document.querySelectorAll('[role="dialog"][aria-modal="true"], [role="alertdialog"][aria-modal="true"]')].some(m=>m!==panel.current&&!m.contains(ref.current)))return;setShow(s=>!s);return}for(const b of bindings)if(match(b.keys,e)){e.preventDefault();b.onTrigger&&b.onTrigger();return}};document.addEventListener("keydown",on);return()=>document.removeEventListener("keydown",on)},[bindings,help,show]);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref,...mergeTargetProps({"className":cx("cs-hotkeys",className)},rootProps,[])},children,show?React.createElement("div",{ref:backdrop,className:"cs-hotkeys__sheet",onClick:()=>setShow(false)},React.createElement("div",{ref:mergedNativeRef,tabIndex:-1,className:"cs-hotkeys__card",role:"dialog","aria-modal":"true","aria-label":t("title"),onClick:e=>e.stopPropagation()},React.createElement("b",null,t("title")),React.createElement("ul",null,bindings.map((b,i)=>React.createElement("li",{key:i},React.createElement("span",null,b.description),React.createElement("kbd",{className:"cs-kbd"},b.keys))),React.createElement("li",null,React.createElement("span",null,t("toggle")),React.createElement("kbd",{className:"cs-kbd"},"?"))))):null))});HotKeys.displayName="HotKeys";Object.assign(__ds_scope,{HotKeys})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/HotKeys.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext,focusableSelector}=__ds_scope;const{cx}=__ds_scope;const Menu=React.forwardRef(function Menu2({portal=true,placement,trigger,children,align="start",open:controlledOpen,onOpenChange,lang,className,rootProps},forwardedRef){const[uOpen,setUOpen]=React.useState(false);const open=controlledOpen!=null?controlledOpen:uOpen;const set=v=>{if(controlledOpen==null)setUOpen(v);onOpenChange?.(v)};const[ref,L,localeMessages]=useLang(lang);const t=makeT("Menu",L,localeMessages);const triggerRef=React.useRef(null);const triggerSupportsRef=React.isValidElement(trigger)&&(typeof trigger.type==="string"||Number.parseInt(React.version,10)>=19||trigger.type?.$$typeof===Symbol.for("react.forward_ref"));const originalTriggerRef=triggerSupportsRef?Number.parseInt(React.version,10)>=19?trigger.props.ref:trigger.ref:void 0;const mergedTriggerRef=useComposedRefs(triggerRef,originalTriggerRef);const listRef=React.useRef(null);const mergedNativeRef=useComposedRefs(listRef,forwardedRef);const openingEdge=React.useRef("first");const search=React.useRef({text:"",time:0});const enabledItems=()=>listRef.current?[...listRef.current.querySelectorAll('[role="menuitem"]:not([disabled]):not(:disabled):not([aria-disabled="true"])')]:[];const focusItem=item=>{for(const option of enabledItems())option.tabIndex=option===item?0:-1;item?.focus()};const floating=useFloatingPanel({open,anchorRef:ref,panelRef:listRef,portal,manageTabOrder:false,placement:placement??(align==="end"?"bottom-end":"bottom-start"),gap:6,getAnchor:()=>triggerRef.current||ref.current?.querySelector('[aria-haspopup="menu"]'),lang});const{manager,scope}=useOverlayLayer({open:open&&floating.ready,kind:"dropdown",panelRef:listRef,surfaceKey:floating.surfaceKey,onEscape:()=>set(false)});React.useEffect(()=>{if(!open||!floating.ready)return;const options=enabledItems();focusItem(openingEdge.current==="last"?options.at(-1):options[0]);openingEdge.current="first";search.current={text:"",time:0};const onDoc=e=>{if(!floating.contains(e.target))set(false)};const onKey=e=>{if(e.defaultPrevented||e.isComposing||e.keyCode===229)return;if(!floating.contains(e.target))return;const opts=enabledItems();if(manager.topDismissible()?.panelEl!==listRef.current)return;if(!opts.length)return;const active=document.activeElement;const idx=opts.indexOf(active);if(e.key==="ArrowDown"){e.preventDefault();focusItem(opts[(idx+1)%opts.length])}else if(e.key==="ArrowUp"){e.preventDefault();focusItem(opts[(idx-1+opts.length)%opts.length])}else if(e.key==="Home"){e.preventDefault();focusItem(opts[0])}else if(e.key==="End"){e.preventDefault();focusItem(opts[opts.length-1])}else if(e.key.length===1&&e.key!==" "&&!e.altKey&&!e.ctrlKey&&!e.metaKey){const char=e.key.toLocaleLowerCase();const now=Date.now();const text=now-search.current.time<500?search.current.text+char:char;search.current={text,time:now};const needle=[...text].every(letter=>letter===char)?char:text;const option=[...opts.slice(idx+1),...opts.slice(0,idx+1)].find(item=>item.textContent.trim().toLocaleLowerCase().startsWith(needle));if(option){e.preventDefault();focusItem(option)}}};document.addEventListener("mousedown",onDoc);document.addEventListener("keydown",onKey);return()=>{document.removeEventListener("mousedown",onDoc);document.removeEventListener("keydown",onKey)}},[open,floating.ready,floating.surfaceKey]);const toggle=event=>{triggerRef.current=event.currentTarget;if(!open)event.currentTarget.focus();set(!open)};const triggerKey=event=>{if(event.defaultPrevented||event.nativeEvent?.isComposing||event.keyCode===229)return;if(event.key!=="ArrowDown"&&event.key!=="ArrowUp")return;event.preventDefault();triggerRef.current=event.currentTarget;event.currentTarget.focus();const edge=event.key==="ArrowUp"?"last":"first";if(open){const options=enabledItems();focusItem(edge==="last"?options.at(-1):options[0])}else{openingEdge.current=edge;set(true)}};const triggerNode=React.isValidElement(trigger)?React.cloneElement(trigger,{...triggerSupportsRef?{ref:mergedTriggerRef}:{},"aria-haspopup":"menu","aria-expanded":open,onKeyDown:event=>{trigger.props.onKeyDown?.(event);triggerKey(event)},onClick:e=>{if(typeof trigger.props.onClick==="function")trigger.props.onClick(e);if(!e.defaultPrevented)toggle(e)}}):React.createElement("button",{type:"button",ref:mergedTriggerRef,"aria-haspopup":"menu","aria-expanded":open,onKeyDown:triggerKey,onClick:toggle},trigger);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{...mergeTargetProps({"className":cx("cs-menu",className)},rootProps,[]),ref},triggerNode,open?floating.render(React.createElement("div",{ref:mergedNativeRef,className:cx("cs-menu__list",align==="end"&&"cs-menu__list--end"),role:"menu","aria-label":t("menu"),onFocus:event=>{const item=event.target.closest?.('[role="menuitem"]');if(item)for(const option of enabledItems())option.tabIndex=option===item?0:-1},onKeyDown:event=>{if(event.defaultPrevented||event.nativeEvent.isComposing||event.keyCode===229||event.key!=="Tab")return;const modal=manager.activeModal();const roots=modal?manager.focusScope():[document.body];let options=[...new Set(roots.flatMap(root=>[...root.querySelectorAll(focusableSelector)]))].filter(el=>el.tabIndex>=0&&!el.disabled&&!el.matches(":disabled")&&!listRef.current?.contains(el)&&!el.closest('[inert], [hidden], [aria-hidden="true"]')&&el.getClientRects().length>0&&getComputedStyle(el).visibility!=="hidden");options.sort((a,b)=>(a.tabIndex>0?a.tabIndex:Infinity)-(b.tabIndex>0?b.tabIndex:Infinity));options=options.filter(el=>{if(el.tagName!=="INPUT"||el.type!=="radio"||!el.name)return true;const group=options.filter(other=>other.tagName==="INPUT"&&other.type==="radio"&&other.name===el.name&&other.form===el.form&&other.getRootNode()===el.getRootNode());return el===(group.find(radio=>radio.checked)||(event.shiftKey?group.at(-1):group[0]))});const triggerElement=triggerRef.current||ref.current?.querySelector('[aria-haspopup="menu"]');const index=options.indexOf(triggerElement);const next=index+(event.shiftKey?-1:1);const target=options[next]||(modal?options[(next+options.length)%options.length]:null);if(target){event.preventDefault();target.focus()}else{for(const option of enabledItems())option.tabIndex=-1;triggerElement?.focus()}set(false)},onClick:e=>{if(e.defaultPrevented)return;const item=e.target.closest?.('[role="menuitem"]:not([disabled])');if(item&&listRef.current?.contains(item))set(false)}},children)):null))});Menu.displayName="Menu";const MenuItem=React.forwardRef(function MenuItem2({danger=false,icon,children,className,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);return React.createElement("button",{type:"button",role:"menuitem",tabIndex:-1,className:cx("cs-menu__item",danger&&"cs-menu__item--danger",className),...props,ref:mergedNativeRef},icon||icon===0?React.createElement("span",{"aria-hidden":"true"},icon):null,children)});MenuItem.displayName="MenuItem";Object.assign(__ds_scope,{Menu,MenuItem})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Menu.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{useClientLayoutEffect}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Menubar=React.forwardRef(function Menubar2({portal=true,placement,menus=[],className,"aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy,rootProps},forwardedRef){const floatingRef=React.useRef(null);const[open,setOpen]=React.useState(null);const[focusI,setFocusI]=React.useState(0);const[wrap,L,localeMessages]=useLang();const mergedNativeRef=useComposedRefs(wrap,forwardedRef);const t=makeT("Menubar",L,localeMessages);const id=React.useId();const itemFocus=React.useRef(null);const menuRefs=React.useRef([]);const btns=React.useRef([]);const floating=useFloatingPanel({open:open!=null,anchorRef:wrap,panelRef:floatingRef,portal,manageTabOrder:false,placement:placement??"bottom-start",gap:5,getAnchor:()=>btns.current[open],getInlineParent:()=>btns.current[open]?.parentElement,identity:open});const{scope}=useOverlayLayer({open:open!=null&&floating.ready,kind:"dropdown",panelRef:floatingRef,surfaceKey:floating.surfaceKey,restoreFocus:false,onEscape:()=>{setOpen(null);btns.current[open]?.focus()}});useClientLayoutEffect(()=>{if(open==null||itemFocus.current==null||!floating.ready)return;const items=menuRefs.current[open]?.querySelectorAll('[role="menuitem"]');const target=itemFocus.current;itemFocus.current=null;(target===-1?items?.[items.length-1]:items?.[0])?.focus()},[open,floating.ready,floating.surfaceKey]);React.useEffect(()=>{if(open==null)return;const d=e=>{if(!floating.contains(e.target))setOpen(null)};document.addEventListener("mousedown",d);return()=>{document.removeEventListener("mousedown",d)}},[open]);const nav=(e,i)=>{let n=null;if(e.key==="ArrowRight")n=(i+1)%menus.length;else if(e.key==="ArrowLeft")n=(i-1+menus.length)%menus.length;else if(e.key==="Home")n=0;else if(e.key==="End")n=menus.length-1;else if(["ArrowDown","ArrowUp","Enter"," "].includes(e.key)){e.preventDefault();itemFocus.current=e.key==="ArrowUp"?-1:0;if(open===i){const items=menuRefs.current[i]?.querySelectorAll('[role="menuitem"]');(itemFocus.current===-1?items?.[items.length-1]:items?.[0])?.focus();itemFocus.current=null}else setOpen(i);return}if(n==null)return;e.preventDefault();setFocusI(n);if(open!=null)setOpen(n);const b=btns.current[n];if(b)b.focus()};return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-menubar",className)},rootProps,["role","aria-label","aria-labelledby"]),role:"menubar","aria-label":ariaLabel??(ariaLabelledBy?void 0:t("label")),"aria-labelledby":ariaLabelledBy},menus.map((m,i)=>React.createElement("span",{key:i,className:"cs-menubar__wrap"},React.createElement("button",{id:`${id}-top-${i}`,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":open===i,tabIndex:i===focusI?0:-1,ref:el=>btns.current[i]=el,onKeyDown:e=>nav(e,i),onFocus:()=>setFocusI(i),className:cx("cs-menubar__top",open===i&&"is-open"),onClick:()=>setOpen(open===i?null:i),onMouseEnter:()=>{if(open!=null&&open!==i)setOpen(i)}},m.label),open===i?floating.render(React.createElement("span",{className:"cs-menu__list",role:"menu","aria-labelledby":`${id}-top-${i}`,ref:el=>{menuRefs.current[i]=el;floatingRef.current=el},onKeyDown:e=>{const items=[...e.currentTarget.querySelectorAll('[role="menuitem"]')];const current=items.indexOf(document.activeElement);let next;if(e.key==="ArrowDown")next=(current+1)%items.length;else if(e.key==="ArrowUp")next=(current-1+items.length)%items.length;else if(e.key==="Home")next=0;else if(e.key==="End")next=items.length-1;else if(e.key==="ArrowRight"||e.key==="ArrowLeft"){e.preventDefault();const target=(i+(e.key==="ArrowRight"?1:-1)+menus.length)%menus.length;itemFocus.current=0;setFocusI(target);setOpen(target);return}else if(e.key==="Tab"){e.preventDefault();setOpen(null);btns.current[i]?.focus();return}else return;e.preventDefault();items[next]?.focus()}},m.items.map((it,j)=>it==="-"?React.createElement("span",{key:j,className:"cs-menu__sep",role:"separator"}):React.createElement("button",{key:j,type:"button",role:"menuitem",tabIndex:-1,className:cx("cs-menu__item",it.danger&&"cs-menu__item--danger"),onClick:()=>{setOpen(null);btns.current[i]?.focus();it.onSelect&&it.onSelect()}},it.label)))):null))))});Menubar.displayName="Menubar";Object.assign(__ds_scope,{Menubar})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Menubar.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const NavigationMenu=React.forwardRef(function NavigationMenu2({portal=true,placement,items=[],className,...props},forwardedRef){const[open,setOpen]=React.useState(null);const wrap=React.useRef(null);const mergedNativeRef=useComposedRefs(wrap,forwardedRef);const popup=React.useRef(null);const floating=useFloatingPanel({open:open!=null,anchorRef:wrap,panelRef:popup,portal,placement:placement??"bottom-start",gap:8,getAnchor:()=>wrap.current?.querySelector('button[aria-expanded="true"]'),getInlineParent:()=>wrap.current?.querySelector('button[aria-expanded="true"]')?.parentElement,identity:open});const{scope}=useOverlayLayer({open:open!=null&&floating.ready,kind:"dropdown",panelRef:popup,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(null)});React.useEffect(()=>{if(open==null)return;const d=e=>{if(!floating.contains(e.target))setOpen(null)};document.addEventListener("mousedown",d);return()=>{document.removeEventListener("mousedown",d)}},[open]);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("nav",{ref:mergedNativeRef,className:cx("cs-navmenu",className),...props},items.map((it,i)=>it.panel?React.createElement("span",{key:i,className:"cs-navmenu__wrap"},React.createElement("button",{type:"button",className:cx("cs-navmenu__top",open===i&&"is-open"),"aria-expanded":open===i,onClick:()=>setOpen(open===i?null:i),onMouseEnter:()=>{if(open!=null&&open!==i)setOpen(i)}},it.label," ",React.createElement("span",{"aria-hidden":"true"},"▾")),open===i?floating.render(React.createElement("span",{ref:popup,className:"cs-navmenu__panel"},it.panel.map((p,j)=>React.createElement("a",{key:j,href:p.href||"#",className:"cs-navmenu__card",onClick:()=>setOpen(null)},React.createElement("b",null,p.label),p.desc||p.desc===0?React.createElement("small",null,p.desc):null)))):null):React.createElement("a",{key:i,href:it.href||"#",className:"cs-navmenu__top"},it.label))))});NavigationMenu.displayName="NavigationMenu";Object.assign(__ds_scope,{NavigationMenu})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/NavigationMenu.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const Toolbar=React.forwardRef(function Toolbar2({portal=true,placement,items=[],overflowAfter,label,lang,className,rootProps},forwardedRef){const floatingRef=React.useRef(null);const[open,setOpen]=React.useState(false);const[focusIdx,setFocusIdx]=React.useState(0);const wrap=React.useRef(null);const btnRefs=React.useRef([]);const menuRefs=React.useRef([]);const[ref,L,localeMessages]=useLang(lang);const mergedNativeRef=useComposedRefs(wrap,ref,forwardedRef);const t=makeT("Toolbar",L,localeMessages);const cut=overflowAfter!=null?overflowAfter:items.length;const head=items.slice(0,cut);const tail=items.slice(cut).filter(x=>x!=="-");const hasMore=tail.length>0;const controlMeta=[];head.forEach((it,i)=>{if(it!=="-")controlMeta.push({kind:"head",headIndex:i})});if(hasMore)controlMeta.push({kind:"more"});const floating=useFloatingPanel({open:open&&hasMore,anchorRef:wrap,panelRef:floatingRef,portal,placement:placement??"bottom-end",gap:6,getAnchor:()=>wrap.current?.querySelector(".cs-toolbar__more > button"),getInlineParent:()=>wrap.current?.querySelector(".cs-toolbar__more"),lang});const{scope}=useOverlayLayer({open:open&&hasMore&&floating.ready,kind:"dropdown",panelRef:floatingRef,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(false)});React.useEffect(()=>{if(!open)return;const d=e=>{if(!floating.contains(e.target))setOpen(false)};document.addEventListener("mousedown",d);return()=>document.removeEventListener("mousedown",d)},[open]);React.useEffect(()=>{if(focusIdx>=controlMeta.length)setFocusIdx(Math.max(0,controlMeta.length-1))},[focusIdx,controlMeta.length]);const focusControl=i=>{const next=Math.max(0,Math.min(controlMeta.length-1,i));setFocusIdx(next);requestAnimationFrame(()=>{const el=btnRefs.current[next];if(el)el.focus()})};const onToolbarKeyDown=(e,i)=>{if(e.nativeEvent.isComposing||e.keyCode===229)return;if(e.key==="ArrowRight"){e.preventDefault();focusControl(i+1)}else if(e.key==="ArrowLeft"){e.preventDefault();focusControl(i-1)}else if(e.key==="Home"){e.preventDefault();focusControl(0)}else if(e.key==="End"){e.preventDefault();focusControl(controlMeta.length-1)}};const onMenuKeyDown=(e,i)=>{if(e.nativeEvent.isComposing||e.keyCode===229)return;if(e.key==="ArrowDown"){e.preventDefault();const n=Math.min(tail.length-1,i+1);const el=menuRefs.current[n];if(el)el.focus()}else if(e.key==="ArrowUp"){e.preventDefault();const n=Math.max(0,i-1);const el=menuRefs.current[n];if(el)el.focus()}else if(e.key==="Home"){e.preventDefault();const el=menuRefs.current[0];if(el)el.focus()}else if(e.key==="End"){e.preventDefault();const el=menuRefs.current[tail.length-1];if(el)el.focus()}};let controlI=0;return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref:mergedNativeRef,...mergeTargetProps({"className":cx("cs-toolbar",className)},rootProps,["role","aria-label","aria-orientation"]),role:"toolbar","aria-label":label,"aria-orientation":"horizontal"},head.map((it,i)=>{if(it==="-")return React.createElement("span",{key:"sep-"+i,className:"cs-toolbar__sep","aria-hidden":"true"});const ci=controlI++;return React.createElement("button",{key:"btn-"+i,type:"button",className:"cs-toolbar__btn",tabIndex:ci===focusIdx?0:-1,ref:el=>{btnRefs.current[ci]=el},onFocus:()=>setFocusIdx(ci),onKeyDown:e=>onToolbarKeyDown(e,ci),onClick:()=>it.onSelect&&it.onSelect()},it.icon,it.label||it.label===0?React.createElement("span",null,it.label):null)}),hasMore?(()=>{const ci=controlI++;return React.createElement("span",{className:"cs-toolbar__more"},React.createElement("button",{type:"button",className:"cs-toolbar__btn","aria-haspopup":"menu","aria-expanded":open,"aria-label":t("more"),tabIndex:ci===focusIdx?0:-1,ref:el=>{btnRefs.current[ci]=el},onFocus:()=>setFocusIdx(ci),onKeyDown:e=>{onToolbarKeyDown(e,ci);if(e.key==="ArrowDown"||e.key==="Enter"||e.key===" "){if(!open){e.preventDefault();setOpen(true);requestAnimationFrame(()=>{const el=menuRefs.current[0];if(el)el.focus()})}}},onClick:()=>setOpen(o=>!o)},"⋯"),open?floating.render(React.createElement("span",{ref:floatingRef,className:"cs-menu__list",role:"menu"},tail.map((it,i)=>React.createElement("button",{key:i,type:"button",role:"menuitem",className:"cs-menu__item",ref:el=>{menuRefs.current[i]=el},onKeyDown:e=>onMenuKeyDown(e,i),onClick:()=>{setOpen(false);it.onSelect&&it.onSelect()}},it.label)))):null)})():null))});Toolbar.displayName="Toolbar";Object.assign(__ds_scope,{Toolbar})})()}catch(e){__ds_ns.__errors.push({path:"components/navigation/Toolbar.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const{overlaySurfaceClass,useOverlaySurface}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const AlertDialog=React.forwardRef(function AlertDialog2({open,defaultOpen=false,onOpenChange,title,description,children,confirmLabel,cancelLabel,tone,variant,onConfirm,onCancel,lang,className,...props},forwardedRef){const baseId=React.useId();const titleId=baseId+"-title";const descId=baseId+"-desc";const[ref,L,localeMessages]=useLang(lang);const t=makeT("AlertDialog",L,localeMessages);const panel=React.useRef(null);const mergedNativeRef=useComposedRefs(panel,forwardedRef);const backdrop=React.useRef(null);const uncontrolled=open===void 0;const[internal,setInternal]=React.useState(!!defaultOpen);const isOpen=uncontrolled?internal:!!open;const material=overlaySurfaceClass(className);const surface=useOverlaySurface(isOpen,panel,material);const setOpen=next=>{if(uncontrolled)setInternal(next);onOpenChange?.(next)};const destructive=(tone??variant)==="destructive";const confirmRef=React.useRef(onConfirm);confirmRef.current=onConfirm;const cancelRef=React.useRef(onCancel);cancelRef.current=onCancel;const setOpenRef=React.useRef(setOpen);setOpenRef.current=setOpen;const{scope}=useOverlayLayer({open:isOpen,kind:"modal",trapFocus:true,preferFocusSelector:destructive?".cs-alert-dialog__cancel":".cs-alert-dialog__confirm",onEscape:()=>{setOpenRef.current(false);cancelRef.current?.()},panelRef:panel,backdropRef:backdrop});const cl=cancelLabel!=null?cancelLabel:t("cancel");const cf=confirmLabel!=null?confirmLabel:t("confirm");const body=description??children;const hasDesc=body!=null&&body!==false&&body!=="";if(!isOpen)return null;return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref,className:"cs-dialog-layer cs-alert-dialog-layer"},React.createElement("div",{ref:backdrop,className:"cs-dialog__overlay",onClick:()=>{setOpen(false);cancelRef.current?.()},"aria-hidden":"true"}),material?React.createElement("div",{ref:surface,className:cx("cs-overlay-surface",material),"aria-hidden":"true"}):null,React.createElement("section",{...props,ref:mergedNativeRef,"data-cs-overlay-material":material||void 0,tabIndex:-1,role:"alertdialog","aria-modal":"true","aria-labelledby":titleId,"aria-describedby":hasDesc?descId:void 0,className:cx("cs-dialog","cs-alert-dialog",destructive&&"cs-alert-dialog--destructive",className)},React.createElement("header",{className:"cs-dialog__header"},React.createElement("h2",{id:titleId,className:"cs-dialog__title"},title)),hasDesc?React.createElement("div",{id:descId,className:"cs-dialog__body"},body):null,React.createElement("footer",{className:"cs-dialog__actions"},React.createElement("button",{type:"button",className:"cs-button cs-button--ghost cs-button--md cs-alert-dialog__cancel",onClick:()=>{setOpen(false);cancelRef.current?.()}},cl),React.createElement("button",{type:"button",className:cx("cs-button","cs-button--md","cs-alert-dialog__confirm",destructive?"cs-button--danger":"cs-button--primary"),onClick:()=>{setOpen(false);confirmRef.current?.()}},cf)))))});AlertDialog.displayName="AlertDialog";Object.assign(__ds_scope,{AlertDialog})})()}catch(e){__ds_ns.__errors.push({path:"components/overlays/AlertDialog.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const ContextMenu=React.forwardRef(function ContextMenu2({portal=true,placement,items=[],children,lang,className,tabIndex=0,rootProps},forwardedRef){const[pos,setPos]=React.useState(null);const[active,setActive]=React.useState(0);const[ref,L,localeMessages]=useLang(lang);const list=React.useRef(null);const mergedNativeRef=useComposedRefs(list,forwardedRef);const opener=React.useRef(null);const pointerOpener=React.useRef(null);const closeTimer=React.useRef(null);const t=makeT("ContextMenu",L,localeMessages);const dismiss=(restore=true)=>{clearTimeout(closeTimer.current);setPos(null);const el=opener.current;if(restore&&el?.isConnected&&!el.closest("[inert], [hidden]"))el.focus()};const floating=useFloatingPanel({open:Boolean(pos),anchorRef:ref,panelRef:list,portal,manageTabOrder:false,placement:placement??"bottom-start",gap:0,lang,getTabAnchor:()=>opener.current||ref.current,point:pos?{...pos,relative:true}:null});const{manager,scope}=useOverlayLayer({open:Boolean(pos)&&floating.ready,kind:"dropdown",panelRef:list,surfaceKey:floating.surfaceKey,restoreFocus:false,onEscape:()=>dismiss()});const openAt=(point,trigger=document.activeElement)=>{clearTimeout(closeTimer.current);const first=items.findIndex(item=>item!=="-");if(first<0)return;if(!pos)opener.current=trigger;setActive(first);setPos(point)};React.useEffect(()=>{if(!pos||!floating.ready)return;const options=()=>[...list.current?.querySelectorAll('[role="menuitem"]')||[]];const opts=options();if(!opts.length){dismiss(document.activeElement===document.body||list.current?.contains(document.activeElement));return}if(!list.current?.contains(document.activeElement))opts[0].focus();const close=()=>dismiss(false);const onKey=e=>{if(manager.topDismissible()?.panelEl!==list.current||!list.current?.contains(e.target))return;if(e.isComposing||e.nativeEvent?.isComposing||e.keyCode===229)return;if(e.key==="Tab"){clearTimeout(closeTimer.current);if(!e.defaultPrevented){const controls=manager.focusOrder({backwards:e.shiftKey});const index2=controls.indexOf(document.activeElement);const next2=index2+(e.shiftKey?-1:1);const target=controls[next2]||(manager.activeModal()?controls[(next2+controls.length)%controls.length]:null);if(target){e.preventDefault();target.focus();dismiss(false);return}}closeTimer.current=setTimeout(()=>dismiss(false),0);return}if(e.defaultPrevented)return;const opts2=options(),index=opts2.indexOf(document.activeElement);if(!opts2.length)return;let next;if(e.key==="ArrowDown")next=Math.min(opts2.length-1,index+1);else if(e.key==="ArrowUp")next=index<0?opts2.length-1:Math.max(0,index-1);else if(e.key==="Home")next=0;else if(e.key==="End")next=opts2.length-1;else return;e.preventDefault();opts2[next].focus()};document.addEventListener("click",close);document.addEventListener("keydown",onKey);return()=>{clearTimeout(closeTimer.current);document.removeEventListener("click",close);document.removeEventListener("keydown",onKey)}},[pos,items,floating.ready,floating.surfaceKey]);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref,...mergeTargetProps({"className":cx("cs-ctxmenu-zone",className),"onBlur":e=>{if(pos&&!floating.contains(e.relatedTarget))dismiss(false)},"onKeyDown":e=>{if(pos||e.defaultPrevented||e.isComposing||e.nativeEvent?.isComposing||e.keyCode===229)return;if(e.key==="ContextMenu"||e.key==="F10"&&e.shiftKey){e.preventDefault();pointerOpener.current=null;openAt({x:0,y:e.currentTarget.getBoundingClientRect().height})}},"onPointerDownCapture":e=>{pointerOpener.current=e.button===2&&e.currentTarget.contains(document.activeElement)?document.activeElement:null},"onContextMenu":e=>{const trigger=pointerOpener.current;pointerOpener.current=null;if(e.defaultPrevented)return;e.preventDefault();if(!e.currentTarget.contains(document.activeElement))e.currentTarget.focus();const box=e.currentTarget.getBoundingClientRect();openAt({x:e.clientX-box.left,y:e.clientY-box.top},trigger?.isConnected&&e.currentTarget.contains(trigger)?trigger:document.activeElement)}},rootProps,["role","aria-label","tabIndex"]),role:"group","aria-label":t("menu"),tabIndex},children,pos?floating.render(React.createElement("div",{ref:mergedNativeRef,className:"cs-menu__list",role:"menu","aria-label":t("menu"),style:{position:"absolute",insetInlineStart:pos.x,insetBlockStart:pos.y}},items.map((it,i)=>it==="-"?React.createElement("div",{key:i,className:"cs-menu__sep",role:"separator"}):React.createElement("button",{key:i,type:"button",role:"menuitem",tabIndex:active===i?0:-1,onFocus:()=>setActive(i),className:cx("cs-menu__item",it.danger&&"cs-menu__item--danger"),onClick:()=>{dismiss();it.onSelect&&it.onSelect()}},it.label)))):null))});ContextMenu.displayName="ContextMenu";Object.assign(__ds_scope,{ContextMenu})})()}catch(e){__ds_ns.__errors.push({path:"components/overlays/ContextMenu.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useClientLayoutEffect}=__ds_scope;const{cx}=__ds_scope;const{overlaySurfaceClass,useOverlaySurface}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{notifyClosed}=__ds_scope;const Drawer=React.forwardRef(function Drawer2({open,onClose,onOpenChange,title,side="right",children,actions,lang,className,rootProps},forwardedRef){const[ref,L,localeMessages]=useLang(lang);const titleId=React.useId();const hasTitle=Boolean(title)||title===0;const panel=React.useRef(null);const mergedNativeRef=useComposedRefs(panel,ref,forwardedRef);const body=React.useRef(null);const[bodyScrollable,setBodyScrollable]=React.useState(false);const backdrop=React.useRef(null);const material=overlaySurfaceClass(className);const surface=useOverlaySurface(!!open,panel,material);useClientLayoutEffect(()=>{const el=body.current;if(!open||!el)return;const measure=()=>setBodyScrollable(el.scrollHeight>el.clientHeight+1||el.scrollWidth>el.clientWidth+1);measure();const observer=new ResizeObserver(measure);observer.observe(el);for(const child of el.children)observer.observe(child);return()=>observer.disconnect()},[open,children]);const closeRef=React.useRef(null);closeRef.current=()=>notifyClosed(onOpenChange,onClose);const{scope}=useOverlayLayer({open:!!open,kind:"modal",trapFocus:true,onEscape:()=>closeRef.current&&closeRef.current(),panelRef:panel,backdropRef:backdrop});const t=makeT("Drawer",L,localeMessages);if(!open)return null;return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement(React.Fragment,null,React.createElement("div",{ref:backdrop,className:"cs-drawer-scrim",onClick:()=>closeRef.current(),"aria-hidden":"true"}),material?React.createElement("div",{ref:surface,className:cx("cs-overlay-surface",material),"aria-hidden":"true"}):null,React.createElement("div",{...mergeTargetProps({className:cx("cs-drawer",side==="left"&&"cs-drawer--left",className)},rootProps,["role","tabIndex","aria-modal","aria-labelledby","aria-label","data-cs-overlay-material"]),ref:mergedNativeRef,"data-cs-overlay-material":material||void 0,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":hasTitle?titleId:void 0,"aria-label":hasTitle?void 0:t("panel")},React.createElement("div",{className:"cs-drawer__header"},hasTitle?React.createElement("h2",{id:titleId,className:"cs-drawer__title"},title):null,React.createElement("button",{type:"button",className:"cs-drawer__close","aria-label":t("close"),onClick:()=>closeRef.current()},React.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},React.createElement("path",{d:"M6 6l12 12M18 6L6 18"})))),React.createElement("div",{ref:body,className:"cs-drawer__body",tabIndex:bodyScrollable?0:void 0},children),actions||actions===0?React.createElement("div",{className:"cs-drawer__footer"},actions):null)))});Drawer.displayName="Drawer";Object.assign(__ds_scope,{Drawer})})()}catch(e){__ds_ns.__errors.push({path:"components/overlays/Drawer.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{useOverlayLayer,overlayScopeContext,focusableSelector}=__ds_scope;const{cx}=__ds_scope;const HoverCard=React.forwardRef(function HoverCard2({portal=true,placement,trigger,children,openDelay=150,closeDelay=200,className,"aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy,rootProps},forwardedRef){const floatingRef=React.useRef(null);const mergedNativeRef=useComposedRefs(floatingRef,forwardedRef);const[open,setOpen]=React.useState(false);const panel=React.useRef(null);const timer=React.useRef();const hovered=React.useRef(false);const focused=React.useRef(false);const triggerFocus=React.useRef(null);const sync=()=>{clearTimeout(timer.current);const next=hovered.current||focused.current;timer.current=setTimeout(()=>setOpen(next),next?openDelay:closeDelay)};const dismiss=()=>{clearTimeout(timer.current);const content=floatingRef.current;if(content?.contains(document.activeElement)){const targets=[...panel.current.querySelectorAll(focusableSelector)].filter(el=>!content.contains(el)&&el.tabIndex>=0&&!el.disabled&&!el.closest('[inert], [hidden], [aria-hidden="true"]')&&el.getClientRects().length>0&&getComputedStyle(el).visibility!=="hidden");const target=targets.includes(triggerFocus.current)?triggerFocus.current:targets[0];target?.focus()}clearTimeout(timer.current);setOpen(false)};const floating=useFloatingPanel({open,anchorRef:panel,panelRef:floatingRef,portal,placement:placement??"bottom-start",gap:8,getAnchor:()=>panel.current?.firstElementChild});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"popover",panelRef:floatingRef,surfaceKey:floating.surfaceKey,restoreFocus:false,onEscape:dismiss});React.useEffect(()=>()=>clearTimeout(timer.current),[]);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("span",{ref:panel,...mergeTargetProps({"className":cx("cs-hovercard",className),"onMouseEnter":()=>{hovered.current=true;sync()},"onMouseLeave":()=>{hovered.current=false;if(!focused.current)sync()},"onFocus":e=>{if(!floatingRef.current?.contains(e.target))triggerFocus.current=e.target;if(!floating.contains(e.relatedTarget)){focused.current=true;sync()}},"onBlur":e=>{if(!floating.contains(e.relatedTarget)){focused.current=false;if(!hovered.current)sync()}}},rootProps,[])},trigger,open?floating.render(React.createElement("span",{className:"cs-hovercard__panel",role:"dialog","aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy,ref:mergedNativeRef},children)):null))});HoverCard.displayName="HoverCard";Object.assign(__ds_scope,{HoverCard})})()}catch(e){__ds_ns.__errors.push({path:"components/overlays/HoverCard.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const Popconfirm=React.forwardRef(function Popconfirm2({portal=true,placement,trigger,title,onConfirm,onCancel,okLabel,cancelLabel,lang,className,rootProps},forwardedRef){const floatingRef=React.useRef(null);const mergedNativeRef=useComposedRefs(floatingRef,forwardedRef);const[open,setOpen]=React.useState(false);const titleId=React.useId();const wrap=React.useRef(null);const[ref,L,localeMessages]=useLang(lang);const t=makeT("Popconfirm",L,localeMessages);const floating=useFloatingPanel({open,anchorRef:wrap,panelRef:floatingRef,portal,placement:placement??"bottom-start",gap:8,getAnchor:()=>wrap.current?.querySelector('[aria-haspopup="dialog"]'),lang});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"popover",panelRef:floatingRef,surfaceKey:floating.surfaceKey,onEscape:()=>setOpen(false)});React.useEffect(()=>{if(!open)return;const d=e=>{if(!floating.contains(e.target))setOpen(false)};document.addEventListener("mousedown",d);return()=>{document.removeEventListener("mousedown",d)}},[open]);const toggle=event=>{if(!open)event.currentTarget.focus();setOpen(o=>!o)};const triggerNode=React.isValidElement(trigger)?React.cloneElement(trigger,{"aria-haspopup":"dialog","aria-expanded":open,onClick:e=>{if(typeof trigger.props.onClick==="function")trigger.props.onClick(e);if(!e.defaultPrevented)toggle(e)}}):React.createElement("button",{type:"button","aria-haspopup":"dialog","aria-expanded":open,onClick:toggle},trigger);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("span",{ref:el=>{wrap.current=el;ref.current=el},...mergeTargetProps({"className":cx("cs-popconfirm",className)},rootProps,[])},triggerNode,open?floating.render(React.createElement("span",{className:"cs-popconfirm__panel",role:"alertdialog","aria-labelledby":titleId,ref:mergedNativeRef},React.createElement("span",{id:titleId,className:"cs-popconfirm__title"},title),React.createElement("span",{className:"cs-popconfirm__actions"},React.createElement("button",{type:"button",className:"cs-button cs-button--ghost cs-button--xs",onClick:()=>{setOpen(false);onCancel&&onCancel()}},cancelLabel!=null?cancelLabel:t("cancel")),React.createElement("button",{type:"button",className:"cs-button cs-button--primary cs-button--xs",onClick:()=>{setOpen(false);onConfirm&&onConfirm()}},okLabel!=null?okLabel:t("ok"))))):null))});Popconfirm.displayName="Popconfirm";Object.assign(__ds_scope,{Popconfirm})})()}catch(e){__ds_ns.__errors.push({path:"components/overlays/Popconfirm.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFloatingPanel}=__ds_scope;const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{makeT,useLang}=__ds_scope;const{cx}=__ds_scope;const Popover=React.forwardRef(function Popover2({portal=true,placement,trigger,children,align="start",open:controlled,onOpenChange,className,rootProps,"aria-label":ariaLabel,"aria-labelledby":ariaLabelledBy},forwardedRef){const floatingRef=React.useRef(null);const mergedNativeRef=useComposedRefs(floatingRef,forwardedRef);const[u,setU]=React.useState(false);const open=controlled!=null?controlled:u;const set=v=>{if(controlled==null)setU(v);onOpenChange?.(v)};const[ref,L,localeMessages]=useLang();const t=makeT("Popover",L,localeMessages);const floating=useFloatingPanel({open,anchorRef:ref,panelRef:floatingRef,portal,placement:placement??(align==="end"?"bottom-end":"bottom-start"),gap:8,getAnchor:()=>ref.current?.querySelector('[aria-haspopup="dialog"]')});const{scope}=useOverlayLayer({open:open&&floating.ready,kind:"popover",panelRef:floatingRef,surfaceKey:floating.surfaceKey,onEscape:()=>set(false)});React.useEffect(()=>{if(!open)return;const d=e=>{if(!floating.contains(e.target))set(false)};document.addEventListener("mousedown",d);return()=>{document.removeEventListener("mousedown",d)}},[open]);const toggle=event=>{if(!open)event.currentTarget.focus();set(!open)};const triggerNode=React.isValidElement(trigger)?React.cloneElement(trigger,{"aria-haspopup":"dialog","aria-expanded":open,onClick:e=>{if(typeof trigger.props.onClick==="function")trigger.props.onClick(e);if(!e.defaultPrevented)toggle(e)}}):React.createElement("button",{type:"button","aria-haspopup":"dialog","aria-expanded":open,onClick:toggle},trigger);return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("span",{...mergeTargetProps({className:cx("cs-popover",className)},rootProps),ref},triggerNode,open?floating.render(React.createElement("div",{className:cx("cs-popover__panel",align==="end"&&"cs-popover__panel--end"),role:"dialog","aria-label":ariaLabel??(ariaLabelledBy?void 0:t("panel")),"aria-labelledby":ariaLabelledBy,ref:mergedNativeRef},children)):null))});Popover.displayName="Popover";Object.assign(__ds_scope,{Popover})})()}catch(e){__ds_ns.__errors.push({path:"components/overlays/Popover.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useComposedRefs}=__ds_scope;const{mergeTargetProps}=__ds_scope;const{makeT,useLang}=__ds_scope;const{useOverlayLayer,overlayScopeContext}=__ds_scope;const{cx}=__ds_scope;const{notifyClosed}=__ds_scope;const Tour=React.forwardRef(function Tour2({steps=[],open,onClose,onOpenChange,lang,className,rootProps},forwardedRef){const[storedIndex,setI]=React.useState(0);const i=Math.max(0,Math.min(storedIndex,steps.length-1));if(storedIndex!==i)setI(i);const[rect,setRect]=React.useState(null);const[pop,setPop]=React.useState({top:80,left:40});const[ref,L,localeMessages]=useLang(lang);const t=makeT("Tour",L,localeMessages);const panel=React.useRef(null);const mergedNativeRef=useComposedRefs(panel,forwardedRef);const titleId=React.useId();const backdrop=React.useRef(null);const closeRef=React.useRef(null);closeRef.current=()=>notifyClosed(onOpenChange,onClose);const{scope}=useOverlayLayer({open:!!open&&steps.length>0,kind:"modal",trapFocus:true,panelRef:panel,backdropRef:backdrop,onEscape:()=>closeRef.current()});React.useEffect(()=>{if(open)setI(0)},[open]);const target=steps[i]?.target;React.useEffect(()=>{if(!open||!target){setRect(null);setPop({top:80,left:40});return void 0}let frame;let previous;const measure=()=>{let el=null;try{el=document.querySelector(target)}catch(e){el=null}const r=el?.getBoundingClientRect();const next=r?{x:r.left-6,y:r.top-6,w:r.width+12,h:r.height+12}:null;const position=next?{top:Math.min(window.innerHeight-170,next.y+next.h+12),left:Math.max(12,Math.min(window.innerWidth-292,next.x))}:{top:80,left:40};const signature=JSON.stringify([next,position]);if(signature!==previous){previous=signature;setRect(next);setPop(position)}frame=requestAnimationFrame(measure)};measure();return()=>cancelAnimationFrame(frame)},[open,target]);if(!open||!steps.length)return React.createElement("span",{ref,style:{display:"none"}});const s=steps[i];const last=i===steps.length-1;return React.createElement(overlayScopeContext.Provider,{value:scope},React.createElement("div",{ref,...mergeTargetProps({"className":cx("cs-tour",className)},rootProps,[])},React.createElement("div",{ref:backdrop,className:"cs-tour__scrim",onClick:()=>closeRef.current()}),rect?React.createElement("div",{className:"cs-tour__hole",style:{left:rect.x,top:rect.y,width:rect.w,height:rect.h}}):null,React.createElement("div",{ref:mergedNativeRef,tabIndex:-1,className:"cs-tour__pop",role:"dialog","aria-modal":"true","aria-labelledby":titleId,style:{left:pop.left,top:pop.top}},React.createElement("b",{id:titleId},s.title),s.body||s.body===0?React.createElement("p",null,s.body):null,React.createElement("div",{className:"cs-tour__bar"},React.createElement("span",{className:"cs-tour__count"},i+1+" / "+steps.length),React.createElement("span",{className:"cs-tour__btns"},React.createElement("button",{type:"button",className:"cs-button cs-button--ghost cs-button--xs",onClick:()=>closeRef.current()},t("skip")),i>0?React.createElement("button",{type:"button",className:"cs-button cs-button--secondary cs-button--xs",onClick:()=>setI(i-1)},t("back")):null,React.createElement("button",{type:"button",className:"cs-button cs-button--primary cs-button--xs",onClick:()=>last?closeRef.current():setI(i+1)},last?t("done"):t("next")))))))});Tour.displayName="Tour";Object.assign(__ds_scope,{Tour})})()}catch(e){__ds_ns.__errors.push({path:"components/overlays/Tour.jsx",error:String(e&&e.message||e)})}try{(()=>{const{useFieldAssociation}=__ds_scope;const{useComposedRefs}=__ds_scope;const{cx}=__ds_scope;const TextField=React.forwardRef(function TextField2({id,label,description,error,disabled=false,readOnly=false,className,children,...props},forwardedRef){const mergedNativeRef=useComposedRefs(forwardedRef);const hasError=Boolean(error)||error===0;const hasDescription=Boolean(description)||description===0;const generatedId=React.useId();const inputId=id??generatedId;const hasLabel=typeof label==="string"?label.trim().length>0:Boolean(label)||label===0;const labelId=hasLabel?inputId+"-label":void 0;const labelledBy=props["aria-labelledby"]??(props["aria-label"]==null?labelId:void 0);const descriptionId=hasDescription?`${inputId}-description`:void 0;const errorId=hasError?`${inputId}-error`:void 0;const control=useFieldAssociation({...props,id:inputId,"aria-labelledby":labelledBy},{description,error,nativeRequired:true,requiredSupported:true});if(props["aria-labelledby"]!=null||props["aria-label"]!=null){control["aria-labelledby"]=labelledBy;control["aria-label"]=props["aria-label"]}const invalid=control["aria-invalid"]===true||control["aria-invalid"]==="true";return React.createElement("label",{className:cx("cs-field",disabled&&"is-disabled",invalid&&"is-invalid",className),htmlFor:inputId},React.createElement("span",{id:labelId,className:"cs-field__label"},label),hasDescription?React.createElement("span",{id:descriptionId,className:"cs-field__description"},description):null,React.createElement("input",{...control,id:inputId,disabled,readOnly,"aria-invalid":control["aria-invalid"],"aria-labelledby":control["aria-labelledby"],"aria-describedby":control["aria-describedby"],className:"cs-field__control",ref:mergedNativeRef}),hasError?React.createElement("span",{id:errorId,className:"cs-field__error",role:"alert"},error):null)});TextField.displayName="TextField";Object.assign(__ds_scope,{TextField})})()}catch(e){__ds_ns.__errors.push({path:"components/textfield/TextField.jsx",error:String(e&&e.message||e)})}try{(()=>{const tokens={"$meta":{"system":"CyberSkill Design System","version":"2.5.0","generated":"2026-07-23","note":"Generated from tokens/*.css. Root grouped by category; theme/element scopes carry overrides only. Regenerate after any token change (see docs/conventions.md).","declarationGraph":{"path":"declarations.json","schemaVersion":1,"sha256":"5d4246a9e0c35a9edacef8681b0b6c06da4522112e7663c8c1fd739091dc4521","declarations":1080,"publicDeclarations":397,"publicNames":216,"privateDeclarations":683}},"root":{"color":{"--cs-color-brand-umber":"#45210E","--cs-color-brand-ochre":"#F4BA17","--cs-color-surface-page":"#FFFDF8","--cs-color-surface-panel":"#FFFFFF","--cs-color-surface-raised":"#FBF4E9","--cs-color-text-primary":"#45210E","--cs-color-text-inverse":"#FFFFFF","--cs-color-text-accent":"#6E3B0E","--cs-color-text-muted":"#3F2D21","--cs-color-semantic-success":"#166534","--cs-color-semantic-danger":"#B42318","--cs-color-semantic-warning":"#92400E","--cs-color-semantic-info":"#1D4ED8","--cs-color-semantic-success-fg":"#FFFFFF","--cs-color-semantic-danger-fg":"#FFFFFF","--cs-color-semantic-warning-fg":"#FFFFFF","--cs-color-semantic-info-fg":"#FFFFFF","--cs-color-accent-ochre":"#F4BA17","--cs-color-border-default":"#E7D9C6","--cs-color-link":"#6E3B0E","--cs-color-link-hover":"#45210E","--cs-color-semantic-success-text":"#042D13","--cs-color-semantic-danger-text":"#4B0502","--cs-color-semantic-warning-text":"#441801","--cs-color-semantic-info-text":"#000A75"},"component":{"--cs-component-button-primary-bg":"#45210E","--cs-component-button-primary-fg":"#FFFFFF","--cs-component-button-gap":"8px","--cs-component-button-radius":"8px","--cs-component-button-xs-paddingY":"var(--cs-component-button-xs-padding-y)","--cs-component-button-xs-paddingX":"var(--cs-component-button-xs-padding-x)","--cs-component-button-xs-minHeight":"var(--cs-component-button-xs-min-height)","--cs-component-button-xs-minWidth":"var(--cs-component-button-xs-min-width)","--cs-component-button-xs-minHeight-coarse":"var(--cs-component-button-xs-min-height-coarse)","--cs-component-button-sm-paddingY":"var(--cs-component-button-sm-padding-y)","--cs-component-button-sm-paddingX":"var(--cs-component-button-sm-padding-x)","--cs-component-button-sm-minHeight":"var(--cs-component-button-sm-min-height)","--cs-component-button-sm-minHeight-coarse":"var(--cs-component-button-sm-min-height-coarse)","--cs-component-button-md-paddingY":"var(--cs-component-button-md-padding-y)","--cs-component-button-md-paddingX":"var(--cs-component-button-md-padding-x)","--cs-component-button-md-minHeight":"var(--cs-component-button-md-min-height)","--cs-component-button-md-minHeight-coarse":"var(--cs-component-button-md-min-height-coarse)","--cs-component-button-lg-paddingY":"var(--cs-component-button-lg-padding-y)","--cs-component-button-lg-paddingX":"var(--cs-component-button-lg-padding-x)","--cs-component-button-lg-minHeight":"var(--cs-component-button-lg-min-height)","--cs-component-textfield-border-default":"#BFA58F","--cs-component-textfield-paddingY":"var(--cs-component-textfield-padding-y)","--cs-component-textfield-paddingX":"var(--cs-component-textfield-padding-x)","--cs-component-textfield-minHeight":"var(--cs-component-textfield-min-height)","--cs-focus-ring":"3px","--cs-component-button-xs-padding-y":"4px","--cs-component-button-xs-padding-x":"10px","--cs-component-button-xs-min-height":"28px","--cs-component-button-xs-min-width":"28px","--cs-component-button-xs-min-height-coarse":"44px","--cs-component-button-sm-padding-y":"8px","--cs-component-button-sm-padding-x":"14px","--cs-component-button-sm-min-height":"36px","--cs-component-button-sm-min-height-coarse":"44px","--cs-component-button-md-padding-y":"12px","--cs-component-button-md-padding-x":"20px","--cs-component-button-md-min-height":"44px","--cs-component-button-md-min-height-coarse":"44px","--cs-component-button-lg-padding-y":"16px","--cs-component-button-lg-padding-x":"28px","--cs-component-button-lg-min-height":"52px","--cs-component-textfield-padding-y":"10px","--cs-component-textfield-padding-x":"12px","--cs-component-textfield-min-height":"44px"},"accent":{"--cs-accent":"#F4BA17","--cs-accent-strong":"#916D11","--cs-accent-bright":"#F4BA17","--cs-accent-on":"#45210E","--cs-accent-tint":"#FBF4E9","--cs-accent-ink":"#45210E","--cs-accent-glow":"rgba(244, 186, 23, 0.48)","--cs-accent-grad-a":"#F4BA17","--cs-accent-grad-b":"#C4B78F","--cs-accent-on-strong":"#FFFFFF"},"depth":{"--cs-depth-bg":"0","--cs-depth-section":"5","--cs-depth-card":"10","--cs-depth-nav":"50","--cs-depth-modal":"100","--cs-depth-toast":"200","--cs-depth-dropdown":"60","--cs-depth-overlay":"80"},"glass":{"--cs-glass-whisper-blur":"8px","--cs-glass-whisper-saturate":"110%","--cs-glass-whisper-opacity":"60%","--cs-glass-light-blur":"12px","--cs-glass-light-saturate":"130%","--cs-glass-light-opacity":"70%","--cs-glass-standard-blur":"16px","--cs-glass-standard-saturate":"150%","--cs-glass-standard-opacity":"80%","--cs-glass-heavy-blur":"24px","--cs-glass-heavy-saturate":"180%","--cs-glass-heavy-opacity":"90%"},"shadow":{"--cs-shadow-xs":"0 1px 2px rgba(69, 33, 14, 0.06)","--cs-shadow-sm":"0 1px 3px rgba(69, 33, 14, 0.04), 0 8px 24px rgba(69, 33, 14, 0.06)","--cs-shadow-md":"0 12px 30px rgba(31, 19, 11, 0.18)","--cs-shadow-lg":"0 20px 60px rgba(69, 33, 14, 0.18)","--cs-shadow-xl":"0 24px 80px rgba(31, 19, 11, 0.26)"},"duration":{"--cs-duration-instant":"80ms","--cs-duration-fast":"120ms","--cs-duration-base":"200ms","--cs-duration-slow":"320ms"},"ease":{"--cs-ease-standard":"cubic-bezier(0.2, 0, 0, 1)","--cs-ease-entrance":"cubic-bezier(0, 0, 0, 1)","--cs-ease-exit":"cubic-bezier(0.4, 0, 1, 1)","--cs-ease-emphasized":"cubic-bezier(0.2, 0, 0, 1)"},"space":{"--cs-space-0":"0px","--cs-space-1":"4px","--cs-space-2":"8px","--cs-space-3":"12px","--cs-space-4":"16px","--cs-space-5":"20px","--cs-space-6":"24px","--cs-space-8":"32px","--cs-space-10":"40px","--cs-space-12":"48px","--cs-space-16":"64px","--cs-space-20":"80px","--cs-space-24":"96px"},"radius":{"--cs-radius-sm":"4px","--cs-radius-md":"8px","--cs-radius-lg":"14px","--cs-radius-full":"999px"},"breakpoint":{"--cs-breakpoint-xs":"0px","--cs-breakpoint-phone":"360px","--cs-breakpoint-sm":"640px","--cs-breakpoint-md":"768px","--cs-breakpoint-lg":"1024px","--cs-breakpoint-xl":"1280px","--cs-breakpoint-2xl":"1536px"},"container":{"--cs-container-max":"1320px","--cs-prose-measure":"45rem","--cs-scroll-padding-block-start":"var(--cs-space-4)","--cs-scroll-padding-block-end":"var(--cs-space-4)"},"font":{"--cs-font-family-ui":"'Be Vietnam Pro', ui-sans-serif, system-ui, sans-serif","--cs-font-family-display":"'Space Grotesk', 'Be Vietnam Pro', ui-sans-serif, system-ui, sans-serif","--cs-font-family-mono":"'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace","--cs-font-weight-regular":"400","--cs-font-weight-medium":"500","--cs-font-weight-semibold":"600","--cs-font-weight-bold":"700","--cs-font-weight-extrabold":"800","--cs-font-lineHeight-body":"var(--cs-font-line-height-body)","--cs-font-lineHeight-heading":"var(--cs-font-line-height-heading)","--cs-font-lineHeight-tight":"var(--cs-font-line-height-tight)","--cs-font-size-2xs":"0.6875rem","--cs-font-size-xs":"0.75rem","--cs-font-size-sm":"0.875rem","--cs-font-size-base":"1rem","--cs-font-size-md":"1.125rem","--cs-font-size-lg":"1.25rem","--cs-font-size-xl":"1.5rem","--cs-font-size-2xl":"1.875rem","--cs-font-size-3xl":"2.25rem","--cs-font-size-4xl":"3rem","--cs-font-size-5xl":"3.75rem","--cs-font-line-height-body":"1.5","--cs-font-line-height-heading":"1.35","--cs-font-line-height-tight":"1.15"},"text":{"--cs-text-display":"var(--cs-font-size-5xl)","--cs-text-h1":"var(--cs-font-size-3xl)","--cs-text-h2":"var(--cs-font-size-2xl)","--cs-text-h3":"var(--cs-font-size-xl)","--cs-text-h4":"var(--cs-font-size-lg)","--cs-text-body-lg":"var(--cs-font-size-md)","--cs-text-body":"var(--cs-font-size-base)","--cs-text-secondary":"var(--cs-font-size-sm)","--cs-text-micro":"var(--cs-font-size-2xs)","--cs-text-caption":"var(--cs-font-size-xs)","--cs-text-eyebrow":"var(--cs-font-size-xs)"},"letter":{"--cs-letter-spacing-tight":"-0.01em","--cs-letter-spacing-normal":"0","--cs-letter-spacing-caps":"0.08em"},"heading":{"--cs-heading-family":"var(--cs-font-family-ui)","--cs-heading-weight-strong":"var(--cs-font-weight-extrabold)","--cs-heading-weight":"var(--cs-font-weight-bold)","--cs-heading-tracking":"var(--cs-letter-spacing-tight)"},"icon":{"--cs-icon-sm":"16px","--cs-icon-md":"20px","--cs-icon-lg":"24px"},"doc":{"--cs-doc-ink":"#1A1614","--cs-doc-slate":"#26323A","--cs-doc-fill":"#FDE68A","--cs-doc-fill-ink":"#1A1614"},"density":{"--cs-density-space-1":"var(--cs-space-1)","--cs-density-space-2":"var(--cs-space-2)","--cs-density-space-3":"var(--cs-space-3)","--cs-density-space-4":"var(--cs-space-4)","--cs-density-space-5":"var(--cs-space-5)","--cs-density-space-6":"var(--cs-space-6)","--cs-density-control-gap":"var(--cs-component-button-gap)"}},"themes":{"dark":{"--cs-color-surface-page":"#1a1108","--cs-color-surface-panel":"#221710","--cs-color-surface-raised":"#2b1e14","--cs-color-text-primary":"#f5ead9","--cs-color-text-inverse":"#1a1108","--cs-color-text-accent":"#FECD5D","--cs-color-text-muted":"#E9D6C2","--cs-color-semantic-success":"#4ADE80","--cs-color-semantic-danger":"#FC9895","--cs-color-semantic-warning":"#FBBF24","--cs-color-semantic-info":"#B5D4FD","--cs-color-semantic-success-fg":"#1a1108","--cs-color-semantic-danger-fg":"#1a1108","--cs-color-semantic-warning-fg":"#1a1108","--cs-color-semantic-info-fg":"#1a1108","--cs-color-semantic-success-text":"#68F798","--cs-color-semantic-danger-text":"#FFD2CF","--cs-color-semantic-warning-text":"#FFD887","--cs-color-semantic-info-text":"#C7DFFF","--cs-color-border-default":"#4a3a2c","--cs-color-link":"#FECD5D","--cs-color-link-hover":"#f5ead9","--cs-component-button-primary-bg":"#f4ba17","--cs-component-button-primary-fg":"#1a1108","--cs-component-textfield-border-default":"#5a4636","--cs-shadow-xs":"0 1px 2px rgba(0, 0, 0, 0.40)","--cs-shadow-sm":"0 1px 3px rgba(0, 0, 0, 0.34), 0 8px 24px rgba(0, 0, 0, 0.42)","--cs-shadow-md":"0 12px 30px rgba(0, 0, 0, 0.50)","--cs-shadow-lg":"0 20px 60px rgba(0, 0, 0, 0.55)","--cs-shadow-xl":"0 24px 80px rgba(0, 0, 0, 0.62)"},"system":{"--cs-color-surface-page":"#1a1108","--cs-color-surface-panel":"#221710","--cs-color-surface-raised":"#2b1e14","--cs-color-text-primary":"#f5ead9","--cs-color-text-inverse":"#1a1108","--cs-color-text-accent":"#FECD5D","--cs-color-text-muted":"#E9D6C2","--cs-color-semantic-success":"#4ADE80","--cs-color-semantic-danger":"#FC9895","--cs-color-semantic-warning":"#FBBF24","--cs-color-semantic-info":"#B5D4FD","--cs-color-semantic-success-fg":"#1a1108","--cs-color-semantic-danger-fg":"#1a1108","--cs-color-semantic-warning-fg":"#1a1108","--cs-color-semantic-info-fg":"#1a1108","--cs-color-semantic-success-text":"#68F798","--cs-color-semantic-danger-text":"#FFD2CF","--cs-color-semantic-warning-text":"#FFD887","--cs-color-semantic-info-text":"#C7DFFF","--cs-color-border-default":"#4a3a2c","--cs-color-link":"#FECD5D","--cs-color-link-hover":"#f5ead9","--cs-component-button-primary-bg":"#f4ba17","--cs-component-button-primary-fg":"#1a1108","--cs-component-textfield-border-default":"#5a4636","--cs-shadow-xs":"0 1px 2px rgba(0, 0, 0, 0.40)","--cs-shadow-sm":"0 1px 3px rgba(0, 0, 0, 0.34), 0 8px 24px rgba(0, 0, 0, 0.42)","--cs-shadow-md":"0 12px 30px rgba(0, 0, 0, 0.50)","--cs-shadow-lg":"0 20px 60px rgba(0, 0, 0, 0.55)","--cs-shadow-xl":"0 24px 80px rgba(0, 0, 0, 0.62)"}},"elements":{"tho.sand":{"--cs-accent":"#F9E3A7","--cs-accent-strong":"#856A03","--cs-accent-bright":"#FDEAB7","--cs-accent-on":"#271E06","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#FEF8E7","--cs-accent-ink":"#292108","--cs-accent-glow":"rgba(249, 227, 167, 0.48)","--cs-accent-grad-a":"#F9E3A7","--cs-accent-grad-b":"#C4B78F","--cs-color-text-accent":"#695300","--cs-color-link":"#695300"},"tho":{"--cs-accent":"#F4BA17","--cs-accent-strong":"#916D11","--cs-accent-bright":"#F4BA17","--cs-accent-on":"#45210E","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#FBF4E9","--cs-accent-ink":"#45210E","--cs-accent-glow":"rgba(244, 186, 23, 0.48)","--cs-accent-grad-a":"#F4BA17","--cs-accent-grad-b":"#C4B78F","--cs-color-text-accent":"#6E3B0E","--cs-color-link":"#644A05"},"tho.clay":{"--cs-accent":"#723E06","--cs-accent-strong":"#5A3004","--cs-accent-bright":"#F2C5A3","--cs-accent-on":"#080200","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#FCEEE3","--cs-accent-ink":"#321B07","--cs-accent-glow":"rgba(114, 62, 6, 0.48)","--cs-accent-grad-a":"#723E06","--cs-accent-grad-b":"#C4B78F","--cs-color-text-accent":"#462402","--cs-color-link":"#462402"},"hoa.plasma":{"--cs-accent":"#FEDBDC","--cs-accent-strong":"#896163","--cs-accent-bright":"#FFE3E4","--cs-accent-on":"#281B1C","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#FFF5F5","--cs-accent-ink":"#2B1E1E","--cs-accent-glow":"rgba(254, 219, 220, 0.48)","--cs-accent-grad-a":"#FEDBDC","--cs-accent-grad-b":"#F4BA17","--cs-color-text-accent":"#714B4D","--cs-color-link":"#714B4D"},"hoa":{"--cs-accent":"#FC9C69","--cs-accent-strong":"#96440B","--cs-accent-bright":"#FFD3BD","--cs-accent-on":"#361402","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#FFF1EA","--cs-accent-ink":"#3A1501","--cs-accent-glow":"rgba(252, 156, 105, 0.48)","--cs-accent-grad-a":"#FC9C69","--cs-accent-grad-b":"#F4BA17","--cs-color-text-accent":"#793609","--cs-color-link":"#793609"},"hoa.lava":{"--cs-accent":"#93050F","--cs-accent-strong":"#760008","--cs-accent-bright":"#FFBCB4","--cs-accent-on":"#0D0000","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#FFEBE9","--cs-accent-ink":"#400C0B","--cs-accent-glow":"rgba(147, 5, 15, 0.48)","--cs-accent-grad-a":"#93050F","--cs-accent-grad-b":"#F4BA17","--cs-color-text-accent":"#550306","--cs-color-link":"#550306"},"thuy.mist":{"--cs-accent":"#9DF7F5","--cs-accent-strong":"#037D7D","--cs-accent-bright":"#B1FBF9","--cs-accent-on":"#012525","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#E6FDFC","--cs-accent-ink":"#032727","--cs-accent-glow":"rgba(157, 247, 245, 0.48)","--cs-accent-grad-a":"#9DF7F5","--cs-accent-grad-b":"#82CF66","--cs-color-text-accent":"#116060","--cs-color-link":"#116060"},"thuy":{"--cs-accent":"#00CEE4","--cs-accent-strong":"#166B76","--cs-accent-bright":"#94EFFD","--cs-accent-on":"#012429","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#DFFBFF","--cs-accent-ink":"#03272C","--cs-accent-glow":"rgba(0, 206, 228, 0.48)","--cs-accent-grad-a":"#00CEE4","--cs-accent-grad-b":"#82CF66","--cs-color-text-accent":"#0D535C","--cs-color-link":"#0D535C"},"thuy.ocean":{"--cs-accent":"#06556F","--cs-accent-strong":"#034257","--cs-accent-bright":"#A9D8ED","--cs-accent-on":"#001721","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#E5F3FA","--cs-accent-ink":"#092531","--cs-accent-glow":"rgba(6, 85, 111, 0.48)","--cs-accent-grad-a":"#06556F","--cs-accent-grad-b":"#82CF66","--cs-color-text-accent":"#003142","--cs-color-link":"#003142"},"moc.bamboo":{"--cs-accent":"#DAEFAA","--cs-accent-strong":"#62780E","--cs-accent-bright":"#E2F4BA","--cs-accent-on":"#1C2307","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#F5FBE8","--cs-accent-ink":"#1E250A","--cs-accent-glow":"rgba(218, 239, 170, 0.48)","--cs-accent-grad-a":"#DAEFAA","--cs-accent-grad-b":"#FC9C69","--cs-color-text-accent":"#4A5B02","--cs-color-link":"#4A5B02"},"moc":{"--cs-accent":"#82CF66","--cs-accent-strong":"#2B7100","--cs-accent-bright":"#B9F0A6","--cs-accent-on":"#0A2700","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#EAFAE5","--cs-accent-ink":"#0D2902","--cs-accent-glow":"rgba(130, 207, 102, 0.48)","--cs-accent-grad-a":"#82CF66","--cs-accent-grad-b":"#FC9C69","--cs-color-text-accent":"#24570B","--cs-color-link":"#24570B"},"moc.forest":{"--cs-accent":"#105C36","--cs-accent-strong":"#0A4829","--cs-accent-bright":"#ACDDBD","--cs-accent-on":"#011C0D","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#E6F5EB","--cs-accent-ink":"#0B2818","--cs-accent-glow":"rgba(16, 92, 54, 0.48)","--cs-accent-grad-a":"#105C36","--cs-accent-grad-b":"#FC9C69","--cs-color-text-accent":"#04361D","--cs-color-link":"#04361D"},"kim.titanium":{"--cs-accent":"#D3E7FC","--cs-accent-strong":"#56708B","--cs-accent-bright":"#DDEDFF","--cs-accent-on":"#182029","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#F3F8FE","--cs-accent-ink":"#1A232B","--cs-accent-glow":"rgba(211, 231, 252, 0.48)","--cs-accent-grad-a":"#D3E7FC","--cs-accent-grad-b":"#00CEE4","--cs-color-text-accent":"#3D5670","--cs-color-link":"#3D5670"},"kim":{"--cs-accent":"#C4B78F","--cs-accent-strong":"#6A5E3A","--cs-accent-bright":"#E8DEBD","--cs-accent-on":"#241F0F","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#F8F4EA","--cs-accent-ink":"#262112","--cs-accent-glow":"rgba(196, 183, 143, 0.48)","--cs-accent-grad-a":"#C4B78F","--cs-accent-grad-b":"#00CEE4","--cs-color-text-accent":"#564B27","--cs-color-link":"#564B27"},"kim.steel":{"--cs-accent":"#384D72","--cs-accent-strong":"#293C5C","--cs-accent-bright":"#BED0F0","--cs-accent-on":"#020818","--cs-accent-on-strong":"#FFFFFF","--cs-accent-tint":"#EBF1FB","--cs-accent-ink":"#182232","--cs-accent-glow":"rgba(56, 77, 114, 0.48)","--cs-accent-grad-a":"#384D72","--cs-accent-grad-b":"#00CEE4","--cs-color-text-accent":"#1B2E4C","--cs-color-link":"#1B2E4C"}},"densities":{"compact":{"--cs-density-space-1":"3px","--cs-density-space-2":"6px","--cs-density-space-3":"9px","--cs-density-space-4":"12px","--cs-density-space-5":"16px","--cs-density-space-6":"18px","--cs-density-control-gap":"6px","--cs-component-button-gap":"6px","--cs-component-button-xs-paddingY":"var(--cs-component-button-xs-padding-y)","--cs-component-button-xs-padding-y":"3px","--cs-component-button-xs-paddingX":"var(--cs-component-button-xs-padding-x)","--cs-component-button-xs-padding-x":"8px","--cs-component-button-sm-paddingY":"var(--cs-component-button-sm-padding-y)","--cs-component-button-sm-padding-y":"6px","--cs-component-button-sm-paddingX":"var(--cs-component-button-sm-padding-x)","--cs-component-button-sm-padding-x":"12px","--cs-component-button-md-paddingY":"var(--cs-component-button-md-padding-y)","--cs-component-button-md-padding-y":"10px","--cs-component-button-md-paddingX":"var(--cs-component-button-md-padding-x)","--cs-component-button-md-padding-x":"16px","--cs-component-button-lg-paddingY":"var(--cs-component-button-lg-padding-y)","--cs-component-button-lg-padding-y":"12px","--cs-component-button-lg-paddingX":"var(--cs-component-button-lg-padding-x)","--cs-component-button-lg-padding-x":"22px","--cs-component-textfield-paddingY":"var(--cs-component-textfield-padding-y)","--cs-component-textfield-padding-y":"8px","--cs-component-textfield-paddingX":"var(--cs-component-textfield-padding-x)","--cs-component-textfield-padding-x":"10px"},"comfortable":{"--cs-density-space-1":"var(--cs-space-1)","--cs-density-space-2":"var(--cs-space-2)","--cs-density-space-3":"var(--cs-space-3)","--cs-density-space-4":"var(--cs-space-4)","--cs-density-space-5":"var(--cs-space-5)","--cs-density-space-6":"var(--cs-space-6)","--cs-density-control-gap":"var(--cs-component-button-gap)","--cs-component-button-gap":"8px","--cs-component-button-xs-padding-y":"4px","--cs-component-button-xs-paddingY":"var(--cs-component-button-xs-padding-y)","--cs-component-button-xs-padding-x":"10px","--cs-component-button-xs-paddingX":"var(--cs-component-button-xs-padding-x)","--cs-component-button-sm-padding-y":"8px","--cs-component-button-sm-paddingY":"var(--cs-component-button-sm-padding-y)","--cs-component-button-sm-padding-x":"14px","--cs-component-button-sm-paddingX":"var(--cs-component-button-sm-padding-x)","--cs-component-button-md-padding-y":"12px","--cs-component-button-md-paddingY":"var(--cs-component-button-md-padding-y)","--cs-component-button-md-padding-x":"20px","--cs-component-button-md-paddingX":"var(--cs-component-button-md-padding-x)","--cs-component-button-lg-padding-y":"16px","--cs-component-button-lg-paddingY":"var(--cs-component-button-lg-padding-y)","--cs-component-button-lg-padding-x":"28px","--cs-component-button-lg-paddingX":"var(--cs-component-button-lg-padding-x)","--cs-component-textfield-padding-y":"10px","--cs-component-textfield-paddingY":"var(--cs-component-textfield-padding-y)","--cs-component-textfield-padding-x":"12px","--cs-component-textfield-paddingX":"var(--cs-component-textfield-padding-x)"}},"contrasts":{"high-light":{"--cs-color-border-default":"#9a8060","--cs-color-text-muted":"#45210E"},"high-dark":{"--cs-color-border-default":"#7a6450","--cs-color-text-muted":"#F5EAD9"}}};Object.assign(__ds_scope,{tokens,__ds_default_tokens_tokens_9gob35:tokens})})()}catch(e){__ds_ns.__errors.push({path:"tokens/tokens.js",error:String(e&&e.message||e)})}__ds_ns.AIDisclosureBadge=__ds_scope.AIDisclosureBadge;__ds_ns.ChatMessage=__ds_scope.ChatMessage;__ds_ns.CitationList=__ds_scope.CitationList;__ds_ns.ConfidenceMeter=__ds_scope.ConfidenceMeter;__ds_ns.HumanReviewGate=__ds_scope.HumanReviewGate;__ds_ns.PromptInput=__ds_scope.PromptInput;__ds_ns.PromptSuggestions=__ds_scope.PromptSuggestions;__ds_ns.TypingIndicator=__ds_scope.TypingIndicator;__ds_ns.LumiAvatar=__ds_scope.LumiAvatar;__ds_ns.Button=__ds_scope.Button;__ds_ns.ButtonGroup=__ds_scope.ButtonGroup;__ds_ns.FloatingActionButton=__ds_scope.FloatingActionButton;__ds_ns.Accordion=__ds_scope.Accordion;__ds_ns.AspectRatio=__ds_scope.AspectRatio;__ds_ns.Avatar=__ds_scope.Avatar;__ds_ns.AvatarGroup=__ds_scope.AvatarGroup;__ds_ns.Card=__ds_scope.Card;__ds_ns.CardHeader=__ds_scope.CardHeader;__ds_ns.CardBody=__ds_scope.CardBody;__ds_ns.CardFooter=__ds_scope.CardFooter;__ds_ns.Carousel=__ds_scope.Carousel;__ds_ns.Chart=__ds_scope.Chart;__ds_ns.CodeBlock=__ds_scope.CodeBlock;__ds_ns.Collapsible=__ds_scope.Collapsible;__ds_ns.Comment=__ds_scope.Comment;__ds_ns.DescriptionList=__ds_scope.DescriptionList;__ds_ns.Divider=__ds_scope.Divider;__ds_ns.Image=__ds_scope.Image;__ds_ns.Item=__ds_scope.Item;__ds_ns.Kbd=__ds_scope.Kbd;__ds_ns.List=__ds_scope.List;__ds_ns.ListItem=__ds_scope.ListItem;__ds_ns.Masonry=__ds_scope.Masonry;__ds_ns.QRCode=__ds_scope.QRCode;__ds_ns.ScrollArea=__ds_scope.ScrollArea;__ds_ns.Sortable=__ds_scope.Sortable;__ds_ns.Splitter=__ds_scope.Splitter;__ds_ns.Stat=__ds_scope.Stat;__ds_ns.Terminal=__ds_scope.Terminal;__ds_ns.Timeline=__ds_scope.Timeline;__ds_ns.Tooltip=__ds_scope.Tooltip;__ds_ns.Tree=__ds_scope.Tree;__ds_ns.Watermark=__ds_scope.Watermark;__ds_ns.DataGrid=__ds_scope.DataGrid;__ds_ns.DataTable=__ds_scope.DataTable;__ds_ns.TreeTable=__ds_scope.TreeTable;__ds_ns.Dialog=__ds_scope.Dialog;__ds_ns.Alert=__ds_scope.Alert;__ds_ns.Badge=__ds_scope.Badge;__ds_ns.EmptyState=__ds_scope.EmptyState;__ds_ns.ProgressBar=__ds_scope.ProgressBar;__ds_ns.Result=__ds_scope.Result;__ds_ns.Skeleton=__ds_scope.Skeleton;__ds_ns.Spinner=__ds_scope.Spinner;__ds_ns.StatusIndicator=__ds_scope.StatusIndicator;__ds_ns.Tag=__ds_scope.Tag;__ds_ns.ToastStack=__ds_scope.ToastStack;__ds_ns.Toast=__ds_scope.Toast;__ds_ns.Calendar=__ds_scope.Calendar;__ds_ns.Cascader=__ds_scope.Cascader;__ds_ns.Checkbox=__ds_scope.Checkbox;__ds_ns.ColorPicker=__ds_scope.ColorPicker;__ds_ns.Combobox=__ds_scope.Combobox;__ds_ns.DatePicker=__ds_scope.DatePicker;__ds_ns.Editor=__ds_scope.Editor;__ds_ns.FileUpload=__ds_scope.FileUpload;__ds_ns.Form=__ds_scope.Form;__ds_ns.FormField=__ds_scope.FormField;__ds_ns.FormFieldArray=__ds_scope.FormFieldArray;__ds_ns.FormWizard=__ds_scope.FormWizard;__ds_ns.InlineEdit=__ds_scope.InlineEdit;__ds_ns.InputGroup=__ds_scope.InputGroup;__ds_ns.InputOTP=__ds_scope.InputOTP;__ds_ns.Mentions=__ds_scope.Mentions;__ds_ns.NativeSelect=__ds_scope.NativeSelect;__ds_ns.NumberField=__ds_scope.NumberField;__ds_ns.Radio=__ds_scope.Radio;__ds_ns.RadioGroup=__ds_scope.RadioGroup;__ds_ns.Rating=__ds_scope.Rating;__ds_ns.SearchField=__ds_scope.SearchField;__ds_ns.SegmentedControl=__ds_scope.SegmentedControl;__ds_ns.Select=__ds_scope.Select;__ds_ns.Slider=__ds_scope.Slider;__ds_ns.Switch=__ds_scope.Switch;__ds_ns.TagInput=__ds_scope.TagInput;__ds_ns.Textarea=__ds_scope.Textarea;__ds_ns.TimePicker=__ds_scope.TimePicker;__ds_ns.Toggle=__ds_scope.Toggle;__ds_ns.Transfer=__ds_scope.Transfer;__ds_ns.TreeSelect=__ds_scope.TreeSelect;__ds_ns.EDITOR_SCHEMA=__ds_scope.EDITOR_SCHEMA;__ds_ns.LocaleProvider=__ds_scope.LocaleProvider;__ds_ns.useMessages=__ds_scope.useMessages;__ds_ns.CS_ICONS=__ds_scope.CS_ICONS;__ds_ns.Icon=__ds_scope.Icon;__ds_ns.Logo=__ds_scope.Logo;__ds_ns.CS_LOGO_VIEWBOX=__ds_scope.CS_LOGO_VIEWBOX;__ds_ns.CS_LOGO_MARK_INNER=__ds_scope.CS_LOGO_MARK_INNER;__ds_ns.Anchor=__ds_scope.Anchor;__ds_ns.BackTop=__ds_scope.BackTop;__ds_ns.Breadcrumb=__ds_scope.Breadcrumb;__ds_ns.CommandPalette=__ds_scope.CommandPalette;__ds_ns.Dock=__ds_scope.Dock;__ds_ns.HotKeys=__ds_scope.HotKeys;__ds_ns.Link=__ds_scope.Link;__ds_ns.Menu=__ds_scope.Menu;__ds_ns.MenuItem=__ds_scope.MenuItem;__ds_ns.Menubar=__ds_scope.Menubar;__ds_ns.NavigationMenu=__ds_scope.NavigationMenu;__ds_ns.Pagination=__ds_scope.Pagination;__ds_ns.Sidebar=__ds_scope.Sidebar;__ds_ns.NavItem=__ds_scope.NavItem;__ds_ns.Steps=__ds_scope.Steps;__ds_ns.Tabs=__ds_scope.Tabs;__ds_ns.Tab=__ds_scope.Tab;__ds_ns.Toolbar=__ds_scope.Toolbar;__ds_ns.AlertDialog=__ds_scope.AlertDialog;__ds_ns.ContextMenu=__ds_scope.ContextMenu;__ds_ns.Drawer=__ds_scope.Drawer;__ds_ns.HoverCard=__ds_scope.HoverCard;__ds_ns.OverlayProvider=__ds_scope.OverlayProvider;__ds_ns.Popconfirm=__ds_scope.Popconfirm;__ds_ns.Popover=__ds_scope.Popover;__ds_ns.Tour=__ds_scope.Tour;__ds_ns.TextField=__ds_scope.TextField})();
3
3
  //# sourceMappingURL=_ds_bundle.js.map