@flourish/sdk 4.2.0 → 4.2.2
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.
- package/RELEASE_NOTES.md +6 -0
- package/lib/cmd/publish.js +1 -1
- package/lib/common.js +1 -1
- package/lib/sdk.js +25 -5
- package/lib/validate_config.js +1 -1
- package/my_template/node_modules/.package-lock.json +525 -0
- package/my_template/node_modules/@babel/code-frame/LICENSE +22 -0
- package/my_template/node_modules/@babel/code-frame/README.md +19 -0
- package/my_template/node_modules/@babel/code-frame/lib/index.js +157 -0
- package/my_template/node_modules/@babel/code-frame/lib/index.js.map +1 -0
- package/my_template/node_modules/@babel/code-frame/package.json +30 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/LICENSE +22 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/README.md +19 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/identifier.js +70 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +1 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/index.js +57 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/index.js.map +1 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/keyword.js +35 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map +1 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/package.json +28 -0
- package/my_template/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js +73 -0
- package/my_template/node_modules/@babel/highlight/LICENSE +22 -0
- package/my_template/node_modules/@babel/highlight/README.md +19 -0
- package/my_template/node_modules/@babel/highlight/lib/index.js +105 -0
- package/my_template/node_modules/@babel/highlight/lib/index.js.map +1 -0
- package/my_template/node_modules/@babel/highlight/package.json +29 -0
- package/my_template/node_modules/@types/estree/LICENSE +21 -0
- package/my_template/node_modules/@types/estree/README.md +15 -0
- package/my_template/node_modules/@types/estree/flow.d.ts +167 -0
- package/my_template/node_modules/@types/estree/index.d.ts +683 -0
- package/my_template/node_modules/@types/estree/package.json +26 -0
- package/my_template/node_modules/@types/node/LICENSE +21 -0
- package/my_template/node_modules/@types/node/README.md +15 -0
- package/my_template/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/my_template/node_modules/@types/node/assert.d.ts +996 -0
- package/my_template/node_modules/@types/node/async_hooks.d.ts +539 -0
- package/my_template/node_modules/@types/node/buffer.d.ts +2362 -0
- package/my_template/node_modules/@types/node/child_process.d.ts +1540 -0
- package/my_template/node_modules/@types/node/cluster.d.ts +432 -0
- package/my_template/node_modules/@types/node/console.d.ts +415 -0
- package/my_template/node_modules/@types/node/constants.d.ts +19 -0
- package/my_template/node_modules/@types/node/crypto.d.ts +4456 -0
- package/my_template/node_modules/@types/node/dgram.d.ts +586 -0
- package/my_template/node_modules/@types/node/diagnostics_channel.d.ts +191 -0
- package/my_template/node_modules/@types/node/dns/promises.d.ts +425 -0
- package/my_template/node_modules/@types/node/dns.d.ts +809 -0
- package/my_template/node_modules/@types/node/dom-events.d.ts +122 -0
- package/my_template/node_modules/@types/node/domain.d.ts +170 -0
- package/my_template/node_modules/@types/node/events.d.ts +879 -0
- package/my_template/node_modules/@types/node/fs/promises.d.ts +1239 -0
- package/my_template/node_modules/@types/node/fs.d.ts +4291 -0
- package/my_template/node_modules/@types/node/globals.d.ts +385 -0
- package/my_template/node_modules/@types/node/globals.global.d.ts +1 -0
- package/my_template/node_modules/@types/node/http.d.ts +1888 -0
- package/my_template/node_modules/@types/node/http2.d.ts +2382 -0
- package/my_template/node_modules/@types/node/https.d.ts +550 -0
- package/my_template/node_modules/@types/node/index.d.ts +88 -0
- package/my_template/node_modules/@types/node/inspector.d.ts +2747 -0
- package/my_template/node_modules/@types/node/module.d.ts +301 -0
- package/my_template/node_modules/@types/node/net.d.ts +949 -0
- package/my_template/node_modules/@types/node/os.d.ts +478 -0
- package/my_template/node_modules/@types/node/package.json +230 -0
- package/my_template/node_modules/@types/node/path.d.ts +191 -0
- package/my_template/node_modules/@types/node/perf_hooks.d.ts +639 -0
- package/my_template/node_modules/@types/node/process.d.ts +1539 -0
- package/my_template/node_modules/@types/node/punycode.d.ts +117 -0
- package/my_template/node_modules/@types/node/querystring.d.ts +141 -0
- package/my_template/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/my_template/node_modules/@types/node/readline.d.ts +539 -0
- package/my_template/node_modules/@types/node/repl.d.ts +430 -0
- package/my_template/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/my_template/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/my_template/node_modules/@types/node/stream/web.d.ts +350 -0
- package/my_template/node_modules/@types/node/stream.d.ts +1701 -0
- package/my_template/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/my_template/node_modules/@types/node/test.d.ts +1382 -0
- package/my_template/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/my_template/node_modules/@types/node/timers.d.ts +240 -0
- package/my_template/node_modules/@types/node/tls.d.ts +1210 -0
- package/my_template/node_modules/@types/node/trace_events.d.ts +182 -0
- package/my_template/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/my_template/node_modules/@types/node/ts4.8/assert.d.ts +996 -0
- package/my_template/node_modules/@types/node/ts4.8/async_hooks.d.ts +539 -0
- package/my_template/node_modules/@types/node/ts4.8/buffer.d.ts +2362 -0
- package/my_template/node_modules/@types/node/ts4.8/child_process.d.ts +1540 -0
- package/my_template/node_modules/@types/node/ts4.8/cluster.d.ts +432 -0
- package/my_template/node_modules/@types/node/ts4.8/console.d.ts +415 -0
- package/my_template/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
- package/my_template/node_modules/@types/node/ts4.8/crypto.d.ts +4455 -0
- package/my_template/node_modules/@types/node/ts4.8/dgram.d.ts +586 -0
- package/my_template/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
- package/my_template/node_modules/@types/node/ts4.8/dns/promises.d.ts +425 -0
- package/my_template/node_modules/@types/node/ts4.8/dns.d.ts +809 -0
- package/my_template/node_modules/@types/node/ts4.8/dom-events.d.ts +122 -0
- package/my_template/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/my_template/node_modules/@types/node/ts4.8/events.d.ts +879 -0
- package/my_template/node_modules/@types/node/ts4.8/fs/promises.d.ts +1239 -0
- package/my_template/node_modules/@types/node/ts4.8/fs.d.ts +4291 -0
- package/my_template/node_modules/@types/node/ts4.8/globals.d.ts +385 -0
- package/my_template/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/my_template/node_modules/@types/node/ts4.8/http.d.ts +1888 -0
- package/my_template/node_modules/@types/node/ts4.8/http2.d.ts +2382 -0
- package/my_template/node_modules/@types/node/ts4.8/https.d.ts +550 -0
- package/my_template/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/my_template/node_modules/@types/node/ts4.8/inspector.d.ts +2747 -0
- package/my_template/node_modules/@types/node/ts4.8/module.d.ts +301 -0
- package/my_template/node_modules/@types/node/ts4.8/net.d.ts +949 -0
- package/my_template/node_modules/@types/node/ts4.8/os.d.ts +478 -0
- package/my_template/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/my_template/node_modules/@types/node/ts4.8/perf_hooks.d.ts +639 -0
- package/my_template/node_modules/@types/node/ts4.8/process.d.ts +1539 -0
- package/my_template/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/my_template/node_modules/@types/node/ts4.8/querystring.d.ts +141 -0
- package/my_template/node_modules/@types/node/ts4.8/readline/promises.d.ts +150 -0
- package/my_template/node_modules/@types/node/ts4.8/readline.d.ts +539 -0
- package/my_template/node_modules/@types/node/ts4.8/repl.d.ts +430 -0
- package/my_template/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/my_template/node_modules/@types/node/ts4.8/stream/promises.d.ts +83 -0
- package/my_template/node_modules/@types/node/ts4.8/stream/web.d.ts +350 -0
- package/my_template/node_modules/@types/node/ts4.8/stream.d.ts +1701 -0
- package/my_template/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/my_template/node_modules/@types/node/ts4.8/test.d.ts +1382 -0
- package/my_template/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/my_template/node_modules/@types/node/ts4.8/timers.d.ts +240 -0
- package/my_template/node_modules/@types/node/ts4.8/tls.d.ts +1210 -0
- package/my_template/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/my_template/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
- package/my_template/node_modules/@types/node/ts4.8/url.d.ts +927 -0
- package/my_template/node_modules/@types/node/ts4.8/util.d.ts +2183 -0
- package/my_template/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
- package/my_template/node_modules/@types/node/ts4.8/vm.d.ts +903 -0
- package/my_template/node_modules/@types/node/ts4.8/wasi.d.ts +158 -0
- package/my_template/node_modules/@types/node/ts4.8/worker_threads.d.ts +691 -0
- package/my_template/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/my_template/node_modules/@types/node/tty.d.ts +208 -0
- package/my_template/node_modules/@types/node/url.d.ts +927 -0
- package/my_template/node_modules/@types/node/util.d.ts +2183 -0
- package/my_template/node_modules/@types/node/v8.d.ts +635 -0
- package/my_template/node_modules/@types/node/vm.d.ts +903 -0
- package/my_template/node_modules/@types/node/wasi.d.ts +158 -0
- package/my_template/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/my_template/node_modules/@types/node/zlib.d.ts +517 -0
- package/my_template/node_modules/@types/resolve/LICENSE +21 -0
- package/my_template/node_modules/@types/resolve/README.md +16 -0
- package/my_template/node_modules/@types/resolve/index.d.ts +113 -0
- package/my_template/node_modules/@types/resolve/package.json +29 -0
- package/my_template/node_modules/acorn/CHANGELOG.md +620 -0
- package/my_template/node_modules/acorn/LICENSE +21 -0
- package/my_template/node_modules/acorn/README.md +269 -0
- package/my_template/node_modules/acorn/bin/acorn +4 -0
- package/my_template/node_modules/acorn/dist/acorn.d.ts +209 -0
- package/my_template/node_modules/acorn/dist/acorn.js +5186 -0
- package/my_template/node_modules/acorn/dist/acorn.js.map +1 -0
- package/my_template/node_modules/acorn/dist/acorn.mjs +5155 -0
- package/my_template/node_modules/acorn/dist/acorn.mjs.d.ts +2 -0
- package/my_template/node_modules/acorn/dist/acorn.mjs.map +1 -0
- package/my_template/node_modules/acorn/dist/bin.js +64 -0
- package/my_template/node_modules/acorn/package.json +35 -0
- package/my_template/node_modules/amdefine/LICENSE +58 -0
- package/my_template/node_modules/amdefine/README.md +171 -0
- package/my_template/node_modules/amdefine/amdefine.js +301 -0
- package/my_template/node_modules/amdefine/intercept.js +36 -0
- package/my_template/node_modules/amdefine/package.json +16 -0
- package/my_template/node_modules/ansi-styles/index.js +165 -0
- package/my_template/node_modules/ansi-styles/license +9 -0
- package/my_template/node_modules/ansi-styles/package.json +56 -0
- package/my_template/node_modules/ansi-styles/readme.md +147 -0
- package/my_template/node_modules/builtin-modules/builtin-modules.json +43 -0
- package/my_template/node_modules/builtin-modules/index.d.ts +14 -0
- package/my_template/node_modules/builtin-modules/index.js +11 -0
- package/my_template/node_modules/builtin-modules/license +9 -0
- package/my_template/node_modules/builtin-modules/package.json +44 -0
- package/my_template/node_modules/builtin-modules/readme.md +44 -0
- package/my_template/node_modules/builtin-modules/static.d.ts +14 -0
- package/my_template/node_modules/builtin-modules/static.js +2 -0
- package/my_template/node_modules/chalk/index.js +228 -0
- package/my_template/node_modules/chalk/index.js.flow +93 -0
- package/my_template/node_modules/chalk/license +9 -0
- package/my_template/node_modules/chalk/package.json +71 -0
- package/my_template/node_modules/chalk/readme.md +314 -0
- package/my_template/node_modules/chalk/templates.js +128 -0
- package/my_template/node_modules/chalk/types/index.d.ts +97 -0
- package/my_template/node_modules/clean-css/History.md +1138 -0
- package/my_template/node_modules/clean-css/LICENSE +19 -0
- package/my_template/node_modules/clean-css/README.md +369 -0
- package/my_template/node_modules/clean-css/bin/cleancss +184 -0
- package/my_template/node_modules/clean-css/index.js +1 -0
- package/my_template/node_modules/clean-css/lib/clean.js +231 -0
- package/my_template/node_modules/clean-css/lib/colors/hex-name-shortener.js +186 -0
- package/my_template/node_modules/clean-css/lib/colors/hsl.js +67 -0
- package/my_template/node_modules/clean-css/lib/colors/rgb.js +16 -0
- package/my_template/node_modules/clean-css/lib/imports/inliner.js +399 -0
- package/my_template/node_modules/clean-css/lib/properties/break-up.js +335 -0
- package/my_template/node_modules/clean-css/lib/properties/can-override.js +142 -0
- package/my_template/node_modules/clean-css/lib/properties/clone.js +26 -0
- package/my_template/node_modules/clean-css/lib/properties/compactable.js +285 -0
- package/my_template/node_modules/clean-css/lib/properties/every-combination.js +28 -0
- package/my_template/node_modules/clean-css/lib/properties/has-inherit.js +10 -0
- package/my_template/node_modules/clean-css/lib/properties/invalid-property-error.js +10 -0
- package/my_template/node_modules/clean-css/lib/properties/optimizer.js +215 -0
- package/my_template/node_modules/clean-css/lib/properties/override-compactor.js +384 -0
- package/my_template/node_modules/clean-css/lib/properties/populate-components.js +32 -0
- package/my_template/node_modules/clean-css/lib/properties/remove-unused.js +10 -0
- package/my_template/node_modules/clean-css/lib/properties/restore-from-optimizing.js +60 -0
- package/my_template/node_modules/clean-css/lib/properties/restore.js +232 -0
- package/my_template/node_modules/clean-css/lib/properties/shorthand-compactor.js +134 -0
- package/my_template/node_modules/clean-css/lib/properties/validator.js +197 -0
- package/my_template/node_modules/clean-css/lib/properties/vendor-prefixes.js +26 -0
- package/my_template/node_modules/clean-css/lib/properties/wrap-for-optimizing.js +118 -0
- package/my_template/node_modules/clean-css/lib/selectors/advanced.js +86 -0
- package/my_template/node_modules/clean-css/lib/selectors/clean-up.js +89 -0
- package/my_template/node_modules/clean-css/lib/selectors/extractor.js +69 -0
- package/my_template/node_modules/clean-css/lib/selectors/is-special.js +5 -0
- package/my_template/node_modules/clean-css/lib/selectors/merge-adjacent.js +35 -0
- package/my_template/node_modules/clean-css/lib/selectors/merge-media-queries.js +64 -0
- package/my_template/node_modules/clean-css/lib/selectors/merge-non-adjacent-by-body.js +61 -0
- package/my_template/node_modules/clean-css/lib/selectors/merge-non-adjacent-by-selector.js +76 -0
- package/my_template/node_modules/clean-css/lib/selectors/reduce-non-adjacent.js +172 -0
- package/my_template/node_modules/clean-css/lib/selectors/remove-duplicate-media-queries.js +21 -0
- package/my_template/node_modules/clean-css/lib/selectors/remove-duplicates.js +41 -0
- package/my_template/node_modules/clean-css/lib/selectors/reorderable.js +99 -0
- package/my_template/node_modules/clean-css/lib/selectors/restructure.js +369 -0
- package/my_template/node_modules/clean-css/lib/selectors/simple.js +454 -0
- package/my_template/node_modules/clean-css/lib/source-maps/track.js +119 -0
- package/my_template/node_modules/clean-css/lib/stringifier/helpers.js +167 -0
- package/my_template/node_modules/clean-css/lib/stringifier/one-time.js +50 -0
- package/my_template/node_modules/clean-css/lib/stringifier/simple.js +22 -0
- package/my_template/node_modules/clean-css/lib/stringifier/source-maps.js +96 -0
- package/my_template/node_modules/clean-css/lib/text/comments-processor.js +131 -0
- package/my_template/node_modules/clean-css/lib/text/escape-store.js +53 -0
- package/my_template/node_modules/clean-css/lib/text/expressions-processor.js +117 -0
- package/my_template/node_modules/clean-css/lib/text/free-text-processor.js +98 -0
- package/my_template/node_modules/clean-css/lib/text/urls-processor.js +75 -0
- package/my_template/node_modules/clean-css/lib/tokenizer/extract-properties.js +193 -0
- package/my_template/node_modules/clean-css/lib/tokenizer/extract-selectors.js +17 -0
- package/my_template/node_modules/clean-css/lib/tokenizer/tokenize.js +297 -0
- package/my_template/node_modules/clean-css/lib/urls/rebase.js +30 -0
- package/my_template/node_modules/clean-css/lib/urls/reduce.js +154 -0
- package/my_template/node_modules/clean-css/lib/urls/rewrite.js +107 -0
- package/my_template/node_modules/clean-css/lib/utils/clone-array.js +12 -0
- package/my_template/node_modules/clean-css/lib/utils/compatibility.js +162 -0
- package/my_template/node_modules/clean-css/lib/utils/input-source-map-tracker.js +284 -0
- package/my_template/node_modules/clean-css/lib/utils/object.js +11 -0
- package/my_template/node_modules/clean-css/lib/utils/quote-scanner.js +119 -0
- package/my_template/node_modules/clean-css/lib/utils/source-reader.js +96 -0
- package/my_template/node_modules/clean-css/lib/utils/source-tracker.js +31 -0
- package/my_template/node_modules/clean-css/lib/utils/split.js +62 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/README.md +510 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/assert-shim.js +56 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/mini-require.js +152 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/prefix-source-map.jsm +21 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/prefix-utils.jsm +18 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/suffix-browser.js +8 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/suffix-utils.jsm +21 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/test-prefix.js +8 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/build/test-suffix.js +3 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/array-set.js +107 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/base64-vlq.js +146 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/base64.js +73 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/binary-search.js +117 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/mapping-list.js +86 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/quick-sort.js +120 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/source-map-consumer.js +1077 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/source-map-generator.js +399 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/source-node.js +414 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map/util.js +370 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/lib/source-map.js +8 -0
- package/my_template/node_modules/clean-css/node_modules/source-map/package.json +68 -0
- package/my_template/node_modules/clean-css/package.json +53 -0
- package/my_template/node_modules/color-convert/CHANGELOG.md +54 -0
- package/my_template/node_modules/color-convert/LICENSE +21 -0
- package/my_template/node_modules/color-convert/README.md +68 -0
- package/my_template/node_modules/color-convert/conversions.js +868 -0
- package/my_template/node_modules/color-convert/index.js +78 -0
- package/my_template/node_modules/color-convert/package.json +46 -0
- package/my_template/node_modules/color-convert/route.js +97 -0
- package/my_template/node_modules/color-name/.eslintrc.json +43 -0
- package/my_template/node_modules/color-name/LICENSE +8 -0
- package/my_template/node_modules/color-name/README.md +11 -0
- package/my_template/node_modules/color-name/index.js +152 -0
- package/my_template/node_modules/color-name/package.json +25 -0
- package/my_template/node_modules/color-name/test.js +7 -0
- package/my_template/node_modules/commander/History.md +256 -0
- package/my_template/node_modules/commander/LICENSE +22 -0
- package/my_template/node_modules/commander/Readme.md +342 -0
- package/my_template/node_modules/commander/index.js +1103 -0
- package/my_template/node_modules/commander/package.json +33 -0
- package/my_template/node_modules/copy-anything/LICENSE +21 -0
- package/my_template/node_modules/copy-anything/README.md +130 -0
- package/my_template/node_modules/copy-anything/dist/index.cjs +52 -0
- package/my_template/node_modules/copy-anything/dist/index.es.js +48 -0
- package/my_template/node_modules/copy-anything/dist/types/index.d.ts +15 -0
- package/my_template/node_modules/copy-anything/package.json +98 -0
- package/my_template/node_modules/errno/.jshintrc +59 -0
- package/my_template/node_modules/errno/.travis.yml +19 -0
- package/my_template/node_modules/errno/README.md +145 -0
- package/my_template/node_modules/errno/build.js +43 -0
- package/my_template/node_modules/errno/cli.js +22 -0
- package/my_template/node_modules/errno/custom.js +57 -0
- package/my_template/node_modules/errno/errno.js +313 -0
- package/my_template/node_modules/errno/package.json +33 -0
- package/my_template/node_modules/errno/test.js +88 -0
- package/my_template/node_modules/escape-string-regexp/index.js +11 -0
- package/my_template/node_modules/escape-string-regexp/license +21 -0
- package/my_template/node_modules/escape-string-regexp/package.json +41 -0
- package/my_template/node_modules/escape-string-regexp/readme.md +27 -0
- package/my_template/node_modules/estree-walker/CHANGELOG.md +55 -0
- package/my_template/node_modules/estree-walker/README.md +45 -0
- package/my_template/node_modules/estree-walker/dist/estree-walker.umd.js +65 -0
- package/my_template/node_modules/estree-walker/dist/estree-walker.umd.js.map +1 -0
- package/my_template/node_modules/estree-walker/index.d.ts +27 -0
- package/my_template/node_modules/estree-walker/package.json +30 -0
- package/my_template/node_modules/estree-walker/src/estree-walker.js +51 -0
- package/my_template/node_modules/function-bind/.eslintrc +21 -0
- package/my_template/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/my_template/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/my_template/node_modules/function-bind/.nycrc +13 -0
- package/my_template/node_modules/function-bind/CHANGELOG.md +136 -0
- package/my_template/node_modules/function-bind/LICENSE +20 -0
- package/my_template/node_modules/function-bind/README.md +46 -0
- package/my_template/node_modules/function-bind/implementation.js +84 -0
- package/my_template/node_modules/function-bind/index.js +5 -0
- package/my_template/node_modules/function-bind/package.json +87 -0
- package/my_template/node_modules/function-bind/test/.eslintrc +9 -0
- package/my_template/node_modules/function-bind/test/index.js +252 -0
- package/my_template/node_modules/graceful-fs/LICENSE +15 -0
- package/my_template/node_modules/graceful-fs/README.md +143 -0
- package/my_template/node_modules/graceful-fs/clone.js +23 -0
- package/my_template/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/my_template/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/my_template/node_modules/graceful-fs/package.json +53 -0
- package/my_template/node_modules/graceful-fs/polyfills.js +355 -0
- package/my_template/node_modules/graceful-readlink/.travis.yml +5 -0
- package/my_template/node_modules/graceful-readlink/LICENSE +22 -0
- package/my_template/node_modules/graceful-readlink/README.md +17 -0
- package/my_template/node_modules/graceful-readlink/index.js +12 -0
- package/my_template/node_modules/graceful-readlink/package.json +18 -0
- package/my_template/node_modules/has-flag/index.js +8 -0
- package/my_template/node_modules/has-flag/license +9 -0
- package/my_template/node_modules/has-flag/package.json +44 -0
- package/my_template/node_modules/has-flag/readme.md +70 -0
- package/my_template/node_modules/hasown/.eslintrc +5 -0
- package/my_template/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/my_template/node_modules/hasown/.nycrc +13 -0
- package/my_template/node_modules/hasown/CHANGELOG.md +20 -0
- package/my_template/node_modules/hasown/LICENSE +21 -0
- package/my_template/node_modules/hasown/README.md +40 -0
- package/my_template/node_modules/hasown/index.d.ts +3 -0
- package/my_template/node_modules/hasown/index.d.ts.map +1 -0
- package/my_template/node_modules/hasown/index.js +8 -0
- package/my_template/node_modules/hasown/package.json +91 -0
- package/my_template/node_modules/hasown/tsconfig.json +49 -0
- package/my_template/node_modules/image-size/LICENSE +9 -0
- package/my_template/node_modules/image-size/Readme.md +88 -0
- package/my_template/node_modules/image-size/bin/image-size.js +36 -0
- package/my_template/node_modules/image-size/lib/detector.js +19 -0
- package/my_template/node_modules/image-size/lib/index.js +105 -0
- package/my_template/node_modules/image-size/lib/readUInt.js +11 -0
- package/my_template/node_modules/image-size/lib/types/bmp.js +17 -0
- package/my_template/node_modules/image-size/lib/types/dds.js +18 -0
- package/my_template/node_modules/image-size/lib/types/gif.js +19 -0
- package/my_template/node_modules/image-size/lib/types/jpg.js +62 -0
- package/my_template/node_modules/image-size/lib/types/png.js +36 -0
- package/my_template/node_modules/image-size/lib/types/psd.js +17 -0
- package/my_template/node_modules/image-size/lib/types/svg.js +78 -0
- package/my_template/node_modules/image-size/lib/types/tiff.js +118 -0
- package/my_template/node_modules/image-size/lib/types/webp.js +69 -0
- package/my_template/node_modules/image-size/lib/types.js +13 -0
- package/my_template/node_modules/image-size/package.json +49 -0
- package/my_template/node_modules/is-core-module/.eslintrc +18 -0
- package/my_template/node_modules/is-core-module/.nycrc +9 -0
- package/my_template/node_modules/is-core-module/CHANGELOG.md +180 -0
- package/my_template/node_modules/is-core-module/LICENSE +20 -0
- package/my_template/node_modules/is-core-module/README.md +40 -0
- package/my_template/node_modules/is-core-module/core.json +158 -0
- package/my_template/node_modules/is-core-module/index.js +69 -0
- package/my_template/node_modules/is-core-module/package.json +73 -0
- package/my_template/node_modules/is-core-module/test/index.js +133 -0
- package/my_template/node_modules/is-module/README.md +41 -0
- package/my_template/node_modules/is-module/component.json +11 -0
- package/my_template/node_modules/is-module/index.js +11 -0
- package/my_template/node_modules/is-module/package.json +20 -0
- package/my_template/node_modules/is-what/.babelrc +3 -0
- package/my_template/node_modules/is-what/.eslintignore +9 -0
- package/my_template/node_modules/is-what/.eslintrc.js +18 -0
- package/my_template/node_modules/is-what/.github/FUNDING.yml +12 -0
- package/my_template/node_modules/is-what/.prettierrc +9 -0
- package/my_template/node_modules/is-what/.vscode/settings.json +9 -0
- package/my_template/node_modules/is-what/LICENSE +21 -0
- package/my_template/node_modules/is-what/README.md +191 -0
- package/my_template/node_modules/is-what/build.js +60 -0
- package/my_template/node_modules/is-what/dist/index.cjs.js +364 -0
- package/my_template/node_modules/is-what/dist/index.esm.js +327 -0
- package/my_template/node_modules/is-what/package.json +86 -0
- package/my_template/node_modules/is-what/src/index.ts +395 -0
- package/my_template/node_modules/is-what/test/ava.ts +376 -0
- package/my_template/node_modules/is-what/test/index.test.js +15 -0
- package/my_template/node_modules/is-what/tsconfig.json +11 -0
- package/my_template/node_modules/is-what/types/index.d.ts +253 -0
- package/my_template/node_modules/jest-worker/LICENSE +21 -0
- package/my_template/node_modules/jest-worker/README.md +215 -0
- package/my_template/node_modules/jest-worker/build/Farm.d.ts +27 -0
- package/my_template/node_modules/jest-worker/build/Farm.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/Farm.js +179 -0
- package/my_template/node_modules/jest-worker/build/WorkerPool.d.ts +14 -0
- package/my_template/node_modules/jest-worker/build/WorkerPool.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/WorkerPool.js +49 -0
- package/my_template/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts +22 -0
- package/my_template/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/base/BaseWorkerPool.js +134 -0
- package/my_template/node_modules/jest-worker/build/index.d.ts +46 -0
- package/my_template/node_modules/jest-worker/build/index.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/index.js +184 -0
- package/my_template/node_modules/jest-worker/build/types.d.ts +98 -0
- package/my_template/node_modules/jest-worker/build/types.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/types.js +43 -0
- package/my_template/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts +47 -0
- package/my_template/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/workers/ChildProcessWorker.js +310 -0
- package/my_template/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts +29 -0
- package/my_template/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/workers/NodeThreadsWorker.js +289 -0
- package/my_template/node_modules/jest-worker/build/workers/processChild.d.ts +8 -0
- package/my_template/node_modules/jest-worker/build/workers/processChild.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/workers/processChild.js +166 -0
- package/my_template/node_modules/jest-worker/build/workers/threadChild.d.ts +8 -0
- package/my_template/node_modules/jest-worker/build/workers/threadChild.d.ts.map +1 -0
- package/my_template/node_modules/jest-worker/build/workers/threadChild.js +176 -0
- package/my_template/node_modules/jest-worker/node_modules/supports-color/browser.js +5 -0
- package/my_template/node_modules/jest-worker/node_modules/supports-color/index.js +138 -0
- package/my_template/node_modules/jest-worker/node_modules/supports-color/license +9 -0
- package/my_template/node_modules/jest-worker/node_modules/supports-color/package.json +53 -0
- package/my_template/node_modules/jest-worker/node_modules/supports-color/readme.md +85 -0
- package/my_template/node_modules/jest-worker/package.json +29 -0
- package/my_template/node_modules/js-tokens/CHANGELOG.md +151 -0
- package/my_template/node_modules/js-tokens/LICENSE +21 -0
- package/my_template/node_modules/js-tokens/README.md +240 -0
- package/my_template/node_modules/js-tokens/index.js +23 -0
- package/my_template/node_modules/js-tokens/package.json +30 -0
- package/my_template/node_modules/less/.eslintignore +5 -0
- package/my_template/node_modules/less/.eslintrc.json +3 -0
- package/my_template/node_modules/less/Gruntfile.js +420 -0
- package/my_template/node_modules/less/README.md +13 -0
- package/my_template/node_modules/less/bin/lessc +633 -0
- package/my_template/node_modules/less/bower.json +22 -0
- package/my_template/node_modules/less/dist/less.js +11275 -0
- package/my_template/node_modules/less/dist/less.min.js +11 -0
- package/my_template/node_modules/less/dist/less.min.js.map +1 -0
- package/my_template/node_modules/less/index.js +1 -0
- package/my_template/node_modules/less/lib/less/constants.js +15 -0
- package/my_template/node_modules/less/lib/less/constants.js.map +1 -0
- package/my_template/node_modules/less/lib/less/contexts.js +171 -0
- package/my_template/node_modules/less/lib/less/contexts.js.map +1 -0
- package/my_template/node_modules/less/lib/less/data/colors.js +153 -0
- package/my_template/node_modules/less/lib/less/data/colors.js.map +1 -0
- package/my_template/node_modules/less/lib/less/data/index.js +9 -0
- package/my_template/node_modules/less/lib/less/data/index.js.map +1 -0
- package/my_template/node_modules/less/lib/less/data/unit-conversions.js +24 -0
- package/my_template/node_modules/less/lib/less/data/unit-conversions.js.map +1 -0
- package/my_template/node_modules/less/lib/less/default-options.js +57 -0
- package/my_template/node_modules/less/lib/less/default-options.js.map +1 -0
- package/my_template/node_modules/less/lib/less/environment/abstract-file-manager.js +122 -0
- package/my_template/node_modules/less/lib/less/environment/abstract-file-manager.js.map +1 -0
- package/my_template/node_modules/less/lib/less/environment/abstract-plugin-loader.js +168 -0
- package/my_template/node_modules/less/lib/less/environment/abstract-plugin-loader.js.map +1 -0
- package/my_template/node_modules/less/lib/less/environment/environment-api.js +28 -0
- package/my_template/node_modules/less/lib/less/environment/environment-api.js.map +1 -0
- package/my_template/node_modules/less/lib/less/environment/environment.js +57 -0
- package/my_template/node_modules/less/lib/less/environment/environment.js.map +1 -0
- package/my_template/node_modules/less/lib/less/environment/file-manager-api.js +106 -0
- package/my_template/node_modules/less/lib/less/environment/file-manager-api.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/boolean.js +21 -0
- package/my_template/node_modules/less/lib/less/functions/boolean.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/color-blending.js +78 -0
- package/my_template/node_modules/less/lib/less/functions/color-blending.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/color.js +404 -0
- package/my_template/node_modules/less/lib/less/functions/color.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/data-uri.js +86 -0
- package/my_template/node_modules/less/lib/less/functions/data-uri.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/default.js +29 -0
- package/my_template/node_modules/less/lib/less/functions/default.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/function-caller.js +66 -0
- package/my_template/node_modules/less/lib/less/functions/function-caller.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/function-registry.js +36 -0
- package/my_template/node_modules/less/lib/less/functions/function-registry.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/index.js +35 -0
- package/my_template/node_modules/less/lib/less/functions/index.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/list.js +136 -0
- package/my_template/node_modules/less/lib/less/functions/list.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/math-helper.js +20 -0
- package/my_template/node_modules/less/lib/less/functions/math-helper.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/math.js +30 -0
- package/my_template/node_modules/less/lib/less/functions/math.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/number.js +98 -0
- package/my_template/node_modules/less/lib/less/functions/number.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/string.js +42 -0
- package/my_template/node_modules/less/lib/less/functions/string.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/svg.js +88 -0
- package/my_template/node_modules/less/lib/less/functions/svg.js.map +1 -0
- package/my_template/node_modules/less/lib/less/functions/types.js +75 -0
- package/my_template/node_modules/less/lib/less/functions/types.js.map +1 -0
- package/my_template/node_modules/less/lib/less/import-manager.js +196 -0
- package/my_template/node_modules/less/lib/less/import-manager.js.map +1 -0
- package/my_template/node_modules/less/lib/less/index.js +130 -0
- package/my_template/node_modules/less/lib/less/index.js.map +1 -0
- package/my_template/node_modules/less/lib/less/less-error.js +162 -0
- package/my_template/node_modules/less/lib/less/less-error.js.map +1 -0
- package/my_template/node_modules/less/lib/less/logger.js +37 -0
- package/my_template/node_modules/less/lib/less/logger.js.map +1 -0
- package/my_template/node_modules/less/lib/less/parse-tree.js +69 -0
- package/my_template/node_modules/less/lib/less/parse-tree.js.map +1 -0
- package/my_template/node_modules/less/lib/less/parse.js +108 -0
- package/my_template/node_modules/less/lib/less/parse.js.map +1 -0
- package/my_template/node_modules/less/lib/less/parser/chunker.js +147 -0
- package/my_template/node_modules/less/lib/less/parser/chunker.js.map +1 -0
- package/my_template/node_modules/less/lib/less/parser/parser-input.js +355 -0
- package/my_template/node_modules/less/lib/less/parser/parser-input.js.map +1 -0
- package/my_template/node_modules/less/lib/less/parser/parser.js +2262 -0
- package/my_template/node_modules/less/lib/less/parser/parser.js.map +1 -0
- package/my_template/node_modules/less/lib/less/plugin-manager.js +158 -0
- package/my_template/node_modules/less/lib/less/plugin-manager.js.map +1 -0
- package/my_template/node_modules/less/lib/less/render.js +64 -0
- package/my_template/node_modules/less/lib/less/render.js.map +1 -0
- package/my_template/node_modules/less/lib/less/source-map-builder.js +72 -0
- package/my_template/node_modules/less/lib/less/source-map-builder.js.map +1 -0
- package/my_template/node_modules/less/lib/less/source-map-output.js +140 -0
- package/my_template/node_modules/less/lib/less/source-map-output.js.map +1 -0
- package/my_template/node_modules/less/lib/less/transform-tree.js +93 -0
- package/my_template/node_modules/less/lib/less/transform-tree.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/anonymous.js +34 -0
- package/my_template/node_modules/less/lib/less/tree/anonymous.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/assignment.js +32 -0
- package/my_template/node_modules/less/lib/less/tree/assignment.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/atrule.js +146 -0
- package/my_template/node_modules/less/lib/less/tree/atrule.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/attribute.js +29 -0
- package/my_template/node_modules/less/lib/less/tree/attribute.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/call.js +104 -0
- package/my_template/node_modules/less/lib/less/tree/call.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/color.js +243 -0
- package/my_template/node_modules/less/lib/less/tree/color.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/combinator.js +29 -0
- package/my_template/node_modules/less/lib/less/tree/combinator.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/comment.js +28 -0
- package/my_template/node_modules/less/lib/less/tree/comment.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/condition.js +41 -0
- package/my_template/node_modules/less/lib/less/tree/condition.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/debug-info.js +37 -0
- package/my_template/node_modules/less/lib/less/tree/debug-info.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/declaration.js +118 -0
- package/my_template/node_modules/less/lib/less/tree/declaration.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/detached-ruleset.js +47 -0
- package/my_template/node_modules/less/lib/less/tree/detached-ruleset.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/dimension.js +159 -0
- package/my_template/node_modules/less/lib/less/tree/dimension.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/element.js +64 -0
- package/my_template/node_modules/less/lib/less/tree/element.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/expression.js +90 -0
- package/my_template/node_modules/less/lib/less/tree/expression.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/extend.js +62 -0
- package/my_template/node_modules/less/lib/less/tree/extend.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/import.js +191 -0
- package/my_template/node_modules/less/lib/less/tree/import.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/index.js +56 -0
- package/my_template/node_modules/less/lib/less/tree/index.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/javascript.js +35 -0
- package/my_template/node_modules/less/lib/less/tree/javascript.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/js-eval-node.js +57 -0
- package/my_template/node_modules/less/lib/less/tree/js-eval-node.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/keyword.js +21 -0
- package/my_template/node_modules/less/lib/less/tree/keyword.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/media.js +152 -0
- package/my_template/node_modules/less/lib/less/tree/media.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/mixin-call.js +194 -0
- package/my_template/node_modules/less/lib/less/tree/mixin-call.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/mixin-definition.js +233 -0
- package/my_template/node_modules/less/lib/less/tree/mixin-definition.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/namespace-value.js +76 -0
- package/my_template/node_modules/less/lib/less/tree/namespace-value.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/negative.js +25 -0
- package/my_template/node_modules/less/lib/less/tree/negative.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/node.js +166 -0
- package/my_template/node_modules/less/lib/less/tree/node.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/operation.js +77 -0
- package/my_template/node_modules/less/lib/less/tree/operation.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/paren.js +21 -0
- package/my_template/node_modules/less/lib/less/tree/paren.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/property.js +62 -0
- package/my_template/node_modules/less/lib/less/tree/property.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/quoted.js +66 -0
- package/my_template/node_modules/less/lib/less/tree/quoted.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/ruleset.js +786 -0
- package/my_template/node_modules/less/lib/less/tree/ruleset.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/selector.js +126 -0
- package/my_template/node_modules/less/lib/less/tree/selector.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/unicode-descriptor.js +13 -0
- package/my_template/node_modules/less/lib/less/tree/unicode-descriptor.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/unit.js +141 -0
- package/my_template/node_modules/less/lib/less/tree/unit.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/url.js +60 -0
- package/my_template/node_modules/less/lib/less/tree/url.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/value.js +43 -0
- package/my_template/node_modules/less/lib/less/tree/value.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/variable-call.js +44 -0
- package/my_template/node_modules/less/lib/less/tree/variable-call.js.map +1 -0
- package/my_template/node_modules/less/lib/less/tree/variable.js +61 -0
- package/my_template/node_modules/less/lib/less/tree/variable.js.map +1 -0
- package/my_template/node_modules/less/lib/less/utils.js +143 -0
- package/my_template/node_modules/less/lib/less/utils.js.map +1 -0
- package/my_template/node_modules/less/lib/less/visitors/extend-visitor.js +462 -0
- package/my_template/node_modules/less/lib/less/visitors/extend-visitor.js.map +1 -0
- package/my_template/node_modules/less/lib/less/visitors/import-sequencer.js +61 -0
- package/my_template/node_modules/less/lib/less/visitors/import-sequencer.js.map +1 -0
- package/my_template/node_modules/less/lib/less/visitors/import-visitor.js +202 -0
- package/my_template/node_modules/less/lib/less/visitors/import-visitor.js.map +1 -0
- package/my_template/node_modules/less/lib/less/visitors/index.js +20 -0
- package/my_template/node_modules/less/lib/less/visitors/index.js.map +1 -0
- package/my_template/node_modules/less/lib/less/visitors/join-selector-visitor.js +57 -0
- package/my_template/node_modules/less/lib/less/visitors/join-selector-visitor.js.map +1 -0
- package/my_template/node_modules/less/lib/less/visitors/set-tree-visibility-visitor.js +43 -0
- package/my_template/node_modules/less/lib/less/visitors/set-tree-visibility-visitor.js.map +1 -0
- package/my_template/node_modules/less/lib/less/visitors/to-css-visitor.js +321 -0
- package/my_template/node_modules/less/lib/less/visitors/to-css-visitor.js.map +1 -0
- package/my_template/node_modules/less/lib/less/visitors/visitor.js +158 -0
- package/my_template/node_modules/less/lib/less/visitors/visitor.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/add-default-options.js +45 -0
- package/my_template/node_modules/less/lib/less-browser/add-default-options.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/bootstrap.js +64 -0
- package/my_template/node_modules/less/lib/less-browser/bootstrap.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/browser.js +80 -0
- package/my_template/node_modules/less/lib/less-browser/browser.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/cache.js +45 -0
- package/my_template/node_modules/less/lib/less-browser/cache.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/error-reporting.js +183 -0
- package/my_template/node_modules/less/lib/less-browser/error-reporting.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/file-manager.js +122 -0
- package/my_template/node_modules/less/lib/less-browser/file-manager.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/image-size.js +30 -0
- package/my_template/node_modules/less/lib/less-browser/image-size.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/index.js +256 -0
- package/my_template/node_modules/less/lib/less-browser/index.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/log-listener.js +43 -0
- package/my_template/node_modules/less/lib/less-browser/log-listener.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/plugin-loader.js +42 -0
- package/my_template/node_modules/less/lib/less-browser/plugin-loader.js.map +1 -0
- package/my_template/node_modules/less/lib/less-browser/utils.js +29 -0
- package/my_template/node_modules/less/lib/less-browser/utils.js.map +1 -0
- package/my_template/node_modules/less/lib/less-node/environment.js +19 -0
- package/my_template/node_modules/less/lib/less-node/environment.js.map +1 -0
- package/my_template/node_modules/less/lib/less-node/file-manager.js +158 -0
- package/my_template/node_modules/less/lib/less-node/file-manager.js.map +1 -0
- package/my_template/node_modules/less/lib/less-node/fs.js +11 -0
- package/my_template/node_modules/less/lib/less-node/fs.js.map +1 -0
- package/my_template/node_modules/less/lib/less-node/image-size.js +54 -0
- package/my_template/node_modules/less/lib/less-node/image-size.js.map +1 -0
- package/my_template/node_modules/less/lib/less-node/index.js +28 -0
- package/my_template/node_modules/less/lib/less-node/index.js.map +1 -0
- package/my_template/node_modules/less/lib/less-node/lessc-helper.js +92 -0
- package/my_template/node_modules/less/lib/less-node/lessc-helper.js.map +1 -0
- package/my_template/node_modules/less/lib/less-node/plugin-loader.js +73 -0
- package/my_template/node_modules/less/lib/less-node/plugin-loader.js.map +1 -0
- package/my_template/node_modules/less/lib/less-node/url-file-manager.js +68 -0
- package/my_template/node_modules/less/lib/less-node/url-file-manager.js.map +1 -0
- package/my_template/node_modules/less/package.json +133 -0
- package/my_template/node_modules/less/test/.eslintrc.json +9 -0
- package/my_template/node_modules/less/test/README.md +3 -0
- package/my_template/node_modules/less/test/browser/common.js +230 -0
- package/my_template/node_modules/less/test/browser/css/global-vars/simple.css +3 -0
- package/my_template/node_modules/less/test/browser/css/modify-vars/simple.css +8 -0
- package/my_template/node_modules/less/test/browser/css/plugin/plugin.css +3 -0
- package/my_template/node_modules/less/test/browser/css/postProcessor/postProcessor.css +4 -0
- package/my_template/node_modules/less/test/browser/css/relative-urls/urls.css +36 -0
- package/my_template/node_modules/less/test/browser/css/rewrite-urls/urls.css +36 -0
- package/my_template/node_modules/less/test/browser/css/rootpath/urls.css +35 -0
- package/my_template/node_modules/less/test/browser/css/rootpath-relative/urls.css +35 -0
- package/my_template/node_modules/less/test/browser/css/rootpath-rewrite-urls/urls.css +35 -0
- package/my_template/node_modules/less/test/browser/css/urls.css +54 -0
- package/my_template/node_modules/less/test/browser/generator/benchmark.config.js +50 -0
- package/my_template/node_modules/less/test/browser/generator/generate.js +78 -0
- package/my_template/node_modules/less/test/browser/generator/runner.config.js +186 -0
- package/my_template/node_modules/less/test/browser/generator/runner.js +2 -0
- package/my_template/node_modules/less/test/browser/generator/template.js +83 -0
- package/my_template/node_modules/less/test/browser/less/console-errors/test-error.less +3 -0
- package/my_template/node_modules/less/test/browser/less/console-errors/test-error.txt +2 -0
- package/my_template/node_modules/less/test/browser/less/errors/image-height-error.less +3 -0
- package/my_template/node_modules/less/test/browser/less/errors/image-height-error.txt +4 -0
- package/my_template/node_modules/less/test/browser/less/errors/image-size-error.less +3 -0
- package/my_template/node_modules/less/test/browser/less/errors/image-size-error.txt +4 -0
- package/my_template/node_modules/less/test/browser/less/errors/image-width-error.less +3 -0
- package/my_template/node_modules/less/test/browser/less/errors/image-width-error.txt +4 -0
- package/my_template/node_modules/less/test/browser/less/global-vars/simple.less +3 -0
- package/my_template/node_modules/less/test/browser/less/imports/urls.less +4 -0
- package/my_template/node_modules/less/test/browser/less/imports/urls2.less +4 -0
- package/my_template/node_modules/less/test/browser/less/modify-vars/imports/simple2.less +4 -0
- package/my_template/node_modules/less/test/browser/less/modify-vars/simple.less +8 -0
- package/my_template/node_modules/less/test/browser/less/nested-gradient-with-svg-gradient/mixin-consumer.less +5 -0
- package/my_template/node_modules/less/test/browser/less/nested-gradient-with-svg-gradient/svg-gradient-mixin.less +15 -0
- package/my_template/node_modules/less/test/browser/less/plugin/plugin.js +4 -0
- package/my_template/node_modules/less/test/browser/less/plugin/plugin.less +4 -0
- package/my_template/node_modules/less/test/browser/less/postProcessor/postProcessor.less +4 -0
- package/my_template/node_modules/less/test/browser/less/relative-urls/urls.less +34 -0
- package/my_template/node_modules/less/test/browser/less/rewrite-urls/urls.less +34 -0
- package/my_template/node_modules/less/test/browser/less/rootpath/urls.less +33 -0
- package/my_template/node_modules/less/test/browser/less/rootpath-relative/urls.less +33 -0
- package/my_template/node_modules/less/test/browser/less/rootpath-rewrite-urls/urls.less +33 -0
- package/my_template/node_modules/less/test/browser/less/urls.less +62 -0
- package/my_template/node_modules/less/test/browser/runner-VisitorPlugin-options.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-VisitorPlugin.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-browser-options.js +51 -0
- package/my_template/node_modules/less/test/browser/runner-browser-spec.js +12 -0
- package/my_template/node_modules/less/test/browser/runner-console-errors.js +5 -0
- package/my_template/node_modules/less/test/browser/runner-errors-options.js +6 -0
- package/my_template/node_modules/less/test/browser/runner-errors-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-filemanagerPlugin-options.js +5 -0
- package/my_template/node_modules/less/test/browser/runner-filemanagerPlugin.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-global-vars-options.js +7 -0
- package/my_template/node_modules/less/test/browser/runner-global-vars-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-legacy-options.js +6 -0
- package/my_template/node_modules/less/test/browser/runner-legacy-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-main-options.js +17 -0
- package/my_template/node_modules/less/test/browser/runner-main-spec.js +7 -0
- package/my_template/node_modules/less/test/browser/runner-modify-vars-options.js +5 -0
- package/my_template/node_modules/less/test/browser/runner-modify-vars-spec.js +33 -0
- package/my_template/node_modules/less/test/browser/runner-no-js-errors-options.js +4 -0
- package/my_template/node_modules/less/test/browser/runner-no-js-errors-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-postProcessorPlugin-options.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-postProcessorPlugin.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-preProcessorPlugin-options.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-preProcessorPlugin.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-production-options.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-production-spec.js +5 -0
- package/my_template/node_modules/less/test/browser/runner-relative-urls-options.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-relative-urls-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-rewrite-urls-options.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-rewrite-urls-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-rootpath-options.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-rootpath-relative-options.js +4 -0
- package/my_template/node_modules/less/test/browser/runner-rootpath-relative-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-rootpath-rewrite-urls-options.js +4 -0
- package/my_template/node_modules/less/test/browser/runner-rootpath-rewrite-urls-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-rootpath-spec.js +3 -0
- package/my_template/node_modules/less/test/browser/runner-strict-units-options.js +5 -0
- package/my_template/node_modules/less/test/browser/runner-strict-units-spec.js +3 -0
- package/my_template/node_modules/less/test/index.js +89 -0
- package/my_template/node_modules/less/test/less-test.js +535 -0
- package/my_template/node_modules/less/test/modify-vars.js +28 -0
- package/my_template/node_modules/less/test/plugins/filemanager/index.js +19 -0
- package/my_template/node_modules/less/test/plugins/postprocess/index.js +14 -0
- package/my_template/node_modules/less/test/plugins/preprocess/index.js +19 -0
- package/my_template/node_modules/less/test/plugins/visitor/index.js +24 -0
- package/my_template/node_modules/less/test/sourcemaps/basic.json +1 -0
- package/my_template/node_modules/less/test/sourcemaps/custom-props.json +1 -0
- package/my_template/node_modules/less/test/sourcemaps/index.html +17 -0
- package/my_template/node_modules/less/test/sourcemaps-disable-annotation/basic.json +1 -0
- package/my_template/node_modules/less/test/test-es6.ts +17 -0
- package/my_template/node_modules/less/tsconfig.json +13 -0
- package/my_template/node_modules/less-plugin-clean-css/LICENSE +201 -0
- package/my_template/node_modules/less-plugin-clean-css/README.md +33 -0
- package/my_template/node_modules/less-plugin-clean-css/lib/clean-css-processor.js +63 -0
- package/my_template/node_modules/less-plugin-clean-css/lib/index.js +23 -0
- package/my_template/node_modules/less-plugin-clean-css/lib/parse-options.js +61 -0
- package/my_template/node_modules/less-plugin-clean-css/lib/usage.js +19 -0
- package/my_template/node_modules/less-plugin-clean-css/package.json +39 -0
- package/my_template/node_modules/make-dir/index.d.ts +39 -0
- package/my_template/node_modules/make-dir/index.js +139 -0
- package/my_template/node_modules/make-dir/license +9 -0
- package/my_template/node_modules/make-dir/package.json +59 -0
- package/my_template/node_modules/make-dir/readme.md +123 -0
- package/my_template/node_modules/merge-stream/LICENSE +21 -0
- package/my_template/node_modules/merge-stream/README.md +78 -0
- package/my_template/node_modules/merge-stream/index.js +41 -0
- package/my_template/node_modules/merge-stream/package.json +19 -0
- package/my_template/node_modules/mime/CHANGELOG.md +164 -0
- package/my_template/node_modules/mime/LICENSE +21 -0
- package/my_template/node_modules/mime/README.md +90 -0
- package/my_template/node_modules/mime/cli.js +8 -0
- package/my_template/node_modules/mime/mime.js +108 -0
- package/my_template/node_modules/mime/package.json +44 -0
- package/my_template/node_modules/mime/src/build.js +53 -0
- package/my_template/node_modules/mime/src/test.js +60 -0
- package/my_template/node_modules/mime/types.json +1 -0
- package/my_template/node_modules/native-request/README.md +184 -0
- package/my_template/node_modules/native-request/commons/jsonToParameter.js +14 -0
- package/my_template/node_modules/native-request/index.js +65 -0
- package/my_template/node_modules/native-request/lib/Request.js +144 -0
- package/my_template/node_modules/native-request/package.json +45 -0
- package/my_template/node_modules/native-request/test/express.get.cookies.js +58 -0
- package/my_template/node_modules/native-request/test/express.get.js +146 -0
- package/my_template/node_modules/native-request/test/express.post.cookies.js +59 -0
- package/my_template/node_modules/native-request/test/express.post.js +148 -0
- package/my_template/node_modules/native-request/test/get.cookies.js +72 -0
- package/my_template/node_modules/native-request/test/get.js +140 -0
- package/my_template/node_modules/native-request/test/post.cookies.js +72 -0
- package/my_template/node_modules/native-request/test/post.js +155 -0
- package/my_template/node_modules/path-parse/LICENSE +21 -0
- package/my_template/node_modules/path-parse/README.md +42 -0
- package/my_template/node_modules/path-parse/index.js +75 -0
- package/my_template/node_modules/path-parse/package.json +33 -0
- package/my_template/node_modules/pify/index.js +68 -0
- package/my_template/node_modules/pify/license +9 -0
- package/my_template/node_modules/pify/package.json +51 -0
- package/my_template/node_modules/pify/readme.md +145 -0
- package/my_template/node_modules/prr/.jshintrc +61 -0
- package/my_template/node_modules/prr/.travis.yml +10 -0
- package/my_template/node_modules/prr/LICENSE.md +11 -0
- package/my_template/node_modules/prr/README.md +47 -0
- package/my_template/node_modules/prr/package.json +26 -0
- package/my_template/node_modules/prr/prr.js +63 -0
- package/my_template/node_modules/prr/test.js +169 -0
- package/my_template/node_modules/resolve/.editorconfig +37 -0
- package/my_template/node_modules/resolve/.eslintrc +65 -0
- package/my_template/node_modules/resolve/.github/FUNDING.yml +12 -0
- package/my_template/node_modules/resolve/LICENSE +21 -0
- package/my_template/node_modules/resolve/SECURITY.md +3 -0
- package/my_template/node_modules/resolve/async.js +3 -0
- package/my_template/node_modules/resolve/bin/resolve +50 -0
- package/my_template/node_modules/resolve/example/async.js +5 -0
- package/my_template/node_modules/resolve/example/sync.js +3 -0
- package/my_template/node_modules/resolve/index.js +6 -0
- package/my_template/node_modules/resolve/lib/async.js +329 -0
- package/my_template/node_modules/resolve/lib/caller.js +8 -0
- package/my_template/node_modules/resolve/lib/core.js +12 -0
- package/my_template/node_modules/resolve/lib/core.json +158 -0
- package/my_template/node_modules/resolve/lib/homedir.js +24 -0
- package/my_template/node_modules/resolve/lib/is-core.js +5 -0
- package/my_template/node_modules/resolve/lib/node-modules-paths.js +42 -0
- package/my_template/node_modules/resolve/lib/normalize-options.js +10 -0
- package/my_template/node_modules/resolve/lib/sync.js +208 -0
- package/my_template/node_modules/resolve/package.json +72 -0
- package/my_template/node_modules/resolve/readme.markdown +301 -0
- package/my_template/node_modules/resolve/sync.js +3 -0
- package/my_template/node_modules/resolve/test/core.js +88 -0
- package/my_template/node_modules/resolve/test/dotdot/abc/index.js +2 -0
- package/my_template/node_modules/resolve/test/dotdot/index.js +1 -0
- package/my_template/node_modules/resolve/test/dotdot.js +29 -0
- package/my_template/node_modules/resolve/test/faulty_basedir.js +29 -0
- package/my_template/node_modules/resolve/test/filter.js +34 -0
- package/my_template/node_modules/resolve/test/filter_sync.js +33 -0
- package/my_template/node_modules/resolve/test/home_paths.js +127 -0
- package/my_template/node_modules/resolve/test/home_paths_sync.js +114 -0
- package/my_template/node_modules/resolve/test/mock.js +315 -0
- package/my_template/node_modules/resolve/test/mock_sync.js +214 -0
- package/my_template/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +1 -0
- package/my_template/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +1 -0
- package/my_template/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +1 -0
- package/my_template/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +3 -0
- package/my_template/node_modules/resolve/test/module_dir.js +56 -0
- package/my_template/node_modules/resolve/test/node-modules-paths.js +143 -0
- package/my_template/node_modules/resolve/test/node_path/x/aaa/index.js +1 -0
- package/my_template/node_modules/resolve/test/node_path/x/ccc/index.js +1 -0
- package/my_template/node_modules/resolve/test/node_path/y/bbb/index.js +1 -0
- package/my_template/node_modules/resolve/test/node_path/y/ccc/index.js +1 -0
- package/my_template/node_modules/resolve/test/node_path.js +70 -0
- package/my_template/node_modules/resolve/test/nonstring.js +9 -0
- package/my_template/node_modules/resolve/test/pathfilter/deep_ref/main.js +0 -0
- package/my_template/node_modules/resolve/test/pathfilter.js +75 -0
- package/my_template/node_modules/resolve/test/precedence/aaa/index.js +1 -0
- package/my_template/node_modules/resolve/test/precedence/aaa/main.js +1 -0
- package/my_template/node_modules/resolve/test/precedence/aaa.js +1 -0
- package/my_template/node_modules/resolve/test/precedence/bbb/main.js +1 -0
- package/my_template/node_modules/resolve/test/precedence/bbb.js +1 -0
- package/my_template/node_modules/resolve/test/precedence.js +23 -0
- package/my_template/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/baz/package.json +4 -0
- package/my_template/node_modules/resolve/test/resolver/baz/quux.js +1 -0
- package/my_template/node_modules/resolve/test/resolver/browser_field/a.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/browser_field/b.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/browser_field/package.json +5 -0
- package/my_template/node_modules/resolve/test/resolver/cup.coffee +1 -0
- package/my_template/node_modules/resolve/test/resolver/dot_main/index.js +1 -0
- package/my_template/node_modules/resolve/test/resolver/dot_main/package.json +3 -0
- package/my_template/node_modules/resolve/test/resolver/dot_slash_main/index.js +1 -0
- package/my_template/node_modules/resolve/test/resolver/dot_slash_main/package.json +3 -0
- package/my_template/node_modules/resolve/test/resolver/false_main/index.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/false_main/package.json +4 -0
- package/my_template/node_modules/resolve/test/resolver/foo.js +1 -0
- package/my_template/node_modules/resolve/test/resolver/incorrect_main/index.js +2 -0
- package/my_template/node_modules/resolve/test/resolver/incorrect_main/package.json +3 -0
- package/my_template/node_modules/resolve/test/resolver/invalid_main/package.json +7 -0
- package/my_template/node_modules/resolve/test/resolver/mug.coffee +0 -0
- package/my_template/node_modules/resolve/test/resolver/mug.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/multirepo/lerna.json +6 -0
- package/my_template/node_modules/resolve/test/resolver/multirepo/package.json +20 -0
- package/my_template/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +35 -0
- package/my_template/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +14 -0
- package/my_template/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +14 -0
- package/my_template/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js +26 -0
- package/my_template/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +15 -0
- package/my_template/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js +12 -0
- package/my_template/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/quux/foo/index.js +1 -0
- package/my_template/node_modules/resolve/test/resolver/same_names/foo/index.js +1 -0
- package/my_template/node_modules/resolve/test/resolver/same_names/foo.js +1 -0
- package/my_template/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js +0 -0
- package/my_template/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep +0 -0
- package/my_template/node_modules/resolve/test/resolver/symlinked/package/bar.js +1 -0
- package/my_template/node_modules/resolve/test/resolver/symlinked/package/package.json +3 -0
- package/my_template/node_modules/resolve/test/resolver/without_basedir/main.js +5 -0
- package/my_template/node_modules/resolve/test/resolver.js +597 -0
- package/my_template/node_modules/resolve/test/resolver_sync.js +730 -0
- package/my_template/node_modules/resolve/test/shadowed_core/node_modules/util/index.js +0 -0
- package/my_template/node_modules/resolve/test/shadowed_core.js +54 -0
- package/my_template/node_modules/resolve/test/subdirs.js +13 -0
- package/my_template/node_modules/resolve/test/symlinks.js +176 -0
- package/my_template/node_modules/rollup/CHANGELOG.md +3084 -0
- package/my_template/node_modules/rollup/LICENSE.md +578 -0
- package/my_template/node_modules/rollup/README.md +138 -0
- package/my_template/node_modules/rollup/dist/bin/rollup +1457 -0
- package/my_template/node_modules/rollup/dist/rollup.browser.es.js +25 -0
- package/my_template/node_modules/rollup/dist/rollup.browser.js +26 -0
- package/my_template/node_modules/rollup/dist/rollup.d.ts +656 -0
- package/my_template/node_modules/rollup/dist/rollup.es.js +17493 -0
- package/my_template/node_modules/rollup/dist/rollup.js +29 -0
- package/my_template/node_modules/rollup/dist/shared/index.js +321 -0
- package/my_template/node_modules/rollup/dist/shared/node-entry.js +17504 -0
- package/my_template/node_modules/rollup/package.json +139 -0
- package/my_template/node_modules/rollup-plugin-node-resolve/CHANGELOG.md +195 -0
- package/my_template/node_modules/rollup-plugin-node-resolve/README.md +135 -0
- package/my_template/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js +425 -0
- package/my_template/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.es.js +421 -0
- package/my_template/node_modules/rollup-plugin-node-resolve/index.d.ts +100 -0
- package/my_template/node_modules/rollup-plugin-node-resolve/package.json +60 -0
- package/my_template/node_modules/rollup-plugin-node-resolve/src/index.js +358 -0
- package/my_template/node_modules/rollup-plugin-uglify/LICENSE +20 -0
- package/my_template/node_modules/rollup-plugin-uglify/README.md +84 -0
- package/my_template/node_modules/rollup-plugin-uglify/index.js +51 -0
- package/my_template/node_modules/rollup-plugin-uglify/package.json +43 -0
- package/my_template/node_modules/rollup-plugin-uglify/transform.js +13 -0
- package/my_template/node_modules/rollup-pluginutils/CHANGELOG.md +125 -0
- package/my_template/node_modules/rollup-pluginutils/README.md +169 -0
- package/my_template/node_modules/rollup-pluginutils/dist/pluginutils.cjs.js +3292 -0
- package/my_template/node_modules/rollup-pluginutils/dist/pluginutils.d.ts +39 -0
- package/my_template/node_modules/rollup-pluginutils/dist/pluginutils.es.js +3280 -0
- package/my_template/node_modules/rollup-pluginutils/package.json +57 -0
- package/my_template/node_modules/rollup-pluginutils/src/addExtension.ts +9 -0
- package/my_template/node_modules/rollup-pluginutils/src/attachScopes.ts +125 -0
- package/my_template/node_modules/rollup-pluginutils/src/createFilter.ts +52 -0
- package/my_template/node_modules/rollup-pluginutils/src/dataToEsm.ts +92 -0
- package/my_template/node_modules/rollup-pluginutils/src/extractAssignedNames.ts +46 -0
- package/my_template/node_modules/rollup-pluginutils/src/index.ts +6 -0
- package/my_template/node_modules/rollup-pluginutils/src/makeLegalIdentifier.ts +21 -0
- package/my_template/node_modules/rollup-pluginutils/src/pluginutils.d.ts +39 -0
- package/my_template/node_modules/rollup-pluginutils/src/utils/ensureArray.ts +5 -0
- package/my_template/node_modules/semver/LICENSE +15 -0
- package/my_template/node_modules/semver/README.md +412 -0
- package/my_template/node_modules/semver/bin/semver +160 -0
- package/my_template/node_modules/semver/package.json +38 -0
- package/my_template/node_modules/semver/range.bnf +16 -0
- package/my_template/node_modules/semver/semver.js +1525 -0
- package/my_template/node_modules/serialize-javascript/LICENSE +27 -0
- package/my_template/node_modules/serialize-javascript/README.md +143 -0
- package/my_template/node_modules/serialize-javascript/index.js +210 -0
- package/my_template/node_modules/serialize-javascript/package.json +33 -0
- package/my_template/node_modules/source-map/CHANGELOG.md +301 -0
- package/my_template/node_modules/source-map/LICENSE +28 -0
- package/my_template/node_modules/source-map/README.md +742 -0
- package/my_template/node_modules/source-map/dist/source-map.debug.js +3234 -0
- package/my_template/node_modules/source-map/dist/source-map.js +3233 -0
- package/my_template/node_modules/source-map/dist/source-map.min.js +2 -0
- package/my_template/node_modules/source-map/dist/source-map.min.js.map +1 -0
- package/my_template/node_modules/source-map/lib/array-set.js +121 -0
- package/my_template/node_modules/source-map/lib/base64-vlq.js +140 -0
- package/my_template/node_modules/source-map/lib/base64.js +67 -0
- package/my_template/node_modules/source-map/lib/binary-search.js +111 -0
- package/my_template/node_modules/source-map/lib/mapping-list.js +79 -0
- package/my_template/node_modules/source-map/lib/quick-sort.js +114 -0
- package/my_template/node_modules/source-map/lib/source-map-consumer.js +1145 -0
- package/my_template/node_modules/source-map/lib/source-map-generator.js +425 -0
- package/my_template/node_modules/source-map/lib/source-node.js +413 -0
- package/my_template/node_modules/source-map/lib/util.js +488 -0
- package/my_template/node_modules/source-map/package.json +73 -0
- package/my_template/node_modules/source-map/source-map.d.ts +98 -0
- package/my_template/node_modules/source-map/source-map.js +8 -0
- package/my_template/node_modules/supports-color/browser.js +5 -0
- package/my_template/node_modules/supports-color/index.js +131 -0
- package/my_template/node_modules/supports-color/license +9 -0
- package/my_template/node_modules/supports-color/package.json +53 -0
- package/my_template/node_modules/supports-color/readme.md +66 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/.eslintrc +14 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml +12 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/.nycrc +9 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md +22 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/LICENSE +21 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/README.md +42 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/browser.js +3 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/index.js +9 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/package.json +70 -0
- package/my_template/node_modules/supports-preserve-symlinks-flag/test/index.js +29 -0
- package/my_template/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/my_template/node_modules/tslib/LICENSE.txt +12 -0
- package/my_template/node_modules/tslib/README.md +142 -0
- package/my_template/node_modules/tslib/modules/index.js +51 -0
- package/my_template/node_modules/tslib/modules/package.json +3 -0
- package/my_template/node_modules/tslib/package.json +37 -0
- package/my_template/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js +23 -0
- package/my_template/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json +6 -0
- package/my_template/node_modules/tslib/tslib.d.ts +37 -0
- package/my_template/node_modules/tslib/tslib.es6.html +1 -0
- package/my_template/node_modules/tslib/tslib.es6.js +218 -0
- package/my_template/node_modules/tslib/tslib.html +1 -0
- package/my_template/node_modules/tslib/tslib.js +284 -0
- package/my_template/node_modules/uglify-js/LICENSE +29 -0
- package/my_template/node_modules/uglify-js/README.md +1478 -0
- package/my_template/node_modules/uglify-js/bin/uglifyjs +605 -0
- package/my_template/node_modules/uglify-js/lib/ast.js +2356 -0
- package/my_template/node_modules/uglify-js/lib/compress.js +14241 -0
- package/my_template/node_modules/uglify-js/lib/minify.js +276 -0
- package/my_template/node_modules/uglify-js/lib/mozilla-ast.js +1310 -0
- package/my_template/node_modules/uglify-js/lib/output.js +1956 -0
- package/my_template/node_modules/uglify-js/lib/parse.js +2585 -0
- package/my_template/node_modules/uglify-js/lib/propmangle.js +328 -0
- package/my_template/node_modules/uglify-js/lib/scope.js +866 -0
- package/my_template/node_modules/uglify-js/lib/sourcemap.js +195 -0
- package/my_template/node_modules/uglify-js/lib/transform.js +250 -0
- package/my_template/node_modules/uglify-js/lib/utils.js +287 -0
- package/my_template/node_modules/uglify-js/package.json +56 -0
- package/my_template/node_modules/uglify-js/tools/domprops.html +456 -0
- package/my_template/node_modules/uglify-js/tools/domprops.json +8325 -0
- package/my_template/node_modules/uglify-js/tools/exports.js +8 -0
- package/my_template/node_modules/uglify-js/tools/node.js +110 -0
- package/my_template/node_modules/uglify-js/tools/tty.js +22 -0
- package/my_template/node_modules/undici-types/README.md +6 -0
- package/my_template/node_modules/undici-types/agent.d.ts +31 -0
- package/my_template/node_modules/undici-types/api.d.ts +43 -0
- package/my_template/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/my_template/node_modules/undici-types/cache.d.ts +36 -0
- package/my_template/node_modules/undici-types/client.d.ts +97 -0
- package/my_template/node_modules/undici-types/connector.d.ts +34 -0
- package/my_template/node_modules/undici-types/content-type.d.ts +21 -0
- package/my_template/node_modules/undici-types/cookies.d.ts +28 -0
- package/my_template/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/my_template/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/my_template/node_modules/undici-types/errors.d.ts +128 -0
- package/my_template/node_modules/undici-types/fetch.d.ts +209 -0
- package/my_template/node_modules/undici-types/file.d.ts +39 -0
- package/my_template/node_modules/undici-types/filereader.d.ts +54 -0
- package/my_template/node_modules/undici-types/formdata.d.ts +108 -0
- package/my_template/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/my_template/node_modules/undici-types/global-origin.d.ts +7 -0
- package/my_template/node_modules/undici-types/handlers.d.ts +9 -0
- package/my_template/node_modules/undici-types/header.d.ts +4 -0
- package/my_template/node_modules/undici-types/index.d.ts +63 -0
- package/my_template/node_modules/undici-types/interceptors.d.ts +5 -0
- package/my_template/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/my_template/node_modules/undici-types/mock-client.d.ts +25 -0
- package/my_template/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/my_template/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/my_template/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/my_template/node_modules/undici-types/package.json +55 -0
- package/my_template/node_modules/undici-types/patch.d.ts +71 -0
- package/my_template/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/my_template/node_modules/undici-types/pool.d.ts +28 -0
- package/my_template/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/my_template/node_modules/undici-types/readable.d.ts +61 -0
- package/my_template/node_modules/undici-types/webidl.d.ts +220 -0
- package/my_template/node_modules/undici-types/websocket.d.ts +131 -0
- package/package.json +1 -1
- package/server/comms_js.js +1 -0
- package/server/index.js +3 -3
- package/site/images/icon-add-folder.svg +5 -0
- package/site/images/icon-all-projects.svg +3 -0
- package/site/images/icon-folder.svg +3 -0
- package/site/images/icon-search.svg +5 -0
- package/site/images/icon-shared-projects.svg +10 -0
- package/site/images/onboarding-tour-story-duplicate-slide.png +0 -0
- package/site/images/onboarding-tour-white-story.gif +0 -0
- package/site/images/story-onboarding-tour-legend.gif +0 -0
- package/site/script.js +2 -2
- package/site/sdk.css +2 -2
- package/tsconfig.json +10 -0
- package/utils/state.js +0 -152
|
@@ -0,0 +1,2262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
var less_error_1 = __importDefault(require("../less-error"));
|
|
26
|
+
var tree_1 = __importDefault(require("../tree"));
|
|
27
|
+
var visitors_1 = __importDefault(require("../visitors"));
|
|
28
|
+
var parser_input_1 = __importDefault(require("./parser-input"));
|
|
29
|
+
var utils = __importStar(require("../utils"));
|
|
30
|
+
var function_registry_1 = __importDefault(require("../functions/function-registry"));
|
|
31
|
+
//
|
|
32
|
+
// less.js - parser
|
|
33
|
+
//
|
|
34
|
+
// A relatively straight-forward predictive parser.
|
|
35
|
+
// There is no tokenization/lexing stage, the input is parsed
|
|
36
|
+
// in one sweep.
|
|
37
|
+
//
|
|
38
|
+
// To make the parser fast enough to run in the browser, several
|
|
39
|
+
// optimization had to be made:
|
|
40
|
+
//
|
|
41
|
+
// - Matching and slicing on a huge input is often cause of slowdowns.
|
|
42
|
+
// The solution is to chunkify the input into smaller strings.
|
|
43
|
+
// The chunks are stored in the `chunks` var,
|
|
44
|
+
// `j` holds the current chunk index, and `currentPos` holds
|
|
45
|
+
// the index of the current chunk in relation to `input`.
|
|
46
|
+
// This gives us an almost 4x speed-up.
|
|
47
|
+
//
|
|
48
|
+
// - In many cases, we don't need to match individual tokens;
|
|
49
|
+
// for example, if a value doesn't hold any variables, operations
|
|
50
|
+
// or dynamic references, the parser can effectively 'skip' it,
|
|
51
|
+
// treating it as a literal.
|
|
52
|
+
// An example would be '1px solid #000' - which evaluates to itself,
|
|
53
|
+
// we don't need to know what the individual components are.
|
|
54
|
+
// The drawback, of course is that you don't get the benefits of
|
|
55
|
+
// syntax-checking on the CSS. This gives us a 50% speed-up in the parser,
|
|
56
|
+
// and a smaller speed-up in the code-gen.
|
|
57
|
+
//
|
|
58
|
+
//
|
|
59
|
+
// Token matching is done with the `$` function, which either takes
|
|
60
|
+
// a terminal string or regexp, or a non-terminal function to call.
|
|
61
|
+
// It also takes care of moving all the indices forwards.
|
|
62
|
+
//
|
|
63
|
+
var Parser = function Parser(context, imports, fileInfo) {
|
|
64
|
+
var parsers;
|
|
65
|
+
var parserInput = parser_input_1.default();
|
|
66
|
+
function error(msg, type) {
|
|
67
|
+
throw new less_error_1.default({
|
|
68
|
+
index: parserInput.i,
|
|
69
|
+
filename: fileInfo.filename,
|
|
70
|
+
type: type || 'Syntax',
|
|
71
|
+
message: msg
|
|
72
|
+
}, imports);
|
|
73
|
+
}
|
|
74
|
+
function expect(arg, msg) {
|
|
75
|
+
// some older browsers return typeof 'function' for RegExp
|
|
76
|
+
var result = (arg instanceof Function) ? arg.call(parsers) : parserInput.$re(arg);
|
|
77
|
+
if (result) {
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
error(msg || (typeof arg === 'string'
|
|
81
|
+
? "expected '" + arg + "' got '" + parserInput.currentChar() + "'"
|
|
82
|
+
: 'unexpected token'));
|
|
83
|
+
}
|
|
84
|
+
// Specialization of expect()
|
|
85
|
+
function expectChar(arg, msg) {
|
|
86
|
+
if (parserInput.$char(arg)) {
|
|
87
|
+
return arg;
|
|
88
|
+
}
|
|
89
|
+
error(msg || "expected '" + arg + "' got '" + parserInput.currentChar() + "'");
|
|
90
|
+
}
|
|
91
|
+
function getDebugInfo(index) {
|
|
92
|
+
var filename = fileInfo.filename;
|
|
93
|
+
return {
|
|
94
|
+
lineNumber: utils.getLocation(index, parserInput.getInput()).line + 1,
|
|
95
|
+
fileName: filename
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Used after initial parsing to create nodes on the fly
|
|
100
|
+
*
|
|
101
|
+
* @param {String} str - string to parse
|
|
102
|
+
* @param {Array} parseList - array of parsers to run input through e.g. ["value", "important"]
|
|
103
|
+
* @param {Number} currentIndex - start number to begin indexing
|
|
104
|
+
* @param {Object} fileInfo - fileInfo to attach to created nodes
|
|
105
|
+
*/
|
|
106
|
+
function parseNode(str, parseList, currentIndex, fileInfo, callback) {
|
|
107
|
+
var result;
|
|
108
|
+
var returnNodes = [];
|
|
109
|
+
var parser = parserInput;
|
|
110
|
+
try {
|
|
111
|
+
parser.start(str, false, function fail(msg, index) {
|
|
112
|
+
callback({
|
|
113
|
+
message: msg,
|
|
114
|
+
index: index + currentIndex
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
for (var x = 0, p = void 0, i = void 0; (p = parseList[x]); x++) {
|
|
118
|
+
i = parser.i;
|
|
119
|
+
result = parsers[p]();
|
|
120
|
+
if (result) {
|
|
121
|
+
try {
|
|
122
|
+
result._index = i + currentIndex;
|
|
123
|
+
result._fileInfo = fileInfo;
|
|
124
|
+
}
|
|
125
|
+
catch (e) { }
|
|
126
|
+
returnNodes.push(result);
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
returnNodes.push(null);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
var endInfo = parser.end();
|
|
133
|
+
if (endInfo.isFinished) {
|
|
134
|
+
callback(null, returnNodes);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
callback(true, null);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
catch (e) {
|
|
141
|
+
throw new less_error_1.default({
|
|
142
|
+
index: e.index + currentIndex,
|
|
143
|
+
message: e.message
|
|
144
|
+
}, imports, fileInfo.filename);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
//
|
|
148
|
+
// The Parser
|
|
149
|
+
//
|
|
150
|
+
return {
|
|
151
|
+
parserInput: parserInput,
|
|
152
|
+
imports: imports,
|
|
153
|
+
fileInfo: fileInfo,
|
|
154
|
+
parseNode: parseNode,
|
|
155
|
+
//
|
|
156
|
+
// Parse an input string into an abstract syntax tree,
|
|
157
|
+
// @param str A string containing 'less' markup
|
|
158
|
+
// @param callback call `callback` when done.
|
|
159
|
+
// @param [additionalData] An optional map which can contains vars - a map (key, value) of variables to apply
|
|
160
|
+
//
|
|
161
|
+
parse: function (str, callback, additionalData) {
|
|
162
|
+
var root;
|
|
163
|
+
var error = null;
|
|
164
|
+
var globalVars;
|
|
165
|
+
var modifyVars;
|
|
166
|
+
var ignored;
|
|
167
|
+
var preText = '';
|
|
168
|
+
globalVars = (additionalData && additionalData.globalVars) ? Parser.serializeVars(additionalData.globalVars) + "\n" : '';
|
|
169
|
+
modifyVars = (additionalData && additionalData.modifyVars) ? "\n" + Parser.serializeVars(additionalData.modifyVars) : '';
|
|
170
|
+
if (context.pluginManager) {
|
|
171
|
+
var preProcessors = context.pluginManager.getPreProcessors();
|
|
172
|
+
for (var i = 0; i < preProcessors.length; i++) {
|
|
173
|
+
str = preProcessors[i].process(str, { context: context, imports: imports, fileInfo: fileInfo });
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
if (globalVars || (additionalData && additionalData.banner)) {
|
|
177
|
+
preText = ((additionalData && additionalData.banner) ? additionalData.banner : '') + globalVars;
|
|
178
|
+
ignored = imports.contentsIgnoredChars;
|
|
179
|
+
ignored[fileInfo.filename] = ignored[fileInfo.filename] || 0;
|
|
180
|
+
ignored[fileInfo.filename] += preText.length;
|
|
181
|
+
}
|
|
182
|
+
str = str.replace(/\r\n?/g, '\n');
|
|
183
|
+
// Remove potential UTF Byte Order Mark
|
|
184
|
+
str = preText + str.replace(/^\uFEFF/, '') + modifyVars;
|
|
185
|
+
imports.contents[fileInfo.filename] = str;
|
|
186
|
+
// Start with the primary rule.
|
|
187
|
+
// The whole syntax tree is held under a Ruleset node,
|
|
188
|
+
// with the `root` property set to true, so no `{}` are
|
|
189
|
+
// output. The callback is called when the input is parsed.
|
|
190
|
+
try {
|
|
191
|
+
parserInput.start(str, context.chunkInput, function fail(msg, index) {
|
|
192
|
+
throw new less_error_1.default({
|
|
193
|
+
index: index,
|
|
194
|
+
type: 'Parse',
|
|
195
|
+
message: msg,
|
|
196
|
+
filename: fileInfo.filename
|
|
197
|
+
}, imports);
|
|
198
|
+
});
|
|
199
|
+
tree_1.default.Node.prototype.parse = this;
|
|
200
|
+
root = new tree_1.default.Ruleset(null, this.parsers.primary());
|
|
201
|
+
tree_1.default.Node.prototype.rootNode = root;
|
|
202
|
+
root.root = true;
|
|
203
|
+
root.firstRoot = true;
|
|
204
|
+
root.functionRegistry = function_registry_1.default.inherit();
|
|
205
|
+
}
|
|
206
|
+
catch (e) {
|
|
207
|
+
return callback(new less_error_1.default(e, imports, fileInfo.filename));
|
|
208
|
+
}
|
|
209
|
+
// If `i` is smaller than the `input.length - 1`,
|
|
210
|
+
// it means the parser wasn't able to parse the whole
|
|
211
|
+
// string, so we've got a parsing error.
|
|
212
|
+
//
|
|
213
|
+
// We try to extract a \n delimited string,
|
|
214
|
+
// showing the line where the parse error occurred.
|
|
215
|
+
// We split it up into two parts (the part which parsed,
|
|
216
|
+
// and the part which didn't), so we can color them differently.
|
|
217
|
+
var endInfo = parserInput.end();
|
|
218
|
+
if (!endInfo.isFinished) {
|
|
219
|
+
var message = endInfo.furthestPossibleErrorMessage;
|
|
220
|
+
if (!message) {
|
|
221
|
+
message = 'Unrecognised input';
|
|
222
|
+
if (endInfo.furthestChar === '}') {
|
|
223
|
+
message += '. Possibly missing opening \'{\'';
|
|
224
|
+
}
|
|
225
|
+
else if (endInfo.furthestChar === ')') {
|
|
226
|
+
message += '. Possibly missing opening \'(\'';
|
|
227
|
+
}
|
|
228
|
+
else if (endInfo.furthestReachedEnd) {
|
|
229
|
+
message += '. Possibly missing something';
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
error = new less_error_1.default({
|
|
233
|
+
type: 'Parse',
|
|
234
|
+
message: message,
|
|
235
|
+
index: endInfo.furthest,
|
|
236
|
+
filename: fileInfo.filename
|
|
237
|
+
}, imports);
|
|
238
|
+
}
|
|
239
|
+
var finish = function (e) {
|
|
240
|
+
e = error || e || imports.error;
|
|
241
|
+
if (e) {
|
|
242
|
+
if (!(e instanceof less_error_1.default)) {
|
|
243
|
+
e = new less_error_1.default(e, imports, fileInfo.filename);
|
|
244
|
+
}
|
|
245
|
+
return callback(e);
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
return callback(null, root);
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
if (context.processImports !== false) {
|
|
252
|
+
new visitors_1.default.ImportVisitor(imports, finish)
|
|
253
|
+
.run(root);
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
return finish();
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
//
|
|
260
|
+
// Here in, the parsing rules/functions
|
|
261
|
+
//
|
|
262
|
+
// The basic structure of the syntax tree generated is as follows:
|
|
263
|
+
//
|
|
264
|
+
// Ruleset -> Declaration -> Value -> Expression -> Entity
|
|
265
|
+
//
|
|
266
|
+
// Here's some Less code:
|
|
267
|
+
//
|
|
268
|
+
// .class {
|
|
269
|
+
// color: #fff;
|
|
270
|
+
// border: 1px solid #000;
|
|
271
|
+
// width: @w + 4px;
|
|
272
|
+
// > .child {...}
|
|
273
|
+
// }
|
|
274
|
+
//
|
|
275
|
+
// And here's what the parse tree might look like:
|
|
276
|
+
//
|
|
277
|
+
// Ruleset (Selector '.class', [
|
|
278
|
+
// Declaration ("color", Value ([Expression [Color #fff]]))
|
|
279
|
+
// Declaration ("border", Value ([Expression [Dimension 1px][Keyword "solid"][Color #000]]))
|
|
280
|
+
// Declaration ("width", Value ([Expression [Operation " + " [Variable "@w"][Dimension 4px]]]))
|
|
281
|
+
// Ruleset (Selector [Element '>', '.child'], [...])
|
|
282
|
+
// ])
|
|
283
|
+
//
|
|
284
|
+
// In general, most rules will try to parse a token with the `$re()` function, and if the return
|
|
285
|
+
// value is truly, will return a new node, of the relevant type. Sometimes, we need to check
|
|
286
|
+
// first, before parsing, that's when we use `peek()`.
|
|
287
|
+
//
|
|
288
|
+
parsers: parsers = {
|
|
289
|
+
//
|
|
290
|
+
// The `primary` rule is the *entry* and *exit* point of the parser.
|
|
291
|
+
// The rules here can appear at any level of the parse tree.
|
|
292
|
+
//
|
|
293
|
+
// The recursive nature of the grammar is an interplay between the `block`
|
|
294
|
+
// rule, which represents `{ ... }`, the `ruleset` rule, and this `primary` rule,
|
|
295
|
+
// as represented by this simplified grammar:
|
|
296
|
+
//
|
|
297
|
+
// primary → (ruleset | declaration)+
|
|
298
|
+
// ruleset → selector+ block
|
|
299
|
+
// block → '{' primary '}'
|
|
300
|
+
//
|
|
301
|
+
// Only at one point is the primary rule not called from the
|
|
302
|
+
// block rule: at the root level.
|
|
303
|
+
//
|
|
304
|
+
primary: function () {
|
|
305
|
+
var mixin = this.mixin;
|
|
306
|
+
var root = [];
|
|
307
|
+
var node;
|
|
308
|
+
while (true) {
|
|
309
|
+
while (true) {
|
|
310
|
+
node = this.comment();
|
|
311
|
+
if (!node) {
|
|
312
|
+
break;
|
|
313
|
+
}
|
|
314
|
+
root.push(node);
|
|
315
|
+
}
|
|
316
|
+
// always process comments before deciding if finished
|
|
317
|
+
if (parserInput.finished) {
|
|
318
|
+
break;
|
|
319
|
+
}
|
|
320
|
+
if (parserInput.peek('}')) {
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
node = this.extendRule();
|
|
324
|
+
if (node) {
|
|
325
|
+
root = root.concat(node);
|
|
326
|
+
continue;
|
|
327
|
+
}
|
|
328
|
+
node = mixin.definition() || this.declaration() || mixin.call(false, false) ||
|
|
329
|
+
this.ruleset() || this.variableCall() || this.entities.call() || this.atrule();
|
|
330
|
+
if (node) {
|
|
331
|
+
root.push(node);
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
var foundSemiColon = false;
|
|
335
|
+
while (parserInput.$char(';')) {
|
|
336
|
+
foundSemiColon = true;
|
|
337
|
+
}
|
|
338
|
+
if (!foundSemiColon) {
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
return root;
|
|
344
|
+
},
|
|
345
|
+
// comments are collected by the main parsing mechanism and then assigned to nodes
|
|
346
|
+
// where the current structure allows it
|
|
347
|
+
comment: function () {
|
|
348
|
+
if (parserInput.commentStore.length) {
|
|
349
|
+
var comment = parserInput.commentStore.shift();
|
|
350
|
+
return new (tree_1.default.Comment)(comment.text, comment.isLineComment, comment.index, fileInfo);
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
//
|
|
354
|
+
// Entities are tokens which can be found inside an Expression
|
|
355
|
+
//
|
|
356
|
+
entities: {
|
|
357
|
+
mixinLookup: function () {
|
|
358
|
+
return parsers.mixin.call(true, true);
|
|
359
|
+
},
|
|
360
|
+
//
|
|
361
|
+
// A string, which supports escaping " and '
|
|
362
|
+
//
|
|
363
|
+
// "milky way" 'he\'s the one!'
|
|
364
|
+
//
|
|
365
|
+
quoted: function (forceEscaped) {
|
|
366
|
+
var str;
|
|
367
|
+
var index = parserInput.i;
|
|
368
|
+
var isEscaped = false;
|
|
369
|
+
parserInput.save();
|
|
370
|
+
if (parserInput.$char('~')) {
|
|
371
|
+
isEscaped = true;
|
|
372
|
+
}
|
|
373
|
+
else if (forceEscaped) {
|
|
374
|
+
parserInput.restore();
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
str = parserInput.$quoted();
|
|
378
|
+
if (!str) {
|
|
379
|
+
parserInput.restore();
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
parserInput.forget();
|
|
383
|
+
return new (tree_1.default.Quoted)(str.charAt(0), str.substr(1, str.length - 2), isEscaped, index, fileInfo);
|
|
384
|
+
},
|
|
385
|
+
//
|
|
386
|
+
// A catch-all word, such as:
|
|
387
|
+
//
|
|
388
|
+
// black border-collapse
|
|
389
|
+
//
|
|
390
|
+
keyword: function () {
|
|
391
|
+
var k = parserInput.$char('%') || parserInput.$re(/^\[?(?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+\]?/);
|
|
392
|
+
if (k) {
|
|
393
|
+
return tree_1.default.Color.fromKeyword(k) || new (tree_1.default.Keyword)(k);
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
//
|
|
397
|
+
// A function call
|
|
398
|
+
//
|
|
399
|
+
// rgb(255, 0, 255)
|
|
400
|
+
//
|
|
401
|
+
// The arguments are parsed with the `entities.arguments` parser.
|
|
402
|
+
//
|
|
403
|
+
call: function () {
|
|
404
|
+
var name;
|
|
405
|
+
var args;
|
|
406
|
+
var func;
|
|
407
|
+
var index = parserInput.i;
|
|
408
|
+
// http://jsperf.com/case-insensitive-regex-vs-strtolower-then-regex/18
|
|
409
|
+
if (parserInput.peek(/^url\(/i)) {
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
parserInput.save();
|
|
413
|
+
name = parserInput.$re(/^([\w-]+|%|progid:[\w\.]+)\(/);
|
|
414
|
+
if (!name) {
|
|
415
|
+
parserInput.forget();
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
name = name[1];
|
|
419
|
+
func = this.customFuncCall(name);
|
|
420
|
+
if (func) {
|
|
421
|
+
args = func.parse();
|
|
422
|
+
if (args && func.stop) {
|
|
423
|
+
parserInput.forget();
|
|
424
|
+
return args;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
args = this.arguments(args);
|
|
428
|
+
if (!parserInput.$char(')')) {
|
|
429
|
+
parserInput.restore('Could not parse call arguments or missing \')\'');
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
parserInput.forget();
|
|
433
|
+
return new (tree_1.default.Call)(name, args, index, fileInfo);
|
|
434
|
+
},
|
|
435
|
+
//
|
|
436
|
+
// Parsing rules for functions with non-standard args, e.g.:
|
|
437
|
+
//
|
|
438
|
+
// boolean(not(2 > 1))
|
|
439
|
+
//
|
|
440
|
+
// This is a quick prototype, to be modified/improved when
|
|
441
|
+
// more custom-parsed funcs come (e.g. `selector(...)`)
|
|
442
|
+
//
|
|
443
|
+
customFuncCall: function (name) {
|
|
444
|
+
/* Ideally the table is to be moved out of here for faster perf.,
|
|
445
|
+
but it's quite tricky since it relies on all these `parsers`
|
|
446
|
+
and `expect` available only here */
|
|
447
|
+
return {
|
|
448
|
+
alpha: f(parsers.ieAlpha, true),
|
|
449
|
+
boolean: f(condition),
|
|
450
|
+
'if': f(condition)
|
|
451
|
+
}[name.toLowerCase()];
|
|
452
|
+
function f(parse, stop) {
|
|
453
|
+
return {
|
|
454
|
+
parse: parse,
|
|
455
|
+
stop: stop // when true - stop after parse() and return its result,
|
|
456
|
+
// otherwise continue for plain args
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
function condition() {
|
|
460
|
+
return [expect(parsers.condition, 'expected condition')];
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
arguments: function (prevArgs) {
|
|
464
|
+
var argsComma = prevArgs || [];
|
|
465
|
+
var argsSemiColon = [];
|
|
466
|
+
var isSemiColonSeparated;
|
|
467
|
+
var value;
|
|
468
|
+
parserInput.save();
|
|
469
|
+
while (true) {
|
|
470
|
+
if (prevArgs) {
|
|
471
|
+
prevArgs = false;
|
|
472
|
+
}
|
|
473
|
+
else {
|
|
474
|
+
value = parsers.detachedRuleset() || this.assignment() || parsers.expression();
|
|
475
|
+
if (!value) {
|
|
476
|
+
break;
|
|
477
|
+
}
|
|
478
|
+
if (value.value && value.value.length == 1) {
|
|
479
|
+
value = value.value[0];
|
|
480
|
+
}
|
|
481
|
+
argsComma.push(value);
|
|
482
|
+
}
|
|
483
|
+
if (parserInput.$char(',')) {
|
|
484
|
+
continue;
|
|
485
|
+
}
|
|
486
|
+
if (parserInput.$char(';') || isSemiColonSeparated) {
|
|
487
|
+
isSemiColonSeparated = true;
|
|
488
|
+
value = (argsComma.length < 1) ? argsComma[0]
|
|
489
|
+
: new tree_1.default.Value(argsComma);
|
|
490
|
+
argsSemiColon.push(value);
|
|
491
|
+
argsComma = [];
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
parserInput.forget();
|
|
495
|
+
return isSemiColonSeparated ? argsSemiColon : argsComma;
|
|
496
|
+
},
|
|
497
|
+
literal: function () {
|
|
498
|
+
return this.dimension() ||
|
|
499
|
+
this.color() ||
|
|
500
|
+
this.quoted() ||
|
|
501
|
+
this.unicodeDescriptor();
|
|
502
|
+
},
|
|
503
|
+
// Assignments are argument entities for calls.
|
|
504
|
+
// They are present in ie filter properties as shown below.
|
|
505
|
+
//
|
|
506
|
+
// filter: progid:DXImageTransform.Microsoft.Alpha( *opacity=50* )
|
|
507
|
+
//
|
|
508
|
+
assignment: function () {
|
|
509
|
+
var key;
|
|
510
|
+
var value;
|
|
511
|
+
parserInput.save();
|
|
512
|
+
key = parserInput.$re(/^\w+(?=\s?=)/i);
|
|
513
|
+
if (!key) {
|
|
514
|
+
parserInput.restore();
|
|
515
|
+
return;
|
|
516
|
+
}
|
|
517
|
+
if (!parserInput.$char('=')) {
|
|
518
|
+
parserInput.restore();
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
value = parsers.entity();
|
|
522
|
+
if (value) {
|
|
523
|
+
parserInput.forget();
|
|
524
|
+
return new (tree_1.default.Assignment)(key, value);
|
|
525
|
+
}
|
|
526
|
+
else {
|
|
527
|
+
parserInput.restore();
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
//
|
|
531
|
+
// Parse url() tokens
|
|
532
|
+
//
|
|
533
|
+
// We use a specific rule for urls, because they don't really behave like
|
|
534
|
+
// standard function calls. The difference is that the argument doesn't have
|
|
535
|
+
// to be enclosed within a string, so it can't be parsed as an Expression.
|
|
536
|
+
//
|
|
537
|
+
url: function () {
|
|
538
|
+
var value;
|
|
539
|
+
var index = parserInput.i;
|
|
540
|
+
parserInput.autoCommentAbsorb = false;
|
|
541
|
+
if (!parserInput.$str('url(')) {
|
|
542
|
+
parserInput.autoCommentAbsorb = true;
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
value = this.quoted() || this.variable() || this.property() ||
|
|
546
|
+
parserInput.$re(/^(?:(?:\\[\(\)'"])|[^\(\)'"])+/) || '';
|
|
547
|
+
parserInput.autoCommentAbsorb = true;
|
|
548
|
+
expectChar(')');
|
|
549
|
+
return new (tree_1.default.URL)((value.value != null ||
|
|
550
|
+
value instanceof tree_1.default.Variable ||
|
|
551
|
+
value instanceof tree_1.default.Property) ?
|
|
552
|
+
value : new (tree_1.default.Anonymous)(value, index), index, fileInfo);
|
|
553
|
+
},
|
|
554
|
+
//
|
|
555
|
+
// A Variable entity, such as `@fink`, in
|
|
556
|
+
//
|
|
557
|
+
// width: @fink + 2px
|
|
558
|
+
//
|
|
559
|
+
// We use a different parser for variable definitions,
|
|
560
|
+
// see `parsers.variable`.
|
|
561
|
+
//
|
|
562
|
+
variable: function () {
|
|
563
|
+
var ch;
|
|
564
|
+
var name;
|
|
565
|
+
var index = parserInput.i;
|
|
566
|
+
parserInput.save();
|
|
567
|
+
if (parserInput.currentChar() === '@' && (name = parserInput.$re(/^@@?[\w-]+/))) {
|
|
568
|
+
ch = parserInput.currentChar();
|
|
569
|
+
if (ch === '(' || ch === '[' && !parserInput.prevChar().match(/^\s/)) {
|
|
570
|
+
// this may be a VariableCall lookup
|
|
571
|
+
var result = parsers.variableCall(name);
|
|
572
|
+
if (result) {
|
|
573
|
+
parserInput.forget();
|
|
574
|
+
return result;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
parserInput.forget();
|
|
578
|
+
return new (tree_1.default.Variable)(name, index, fileInfo);
|
|
579
|
+
}
|
|
580
|
+
parserInput.restore();
|
|
581
|
+
},
|
|
582
|
+
// A variable entity using the protective {} e.g. @{var}
|
|
583
|
+
variableCurly: function () {
|
|
584
|
+
var curly;
|
|
585
|
+
var index = parserInput.i;
|
|
586
|
+
if (parserInput.currentChar() === '@' && (curly = parserInput.$re(/^@\{([\w-]+)\}/))) {
|
|
587
|
+
return new (tree_1.default.Variable)("@" + curly[1], index, fileInfo);
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
//
|
|
591
|
+
// A Property accessor, such as `$color`, in
|
|
592
|
+
//
|
|
593
|
+
// background-color: $color
|
|
594
|
+
//
|
|
595
|
+
property: function () {
|
|
596
|
+
var name;
|
|
597
|
+
var index = parserInput.i;
|
|
598
|
+
if (parserInput.currentChar() === '$' && (name = parserInput.$re(/^\$[\w-]+/))) {
|
|
599
|
+
return new (tree_1.default.Property)(name, index, fileInfo);
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
// A property entity useing the protective {} e.g. ${prop}
|
|
603
|
+
propertyCurly: function () {
|
|
604
|
+
var curly;
|
|
605
|
+
var index = parserInput.i;
|
|
606
|
+
if (parserInput.currentChar() === '$' && (curly = parserInput.$re(/^\$\{([\w-]+)\}/))) {
|
|
607
|
+
return new (tree_1.default.Property)("$" + curly[1], index, fileInfo);
|
|
608
|
+
}
|
|
609
|
+
},
|
|
610
|
+
//
|
|
611
|
+
// A Hexadecimal color
|
|
612
|
+
//
|
|
613
|
+
// #4F3C2F
|
|
614
|
+
//
|
|
615
|
+
// `rgb` and `hsl` colors are parsed through the `entities.call` parser.
|
|
616
|
+
//
|
|
617
|
+
color: function () {
|
|
618
|
+
var rgb;
|
|
619
|
+
parserInput.save();
|
|
620
|
+
if (parserInput.currentChar() === '#' && (rgb = parserInput.$re(/^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3,4})([\w.#\[])?/))) {
|
|
621
|
+
if (!rgb[2]) {
|
|
622
|
+
parserInput.forget();
|
|
623
|
+
return new (tree_1.default.Color)(rgb[1], undefined, rgb[0]);
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
parserInput.restore();
|
|
627
|
+
},
|
|
628
|
+
colorKeyword: function () {
|
|
629
|
+
parserInput.save();
|
|
630
|
+
var autoCommentAbsorb = parserInput.autoCommentAbsorb;
|
|
631
|
+
parserInput.autoCommentAbsorb = false;
|
|
632
|
+
var k = parserInput.$re(/^[_A-Za-z-][_A-Za-z0-9-]+/);
|
|
633
|
+
parserInput.autoCommentAbsorb = autoCommentAbsorb;
|
|
634
|
+
if (!k) {
|
|
635
|
+
parserInput.forget();
|
|
636
|
+
return;
|
|
637
|
+
}
|
|
638
|
+
parserInput.restore();
|
|
639
|
+
var color = tree_1.default.Color.fromKeyword(k);
|
|
640
|
+
if (color) {
|
|
641
|
+
parserInput.$str(k);
|
|
642
|
+
return color;
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
//
|
|
646
|
+
// A Dimension, that is, a number and a unit
|
|
647
|
+
//
|
|
648
|
+
// 0.5em 95%
|
|
649
|
+
//
|
|
650
|
+
dimension: function () {
|
|
651
|
+
if (parserInput.peekNotNumeric()) {
|
|
652
|
+
return;
|
|
653
|
+
}
|
|
654
|
+
var value = parserInput.$re(/^([+-]?\d*\.?\d+)(%|[a-z_]+)?/i);
|
|
655
|
+
if (value) {
|
|
656
|
+
return new (tree_1.default.Dimension)(value[1], value[2]);
|
|
657
|
+
}
|
|
658
|
+
},
|
|
659
|
+
//
|
|
660
|
+
// A unicode descriptor, as is used in unicode-range
|
|
661
|
+
//
|
|
662
|
+
// U+0?? or U+00A1-00A9
|
|
663
|
+
//
|
|
664
|
+
unicodeDescriptor: function () {
|
|
665
|
+
var ud;
|
|
666
|
+
ud = parserInput.$re(/^U\+[0-9a-fA-F?]+(\-[0-9a-fA-F?]+)?/);
|
|
667
|
+
if (ud) {
|
|
668
|
+
return new (tree_1.default.UnicodeDescriptor)(ud[0]);
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
//
|
|
672
|
+
// JavaScript code to be evaluated
|
|
673
|
+
//
|
|
674
|
+
// `window.location.href`
|
|
675
|
+
//
|
|
676
|
+
javascript: function () {
|
|
677
|
+
var js;
|
|
678
|
+
var index = parserInput.i;
|
|
679
|
+
parserInput.save();
|
|
680
|
+
var escape = parserInput.$char('~');
|
|
681
|
+
var jsQuote = parserInput.$char('`');
|
|
682
|
+
if (!jsQuote) {
|
|
683
|
+
parserInput.restore();
|
|
684
|
+
return;
|
|
685
|
+
}
|
|
686
|
+
js = parserInput.$re(/^[^`]*`/);
|
|
687
|
+
if (js) {
|
|
688
|
+
parserInput.forget();
|
|
689
|
+
return new (tree_1.default.JavaScript)(js.substr(0, js.length - 1), Boolean(escape), index, fileInfo);
|
|
690
|
+
}
|
|
691
|
+
parserInput.restore('invalid javascript definition');
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
//
|
|
695
|
+
// The variable part of a variable definition. Used in the `rule` parser
|
|
696
|
+
//
|
|
697
|
+
// @fink:
|
|
698
|
+
//
|
|
699
|
+
variable: function () {
|
|
700
|
+
var name;
|
|
701
|
+
if (parserInput.currentChar() === '@' && (name = parserInput.$re(/^(@[\w-]+)\s*:/))) {
|
|
702
|
+
return name[1];
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
//
|
|
706
|
+
// Call a variable value to retrieve a detached ruleset
|
|
707
|
+
// or a value from a detached ruleset's rules.
|
|
708
|
+
//
|
|
709
|
+
// @fink();
|
|
710
|
+
// @fink;
|
|
711
|
+
// color: @fink[@color];
|
|
712
|
+
//
|
|
713
|
+
variableCall: function (parsedName) {
|
|
714
|
+
var lookups;
|
|
715
|
+
var i = parserInput.i;
|
|
716
|
+
var inValue = !!parsedName;
|
|
717
|
+
var name = parsedName;
|
|
718
|
+
parserInput.save();
|
|
719
|
+
if (name || (parserInput.currentChar() === '@'
|
|
720
|
+
&& (name = parserInput.$re(/^(@[\w-]+)(\(\s*\))?/)))) {
|
|
721
|
+
lookups = this.mixin.ruleLookups();
|
|
722
|
+
if (!lookups && ((inValue && parserInput.$str('()') !== '()') || (name[2] !== '()'))) {
|
|
723
|
+
parserInput.restore('Missing \'[...]\' lookup in variable call');
|
|
724
|
+
return;
|
|
725
|
+
}
|
|
726
|
+
if (!inValue) {
|
|
727
|
+
name = name[1];
|
|
728
|
+
}
|
|
729
|
+
var call = new tree_1.default.VariableCall(name, i, fileInfo);
|
|
730
|
+
if (!inValue && parsers.end()) {
|
|
731
|
+
parserInput.forget();
|
|
732
|
+
return call;
|
|
733
|
+
}
|
|
734
|
+
else {
|
|
735
|
+
parserInput.forget();
|
|
736
|
+
return new tree_1.default.NamespaceValue(call, lookups, i, fileInfo);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
parserInput.restore();
|
|
740
|
+
},
|
|
741
|
+
//
|
|
742
|
+
// extend syntax - used to extend selectors
|
|
743
|
+
//
|
|
744
|
+
extend: function (isRule) {
|
|
745
|
+
var elements;
|
|
746
|
+
var e;
|
|
747
|
+
var index = parserInput.i;
|
|
748
|
+
var option;
|
|
749
|
+
var extendList;
|
|
750
|
+
var extend;
|
|
751
|
+
if (!parserInput.$str(isRule ? '&:extend(' : ':extend(')) {
|
|
752
|
+
return;
|
|
753
|
+
}
|
|
754
|
+
do {
|
|
755
|
+
option = null;
|
|
756
|
+
elements = null;
|
|
757
|
+
while (!(option = parserInput.$re(/^(all)(?=\s*(\)|,))/))) {
|
|
758
|
+
e = this.element();
|
|
759
|
+
if (!e) {
|
|
760
|
+
break;
|
|
761
|
+
}
|
|
762
|
+
if (elements) {
|
|
763
|
+
elements.push(e);
|
|
764
|
+
}
|
|
765
|
+
else {
|
|
766
|
+
elements = [e];
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
option = option && option[1];
|
|
770
|
+
if (!elements) {
|
|
771
|
+
error('Missing target selector for :extend().');
|
|
772
|
+
}
|
|
773
|
+
extend = new (tree_1.default.Extend)(new (tree_1.default.Selector)(elements), option, index, fileInfo);
|
|
774
|
+
if (extendList) {
|
|
775
|
+
extendList.push(extend);
|
|
776
|
+
}
|
|
777
|
+
else {
|
|
778
|
+
extendList = [extend];
|
|
779
|
+
}
|
|
780
|
+
} while (parserInput.$char(','));
|
|
781
|
+
expect(/^\)/);
|
|
782
|
+
if (isRule) {
|
|
783
|
+
expect(/^;/);
|
|
784
|
+
}
|
|
785
|
+
return extendList;
|
|
786
|
+
},
|
|
787
|
+
//
|
|
788
|
+
// extendRule - used in a rule to extend all the parent selectors
|
|
789
|
+
//
|
|
790
|
+
extendRule: function () {
|
|
791
|
+
return this.extend(true);
|
|
792
|
+
},
|
|
793
|
+
//
|
|
794
|
+
// Mixins
|
|
795
|
+
//
|
|
796
|
+
mixin: {
|
|
797
|
+
//
|
|
798
|
+
// A Mixin call, with an optional argument list
|
|
799
|
+
//
|
|
800
|
+
// #mixins > .square(#fff);
|
|
801
|
+
// #mixins.square(#fff);
|
|
802
|
+
// .rounded(4px, black);
|
|
803
|
+
// .button;
|
|
804
|
+
//
|
|
805
|
+
// We can lookup / return a value using the lookup syntax:
|
|
806
|
+
//
|
|
807
|
+
// color: #mixin.square(#fff)[@color];
|
|
808
|
+
//
|
|
809
|
+
// The `while` loop is there because mixins can be
|
|
810
|
+
// namespaced, but we only support the child and descendant
|
|
811
|
+
// selector for now.
|
|
812
|
+
//
|
|
813
|
+
call: function (inValue, getLookup) {
|
|
814
|
+
var s = parserInput.currentChar();
|
|
815
|
+
var important = false;
|
|
816
|
+
var lookups;
|
|
817
|
+
var index = parserInput.i;
|
|
818
|
+
var elements;
|
|
819
|
+
var args;
|
|
820
|
+
var hasParens;
|
|
821
|
+
if (s !== '.' && s !== '#') {
|
|
822
|
+
return;
|
|
823
|
+
}
|
|
824
|
+
parserInput.save(); // stop us absorbing part of an invalid selector
|
|
825
|
+
elements = this.elements();
|
|
826
|
+
if (elements) {
|
|
827
|
+
if (parserInput.$char('(')) {
|
|
828
|
+
args = this.args(true).args;
|
|
829
|
+
expectChar(')');
|
|
830
|
+
hasParens = true;
|
|
831
|
+
}
|
|
832
|
+
if (getLookup !== false) {
|
|
833
|
+
lookups = this.ruleLookups();
|
|
834
|
+
}
|
|
835
|
+
if (getLookup === true && !lookups) {
|
|
836
|
+
parserInput.restore();
|
|
837
|
+
return;
|
|
838
|
+
}
|
|
839
|
+
if (inValue && !lookups && !hasParens) {
|
|
840
|
+
// This isn't a valid in-value mixin call
|
|
841
|
+
parserInput.restore();
|
|
842
|
+
return;
|
|
843
|
+
}
|
|
844
|
+
if (!inValue && parsers.important()) {
|
|
845
|
+
important = true;
|
|
846
|
+
}
|
|
847
|
+
if (inValue || parsers.end()) {
|
|
848
|
+
parserInput.forget();
|
|
849
|
+
var mixin = new (tree_1.default.mixin.Call)(elements, args, index, fileInfo, !lookups && important);
|
|
850
|
+
if (lookups) {
|
|
851
|
+
return new tree_1.default.NamespaceValue(mixin, lookups);
|
|
852
|
+
}
|
|
853
|
+
else {
|
|
854
|
+
return mixin;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
parserInput.restore();
|
|
859
|
+
},
|
|
860
|
+
/**
|
|
861
|
+
* Matching elements for mixins
|
|
862
|
+
* (Start with . or # and can have > )
|
|
863
|
+
*/
|
|
864
|
+
elements: function () {
|
|
865
|
+
var elements;
|
|
866
|
+
var e;
|
|
867
|
+
var c;
|
|
868
|
+
var elem;
|
|
869
|
+
var elemIndex;
|
|
870
|
+
var re = /^[#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/;
|
|
871
|
+
while (true) {
|
|
872
|
+
elemIndex = parserInput.i;
|
|
873
|
+
e = parserInput.$re(re);
|
|
874
|
+
if (!e) {
|
|
875
|
+
break;
|
|
876
|
+
}
|
|
877
|
+
elem = new (tree_1.default.Element)(c, e, false, elemIndex, fileInfo);
|
|
878
|
+
if (elements) {
|
|
879
|
+
elements.push(elem);
|
|
880
|
+
}
|
|
881
|
+
else {
|
|
882
|
+
elements = [elem];
|
|
883
|
+
}
|
|
884
|
+
c = parserInput.$char('>');
|
|
885
|
+
}
|
|
886
|
+
return elements;
|
|
887
|
+
},
|
|
888
|
+
args: function (isCall) {
|
|
889
|
+
var entities = parsers.entities;
|
|
890
|
+
var returner = { args: null, variadic: false };
|
|
891
|
+
var expressions = [];
|
|
892
|
+
var argsSemiColon = [];
|
|
893
|
+
var argsComma = [];
|
|
894
|
+
var isSemiColonSeparated;
|
|
895
|
+
var expressionContainsNamed;
|
|
896
|
+
var name;
|
|
897
|
+
var nameLoop;
|
|
898
|
+
var value;
|
|
899
|
+
var arg;
|
|
900
|
+
var expand;
|
|
901
|
+
var hasSep = true;
|
|
902
|
+
parserInput.save();
|
|
903
|
+
while (true) {
|
|
904
|
+
if (isCall) {
|
|
905
|
+
arg = parsers.detachedRuleset() || parsers.expression();
|
|
906
|
+
}
|
|
907
|
+
else {
|
|
908
|
+
parserInput.commentStore.length = 0;
|
|
909
|
+
if (parserInput.$str('...')) {
|
|
910
|
+
returner.variadic = true;
|
|
911
|
+
if (parserInput.$char(';') && !isSemiColonSeparated) {
|
|
912
|
+
isSemiColonSeparated = true;
|
|
913
|
+
}
|
|
914
|
+
(isSemiColonSeparated ? argsSemiColon : argsComma)
|
|
915
|
+
.push({ variadic: true });
|
|
916
|
+
break;
|
|
917
|
+
}
|
|
918
|
+
arg = entities.variable() || entities.property() || entities.literal() || entities.keyword() || this.call(true);
|
|
919
|
+
}
|
|
920
|
+
if (!arg || !hasSep) {
|
|
921
|
+
break;
|
|
922
|
+
}
|
|
923
|
+
nameLoop = null;
|
|
924
|
+
if (arg.throwAwayComments) {
|
|
925
|
+
arg.throwAwayComments();
|
|
926
|
+
}
|
|
927
|
+
value = arg;
|
|
928
|
+
var val = null;
|
|
929
|
+
if (isCall) {
|
|
930
|
+
// Variable
|
|
931
|
+
if (arg.value && arg.value.length == 1) {
|
|
932
|
+
val = arg.value[0];
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
else {
|
|
936
|
+
val = arg;
|
|
937
|
+
}
|
|
938
|
+
if (val && (val instanceof tree_1.default.Variable || val instanceof tree_1.default.Property)) {
|
|
939
|
+
if (parserInput.$char(':')) {
|
|
940
|
+
if (expressions.length > 0) {
|
|
941
|
+
if (isSemiColonSeparated) {
|
|
942
|
+
error('Cannot mix ; and , as delimiter types');
|
|
943
|
+
}
|
|
944
|
+
expressionContainsNamed = true;
|
|
945
|
+
}
|
|
946
|
+
value = parsers.detachedRuleset() || parsers.expression();
|
|
947
|
+
if (!value) {
|
|
948
|
+
if (isCall) {
|
|
949
|
+
error('could not understand value for named argument');
|
|
950
|
+
}
|
|
951
|
+
else {
|
|
952
|
+
parserInput.restore();
|
|
953
|
+
returner.args = [];
|
|
954
|
+
return returner;
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
nameLoop = (name = val.name);
|
|
958
|
+
}
|
|
959
|
+
else if (parserInput.$str('...')) {
|
|
960
|
+
if (!isCall) {
|
|
961
|
+
returner.variadic = true;
|
|
962
|
+
if (parserInput.$char(';') && !isSemiColonSeparated) {
|
|
963
|
+
isSemiColonSeparated = true;
|
|
964
|
+
}
|
|
965
|
+
(isSemiColonSeparated ? argsSemiColon : argsComma)
|
|
966
|
+
.push({ name: arg.name, variadic: true });
|
|
967
|
+
break;
|
|
968
|
+
}
|
|
969
|
+
else {
|
|
970
|
+
expand = true;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
else if (!isCall) {
|
|
974
|
+
name = nameLoop = val.name;
|
|
975
|
+
value = null;
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
if (value) {
|
|
979
|
+
expressions.push(value);
|
|
980
|
+
}
|
|
981
|
+
argsComma.push({ name: nameLoop, value: value, expand: expand });
|
|
982
|
+
if (parserInput.$char(',')) {
|
|
983
|
+
hasSep = true;
|
|
984
|
+
continue;
|
|
985
|
+
}
|
|
986
|
+
hasSep = parserInput.$char(';') === ';';
|
|
987
|
+
if (hasSep || isSemiColonSeparated) {
|
|
988
|
+
if (expressionContainsNamed) {
|
|
989
|
+
error('Cannot mix ; and , as delimiter types');
|
|
990
|
+
}
|
|
991
|
+
isSemiColonSeparated = true;
|
|
992
|
+
if (expressions.length > 1) {
|
|
993
|
+
value = new (tree_1.default.Value)(expressions);
|
|
994
|
+
}
|
|
995
|
+
argsSemiColon.push({ name: name, value: value, expand: expand });
|
|
996
|
+
name = null;
|
|
997
|
+
expressions = [];
|
|
998
|
+
expressionContainsNamed = false;
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
parserInput.forget();
|
|
1002
|
+
returner.args = isSemiColonSeparated ? argsSemiColon : argsComma;
|
|
1003
|
+
return returner;
|
|
1004
|
+
},
|
|
1005
|
+
//
|
|
1006
|
+
// A Mixin definition, with a list of parameters
|
|
1007
|
+
//
|
|
1008
|
+
// .rounded (@radius: 2px, @color) {
|
|
1009
|
+
// ...
|
|
1010
|
+
// }
|
|
1011
|
+
//
|
|
1012
|
+
// Until we have a finer grained state-machine, we have to
|
|
1013
|
+
// do a look-ahead, to make sure we don't have a mixin call.
|
|
1014
|
+
// See the `rule` function for more information.
|
|
1015
|
+
//
|
|
1016
|
+
// We start by matching `.rounded (`, and then proceed on to
|
|
1017
|
+
// the argument list, which has optional default values.
|
|
1018
|
+
// We store the parameters in `params`, with a `value` key,
|
|
1019
|
+
// if there is a value, such as in the case of `@radius`.
|
|
1020
|
+
//
|
|
1021
|
+
// Once we've got our params list, and a closing `)`, we parse
|
|
1022
|
+
// the `{...}` block.
|
|
1023
|
+
//
|
|
1024
|
+
definition: function () {
|
|
1025
|
+
var name;
|
|
1026
|
+
var params = [];
|
|
1027
|
+
var match;
|
|
1028
|
+
var ruleset;
|
|
1029
|
+
var cond;
|
|
1030
|
+
var variadic = false;
|
|
1031
|
+
if ((parserInput.currentChar() !== '.' && parserInput.currentChar() !== '#') ||
|
|
1032
|
+
parserInput.peek(/^[^{]*\}/)) {
|
|
1033
|
+
return;
|
|
1034
|
+
}
|
|
1035
|
+
parserInput.save();
|
|
1036
|
+
match = parserInput.$re(/^([#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+)\s*\(/);
|
|
1037
|
+
if (match) {
|
|
1038
|
+
name = match[1];
|
|
1039
|
+
var argInfo = this.args(false);
|
|
1040
|
+
params = argInfo.args;
|
|
1041
|
+
variadic = argInfo.variadic;
|
|
1042
|
+
// .mixincall("@{a}");
|
|
1043
|
+
// looks a bit like a mixin definition..
|
|
1044
|
+
// also
|
|
1045
|
+
// .mixincall(@a: {rule: set;});
|
|
1046
|
+
// so we have to be nice and restore
|
|
1047
|
+
if (!parserInput.$char(')')) {
|
|
1048
|
+
parserInput.restore('Missing closing \')\'');
|
|
1049
|
+
return;
|
|
1050
|
+
}
|
|
1051
|
+
parserInput.commentStore.length = 0;
|
|
1052
|
+
if (parserInput.$str('when')) { // Guard
|
|
1053
|
+
cond = expect(parsers.conditions, 'expected condition');
|
|
1054
|
+
}
|
|
1055
|
+
ruleset = parsers.block();
|
|
1056
|
+
if (ruleset) {
|
|
1057
|
+
parserInput.forget();
|
|
1058
|
+
return new (tree_1.default.mixin.Definition)(name, params, ruleset, cond, variadic);
|
|
1059
|
+
}
|
|
1060
|
+
else {
|
|
1061
|
+
parserInput.restore();
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
else {
|
|
1065
|
+
parserInput.restore();
|
|
1066
|
+
}
|
|
1067
|
+
},
|
|
1068
|
+
ruleLookups: function () {
|
|
1069
|
+
var rule;
|
|
1070
|
+
var args;
|
|
1071
|
+
var lookups = [];
|
|
1072
|
+
if (parserInput.currentChar() !== '[') {
|
|
1073
|
+
return;
|
|
1074
|
+
}
|
|
1075
|
+
while (true) {
|
|
1076
|
+
parserInput.save();
|
|
1077
|
+
args = null;
|
|
1078
|
+
rule = this.lookupValue();
|
|
1079
|
+
if (!rule && rule !== '') {
|
|
1080
|
+
parserInput.restore();
|
|
1081
|
+
break;
|
|
1082
|
+
}
|
|
1083
|
+
lookups.push(rule);
|
|
1084
|
+
parserInput.forget();
|
|
1085
|
+
}
|
|
1086
|
+
if (lookups.length > 0) {
|
|
1087
|
+
return lookups;
|
|
1088
|
+
}
|
|
1089
|
+
},
|
|
1090
|
+
lookupValue: function () {
|
|
1091
|
+
parserInput.save();
|
|
1092
|
+
if (!parserInput.$char('[')) {
|
|
1093
|
+
parserInput.restore();
|
|
1094
|
+
return;
|
|
1095
|
+
}
|
|
1096
|
+
var name = parserInput.$re(/^(?:[@$]{0,2})[_a-zA-Z0-9-]*/);
|
|
1097
|
+
if (!parserInput.$char(']')) {
|
|
1098
|
+
parserInput.restore();
|
|
1099
|
+
return;
|
|
1100
|
+
}
|
|
1101
|
+
if (name || name === '') {
|
|
1102
|
+
parserInput.forget();
|
|
1103
|
+
return name;
|
|
1104
|
+
}
|
|
1105
|
+
parserInput.restore();
|
|
1106
|
+
}
|
|
1107
|
+
},
|
|
1108
|
+
//
|
|
1109
|
+
// Entities are the smallest recognized token,
|
|
1110
|
+
// and can be found inside a rule's value.
|
|
1111
|
+
//
|
|
1112
|
+
entity: function () {
|
|
1113
|
+
var entities = this.entities;
|
|
1114
|
+
return this.comment() || entities.literal() || entities.variable() || entities.url() ||
|
|
1115
|
+
entities.property() || entities.call() || entities.keyword() || this.mixin.call(true) ||
|
|
1116
|
+
entities.javascript();
|
|
1117
|
+
},
|
|
1118
|
+
//
|
|
1119
|
+
// A Declaration terminator. Note that we use `peek()` to check for '}',
|
|
1120
|
+
// because the `block` rule will be expecting it, but we still need to make sure
|
|
1121
|
+
// it's there, if ';' was omitted.
|
|
1122
|
+
//
|
|
1123
|
+
end: function () {
|
|
1124
|
+
return parserInput.$char(';') || parserInput.peek('}');
|
|
1125
|
+
},
|
|
1126
|
+
//
|
|
1127
|
+
// IE's alpha function
|
|
1128
|
+
//
|
|
1129
|
+
// alpha(opacity=88)
|
|
1130
|
+
//
|
|
1131
|
+
ieAlpha: function () {
|
|
1132
|
+
var value;
|
|
1133
|
+
// http://jsperf.com/case-insensitive-regex-vs-strtolower-then-regex/18
|
|
1134
|
+
if (!parserInput.$re(/^opacity=/i)) {
|
|
1135
|
+
return;
|
|
1136
|
+
}
|
|
1137
|
+
value = parserInput.$re(/^\d+/);
|
|
1138
|
+
if (!value) {
|
|
1139
|
+
value = expect(parsers.entities.variable, 'Could not parse alpha');
|
|
1140
|
+
value = "@{" + value.name.slice(1) + "}";
|
|
1141
|
+
}
|
|
1142
|
+
expectChar(')');
|
|
1143
|
+
return new tree_1.default.Quoted('', "alpha(opacity=" + value + ")");
|
|
1144
|
+
},
|
|
1145
|
+
//
|
|
1146
|
+
// A Selector Element
|
|
1147
|
+
//
|
|
1148
|
+
// div
|
|
1149
|
+
// + h1
|
|
1150
|
+
// #socks
|
|
1151
|
+
// input[type="text"]
|
|
1152
|
+
//
|
|
1153
|
+
// Elements are the building blocks for Selectors,
|
|
1154
|
+
// they are made out of a `Combinator` (see combinator rule),
|
|
1155
|
+
// and an element name, such as a tag a class, or `*`.
|
|
1156
|
+
//
|
|
1157
|
+
element: function () {
|
|
1158
|
+
var e;
|
|
1159
|
+
var c;
|
|
1160
|
+
var v;
|
|
1161
|
+
var index = parserInput.i;
|
|
1162
|
+
c = this.combinator();
|
|
1163
|
+
e = parserInput.$re(/^(?:\d+\.\d+|\d+)%/) ||
|
|
1164
|
+
parserInput.$re(/^(?:[.#]?|:*)(?:[\w-]|[^\x00-\x9f]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/) ||
|
|
1165
|
+
parserInput.$char('*') || parserInput.$char('&') || this.attribute() ||
|
|
1166
|
+
parserInput.$re(/^\([^&()@]+\)/) || parserInput.$re(/^[\.#:](?=@)/) ||
|
|
1167
|
+
this.entities.variableCurly();
|
|
1168
|
+
if (!e) {
|
|
1169
|
+
parserInput.save();
|
|
1170
|
+
if (parserInput.$char('(')) {
|
|
1171
|
+
if ((v = this.selector(false)) && parserInput.$char(')')) {
|
|
1172
|
+
e = new (tree_1.default.Paren)(v);
|
|
1173
|
+
parserInput.forget();
|
|
1174
|
+
}
|
|
1175
|
+
else {
|
|
1176
|
+
parserInput.restore('Missing closing \')\'');
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
else {
|
|
1180
|
+
parserInput.forget();
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
if (e) {
|
|
1184
|
+
return new (tree_1.default.Element)(c, e, e instanceof tree_1.default.Variable, index, fileInfo);
|
|
1185
|
+
}
|
|
1186
|
+
},
|
|
1187
|
+
//
|
|
1188
|
+
// Combinators combine elements together, in a Selector.
|
|
1189
|
+
//
|
|
1190
|
+
// Because our parser isn't white-space sensitive, special care
|
|
1191
|
+
// has to be taken, when parsing the descendant combinator, ` `,
|
|
1192
|
+
// as it's an empty space. We have to check the previous character
|
|
1193
|
+
// in the input, to see if it's a ` ` character. More info on how
|
|
1194
|
+
// we deal with this in *combinator.js*.
|
|
1195
|
+
//
|
|
1196
|
+
combinator: function () {
|
|
1197
|
+
var c = parserInput.currentChar();
|
|
1198
|
+
if (c === '/') {
|
|
1199
|
+
parserInput.save();
|
|
1200
|
+
var slashedCombinator = parserInput.$re(/^\/[a-z]+\//i);
|
|
1201
|
+
if (slashedCombinator) {
|
|
1202
|
+
parserInput.forget();
|
|
1203
|
+
return new (tree_1.default.Combinator)(slashedCombinator);
|
|
1204
|
+
}
|
|
1205
|
+
parserInput.restore();
|
|
1206
|
+
}
|
|
1207
|
+
if (c === '>' || c === '+' || c === '~' || c === '|' || c === '^') {
|
|
1208
|
+
parserInput.i++;
|
|
1209
|
+
if (c === '^' && parserInput.currentChar() === '^') {
|
|
1210
|
+
c = '^^';
|
|
1211
|
+
parserInput.i++;
|
|
1212
|
+
}
|
|
1213
|
+
while (parserInput.isWhitespace()) {
|
|
1214
|
+
parserInput.i++;
|
|
1215
|
+
}
|
|
1216
|
+
return new (tree_1.default.Combinator)(c);
|
|
1217
|
+
}
|
|
1218
|
+
else if (parserInput.isWhitespace(-1)) {
|
|
1219
|
+
return new (tree_1.default.Combinator)(' ');
|
|
1220
|
+
}
|
|
1221
|
+
else {
|
|
1222
|
+
return new (tree_1.default.Combinator)(null);
|
|
1223
|
+
}
|
|
1224
|
+
},
|
|
1225
|
+
//
|
|
1226
|
+
// A CSS Selector
|
|
1227
|
+
// with less extensions e.g. the ability to extend and guard
|
|
1228
|
+
//
|
|
1229
|
+
// .class > div + h1
|
|
1230
|
+
// li a:hover
|
|
1231
|
+
//
|
|
1232
|
+
// Selectors are made out of one or more Elements, see above.
|
|
1233
|
+
//
|
|
1234
|
+
selector: function (isLess) {
|
|
1235
|
+
var index = parserInput.i;
|
|
1236
|
+
var elements;
|
|
1237
|
+
var extendList;
|
|
1238
|
+
var c;
|
|
1239
|
+
var e;
|
|
1240
|
+
var allExtends;
|
|
1241
|
+
var when;
|
|
1242
|
+
var condition;
|
|
1243
|
+
isLess = isLess !== false;
|
|
1244
|
+
while ((isLess && (extendList = this.extend())) || (isLess && (when = parserInput.$str('when'))) || (e = this.element())) {
|
|
1245
|
+
if (when) {
|
|
1246
|
+
condition = expect(this.conditions, 'expected condition');
|
|
1247
|
+
}
|
|
1248
|
+
else if (condition) {
|
|
1249
|
+
error('CSS guard can only be used at the end of selector');
|
|
1250
|
+
}
|
|
1251
|
+
else if (extendList) {
|
|
1252
|
+
if (allExtends) {
|
|
1253
|
+
allExtends = allExtends.concat(extendList);
|
|
1254
|
+
}
|
|
1255
|
+
else {
|
|
1256
|
+
allExtends = extendList;
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
else {
|
|
1260
|
+
if (allExtends) {
|
|
1261
|
+
error('Extend can only be used at the end of selector');
|
|
1262
|
+
}
|
|
1263
|
+
c = parserInput.currentChar();
|
|
1264
|
+
if (elements) {
|
|
1265
|
+
elements.push(e);
|
|
1266
|
+
}
|
|
1267
|
+
else {
|
|
1268
|
+
elements = [e];
|
|
1269
|
+
}
|
|
1270
|
+
e = null;
|
|
1271
|
+
}
|
|
1272
|
+
if (c === '{' || c === '}' || c === ';' || c === ',' || c === ')') {
|
|
1273
|
+
break;
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
if (elements) {
|
|
1277
|
+
return new (tree_1.default.Selector)(elements, allExtends, condition, index, fileInfo);
|
|
1278
|
+
}
|
|
1279
|
+
if (allExtends) {
|
|
1280
|
+
error('Extend must be used to extend a selector, it cannot be used on its own');
|
|
1281
|
+
}
|
|
1282
|
+
},
|
|
1283
|
+
selectors: function () {
|
|
1284
|
+
var s;
|
|
1285
|
+
var selectors;
|
|
1286
|
+
while (true) {
|
|
1287
|
+
s = this.selector();
|
|
1288
|
+
if (!s) {
|
|
1289
|
+
break;
|
|
1290
|
+
}
|
|
1291
|
+
if (selectors) {
|
|
1292
|
+
selectors.push(s);
|
|
1293
|
+
}
|
|
1294
|
+
else {
|
|
1295
|
+
selectors = [s];
|
|
1296
|
+
}
|
|
1297
|
+
parserInput.commentStore.length = 0;
|
|
1298
|
+
if (s.condition && selectors.length > 1) {
|
|
1299
|
+
error("Guards are only currently allowed on a single selector.");
|
|
1300
|
+
}
|
|
1301
|
+
if (!parserInput.$char(',')) {
|
|
1302
|
+
break;
|
|
1303
|
+
}
|
|
1304
|
+
if (s.condition) {
|
|
1305
|
+
error("Guards are only currently allowed on a single selector.");
|
|
1306
|
+
}
|
|
1307
|
+
parserInput.commentStore.length = 0;
|
|
1308
|
+
}
|
|
1309
|
+
return selectors;
|
|
1310
|
+
},
|
|
1311
|
+
attribute: function () {
|
|
1312
|
+
if (!parserInput.$char('[')) {
|
|
1313
|
+
return;
|
|
1314
|
+
}
|
|
1315
|
+
var entities = this.entities;
|
|
1316
|
+
var key;
|
|
1317
|
+
var val;
|
|
1318
|
+
var op;
|
|
1319
|
+
if (!(key = entities.variableCurly())) {
|
|
1320
|
+
key = expect(/^(?:[_A-Za-z0-9-\*]*\|)?(?:[_A-Za-z0-9-]|\\.)+/);
|
|
1321
|
+
}
|
|
1322
|
+
op = parserInput.$re(/^[|~*$^]?=/);
|
|
1323
|
+
if (op) {
|
|
1324
|
+
val = entities.quoted() || parserInput.$re(/^[0-9]+%/) || parserInput.$re(/^[\w-]+/) || entities.variableCurly();
|
|
1325
|
+
}
|
|
1326
|
+
expectChar(']');
|
|
1327
|
+
return new (tree_1.default.Attribute)(key, op, val);
|
|
1328
|
+
},
|
|
1329
|
+
//
|
|
1330
|
+
// The `block` rule is used by `ruleset` and `mixin.definition`.
|
|
1331
|
+
// It's a wrapper around the `primary` rule, with added `{}`.
|
|
1332
|
+
//
|
|
1333
|
+
block: function () {
|
|
1334
|
+
var content;
|
|
1335
|
+
if (parserInput.$char('{') && (content = this.primary()) && parserInput.$char('}')) {
|
|
1336
|
+
return content;
|
|
1337
|
+
}
|
|
1338
|
+
},
|
|
1339
|
+
blockRuleset: function () {
|
|
1340
|
+
var block = this.block();
|
|
1341
|
+
if (block) {
|
|
1342
|
+
block = new tree_1.default.Ruleset(null, block);
|
|
1343
|
+
}
|
|
1344
|
+
return block;
|
|
1345
|
+
},
|
|
1346
|
+
detachedRuleset: function () {
|
|
1347
|
+
var argInfo;
|
|
1348
|
+
var params;
|
|
1349
|
+
var variadic;
|
|
1350
|
+
parserInput.save();
|
|
1351
|
+
if (parserInput.$re(/^[.#]\(/)) {
|
|
1352
|
+
/**
|
|
1353
|
+
* DR args currently only implemented for each() function, and not
|
|
1354
|
+
* yet settable as `@dr: #(@arg) {}`
|
|
1355
|
+
* This should be done when DRs are merged with mixins.
|
|
1356
|
+
* See: https://github.com/less/less-meta/issues/16
|
|
1357
|
+
*/
|
|
1358
|
+
argInfo = this.mixin.args(false);
|
|
1359
|
+
params = argInfo.args;
|
|
1360
|
+
variadic = argInfo.variadic;
|
|
1361
|
+
if (!parserInput.$char(')')) {
|
|
1362
|
+
parserInput.restore();
|
|
1363
|
+
return;
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
var blockRuleset = this.blockRuleset();
|
|
1367
|
+
if (blockRuleset) {
|
|
1368
|
+
parserInput.forget();
|
|
1369
|
+
if (params) {
|
|
1370
|
+
return new tree_1.default.mixin.Definition(null, params, blockRuleset, null, variadic);
|
|
1371
|
+
}
|
|
1372
|
+
return new tree_1.default.DetachedRuleset(blockRuleset);
|
|
1373
|
+
}
|
|
1374
|
+
parserInput.restore();
|
|
1375
|
+
},
|
|
1376
|
+
//
|
|
1377
|
+
// div, .class, body > p {...}
|
|
1378
|
+
//
|
|
1379
|
+
ruleset: function () {
|
|
1380
|
+
var selectors;
|
|
1381
|
+
var rules;
|
|
1382
|
+
var debugInfo;
|
|
1383
|
+
parserInput.save();
|
|
1384
|
+
if (context.dumpLineNumbers) {
|
|
1385
|
+
debugInfo = getDebugInfo(parserInput.i);
|
|
1386
|
+
}
|
|
1387
|
+
selectors = this.selectors();
|
|
1388
|
+
if (selectors && (rules = this.block())) {
|
|
1389
|
+
parserInput.forget();
|
|
1390
|
+
var ruleset = new (tree_1.default.Ruleset)(selectors, rules, context.strictImports);
|
|
1391
|
+
if (context.dumpLineNumbers) {
|
|
1392
|
+
ruleset.debugInfo = debugInfo;
|
|
1393
|
+
}
|
|
1394
|
+
return ruleset;
|
|
1395
|
+
}
|
|
1396
|
+
else {
|
|
1397
|
+
parserInput.restore();
|
|
1398
|
+
}
|
|
1399
|
+
},
|
|
1400
|
+
declaration: function () {
|
|
1401
|
+
var name;
|
|
1402
|
+
var value;
|
|
1403
|
+
var index = parserInput.i;
|
|
1404
|
+
var hasDR;
|
|
1405
|
+
var c = parserInput.currentChar();
|
|
1406
|
+
var important;
|
|
1407
|
+
var merge;
|
|
1408
|
+
var isVariable;
|
|
1409
|
+
if (c === '.' || c === '#' || c === '&' || c === ':') {
|
|
1410
|
+
return;
|
|
1411
|
+
}
|
|
1412
|
+
parserInput.save();
|
|
1413
|
+
name = this.variable() || this.ruleProperty();
|
|
1414
|
+
if (name) {
|
|
1415
|
+
isVariable = typeof name === 'string';
|
|
1416
|
+
if (isVariable) {
|
|
1417
|
+
value = this.detachedRuleset();
|
|
1418
|
+
if (value) {
|
|
1419
|
+
hasDR = true;
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
parserInput.commentStore.length = 0;
|
|
1423
|
+
if (!value) {
|
|
1424
|
+
// a name returned by this.ruleProperty() is always an array of the form:
|
|
1425
|
+
// [string-1, ..., string-n, ""] or [string-1, ..., string-n, "+"]
|
|
1426
|
+
// where each item is a tree.Keyword or tree.Variable
|
|
1427
|
+
merge = !isVariable && name.length > 1 && name.pop().value;
|
|
1428
|
+
// Custom property values get permissive parsing
|
|
1429
|
+
if (name[0].value && name[0].value.slice(0, 2) === '--') {
|
|
1430
|
+
value = this.permissiveValue();
|
|
1431
|
+
}
|
|
1432
|
+
// Try to store values as anonymous
|
|
1433
|
+
// If we need the value later we'll re-parse it in ruleset.parseValue
|
|
1434
|
+
else {
|
|
1435
|
+
value = this.anonymousValue();
|
|
1436
|
+
}
|
|
1437
|
+
if (value) {
|
|
1438
|
+
parserInput.forget();
|
|
1439
|
+
// anonymous values absorb the end ';' which is required for them to work
|
|
1440
|
+
return new (tree_1.default.Declaration)(name, value, false, merge, index, fileInfo);
|
|
1441
|
+
}
|
|
1442
|
+
if (!value) {
|
|
1443
|
+
value = this.value();
|
|
1444
|
+
}
|
|
1445
|
+
if (value) {
|
|
1446
|
+
important = this.important();
|
|
1447
|
+
}
|
|
1448
|
+
else if (isVariable) {
|
|
1449
|
+
// As a last resort, try permissiveValue
|
|
1450
|
+
value = this.permissiveValue();
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
if (value && (this.end() || hasDR)) {
|
|
1454
|
+
parserInput.forget();
|
|
1455
|
+
return new (tree_1.default.Declaration)(name, value, important, merge, index, fileInfo);
|
|
1456
|
+
}
|
|
1457
|
+
else {
|
|
1458
|
+
parserInput.restore();
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
else {
|
|
1462
|
+
parserInput.restore();
|
|
1463
|
+
}
|
|
1464
|
+
},
|
|
1465
|
+
anonymousValue: function () {
|
|
1466
|
+
var index = parserInput.i;
|
|
1467
|
+
var match = parserInput.$re(/^([^.#@\$+\/'"*`(;{}-]*);/);
|
|
1468
|
+
if (match) {
|
|
1469
|
+
return new (tree_1.default.Anonymous)(match[1], index);
|
|
1470
|
+
}
|
|
1471
|
+
},
|
|
1472
|
+
/**
|
|
1473
|
+
* Used for custom properties, at-rules, and variables (as fallback)
|
|
1474
|
+
* Parses almost anything inside of {} [] () "" blocks
|
|
1475
|
+
* until it reaches outer-most tokens.
|
|
1476
|
+
*
|
|
1477
|
+
* First, it will try to parse comments and entities to reach
|
|
1478
|
+
* the end. This is mostly like the Expression parser except no
|
|
1479
|
+
* math is allowed.
|
|
1480
|
+
*/
|
|
1481
|
+
permissiveValue: function (untilTokens) {
|
|
1482
|
+
var i;
|
|
1483
|
+
var e;
|
|
1484
|
+
var done;
|
|
1485
|
+
var value;
|
|
1486
|
+
var tok = untilTokens || ';';
|
|
1487
|
+
var index = parserInput.i;
|
|
1488
|
+
var result = [];
|
|
1489
|
+
function testCurrentChar() {
|
|
1490
|
+
var char = parserInput.currentChar();
|
|
1491
|
+
if (typeof tok === 'string') {
|
|
1492
|
+
return char === tok;
|
|
1493
|
+
}
|
|
1494
|
+
else {
|
|
1495
|
+
return tok.test(char);
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
if (testCurrentChar()) {
|
|
1499
|
+
return;
|
|
1500
|
+
}
|
|
1501
|
+
value = [];
|
|
1502
|
+
do {
|
|
1503
|
+
e = this.comment();
|
|
1504
|
+
if (e) {
|
|
1505
|
+
value.push(e);
|
|
1506
|
+
continue;
|
|
1507
|
+
}
|
|
1508
|
+
e = this.entity();
|
|
1509
|
+
if (e) {
|
|
1510
|
+
value.push(e);
|
|
1511
|
+
}
|
|
1512
|
+
} while (e);
|
|
1513
|
+
done = testCurrentChar();
|
|
1514
|
+
if (value.length > 0) {
|
|
1515
|
+
value = new (tree_1.default.Expression)(value);
|
|
1516
|
+
if (done) {
|
|
1517
|
+
return value;
|
|
1518
|
+
}
|
|
1519
|
+
else {
|
|
1520
|
+
result.push(value);
|
|
1521
|
+
}
|
|
1522
|
+
// Preserve space before $parseUntil as it will not
|
|
1523
|
+
if (parserInput.prevChar() === ' ') {
|
|
1524
|
+
result.push(new tree_1.default.Anonymous(' ', index));
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
parserInput.save();
|
|
1528
|
+
value = parserInput.$parseUntil(tok);
|
|
1529
|
+
if (value) {
|
|
1530
|
+
if (typeof value === 'string') {
|
|
1531
|
+
error("Expected '" + value + "'", 'Parse');
|
|
1532
|
+
}
|
|
1533
|
+
if (value.length === 1 && value[0] === ' ') {
|
|
1534
|
+
parserInput.forget();
|
|
1535
|
+
return new tree_1.default.Anonymous('', index);
|
|
1536
|
+
}
|
|
1537
|
+
var item = void 0;
|
|
1538
|
+
for (i = 0; i < value.length; i++) {
|
|
1539
|
+
item = value[i];
|
|
1540
|
+
if (Array.isArray(item)) {
|
|
1541
|
+
// Treat actual quotes as normal quoted values
|
|
1542
|
+
result.push(new tree_1.default.Quoted(item[0], item[1], true, index, fileInfo));
|
|
1543
|
+
}
|
|
1544
|
+
else {
|
|
1545
|
+
if (i === value.length - 1) {
|
|
1546
|
+
item = item.trim();
|
|
1547
|
+
}
|
|
1548
|
+
// Treat like quoted values, but replace vars like unquoted expressions
|
|
1549
|
+
var quote = new tree_1.default.Quoted('\'', item, true, index, fileInfo);
|
|
1550
|
+
quote.variableRegex = /@([\w-]+)/g;
|
|
1551
|
+
quote.propRegex = /\$([\w-]+)/g;
|
|
1552
|
+
result.push(quote);
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
parserInput.forget();
|
|
1556
|
+
return new tree_1.default.Expression(result, true);
|
|
1557
|
+
}
|
|
1558
|
+
parserInput.restore();
|
|
1559
|
+
},
|
|
1560
|
+
//
|
|
1561
|
+
// An @import atrule
|
|
1562
|
+
//
|
|
1563
|
+
// @import "lib";
|
|
1564
|
+
//
|
|
1565
|
+
// Depending on our environment, importing is done differently:
|
|
1566
|
+
// In the browser, it's an XHR request, in Node, it would be a
|
|
1567
|
+
// file-system operation. The function used for importing is
|
|
1568
|
+
// stored in `import`, which we pass to the Import constructor.
|
|
1569
|
+
//
|
|
1570
|
+
'import': function () {
|
|
1571
|
+
var path;
|
|
1572
|
+
var features;
|
|
1573
|
+
var index = parserInput.i;
|
|
1574
|
+
var dir = parserInput.$re(/^@import?\s+/);
|
|
1575
|
+
if (dir) {
|
|
1576
|
+
var options = (dir ? this.importOptions() : null) || {};
|
|
1577
|
+
if ((path = this.entities.quoted() || this.entities.url())) {
|
|
1578
|
+
features = this.mediaFeatures();
|
|
1579
|
+
if (!parserInput.$char(';')) {
|
|
1580
|
+
parserInput.i = index;
|
|
1581
|
+
error('missing semi-colon or unrecognised media features on import');
|
|
1582
|
+
}
|
|
1583
|
+
features = features && new (tree_1.default.Value)(features);
|
|
1584
|
+
return new (tree_1.default.Import)(path, features, options, index, fileInfo);
|
|
1585
|
+
}
|
|
1586
|
+
else {
|
|
1587
|
+
parserInput.i = index;
|
|
1588
|
+
error('malformed import statement');
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
},
|
|
1592
|
+
importOptions: function () {
|
|
1593
|
+
var o;
|
|
1594
|
+
var options = {};
|
|
1595
|
+
var optionName;
|
|
1596
|
+
var value;
|
|
1597
|
+
// list of options, surrounded by parens
|
|
1598
|
+
if (!parserInput.$char('(')) {
|
|
1599
|
+
return null;
|
|
1600
|
+
}
|
|
1601
|
+
do {
|
|
1602
|
+
o = this.importOption();
|
|
1603
|
+
if (o) {
|
|
1604
|
+
optionName = o;
|
|
1605
|
+
value = true;
|
|
1606
|
+
switch (optionName) {
|
|
1607
|
+
case 'css':
|
|
1608
|
+
optionName = 'less';
|
|
1609
|
+
value = false;
|
|
1610
|
+
break;
|
|
1611
|
+
case 'once':
|
|
1612
|
+
optionName = 'multiple';
|
|
1613
|
+
value = false;
|
|
1614
|
+
break;
|
|
1615
|
+
}
|
|
1616
|
+
options[optionName] = value;
|
|
1617
|
+
if (!parserInput.$char(',')) {
|
|
1618
|
+
break;
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
} while (o);
|
|
1622
|
+
expectChar(')');
|
|
1623
|
+
return options;
|
|
1624
|
+
},
|
|
1625
|
+
importOption: function () {
|
|
1626
|
+
var opt = parserInput.$re(/^(less|css|multiple|once|inline|reference|optional)/);
|
|
1627
|
+
if (opt) {
|
|
1628
|
+
return opt[1];
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1631
|
+
mediaFeature: function () {
|
|
1632
|
+
var entities = this.entities;
|
|
1633
|
+
var nodes = [];
|
|
1634
|
+
var e;
|
|
1635
|
+
var p;
|
|
1636
|
+
parserInput.save();
|
|
1637
|
+
do {
|
|
1638
|
+
e = entities.keyword() || entities.variable() || entities.mixinLookup();
|
|
1639
|
+
if (e) {
|
|
1640
|
+
nodes.push(e);
|
|
1641
|
+
}
|
|
1642
|
+
else if (parserInput.$char('(')) {
|
|
1643
|
+
p = this.property();
|
|
1644
|
+
e = this.value();
|
|
1645
|
+
if (parserInput.$char(')')) {
|
|
1646
|
+
if (p && e) {
|
|
1647
|
+
nodes.push(new (tree_1.default.Paren)(new (tree_1.default.Declaration)(p, e, null, null, parserInput.i, fileInfo, true)));
|
|
1648
|
+
}
|
|
1649
|
+
else if (e) {
|
|
1650
|
+
nodes.push(new (tree_1.default.Paren)(e));
|
|
1651
|
+
}
|
|
1652
|
+
else {
|
|
1653
|
+
error('badly formed media feature definition');
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
else {
|
|
1657
|
+
error('Missing closing \')\'', 'Parse');
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
} while (e);
|
|
1661
|
+
parserInput.forget();
|
|
1662
|
+
if (nodes.length > 0) {
|
|
1663
|
+
return new (tree_1.default.Expression)(nodes);
|
|
1664
|
+
}
|
|
1665
|
+
},
|
|
1666
|
+
mediaFeatures: function () {
|
|
1667
|
+
var entities = this.entities;
|
|
1668
|
+
var features = [];
|
|
1669
|
+
var e;
|
|
1670
|
+
do {
|
|
1671
|
+
e = this.mediaFeature();
|
|
1672
|
+
if (e) {
|
|
1673
|
+
features.push(e);
|
|
1674
|
+
if (!parserInput.$char(',')) {
|
|
1675
|
+
break;
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
else {
|
|
1679
|
+
e = entities.variable() || entities.mixinLookup();
|
|
1680
|
+
if (e) {
|
|
1681
|
+
features.push(e);
|
|
1682
|
+
if (!parserInput.$char(',')) {
|
|
1683
|
+
break;
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
} while (e);
|
|
1688
|
+
return features.length > 0 ? features : null;
|
|
1689
|
+
},
|
|
1690
|
+
media: function () {
|
|
1691
|
+
var features;
|
|
1692
|
+
var rules;
|
|
1693
|
+
var media;
|
|
1694
|
+
var debugInfo;
|
|
1695
|
+
var index = parserInput.i;
|
|
1696
|
+
if (context.dumpLineNumbers) {
|
|
1697
|
+
debugInfo = getDebugInfo(index);
|
|
1698
|
+
}
|
|
1699
|
+
parserInput.save();
|
|
1700
|
+
if (parserInput.$str('@media')) {
|
|
1701
|
+
features = this.mediaFeatures();
|
|
1702
|
+
rules = this.block();
|
|
1703
|
+
if (!rules) {
|
|
1704
|
+
error('media definitions require block statements after any features');
|
|
1705
|
+
}
|
|
1706
|
+
parserInput.forget();
|
|
1707
|
+
media = new (tree_1.default.Media)(rules, features, index, fileInfo);
|
|
1708
|
+
if (context.dumpLineNumbers) {
|
|
1709
|
+
media.debugInfo = debugInfo;
|
|
1710
|
+
}
|
|
1711
|
+
return media;
|
|
1712
|
+
}
|
|
1713
|
+
parserInput.restore();
|
|
1714
|
+
},
|
|
1715
|
+
//
|
|
1716
|
+
// A @plugin directive, used to import plugins dynamically.
|
|
1717
|
+
//
|
|
1718
|
+
// @plugin (args) "lib";
|
|
1719
|
+
//
|
|
1720
|
+
plugin: function () {
|
|
1721
|
+
var path;
|
|
1722
|
+
var args;
|
|
1723
|
+
var options;
|
|
1724
|
+
var index = parserInput.i;
|
|
1725
|
+
var dir = parserInput.$re(/^@plugin?\s+/);
|
|
1726
|
+
if (dir) {
|
|
1727
|
+
args = this.pluginArgs();
|
|
1728
|
+
if (args) {
|
|
1729
|
+
options = {
|
|
1730
|
+
pluginArgs: args,
|
|
1731
|
+
isPlugin: true
|
|
1732
|
+
};
|
|
1733
|
+
}
|
|
1734
|
+
else {
|
|
1735
|
+
options = { isPlugin: true };
|
|
1736
|
+
}
|
|
1737
|
+
if ((path = this.entities.quoted() || this.entities.url())) {
|
|
1738
|
+
if (!parserInput.$char(';')) {
|
|
1739
|
+
parserInput.i = index;
|
|
1740
|
+
error('missing semi-colon on @plugin');
|
|
1741
|
+
}
|
|
1742
|
+
return new (tree_1.default.Import)(path, null, options, index, fileInfo);
|
|
1743
|
+
}
|
|
1744
|
+
else {
|
|
1745
|
+
parserInput.i = index;
|
|
1746
|
+
error('malformed @plugin statement');
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
},
|
|
1750
|
+
pluginArgs: function () {
|
|
1751
|
+
// list of options, surrounded by parens
|
|
1752
|
+
parserInput.save();
|
|
1753
|
+
if (!parserInput.$char('(')) {
|
|
1754
|
+
parserInput.restore();
|
|
1755
|
+
return null;
|
|
1756
|
+
}
|
|
1757
|
+
var args = parserInput.$re(/^\s*([^\);]+)\)\s*/);
|
|
1758
|
+
if (args[1]) {
|
|
1759
|
+
parserInput.forget();
|
|
1760
|
+
return args[1].trim();
|
|
1761
|
+
}
|
|
1762
|
+
else {
|
|
1763
|
+
parserInput.restore();
|
|
1764
|
+
return null;
|
|
1765
|
+
}
|
|
1766
|
+
},
|
|
1767
|
+
//
|
|
1768
|
+
// A CSS AtRule
|
|
1769
|
+
//
|
|
1770
|
+
// @charset "utf-8";
|
|
1771
|
+
//
|
|
1772
|
+
atrule: function () {
|
|
1773
|
+
var index = parserInput.i;
|
|
1774
|
+
var name;
|
|
1775
|
+
var value;
|
|
1776
|
+
var rules;
|
|
1777
|
+
var nonVendorSpecificName;
|
|
1778
|
+
var hasIdentifier;
|
|
1779
|
+
var hasExpression;
|
|
1780
|
+
var hasUnknown;
|
|
1781
|
+
var hasBlock = true;
|
|
1782
|
+
var isRooted = true;
|
|
1783
|
+
if (parserInput.currentChar() !== '@') {
|
|
1784
|
+
return;
|
|
1785
|
+
}
|
|
1786
|
+
value = this['import']() || this.plugin() || this.media();
|
|
1787
|
+
if (value) {
|
|
1788
|
+
return value;
|
|
1789
|
+
}
|
|
1790
|
+
parserInput.save();
|
|
1791
|
+
name = parserInput.$re(/^@[a-z-]+/);
|
|
1792
|
+
if (!name) {
|
|
1793
|
+
return;
|
|
1794
|
+
}
|
|
1795
|
+
nonVendorSpecificName = name;
|
|
1796
|
+
if (name.charAt(1) == '-' && name.indexOf('-', 2) > 0) {
|
|
1797
|
+
nonVendorSpecificName = "@" + name.slice(name.indexOf('-', 2) + 1);
|
|
1798
|
+
}
|
|
1799
|
+
switch (nonVendorSpecificName) {
|
|
1800
|
+
case '@charset':
|
|
1801
|
+
hasIdentifier = true;
|
|
1802
|
+
hasBlock = false;
|
|
1803
|
+
break;
|
|
1804
|
+
case '@namespace':
|
|
1805
|
+
hasExpression = true;
|
|
1806
|
+
hasBlock = false;
|
|
1807
|
+
break;
|
|
1808
|
+
case '@keyframes':
|
|
1809
|
+
case '@counter-style':
|
|
1810
|
+
hasIdentifier = true;
|
|
1811
|
+
break;
|
|
1812
|
+
case '@document':
|
|
1813
|
+
case '@supports':
|
|
1814
|
+
hasUnknown = true;
|
|
1815
|
+
isRooted = false;
|
|
1816
|
+
break;
|
|
1817
|
+
default:
|
|
1818
|
+
hasUnknown = true;
|
|
1819
|
+
break;
|
|
1820
|
+
}
|
|
1821
|
+
parserInput.commentStore.length = 0;
|
|
1822
|
+
if (hasIdentifier) {
|
|
1823
|
+
value = this.entity();
|
|
1824
|
+
if (!value) {
|
|
1825
|
+
error("expected " + name + " identifier");
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
else if (hasExpression) {
|
|
1829
|
+
value = this.expression();
|
|
1830
|
+
if (!value) {
|
|
1831
|
+
error("expected " + name + " expression");
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
else if (hasUnknown) {
|
|
1835
|
+
value = this.permissiveValue(/^[{;]/);
|
|
1836
|
+
hasBlock = (parserInput.currentChar() === '{');
|
|
1837
|
+
if (!value) {
|
|
1838
|
+
if (!hasBlock && parserInput.currentChar() !== ';') {
|
|
1839
|
+
error(name + " rule is missing block or ending semi-colon");
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
else if (!value.value) {
|
|
1843
|
+
value = null;
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
if (hasBlock) {
|
|
1847
|
+
rules = this.blockRuleset();
|
|
1848
|
+
}
|
|
1849
|
+
if (rules || (!hasBlock && value && parserInput.$char(';'))) {
|
|
1850
|
+
parserInput.forget();
|
|
1851
|
+
return new (tree_1.default.AtRule)(name, value, rules, index, fileInfo, context.dumpLineNumbers ? getDebugInfo(index) : null, isRooted);
|
|
1852
|
+
}
|
|
1853
|
+
parserInput.restore('at-rule options not recognised');
|
|
1854
|
+
},
|
|
1855
|
+
//
|
|
1856
|
+
// A Value is a comma-delimited list of Expressions
|
|
1857
|
+
//
|
|
1858
|
+
// font-family: Baskerville, Georgia, serif;
|
|
1859
|
+
//
|
|
1860
|
+
// In a Rule, a Value represents everything after the `:`,
|
|
1861
|
+
// and before the `;`.
|
|
1862
|
+
//
|
|
1863
|
+
value: function () {
|
|
1864
|
+
var e;
|
|
1865
|
+
var expressions = [];
|
|
1866
|
+
var index = parserInput.i;
|
|
1867
|
+
do {
|
|
1868
|
+
e = this.expression();
|
|
1869
|
+
if (e) {
|
|
1870
|
+
expressions.push(e);
|
|
1871
|
+
if (!parserInput.$char(',')) {
|
|
1872
|
+
break;
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
} while (e);
|
|
1876
|
+
if (expressions.length > 0) {
|
|
1877
|
+
return new (tree_1.default.Value)(expressions, index);
|
|
1878
|
+
}
|
|
1879
|
+
},
|
|
1880
|
+
important: function () {
|
|
1881
|
+
if (parserInput.currentChar() === '!') {
|
|
1882
|
+
return parserInput.$re(/^! *important/);
|
|
1883
|
+
}
|
|
1884
|
+
},
|
|
1885
|
+
sub: function () {
|
|
1886
|
+
var a;
|
|
1887
|
+
var e;
|
|
1888
|
+
parserInput.save();
|
|
1889
|
+
if (parserInput.$char('(')) {
|
|
1890
|
+
a = this.addition();
|
|
1891
|
+
if (a && parserInput.$char(')')) {
|
|
1892
|
+
parserInput.forget();
|
|
1893
|
+
e = new (tree_1.default.Expression)([a]);
|
|
1894
|
+
e.parens = true;
|
|
1895
|
+
return e;
|
|
1896
|
+
}
|
|
1897
|
+
parserInput.restore('Expected \')\'');
|
|
1898
|
+
return;
|
|
1899
|
+
}
|
|
1900
|
+
parserInput.restore();
|
|
1901
|
+
},
|
|
1902
|
+
multiplication: function () {
|
|
1903
|
+
var m;
|
|
1904
|
+
var a;
|
|
1905
|
+
var op;
|
|
1906
|
+
var operation;
|
|
1907
|
+
var isSpaced;
|
|
1908
|
+
m = this.operand();
|
|
1909
|
+
if (m) {
|
|
1910
|
+
isSpaced = parserInput.isWhitespace(-1);
|
|
1911
|
+
while (true) {
|
|
1912
|
+
if (parserInput.peek(/^\/[*\/]/)) {
|
|
1913
|
+
break;
|
|
1914
|
+
}
|
|
1915
|
+
parserInput.save();
|
|
1916
|
+
op = parserInput.$char('/') || parserInput.$char('*') || parserInput.$str('./');
|
|
1917
|
+
if (!op) {
|
|
1918
|
+
parserInput.forget();
|
|
1919
|
+
break;
|
|
1920
|
+
}
|
|
1921
|
+
a = this.operand();
|
|
1922
|
+
if (!a) {
|
|
1923
|
+
parserInput.restore();
|
|
1924
|
+
break;
|
|
1925
|
+
}
|
|
1926
|
+
parserInput.forget();
|
|
1927
|
+
m.parensInOp = true;
|
|
1928
|
+
a.parensInOp = true;
|
|
1929
|
+
operation = new (tree_1.default.Operation)(op, [operation || m, a], isSpaced);
|
|
1930
|
+
isSpaced = parserInput.isWhitespace(-1);
|
|
1931
|
+
}
|
|
1932
|
+
return operation || m;
|
|
1933
|
+
}
|
|
1934
|
+
},
|
|
1935
|
+
addition: function () {
|
|
1936
|
+
var m;
|
|
1937
|
+
var a;
|
|
1938
|
+
var op;
|
|
1939
|
+
var operation;
|
|
1940
|
+
var isSpaced;
|
|
1941
|
+
m = this.multiplication();
|
|
1942
|
+
if (m) {
|
|
1943
|
+
isSpaced = parserInput.isWhitespace(-1);
|
|
1944
|
+
while (true) {
|
|
1945
|
+
op = parserInput.$re(/^[-+]\s+/) || (!isSpaced && (parserInput.$char('+') || parserInput.$char('-')));
|
|
1946
|
+
if (!op) {
|
|
1947
|
+
break;
|
|
1948
|
+
}
|
|
1949
|
+
a = this.multiplication();
|
|
1950
|
+
if (!a) {
|
|
1951
|
+
break;
|
|
1952
|
+
}
|
|
1953
|
+
m.parensInOp = true;
|
|
1954
|
+
a.parensInOp = true;
|
|
1955
|
+
operation = new (tree_1.default.Operation)(op, [operation || m, a], isSpaced);
|
|
1956
|
+
isSpaced = parserInput.isWhitespace(-1);
|
|
1957
|
+
}
|
|
1958
|
+
return operation || m;
|
|
1959
|
+
}
|
|
1960
|
+
},
|
|
1961
|
+
conditions: function () {
|
|
1962
|
+
var a;
|
|
1963
|
+
var b;
|
|
1964
|
+
var index = parserInput.i;
|
|
1965
|
+
var condition;
|
|
1966
|
+
a = this.condition(true);
|
|
1967
|
+
if (a) {
|
|
1968
|
+
while (true) {
|
|
1969
|
+
if (!parserInput.peek(/^,\s*(not\s*)?\(/) || !parserInput.$char(',')) {
|
|
1970
|
+
break;
|
|
1971
|
+
}
|
|
1972
|
+
b = this.condition(true);
|
|
1973
|
+
if (!b) {
|
|
1974
|
+
break;
|
|
1975
|
+
}
|
|
1976
|
+
condition = new (tree_1.default.Condition)('or', condition || a, b, index);
|
|
1977
|
+
}
|
|
1978
|
+
return condition || a;
|
|
1979
|
+
}
|
|
1980
|
+
},
|
|
1981
|
+
condition: function (needsParens) {
|
|
1982
|
+
var result;
|
|
1983
|
+
var logical;
|
|
1984
|
+
var next;
|
|
1985
|
+
function or() {
|
|
1986
|
+
return parserInput.$str('or');
|
|
1987
|
+
}
|
|
1988
|
+
result = this.conditionAnd(needsParens);
|
|
1989
|
+
if (!result) {
|
|
1990
|
+
return;
|
|
1991
|
+
}
|
|
1992
|
+
logical = or();
|
|
1993
|
+
if (logical) {
|
|
1994
|
+
next = this.condition(needsParens);
|
|
1995
|
+
if (next) {
|
|
1996
|
+
result = new (tree_1.default.Condition)(logical, result, next);
|
|
1997
|
+
}
|
|
1998
|
+
else {
|
|
1999
|
+
return;
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
return result;
|
|
2003
|
+
},
|
|
2004
|
+
conditionAnd: function (needsParens) {
|
|
2005
|
+
var result;
|
|
2006
|
+
var logical;
|
|
2007
|
+
var next;
|
|
2008
|
+
var self = this;
|
|
2009
|
+
function insideCondition() {
|
|
2010
|
+
var cond = self.negatedCondition(needsParens) || self.parenthesisCondition(needsParens);
|
|
2011
|
+
if (!cond && !needsParens) {
|
|
2012
|
+
return self.atomicCondition(needsParens);
|
|
2013
|
+
}
|
|
2014
|
+
return cond;
|
|
2015
|
+
}
|
|
2016
|
+
function and() {
|
|
2017
|
+
return parserInput.$str('and');
|
|
2018
|
+
}
|
|
2019
|
+
result = insideCondition();
|
|
2020
|
+
if (!result) {
|
|
2021
|
+
return;
|
|
2022
|
+
}
|
|
2023
|
+
logical = and();
|
|
2024
|
+
if (logical) {
|
|
2025
|
+
next = this.conditionAnd(needsParens);
|
|
2026
|
+
if (next) {
|
|
2027
|
+
result = new (tree_1.default.Condition)(logical, result, next);
|
|
2028
|
+
}
|
|
2029
|
+
else {
|
|
2030
|
+
return;
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
return result;
|
|
2034
|
+
},
|
|
2035
|
+
negatedCondition: function (needsParens) {
|
|
2036
|
+
if (parserInput.$str('not')) {
|
|
2037
|
+
var result = this.parenthesisCondition(needsParens);
|
|
2038
|
+
if (result) {
|
|
2039
|
+
result.negate = !result.negate;
|
|
2040
|
+
}
|
|
2041
|
+
return result;
|
|
2042
|
+
}
|
|
2043
|
+
},
|
|
2044
|
+
parenthesisCondition: function (needsParens) {
|
|
2045
|
+
function tryConditionFollowedByParenthesis(me) {
|
|
2046
|
+
var body;
|
|
2047
|
+
parserInput.save();
|
|
2048
|
+
body = me.condition(needsParens);
|
|
2049
|
+
if (!body) {
|
|
2050
|
+
parserInput.restore();
|
|
2051
|
+
return;
|
|
2052
|
+
}
|
|
2053
|
+
if (!parserInput.$char(')')) {
|
|
2054
|
+
parserInput.restore();
|
|
2055
|
+
return;
|
|
2056
|
+
}
|
|
2057
|
+
parserInput.forget();
|
|
2058
|
+
return body;
|
|
2059
|
+
}
|
|
2060
|
+
var body;
|
|
2061
|
+
parserInput.save();
|
|
2062
|
+
if (!parserInput.$str('(')) {
|
|
2063
|
+
parserInput.restore();
|
|
2064
|
+
return;
|
|
2065
|
+
}
|
|
2066
|
+
body = tryConditionFollowedByParenthesis(this);
|
|
2067
|
+
if (body) {
|
|
2068
|
+
parserInput.forget();
|
|
2069
|
+
return body;
|
|
2070
|
+
}
|
|
2071
|
+
body = this.atomicCondition(needsParens);
|
|
2072
|
+
if (!body) {
|
|
2073
|
+
parserInput.restore();
|
|
2074
|
+
return;
|
|
2075
|
+
}
|
|
2076
|
+
if (!parserInput.$char(')')) {
|
|
2077
|
+
parserInput.restore("expected ')' got '" + parserInput.currentChar() + "'");
|
|
2078
|
+
return;
|
|
2079
|
+
}
|
|
2080
|
+
parserInput.forget();
|
|
2081
|
+
return body;
|
|
2082
|
+
},
|
|
2083
|
+
atomicCondition: function (needsParens) {
|
|
2084
|
+
var entities = this.entities;
|
|
2085
|
+
var index = parserInput.i;
|
|
2086
|
+
var a;
|
|
2087
|
+
var b;
|
|
2088
|
+
var c;
|
|
2089
|
+
var op;
|
|
2090
|
+
function cond() {
|
|
2091
|
+
return this.addition() || entities.keyword() || entities.quoted() || entities.mixinLookup();
|
|
2092
|
+
}
|
|
2093
|
+
cond = cond.bind(this);
|
|
2094
|
+
a = cond();
|
|
2095
|
+
if (a) {
|
|
2096
|
+
if (parserInput.$char('>')) {
|
|
2097
|
+
if (parserInput.$char('=')) {
|
|
2098
|
+
op = '>=';
|
|
2099
|
+
}
|
|
2100
|
+
else {
|
|
2101
|
+
op = '>';
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
else if (parserInput.$char('<')) {
|
|
2105
|
+
if (parserInput.$char('=')) {
|
|
2106
|
+
op = '<=';
|
|
2107
|
+
}
|
|
2108
|
+
else {
|
|
2109
|
+
op = '<';
|
|
2110
|
+
}
|
|
2111
|
+
}
|
|
2112
|
+
else if (parserInput.$char('=')) {
|
|
2113
|
+
if (parserInput.$char('>')) {
|
|
2114
|
+
op = '=>';
|
|
2115
|
+
}
|
|
2116
|
+
else if (parserInput.$char('<')) {
|
|
2117
|
+
op = '=<';
|
|
2118
|
+
}
|
|
2119
|
+
else {
|
|
2120
|
+
op = '=';
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
if (op) {
|
|
2124
|
+
b = cond();
|
|
2125
|
+
if (b) {
|
|
2126
|
+
c = new (tree_1.default.Condition)(op, a, b, index, false);
|
|
2127
|
+
}
|
|
2128
|
+
else {
|
|
2129
|
+
error('expected expression');
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
else {
|
|
2133
|
+
c = new (tree_1.default.Condition)('=', a, new (tree_1.default.Keyword)('true'), index, false);
|
|
2134
|
+
}
|
|
2135
|
+
return c;
|
|
2136
|
+
}
|
|
2137
|
+
},
|
|
2138
|
+
//
|
|
2139
|
+
// An operand is anything that can be part of an operation,
|
|
2140
|
+
// such as a Color, or a Variable
|
|
2141
|
+
//
|
|
2142
|
+
operand: function () {
|
|
2143
|
+
var entities = this.entities;
|
|
2144
|
+
var negate;
|
|
2145
|
+
if (parserInput.peek(/^-[@\$\(]/)) {
|
|
2146
|
+
negate = parserInput.$char('-');
|
|
2147
|
+
}
|
|
2148
|
+
var o = this.sub() || entities.dimension() ||
|
|
2149
|
+
entities.color() || entities.variable() ||
|
|
2150
|
+
entities.property() || entities.call() ||
|
|
2151
|
+
entities.quoted(true) || entities.colorKeyword() ||
|
|
2152
|
+
entities.mixinLookup();
|
|
2153
|
+
if (negate) {
|
|
2154
|
+
o.parensInOp = true;
|
|
2155
|
+
o = new (tree_1.default.Negative)(o);
|
|
2156
|
+
}
|
|
2157
|
+
return o;
|
|
2158
|
+
},
|
|
2159
|
+
//
|
|
2160
|
+
// Expressions either represent mathematical operations,
|
|
2161
|
+
// or white-space delimited Entities.
|
|
2162
|
+
//
|
|
2163
|
+
// 1px solid black
|
|
2164
|
+
// @var * 2
|
|
2165
|
+
//
|
|
2166
|
+
expression: function () {
|
|
2167
|
+
var entities = [];
|
|
2168
|
+
var e;
|
|
2169
|
+
var delim;
|
|
2170
|
+
var index = parserInput.i;
|
|
2171
|
+
do {
|
|
2172
|
+
e = this.comment();
|
|
2173
|
+
if (e) {
|
|
2174
|
+
entities.push(e);
|
|
2175
|
+
continue;
|
|
2176
|
+
}
|
|
2177
|
+
e = this.addition() || this.entity();
|
|
2178
|
+
if (e instanceof tree_1.default.Comment) {
|
|
2179
|
+
e = null;
|
|
2180
|
+
}
|
|
2181
|
+
if (e) {
|
|
2182
|
+
entities.push(e);
|
|
2183
|
+
// operations do not allow keyword "/" dimension (e.g. small/20px) so we support that here
|
|
2184
|
+
if (!parserInput.peek(/^\/[\/*]/)) {
|
|
2185
|
+
delim = parserInput.$char('/');
|
|
2186
|
+
if (delim) {
|
|
2187
|
+
entities.push(new (tree_1.default.Anonymous)(delim, index));
|
|
2188
|
+
}
|
|
2189
|
+
}
|
|
2190
|
+
}
|
|
2191
|
+
} while (e);
|
|
2192
|
+
if (entities.length > 0) {
|
|
2193
|
+
return new (tree_1.default.Expression)(entities);
|
|
2194
|
+
}
|
|
2195
|
+
},
|
|
2196
|
+
property: function () {
|
|
2197
|
+
var name = parserInput.$re(/^(\*?-?[_a-zA-Z0-9-]+)\s*:/);
|
|
2198
|
+
if (name) {
|
|
2199
|
+
return name[1];
|
|
2200
|
+
}
|
|
2201
|
+
},
|
|
2202
|
+
ruleProperty: function () {
|
|
2203
|
+
var name = [];
|
|
2204
|
+
var index = [];
|
|
2205
|
+
var s;
|
|
2206
|
+
var k;
|
|
2207
|
+
parserInput.save();
|
|
2208
|
+
var simpleProperty = parserInput.$re(/^([_a-zA-Z0-9-]+)\s*:/);
|
|
2209
|
+
if (simpleProperty) {
|
|
2210
|
+
name = [new (tree_1.default.Keyword)(simpleProperty[1])];
|
|
2211
|
+
parserInput.forget();
|
|
2212
|
+
return name;
|
|
2213
|
+
}
|
|
2214
|
+
function match(re) {
|
|
2215
|
+
var i = parserInput.i;
|
|
2216
|
+
var chunk = parserInput.$re(re);
|
|
2217
|
+
if (chunk) {
|
|
2218
|
+
index.push(i);
|
|
2219
|
+
return name.push(chunk[1]);
|
|
2220
|
+
}
|
|
2221
|
+
}
|
|
2222
|
+
match(/^(\*?)/);
|
|
2223
|
+
while (true) {
|
|
2224
|
+
if (!match(/^((?:[\w-]+)|(?:[@\$]\{[\w-]+\}))/)) {
|
|
2225
|
+
break;
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
if ((name.length > 1) && match(/^((?:\+_|\+)?)\s*:/)) {
|
|
2229
|
+
parserInput.forget();
|
|
2230
|
+
// at last, we have the complete match now. move forward,
|
|
2231
|
+
// convert name particles to tree objects and return:
|
|
2232
|
+
if (name[0] === '') {
|
|
2233
|
+
name.shift();
|
|
2234
|
+
index.shift();
|
|
2235
|
+
}
|
|
2236
|
+
for (k = 0; k < name.length; k++) {
|
|
2237
|
+
s = name[k];
|
|
2238
|
+
name[k] = (s.charAt(0) !== '@' && s.charAt(0) !== '$') ?
|
|
2239
|
+
new (tree_1.default.Keyword)(s) :
|
|
2240
|
+
(s.charAt(0) === '@' ?
|
|
2241
|
+
new (tree_1.default.Variable)("@" + s.slice(2, -1), index[k], fileInfo) :
|
|
2242
|
+
new (tree_1.default.Property)("$" + s.slice(2, -1), index[k], fileInfo));
|
|
2243
|
+
}
|
|
2244
|
+
return name;
|
|
2245
|
+
}
|
|
2246
|
+
parserInput.restore();
|
|
2247
|
+
}
|
|
2248
|
+
}
|
|
2249
|
+
};
|
|
2250
|
+
};
|
|
2251
|
+
Parser.serializeVars = function (vars) {
|
|
2252
|
+
var s = '';
|
|
2253
|
+
for (var name_1 in vars) {
|
|
2254
|
+
if (Object.hasOwnProperty.call(vars, name_1)) {
|
|
2255
|
+
var value = vars[name_1];
|
|
2256
|
+
s += ((name_1[0] === '@') ? '' : '@') + name_1 + ": " + value + ((String(value).slice(-1) === ';') ? '' : ';');
|
|
2257
|
+
}
|
|
2258
|
+
}
|
|
2259
|
+
return s;
|
|
2260
|
+
};
|
|
2261
|
+
exports.default = Parser;
|
|
2262
|
+
//# sourceMappingURL=parser.js.map
|