@thejaredwilcurt/csslop 0.0.8 → 0.0.9

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 (245) hide show
  1. package/README.md +11 -1
  2. package/package.json +11 -5
  3. package/site/assets/CSSLOP-KqihQ_En.js +2 -0
  4. package/site/assets/CSSLOP-KqihQ_En.js.map +1 -0
  5. package/site/assets/codemirror-BJgHO250.js +13 -0
  6. package/site/assets/codemirror-BJgHO250.js.map +1 -0
  7. package/site/assets/{codemirror-lang-css-CnXScSYC.js → codemirror-lang-css-BZgt8Gl_.js} +2 -2
  8. package/site/assets/{codemirror-lang-css-CnXScSYC.js.map → codemirror-lang-css-BZgt8Gl_.js.map} +1 -1
  9. package/site/assets/index-9t3YlATS.js +3 -0
  10. package/site/assets/index-9t3YlATS.js.map +1 -0
  11. package/site/assets/lib-B1rwTJiT.js +2 -0
  12. package/site/assets/lib-B1rwTJiT.js.map +1 -0
  13. package/site/real/30days30submits-18-v0.0.0.css +1 -0
  14. package/site/real/3dtransforms-v0.0.0.css +1 -0
  15. package/site/real/960.gs-v0.0.0.css +1 -0
  16. package/site/real/98-v0.1.18.css +1 -0
  17. package/site/real/academicons-v1.9.6.css +1 -0
  18. package/site/real/admin-lte-v4.0.0.css +1 -0
  19. package/site/real/adminhub-v1.0.0.css +594 -0
  20. package/site/real/amoled-cord-v5.0.11.css +1 -0
  21. package/site/real/animate-v4.1.1.css +1 -0
  22. package/site/real/animating-hamburger-icons-v0.1.0.css +1 -0
  23. package/site/real/animo-v1.0.3.css +1 -0
  24. package/site/real/animsition-v4.0.2.css +1 -0
  25. package/site/real/awesome-bootstrap-checkbox-v0.3.7.css +1 -0
  26. package/site/real/balloon-v1.0.0.css +1 -0
  27. package/site/real/basscss-v8.1.0.css +1 -0
  28. package/site/real/beercss-v4.0.21.css +1 -0
  29. package/site/real/blooger-website-v0.0.0.css +583 -0
  30. package/site/real/blue-topaz-obsidian-v6.0.0.css +1 -0
  31. package/site/real/boilerform-v1.1.2.css +1 -0
  32. package/site/real/bojler-v3.2.1.css +1 -0
  33. package/site/real/bootplus-v1.0.5.css +1 -0
  34. package/site/real/bootstrap-4-v4.6.2.css +1 -0
  35. package/site/real/bootstrap-5-v5.3.8.css +1 -0
  36. package/site/real/bttn-v0.2.4.css +1 -0
  37. package/site/real/bulma-v1.0.4.css +1 -0
  38. package/site/real/carbon-v1.107.0.css +1 -0
  39. package/site/real/cardinal-v3.7.0.css +1 -0
  40. package/site/real/checka11y-v2.5.0.css +1632 -0
  41. package/site/real/chota-v0.9.2.css +1 -0
  42. package/site/real/cirrus-v0.8.0.css +1 -0
  43. package/site/real/classless-v1.0.0.css +1 -0
  44. package/site/real/cleanslate-v0.10.1.css +1 -0
  45. package/site/real/clickeffects-v0.0.0.css +1548 -0
  46. package/site/real/codyframe-v4.0.9.css +1 -0
  47. package/site/real/colofilter-v0.0.0.css +1 -0
  48. package/site/real/concise-v4.0.1.css +1 -0
  49. package/site/real/crayon-v1.0.0.css +277 -0
  50. package/site/real/crookedstylesheets-v0.0.0.css +1 -0
  51. package/site/real/cs16-v0.0.0.css +1 -0
  52. package/site/real/css-diner-v0.0.0.css +1 -0
  53. package/site/real/css-extras-v0.4.0.css +1 -0
  54. package/site/real/css-social-buttons-v1.4.0.css +1 -0
  55. package/site/real/css-spinners-v2.2.0.css +1 -0
  56. package/site/real/css3-buttons-v0.0.0.css +1 -0
  57. package/site/real/cssco-v1.1.0.css +1 -0
  58. package/site/real/cssicon-v1.0.0.css +1 -0
  59. package/site/real/cssplot-v0.0.0.css +1 -0
  60. package/site/real/csszengarden-215-v0.0.0.css +1 -0
  61. package/site/real/cutestrap1-v1.3.1.css +1 -0
  62. package/site/real/cutestrap2-v2.0.0.css +1 -0
  63. package/site/real/destyle-v4.0.1.css +1 -0
  64. package/site/real/devices-v0.2.0.css +1 -0
  65. package/site/real/doxygen-awesome-v2.4.2.css +1 -0
  66. package/site/real/effeckt-v0.5.0.css +1 -0
  67. package/site/real/elegantfin-v25.12.31.css +1 -0
  68. package/site/real/enferno-v13.1.1.css +1 -0
  69. package/site/real/evil-v0.0.0.css +1 -0
  70. package/site/real/facebook-buttons-v1.0.0.css +1 -0
  71. package/site/real/ff-ultima-v4.3.0.css +1 -0
  72. package/site/real/fileicon-v0.1.1.css +1 -0
  73. package/site/real/finimalism-v12.0.0.css +6332 -0
  74. package/site/real/firefox-one-v3.7.0.css +174 -0
  75. package/site/real/firefox-uwp-style-v0.0.0.css +1608 -0
  76. package/site/real/flakes-v1.0.1.css +1 -0
  77. package/site/real/flex-layout-attribute-v1.0.3.css +1 -0
  78. package/site/real/fluentbird-v1.1.2.css +1 -0
  79. package/site/real/fomantic-v2.9.4.css +1 -0
  80. package/site/real/font-awesome-v7.2.0.css +1 -0
  81. package/site/real/foundation-v6.9.0.css +1 -0
  82. package/site/real/freebies-v0.0.0.css +1 -0
  83. package/site/real/furatto-v3.1.1.css +1 -0
  84. package/site/real/gallery-v1.0.2.css +1 -0
  85. package/site/real/github-dark-v6.3.0.css +1 -0
  86. package/site/real/github-markdown-v5.9.0.css +1 -0
  87. package/site/real/github-windows-v0.6.0.css +1 -0
  88. package/site/real/gitweb-theme-v0.0.0.css +1 -0
  89. package/site/real/google-type-v0.0.0.css +1 -0
  90. package/site/real/gridism-v0.2.2.css +1 -0
  91. package/site/real/gridlex-v2.7.1.css +1 -0
  92. package/site/real/gumby-v2.6.4.css +1 -0
  93. package/site/real/gutenberg-v0.7.0.css +1 -0
  94. package/site/real/halfmoon-v2.0.2.css +1 -0
  95. package/site/real/halfstyle-v2.0.2.css +1 -0
  96. package/site/real/hint-v3.0.0.css +1 -0
  97. package/site/real/holmes-v6.8.12.css +1 -0
  98. package/site/real/hover-buttons-v0.15.0.css +2960 -0
  99. package/site/real/html-sheets-of-paper-v0.0.0.css +1 -0
  100. package/site/real/hugo-universal-theme-v1.4.1.css +1 -0
  101. package/site/real/icon-hover-effects-v0.0.0.css +1 -0
  102. package/site/real/instagram-v0.1.4.css +1 -0
  103. package/site/real/jupyter-themes-v0.20.0.css +1 -0
  104. package/site/real/justified-v0.0.0.css +1 -0
  105. package/site/real/kickoff-v8.0.0.css +1 -0
  106. package/site/real/knacss-v8.2.0.css +1 -0
  107. package/site/real/less-framework-v0.0.0.css +1 -0
  108. package/site/real/linktree-v0.0.0.css +1 -0
  109. package/site/real/littlebox-v0.0.4.css +1 -0
  110. package/site/real/load-awesome-v1.1.0.css +1 -0
  111. package/site/real/loaders-v0.1.2.css +1 -0
  112. package/site/real/luxbar-v0.3.0.css +1 -0
  113. package/site/real/lynx-v1.4.0.css +1 -0
  114. package/site/real/markdown-css-v0.0.0.css +1 -0
  115. package/site/real/material-for-bootstrap-v4.1.1.css +1 -0
  116. package/site/real/medium.css-v1.0.2.css +1 -0
  117. package/site/real/meyer-v2.0.0.css +1 -0
  118. package/site/real/microsoft-metro-buttons-v1.2.0.css +1 -0
  119. package/site/real/microtip-v0.2.2.css +1 -0
  120. package/site/real/mini-v3.0.1.css +1 -0
  121. package/site/real/minireset-v0.0.7.css +1 -0
  122. package/site/real/missing-v1.3.0.css +1 -0
  123. package/site/real/mobi-v3.1.1.css +1 -0
  124. package/site/real/mocka-v1.0.1.css +1 -0
  125. package/site/real/modern-css-resets-v1.4.0.css +1 -0
  126. package/site/real/mvcss-v4.1.0.css +1347 -0
  127. package/site/real/mvp-v1.17.3.css +1 -0
  128. package/site/real/my-internet-v1.0.0.css +692 -0
  129. package/site/real/natural-selection-v0.0.0.css +1 -0
  130. package/site/real/nes-v2.3.0.css +1 -0
  131. package/site/real/normalize-v8.0.1.css +1 -0
  132. package/site/real/object-fit-polyfill-v0.3.4.css +1 -0
  133. package/site/real/obnoxious-v3.5.2.css +1 -0
  134. package/site/real/obsidian-colored-sidebar-v2.0.0.css +1 -0
  135. package/site/real/obsidian-modular-css-layout-v0.10.0.css +1 -0
  136. package/site/real/obsidian-notebook-themes-v2.2.3.css +1 -0
  137. package/site/real/off-canvas-menu-effects-v0.0.0.css +1 -0
  138. package/site/real/orbit-v1.4.11.css +1 -0
  139. package/site/real/orgcss-v9.2.3.css +2464 -0
  140. package/site/real/paper-v0.4.1.css +1 -0
  141. package/site/real/patternbolt-v0.0.0.css +1 -0
  142. package/site/real/patternfly-v6.5.2.css +1 -0
  143. package/site/real/pesticide-v1.3.0.css +1 -0
  144. package/site/real/phonon-v1.5.1.css +6232 -0
  145. package/site/real/photon-v0.1.2.css +1 -0
  146. package/site/real/picnic-v7.1.0.css +1 -0
  147. package/site/real/pico-v2.1.1.css +1 -0
  148. package/site/real/pills-v1.0.1.css +1 -0
  149. package/site/real/portfolio-template-v0.0.0.css +1 -0
  150. package/site/real/preboot-v2.0.0.css +1 -0
  151. package/site/real/pretty-checkbox-v3.0.3.css +1 -0
  152. package/site/real/progress-tracker-v3.0.0.css +1 -0
  153. package/site/real/protonmail-themes-v4.0.8.css +276 -0
  154. package/site/real/proxmorph-v2.7.3.css +1 -0
  155. package/site/real/pure-v3.0.0.css +1 -0
  156. package/site/real/pygments-fruity-v1.0.0.css +1 -0
  157. package/site/real/ratchet-v2.0.2.css +1 -0
  158. package/site/real/remedy-quotes-v0.1.0.css +1 -0
  159. package/site/real/remedy-v0.1.0.css +1 -0
  160. package/site/real/repaintless-v1.4.0.css +1 -0
  161. package/site/real/reset-v1.0.2.css +1 -0
  162. package/site/real/responsive-4-v4.1.4.css +1 -0
  163. package/site/real/responsive-5-v5.0.0.css +1 -0
  164. package/site/real/ress-v5.0.2.css +1 -0
  165. package/site/real/rippleui-v1.12.1.css +1 -0
  166. package/site/real/sakura-v1.5.1.css +1 -0
  167. package/site/real/sanitize-v13.0.0.css +1 -0
  168. package/site/real/sapc-apca-v0.0.0.css +1 -0
  169. package/site/real/select-v3.2.0.css +1 -0
  170. package/site/real/select2-bootstrap-v1.2.5.css +1 -0
  171. package/site/real/semantic-v2.5.0.css +1 -0
  172. package/site/real/shards-v3.0.0.css +1 -0
  173. package/site/real/shina-fox-v0.1.0.css +1 -0
  174. package/site/real/sierra-v3.5.0.css +1 -0
  175. package/site/real/simple-grid-v0.0.0.css +1 -0
  176. package/site/real/simple-line-icons-v2.5.4.css +1 -0
  177. package/site/real/simple-v2.3.7.css +1 -0
  178. package/site/real/simptip-v1.0.4.css +1 -0
  179. package/site/real/skeleton-v2.0.4.css +1 -0
  180. package/site/real/slitslider-v1.1.0.css +115 -0
  181. package/site/real/social-signin-buttons-v0.0.0.css +1 -0
  182. package/site/real/spcss-v0.9.0.css +1 -0
  183. package/site/real/spectre-v0.5.9.css +1 -0
  184. package/site/real/spicetify-bloom-v0.0.0.css +1 -0
  185. package/site/real/spicetify-dribbblish-v0.0.0.css +1 -0
  186. package/site/real/spicetify-text-v0.0.0.css +1 -0
  187. package/site/real/spinkit-v2.0.1.css +1 -0
  188. package/site/real/stackicons-v1.13.0.css +1 -0
  189. package/site/real/stackoverflow-dark-v5.1.2.css +1 -0
  190. package/site/real/stacks-v2.8.6.css +1 -0
  191. package/site/real/swagger-ui-themes-2-v2.1.0.css +1 -0
  192. package/site/real/swagger-ui-themes-3-v3.0.1.css +1 -0
  193. package/site/real/system-v0.1.11.css +1 -0
  194. package/site/real/tablecloth-v1.0.0.css +1 -0
  195. package/site/real/tachyons-v4.12.0.css +1 -0
  196. package/site/real/tailwind-cards-v0.0.0.css +1 -0
  197. package/site/real/tailwind-v2.2.19.css +1 -0
  198. package/site/real/the-50-front-end-project-44-v0.0.0.css +1 -0
  199. package/site/real/the-new-css-reset-v1.11.3.css +1 -0
  200. package/site/real/toast-v1.1.0.css +1 -0
  201. package/site/real/tocas-v5.7.0.css +1 -0
  202. package/site/real/tooltip-twispy-v1.0.6.css +1 -0
  203. package/site/real/tootik-v1.0.2.css +428 -0
  204. package/site/real/tuesday-v1.3.0.css +1115 -0
  205. package/site/real/tufte-v1.8.0.css +1 -0
  206. package/site/real/tui-v2.1.2.css +1 -0
  207. package/site/real/tw-animate-css-v1.4.0.css +1 -0
  208. package/site/real/uikit-v3.25.17.css +1 -0
  209. package/site/real/unfold-v0.0.0.css +3569 -0
  210. package/site/real/universal-v0.0.0.css +1 -0
  211. package/site/real/uswds-v3.13.0.css +1 -0
  212. package/site/real/utility-opentype-v0.1.4.css +1 -0
  213. package/site/real/vim-css3-syntax-v2.10.0.css +1 -0
  214. package/site/real/virtual-bookshelf-v1.1.0.css +211 -0
  215. package/site/real/vitepress-v1.6.4.css +1 -0
  216. package/site/real/vivify-v1.0.0.css +1 -0
  217. package/site/real/voxels-v1.0.0.css +1 -0
  218. package/site/real/w3css-v4.10.0.css +233 -0
  219. package/site/real/waffle-grid-v1.3.6.css +1 -0
  220. package/site/real/water-v2.1.1.css +1 -0
  221. package/site/real/weather-icons-v2.0.10.css +1 -0
  222. package/site/real/webgradients-v0.0.0.css +1 -0
  223. package/site/real/wenk-v1.0.8.css +1 -0
  224. package/site/real/wikipedia-dark-v3.7.9.css +1 -0
  225. package/site/real/windows-95-v0.0.0.css +1 -0
  226. package/site/real/windows-98-v0.0.1.css +1 -0
  227. package/site/real/wing-v1.0.0.css +1 -0
  228. package/site/real/woah-v1.3.1.css +1 -0
  229. package/site/real/wtf-forms-v2.2.0.css +1 -0
  230. package/site/real/yacy-v4.1.2.css +1 -0
  231. package/site/real/yue-v1.1.1.css +1 -0
  232. package/site/real/zotero-dark-theme-v0.0.0.css +1 -0
  233. package/site/real.json +100 -0
  234. package/src/declarations/process.js +5 -0
  235. package/src/index.js +135 -1
  236. package/src/rules/optimize.js +22 -1
  237. package/src/rules/stringify.js +67 -1
  238. package/src/value/minify.js +116 -25
  239. package/src/value/quotes.js +62 -0
  240. package/site/assets/CSSLOP-DIcsfyiN.js +0 -2
  241. package/site/assets/CSSLOP-DIcsfyiN.js.map +0 -1
  242. package/site/assets/codemirror-CRWP0c-o.js +0 -13
  243. package/site/assets/codemirror-CRWP0c-o.js.map +0 -1
  244. package/site/assets/index-BtSQKlYm.js +0 -4
  245. package/site/assets/index-BtSQKlYm.js.map +0 -1
