diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index f84a4f35..00000000
--- a/.editorconfig
+++ /dev/null
@@ -1,10 +0,0 @@
-# editorconfig.org
-root = true
-
-[*]
-charset = utf-8
-indent_style = space
-indent_size = 4
-end_of_line = lf
-trim_trailing_whitespace = true
-insert_final_newline = true
diff --git a/.eslintrc b/.eslintrc
deleted file mode 100644
index 9f998c3c..00000000
--- a/.eslintrc
+++ /dev/null
@@ -1,165 +0,0 @@
-{
- "env": {
- "node": true,
- "mocha": true,
- "es6": true
- },
- "parserOptions": {
- "ecmaVersion": 2020,
- "sourceType": "module"
- },
- "rules": {
- "no-duplicate-case": 2,
- "no-undef": 2,
- "no-unused-vars": [
- 2,
- {
- "vars": "all",
- "args": "after-used"
- }
- ],
- "no-empty": [
- 2,
- {
- "allowEmptyCatch": true
- }
- ],
- "no-implicit-coercion": [
- 2,
- {
- "boolean": true,
- "string": true,
- "number": true
- }
- ],
- "no-with": 2,
- "brace-style": 2,
- "no-mixed-spaces-and-tabs": 2,
- "no-multiple-empty-lines": 2,
- "no-multi-str": 2,
- "dot-location": [
- 2,
- "property"
- ],
- "operator-linebreak": [
- 2,
- "after",
- {
- "overrides": {
- "?": "before",
- ":": "before"
- }
- }
- ],
- "key-spacing": [
- 2,
- {
- "beforeColon": false,
- "afterColon": true
- }
- ],
- "space-unary-ops": [
- 2,
- {
- "words": false,
- "nonwords": false
- }
- ],
- "no-spaced-func": 2,
- "space-before-function-paren": [
- 2,
- {
- "anonymous": "ignore",
- "named": "never"
- }
- ],
- "array-bracket-spacing": [
- 2,
- "never"
- ],
- "space-in-parens": [
- 2,
- "never"
- ],
- "comma-dangle": [
- 2,
- "never"
- ],
- "no-trailing-spaces": 2,
- "yoda": [
- 2,
- "never"
- ],
- "camelcase": [
- 2,
- {
- "properties": "never"
- }
- ],
- "comma-style": [
- 2,
- "last"
- ],
- "curly": [
- 2,
- "all"
- ],
- "dot-notation": 2,
- "eol-last": 2,
- "one-var": [
- 2,
- "never"
- ],
- "wrap-iife": 2,
- "space-infix-ops": 2,
- "keyword-spacing": [
- 2,
- {
- "overrides": {
- "else": {
- "before": true
- },
- "while": {
- "before": true
- },
- "catch": {
- "before": true
- },
- "finally": {
- "before": true
- }
- }
- }
- ],
- "spaced-comment": [
- 2,
- "always"
- ],
- "space-before-blocks": [
- 2,
- "always"
- ],
- "semi": [
- 2,
- "always"
- ],
- "indent": [
- 2,
- 4,
- {
- "SwitchCase": 1
- }
- ],
- "linebreak-style": [
- 2,
- "unix"
- ],
- "quotes": [
- 2,
- "single",
- {
- "avoidEscape": true
- }
- ]
- }
-}
diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index 205021e4..00000000
--- a/.gitattributes
+++ /dev/null
@@ -1,2 +0,0 @@
-# Enforce Unix newlines
-* text=auto eol=lf
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
deleted file mode 100644
index 3fe1c48b..00000000
--- a/.github/workflows/build.yml
+++ /dev/null
@@ -1,82 +0,0 @@
-name: Build
-
-on:
- push:
- pull_request:
-
-env:
- PRIMARY_NODEJS_VERSION: 16
- REPORTER: "min"
-
-jobs:
- lint:
- name: Lint
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Setup node ${{ env.PRIMARY_NODEJS_VERSION }}
- uses: actions/setup-node@v2
- with:
- node-version: ${{ env.PRIMARY_NODEJS_VERSION }}
- cache: "npm"
- - run: npm ci
- - run: npm run lint
-
- test-bundle:
- name: Test bundle
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Setup node ${{ env.PRIMARY_NODEJS_VERSION }}
- uses: actions/setup-node@v2
- with:
- node-version: ${{ env.PRIMARY_NODEJS_VERSION }}
- cache: "npm"
- - run: npm ci
- - run: npm run bundle-and-test
-
- unit-tests:
- name: Unit tests
- runs-on: ubuntu-latest
-
- strategy:
- matrix:
- # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
- node_version:
- - 10
- - 12.20.0
- - 14.13.0
- - 16
-
- steps:
- - uses: actions/checkout@v2
- - name: Setup node ${{ matrix.node_version }}
- uses: actions/setup-node@v2
- with:
- node-version: ${{ matrix.node_version }}
- cache: "npm"
- - run: npm ci
- - run: npm run test
- if: ${{ matrix.node_version != '10' }}
- - run: npm run esm-to-cjs-and-test
-
- - run: npm run coverage
- if: ${{ matrix.node_version == env.PRIMARY_NODEJS_VERSION }}
- - name: Coveralls parallel
- if: ${{ matrix.node_version == env.PRIMARY_NODEJS_VERSION }}
- uses: coverallsapp/github-action@1.1.3
- with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
- flag-name: node-${{ matrix.node_version }}
- parallel: true
-
- send-to-coveralls:
- name: Send coverage to Coveralls
- needs: unit-tests
- runs-on: ubuntu-latest
- steps:
- - name: Send coverage to Coveralls
- uses: coverallsapp/github-action@1.1.3
- with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
- parallel-finished: true
diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
deleted file mode 100644
index e724ca53..00000000
--- a/.github/workflows/gh-pages.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-name: Deploy gh-pages
-
-on:
- workflow_dispatch:
- release:
- types: [published]
-
-# A workflow run is made up of one or more jobs that can run sequentially or in parallel
-jobs:
- # This workflow contains a single job called "build"
- build:
- # The type of runner that the job will run on
- runs-on: ubuntu-latest
-
- # Steps represent a sequence of tasks that will be executed as part of the job
- steps:
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - name: Checkout repo
- uses: actions/checkout@v2
- - name: Setup Node.js
- uses: actions/setup-node@v1
- with:
- node-version: 16
- - run: npm ci --ignore-scripts
- - run: npm run bundle
- - run: cp dist/csso.js .gh-pages
- - name: Deploy
- uses: peaceiris/actions-gh-pages@v3
- with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- publish_dir: ./.gh-pages
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index ccf5a1c9..00000000
--- a/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.vscode
-.idea
-.gh-pages/csso.min.js
-cjs
-cjs-test
-node_modules
-coverage
diff --git a/fixtures/compress/atrules/empty.min.css b/.nojekyll
similarity index 100%
rename from fixtures/compress/atrules/empty.min.css
rename to .nojekyll
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 7325392b..00000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,456 +0,0 @@
-## 5.0.5 (August 10, 2022)
-
-- Bumped `css-tree` to `~2.2.0` (#458)
-
-## 5.0.4 (July 14, 2022)
-
-- Fixed usage filtering for from/to selectors in keyframes at-rule (#448)
-- Fixed removing `medium` in `font` declarations since it breaks the value since `` is required (#449)
-
-## 5.0.3 (March 9, 2022)
-
-- Fixed CommonJS version bundling when `browser` field is used
-- Added `module` field
-
-## 5.0.2 (December 17, 2021)
-
-- Extended Node.js support to include `^10`
-- Fixed `main` field in `package.json` to refer to CommonJS module
-- Bumped `css-tree` to `~2.0.4` (fixed CSS serialization issue in IE11)
-
-## 5.0.1 (December 14, 2021)
-
-- Bumped `css-tree` to `~2.0.3` (various fixes on generate CSS)
-- Added exports:
- - `csso/syntax`
-
-## 5.0.0 (December 4, 2021)
-
-- Added support for [CSS Selectors Level 4](https://www.w3.org/TR/selectors-4/) and legacy pseudos in specificity calculation, i.e. `:has()`, `:not()`, `:is()`, `:matches()`, `:-moz-any()`, `:-webkit-any()`, `:where()`, `:nth-child(... of )` and `:nth-last-child(... of )`
-- Package
- - Changed supported versions of Node.js to `^12.20.0`, `^14.13.0` and `>=15.0.0` (extended in `5.0.2` to include `^10`)
- - Converted to ES modules. However, CommonJS is supported as well (dual module)
- - Changed bundle set to provide `dist/csso.js` (an IIFE version with `csso` as a global name) and `dist/csso.esm.js` (as ES module). Both are minified
- - Bumped `css-tree` to [`2.0`](https://github.com/csstree/csstree/releases/tag/v2.0.0)
-
-## 4.2.0 (November 26, 2020)
-
-- Trim Custom Property values when possible (#393)
-- Fixed removing unit for zero-length dimentions in `min()`, `max()` and `clamp()` functions (#426)
-- Fixed crash on bad value in TRBL declaration value (#412)
-
-## 4.1.1 (November 15, 2020)
-
-- Fixed build setup to exclude full `mdn/data` that reduced the lib size:
- * dist/csso.js: 794.5Kb -> 255.2Kb
- * dist/csso.min.js: 394.4Kb -> 194.2Kb
- * package size: 237.8 kB -> 156.1 kB
- * package unpacked size: 1.3 MB -> 586.8 kB
-
-## 4.1.0 (October 27, 2020)
-
-- Bumped [CSSTree](https://github.com/csstree/csstree) to `^1.0.0`
-- Fixed wrongly merging of TRBL values when one of them contains `var()` (#420)
-- Fixed wrongly merging of pseudo class and element with the same name, e.g. `:-ms-input-placeholder` and `::-ms-input-placeholder` (#383, #416)
-- Fixed wrongly merging of `overflow` fallback (#415)
-
-## 4.0.3 (March 24, 2020)
-
-- Prevented percent sign removal in `flex`/`-ms-flex` (#410)
-- Fixed restructuring optimisation in some cases (@charlessuh & @chsuh, #358, #411)
-- Bumped dependencies (@AviVahl, #409)
-
-## 4.0.2 (October 28, 2019)
-
-- Fixed clean stage to avoid exceptions when source has unparsed or bad parts (#380)
-- Fixed wrong percentage sign removal for zero values (#395)
-
-## 4.0.1 (October 22, 2019)
-
-- Bumped CSSTree to [`1.0.0-alpha.37`](https://github.com/csstree/csstree/releases/tag/v1.0.0-alpha.37) to avoid source map generation inconsistency across Node.js versions
-
-## 4.0.0 (October 21, 2019)
-
-- Dropped support for Node.js < 8
-- Refreshed dev dependencies and scripts
-- Bumped [CSSTree](https://github.com/csstree/csstree) to `1.0.0-alpha.36` (#399)
-- Changed bundle files: `dist/csso.js` and `dist/csso.min.js` instead single `dist/csso-browser.js` (min version)
-- Expose `compress()` as `syntax.compress()`
-
-## 3.5.1 (June 7, 2018)
-
-- Bumped [CSSTree](https://github.com/csstree/csstree) to `1.0.0-alpha.29` (fixes some issues)
-
-## 3.5.0 (January 14, 2018)
-
-- Migrated to [CSSTree](https://github.com/csstree/csstree) `1.0.0-alpha.27`
-
-## 3.4.0 (November 3, 2017)
-
-- Added percent sign removal for zero percentages for some properties that is safe (@RubaXa, #286)
-- Removed unit removal for zero values in `-ms-flex` due it breaks flex in IE10/11 (#362)
-- Improved performance of selectors comparison (@smelukov, #343)
-
-## 3.3.1 (October 17, 2017)
-
-- Fixed merge of `position` declarations when `sticky` fallback is using (@gruzzilkin, #356)
-
-## 3.3.0 (October 12, 2017)
-
-- Migrated to [CSSTree](https://github.com/csstree/csstree) `1.0.0-alpha25`
- - Changed AST format (see [CSSTree change log](https://github.com/csstree/csstree/blob/master/HISTORY.md) for details)
- - Fixed performance issue when generate CSS with source map (quadratic increase in time depending on the size of the CSS)
-
-## 3.2.0 (September 10, 2017)
-
-- Fixed named color compression to apply only when an identifier is guaranteed to be a color
-- Added lifting of `@keyframes` to the beginning of style sheet (chunk), but after `@charset` and `@import` rules
-- Added removal of `@keyframes`, `@media` and `@supports` with no prelude
-- Added removal of duplicate `@keyframes` (#202)
-- Added new option `forceMediaMerge` to force media rules merging. It's unsafe in general, but works fine in many cases. Use it on your own risk (#350)
-- Bumped `CSSTree` to `1.0.0-alpha23`
-
-## 3.1.1 (April 25, 2017)
-
-- Fixed crash on a number processing when it used not in a list (#335)
-
-## 3.1.0 (April 24, 2017)
-
-- Implemented optimisation for `none` keyword in `border` and `outline` properties (@zoobestik, #41)
-- Implemented replacing `rgba(x, x, x, 0)` to `transparent`
-- Fixed plus sign omitting for numbers following identifier, hex color, number or unicode range, since it can change the meaning of CSS (e.g. `calc(1px+2px)` has been optimized to `calc(1px2px)` before, now it stays the same)
-- Improved usage filtering for nested selectors (i.e. for `:nth-*()`, `:has()`, `:matches` and other pseudos)
-- Implemented `blacklist` filtering in usage (#334, see [Black list filtering](https://github.com/css/csso#black-list-filtering))
-- Improved white space removing, now white spaces are removing in the beginning and at the ending of sequences, and between stylesheet and block nodes
-- Bumped `CSSTree` to `1.0.0-alpha19`
-
-## 3.0.1 (March 14, 2017)
-
-- Fixed declaration merging when declaration contains an `!important`
-
-## 3.0.0 (March 13, 2017)
-
-- Migrated to [CSSTree](https://github.com/csstree/csstree) as AST backend and exposed its API behind `syntax` property
-- Extracted CLI into standalone package [css/csso-cli](https://github.com/css/csso-cli)
-
-## 2.3.1 (January 6, 2017)
-
-- Added `\0` IE hack support (#320)
-
-## 2.3.0 (October 25, 2016)
-
-- Added `beforeCompress` and `afterCompress` options support (#316)
-- Fixed crash on empty argument in function (#317)
-
-## 2.2.1 (July 25, 2016)
-
-- Fixed shorthand optimisation issue when value has a color value or something unknown (#311)
-- Fixed `cursor` broken fallback (#306)
-
-## 2.2.0 (June 23, 2016)
-
-- Implement AST cloning by adding `clone()` [function](https://github.com/css/csso#cloneast) and `clone` [option](https://github.com/css/csso#compressast-options) for `compress()` function (#296)
-- Fix parse and translate attribute selector with flags but w/o operator (i.e. `[attrName i]`)
-- Don't merge rules with flagged attribute selectors with others (#291)
-- Take in account functions when merge TRBL-properties (#297, thanks to @ArturAralin)
-- Improve partial merge (#304)
-- Tweak scanner, reduce code deoptimizations and other small improvements
-
-## 2.1.1 (May 11, 2016)
-
-- Fix wrong declaration with `\9` hack merge (#295)
-
-## 2.1.0 (May 8, 2016)
-
-- New option `comments` to specify what comments to left: `exclamation`, `first-exclamation` and `none`
-- Add `offset` to CSS parse error details
-- Fix token `offset` computation
-
-## 2.0.0 (April 5, 2016)
-
-- No more `gonzales` AST format and related code
-- `minify()` and `minifyBlock()` is always return an object as result now (i.e. `{ css: String, map: SourceMapGenerator or null }`)
-- `parse()`
- - Returns AST in new format (so called `internal`)
- - Dynamic scanner implemented
- - New AST format + dynamic scanner = performance boost and less memory consumption
- - No more `context` argument, context should be specified via `options`
- - Supported contexts now: `stylesheet`, `atrule`, `atruleExpression`, `ruleset`, `selector`, `simpleSelector`, `block`, `declaration` and `value`
- - Drop `needPositions` option, `positions` option should be used instead
- - Drop `needInfo` option, `info` object is attaching to nodes when some information is requested by `options`
- - `options` should be an object, otherwise it treats as empty object
-- `compress()`
- - No more AST converting (performance boost and less memory consumption)
- - Drop `outputAst` option
- - Returns an object as result instead of AST (i.e. `{ ast: Object }`)
-- Drop methods: `justDoIt()`, `stringify()`, `cleanInfo()`
-
-## 1.8.1 (March 30, 2016)
-
-- Don't remove spaces after function/braces/urls since unsafe (#289)
-
-## 1.8.0 (March 24, 2016)
-
-- Usage data support:
- - Filter rulesets by tag names, class names and ids white lists.
- - More aggressive ruleset moving using class name scopes information.
- - New CLI option `--usage` to pass usage data file.
-- Improve initial ruleset merge
- - Change order of ruleset processing, now it's left to right. Previously unmerged rulesets may prevent lookup and other rulesets merge.
- - Difference in pseudo signature just prevents ruleset merging, but don't stop lookup.
- - Simplify block comparison (performance).
-- New method `csso.minifyBlock()` for css block compression (e.g. `style` attribute content).
-- Ruleset merge improvement: at-rules with block (like `@media` or `@supports`) now can be skipped during ruleset merge lookup if doesn't contain something prevents it.
-- FIX: Add negation (`:not()`) to pseudo signature to avoid unsafe merge (old browsers doesn't support it).
-- FIX: Check nested parts of value when compute compatibility. It fixes unsafe property merging.
-
-## 1.7.1 (March 16, 2016)
-
-- pass block mode to tokenizer for correct parsing of declarations properties with `//` hack
-- fix wrongly `@import` and `@charset` removal on double exclamation comment
-
-## 1.7.0 (March 10, 2016)
-
-- support for [CSS Custom Properties](https://www.w3.org/TR/css-variables/) (#279)
-- rework RTBL properties merge – better merge for values with special units and don't merge values with CSS-wide keywords (#255)
-- remove redundant universal selectors (#178)
-- take in account `!important` when check for property overriding (#280)
-- don't merge `text-align` declarations with some values (#281)
-- add spaces around `/deep/` combinator on translate, since it together with universal selector can produce a comment
-- better keyword and property name resolving (tolerant to hacks and so on)
-- integration improvements
- - compression log function could be customized by `logger` option for `compress()` and `minify()`
- - make possible to set initial line and column for parser
-
-## 1.6.4 (March 1, 2016)
-
-- `npm` publish issue (#276)
-
-## 1.6.3 (February 29, 2016)
-
-- add `file` to generated source map since other tools can relay on it in source map transform chain
-
-## 1.6.2 (February 29, 2016)
-
-- tweak some parse error messages and their positions
-- fix `:not()` parsing and selector groups in `:not()` is supported now (#215)
-- `needPosition` parser option is deprecated, `positions` option should be used instead (`needPosition` is used still if `positions` option omitted)
-- expose internal AST API as `csso.internal.*`
-- `minify()` adds `sourcesContent` by default when source map is generated
-- bring back support for node.js `0.10` until major release (#275)
-
-## 1.6.1 (February 28, 2016)
-
-- fix exception on zero length dimension compress outside declaration (#273)
-
-## 1.6.0 (February 27, 2016)
-
-- **source maps support**
-- parser remake:
- - various parsing issues fixed
- - fix unicode sequence processing in ident (#191)
- - support for flags in attribute selector (#270)
- - position (line and column) of parse error (#109)
- - 4x performance boost, less memory consumption
-- compressor refactoring
- - internal AST is using doubly linked lists (with safe transformation support during iteration) instead of arrays
- - rename `restructuring` to `restructure` option for `minify()`/`compress()` (`restructuring` is alias for `restructure` now, with lower priority)
- - unquote urls when possible (#141, #60)
-- setup code coverage and a number of related fixes
-- add eslint to check unused things
-
-## 1.5.4 (January 27, 2016)
-
-- one more fix (in `restructRuleset` this time) with merge of rulesets when a ruleset with same specificity places between them (#264)
-- disable partial merge of rulesets in `@keyframes` rulesets (until sure it's correct)
-
-## 1.5.3 (January 25, 2016)
-
-- don't override display values with different browser support (#259)
-- fix publish issue (one of modules leak in development state)
-
-## 1.5.2 (January 24, 2016)
-
-- don't merge rulesets if between them a ruleset with same specificity (#264)
-
-## 1.5.1 (January 14, 2016)
-
-- ensure `-` is not used as an identifier in attribute selectors (thanks to @mathiasbynens)
-- fix broken `justDoIt()` function
-- various small fixes
-
-## 1.5.0 (January 14, 2016)
-
-### Parser
-
-- attach minus to number
-
-### Compressor
-
-- split code base into small modules and related refactoring
-- introduce internal AST format for compressor (`gonzales`→`internal` and `internal`→`gonzales` convertors, walkers, translator)
-- various optimizations: no snapshots, using caches and indexes
-- sort selectors, merge selectors in alphabet order
-- compute selector's specificity
-- better ruleset restructuring, improve compression of partially equal blocks
-- better ruleset merge – not only closest but also disjoined by other rulesets when safe
-- join `@media` with same query
-- `outputAst` – new option to specify output AST format (`gonzales` by default for backward compatibility)
-- remove quotes surrounding attribute values in attribute selectors when possible (#73)
-- replace `from`→`0%` and `100%`→`to` at `@keyframes` (#205)
-- prevent partial merge of rulesets at `@keyframes` (#80, #197)
-
-### API
-
-- walker for `gonzales` AST was implemented
-
-### CLI
-
-- new option `--stat` (output stat in `stderr`)
-- new optional parameter `level` for `--debug` option
-
-## 1.4.4 (December 10, 2015)
-
-- prevent removal of spaces after braces that before identifier that breaking at-rules expressions (#258)
-
-## 1.4.3 (December 4, 2015)
-
-- fix unicode-range parsing that cause to wrong function detection (#250)
-
-## 1.4.2 (November 9, 2015)
-
-- allow spaces between `progid:` and rest part of value for IE's `filter` property as `autoprefixer` generates this kind of code (#249)
-- fixes for Windows:
- - correct processing new lines
- - normalize file content in test suite
-- fixes to work in strict mode (#252)
-- init compressor dictionaries for every css block (#248, #251)
-- bump uglify-js version
-
-## 1.4.1 (October 20, 2015)
-
-- allow merge for `display` property (#167, #244)
-- more accurate `rect` (`clip` property value) merge
-- fix typo when specifying options in cli (thanks to @Taritsyn)
-- fix safe unit values merge with keyword values (#244)
-- fix wrong descendant combinator removal (#246)
-- build browser version on `prepublish` (thanks to @silentroach)
-- parser: store whitespaces as single token (performance and reduce memory consumption)
-- rearrange compress tests layout
-
-## 1.4 (October 16, 2015)
-
-Bringing project back to life. Changed files structure, cleaned up and refactored most of sources.
-
-### Common
-
-- single code base (no more `src` folder)
-- build browser version with `browserify` (no more `make`, and `web` folder), browser version is available at `dist/csso-browser.js`
-- main file is `lib/index.js` now
-- minimal `node.js` version is `0.12` now
-- restrict file list to publish on npm (no more useless folders and files in package)
-- add `jscs` to control code style
-- automate `gh-pages` update
-- util functions reworked
-- translator reworked
-- test suite reworked
-- compressor refactored
-- initial parser refactoring
-
-### API
-
-- new method `minify(src, options)`, options:
- - `restructuring` – if set to `false`, disable structure optimisations (`true` by default)
- - `debug` - outputs intermediate state of CSS during compression (`false` by default)
-- deprecate `justDoIt()` method (use `minify` instead)
-- rename `treeToString()` method to `stringify()`
-- drop `printTree()` method
-- AST node info
- - `column` and `offset` added
- - `ln` renamed to `line`
- - fix line counting across multiple files and input with CR LF (#147)
-
-### CLI
-
-- completely reworked, use [clap](https://github.com/lahmatiy/clap) to parse argv
-- add support for input from stdin (#128)
-- drop undocumented and obsoleted options `--rule` and `--parser` (suppose nobody use it)
-- drop `-off` alias for `--restructure-off` as incorrect (only one letter options should starts with single `-`)
-- new option `--debug` that reflecting to `options.debug` for `minify`
-
-### Parsing and optimizations
-
-- keep all exclamation comments (#194)
-- add `/deep/` combinator support (#209)
-- attribute selector
- - allow colon in attribute name (#237)
- - support for namespaces (#233)
-- color
- - support all css/html colors
- - convert `hsla` to `rgba` and `hls` to `rgb`
- - convert `rgba` with 1 as alpha value to `rgb` (#122)
- - interpolate `rgb` and `rgba` percentage values to absolute values
- - replace percentage values in `rgba` for normalized/interpolated values
- - lowercase hex colors and color names (#169)
- - fix color minification when hex value replaced for color name (#176)
- - fit rgb values to 0..255 range (#181)
-- calc
- - remove spaces for multiple operator in calc
- - don't remove units inside calc (#222)
- - fix wrong white space removal around `+` and `-` (#228)
-- don't remove units in `flex` property as it could change value meaning (#200)
-- don't merge `\9` hack values (#231)
-- merge property values only if they have the same functions (#150, #227)
-- don't merge property values with some sort of units (#140, #161)
-- fix `!important` issue for `top-right-bottom-left` properties (#189)
-- fix `top-right-bottom-left` properties merge (#139, #175)
-- support for unicode-range (#148)
-- don't crash on ruleset with no selector (#135)
-- tolerant to class names that starts with digit (#99, #105)
-- fix background compressing (#170)
-
-## 1.3.12 (October 8, 2015)
-
-- Case insensitive check for `!important` (#187)
-- Fix problems with using `csso` as cli command on Windows (#83, #136, #142 and others)
-- Remove byte order marker (the UTF-8 BOM) from input
-- Don't strip space between funktion-funktion and funktion-vhash (#134)
-- Don't merge TRBL values having \9 (hack for IE8 in bootstrap) (#159, #214, #230, #231 and others)
-- Don't strip units off dimensions of non-length (#226, #229 and others)
-
-## 1.3.7 (February 11, 2013)
-
-- Gonzales 1.0.7.
-
-## 1.3.6 (November 26, 2012)
-
-- Gonzales 1.0.6.
-
-## 1.3.5 (October 28, 2012)
-
-- Gonzales 1.0.5.
-- Protecting copyright notices in CSS: https://github.com/css/csso/issues/92
-- Zero CSS throws an error: https://github.com/css/csso/issues/96
-- Don't minify the second `0s` in Firefox for animations: https://github.com/css/csso/issues/100
-- Japan manual
-- BEM ready documentation
-
-## 1.3.4 (October 10, 2012)
-
-- @page inside @media Causes Error: https://github.com/css/csso/issues/90
-
-## 1.3.3 (October 9, 2012)
-
-- CSSO 1.3.2 compresses ".t-1" and ".t-01" as identical classes: https://github.com/css/csso/issues/88
-
-## 1.3.2 (October 8, 2012)
-
-- filter + important breaks CSSO v1.3.1: https://github.com/css/csso/issues/87
-
-## 1.3.1 (October 8, 2012)
-
-- "filter" IE property breaks CSSO v1.3.0: https://github.com/css/csso/issues/86
-
-## 1.3.0 (October 4, 2012)
-
-- PeCode CSS parser replaced by Gonzales CSS parser
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index a200643d..00000000
--- a/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (C) 2015-2021 by Roman Dvornov
-Copyright (C) 2011-2015 by Sergey Kryzhanovsky
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/README.md b/README.md
deleted file mode 100644
index 9b746b4f..00000000
--- a/README.md
+++ /dev/null
@@ -1,422 +0,0 @@
-[](https://www.npmjs.com/package/csso)
-[](https://github.com/css/csso/actions/workflows/build.yml)
-[](https://coveralls.io/github/css/csso?branch=master)
-[](https://www.npmjs.com/package/csso)
-[](https://twitter.com/cssoptimizer)
-
-CSSO (CSS Optimizer) is a CSS minifier. It performs three sort of transformations: cleaning (removing redundants), compression (replacement for the shorter forms) and restructuring (merge of declarations, rules and so on). As a result an output CSS becomes much smaller in size.
-
-## Install
-
-```
-npm install csso
-```
-
-## Usage
-
-```js
-import { minify } from 'csso';
-// CommonJS is also supported
-// const { minify } = require('csso');
-
-const minifiedCss = minify('.test { color: #ff0000; }').css;
-
-console.log(minifiedCss);
-// .test{color:red}
-```
-
-Bundles are also available for use in a browser:
-
-- `dist/csso.js` – minified IIFE with `csso` as global
-```html
-
-
-```
-
-- `dist/csso.esm.js` – minified ES module
-```html
-
-```
-
-One of CDN services like `unpkg` or `jsDelivr` can be used. By default (for short path) a ESM version is exposing. For IIFE version a full path to a bundle should be specified:
-
-```html
-
-
-
-
-
-
-```
-
-CSSO is based on [CSSTree](https://github.com/csstree/csstree) to parse CSS into AST, AST traversal and to generate AST back to CSS. All `CSSTree` API is available behind `syntax` field extended with `compress()` method. You may minify CSS step by step:
-
-```js
-import { syntax } from 'csso';
-
-const ast = syntax.parse('.test { color: #ff0000; }');
-const compressedAst = syntax.compress(ast).ast;
-const minifiedCss = syntax.generate(compressedAst);
-
-console.log(minifiedCss);
-// .test{color:red}
-```
-
-Also syntax can be imported using `csso/syntax` entry point:
-
-```js
-import { parse, compress, generate } from 'csso/syntax';
-
-const ast = parse('.test { color: #ff0000; }');
-const compressedAst = compress(ast).ast;
-const minifiedCss = generate(compressedAst);
-
-console.log(minifiedCss);
-// .test{color:red}
-```
-
-> Warning: CSSO doesn't guarantee API behind a `syntax` field as well as AST format. Both might be changed with changes in CSSTree. If you rely heavily on `syntax` API, a better option might be to use CSSTree directly.
-
-## Related projects
-
-- [Web interface](http://css.github.io/csso/csso.html)
-- [csso-cli](https://github.com/css/csso-cli) – command line interface
-- [gulp-csso](https://github.com/ben-eb/gulp-csso) – `Gulp` plugin
-- [grunt-csso](https://github.com/t32k/grunt-csso) – `Grunt` plugin
-- [broccoli-csso](https://github.com/sindresorhus/broccoli-csso) – `Broccoli` plugin
-- [postcss-csso](https://github.com/lahmatiy/postcss-csso) – `PostCSS` plugin
-- [csso-loader](https://github.com/sandark7/csso-loader) – `webpack` loader
-- [csso-webpack-plugin](https://github.com/zoobestik/csso-webpack-plugin) – `webpack` plugin
-- [CSSO Visual Studio Code plugin](https://marketplace.visualstudio.com/items?itemName=Aneryu.csso)
-- [vscode-csso](https://github.com/1000ch/vscode-csso) - Visual Studio Code plugin
-- [atom-csso](https://github.com/1000ch/atom-csso) - Atom plugin
-- [Sublime-csso](https://github.com/1000ch/Sublime-csso) - Sublime plugin
-
-## API
-
-
-
-- [minify(source[, options])](#minifysource-options)
-- [minifyBlock(source[, options])](#minifyblocksource-options)
-- [syntax.compress(ast[, options])](#syntaxcompressast-options)
-- [Source maps](#source-maps)
-- [Usage data](#usage-data)
- - [White list filtering](#white-list-filtering)
- - [Black list filtering](#black-list-filtering)
- - [Scopes](#scopes)
-
-
-
-### minify(source[, options])
-
-Minify `source` CSS passed as `String`.
-
-```js
-const result = csso.minify('.test { color: #ff0000; }', {
- restructure: false, // don't change CSS structure, i.e. don't merge declarations, rulesets etc
- debug: true // show additional debug information:
- // true or number from 1 to 3 (greater number - more details)
-});
-
-console.log(result.css);
-// > .test{color:red}
-```
-
-Returns an object with properties:
-
-- css `String` – resulting CSS
-- map `Object` – instance of [`SourceMapGenerator`](https://github.com/mozilla/source-map#sourcemapgenerator) or `null`
-
-Options:
-
-- sourceMap
-
- Type: `Boolean`
- Default: `false`
-
- Generate a source map when `true`.
-
-- filename
-
- Type: `String`
- Default: `''`
-
- Filename of input CSS, uses for source map generation.
-
-- debug
-
- Type: `Boolean`
- Default: `false`
-
- Output debug information to `stderr`.
-
-- beforeCompress
-
- Type: `function(ast, options)` or `Array` or `null`
- Default: `null`
-
- Called right after parse is run.
-
-- afterCompress
-
- Type: `function(compressResult, options)` or `Array` or `null`
- Default: `null`
-
- Called right after [`syntax.compress()`](#syntaxcompressast-options) is run.
-
-- Other options are the same as for [`syntax.compress()`](#syntaxcompressast-options) function.
-
-### minifyBlock(source[, options])
-
-The same as `minify()` but for list of declarations. Usually it's a `style` attribute value.
-
-```js
-const result = csso.minifyBlock('color: rgba(255, 0, 0, 1); color: #ff0000');
-
-console.log(result.css);
-// > color:red
-```
-
-### syntax.compress(ast[, options])
-
-Does the main task – compress an AST. This is CSSO's extension in CSSTree syntax API.
-
-> NOTE: `syntax.compress()` performs AST compression by transforming input AST by default (since AST cloning is expensive and needed in rare cases). Use `clone` option with truthy value in case you want to keep input AST untouched.
-
-Returns an object with properties:
-
-- ast `Object` – resulting AST
-
-Options:
-
-- restructure
-
- Type: `Boolean`
- Default: `true`
-
- Disable or enable a structure optimisations.
-
-- forceMediaMerge
-
- Type: `Boolean`
- Default: `false`
-
- Enables merging of `@media` rules with the same media query by splitted by other rules. The optimisation is unsafe in general, but should work fine in most cases. Use it on your own risk.
-
-- clone
-
- Type: `Boolean`
- Default: `false`
-
- Transform a copy of input AST if `true`. Useful in case of AST reuse.
-
-- comments
-
- Type: `String` or `Boolean`
- Default: `true`
-
- Specify what comments to leave:
-
- - `'exclamation'` or `true` – leave all exclamation comments (i.e. `/*! .. */`)
- - `'first-exclamation'` – remove every comment except first one
- - `false` – remove all comments
-
-- usage
-
- Type: `Object` or `null`
- Default: `null`
-
- Usage data for advanced optimisations (see [Usage data](#usage-data) for details)
-
-- logger
-
- Type: `Function` or `null`
- Default: `null`
-
- Function to track every step of transformation.
-
-### Source maps
-
-To get a source map set `true` for `sourceMap` option. Additianaly `filename` option can be passed to specify source file. When `sourceMap` option is `true`, `map` field of result object will contain a [`SourceMapGenerator`](https://github.com/mozilla/source-map#sourcemapgenerator) instance. This object can be mixed with another source map or translated to string.
-
-```js
-const csso = require('csso');
-const css = fs.readFileSync('path/to/my.css', 'utf8');
-const result = csso.minify(css, {
- filename: 'path/to/my.css', // will be added to source map as reference to source file
- sourceMap: true // generate source map
-});
-
-console.log(result);
-// { css: '...minified...', map: SourceMapGenerator {} }
-
-console.log(result.map.toString());
-// '{ .. source map content .. }'
-```
-
-Example of generating source map with respect of source map from input CSS:
-
-```js
-import { SourceMapConsumer } from 'source-map';
-import * as csso from 'csso';
-
-const inputFile = 'path/to/my.css';
-const input = fs.readFileSync(inputFile, 'utf8');
-const inputMap = input.match(/\/\*# sourceMappingURL=(\S+)\s*\*\/\s*$/);
-const output = csso.minify(input, {
- filename: inputFile,
- sourceMap: true
-});
-
-// apply input source map to output
-if (inputMap) {
- output.map.applySourceMap(
- new SourceMapConsumer(inputMap[1]),
- inputFile
- )
-}
-
-// result CSS with source map
-console.log(
- output.css +
- '/*# sourceMappingURL=data:application/json;base64,' +
- Buffer.from(output.map.toString()).toString('base64') +
- ' */'
-);
-```
-
-### Usage data
-
-`CSSO` can use data about how `CSS` is used in a markup for better compression. File with this data (`JSON`) can be set using `usage` option. Usage data may contain following sections:
-
-- `blacklist` – a set of black lists (see [Black list filtering](#black-list-filtering))
-- `tags` – white list of tags
-- `ids` – white list of ids
-- `classes` – white list of classes
-- `scopes` – groups of classes which never used with classes from other groups on the same element
-
-All sections are optional. Value of `tags`, `ids` and `classes` should be an array of a string, value of `scopes` should be an array of arrays of strings. Other values are ignoring.
-
-#### White list filtering
-
-`tags`, `ids` and `classes` are using on clean stage to filter selectors that contain something not in the lists. Selectors are filtering only by those kind of simple selector which white list is specified. For example, if only `tags` list is specified then type selectors are checking, and if all type selectors in selector present in list or selector has no any type selector it isn't filter.
-
-> `ids` and `classes` are case sensitive, `tags` – is not.
-
-Input CSS:
-
-```css
-* { color: green; }
-ul, ol, li { color: blue; }
-UL.foo, span.bar { color: red; }
-```
-
-Usage data:
-
-```json
-{
- "tags": ["ul", "LI"]
-}
-```
-
-Resulting CSS:
-
-```css
-*{color:green}ul,li{color:blue}ul.foo{color:red}
-```
-
-Filtering performs for nested selectors too. `:not()` pseudos content is ignoring since the result of matching is unpredictable. Example for the same usage data as above:
-
-```css
-:nth-child(2n of ul, ol) { color: red }
-:nth-child(3n + 1 of img) { color: yellow }
-:not(div, ol, ul) { color: green }
-:has(:matches(ul, ol), ul, ol) { color: blue }
-```
-
-Turns into:
-
-```css
-:nth-child(2n of ul){color:red}:not(div,ol,ul){color:green}:has(:matches(ul),ul){color:blue}
-```
-
-#### Black list filtering
-
-Black list filtering performs the same as white list filtering, but filters things that mentioned in the lists. `blacklist` can contain the lists `tags`, `ids` and `classes`.
-
-Black list has a higher priority, so when something mentioned in the white list and in the black list then white list occurrence is ignoring. The `:not()` pseudos content ignoring as well.
-
-```css
-* { color: green; }
-ul, ol, li { color: blue; }
-UL.foo, li.bar { color: red; }
-```
-
-Usage data:
-
-```json
-{
- "blacklist": {
- "tags": ["ul"]
- },
- "tags": ["ul", "LI"]
-}
-```
-
-Resulting CSS:
-
-```css
-*{color:green}li{color:blue}li.bar{color:red}
-```
-
-#### Scopes
-
-Scopes is designed for CSS scope isolation solutions such as [css-modules](https://github.com/css-modules/css-modules). Scopes are similar to namespaces and define lists of class names that exclusively used on some markup. This information allows the optimizer to move rules more agressive. Since it assumes selectors from different scopes don't match for the same element. This can improve rule merging.
-
-Suppose we have a file:
-
-```css
-.module1-foo { color: red; }
-.module1-bar { font-size: 1.5em; background: yellow; }
-
-.module2-baz { color: red; }
-.module2-qux { font-size: 1.5em; background: yellow; width: 50px; }
-```
-
-It can be assumed that first two rules are never used with the second two on the same markup. But we can't say that for sure without a markup review. The optimizer doesn't know it either and will perform safe transformations only. The result will be the same as input but with no spaces and some semicolons:
-
-```css
-.module1-foo{color:red}.module1-bar{font-size:1.5em;background:#ff0}.module2-baz{color:red}.module2-qux{font-size:1.5em;background:#ff0;width:50px}
-```
-
-With usage data `CSSO` can produce better output. If follow usage data is provided:
-
-```json
-{
- "scopes": [
- ["module1-foo", "module1-bar"],
- ["module2-baz", "module2-qux"]
- ]
-}
-```
-
-The result will be (29 bytes extra saving):
-
-```css
-.module1-foo,.module2-baz{color:red}.module1-bar,.module2-qux{font-size:1.5em;background:#ff0}.module2-qux{width:50px}
-```
-
-If class name isn't mentioned in the `scopes` it belongs to default scope. `scopes` data doesn't affect `classes` whitelist. If class name mentioned in `scopes` but missed in `classes` (both sections are specified) it will be filtered.
-
-Note that class name can't be set for several scopes. Also a selector can't have class names from different scopes. In both cases an exception will thrown.
-
-Currently the optimizer doesn't care about changing order safety for out-of-bounds selectors (i.e. selectors that match to elements without class name, e.g. `.scope div` or `.scope ~ :last-child`). It assumes that scoped CSS modules doesn't relay on it's order. It may be fix in future if to be an issue.
diff --git a/.gh-pages/csso.css b/csso.css
similarity index 100%
rename from .gh-pages/csso.css
rename to csso.css
diff --git a/.gh-pages/csso.html b/csso.html
similarity index 100%
rename from .gh-pages/csso.html
rename to csso.html
diff --git a/csso.js b/csso.js
new file mode 100644
index 00000000..0ea0b148
--- /dev/null
+++ b/csso.js
@@ -0,0 +1,16 @@
+var csso=(()=>{var Bl=Object.create;var Bt=Object.defineProperty;var _l=Object.getOwnPropertyDescriptor;var Ul=Object.getOwnPropertyNames;var jl=Object.getPrototypeOf,ql=Object.prototype.hasOwnProperty;var Ue=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),b=(e,t)=>{for(var r in t)Bt(e,r,{get:t[r],enumerable:!0})},Ui=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ul(t))!ql.call(e,o)&&o!==r&&Bt(e,o,{get:()=>t[o],enumerable:!(n=_l(t,o))||n.enumerable});return e};var Hl=(e,t,r)=>(r=e!=null?Bl(jl(e)):{},Ui(t||!e||!e.__esModule?Bt(r,"default",{value:e,enumerable:!0}):r,e)),Wl=e=>Ui(Bt({},"__esModule",{value:!0}),e);var ta=Ue(Nr=>{var ea="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Nr.encode=function(e){if(0<=e&&e<=e&&e<=r?e-t:n<=e&&e<=o?e-n+s:i<=e&&e<=a?e-i+u:e==l?62:e==c?63:-1}});var aa=Ue(Rr=>{var ra=ta(),Mr=5,na=1<<0?(-e<<1)+1:(e<<1)+0}function nc(e){var t=(e&1)===1,r=e>>1;return t?-r:r}Rr.encode=function(t){var r="",n,o=rc(t);do n=o&oa,o>>>=Mr,o>0&&(n|=ia),r+=ra.encode(n);while(o>0);return r};Rr.decode=function(t,r,n){var o=t.length,i=0,a=0,l,c;do{if(r>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(c=ra.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));l=!!(c&ia),c&=oa,i=i+(c<{function oc(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}X.getArg=oc;var sa=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,ic=/^data:.+\,.+$/;function dt(e){var t=e.match(sa);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}X.urlParse=dt;function Ve(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}X.urlGenerate=Ve;var ac=32;function sc(e){var t=[];return function(r){for(var n=0;nac&&t.pop(),i}}var zr=sc(function(t){var r=t,n=dt(t);if(n){if(!n.path)return t;r=n.path}for(var o=X.isAbsolute(r),i=[],a=0,l=0;;)if(a=l,l=r.indexOf("/",a),l===-1){i.push(r.slice(a));break}else for(i.push(r.slice(a,l));l=0;l--)c=i[l],c==="."?i.splice(l,1):c===".."?s++:s>0&&(c===""?(i.splice(l+1,s),s=0):(i.splice(l,2),s--));return r=i.join("/"),r===""&&(r=o?"/":"."),n?(n.path=r,Ve(n)):r});X.normalize=zr;function la(e,t){e===""&&(e="."),t===""&&(t=".");var r=dt(t),n=dt(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Ve(r);if(r||t.match(ic))return t;if(n&&!n.host&&!n.path)return n.host=t,Ve(n);var o=t.charAt(0)==="/"?t:zr(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=o,Ve(n)):o}X.join=la;X.isAbsolute=function(e){return e.charAt(0)==="/"||sa.test(e)};function lc(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}X.relative=lc;var ca=function(){var e=Object.create(null);return!("__proto__"in e)}();function ua(e){return e}function cc(e){return pa(e)?"$"+e:e}X.toSetString=ca?ua:cc;function uc(e){return pa(e)?e.slice(1):e}X.fromSetString=ca?ua:uc;function pa(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function pc(e,t,r){var n=we(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:we(e.name,t.name)}X.compareByOriginalPositions=pc;function hc(e,t,r){var n;return n=e.originalLine-t.originalLine,n!==0||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:we(e.name,t.name)}X.compareByOriginalPositionsNoSource=hc;function fc(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=we(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:we(e.name,t.name)}X.compareByGeneratedPositionsDeflated=fc;function mc(e,t,r){var n=e.generatedColumn-t.generatedColumn;return n!==0||r||(n=we(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:we(e.name,t.name)}X.compareByGeneratedPositionsDeflatedNoLine=mc;function we(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function dc(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=we(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:we(e.name,t.name)}X.compareByGeneratedPositionsInflated=dc;function gc(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}X.parseSourceMapInput=gc;function bc(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=dt(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var o=n.path.lastIndexOf("/");o>=0&&(n.path=n.path.substring(0,o+1))}t=la(Ve(n),t)}return zr(t)}X.computeSourceURL=bc});var fa=Ue(ha=>{var Fr=Kt(),Br=Object.prototype.hasOwnProperty,ze=typeof Map<"u";function ve(){this._array=[],this._set=ze?new Map:Object.create(null)}ve.fromArray=function(t,r){for(var n=new ve,o=0,i=t.length;o=0)return r}else{var n=Fr.toSetString(t);if(Br.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};ve.prototype.at=function(t){if(t>=0&&t{var ma=Kt();function yc(e,t){var r=e.generatedLine,n=t.generatedLine,o=e.generatedColumn,i=t.generatedColumn;return n>r||n==r&&i>=o||ma.compareByGeneratedPositionsInflated(e,t)<=0}function Qt(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Qt.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};Qt.prototype.add=function(t){yc(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};Qt.prototype.toArray=function(){return this._sorted||(this._array.sort(ma.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};da.MappingList=Qt});var ya=Ue(ba=>{var gt=aa(),Y=Kt(),$t=fa().ArraySet,xc=ga().MappingList;function se(e){e||(e={}),this._file=Y.getArg(e,"file",null),this._sourceRoot=Y.getArg(e,"sourceRoot",null),this._skipValidation=Y.getArg(e,"skipValidation",!1),this._sources=new $t,this._names=new $t,this._mappings=new xc,this._sourcesContents=null}se.prototype._version=3;se.fromSourceMap=function(t){var r=t.sourceRoot,n=new se({file:t.file,sourceRoot:r});return t.eachMapping(function(o){var i={generated:{line:o.generatedLine,column:o.generatedColumn}};o.source!=null&&(i.source=o.source,r!=null&&(i.source=Y.relative(r,i.source)),i.original={line:o.originalLine,column:o.originalColumn},o.name!=null&&(i.name=o.name)),n.addMapping(i)}),t.sources.forEach(function(o){var i=o;r!==null&&(i=Y.relative(r,o)),n._sources.has(i)||n._sources.add(i);var a=t.sourceContentFor(o);a!=null&&n.setSourceContent(o,a)}),n};se.prototype.addMapping=function(t){var r=Y.getArg(t,"generated"),n=Y.getArg(t,"original",null),o=Y.getArg(t,"source",null),i=Y.getArg(t,"name",null);this._skipValidation||this._validateMapping(r,n,o,i),o!=null&&(o=String(o),this._sources.has(o)||this._sources.add(o)),i!=null&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:o,name:i})};se.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=Y.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Y.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Y.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};se.prototype.applySourceMap=function(t,r,n){var o=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);o=t.file}var i=this._sourceRoot;i!=null&&(o=Y.relative(i,o));var a=new $t,l=new $t;this._mappings.unsortedForEach(function(c){if(c.source===o&&c.originalLine!=null){var s=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});s.source!=null&&(c.source=s.source,n!=null&&(c.source=Y.join(n,c.source)),i!=null&&(c.source=Y.relative(i,c.source)),c.originalLine=s.line,c.originalColumn=s.column,s.name!=null&&(c.name=s.name))}var u=c.source;u!=null&&!a.has(u)&&a.add(u);var p=c.name;p!=null&&!l.has(p)&&l.add(p)},this),this._sources=a,this._names=l,t.sources.forEach(function(c){var s=t.sourceContentFor(c);s!=null&&(n!=null&&(c=Y.join(n,c)),i!=null&&(c=Y.relative(i,c)),this.setSourceContent(c,s))},this)};se.prototype._validateMapping=function(t,r,n,o){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!o)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:o}))}};se.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,o=0,i=0,a=0,l="",c,s,u,p,h=this._mappings.toArray(),m=0,y=h.length;m0){if(!Y.compareByGeneratedPositionsInflated(s,h[m-1]))continue;c+=","}c+=gt.encode(s.generatedColumn-t),t=s.generatedColumn,s.source!=null&&(p=this._sources.indexOf(s.source),c+=gt.encode(p-a),a=p,c+=gt.encode(s.originalLine-1-o),o=s.originalLine-1,c+=gt.encode(s.originalColumn-n),n=s.originalColumn,s.name!=null&&(u=this._names.indexOf(s.name),c+=gt.encode(u-i),i=u)),l+=c}return l};se.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Y.relative(r,n));var o=Y.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)};se.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};se.prototype.toString=function(){return JSON.stringify(this.toJSON())};ba.SourceMapGenerator=se});var kd={};b(kd,{minify:()=>yd,minifyBlock:()=>xd,syntax:()=>Cr,utils:()=>Bi,version:()=>ji});var ji="5.0.5";var Cr={};b(Cr,{compress:()=>Fi,find:()=>cd,findAll:()=>pd,findLast:()=>ud,fromPlainObject:()=>hd,generate:()=>sd,lexer:()=>od,parse:()=>ad,specificity:()=>wr,toPlainObject:()=>fd,tokenize:()=>id,walk:()=>ld});var Ee={};b(Ee,{AtKeyword:()=>M,BadString:()=>Ne,BadUrl:()=>K,CDC:()=>W,CDO:()=>pe,Colon:()=>R,Comma:()=>Q,Comment:()=>I,Delim:()=>g,Dimension:()=>k,EOF:()=>st,Function:()=>x,Hash:()=>A,Ident:()=>f,LeftCurlyBracket:()=>_,LeftParenthesis:()=>P,LeftSquareBracket:()=>H,Number:()=>d,Percentage:()=>L,RightCurlyBracket:()=>G,RightParenthesis:()=>S,RightSquareBracket:()=>$,Semicolon:()=>q,String:()=>V,Url:()=>U,WhiteSpace:()=>v});var st=0,f=1,x=2,M=3,A=4,V=5,Ne=6,U=7,K=8,g=9,d=10,L=11,k=12,v=13,pe=14,W=15,R=16,q=17,Q=18,H=19,$=20,P=21,S=22,_=23,G=24,I=25;function j(e){return e>=48&&e<=57}function oe(e){return j(e)||e>=65&&e<=70||e>=97&&e<=102}function Ut(e){return e>=65&&e<=90}function Yl(e){return e>=97&&e<=122}function Vl(e){return Ut(e)||Yl(e)}function Gl(e){return e>=128}function _t(e){return Vl(e)||Gl(e)||e===95}function lt(e){return _t(e)||j(e)||e===45}function Kl(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function ct(e){return e===10||e===13||e===12}function he(e){return ct(e)||e===32||e===9}function re(e,t){return!(e!==92||ct(t)||t===0)}function je(e,t,r){return e===45?_t(t)||t===45||re(t,r):_t(e)?!0:e===92?re(e,t):!1}function jt(e,t,r){return e===43||e===45?j(t)?2:t===46&&j(r)?3:0:e===46?j(t)?2:0:j(e)?1:0}function qt(e){return e===65279||e===65534?1:0}var Ar=new Array(128),Ql=128,ut=130,Er=131,Ht=132,Tr=133;for(let e=0;e<128?Ar[e]:Ht}function qe(e,t){return te.length)return!1;for(let o=t;o=0&&he(e.charCodeAt(t));t--);return t+1}function pt(e,t){for(;t=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var He=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"];function We(e=null,t){return e===null||e.length0?qt(t.charCodeAt(0)):0,o=We(e.lines,r),i=We(e.columns,r),a=e.startLine,l=e.startColumn;for(let c=n;c{}){t=String(t||"");let n=t.length,o=We(this.offsetAndType,t.length+1),i=We(this.balance,t.length+1),a=0,l=0,c=0,s=-1;for(this.offsetAndType=null,this.balance=null,r(t,(u,p,h)=>{switch(u){default:i[a]=n;break;case l:{let m=c&ae;for(c=i[m],l=c>>Te,i[a]=m,i[m++]=a;m>Te:0}lookupOffset(t){return t+=this.tokenIndex,t0?t>Te,this.tokenEnd=r&ae):(this.tokenIndex=this.tokenCount,this.next())}next(){let t=this.tokenIndex+1;t>Te,this.tokenEnd=t&ae):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(t,r){let n=t,o,i;e:for(;n0?this.offsetAndType[n-1]&ae:this.firstCharOffset,r(this.source.charCodeAt(i))){case 1:break e;case 2:n++;break e;default:this.balance[o]===n&&(n=o)}}this.skip(n-this.tokenIndex)}forEachToken(t){for(let r=0,n=this.firstCharOffset;r>Te;n=a,t(l,o,a,r)}}dump(){let t=new Array(this.tokenCount);return this.forEachToken((r,n,o,i)=>{t[i]={idx:i,type:He[r],chunk:this.source.substring(n,o),balance:this.balance[i]}}),t}};function Le(e,t){function r(p){return p=e.length){sString(u+m+1).padStart(c)+" |"+h).join(`
+`)}let i=e.split(/\r\n?|\n|\f/),a=Math.max(1,t-n)-1,l=Math.min(t+n,i.length+1),c=Math.max(4,String(l).length)+1,s=0;r+=(Gi.length-1)*(i[t-1].substr(0,r-1).match(/\t/g)||[]).length,r>Pr&&(s=r-Vi+3,r=Vi-2);for(let u=a;u<=l;u++)u>=0&&u0&&i[u].length>s?"\u2026":"")+i[u].substr(s,Pr-2)+(i[u].length>s+Pr-1?"\u2026":""));return[o(a,t),new Array(r+c+2).join("-")+"^",o(t,l)].filter(Boolean).join(`
+`)}function Ir(e,t,r,n,o){return Object.assign(Re("SyntaxError",e),{source:t,offset:r,line:n,column:o,sourceFragment(a){return Ki({source:t,line:n,column:o},isNaN(a)?0:a)},get formattedMessage(){return`Parse error: ${e}
+`+Ki({source:t,line:n,column:o},2)}})}function Qi(e){let t=this.createList(),r=!1,n={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:r=!0,this.next();continue}let o=e.getNode.call(this,n);if(o===void 0)break;r&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,o,t,n),r=!1),t.push(o)}return r&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,n),t}var $i=()=>{},Zl=33,Jl=35,Or=59,Xi=123,Zi=0;function ec(e){return function(){return this[e]()}}function Dr(e){let t=Object.create(null);for(let r in e){let n=e[r],o=n.parse||n;o&&(t[r]=o)}return t}function tc(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:Dr(e.atrule),pseudo:Dr(e.pseudo),node:Dr(e.node)};for(let r in e.parseContext)switch(typeof e.parseContext[r]){case"function":t.context[r]=e.parseContext[r];break;case"string":t.context[r]=ec(e.parseContext[r]);break}return{config:t,...t,...t.node}}function Ji(e){let t="",r="",n=!1,o=$i,i=!1,a=new Gt,l=Object.assign(new mt,tc(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Qi,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(s){return s===Xi?1:0},consumeUntilLeftCurlyBracketOrSemicolon(s){return s===Xi||s===Or?1:0},consumeUntilExclamationMarkOrSemicolon(s){return s===Zl||s===Or?1:0},consumeUntilSemicolonIncluded(s){return s===Or?2:0},createList(){return new w},createSingleNodeList(s){return new w().appendData(s)},getFirstListNode(s){return s&&s.first},getLastListNode(s){return s&&s.last},parseWithFallback(s,u){let p=this.tokenIndex;try{return s.call(this)}catch(h){if(i)throw h;let m=u.call(this,p);return i=!0,o(h,m),i=!1,m}},lookupNonWSType(s){let u;do if(u=this.lookupType(s++),u!==13)return u;while(u!==Zi);return Zi},charCodeAt(s){return s>=0&&sm.toUpperCase()),p=`${/[[\](){}]/.test(u)?`"${u}"`:u} is expected`,h=this.tokenStart;switch(s){case 1:this.tokenType===2||this.tokenType===7?(h=this.tokenEnd-1,p="Identifier is expected but function found"):p="Identifier is expected";break;case 4:this.isDelim(Jl)&&(this.next(),h++,p="Name is expected");break;case 11:this.tokenType===10&&(h=this.tokenEnd,p="Percent sign is expected");break}this.error(p,h)}this.next()},eatIdent(s){(this.tokenType!==1||this.lookupValue(0,s)===!1)&&this.error(`Identifier "${s}" is expected`),this.next()},eatDelim(s){this.isDelim(s)||this.error(`Delim "${String.fromCharCode(s)}" is expected`),this.next()},getLocation(s,u){return n?a.getLocationRange(s,u,r):null},getLocationFromList(s){if(n){let u=this.getFirstListNode(s),p=this.getLastListNode(s);return a.getLocationRange(u!==null?u.loc.start.offset-a.startOffset:this.tokenStart,p!==null?p.loc.end.offset-a.startOffset:this.tokenStart,r)}return null},error(s,u){let p=typeof u<"u"&&u",n=Boolean(u.positions),o=typeof u.onParseError=="function"?u.onParseError:$i,i=!1,l.parseAtrulePrelude="parseAtrulePrelude"in u?Boolean(u.parseAtrulePrelude):!0,l.parseRulePrelude="parseRulePrelude"in u?Boolean(u.parseRulePrelude):!0,l.parseValue="parseValue"in u?Boolean(u.parseValue):!0,l.parseCustomProperty="parseCustomProperty"in u?Boolean(u.parseCustomProperty):!1;let{context:p="default",onComment:h}=u;if(!(p in l.context))throw new Error("Unknown context `"+p+"`");typeof h=="function"&&l.forEachToken((y,T,N)=>{if(y===25){let C=l.getLocation(T,N),D=ke(t,N-2,N,"*/")?t.slice(T+2,N-2):t.slice(T+2,N);h(D,C)}});let m=l.context[p].call(l,u);return l.eof||l.error(),m},{SyntaxError:Ir,config:l.config})}var ka=Hl(ya(),1),xa=new Set(["Atrule","Selector","Declaration"]);function wa(e){let t=new ka.SourceMapGenerator,r={line:1,column:0},n={line:0,column:0},o={line:1,column:0},i={generated:o},a=1,l=0,c=!1,s=e.node;e.node=function(h){if(h.loc&&h.loc.start&&xa.has(h.type)){let m=h.loc.start.line,y=h.loc.start.column-1;(n.line!==m||n.column!==y)&&(n.line=m,n.column=y,r.line=a,r.column=l,c&&(c=!1,(r.line!==o.line||r.column!==o.column)&&t.addMapping(i)),c=!0,t.addMapping({source:h.loc.source,original:n,generated:r}))}s.call(this,h),c&&xa.has(h.type)&&(o.line=a,o.column=l)};let u=e.emit;e.emit=function(h,m,y){for(let T=0;TUr,spec:()=>Sc});var kc=43,wc=45,_r=(e,t)=>{if(e===9&&(e=t),typeof e=="string"){let r=e.charCodeAt(0);return r>127?32768:r<<8}return e},va=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],vc=va.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);function Sa(e){let t=new Set(e.map(([r,n])=>_r(r)<<16|_r(n)));return function(r,n,o){let i=_r(n,o),a=o.charCodeAt(0);return(a===wc&&n!==1&&n!==2&&n!==15||a===kc?t.has(r<<16|a<<8):t.has(r<<16|i))&&this.emit(" ",13,!0),i}}var Sc=Sa(va),Ur=Sa(vc);var Cc=92;function Ac(e,t){if(typeof t=="function"){let r=null;e.children.forEach(n=>{r!==null&&t.call(this,r),this.node(n),r=n});return}e.children.forEach(this.node,this)}function Ec(e){Le(e,(t,r,n)=>{this.token(t,e.slice(r,n))})}function Ca(e){let t=new Map;for(let r in e.node){let n=e.node[r];typeof(n.generate||n)=="function"&&t.set(r,n.generate||n)}return function(r,n){let o="",i=0,a={node(c){if(t.has(c.type))t.get(c.type).call(l,c);else throw new Error("Unknown node type: "+c.type)},tokenBefore:Ur,token(c,s){i=this.tokenBefore(i,c,s),this.emit(s,c,!1),c===9&&s.charCodeAt(0)===Cc&&this.emit(`
+`,13,!0)},emit(c){o+=c},result(){return o}};n&&(typeof n.decorator=="function"&&(a=n.decorator(a)),n.sourceMap&&(a=wa(a)),n.mode in Xt&&(a.tokenBefore=Xt[n.mode]));let l={node:c=>a.node(c),children:Ac,token:(c,s)=>a.token(c,s),tokenize:Ec};return a.node(r),a.result()}}function Aa(e){return{fromPlainObject(t){return e(t,{enter(r){r.children&&!(r.children instanceof w)&&(r.children=new w().fromArray(r.children))}}),t},toPlainObject(t){return e(t,{leave(r){r.children&&r.children instanceof w&&(r.children=r.children.toArray())}}),t}}}var{hasOwnProperty:jr}=Object.prototype,bt=function(){};function Ea(e){return typeof e=="function"?e:bt}function Ta(e,t){return function(r,n,o){r.type===t&&e.call(this,r,n,o)}}function Tc(e,t){let r=t.structure,n=[];for(let o in r){if(jr.call(r,o)===!1)continue;let i=r[o],a={name:o,type:!1,nullable:!1};Array.isArray(i)||(i=[i]);for(let l of i)l===null?a.nullable=!0:typeof l=="string"?a.type="node":Array.isArray(l)&&(a.type="list");a.type&&n.push(a)}return n.length?{context:t.walkContext,fields:n}:null}function Lc(e){let t={};for(let r in e.node)if(jr.call(e.node,r)){let n=e.node[r];if(!n.structure)throw new Error("Missed `structure` field in `"+r+"` node type definition");t[r]=Tc(r,n)}return t}function La(e,t){let r=e.fields.slice(),n=e.context,o=typeof n=="string";return t&&r.reverse(),function(i,a,l,c){let s;o&&(s=a[n],a[n]=i);for(let u of r){let p=i[u.name];if(!u.nullable||p){if(u.type==="list"){if(t?p.reduceRight(c,!1):p.reduce(c,!1))return!0}else if(l(p))return!0}}o&&(a[n]=s)}}function Pa({StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Rule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Declaration:{StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}}}function Ia(e){let t=Lc(e),r={},n={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let s in t)jr.call(t,s)&&t[s]!==null&&(r[s]=La(t[s],!1),n[s]=La(t[s],!0));let a=Pa(r),l=Pa(n),c=function(s,u){function p(C,D,Ae){let B=h.call(N,C,D,Ae);return B===o?!0:B===i?!1:!!(y.hasOwnProperty(C.type)&&y[C.type](C,N,p,T)||m.call(N,C,D,Ae)===o)}let h=bt,m=bt,y=r,T=(C,D,Ae,B)=>C||p(D,Ae,B),N={break:o,skip:i,root:s,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof u=="function")h=u;else if(u&&(h=Ea(u.enter),m=Ea(u.leave),u.reverse&&(y=n),u.visit)){if(a.hasOwnProperty(u.visit))y=u.reverse?l[u.visit]:a[u.visit];else if(!t.hasOwnProperty(u.visit))throw new Error("Bad value `"+u.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");h=Ta(h,u.visit),m=Ta(m,u.visit)}if(h===bt&&m===bt)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");p(s)};return c.break=o,c.skip=i,c.find=function(s,u){let p=null;return c(s,function(h,m,y){if(u.call(this,h,m,y))return p=h,o}),p},c.findLast=function(s,u){let p=null;return c(s,{reverse:!0,enter(h,m,y){if(u.call(this,h,m,y))return p=h,o}}),p},c.findAll=function(s,u){let p=[];return c(s,function(h,m,y){u.call(this,h,m,y)&&p.push(h)}),p},c}function Pc(e){return e}function Ic(e){let{min:t,max:r,comma:n}=e;return t===0&&r===0?n?"#?":"*":t===0&&r===1?"?":t===1&&r===0?n?"#":"+":t===1&&r===1?"":(n?"#":"")+(t===r?"{"+t+"}":"{"+t+","+(r!==0?r:"")+"}")}function Oc(e){switch(e.type){case"Range":return" ["+(e.min===null?"-\u221E":e.min)+","+(e.max===null?"\u221E":e.max)+"]";default:throw new Error("Unknown node type `"+e.type+"`")}}function Dc(e,t,r,n){let o=e.combinator===" "||n?e.combinator:" "+e.combinator+" ",i=e.terms.map(a=>qr(a,t,r,n)).join(o);return e.explicit||r?(n||i[0]===","?"[":"[ ")+i+(n?"]":" ]"):i}function qr(e,t,r,n){let o;switch(e.type){case"Group":o=Dc(e,t,r,n)+(e.disallowEmpty?"!":"");break;case"Multiplier":return qr(e.term,t,r,n)+t(Ic(e),e);case"Type":o="<"+e.name+(e.opts?t(Oc(e.opts),e.opts):"")+">";break;case"Property":o="<'"+e.name+"'>";break;case"Keyword":o=e.name;break;case"AtKeyword":o="@"+e.name;break;case"Function":o=e.name+"(";break;case"String":case"Token":o=e.value;break;case"Comma":o=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(o,e)}function Ge(e,t){let r=Pc,n=!1,o=!1;return typeof t=="function"?r=t:t&&(n=Boolean(t.forceBraces),o=Boolean(t.compact),typeof t.decorate=="function"&&(r=t.decorate)),qr(e,r,n,o)}var Oa={offset:0,line:1,column:1};function Nc(e,t){let r=e.tokens,n=e.longestMatch,o=n1?(u=Zt(i||t,"end")||yt(Oa,s),p=yt(u)):(u=Zt(i,"start")||yt(Zt(t,"start")||Oa,s.slice(0,a)),p=Zt(i,"end")||yt(u,s.substr(a,l))),{css:s,mismatchOffset:a,mismatchLength:l,start:u,end:p}}function Zt(e,t){let r=e&&e.loc&&e.loc[t];return r?"line"in r?yt(r):r:null}function yt({offset:e,line:t,column:r},n){let o={offset:e,line:t,column:r};if(n){let i=n.split(/\n|\r\n?|\f/);o.offset+=n.length,o.line+=i.length-1,o.column=i.length===1?o.column+n.length:i.pop().length+1}return o}var Ke=function(e,t){let r=Re("SyntaxReferenceError",e+(t?" `"+t+"`":""));return r.reference=t,r},Da=function(e,t,r,n){let o=Re("SyntaxMatchError",e),{css:i,mismatchOffset:a,mismatchLength:l,start:c,end:s}=Nc(n,r);return o.rawMessage=e,o.syntax=t?Ge(t):"",o.css=i,o.mismatchOffset=a,o.mismatchLength=l,o.message=e+`
+ syntax: `+o.syntax+`
+ value: `+(i||"")+`
+ --------`+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,c),o.loc={source:r&&r.loc&&r.loc.source||"",start:c,end:s},o};var Jt=new Map,Qe=new Map,er=45,Z=Mc,me=Rc;function tr(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===er&&e.charCodeAt(t+1)===er}function Na(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===er&&e.charCodeAt(t+1)!==er){let r=e.indexOf("-",t+2);if(r!==-1)return e.substring(t,r+1)}return""}function Mc(e){if(Jt.has(e))return Jt.get(e);let t=e.toLowerCase(),r=Jt.get(t);if(r===void 0){let n=tr(t,0),o=n?"":Na(t,0);r=Object.freeze({basename:t.substr(o.length),name:t,prefix:o,vendor:o,custom:n})}return Jt.set(e,r),r}function Rc(e){if(Qe.has(e))return Qe.get(e);let t=e,r=e[0];r==="/"?r=e[1]==="/"?"//":"/":r!=="_"&&r!=="*"&&r!=="$"&&r!=="#"&&r!=="+"&&r!=="&"&&(r="");let n=tr(t,r.length);if(!n&&(t=t.toLowerCase(),Qe.has(t))){let l=Qe.get(t);return Qe.set(e,l),l}let o=n?"":Na(t,r.length),i=t.substr(0,r.length+o.length),a=Object.freeze({basename:t.substr(i.length),name:t.substr(r.length),hack:r,vendor:o,prefix:i,custom:n});return Qe.set(e,a),a}var rr=["initial","inherit","unset","revert","revert-layer"];var kt=43,de=45,Hr=110,$e=!0,Fc=!1;function Yr(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function xt(e,t,r){for(;e!==null&&(e.type===13||e.type===25);)e=r(++t);return t}function Pe(e,t,r,n){if(!e)return 0;let o=e.value.charCodeAt(t);if(o===kt||o===de){if(r)return 0;t++}for(;t6)return 0}return n}function nr(e,t,r){if(!e)return 0;for(;Gr(r(t),Ra);){if(++e>6)return 0;t++}return t}function Kr(e,t){let r=0;if(e===null||e.type!==1||!xe(e.value,0,_c)||(e=t(++r),e===null))return 0;if(Gr(e,Bc))return e=t(++r),e===null?0:e.type===1?nr(wt(e,0,!0),++r,t):Gr(e,Ra)?nr(1,++r,t):0;if(e.type===10){let n=wt(e,1,!0);return n===0?0:(e=t(++r),e===null?r:e.type===12||e.type===10?!Uc(e,Ma)||!wt(e,1,!1)?0:r+1:nr(n,r,t))}return e.type===12?nr(wt(e,1,!0),++r,t):0}var jc=["calc(","-moz-calc(","-webkit-calc("],Qr=new Map([[2,22],[21,22],[19,20],[23,24]]),qc=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],Hc=["deg","grad","rad","turn"],Wc=["s","ms"],Yc=["hz","khz"],Vc=["dpi","dpcm","dppx","x"],Gc=["fr"],Kc=["db"],Qc=["st"];function ue(e,t){return te.max&&typeof e.max!="string")return!0}return!1}function $c(e,t){let r=0,n=[],o=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==r)break e;if(r=n.pop(),n.length===0){o++;break e}break;case 2:case 21:case 19:case 23:n.push(r),r=Qr.get(e.type);break}o++}while(e=t(o));return o}function le(e){return function(t,r,n){return t===null?0:t.type===2&&Ba(t.value,jc)?$c(t,r):e(t,r,n)}}function z(e){return function(t){return t===null||t.type!==e?0:1}}function Xc(e){if(e===null||e.type!==1)return 0;let t=e.value.toLowerCase();return Ba(t,rr)||Fa(t,"default")?0:1}function Zc(e){return e===null||e.type!==1||ue(e.value,0)!==45||ue(e.value,1)!==45?0:1}function Jc(e){if(e===null||e.type!==4)return 0;let t=e.value.length;if(t!==4&&t!==5&&t!==7&&t!==9)return 0;for(let r=1;r/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),Ya={" ":1,"&&":2,"||":3,"|":4};function lr(e){return e.substringToPos(e.findWsEnd(e.pos))}function Xe(e){let t=e.pos;for(;t=128||vt[r]===0)break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function cr(e){let t=e.pos;for(;t57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function yu(e){let t=e.str.indexOf("'",e.pos+1);return t===-1&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function Va(e){let t=null,r=null;return e.eat(sr),t=cr(e),e.charCode()===rn?(e.pos++,e.charCode()!==Ha&&(r=cr(e))):r=t,e.eat(Ha),{min:Number(t),max:r?Number(r):0}}function xu(e){let t=null,r=!1;switch(e.charCode()){case Qa:e.pos++,t={min:0,max:0};break;case tn:e.pos++,t={min:1,max:0};break;case Jr:e.pos++,t={min:0,max:1};break;case en:e.pos++,r=!0,e.charCode()===sr?t=Va(e):e.charCode()===Jr?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case sr:t=Va(e);break;default:return null}return{type:"Multiplier",comma:r,min:t.min,max:t.max,term:null}}function Ze(e,t){let r=xu(e);return r!==null?(r.term=t,e.charCode()===en&&e.charCodeAt(e.pos-1)===tn?Ze(e,r):r):t}function Zr(e){let t=e.peek();return t===""?null:{type:"Token",value:t}}function ku(e){let t;return e.eat(nn),e.eat(ar),t=Xe(e),e.eat(ar),e.eat($a),Ze(e,{type:"Property",name:t})}function wu(e){let t=null,r=null,n=1;return e.eat(ur),e.charCode()===ja&&(e.peek(),n=-1),n==-1&&e.charCode()===Wa?e.peek():(t=n*Number(cr(e)),vt[e.charCode()]!==0&&(t+=Xe(e))),lr(e),e.eat(rn),lr(e),e.charCode()===Wa?e.peek():(n=1,e.charCode()===ja&&(e.peek(),n=-1),r=n*Number(cr(e)),vt[e.charCode()]!==0&&(r+=Xe(e))),e.eat(on),{type:"Range",min:t,max:r}}function vu(e){let t,r=null;return e.eat(nn),t=Xe(e),e.charCode()===Ka&&e.nextCharCode()===gu&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===ur&&(lr(e),r=wu(e)),e.eat($a),Ze(e,{type:"Type",name:t,opts:r})}function Su(e){let t=Xe(e);return e.charCode()===Ka?(e.pos++,{type:"Function",name:t}):Ze(e,{type:"Keyword",name:t})}function Cu(e,t){function r(o,i){return{type:"Group",terms:o,combinator:i,disallowEmpty:!1,explicit:!1}}let n;for(t=Object.keys(t).sort((o,i)=>Ya[o]-Ya[i]);t.length>0;){n=t.shift();let o=0,i=0;for(;o1&&(e.splice(i,o-i,r(e.slice(i,o),n)),o=i+1),i=-1))}i!==-1&&t.length&&e.splice(i,o-i,r(e.slice(i,o),n))}return n}function Xa(e){let t=[],r={},n,o=null,i=e.pos;for(;n=Eu(e);)n.type!=="Spaces"&&(n.type==="Combinator"?((o===null||o.type==="Combinator")&&(e.pos=i,e.error("Unexpected combinator")),r[n.value]=!0):o!==null&&o.type!=="Combinator"&&(r[" "]=!0,t.push({type:"Combinator",value:" "})),t.push(n),o=n,i=e.pos);return o!==null&&o.type==="Combinator"&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:t,combinator:Cu(t,r)||" ",disallowEmpty:!1,explicit:!1}}function Au(e){let t;return e.eat(ur),t=Xa(e),e.eat(on),t.explicit=!0,e.charCode()===Ga&&(e.pos++,t.disallowEmpty=!0),t}function Eu(e){let t=e.charCode();if(t<128&&vt[t]===1)return Su(e);switch(t){case on:break;case ur:return Ze(e,Au(e));case nn:return e.nextCharCode()===ar?ku(e):vu(e);case qa:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===qa?2:1))};case Ua:return e.pos++,e.eat(Ua),{type:"Combinator",value:"&&"};case rn:return e.pos++,{type:"Comma"};case ar:return Ze(e,{type:"String",value:yu(e)});case du:case pu:case hu:case mu:case fu:return{type:"Spaces",value:lr(e)};case bu:return t=e.nextCharCode(),t<128&&vt[t]===1?(e.pos++,{type:"AtKeyword",name:Xe(e)}):Zr(e);case Qa:case tn:case Jr:case en:case Ga:break;case sr:if(t=e.nextCharCode(),t<48||t>57)return Zr(e);break;default:return Zr(e)}}function St(e){let t=new ir(e),r=Xa(t);return t.pos!==e.length&&t.error("Unexpected input"),r.terms.length===1&&r.terms[0].type==="Group"?r.terms[0]:r}var Ct=function(){};function Za(e){return typeof e=="function"?e:Ct}function an(e,t,r){function n(a){switch(o.call(r,a),a.type){case"Group":a.terms.forEach(n);break;case"Multiplier":n(a.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+a.type)}i.call(r,a)}let o=Ct,i=Ct;if(typeof t=="function"?o=t:t&&(o=Za(t.enter),i=Za(t.leave)),o===Ct&&i===Ct)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");n(e,r)}var Lu={decorator(e){let t=[],r=null;return{...e,node(n){let o=r;r=n,e.node.call(this,n),r=o},emit(n,o,i){t.push({type:o,value:n,node:i?null:r})},result(){return t}}}};function Pu(e){let t=[];return Le(e,(r,n,o)=>t.push({type:r,value:e.slice(n,o),node:null})),t}function Ja(e,t){return typeof e=="string"?Pu(e):t.generate(e,Lu)}var E={type:"Match"},O={type:"Mismatch"},pr={type:"DisallowEmpty"},Iu=40,Ou=41;function ee(e,t,r){return t===E&&r===O||e===E&&t===E&&r===E?e:(e.type==="If"&&e.else===O&&t===E&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:r})}function ts(e){return e.length>2&&e.charCodeAt(e.length-2)===Iu&&e.charCodeAt(e.length-1)===Ou}function es(e){return e.type==="Keyword"||e.type==="AtKeyword"||e.type==="Function"||e.type==="Type"&&ts(e.name)}function sn(e,t,r){switch(e){case" ":{let n=E;for(let o=t.length-1;o>=0;o--){let i=t[o];n=ee(i,n,O)}return n}case"|":{let n=O,o=null;for(let i=t.length-1;i>=0;i--){let a=t[i];if(es(a)&&(o===null&&i>0&&es(t[i-1])&&(o=Object.create(null),n=ee({type:"Enum",map:o},E,n)),o!==null)){let l=(ts(a.name)?a.name.slice(0,-1):a.name).toLowerCase();if(!(l in o)){o[l]=a;continue}}o=null,n=ee(a,E,n)}return n}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let n=O;for(let o=t.length-1;o>=0;o--){let i=t[o],a;t.length>1?a=sn(e,t.filter(function(l){return l!==i}),!1):a=E,n=ee(i,a,n)}return n}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let n=r?E:O;for(let o=t.length-1;o>=0;o--){let i=t[o],a;t.length>1?a=sn(e,t.filter(function(l){return l!==i}),!0):a=E,n=ee(i,a,n)}return n}}}function Du(e){let t=E,r=ln(e.term);if(e.max===0)r=ee(r,pr,O),t=ee(r,null,O),t.then=ee(E,E,t),e.comma&&(t.then.else=ee({type:"Comma",syntax:e},t,O));else for(let n=e.min||1;n<=e.max;n++)e.comma&&t!==E&&(t=ee({type:"Comma",syntax:e},t,O)),t=ee(r,ee(E,E,t),O);if(e.min===0)t=ee(E,E,t);else for(let n=0;n=65&&o<=90&&(o=o|32),o!==n)return!1}return!0}function _u(e){return e.type!==9?!1:e.value!=="?"}function is(e){return e===null?!0:e.type===18||e.type===2||e.type===21||e.type===19||e.type===23||_u(e)}function as(e){return e===null?!0:e.type===22||e.type===20||e.type===24||e.type===9&&e.value==="/"}function Uu(e,t,r){function n(){do D++,C=DAe&&(Ae=D)}function s(){p={syntax:t.syntax,opts:t.syntax.opts||p!==null&&p.opts||null,prev:p},B={type:un,syntax:t.syntax,token:B.token,prev:B}}function u(){B.type===un?B=B.prev:B={type:ss,syntax:p.syntax,token:B.token,prev:B},p=p.prev}let p=null,h=null,m=null,y=null,T=0,N=null,C=null,D=-1,Ae=0,B={type:Nu,syntax:null,token:null,prev:null};for(n();N===null&&++Tm.tokenIndex)&&(m=y,y=!1);else if(m===null){N=Ru;break}t=m.nextState,h=m.thenStack,p=m.syntaxStack,B=m.matchStack,D=m.tokenIndex,C=DD){for(;D":"<'"+t.name+"'>"));if(y!==!1&&C!==null&&t.type==="Type"&&(t.name==="custom-ident"&&C.type===1||t.name==="length"&&C.value==="0")){y===null&&(y=i(t,m)),t=O;break}s(),t=te.match;break}case"Keyword":{let J=t.name;if(C!==null){let te=C.value;if(te.indexOf("\\")!==-1&&(te=te.replace(/\\[09].*$/,"")),cn(te,J)){c(),t=E;break}}t=O;break}case"AtKeyword":case"Function":if(C!==null&&cn(C.value,t.name)){c(),t=E;break}t=O;break;case"Token":if(C!==null&&C.value===t.value){c(),t=E;break}t=O;break;case"Comma":C!==null&&C.type===18?is(B.token)?t=O:(c(),t=as(C)?O:E):t=is(B.token)||as(C)?E:O;break;case"String":let ce="",ye=D;for(;yels,isKeyword:()=>Hu,isProperty:()=>qu,isType:()=>ju});function ls(e){function t(o){return o===null?!1:o.type==="Type"||o.type==="Property"||o.type==="Keyword"}function r(o){if(Array.isArray(o.match)){for(let i=0;ir.type==="Type"&&r.name===t)}function qu(e,t){return hn(this,e,r=>r.type==="Property"&&r.name===t)}function Hu(e){return hn(this,e,t=>t.type==="Keyword")}function hn(e,t,r){let n=ls.call(e,t);return n===null?!1:n.some(r)}function cs(e){return"node"in e?e.node:cs(e.match[0])}function us(e){return"node"in e?e.node:us(e.match[e.match.length-1])}function mn(e,t,r,n,o){function i(l){if(l.syntax!==null&&l.syntax.type===n&&l.syntax.name===o){let c=cs(l),s=us(l);e.syntax.walk(t,function(u,p,h){if(u===c){let m=new w;do{if(m.appendData(p.data),p.data===s)break;p=p.next}while(p!==null);a.push({parent:h,nodes:m})}})}Array.isArray(l.match)&&l.match.forEach(i)}let a=[];return r.matched!==null&&i(r.matched),a}var{hasOwnProperty:At}=Object.prototype;function dn(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&e>=0}function ps(e){return Boolean(e)&&dn(e.offset)&&dn(e.line)&&dn(e.column)}function Wu(e,t){return function(n,o){if(!n||n.constructor!==Object)return o(n,"Type of node should be an Object");for(let i in n){let a=!0;if(At.call(n,i)!==!1){if(i==="type")n.type!==e&&o(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if(i==="loc"){if(n.loc===null)continue;if(n.loc&&n.loc.constructor===Object)if(typeof n.loc.source!="string")i+=".source";else if(!ps(n.loc.start))i+=".start";else if(!ps(n.loc.end))i+=".end";else continue;a=!1}else if(t.hasOwnProperty(i)){a=!1;for(let l=0;!a&&l");else if(Array.isArray(s))a.push("List");else throw new Error("Wrong value `"+s+"` in `"+e+"."+i+"` structure definition")}o[i]=a.join(" | ")}return{docs:o,check:Wu(e,n)}}function hs(e){let t={};if(e.node){for(let r in e.node)if(At.call(e.node,r)){let n=e.node[r];if(n.structure)t[r]=Yu(r,n);else throw new Error("Missed `structure` field in `"+r+"` node type definition")}}return t}var Vu=hr(rr.join(" | "));function gn(e,t,r){let n={};for(let o in e)e[o].syntax&&(n[o]=r?e[o].syntax:Ge(e[o].syntax,{compact:t}));return n}function Gu(e,t,r){let n={};for(let[o,i]of Object.entries(e))n[o]={prelude:i.prelude&&(r?i.prelude.syntax:Ge(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&gn(i.descriptors,t,r)};return n}function Ku(e){for(let t=0;t(n[o]=this.createDescriptor(r.descriptors[o],"AtruleDescriptor",o,t),n),Object.create(null)):null})}addProperty_(t,r){!r||(this.properties[t]=this.createDescriptor(r,"Property",t))}addType_(t,r){!r||(this.types[t]=this.createDescriptor(r,"Type",t))}checkAtruleName(t){if(!this.getAtrule(t))return new Ke("Unknown at-rule","@"+t)}checkAtrulePrelude(t,r){let n=this.checkAtruleName(t);if(n)return n;let o=this.getAtrule(t);if(!o.prelude&&r)return new SyntaxError("At-rule `@"+t+"` should not contain a prelude");if(o.prelude&&!r&&!Je(this,o.prelude,"",!1).matched)return new SyntaxError("At-rule `@"+t+"` should contain a prelude")}checkAtruleDescriptorName(t,r){let n=this.checkAtruleName(t);if(n)return n;let o=this.getAtrule(t),i=Z(r);if(!o.descriptors)return new SyntaxError("At-rule `@"+t+"` has no known descriptors");if(!o.descriptors[i.name]&&!o.descriptors[i.basename])return new Ke("Unknown at-rule descriptor",r)}checkPropertyName(t){if(!this.getProperty(t))return new Ke("Unknown property",t)}matchAtrulePrelude(t,r){let n=this.checkAtrulePrelude(t,r);return n?ge(null,n):Je(this,this.getAtrule(t).prelude,r||"",!1)}matchAtruleDescriptor(t,r,n){let o=this.checkAtruleDescriptorName(t,r);if(o)return ge(null,o);let i=this.getAtrule(t),a=Z(r);return Je(this,i.descriptors[a.name]||i.descriptors[a.basename],n,!1)}matchDeclaration(t){return t.type!=="Declaration"?ge(null,new Error("Not a Declaration node")):this.matchProperty(t.property,t.value)}matchProperty(t,r){if(me(t).custom)return ge(null,new Error("Lexer matching doesn't applicable for custom properties"));let n=this.checkPropertyName(t);return n?ge(null,n):Je(this,this.getProperty(t),r,!0)}matchType(t,r){let n=this.getType(t);return n?Je(this,n,r,!1):ge(null,new Ke("Unknown type",t))}match(t,r){return typeof t!="string"&&(!t||!t.type)?ge(null,new Ke("Bad syntax")):((typeof t=="string"||!t.match)&&(t=this.createDescriptor(t,"Type","anonymous")),Je(this,t,r,!1))}findValueFragments(t,r,n,o){return mn(this,r,this.matchProperty(t,r),n,o)}findDeclarationValueFragments(t,r,n){return mn(this,t.value,this.matchDeclaration(t),r,n)}findAllFragments(t,r,n){let o=[];return this.syntax.walk(t,{visit:"Declaration",enter:i=>{o.push.apply(o,this.findDeclarationValueFragments(i,r,n))}}),o}getAtrule(t,r=!0){let n=Z(t);return(n.vendor&&r?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null}getAtrulePrelude(t,r=!0){let n=this.getAtrule(t,r);return n&&n.prelude||null}getAtruleDescriptor(t,r){return this.atrules.hasOwnProperty(t)&&this.atrules.declarators&&this.atrules[t].declarators[r]||null}getProperty(t,r=!0){let n=me(t);return(n.vendor&&r?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null}getType(t){return hasOwnProperty.call(this.types,t)?this.types[t]:null}validate(){function t(o,i,a,l){if(a.has(i))return a.get(i);a.set(i,!1),l.syntax!==null&&an(l.syntax,function(c){if(c.type!=="Type"&&c.type!=="Property")return;let s=c.type==="Type"?o.types:o.properties,u=c.type==="Type"?r:n;(!hasOwnProperty.call(s,c.name)||t(o,c.name,u,s[c.name]))&&a.set(i,!0)},this)}let r=new Map,n=new Map;for(let o in this.types)t(this,o,r,this.types[o]);for(let o in this.properties)t(this,o,n,this.properties[o]);return r=[...r.keys()].filter(o=>r.get(o)),n=[...n.keys()].filter(o=>n.get(o)),r.length||n.length?{types:r,properties:n}:null}dump(t,r){return{generic:this.generic,types:gn(this.types,!r,t),properties:gn(this.properties,!r,t),atrules:Gu(this.atrules,!r,t)}}toString(){return JSON.stringify(this.dump())}};var{hasOwnProperty:tt}=Object.prototype,Qu={generic:!0,types:bn,atrules:{prelude:ms,descriptors:ms},properties:bn,parseContext:$u,scope:gs,atrule:["parse"],pseudo:["parse"],node:["name","structure","parse","generate","walkContext"]};function fr(e){return e&&e.constructor===Object}function ds(e){return fr(e)?{...e}:e}function $u(e,t){return Object.assign(e,t)}function gs(e,t){for(let r in t)tt.call(t,r)&&(fr(e[r])?gs(e[r],t[r]):e[r]=ds(t[r]));return e}function fs(e,t){return typeof t=="string"&&/^\s*\|/.test(t)?typeof e=="string"?e+t:t.replace(/^\s*\|\s*/,""):t||null}function bn(e,t){if(typeof t=="string")return fs(e,t);let r={...e};for(let n in t)tt.call(t,n)&&(r[n]=fs(tt.call(e,n)?e[n]:void 0,t[n]));return r}function ms(e,t){let r=bn(e,t);return!fr(r)||Object.keys(r).length?r:null}function Et(e,t,r){for(let n in r)if(tt.call(r,n)!==!1){if(r[n]===!0)tt.call(t,n)&&(e[n]=ds(t[n]));else if(r[n]){if(typeof r[n]=="function"){let o=r[n];e[n]=o({},e[n]),e[n]=o(e[n]||{},t[n])}else if(fr(r[n])){let o={};for(let i in e[n])o[i]=Et({},e[n][i],r[n]);for(let i in t[n])o[i]=Et(o[i]||{},t[n][i],r[n]);e[n]=o}else if(Array.isArray(r[n])){let o={},i=r[n].reduce(function(a,l){return a[l]=!0,a},{});for(let[a,l]of Object.entries(e[n]||{}))o[a]={},l&&Et(o[a],l,i);for(let a in t[n])tt.call(t[n],a)&&(o[a]||(o[a]={}),t[n]&&t[n][a]&&Et(o[a],t[n][a],i));e[n]=o}}}return e}var mr=(e,t)=>Et(e,t,Qu);function bs(e){let t=Ji(e),r=Ia(e),n=Ca(e),{fromPlainObject:o,toPlainObject:i}=Aa(r),a={lexer:null,createLexer:l=>new et(l,a,a.lexer.structure),tokenize:Le,parse:t,generate:n,walk:r,find:r.find,findLast:r.findLast,findAll:r.findAll,fromPlainObject:o,toPlainObject:i,fork(l){let c=mr({},e);return bs(typeof l=="function"?l(c,Object.assign):mr(c,l))}};return a.lexer=new et({generic:!0,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},a),a}var yn=e=>bs(mr({},e));var ys={generic:!0,types:{"absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","alpha-value":"|","angle-percentage":"|","angular-color-hint":"","angular-color-stop":"&&?","angular-color-stop-list":"[ [, ]?]# , ","animateable-feature":"scroll-position|contents|",attachment:"scroll|fixed|local","attr()":"attr( ? [, ]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' ']'|'[' [|] ? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [? ]+ ? )","auto-track-list":"[? [|]]* ? [? [|]]* ?","baseline-position":"[first|last]? baseline","basic-shape":"||||","bg-image":"none|","bg-layer":"|| [/ ]?||||||||","bg-position":"[[left|center|right|top|bottom|]|[left|center|right|] [top|center|bottom|]|[center|[left|right] ?]&&[center|[top|bottom] ?]]","bg-size":"[|auto]{1,2}|cover|contain","blur()":"blur( )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( )","calc()":"calc( )","calc-sum":" [['+'|'-'] ]*","calc-product":" ['*' |'/' ]*","calc-value":"|||( )","cf-final-image":"|","cf-mixing-image":"?&&","circle()":"circle( []? [at ]? )","clamp()":"clamp( #{3} )","class-selector":"'.' ","clip-source":"",color:"|||||||||currentcolor|","color-stop":"|","color-stop-angle":"{1,2}","color-stop-length":"{1,2}","color-stop-list":"[ [, ]?]# , ",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[? * [ *]*]!","compound-selector-list":"#","complex-selector":" [? ]*","complex-selector-list":"#","conic-gradient()":"conic-gradient( [from ]? [at ]? , )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[|contents||||||]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"","contrast()":"contrast( [] )",counter:"|","counter()":"counter( , ? )","counter-name":"","counter-style":"|symbols( )","counter-style-name":"","counters()":"counters( , , ? )","cross-fade()":"cross-fade( , ? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( , , , )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( {2,3} ? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( , [first|start|last|first-except]? )|element( )","ellipse()":"ellipse( [{2}]? [at ]? )","ending-shape":"circle|ellipse","env()":"env( , ? )","explicit-track-list":"[? ]+ ?","family-name":"|+","feature-tag-value":" [|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":" '{' '}'","feature-value-block-list":"+","feature-value-declaration":" : + ;","feature-value-declaration-list":"","feature-value-name":"","fill-rule":"nonzero|evenodd","filter-function":"|||||||||","filter-function-list":"[|]+","final-bg-layer":"<'background-color'>|||| [/ ]?||||||||","fit-content()":"fit-content( [|] )","fixed-breadth":"","fixed-repeat":"repeat( [] , [? ]+ ? )","fixed-size":"|minmax( , )|minmax( , )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|","frequency-percentage":"|","general-enclosed":"[ )]|( )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"|fill-box|stroke-box|view-box",gradient:"|