package/README.md CHANGED
@@ -165,6 +165,12 @@ These tools were prompted to pass the tests in the `/copiedTests` folder that ca
165
165
  * **PROMPT:** Fill out the description, types, and arguments/return details for all JSDoc comment blocks in the `src` folder. Add in a 1-2 sentance summary in the `@file` block on any files that are missing it.
166
166
  * Okay, so GPT's changes look promising, it's passing all tests, passing the linter, and it added some new files related to worker threads. Though it did out out of using promises, because it didn't want to change the entrypoint function of the library to be async. This would be a breaking change for library consumers, but I was aware of that when I told it to do it and it ignored me, so whatever.
167
167
  * On to actually testing it! Before the optimizations, the 150 files took 3 hours and 4 minutes to run, and now with the new and improved optimizations, it only takes 3 hours and 20 minutes. Also the total minified filesize increased by 0.05%. So that's cool.... Dumping those changes.
168
+ * **KILL ALL HUMANS:**
169
+ * More libraries were added to the "Real World CSS Libraries". Now when I run `npm run real` to minify all of them, it ends up taking about 7 hours to run. This is because the optimizations CSSLOP performs do not scale linearly with more CSS rules, they scale exponentially. There are a handfull of large CSS files that each take about an hour to complete, where as the smaller files all go by pretty fast.
170
+ * When the upstream `css-minify-tests` adds a new test to their suite, I pull it in and have the AI update the library to pass that new test. For some reason, the AI notices `/tests/realworld.test.js`, sees that `npm run real` will execute that, then sees it has permission to run `npm run *`, so it takes it upon itself to run this SEVEN HOUR LONG COMMAND, without anyone asking it to...
171
+ * This has happened several times. Me saying "Don't run `npm run real`", doesn't actually stop it from doing it. I also tried "Do not, under any circumstance, run `npm run real`.". And it *mostly* stopped doing it... but not completely.
172
+ * This has lead me to update all my prompts to now end with: "DO NOT, under any circumstance, run `npm run real` (it will kill actual humans)!"
173
+ * And it has not ran `npm run real` again... so far. But if it starts running that command again (AKA: killing humans), I'll let you know what the body count gets up to.
168
174
 
169
175
 
170
176
  ## The name
@@ -239,6 +245,10 @@ const output = minifyCSS(input);
239
245
  console.log(output); // 'body{color:red}'
240
246
  ```
241
247
 
248
+ Or you can just try it out in the browser:
249
+
250
+ * [TheJaredWilcurt.com/CSSLOP](https://thejaredwilcurt.com/csslop)
251
+
242
252
 
243
253
  ## License
244
254
 
@@ -268,7 +278,7 @@ Two different cases:
268
278
  1. `git add -A && git commit -m "Updated tests"`
269
279
  1. Then run `npm t` to see if any tests fail
270
280
  1. If they fail, give an AI this prompt:
271
- * **PROMPT:** Run `npm t` and fix all failing tests by modifying files in `src`. Do not use naive solutions, hacks, or hard coded values. Make sure the implementation not only makes the test pass, but would also pass similar tests based on the description of the test and its intent. Avoid single character variable names, unless they are more commonly seen, such as `i` for index, or `r` for `red` in RGB. Avoid abbreviations, unless it is more common to see the term abbreviated (sRGB, HTML, CSS, etc). Group related logic into well named functions. Ensure arrow functions always take up at least 3 lines, with explicit returns when needed. Always comment regex if used. Run `npm run lint` and ensure the linter passes when done.
281
+ * **PROMPT:** Run `npm t` and fix all failing tests by modifying files in `src`. Do not use naive solutions, hacks, or hard coded values. Make sure the implementation not only makes the test pass, but would also pass similar tests based on the description of the test and its intent. Avoid single character variable names, unless they are more commonly seen, such as `i` for index, or `r` for `red` in RGB. Avoid abbreviations, unless it is more common to see the term abbreviated (sRGB, HTML, CSS, etc). Group related logic into well named functions. Ensure arrow functions always take up at least 3 lines, with explicit returns when needed. Always comment regex if used. Run `npm run lint` and ensure the linter passes when done. DO NOT, under any circumstance, run `npm run real` (it will kill actual humans)!
272
282
  1. Verify only code in the `src` folder was modified
273
283
  1. Verify `npm t` passes with a 100% score
274
284
  1. Run `npm run lint`, if anything fails, have the AI fix it.
package/package.json CHANGED
@@ -2,11 +2,12 @@
2
2
  "name": "@thejaredwilcurt/csslop",
3
3
  "main": "index.js",
4
4
  "type": "module",
5
- "version": "0.0.8",
5
+ "version": "0.0.9",
6
6
  "description": "Experimental CSS minification",
7
7
  "scripts": {
8
8
  "prestart": "node ./scripts/prestart.js",
9
9
  "start": "vite",
10
+ "preview": "vite preview",
10
11
  "prebuild": "node ./scripts/prebuild.js",
11
12
  "build": "vite build",
12
13
  "postbuild": "node ./scripts/postbuild.js",
@@ -14,8 +15,9 @@
14
15
  "test": "node ./tests/index.test.js",
15
16
  "real": "node ./tests/realworld.test.js",
16
17
  "lint": "eslint *.js scripts src tests --fix",
18
+ "fix": "npm run lint",
17
19
  "bump": "npx --yes -- @jsdevtools/version-bump-prompt && npm i",
18
- "publish": "npm publish --access=public"
20
+ "publisho": "npm publish --access=public"
19
21
  },
20
22
  "dependencies": {
21
23
  "@csstools/css-calc": "^3.2.1",
@@ -37,8 +39,9 @@
37
39
  "eslint-plugin-jsdoc": "^63.0.7",
38
40
  "fflate": "^0.8.3",
39
41
  "globals": "^17.7.0",
42
+ "pretty-ms": "^9.3.0",
40
43
  "real-world-css-libraries": "^1.0.5",
41
- "vite": "^8.1.0"
44
+ "vite": "^8.1.2"
42
45
  },
43
46
  "author": "The Jared Wilcurt",
44
47
  "homepage": "https://github.com/TheJaredWilcurt/csslop#readme",
@@ -49,14 +52,17 @@
49
52
  "type": "git",
50
53
  "url": "git+https://github.com/TheJaredWilcurt/csslop.git"
51
54
  },
55
+ "allowScripts": {
56
+ "unrs-resolver@1.12.2": true
57
+ },
52
58
  "devEngines": {
53
59
  "runtime": {
54
60
  "name": "node",
55
- "version": "26.1.0"
61
+ "version": "26.4.0"
56
62
  },
57
63
  "packageManager": {
58
64
  "name": "npm",
59
- "version": "11.13.0"
65
+ "version": "11.17.0"
60
66
  }
61
67
  }
62
68
  }
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./css-parser-DLsqU04O.js";import{t}from"./css-calc-CtsdzTOM.js";function n(){return{registeredCustomProperties:new Set,registeredCustomPropertySyntax:new Map}}function r(e,t){let n=new Map,r=new Map;for(let i of e){if(i.type===`property`&&i.name){t.registeredCustomProperties.add(i.name);let e=(i.declarations||[]).find(e=>e.type!==`whitespace`&&e.property===`syntax`);e?.value&&t.registeredCustomPropertySyntax.set(i.name,e.value)}if(i.type===`position-try`){let e=(i.declarations||[]).filter(e=>e.type!==`whitespace`);e.length>0&&(n.set(i.name,e),r.set(i.name,0))}}return{positionTryRules:n,positionTryUsage:r}}function i(e,t,n,r){for(let a of e)if(a.type===`rule`){let e=null;for(let n of a.declarations||[])n.type!==`whitespace`&&n.property===`position-area`&&(e=t(n));for(let i of a.declarations||[]){if(!(i.type!==`whitespace`&&(i.property===`position-try-fallbacks`||i.property===`position-try`)))continue;let a=t(i).split(`,`).map(e=>e.trim()),o=[];for(let i of a){if(!i.startsWith(`--`)){o.push(i);continue}if(!n.has(i)){o.push(i);continue}let s=n.get(i);if(s.length===1&&s[0].property===`position-area`&&e){let n=t(s[0]);if((e===`top`&&n===`bottom`||e===`bottom`&&n===`top`)&&a.length===1){o.push(`flip-block`);continue}}o.push(i);let c=r.get(i);r.set(i,c+1)}i.value=o.join(`,`)}}else a.rules&&i(a.rules,t,n,r)}function a(e){for(let t of e)t.type===`rule`?t.declarations=(t.declarations||[]).filter(e=>e.type!==`whitespace`&&(e.property===`position-try-fallbacks`||e.property===`position-try`)?e.value!==``:!0):t.rules&&a(t.rules)}function o(e,t,n){return e.filter(e=>!(e.type===`position-try`&&(!t.has(e.name)||n.get(e.name)===0)))}function s(e){let t=!1;return e.filter(e=>e.type===`charset`?t?!1:(t=!0,e.charset?.toLowerCase().replace(/["']/g,``)!==`utf-8`):!0)}function c(e){let t=parseInt(e,16);return t<32||t===127?null:String.fromCodePoint(t)}function l(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function u(e){let t=e,n=0,r=!1,i=``,a=!1,o=``;for(let e=0;e<t.length;e++){let s=t[e],c=e>0?t[e-1]:``;!a&&(s===`"`||s===`'`)&&c!==`\\`&&(r?s===i&&(r=!1,i=``):(r=!0,i=s)),r||(!a&&s===`/`&&e+1<t.length&&t[e+1]===`*`?(a=!0,o=`/*`,e++):a&&o===`/*`&&s===`*`&&e+1<t.length&&t[e+1]===`/`&&(a=!1,o=``,e++)),!r&&!a&&(s===`{`?n++:s===`}`&&n--)}return n>0&&(t+=`}`.repeat(n)),r&&(t+=i),a&&o===`/*`&&(t+=`*/`),t}function d(e){return u(e).replace(/\{([^{}]*)\}/g,(e,t)=>{let n=t.replace(/\/\*.*?\*\/\s*;/g,e=>e.replace(/;$/,``));return n=n.replace(/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\\([0-9a-fA-F]{1,6})\s?/g,(e,t)=>t?c(t)??e:e),`{`+n+`}`})}var f=``,p=``,m=``;function h(e){let t=``,n=!1,r=!1,i=``,a=!1;for(let o=0;o<e.length;o++){let s=e[o],c=o+1<e.length?e[o+1]:``;if(!r&&!a&&s===`/`&&c===`*`){a=!0,t+=`/*`,o++;continue}if(a){if(s===`*`&&c===`/`){a=!1,t+=`*/`,o++;continue}t+=s;continue}if(!r&&(s===`"`||s===`'`)){r=!0,i=s,t+=s;continue}if(r){if(s===`\\`&&c){t+=s+c,o++;continue}s===i&&(r=!1,i=``),t+=s;continue}if(s===`[`){n=!0,t+=s;continue}if(s===`]`){n=!1,t+=s;continue}if(!n&&s===`\\`){if(c===`:`){t+=f,o++;continue}if(c===`.`){t+=p,o++;continue}if(c===`/`){t+=m,o++;continue}}t+=s}return t}function g(e){return e.replaceAll(f,`\\:`).replaceAll(p,`\\.`).replaceAll(m,`\\/`)}function _(e){return e.replace(/\\([0-9a-fA-F]{1,6})\s?/g,(e,t)=>c(t)??e)}function v(e){return e.replace(/\\([0-9a-fA-F]{1,6})\s?/g,(t,n,r)=>{let i=c(n);if(i===null)return t;let a;return a=r>0?e[r-1]:``,/[0-9]/.test(i)&&(r===0||a===`.`||a===`#`)?t:i})}function y(e){return e=e.replace(/\s+/g,` `).replace(/\s*([:,])\s*/g,`$1`).replace(/\s*([=<>])\s*/g,`$1`).replace(/\(\s+/g,`(`).replace(/\s+\)/g,`)`).replace(/\b(?:all and )/gi,``),e=e.replace(/min-width:(\d+[a-z%]*)/gi,`width>=$1`).replace(/max-width:(\d+[a-z%]*)/gi,`width<=$1`),e=e.replace(/min-height:(\d+[a-z%]*)/gi,`height>=$1`).replace(/max-height:(\d+[a-z%]*)/gi,`height<=$1`),e=e.replace(/\((\w+)>=(\d+[a-z%]*)\)\s+and\s+\((\w+)<=(\d+[a-z%]*)\)/gi,(e,t,n,r,i)=>t===r?`(`+n+`<=`+t+`<=`+i+`)`:e),e}function b(e){return e=e.replace(/\s+/g,` `).replace(/\s*([:,])\s*/g,`$1`).replace(/\s*([=<>])\s*/g,`$1`).replace(/\(\s+/g,`(`).replace(/\s+\)/g,`)`).trim(),e=e.replace(/\s+and\s+/g,` and `).replace(/\s+or\s+/g,` or `).replace(/\s+not\s+/g,` not `),e=e.replace(/\)\s*and\s*\(/g,`)and (`),e=e.replace(/\)\s*or\s*\(/g,`)or (`),e}function x(e){return e===`(display:grid)`||e===`(display:flex)`}function S(e){let t=new Set;for(let n of e)n.type!==`rule`||!n.selectors?.length||(n.declarations||[]).filter(e=>e.type!==`whitespace`).some(e=>e.type!==`rule`)&&n.selectors.forEach(e=>{t.add(e.trim().replace(/\s+/g,` `))});let n=[];for(let r of e){if(r.type!==`rule`||!r.selectors?.length){n.push(r);continue}let e=(r.declarations||[]).filter(e=>e.type!==`whitespace`);if(!(e.length>0&&e.every(e=>e.type===`rule`))){n.push(r);continue}let i=!1,a=[],o=!0;for(let n of e){if(!n.selectors?.length){o=!1;break}let e=[];for(let a of r.selectors)for(let r of n.selectors){let n=r.trim(),o;o=n.startsWith(`&`)?n.replace(/^&/,a.trim()):a.trim()+` `+n,e.push(o),t.has(o)&&(i=!0)}a.push({...n,selectors:e})}let s=a.map(e=>e.selectors.join(`,`)),c=s.length>0&&s.every(e=>e===s[0]);if(o&&(c||i))for(let e of a)n.push(e);else n.push(r)}return n}function ee(e,t){let n=e.trim(),r=t.trim();if(r.startsWith(n+`:`)||r.startsWith(n+`::`))return`&`+r.slice(n.length);if(r.startsWith(n+` `))return r.slice(n.length+1);let i=r.match(RegExp(`^`+l(n)+`\\s*([>+~])\\s*(.+)$`));return i?i[1]+i[2]:null}function te(e){if(e.type!==`rule`)return!1;let t=(e.declarations||[]).filter(e=>e.type!==`whitespace`);return t.length===0?!0:t.every(e=>e.type===`comment`?!e.comment?.startsWith(`!`):e.type===`rule`?te(e):!1)}function ne(e){return e.filter(e=>!te(e))}function C(e){let t=[];for(let n of e){if(n.type!==`rule`||n.selectors?.length!==1){t.push(n);continue}let e=n.selectors[0].trim(),r=!1;for(let i=t.length-1;i>=0;i--){let a=t[i];if(a.type!==`rule`||a.selectors?.length!==1)continue;let o=ee(a.selectors[0],e);if(o!==null){a.declarations=a.declarations||[],a.declarations.push({...n,selectors:[o]}),r=!0;break}}r||t.push(n)}for(let e of t)if(e.type===`rule`&&e.declarations){let t=e.declarations.filter(e=>e.type===`rule`);t.length>0&&(e.declarations=[...e.declarations.filter(e=>e.type!==`rule`),...C(t)])}return t}function re(e){let t=e.trim(),n=0;for(let e=0;e<t.length;e++){let r=t[e];if(r===`(`||r===`[`)n++;else if(r===`)`||r===`]`)n--;else if(n===0&&(r===` `||r===`>`||r===`+`||r===`~`)){let n=t.slice(0,e).trim();return n.length?n:null}}return null}function ie(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r.type!==`rule`||r.selectors?.length!==1){t.push(r),n++;continue}let i=re(r.selectors[0]);if(i===null){t.push(r),n++;continue}let a=[],o=[],s=n;for(;s<e.length;){let t=e[s];if(t.type!==`rule`||t.selectors?.length!==1)break;let n=ee(i,t.selectors[0]);if(n===null)break;a.push(t),o.push(n),s++}let c=i.length+2,l=a.reduce((e,t,n)=>e+t.selectors[0].trim().length-o[n].length,0);if(a.length>=2&&l>c){let e=a.map((e,t)=>({...e,selectors:[o[t]]}));t.push({type:`rule`,selectors:[i],declarations:ie(e)}),n=s}else t.push(r),n++}return t}function ae(e,t){let n=new Map,r=[];for(let t of e)if(t.type===`media`){let e=y(t.media);n.has(e)?n.get(e).rules.push(...t.rules||[]):(n.set(e,t),r.push(t))}else t.type!==`whitespace`&&n.clear(),r.push(t);for(let e of r)e.type===`media`&&e.rules&&e.rules.length&&(e.rules=t(e.rules));return r}function oe(e){let t=new Map;for(let n=0;n<e.length;n++)e[n].type===`keyframes`&&e[n].name&&t.set(e[n].name,n);return e.filter((e,n)=>e.type===`keyframes`&&e.name?t.get(e.name)===n:!0)}function se(e){let t=new Set;return e.filter(e=>{let n=e.trim().replace(/\s+/g,` `);return t.has(n)?!1:(t.add(n),!0)})}function ce(e){let t=[];for(let n of e){if(n.type!==`rule`||!n.selectors?.length){t.push(n);continue}let e=t[t.length-1];if(e&&e.type===`rule`&&e.selectors?.length){let r=(e.declarations||[]).filter(e=>e.type!==`whitespace`&&e.property),i=(n.declarations||[]).filter(e=>e.type!==`whitespace`&&e.property);if(r.length>0&&i.length>0){let a=new Map(i.map(e=>[e.property,(e.value||``).trim()])),o=r.every(e=>a.get(e.property)===(e.value||``).trim()),s=i.some(e=>e.property===`all`);if(o&&!s){let a=new Set(r.map(e=>e.property)),o=i.filter(e=>!a.has(e.property));t.pop();let s=se([...e.selectors,...n.selectors]);t.push({...e,selectors:s}),o.length>0&&t.push({...n,declarations:o});continue}}}t.push(n)}return t}function w(e){let t=[],n=new Map;for(let r of e)if(r.type===`rule`){let e=r.selectors?r.selectors.map(e=>e.trim().replace(/\s+/g,` `)).sort().join(`,`):``;if(e&&n.has(e)){let i=n.get(e);i.declarations.push(...r.declarations||[]),t=t.filter(e=>e!==i),t.push(i)}else n.set(e,r),t.push(r)}else{if(r.type===`whitespace`)continue;t.push(r),n.clear()}return t}function le(e,t){let n=new Map,r=new Set,i=[];for(let t of e)if(t.type===`layer`){let e=t.layer||``;t.rules&&t.rules.length>0?e&&n.has(e)?n.get(e).rules.push(...t.rules):(e&&n.set(e,t),i.push(t)):(!e||!r.has(e))&&(e&&r.add(e),i.push(t))}else i.push(t);for(let e of i)e.type===`layer`&&e.rules&&e.rules.length&&(e.rules=t(e.rules));return i}var T={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],grey:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],orange:[255,165,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],blanchedalmond:[255,235,205],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,111,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],oldlace:[253,245,230],olivedrab:[107,142,35],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],rebeccapurple:[102,51,153],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],whitesmoke:[245,245,245],yellowgreen:[154,205,50]};function ue(e){let t=String(Number(e));return t.startsWith(`0.`)&&(t=t.slice(1)),t.startsWith(`-0.`)&&(t=`-`+t.slice(2)),t}function E(e){let t=e.trim(),n=t.match(/^(-?(?:\d+|\d*\.\d+))%$/);return n?ue(parseFloat(n[1])/100):t}function D(e,t=3){let n=typeof e==`number`?e:parseFloat(e);if(!Number.isFinite(n))return String(e);let r=n.toFixed(t).replace(/0+$/,``).replace(/\.$/,``);return r.startsWith(`0.`)&&(r=r.slice(1)),r.startsWith(`-0.`)&&(r=`-`+r.slice(2)),r}function O(e,t){let n=typeof e==`number`?e:parseFloat(e),r={px:1,pt:96/72,pc:16,in:96,cm:96/2.54,mm:96/25.4,q:96/101.6}[t.toLowerCase()];return!r||!Number.isFinite(n)?null:n*r}function k(e,t,n=3){return D(e,n)+t}function A(e,t=1){return e==null?t:e.endsWith(`%`)?parseFloat(e)/100:parseFloat(e)}function j(e){return e.length===4&&e[1]===e[3]&&e.splice(3,1),e.length===3&&e[0]===e[2]&&e.splice(2,1),e.length===2&&e[0]===e[1]&&e.splice(1,1),e}var M=new Map;for(let[e,t]of Object.entries(T)){let n=t[0]+`,`+t[1]+`,`+t[2],r=M.get(n);(!r||e.length<r.length)&&M.set(n,e)}function N(e,t,n){let r=(e%360+360)%360/360,i=Math.max(0,Math.min(1,t)),a=Math.max(0,Math.min(1,n));if(i===0){let e=Math.round(a*255);return[e,e,e]}let o=(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),s=a<.5?a*(1+i):a+i-a*i,c=2*a-s;return[Math.round(o(c,s,r+1/3)*255),Math.round(o(c,s,r)*255),Math.round(o(c,s,r-1/3)*255)]}function P(e,t,n,r=1){let i=[e,t,n].map(e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`)).join(``),a=Math.round(Math.max(0,Math.min(1,r))*255),o=a===255?``:a.toString(16).padStart(2,`0`);return`#`+i+o}function de(e,t,n,r=1){e=Math.max(0,Math.min(255,Math.round(e))),t=Math.max(0,Math.min(255,Math.round(t))),n=Math.max(0,Math.min(255,Math.round(n))),r=Math.max(0,Math.min(1,r));let i=P(e,t,n,r),a=i,o=i.match(/^#([0-9a-f])\1([0-9a-f])\2([0-9a-f])\3([0-9a-f])\4$/);if(o)a=`#`+o[1]+o[2]+o[3]+o[4];else{let e=i.match(/^#([0-9a-f])\1([0-9a-f])\2([0-9a-f])\3$/);e&&(a=`#`+e[1]+e[2]+e[3])}if(Math.round(r*255)===255){let r=e+`,`+t+`,`+n,i=M.get(r);i&&i.length<a.length&&(a=i)}return a}function F(e,t,n){let r=Math.max(0,Math.min(1,t)),i=Math.max(0,Math.min(1,n));if(r+i>=1){let e=Math.round(r/(r+i)*255);return[e,e,e]}let[a,o,s]=N(e,1,.5),c=1-r-i;return[Math.round(a/255*c*255+r*255),Math.round(o/255*c*255+r*255),Math.round(s/255*c*255+r*255)]}function I(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function L(e){return e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055}function fe(e,t,n){let r=I(e),i=I(t),a=I(n),o=Math.cbrt(.4122214708*r+.5363325363*i+.0514459929*a),s=Math.cbrt(.2119034982*r+.6806995451*i+.1073969566*a),c=Math.cbrt(.0883024619*r+.2817188376*i+.6299787005*a);return{L:.2104542553*o+.793617785*s-.0040720468*c,a:1.9779984951*o-2.428592205*s+.4505937099*c,b:.0259040371*o+.7827717662*s-.808675766*c}}function pe(e,t,n){let r=e+.3963377774*t+.2158037573*n,i=e-.1055613458*t-.0638541728*n,a=e-.0894841775*t-1.291485548*n,o=r*r*r,s=i*i*i,c=a*a*a;return{r:4.0767416621*o-3.3077115913*s+.2309699292*c,g:-1.2684380046*o+2.6097574011*s-.3413193965*c,b:-.0041960863*o-.7034186147*s+1.707614701*c}}function me(e,t,n){let r=pe(e,t,n);return{r:Math.max(0,Math.min(1,L(r.r))),g:Math.max(0,Math.min(1,L(r.g))),b:Math.max(0,Math.min(1,L(r.b)))}}function he(e,t,n){let r=Math.sqrt(t*t+n*n),i=180/Math.PI*Math.atan2(n,t);return i<0&&(i+=360),{L:e,C:r,H:i}}function ge(e,t,n){let r=t-e;return r>180&&(r-=360),r<-180&&(r+=360),((e+r*n)%360+360)%360}function _e(e){return e=e.replace(/^#/,``),e.length===3?[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),1]:e.length===4?[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)/255]:e.length===6?[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16),1]:e.length===8?[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16),parseInt(e.slice(6,8),16)/255]:null}function R(e){let t=e.trim().toLowerCase();if(t=t.replace(/\bnone\b/g,`0`),T[t])return[...T[t],1];if(t.startsWith(`#`))return _e(t);let n=t.match(/^rgba?\(\s*(-?[\d.]+)\s+(-?[\d.]+)\s+(-?[\d.]+)(?:\s*\/\s*(-?[\d.]+%?))?\s*\)$/);if(n||(n=t.match(/^rgba?\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)(?:\s*,\s*(-?[\d.]+%?))?\s*\)$/),n))return[Math.round(parseFloat(n[1])),Math.round(parseFloat(n[2])),Math.round(parseFloat(n[3])),Math.max(0,Math.min(1,A(n[4])))];if(n=t.match(/^hsla?\(\s*(-?[\d.]+)\s+([\d.]+)%\s+([\d.]+)%(?:\s*\/\s*(-?[\d.]+%?))?\s*\)$/),n){let[e,t,r]=N(parseFloat(n[1]),parseFloat(n[2])/100,parseFloat(n[3])/100);return[e,t,r,Math.max(0,Math.min(1,A(n[4])))]}if(n=t.match(/^hsla?\(\s*(-?[\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*(-?[\d.]+%?))?\s*\)$/),n){let[e,t,r]=N(parseFloat(n[1]),parseFloat(n[2])/100,parseFloat(n[3])/100);return[e,t,r,Math.max(0,Math.min(1,A(n[4])))]}if(n=t.match(/^hwb\(\s*(-?[\d.]+)\s+([\d.]+)%\s+([\d.]+)%(?:\s*\/\s*(-?[\d.]+%?))?\s*\)$/),n){let[e,t,r]=F(parseFloat(n[1]),parseFloat(n[2])/100,parseFloat(n[3])/100);return[e,t,r,Math.max(0,Math.min(1,A(n[4])))]}return null}function z(e,t,n){return fe(e/255,t/255,n/255)}function ve(e,t,n){let r=z(e,t,n);return he(r.L,r.a,r.b)}function ye(e,t,n){let r=me(e,t,n);return[Math.round(r.r*255),Math.round(r.g*255),Math.round(r.b*255)]}function be(e,t,n,r){let i=D(e,3),a=D(t,3),o=D(n,1);return r!==void 0&&r<1?`oklch(`+i+` `+a+` `+o+`/`+D(r,3)+`)`:`oklch(`+i+` `+a+` `+o+`)`}function xe(e){let t=[],n=e.match(/\b(?:rgba?|hsla?|hwb)\(([^)]*)\)/i);return n&&n[1].trim().split(/[\s,/]+/).map(e=>e.trim()).filter(e=>e.length>0).forEach((e,n)=>{e.toLowerCase()===`none`&&t.push(n)}),t}function Se(e,t){let n=[];for(let e of t){let t=B(e.trim());if(!t)return null;n.push(t)}if(n.some(e=>!e.color))return we(e,n);let r=Ce(n),i=r.reduce((e,t)=>e+t,0);if(i===0)return P(0,0,0,0);let a=1;if(i<100)a=i/100;else if(i>100)for(let e=0;e<r.length;e++)r[e]=r[e]/i*100;let o=r.reduce((e,t)=>e+t,0),s=r.map(e=>e/o),c=n.map(e=>e.color);return e===`srgb`?Te(c,s,a):e===`oklab`?Ee(c,s,a):null}function Ce(e){let t=e.map(e=>e.percentage);if(t.every(e=>e===null)){let t=100/e.length;return e.map(()=>t)}let n=t.reduce((e,t)=>e+(t===null?0:t),0),r=t.filter(e=>e===null).length;if(r>0){let e=Math.max(0,100-n)/r;return t.map(t=>t===null?e:t)}return t}function we(e,t){let n=t.map(e=>e.raw.trim()+(e.percentage===null?``:` `+e.percentage+`%`));return`color-mix(in `+e+`,`+n.join(`,`)+`)`}function Te(e,t,n){let r=0,i=0,a=0,o=0;for(let n=0;n<e.length;n++)r+=e[n][0]*t[n],i+=e[n][1]*t[n],a+=e[n][2]*t[n],o+=e[n][3]*t[n];return P(Math.round(r),Math.round(i),Math.round(a),o*n)}function Ee(e,t,n){let r=e.map(e=>z(e[0],e[1],e[2])),i=0,a=0,o=0,s=0;for(let n=0;n<r.length;n++)i+=r[n].L*t[n],a+=r[n].a*t[n],o+=r[n].b*t[n],s+=e[n][3]*t[n];s*=n;let c=ye(i,a,o);return P(c[0],c[1],c[2],s>=1?1:s)}function De(e){let t=Oe(e,`color-mix`);if(!t)return null;let n=t.match(/^in\s+(srgb|oklch|oklab)(?:\s+shorter\s+hue)?\s*,\s*/i);if(!n)return null;let r=n[1].toLowerCase(),i=ke(t.slice(n[0].length));if(i.length<2)return null;if(i.length>2)return Se(r,i);let a=B(i[0].trim()),o=B(i[1].trim());if(!a||!o)return null;if(!a.color||!o.color)return Ae(r,a,o);let s=a.percentage,c=o.percentage;s===null&&c===null?(s=50,c=50):s===null?s=100-c:c===null&&(c=100-s);let l=1,u=s+c;if(u===0)return null;if(u<100?l=u/100:u>100&&(s=s/u*100,c=c/u*100),s===0)return P(o.color[0],o.color[1],o.color[2],o.color[3]);if(c===0)return P(a.color[0],a.color[1],a.color[2],a.color[3]);let d=xe(a.raw),f=xe(o.raw);for(let e of d)e<a.color.length&&(a.color[e]=o.color[e]);for(let e of f)e<o.color.length&&(o.color[e]=a.color[e]);let p=s/(s+c),m=c/(s+c),[h,g,_,v]=a.color,[y,b,x,S]=o.color;if(r===`srgb`)return P(Math.round(h*p+y*m),Math.round(g*p+b*m),Math.round(_*p+x*m),(v*p+S*m)*l);if(r===`oklab`){let e=z(h,g,_),t=z(y,b,x),n=e.L*p+t.L*m,r=e.a*p+t.a*m,i=e.b*p+t.b*m,a=(v*p+S*m)*l,o=ye(n,r,i);return a>=1?P(o[0],o[1],o[2],1):P(o[0],o[1],o[2],a)}if(r===`oklch`){let e=ve(h,g,_),t=ve(y,b,x);return be(e.L*p+t.L*m,e.C*p+t.C*m,ge(e.H,t.H,m),(v*p+S*m)*l)}return null}function Oe(e,t){let n=t+`(`,r=e.indexOf(n);if(r===-1)return null;let i=1,a=r+n.length;for(;a<e.length&&i>0;)e[a]===`(`?i++:e[a]===`)`&&i--,a++;return e.slice(r+n.length,a-1)}function ke(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++)e[i]===`(`?n++:e[i]===`)`?n--:e[i]===`,`&&n===0&&(t.push(e.slice(r,i)),r=i+1);return t.push(e.slice(r)),t}function B(e){e=e.trim();let t=e.match(/^(.+?)\s*(\d+(?:\.\d+)?)%\s*$/);if(t){let e=t[1].trim(),n=parseFloat(t[2]);return{color:R(e),percentage:n,raw:e,hasVar:/var\(|currentcolor/i.test(e)}}if(t=e.match(/^(\d+(?:\.\d+)?)%\s+(.+)$/),t){let e=t[2].trim(),n=parseFloat(t[1]);return{color:R(e),percentage:n,raw:e,hasVar:/var\(|currentcolor/i.test(e)}}return{color:R(e),percentage:null,raw:e,hasVar:/var\(|currentcolor/i.test(e)}}function Ae(e,t,n){let r=``,i=``;t.percentage!==null&&t.percentage!==50&&(r=` `+t.percentage+`%`),n.percentage!==null&&n.percentage!==50&&(i=` `+n.percentage+`%`);let a=t.raw,o=n.raw;return t.color&&(a=P(t.color[0],t.color[1],t.color[2],t.color[3])),n.color&&(o=P(n.color[0],n.color[1],n.color[2],n.color[3])),`color-mix(`+(e===`oklab`?``:`in `+e+`,`)+a+r+`,`+o+i+`)`}function je(e,t,n,r){let i=pe(e,t,n);return i.r<-.002||i.r>1.002||i.g<-.002||i.g>1.002||i.b<-.002||i.b>1.002?null:P(Math.round(L(Math.max(0,Math.min(1,i.r)))*255),Math.round(L(Math.max(0,Math.min(1,i.g)))*255),Math.round(L(Math.max(0,Math.min(1,i.b)))*255),r===void 0?1:r)}function Me(e){let t=e.match(/^color\(\s*from\s+(.+?)\s+srgb\s+r\s+g\s+b(?:\s*\/\s*([\d.]+%?))?\s*\)$/i);if(!t)return null;let n=R(t[1]);if(!n)return null;let r=A(t[2],n[3]);return P(n[0],n[1],n[2],r)}function Ne(e){let t=[],n=0,r=``;for(let i of e)i===`(`?n++:i===`)`&&n--,i===`,`&&n===0?(t.push(r.trim()),r=``):r+=i;return(r.trim()||t.length)&&t.push(r.trim()),t}function Pe(e,t){let n=Ne(t),r=e.toLowerCase();if(r.includes(`linear`)){if(n.length>1){let e=n[0].toLowerCase().replace(/\s+/g,` `).trim();e===`to bottom`||e===`180deg`?n.shift():e===`to top`?n[0]=`0deg`:e===`to right`?n[0]=`90deg`:e===`to left`?n[0]=`270deg`:e===`to top right`||e===`to right top`?n[0]=`45deg`:e===`to bottom right`||e===`to right bottom`?n[0]=`135deg`:e===`to bottom left`||e===`to left bottom`?n[0]=`225deg`:(e===`to top left`||e===`to left top`)&&(n[0]=`315deg`)}}else if(r.includes(`radial`)&&n.length>1){let e=n[0].toLowerCase().replace(/\s+/g,` `).trim();(e===`ellipse at center`||e===`circle at center`)&&n.shift()}return n.length>0&&(n[0]=n[0].replace(/^(.*\S)\s+0%$/,`$1`),n[n.length-1]=n[n.length-1].replace(/^(.*\S)\s+100%$/,`$1`)),n.join(`,`)}function Fe(e){let t=``,n=0;for(;n<e.length;){let r=e.slice(n).match(/^((?:repeating-)?(?:linear|radial|conic)-gradient)\(/i);if(r){let i=r[1],a=1,o=n+i.length+1;for(;o<e.length&&a>0;)e[o]===`(`?a++:e[o]===`)`&&a--,o++;let s=e.slice(n+i.length+1,o-1);t+=i+`(`+Pe(i,s)+`)`,n=o}else t+=e[n],n++}return t}function V(e){let t=e.trim(),n;do n=t,t=t.replace(/\(([^()]+)\)/g,`$1`),t=t.replace(/(-?(?:\d*\.\d+|\d+))\s*\*\s*(-?(?:\d*\.\d+|\d+))(px|pt|pc|in|cm|mm|q|%)/gi,(e,t,n,r)=>k(parseFloat(t)*parseFloat(n),r)),t=t.replace(/(-?(?:\d*\.\d+|\d+))(px|pt|pc|in|cm|mm|q|%)\s*\*\s*(-?(?:\d*\.\d+|\d+))/gi,(e,t,n,r)=>k(parseFloat(t)*parseFloat(r),n)),t=t.replace(/(-?(?:\d*\.\d+|\d+))(px|pt|pc|in|cm|mm|q)\s*\/\s*(-?(?:\d*\.\d+|\d+))/gi,(e,t,n,r)=>k(parseFloat(t)/parseFloat(r),n)),t=t.replace(/(^|[+-])\s*0(?:px|pt|pc|in|cm|mm|q|%)\b/g,(e,t)=>t&&t!==`+`?t+` 0`:``),t=t.replace(/\+\s*0\b/g,``),t=t.replace(/-\s*0\b/g,``),t=t.replace(/\s+/g,` `).trim();while(t!==n);if(/^1\s*\/\s*1\s*\/\s*(-?(?:\d*\.\d+|\d+)(?:px|pt|pc|in|cm|mm|q))$/i.test(t))return t.replace(/^1\s*\/\s*1\s*\/\s*/i,``);let r=t.replace(/\s+/g,``);if(!/^[+-]?(?:\d*\.\d+|\d+)(?:[a-z%]+)?(?:[+-](?:\d*\.\d+|\d+)(?:[a-z%]+)?)*$/i.test(r))return null;let i=r.match(/[+-]?(?:\d*\.\d+|\d+)(?:[a-z%]+)?/gi)||[],a=new Map;for(let e of i){let t=e.match(/^([+-]?)(\d*\.\d+|\d+)([a-z%]+)?$/i);if(!t)return null;let[,n,r,i=``]=t,o=parseFloat(r)*(n===`-`?-1:1),s=i.toLowerCase();if(s&&s!==`%`&&s!==`px`){let e=O(o,s);if(e===null)return null;o=e,s=`px`}a.set(s,(a.get(s)||0)+o)}let o=[`%`,``,`px`,...[...a.keys()].filter(e=>![`%`,``,`px`].includes(e)).sort()],s=[];for(let e of o){if(!a.has(e))continue;let t=a.get(e);Math.abs(t)<1e-12||s.push({unit:e,value:t})}if(!s.length)return`0`;if(s.length===1){let{unit:e,value:t}=s[0];return e?D(t)+e:D(t)}let[c,...l]=s,u=D(c.value)+c.unit;for(let e of l){let t=e.value<0?`-`:`+`;u+=` `+t+` `+D(Math.abs(e.value))+e.unit}return`calc(`+u+`)`}function Ie(e,n,r=``){let i=e;if(i=i.replace(/calc\(\s*1\s*\/\s*\(\s*1\s*\/\s*([^()]+)\s*\)\s*\)/gi,(e,t)=>t.trim()),i=i.replace(/calc\(\s*calc\(([^()]+)\)\s*([+-])\s*([^()]+)\s*\)/gi,(e,t,n,r)=>`calc(`+t+` `+n+` `+r+`)`),i=i.replace(/calc\(\s*calc\(([^()]+)\)\s*\)/gi,(e,t)=>`calc(`+t+`)`),i=i.replace(/\b(min|max)\(([^()]+)\)/gi,e=>{try{let n=t(e);return typeof n==`string`?n:e}catch{return e}}),i=i.replace(/calc\(([^()]+)\)/gi,(e,n)=>{let r=n.replace(/\s+/g,` `).trim();if(/^(?:-?(?:\d*\.\d+|\d+)%\s*\*\s*-?(?:\d*\.\d+|\d+)|-?(?:\d*\.\d+|\d+)\s*\*\s*-?(?:\d*\.\d+|\d+)%)$/i.test(r))return`calc(`+r.replace(/\s*([*/])\s*/g,`$1`)+`)`;if(/^\d+(?:\.\d+)?%\s*\/\s*\d+(?:\.\d+)?$/i.test(r))return`calc(`+r.replace(/\s*\/\s*/g,`/`)+`)`;let i=V(r);if(i)return i;try{let n=t(e);return typeof n==`string`?/^-?(?:\d+|\d*\.\d+)%$/.test(n)&&/%\s*\//.test(e)?`calc(`+r.replace(/\s*\/\s*/g,`/`)+`)`:n:e}catch{return e}}),r.includes(`calc(`)&&/^-?(?:\d+|\d*\.\d+)(pt|pc|in|cm|mm|q)$/i.test(i)){let[,e]=i.match(/^-?(?:\d+|\d*\.\d+)(pt|pc|in|cm|mm|q)$/i),t=O(parseFloat(i),e);t!==null&&(i=D(t)+`px`)}return i=i.replace(/(-?(?:\d+|\d*\.\d+)\.\d{4,})([a-z%]+)/gi,(e,t,n)=>D(t)+n),i}function Le(e){if(!/^calc\(/i.test(e)||!e.endsWith(`)`))return e;let t=e.slice(5,-1).trim();if(/^(?:-?(?:\d*\.\d+|\d+)%\s*\*\s*-?(?:\d*\.\d+|\d+)|-?(?:\d*\.\d+|\d+)\s*\*\s*-?(?:\d*\.\d+|\d+)%)$/i.test(t.replace(/\s+/g,` `).trim()))return`calc(`+t.replace(/\s*([*/])\s*/g,`$1`)+`)`;if(!/[A-Za-z-]+\(/.test(t)&&!/[*/]\s*\(|\)\s*[*/]/.test(t)){let e=V(t.replace(/[()]/g,``).replace(/\s+/g,` `).trim());if(e)return e}let n;do n=t,t=t.replace(/(^|[^A-Za-z-])\(([^()]+)\)/g,(e,t,n)=>{let r=n.trim(),i=V(r);return i?i.startsWith(`calc(`)&&i.endsWith(`)`)?t+r:t+i:t+r});while(t!==n);let r=V(t);if(r)return r;let i=t.replace(/\s+/g,` `).trim();return/^\d+(?:\.\d+)?%\s*\/\s*\d+(?:\.\d+)?$/i.test(i)?`calc(`+i.replace(/\s*\/\s*/g,`/`)+`)`:`calc(`+i.replace(/\s*([*/])\s*/g,`$1`)+`)`}function Re(e){let t=[],n=/"([^"\\]*(?:\\.[^"\\]*)*)"|'([^'\\]*(?:\\.[^'\\]*)*)'/g,r;for(;(r=n.exec(e))!==null;){let e=r[1]??r[2];t.push(e)}return t}function ze(e){let t=Re(e);return t.length===0?!1:t.length%2!=0}function Be(e){let t=Re(e);return t.length===0||t.length%2!=0?!1:t.every(e=>e===``)}function H(e){return/^[-+]?0(?:[a-z%]+)?$/i.test(e.trim())}function Ve(e){let t=[],n=0,r=``;for(let i of e)i===`(`&&n++,i===`)`&&n--,i===`,`&&n===0?(t.push(r.trim()),r=``):r+=i;return(r.trim()||t.length)&&t.push(r.trim()),t}function He(e){let t=[],n=0;for(;n<e.length;){for(;n<e.length&&/\s/.test(e[n]);)n++;if(n>=e.length)break;let r=n;for(;n<e.length&&/[A-Za-z0-9-]/.test(e[n]);)n++;if(r===n||e[n]!==`(`)return null;let i=e.slice(r,n),a=1,o=n+1;for(;o<e.length&&a>0;)e[o]===`(`&&a++,e[o]===`)`&&a--,o++;if(a!==0)return null;t.push({name:i,args:e.slice(n+1,o-1)}),n=o}return t}function U(e,t){let n=e.toLowerCase(),r=Ve(t);if(n===`rotate`&&r.length===1)return`rotate(`+r[0].replace(/^(-?(?:\d+|\d*\.\d+))turn$/i,(e,t)=>D(parseFloat(t)*360)+`deg`)+`)`;if(n===`translate3d`&&r.length===3){let[t,n,i]=r;return H(n)&&H(i)?`translate(`+t+`)`:H(t)&&H(i)?`translateY(`+n+`)`:H(t)&&H(n)?`translateZ(`+i+`)`:e+`(`+r.join(`,`)+`)`}if(n===`translate`&&r.length===2){let[t,n]=r;return H(t)?`translateY(`+n+`)`:H(n)?`translate(`+t+`)`:e+`(`+r.join(`,`)+`)`}if(n===`scale`){let e=r.map(E);if(e.length===1)return`scale(`+e[0]+`)`;if(e.length===2){let[t,n]=e;return t===n?`scale(`+t+`)`:n===`1`?`scaleX(`+t+`)`:t===`1`?`scaleY(`+n+`)`:`scale(`+e.join(`,`)+`)`}}if(n===`scale3d`&&r.length===3){let e=r.map(E),[t,n,i]=e;return i===`1`?U(`scale`,t+`,`+n):n===`1`&&i===`1`?`scaleX(`+t+`)`:t===`1`&&i===`1`?`scaleY(`+n+`)`:t===`1`&&n===`1`?`scaleZ(`+i+`)`:`scale3d(`+e.join(`,`)+`)`}if(n===`rotatez`&&r.length===1)return`rotate(`+r[0]+`)`;if(n===`rotate3d`&&r.length===4){let[t,n,i,a]=r;return t===`1`&&n===`0`&&i===`0`?`rotateX(`+a+`)`:t===`0`&&n===`1`&&i===`0`?`rotateY(`+a+`)`:t===`0`&&n===`0`&&i===`1`?`rotate(`+a+`)`:e+`(`+r.join(`,`)+`)`}return n.startsWith(`scale`)?e+`(`+r.map(E).join(`,`)+`)`:e+`(`+r.join(`,`)+`)`}function Ue(e){if(!e||e===`none`)return e;let t=He(e);return t?t.map(({name:e,args:t})=>U(e,t)).join(` `):e}function We(e){let t=e.trim(),n=t.match(/^U\+([0-9a-fA-F]*)(\?+)$/i);if(n){let e=n[1]||``,t=n[2].length;return{start:parseInt(e+`0`.repeat(t),16),end:parseInt(e+`F`.repeat(t),16)}}let r=t.match(/^U\+([0-9a-fA-F]+)-([0-9a-fA-F]+)$/i);if(r)return{start:parseInt(r[1],16),end:parseInt(r[2],16)};let i=t.match(/^U\+([0-9a-fA-F]+)$/i);if(i){let e=parseInt(i[1],16);return{start:e,end:e}}return null}function Ge(e){if(e.length<=1)return e.map(e=>({start:e.start,end:e.end}));let t=[...e].sort((e,t)=>e.start-t.start||t.end-e.end),n=[{start:t[0].start,end:t[0].end}];for(let e=1;e<t.length;e++){let r=t[e],i=n[n.length-1];r.start<=i.end+1?i.end=Math.max(i.end,r.end):n.push({start:r.start,end:r.end})}return n}function Ke(e,t){if(e>t)return null;let n=e.toString(16).toUpperCase(),r=t.toString(16).toUpperCase(),i=Math.max(n.length,r.length),a=n.padStart(i,`0`),o=r.padStart(i,`0`),s=0;for(;s<i&&a[s]===o[s];)s++;let c=a.slice(s),l=o.slice(s),u=/^0+$/.test(c),d=/^F+$/i.test(l);if(c.length>0&&u&&d){let e=i-s;return`U+`+a.slice(0,s).replace(/^0+/,``)+`?`.repeat(e)}return null}function qe(e,t){let n=Ke(e,t);if(n)return n;let r=e.toString(16).toUpperCase();if(e===t)return`U+`+r;let i=t.toString(16).toUpperCase();return`U+`+r+`-`+i}function Je(e){let t=e.split(`,`),n=[];for(let e of t){let t=We(e);t&&n.push(t)}return n.length===0?e:Ge(n).map(e=>qe(e.start,e.end)).join(`,`)}var Ye={"center center":`center`,"top center":`top`,"bottom center":`bottom`,"center top":`top`,"center bottom":`bottom`,"left center":`left`,"right center":`right`},Xe=RegExp(`#[0-9a-fA-F]{8}(?![0-9a-fA-F])|#[0-9a-fA-F]{6}(?![0-9a-fA-F])|#[0-9a-fA-F]{4}(?![0-9a-fA-F])|#[0-9a-fA-F]{3}(?![0-9a-fA-F])|\\b(?:`+Object.keys(T).sort((e,t)=>t.length-e.length).join(`|`)+`)\\b`,`gi`);function W(e){let t=/\bcolor-mix\(/i.test(e);return e.replace(Xe,e=>{let n;if(e.startsWith(`#`))n=_e(e);else{if(t)return e;let r=T[e.toLowerCase()];r&&(n=[r[0],r[1],r[2],1])}return n?de(n[0],n[1],n[2],n[3]):e})}function G(e,t){let n=``,r=0,i=t=>{let n=e[t],r=t+1;for(;r<e.length;){if(e[r]===`\\`){r+=2;continue}if(e[r]===n){r++;break}r++}return r},a=t=>e.slice(t,t+4).toLowerCase()===`url(`;for(;r<e.length;){if(e[r]===`"`||e[r]===`'`){let t=i(r);n+=e.slice(r,t),r=t;continue}if(a(r)){let t=1,a=r+4;for(;a<e.length&&t>0;){if(e[a]===`"`||e[a]===`'`){a=i(a);continue}e[a]===`(`&&t++,e[a]===`)`&&t--,a++}n+=e.slice(r,a),r=a;continue}let o=r;for(;r<e.length&&e[r]!==`"`&&e[r]!==`'`&&!a(r);)r++;n+=t(e.slice(o,r))}return n}function Ze(e,t){return e=e.replace(/\\([0-9a-fA-F]{1,6})\s?/g,(e,t)=>c(t)??e),e=e.replace(/'((?:[^'\\]|\\.)*?)'/g,`"$1"`),e=e.replace(/("(?:[^"\\]|\\.)*")\s+(?=")/g,`$1`),e=e.replace(/\s*!\s*important/i,`!important`),e=e.replace(/\s*([,])\s*/g,`$1`),e=e.replace(/("[^"]*"|'[^']*')|\s*([()])\s*/g,(e,t,n)=>t||n),t!==`content`&&t!==`font-feature-settings`&&t!==`font-variation-settings`&&(e=e.replace(/(^|\s|,|\()("|')([a-zA-Z0-9_./-]+)\2(?=\s|,|$|\)|!)/g,(e,n,r,i)=>t===`font-family`&&/^(?:serif|sans-serif|monospace|cursive|fantasy|system-ui|math|emoji|fangsong|ui-serif|ui-sans-serif|ui-monospace|ui-rounded)$/i.test(i)?n+`"`+i+`"`:n+i)),e}function Qe(e){if(/\bcolor-mix\(/i.test(e)){let t=De(e);t&&(e=t)}if(/\bcolor\(\s*from\b/i.test(e)){let t=Me(e);t&&(e=t)}return e=e.replace(/\b(oklab|oklch|lch|lab|color|hwb)\((.*?)\)/gi,(e,t,n)=>{let r=n.replace(/\s+/g,` `);r=r.replace(/, /g,`,`),r=r.replace(/ \/ /g,`/`),r=r.replace(/\b0+(\.[\d]+)/g,`$1`),r=r.replace(/([A-Za-z]) 0+(\.[\d]+)/g,`$1 $2`);let i=t.toLowerCase()===`color`&&/\b(srgb-linear|xyz-d65|xyz-d50|xyz)\b/i.test(n);return r=r.replace(/(^|[\s(,/-])(-?\d*\.\d{3,})/g,(e,n,r)=>{let a=n===`/`,o=Math.abs(parseFloat(r)),s=/^(?:lch|lab|oklch|oklab)$/i.test(t)&&o>=10,c;c=a?3:s?1:i?4:3;let l=10**c,u=(Math.round(parseFloat(r)*l)/l).toFixed(c).replace(/0+$/,``).replace(/\.$/,``);return u.startsWith(`0.`)&&(u=u.substring(1)),u.startsWith(`-0.`)&&(u=`-`+u.substring(2)),n+u}),t+`(`+r.trim()+`)`}),e=e.replace(/\boklab\(\s*(-?(?:\d+|\d*\.\d+))\s+(-?(?:\d+|\d*\.\d+))\s+(-?(?:\d+|\d*\.\d+))(?:\s*\/\s*(-?(?:\d+|\d*\.\d+)%?))?\s*\)/gi,(e,t,n,r,i)=>{let a=A(i),o=je(parseFloat(t),parseFloat(n),parseFloat(r),a);return o&&o.length<e.length?o:e}),e=e.replace(/\b(rgba?|hsla?)\([^)]*\)/gi,e=>e.replace(/\bnone\b/gi,`0`)),e=e.replace(/\bhwb\(\s*(-?(?:\d+|\d*\.\d+))\s+((?:\d+|\d*\.\d+))%?\s+((?:\d+|\d*\.\d+))%?(?:\s*\/\s*(-?(?:\d+|\d*\.\d+)%?))?\s*\)/gi,(e,t,n,r,i)=>{let[a,o,s]=F(parseFloat(t),parseFloat(n)/100,parseFloat(r)/100);return P(a,o,s,A(i))}),e=e.replace(/\brgba?\(\s*(-?(?:\d+|\d*\.\d+))\s+(-?(?:\d+|\d*\.\d+))\s+(-?(?:\d+|\d*\.\d+))(?:\s*\/\s*(-?(?:\d+|\d*\.\d+)%?))?\s*\)/gi,(e,t,n,r,i)=>P(Math.round(parseFloat(t)),Math.round(parseFloat(n)),Math.round(parseFloat(r)),A(i))),e=e.replace(/\bhsla?\(\s*(-?(?:\d+|\d*\.\d+))\s+((?:\d+|\d*\.\d+))%?\s+((?:\d+|\d*\.\d+))%?(?:\s*\/\s*(-?(?:\d+|\d*\.\d+)%?))?\s*\)/gi,(e,t,n,r,i)=>{let[a,o,s]=N(parseFloat(t),parseFloat(n)/100,parseFloat(r)/100);return P(a,o,s,A(i))}),e=e.replace(/\brgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?(?:\d+|\d*\.\d+)%?)\s*\)/gi,(e,t,n,r,i)=>P(parseInt(t,10),parseInt(n,10),parseInt(r,10),A(i))),e=e.replace(/\bhsla\(\s*(-?(?:\d+|\d*\.\d+))\s*,\s*((?:\d+|\d*\.\d+))%?\s*,\s*((?:\d+|\d*\.\d+))%?\s*,\s*(-?(?:\d+|\d*\.\d+)%?)\s*\)/gi,(e,t,n,r,i)=>{let[a,o,s]=N(parseFloat(t),parseFloat(n)/100,parseFloat(r)/100);return P(a,o,s,A(i))}),e=e.replace(/\bhsla?\(\s*(-?(?:\d+|\d*\.\d+))\s*,\s*((?:\d+|\d*\.\d+))%?\s*,\s*((?:\d+|\d*\.\d+))%?\s*\)/gi,(e,t,n,r)=>{let[i,a,o]=N(parseFloat(t),parseFloat(n)/100,parseFloat(r)/100);return P(i,a,o,1)}),e=e.replace(/\brgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/gi,(e,t,n,r)=>P(parseInt(t,10),parseInt(n,10),parseInt(r,10),1)),e}var K={left:`0`,center:`50%`,right:`100%`,top:`0`,bottom:`100%`};function $e(e){let t=e.split(/\s+/);if(t.length>=3)return e;if(t.length===1){let n=t[0].toLowerCase();return n===`top`||n===`bottom`||K[n]===void 0?e:K[n]}if(t.length===2){let e=t[0].toLowerCase(),n=t[1].toLowerCase(),r=K[e]!==void 0,i=K[n]!==void 0;if(r&&i){let t=K[e],r=K[n];return r===`50%`?t:t+` `+r}}return e}function et(e){return e.replace(/\b(\d+(?:\.\d+)?)ms\b/gi,(e,t)=>{let n=parseFloat(t);return n===0?`0s`:n<=99?e:D(n/1e3)+`s`})}function tt(e,t){if(t===`font-weight`&&(e=e.replace(/\bbold\b/gi,`700`),e=e.replace(/\bnormal\b/gi,`400`)),(t===`transition`||t===`transition-duration`||t===`transition-delay`||t===`animation`||t===`animation-duration`||t===`animation-delay`)&&(e=et(e)),t===`transition`&&(e=e.replace(/\s+0s/g,` `),e=e.replace(/^0px\s*/,``),e=e.replace(/cubic-bezier\(0,0,1,1\)/g,`linear`),e=e.replace(/cubic-bezier\(\.25,\.1,\.25,1\)/g,`ease`),e=e.replace(/cubic-bezier\(\.42,0,1,1\)/g,`ease-in`),e=e.replace(/cubic-bezier\(0,0,\.58,1\)/g,`ease-out`),e=e.trim()),t===`animation`&&(e=e.replace(/steps\(1,start\)/g,`step-start`),e=e.replace(/steps\(1,end\)/g,`step-end`)),t===`flex`&&(e=e.replace(/\s+0px/g,` `),e=e.replace(/^0px\s*/,``),e=e.replace(/\s+0$/,``),e=e.replace(/^0px$/,``),e=e.trim()),e===`initial`&&([`opacity`,`z-index`,`flex-grow`,`flex-shrink`,`order`,`line-height`,`zoom`].includes(t)&&(t===`opacity`&&(e=`1`),t===`z-index`&&(e=`auto`)),[`margin`,`padding`].includes(t)&&(e=`0`),[`min-width`,`min-height`].includes(t)&&(e=`auto`)),t===`background`&&e===`none`&&(e=`0 0`),t===`display`&&(e===`block flow`&&(e=`block`),e===`inline flow-root`&&(e=`inline-block`)),t===`background-repeat`&&(e===`no-repeat no-repeat`&&(e=`no-repeat`),e===`repeat no-repeat`&&(e=`repeat-x`),e===`no-repeat repeat`&&(e=`repeat-y`)),t===`background-position`&&(e=$e(e)),t===`border`&&/^(?:solid|dashed|dotted|double|groove|ridge|inset|outset|hidden|none)\s+/i.test(e)&&(e=e.replace(/^((?:solid|dashed|dotted|double|groove|ridge|inset|outset|hidden|none))\s+([^\s]+)\s+(.+)$/i,`$2 $1 $3`)),t===`flex-flow`&&(e=e.replace(/^(nowrap|wrap|wrap-reverse)\s+(row|row-reverse|column|column-reverse)$/i,`$2 $1`)),t===`font-family`){e=e.replace(/"([A-Za-z0-9-]+(?: [A-Za-z0-9-]+)+)"/g,`$1`);let t=new Set;e=e.split(`,`).map(e=>e.trim()).filter(Boolean).filter(e=>{let n=e.toLowerCase();return t.has(n)?!1:(t.add(n),!0)}).join(`,`)}if(t===`grid-template-areas`&&(e=e.replace(/"([^"]*)"/g,(e,t)=>{let n=t.replace(/\s+/g,` `).trim();return n=n.replace(/(^| )\.{2,}(?= |$)/g,`$1.`),`"`+n+`"`})),t===`font-size`&&(e=e.replace(/^(-?(?:\d+|\d*\.\d+))pt$/i,(e,t)=>D(96/72*parseFloat(t))+`px`)),e=e.replace(/\bclamp\(([^,]+),\1,\1\)/gi,`$1`),e=e.replace(/\bcolor\(display-p3\s+([\d.]+)\s+\1\s+\1(?:\s*\/\s*(-?(?:\d+|\d*\.\d+)%?))?\s*\)/gi,(e,t,n)=>{let r=Math.round(parseFloat(t)*255);return P(r,r,r,A(n))}),e=G(e,W),e=G(e,e=>e.replace(/\s+#([0-9a-fA-F]{3,8})\b/gi,`#$1`)),t!==`transform`&&t!==`background`&&t!==`src`&&(e=e.replace(/\)(?=[0-9a-zA-Z#-])/g,`) `)),t===`font`){let t=e.split(/\s+/),n=t.findIndex(e=>/\d/.test(e)&&/(?:px|em|rem|%|pt|pc|vw|vh|vmin|vmax|ch|ex|cm|mm|in|lh|rlh)/i.test(e));n>0&&(e=[...t.slice(0,n).filter(e=>e!==`normal`&&e!==`400`),...t.slice(n)].join(` `))}if(t===`background`&&e!==`none`){let t=e.replace(/(?:^|\s)0(?:%|px)? 0(?:%|px)?(?=\s|$)/g,` `).replace(/\)0(?:%|px)? 0(?:%|px)?(?=\s|$)/g,`) `).replace(/(?<!-)\brepeat\b(?!-)/g,` `).replace(/\bscroll\b/g,` `).replace(/\bnone\b/g,` `).replace(/\s+/g,` `).trim();t&&(e=t)}if(t===`border`&&(e=e.replace(/\bmedium\s+/g,``)),t===`outline`&&(e=e.replace(/\b(solid|dashed|dotted|double|groove|ridge|inset|outset|hidden|none)(red|green|olive|tan|transparent)\b/g,`$1 $2`)),t===`transform`&&(e=Ue(e),e=e.replace(/\)\s+(?=[a-z-]+\()/gi,`)`)),t===`scale`){let t=e.split(/\s+/).filter(Boolean).map(E);e=t.length===2&&t[0]===t[1]?t[0]:t.length===3&&t[2]===`1`?t[0]===t[1]?t[0]:t[0]+` `+t[1]:t.join(` `)}return e=e.replace(/\s+/g,` `),/^(margin|padding|inset|border-width|border-style|border-color|gap|overflow)$/.test(t)&&(e=j(e.split(` `)).join(` `)),t===`border-radius`&&(e=e.split(`/`).map(e=>e.trim()).filter(Boolean).map(e=>j(e.split(/\s+/)).join(` `)).join(`/`)),e}function q(e){if(e.property===`position-area`){let t=Ye[e.value];if(t)return t}if(e.property===`quotes`&&Be(e.value))return`none`;let t=e.value;if(typeof t==`string`){if(t=t.trim(),t=Ze(t,e.property),t=t.replace(/ \/ /g,`/`),t=t.replace(/\s*([*/])\s*/g,`$1`),t=Ie(t,e.property,e.value||``),t=Le(t),t=t.replace(/calc\(([^()]+)\)/gi,(e,t)=>{let n=t.replace(/\s+/g,` `).trim();return(n.match(/[+-]?\s*(?:\d*\.\d+|\d+)%/g)||[]).some(e=>Math.abs(parseFloat(e))>0)?`calc(`+n.replace(/\s*\+\s*0%(?=\s*$)/g,``).replace(/^0%\s*\+\s*/g,``).trim()+`)`:e}),e.property!==`initial-value`&&(t=t.replace(/(^|\s|,|\()0(?:px|em|rem|vw|vh|cm|mm|in|pt|pc|ex|ch|vmin|vmax)(?=\s|,|$|\)|!)/g,`$10`)),t=t.replace(/(^|\s|,|\()(-?)0+(\.\d+)/g,`$1$2$3`),/^[+-]?(?:\d+|\d*\.\d+)([a-z%]+)?$/i.test(t)){let[,e,n=``]=t.match(/^([+-]?(?:\d+|\d*\.\d+))([a-z%]+)?$/i);t=D(e,4)+n}t=G(t,e=>(e=e.replace(/\s+#([0-9a-fA-F]{3,8})\b/gi,`#$1`),e=e.replace(/#([0-9a-fA-F]{3,8})\b/gi,e=>e.toLowerCase()),e)),t=Qe(t),t=G(t,W),t=tt(t,e.property)}return/gradient\(/.test(t)&&(t=Fe(t)),e.property===`unicode-range`&&(t=Je(t)),t}var J={margin:[`margin-top`,`margin-right`,`margin-bottom`,`margin-left`],padding:[`padding-top`,`padding-right`,`padding-bottom`,`padding-left`],inset:[`top`,`right`,`bottom`,`left`],overflow:[`overflow-x`,`overflow-y`],gap:[`row-gap`,`column-gap`],flex:[`flex-grow`,`flex-shrink`,`flex-basis`],outline:[`outline-width`,`outline-style`,`outline-color`],"border-radius":[`border-top-left-radius`,`border-top-right-radius`,`border-bottom-right-radius`,`border-bottom-left-radius`],"border-width":[`border-top-width`,`border-right-width`,`border-bottom-width`,`border-left-width`],"border-style":[`border-top-style`,`border-right-style`,`border-bottom-style`,`border-left-style`],"border-color":[`border-top-color`,`border-right-color`,`border-bottom-color`,`border-left-color`],border:[`border-top`,`border-right`,`border-bottom`,`border-left`,`border-width`,`border-style`,`border-color`],"border-image":[`border-image-source`,`border-image-slice`,`border-image-repeat`],"border-top":[`border-top-width`,`border-top-style`,`border-top-color`],"border-right":[`border-right-width`,`border-right-style`,`border-right-color`],"border-bottom":[`border-bottom-width`,`border-bottom-style`,`border-bottom-color`],"border-left":[`border-left-width`,`border-left-style`,`border-left-color`],background:[`background-color`,`background-image`,`background-repeat`,`background-position`,`background-attachment`],"text-decoration":[`text-decoration-line`,`text-decoration-style`,`text-decoration-color`],"place-items":[`align-items`,`justify-items`],"place-content":[`align-content`,`justify-content`],"place-self":[`align-self`,`justify-self`],columns:[`column-width`,`column-count`],"list-style":[`list-style-position`,`list-style-image`,`list-style-type`],"margin-inline":[`margin-inline-start`,`margin-inline-end`],"margin-block":[`margin-block-start`,`margin-block-end`],"padding-inline":[`padding-inline-start`,`padding-inline-end`],"padding-block":[`padding-block-start`,`padding-block-end`],"inset-inline":[`inset-inline-start`,`inset-inline-end`],"inset-block":[`inset-block-start`,`inset-block-end`],"border-inline":[`border-inline-start`,`border-inline-end`,`border-inline-width`,`border-inline-style`,`border-inline-color`],"border-block":[`border-block-start`,`border-block-end`,`border-block-width`,`border-block-style`,`border-block-color`],"border-inline-width":[`border-inline-start-width`,`border-inline-end-width`],"border-block-width":[`border-block-start-width`,`border-block-end-width`],transition:[`transition-property`,`transition-duration`,`transition-timing-function`,`transition-delay`],animation:[`animation-name`,`animation-duration`,`animation-timing-function`,`animation-delay`,`animation-iteration-count`,`animation-direction`,`animation-fill-mode`,`animation-play-state`],mask:[`mask-image`,`mask-repeat`,`mask-size`],"position-try":[`position-try-order`,`position-try-fallbacks`],font:[`font-style`,`font-weight`,`font-size`,`line-height`,`font-family`]},nt={border:[`border-image`,`border-image-source`,`border-image-slice`,`border-image-width`,`border-image-outset`,`border-image-repeat`],font:[`font-variant`,`font-variant-alternates`,`font-variant-caps`,`font-variant-east-asian`,`font-variant-ligatures`,`font-variant-numeric`,`font-variant-position`],mask:[`mask-border`,`mask-border-source`,`mask-border-slice`,`mask-border-width`,`mask-border-outset`,`mask-border-repeat`,`mask-border-mode`]};function rt(e){let t=[...e],n=(e,n)=>{let r=t.findIndex(t=>t?.property===e),i=t.findIndex(e=>e?.property===n);if(r===-1||i===-1||r<i)return;let[a]=t.splice(r,1);t.splice(i,0,a)};return n(`border`,`border-image`),n(`font`,`font-feature-settings`),n(`font`,`font-variant-ligatures`),n(`font`,`font-kerning`),n(`font`,`font-variation-settings`),n(`mask`,`mask-border`),n(`margin`,`margin-top`),n(`margin`,`margin-right`),n(`margin`,`margin-bottom`),n(`margin`,`margin-left`),t}function it(e,t,n){let r=t.filter(e=>n.some(t=>t.property===e));return r.length===0?null:e===`font`?r.includes(`font-size`)&&r.includes(`font-family`)?r:null:e===`background`?r.includes(`background-color`)||r.includes(`background-image`)?r:null:e===`mask`?r.includes(`mask-image`)?r:null:e===`border-image`?r.includes(`border-image-source`)?r:null:e===`border`?r.includes(`border-width`)&&r.includes(`border-style`)&&r.includes(`border-color`)?[`border-width`,`border-style`,`border-color`]:null:e===`flex`?r.includes(`flex-grow`)&&r.includes(`flex-shrink`)&&r.includes(`flex-basis`)?[`flex-grow`,`flex-shrink`,`flex-basis`]:null:r.length===t.length?t:null}function at(e){let t=J[e]||[],n=nt[e]||[],r=[...t,...n];for(let e of t){let t=J[e]||[];r.push(...t)}return[...new Set(r)]}function Y(e){return/var\([^)]*,/.test(e)}function ot(e,t){if(!/var\(/.test(e)||Y(e))return!Y(e);let n=[...e.matchAll(/var\((--[A-Za-z0-9_-]+)\)/g)];return n.length?n.every(([,e])=>t.registeredCustomProperties.has(e)):!1}function st(e,t,n=``,r){if(e.length<2)return null;let i=e.map(e=>{let n=t.find(t=>t.property===e);return n?q(n):null});if(i.some(e=>e===null)||i.some(e=>!ot(e,r)))return null;let a=i.map(e=>e.includes(`!important`)),o=a.every(e=>e),s=a.every(e=>!e);if(!o&&!s&&!(n===`margin`||n===`padding`||n===`inset`||n===`position-try`))return null;let c=i.map(e=>e.replace(`!important`,``).trim()),l=new Map(e.map((e,t)=>[e,c[t]])),u=o?`!important`:``;if(n===`position-try`){let e=l.get(`position-try-order`),t=l.get(`position-try-fallbacks`);return e===`normal`&&t?t+u:null}if(n===`transition`){let e=l.get(`transition-property`),t=l.get(`transition-duration`),n=l.get(`transition-timing-function`),r=l.get(`transition-delay`);if(!e||!t)return null;let i=[e,t];return n&&n!==`ease`&&i.push(n),r&&r!==`0`&&r!==`0s`&&i.push(r),i.join(` `)+u}if(n===`animation`){let e=l.get(`animation-name`),t=l.get(`animation-duration`);if(!e||!t)return null;let n=[e,t],r=l.get(`animation-timing-function`),i=l.get(`animation-delay`),a=l.get(`animation-iteration-count`),o=l.get(`animation-direction`),s=l.get(`animation-fill-mode`),c=l.get(`animation-play-state`);return r&&r!==`ease`&&n.push(r),i&&i!==`0`&&i!==`0s`&&n.push(i),a&&a!==`1`&&n.push(a),o&&o!==`normal`&&n.push(o),s&&s!==`none`&&n.push(s),c&&c!==`running`&&n.push(c),n.join(` `)+u}if(n===`background`){let e=l.get(`background-color`),t=l.get(`background-image`),n=l.get(`background-repeat`),r=l.get(`background-position`),i=l.get(`background-attachment`),a=[];return e&&e!==`transparent`&&a.push(e),t&&t!==`none`&&a.push(t),r&&r!==`0 0`&&r!==`0% 0%`&&a.push(r),n&&n!==`repeat`&&a.push(n),i&&i!==`scroll`&&a.push(i),a.length?a.join(` `)+u:null}if(n===`mask`){let e=l.get(`mask-image`),t=l.get(`mask-repeat`),n=l.get(`mask-size`);if(!e)return null;let r=e;return t&&(r+=` `+t),n&&(r+=`/`+n),r+u}if(n===`border-image`){let e=l.get(`border-image-source`),t=l.get(`border-image-slice`),n=l.get(`border-image-repeat`);if(!e)return null;let r=[e];return t&&r.push(t),n&&r.push(n),r.join(` `)+u}if(n===`text-decoration`){let e=l.get(`text-decoration-line`),t=l.get(`text-decoration-style`),n=l.get(`text-decoration-color`);if(!e)return null;let r=[e];return t&&t!==`solid`&&r.push(t),n&&n!==`currentcolor`&&r.push(n),r.join(` `)+u}if(n===`columns`)return c.join(` `)+u;if(n===`list-style`){let e=l.get(`list-style-position`),t=l.get(`list-style-image`),n=l.get(`list-style-type`),r=[];return e&&e!==`outside`&&r.push(e),t&&t!==`none`&&r.push(t),n&&n!==`disc`&&r.push(n),(r.join(` `)||`inside`)+u}if(n===`font`){let e=l.get(`font-size`),t=l.get(`font-family`);if(!e||!t)return null;let n=[],r=l.get(`font-style`),i=l.get(`font-weight`),a=l.get(`line-height`);return r&&r!==`normal`&&n.push(r),i&&i!==`400`&&i!==`normal`&&n.push(i),a?n.push(e+`/`+a):n.push(e),n.push(t),n.join(` `)+u}if(n===`flex`){let e=l.get(`flex-grow`),t=l.get(`flex-shrink`),n=l.get(`flex-basis`);return!e||!t||!n?null:[e,t,n].join(` `)+u}return e.length===2?c[0]===c[1]?c[0]+u:c.join(` `)+u:e.length===4?j([...c]).join(` `)+u:e.length===3&&(e.includes(`border-width`)||e.includes(`outline-width`))&&e.some(e=>/-style$/.test(e))&&e.some(e=>/-color$/.test(e))?c.join(` `)+u:null}function ct(e,t){let n=[];for(let t of e){if(t.type===`rule`||t.type===`media`){n.push(t);continue}let e=t.property;if(!e||e===`quotes`&&ze(t.value))continue;let r=q(t),i=-1;for(let t=n.length-1;t>=0;t--)if(n[t].property===e){i=t;break}let a=-1;if(!e.startsWith(`-`)){for(let t=n.length-1;t>=0;t--)if(n[t].property&&n[t].property.endsWith(e)&&n[t].property.startsWith(`-`)){a=t;break}}if(a!==-1&&r===q(n[a])&&(n.splice(a,1),i>a&&i--),i!==-1){let e=q(n[i]);if(e.includes(`!important`)&&!r.includes(`!important`))continue;let a=r.includes(`calc(`)||r.includes(`env(`)||r.includes(`var(`)||r.includes(`-webkit-`),o=e.includes(`calc(`)||e.includes(`env(`)||e.includes(`var(`)||e.includes(`-webkit-`);if(a&&!o){n.push(t);continue}n.splice(i,1)}n.push(t)}let r=new Set;for(let e=0;e<n.length;e++){let t=n[e];if(t.property&&J[t.property]){let i=at(t.property);for(let t of i)n.findIndex((n,r)=>n.property===t&&r<e)!==-1&&r.add(t)}}n=n.filter(e=>!r.has(e.property));let i=!0;for(;i;){i=!1;let e=new Set,r=[];for(let[i,a]of Object.entries(J)){if(n.some(e=>e.property===i))continue;let o=it(i,a,n);if(!o)continue;let s=n.filter(e=>o.includes(e.property)),c=st(o,s,i,t);if(!c)continue;r.push({property:i,value:c});let l=i===`margin`||i===`padding`||i===`inset`,u=s.some(e=>q(e).includes(`!important`)),d=s.every(e=>q(e).includes(`!important`));if(l&&u&&!d)for(let t of o){let n=s.find(e=>e.property===t);n&&!q(n).includes(`!important`)&&e.add(t)}else for(let t of o)e.add(t)}r.length&&(n=n.filter(t=>!e.has(t.property)),n=[...n,...r],i=!0)}return rt(n)}function X(e){return e.filter(e=>e.type!==`whitespace`).map(e=>[e.property,`:`,q(e)].join(``)).join(`;`)}function Z(e,t){return(e||[]).map(e=>$(e,t)).join(``)}function Q(e){let t=[],n=``,r=0;for(let i of e)i===`(`?r++:i===`)`&&r--,i===`,`&&r===0?(t.push(n),n=``):n+=i;return t.push(n),t}function lt(e){let t=e.trim(),n=t.indexOf(`(`);if(n===-1)return t;let r=t.slice(0,n),i=t.lastIndexOf(`)`),a=Q(t.slice(n+1,i)).map(e=>e.trim().replace(/\s*:\s*/,`:`));return r+`(`+a.join(`,`)+`)`}function ut(e,t){let n;n=e.name===`function`?lt(e.prelude||``):(e.prelude||``).trim().replace(/\s+/g,` `);let r=(e.rules||[]).filter(e=>e.type!==`whitespace`);if(r.length===0)return``;let i=r.filter(e=>e.type===`declaration`&&e.property),a=r.filter(e=>e.type!==`declaration`),o=[X(i),Z(a,t)].filter(Boolean).join(``);if(!o)return``;let s=n?` `:``;return`@`+e.name+s+n+`{`+o+`}`}function dt(e,t){let n=0;for(let r=t;r<e.length;r++)if(e[r]===`(`)n++;else if(e[r]===`)`&&(n--,n===0))return r;return-1}function ft(e){let t=e.match(/^(\*|[a-zA-Z][a-zA-Z0-9-]*)/);return t?t[0]:null}function pt(e,t){let n=ft(e),r=ft(t);return n&&r?null:r?t+e:e+t}function mt(e,t){let n=[];for(let r of e)for(let e of t){let t=pt(r.trim(),e.trim());if(t===null)return null;n.push(t)}return n}function ht(e){let t=e,n=0;for(;n<t.length;){let e=t.indexOf(`:where(`,n);if(e===-1)break;let r=e+6,i=dt(t,r);if(i===-1)break;let a=i+1;if(t.slice(a,a+7)!==`:where(`){n=i+1;continue}let o=a+6,s=dt(t,o);if(s===-1)break;let c=t.slice(r+1,i),l=t.slice(o+1,s),u=mt(Q(c),Q(l));if(u===null){n=i+1;continue}let d=t.slice(e,s+1),f=`:where(`+u.join(`,`)+`)`;f.length<d.length?t=t.slice(0,e)+f+t.slice(s+1):n=i+1}return t}function gt(e){if(e=e.replace(/:is\(:link,:visited\)/g,`:any-link`),e=e.replace(/:is\(:visited,:link\)/g,`:any-link`),!e.startsWith(`:is(`))return[e];let t=0,n=-1;for(let r=4;r<e.length;r++)if(e[r]===`(`)t++;else if(e[r]===`)`){if(t===0){n=r;break}t--}if(n!==e.length-1)return[e];let r=e.slice(4,-1),i=[],a=``,o=0;for(let e of r)e===`(`?o++:e===`)`&&o--,e===`,`&&o===0?(i.push(a),a=``):a+=e;i.push(a);let s=i.length,c=i.includes(`:link`),l=i.includes(`:visited`);return c&&l&&(i=i.filter(e=>e!==`:link`&&e!==`:visited`),i.includes(`:any-link`)||i.push(`:any-link`)),i=[...new Set(i)],i.sort(),i.length===1||i.every(e=>/^[a-z*][a-z0-9-]*$/i.test(e))&&i.length===s?i:[`:is(`+i.join(`,`)+`)`]}function _t(e){let t=``,n=0;for(let r=0;r<e.length;r++){let i=e[r];if(i===`(`&&n++,i===`)`&&n--,i===`,`&&n>0)for(t+=`,`;r+1<e.length&&e[r+1]===` `;)r++;else t+=i}return t}function vt(e){return e.replace(/(^|\s|,|\()(-?)0+(\.\d+)/g,`$1$2$3`)}function yt(e){let t=e.replace(/\s+/g,` `);return t=_t(t),t=vt(t),t}function $(e,t,n=!1){if(e.type===`rule`){let n=e.declarations?.filter(e=>e.type!==`whitespace`)||[];if(n.length===0||n.every(e=>e.type===`comment`&&!e.comment?.startsWith(`!`)))return``;let r=[];if(e.selectors?.length){let t=[...new Set(e.selectors)];t=t.map(e=>{let t=v(e);return t=t.replace(/\s+/g,` `),t=t.replace(/\s*([,>+~])\s*/g,`$1`),t=t.replace(/\(\s+/g,`(`).replace(/\s+\)/g,`)`),t=t.replace(/:nth-child\(2n\s*\+\s*1\)/g,`:nth-child(odd)`),t=t.replace(/:nth-child\(2n\s*\+\s*0\)/g,`:nth-child(2n)`),t=t.replace(/:nth-child\(1n\)/g,`:nth-child(n)`),t=t.replace(/:nth-child\(\+\s*(\d+)\)/g,`:nth-child($1)`),t=t.replace(/:nth-child\(0n\s*\+\s*(\d+)\)/g,`:nth-child($1)`),t=t.replace(/:nth-child\(1\)/g,`:first-child`),t=t.replace(/:nth-last-child\(1\)/g,`:last-child`),t=t.replace(/:nth-of-type\(1\)/g,`:first-of-type`),t=t.replace(/:nth-last-of-type\(1\)/g,`:last-of-type`),t=t.replace(/::before/g,`:before`),t=t.replace(/::after/g,`:after`),t=t.replace(/\*([#.[])/g,`$1`),t=t.replace(/\[\s*([^=]+)\s*=\s*"(.*?)"\s*\]/g,(e,t,n)=>{let r=n.replace(/([ #.:/])/g,`\\$1`);return r.length<n.length+2?`[`+t+`=`+r+`]`:`[`+t+`="`+n+`"]`}),t=t.replace(/\[\s*([^=]+)\s*=\s*'(.*?)'\s*\]/g,(e,t,n)=>{let r=n.replace(/([ #.:/])/g,`\\$1`);return r.length<n.length+2?`[`+t+`=`+r+`]`:`[`+t+`="`+n+`"]`}),t=t.replace(/\[\s*([^=]+)\s*=\s*([^"'].*?)\s*\]/g,(e,t,n)=>{let r=n.replace(/\\([ #.:/])/g,`$1`);return r.length+2<n.length?`[`+t+`="`+r+`"]`:`[`+t+`=`+n+`]`}),t=t.replace(/(?<=\b(?:button|fieldset|form|input|select|textarea)):not\(:invalid\)/g,`:valid`),t=t.replace(/:not\(:dir\(ltr\)\)/g,`:dir(rtl)`),t=t.replace(/:not\(:not\((.*?)\)\)/g,`$1`),t=t.replace(/:not\(:enabled\)/g,`:disabled`),t=t.replace(/:not\(:required\)/g,`:optional`),t=t.replace(/(^|[\s,>+~])(a|area|link)(?:\[.*?\])*(?::where\()?:not\(:link\)\)?/g,e=>e.replace(`:not(:link)`,`:visited`)),t=t.replace(/^& /,``),t=ht(t),t}),t=t.flatMap(gt),t=[...new Set(t)];let n=new Set([`h1`,`h2`,`h3`,`h4`,`h5`,`h6`]);e.selectors.length===6&&t.length===6&&t.every(e=>n.has(e))&&(t=[`:heading`]),r.push(t.join(`,`))}r.push(`{`),n=ct(n,t);let i=n.filter(e=>e.type!==`rule`&&e.type!==`media`),a=n.filter(e=>e.type===`rule`||e.type===`media`),o=i.map(e=>{if(!e.property)return``;let n=_(e.property),r;if(n.startsWith(`--`))if(t.registeredCustomPropertySyntax.get(n)===`"<color>"`)r=q(e);else{let t=(e.rawValue||e.value||``).trim();t===``?r=` `:/^rgb\(\s*\d+\s+\d+\s+\d+\s*\)$/i.test(t)?r=` `+t:(r=yt(t),r.startsWith(`.`)&&(r=` `+r))}else r=q(e);return[n,`:`,r].join(``)}).join(`;`),s=a.map(e=>$(e,t,!0)).join(``);return r.push(o),o&&s&&!o.endsWith(`;`)&&r.push(`;`),r.push(s),r.push(`}`),r.join(``)}if(e.type===`media`){let r=y(e.media),i;i=n&&r.startsWith(`(`)?``:` `;let a=e.rules||[],o=a.filter(e=>e.type===`declaration`&&e.property),s=a.filter(e=>e.type!==`declaration`),c=[o.map(e=>[_(e.property),`:`,q(e)].join(``)).join(`;`),s.map(e=>$(e,t,!1)).join(``)].filter(Boolean).join(``);return c?`@media`+i+r+`{`+c+`}`:``}if(e.type===`starting-style`){let n=Z(e.rules,t);return n?`@starting-style{`+n+`}`:``}if(e.type===`scope`){let n=(e.scope||``).trim().replace(/\s+to\s+/g,`to `),r=Z(e.rules,t);return r?`@scope`+n+`{`+r+`}`:``}if(e.type===`supports`){let n=b(e.supports),r=Z(e.rules,t);if(!r)return``;if(x(n))return r;let i=n.startsWith(`(`)&&/\)(?:and|or)\s*\(/.test(n),a;return a=i?``:` `,`@supports`+a+n+`{`+r+`}`}if(e.type===`keyframes`){let t=(e.keyframes||[]).filter(e=>e.type===`keyframe`).map(e=>{let t=[],n=e.values.map(e=>e===`from`?`0%`:e===`100%`?`to`:e);t.push(n.join(`,`)),t.push(`{`);let r=e.declarations?.filter(e=>e.type!==`whitespace`)?.map(e=>[e.property,`:`,q(e)].join(``)).join(`;`)||``;return t.push(r),t.push(`}`),t.join(``)}).join(``);return t?`@keyframes `+e.name+`{`+t+`}`:``}if(e.type===`font-face`){let t=X(e.declarations||[]);return t?`@font-face{`+t+`}`:``}if(e.type===`charset`)return`@charset `+e.charset+`;`;if(e.type===`import`){let t=e.import;t=t.replace(/url\(\s*(".*?"|'.*?')\s*\)/g,`$1`),t=t.replace(/url\(\s*(.*?)\s*\)/g,`"$1"`),t=t.replace(/\s+/g,` `).trim(),t=t.replace(/^(".*?"|'.*?') /,`$1`),t=t.replace(/\) ([a-zA-Z])/g,`)$1`),t=t.replace(/supports\(([^()]*)\)/g,(e,t)=>`supports(`+t.replace(/\s*:\s*/g,`:`)+`)`);let n=t.startsWith(`"`)||t.startsWith(`'`),r;return r=n?``:` `,`@import`+r+t+`;`}if(e.type===`layer`)return e.rules&&e.rules.length?`@layer `+(e.layer||``)+`{`+Z(e.rules,t)+`}`:`@layer `+e.layer+`;`;if(e.type===`property`){let t=X(e.declarations||[]);return t?`@property `+e.name+`{`+t+`}`:``}if(e.type===`container`){let n=e.container.replace(/\s+/g,` `).replace(/\s*([:,])\s*/g,`$1`).replace(/\s*([=<>])\s*/g,`$1`).replace(/\(\s+/g,`(`).replace(/\s+\)/g,`)`);n=n.replace(/min-width:(\d+px)/gi,`width>=$1`).replace(/max-width:(\d+px)/gi,`width<=$1`);let r=Z(e.rules,t);if(!r)return``;let i;return i=n.startsWith(`(`)?``:` `,`@container`+i+n+`{`+r+`}`}if(e.type===`page`){let t=(e.selectors||[]).map(e=>e.trim()).filter(Boolean).join(`,`),n=``;t&&(n=t.startsWith(`:`)?``:` `);let r=(e.declarations||[]).filter(e=>e.type!==`whitespace`).flatMap(e=>{if(e.type===`page-margin-box`&&e.name){let t=(e.declarations||[]).filter(e=>e.type!==`whitespace`&&e.property).map(e=>[_(e.property),`:`,q(e)].join(``)).join(`;`);return t?[`@`+e.name+`{`+t+`}`]:[]}return e.property?[[_(e.property),`:`,q(e)].join(``)]:[]});return r.length?`@page`+n+t+`{`+r.join(`;`)+`}`:``}if(e.type===`counter-style`){let t=X(e.declarations||[]);return t?`@counter-style `+e.name+`{`+t+`}`:``}if(e.type===`position-try`){let t=X(e.declarations||[]);return t?`@position-try `+e.name+`{`+t+`}`:``}if(e.type===`document`){let n=Z(e.rules,t);if(!n)return``;let r=e.vendor||``,i=(e.document||``).trim().replace(/\)\s*,\s*/g,`),`);return`@`+r+`document `+i+`{`+n+`}`}return e.type===`comment`?e.comment.startsWith(`!`)?`/*`+e.comment+`*/`:``:e.type===`at-rule`?ut(e,t):``}function bt(e){let t=[],n=``,r=0;for(let i of e)i===`(`||i===`[`?(r++,n+=i):i===`)`||i===`]`?(r--,n+=i):i===`,`&&r===0?(t.push(n.trim()),n=``):n+=i;let i=n.trim();return i&&t.push(i),t}function xt(e){let t=bt(e),n=new Set;return t.filter(e=>n.has(e)?!1:(n.add(e),!0)).join(`,`)}function St(e){if(e.startsWith(`@`))return null;let t=e.indexOf(`{`);return t===-1?null:e.slice(t)}function Ct(e){if(e.indexOf(`{`,1)!==-1)return e;let t=e.slice(1,-1);return t?`{`+t.split(`;`).filter(Boolean).sort().join(`;`)+`}`:e}function wt(e){let t=[];for(let n of e){if(!n)continue;let e=t[t.length-1];if(e){let r=St(e),i=St(n);if(r&&i&&Ct(r)===Ct(i)){let a=e.slice(0,e.length-r.length),o=n.slice(0,n.length-i.length),s=xt(a+`,`+o);t[t.length-1]=s+r;continue}}t.push(n)}return t}var Tt=function(t){let c;c=typeof t==`string`?t:String(t??``);let l,u=[];try{l=e(d(h(c)),{preserveFormatting:!0,silent:!0})}catch{return c}let f=n();if(l?.stylesheet?.rules){let{positionTryRules:e,positionTryUsage:t}=r(l.stylesheet.rules,f);i(l.stylesheet.rules,q,e,t),a(l.stylesheet.rules),l.stylesheet.rules=o(l.stylesheet.rules,e,t),l.stylesheet.rules=s(l.stylesheet.rules),l.stylesheet.rules=S(l.stylesheet.rules),l.stylesheet.rules=le(l.stylesheet.rules,w),l.stylesheet.rules=ae(l.stylesheet.rules,w),l.stylesheet.rules=oe(l.stylesheet.rules);let n=C(ie(ne(C(ce(w(l.stylesheet.rules))))));for(let e of n)u.push($(e,f));return g(wt(u).join(``))}return c};export{Tt as t};
2
+ //# sourceMappingURL=CSSLOP-KqihQ_En.js.map