Loading something
})\n loadableOptions = _extends({}, loadableOptions, options);\n // Error if Fizz rendering is not enabled and `suspense` option is set to true\n if (!process.env.__NEXT_REACT_ROOT && loadableOptions.suspense) {\n throw new Error(`Invalid suspense option usage in next/dynamic. Read more: https://nextjs.org/docs/messages/invalid-dynamic-suspense`);\n }\n // coming from build/babel/plugins/react-loadable-plugin.js\n if (loadableOptions.loadableGenerated) {\n loadableOptions = _extends({}, loadableOptions, loadableOptions.loadableGenerated);\n delete loadableOptions.loadableGenerated;\n }\n // support for disabling server side rendering, eg: dynamic(import('../hello-world'), {ssr: false}).\n // skip `ssr` for suspense mode and opt-in React.lazy directly\n if (typeof loadableOptions.ssr === 'boolean' && !loadableOptions.suspense) {\n if (!loadableOptions.ssr) {\n delete loadableOptions.ssr;\n return noSSR(loadableFn, loadableOptions);\n }\n delete loadableOptions.ssr;\n }\n return loadableFn(loadableOptions);\n}\nconst isServerSide = typeof window === 'undefined';\nfunction noSSR(LoadableInitializer, loadableOptions) {\n // Removing webpack and modules means react-loadable won't try preloading\n delete loadableOptions.webpack;\n delete loadableOptions.modules;\n // This check is necessary to prevent react-loadable from initializing on the server\n if (!isServerSide) {\n return LoadableInitializer(loadableOptions);\n }\n const Loading = loadableOptions.loading;\n // This will only be rendered on the server side\n return ()=>/*#__PURE__*/ _react.default.createElement(Loading, {\n error: null,\n isLoading: true,\n pastDelay: false,\n timedOut: false\n });\n}\n\nif ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {\n Object.defineProperty(exports.default, '__esModule', { value: true });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n}\n\n//# sourceMappingURL=dynamic.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.LoadableContext = void 0;\nvar _interop_require_default = require(\"@swc/helpers/lib/_interop_require_default.js\").default;\nvar _react = _interop_require_default(require(\"react\"));\nconst LoadableContext = _react.default.createContext(null);\nexports.LoadableContext = LoadableContext;\nif (process.env.NODE_ENV !== 'production') {\n LoadableContext.displayName = 'LoadableContext';\n}\n\n//# sourceMappingURL=loadable-context.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _extends = require(\"@swc/helpers/lib/_extends.js\").default;\nvar _interop_require_default = require(\"@swc/helpers/lib/_interop_require_default.js\").default;\nvar _react = _interop_require_default(require(\"react\"));\nvar _loadableContext = require(\"./loadable-context\");\nconst { useSyncExternalStore } = process.env.__NEXT_REACT_ROOT ? require('react') : require('use-sync-external-store/shim');\nconst ALL_INITIALIZERS = [];\nconst READY_INITIALIZERS = [];\nlet initialized = false;\nfunction load(loader) {\n let promise = loader();\n let state = {\n loading: true,\n loaded: null,\n error: null\n };\n state.promise = promise.then((loaded)=>{\n state.loading = false;\n state.loaded = loaded;\n return loaded;\n }).catch((err)=>{\n state.loading = false;\n state.error = err;\n throw err;\n });\n return state;\n}\nfunction resolve(obj) {\n return obj && obj.__esModule ? obj.default : obj;\n}\nfunction createLoadableComponent(loadFn, options) {\n let opts = Object.assign({\n loader: null,\n loading: null,\n delay: 200,\n timeout: null,\n webpack: null,\n modules: null,\n suspense: false\n }, options);\n if (opts.suspense) {\n opts.lazy = _react.default.lazy(opts.loader);\n }\n /** @type LoadableSubscription */ let subscription = null;\n function init() {\n if (!subscription) {\n const sub = new LoadableSubscription(loadFn, opts);\n subscription = {\n getCurrentValue: sub.getCurrentValue.bind(sub),\n subscribe: sub.subscribe.bind(sub),\n retry: sub.retry.bind(sub),\n promise: sub.promise.bind(sub)\n };\n }\n return subscription.promise();\n }\n // Server only\n if (typeof window === 'undefined') {\n ALL_INITIALIZERS.push(init);\n }\n // Client only\n if (!initialized && typeof window !== 'undefined') {\n // require.resolveWeak check is needed for environments that don't have it available like Jest\n const moduleIds = opts.webpack && typeof require.resolveWeak === 'function' ? opts.webpack() : opts.modules;\n if (moduleIds) {\n READY_INITIALIZERS.push((ids)=>{\n for (const moduleId of moduleIds){\n if (ids.indexOf(moduleId) !== -1) {\n return init();\n }\n }\n });\n }\n }\n function useLoadableModule() {\n init();\n const context = _react.default.useContext(_loadableContext.LoadableContext);\n if (context && Array.isArray(opts.modules)) {\n opts.modules.forEach((moduleName)=>{\n context(moduleName);\n });\n }\n }\n function LoadableImpl(props, ref) {\n useLoadableModule();\n const state = useSyncExternalStore(subscription.subscribe, subscription.getCurrentValue, subscription.getCurrentValue);\n _react.default.useImperativeHandle(ref, ()=>({\n retry: subscription.retry\n }), []);\n return _react.default.useMemo(()=>{\n if (state.loading || state.error) {\n return _react.default.createElement(opts.loading, {\n isLoading: state.loading,\n pastDelay: state.pastDelay,\n timedOut: state.timedOut,\n error: state.error,\n retry: subscription.retry\n });\n } else if (state.loaded) {\n return _react.default.createElement(resolve(state.loaded), props);\n } else {\n return null;\n }\n }, [\n props,\n state\n ]);\n }\n function LazyImpl(props, ref) {\n useLoadableModule();\n return _react.default.createElement(opts.lazy, _extends({}, props, {\n ref\n }));\n }\n const LoadableComponent = opts.suspense ? LazyImpl : LoadableImpl;\n LoadableComponent.preload = ()=>init();\n LoadableComponent.displayName = 'LoadableComponent';\n return _react.default.forwardRef(LoadableComponent);\n}\nclass LoadableSubscription {\n promise() {\n return this._res.promise;\n }\n retry() {\n this._clearTimeouts();\n this._res = this._loadFn(this._opts.loader);\n this._state = {\n pastDelay: false,\n timedOut: false\n };\n const { _res: res , _opts: opts } = this;\n if (res.loading) {\n if (typeof opts.delay === 'number') {\n if (opts.delay === 0) {\n this._state.pastDelay = true;\n } else {\n this._delay = setTimeout(()=>{\n this._update({\n pastDelay: true\n });\n }, opts.delay);\n }\n }\n if (typeof opts.timeout === 'number') {\n this._timeout = setTimeout(()=>{\n this._update({\n timedOut: true\n });\n }, opts.timeout);\n }\n }\n this._res.promise.then(()=>{\n this._update({});\n this._clearTimeouts();\n }).catch((_err)=>{\n this._update({});\n this._clearTimeouts();\n });\n this._update({});\n }\n _update(partial) {\n this._state = _extends({}, this._state, {\n error: this._res.error,\n loaded: this._res.loaded,\n loading: this._res.loading\n }, partial);\n this._callbacks.forEach((callback)=>callback());\n }\n _clearTimeouts() {\n clearTimeout(this._delay);\n clearTimeout(this._timeout);\n }\n getCurrentValue() {\n return this._state;\n }\n subscribe(callback) {\n this._callbacks.add(callback);\n return ()=>{\n this._callbacks.delete(callback);\n };\n }\n constructor(loadFn, opts){\n this._loadFn = loadFn;\n this._opts = opts;\n this._callbacks = new Set();\n this._delay = null;\n this._timeout = null;\n this.retry();\n }\n}\nfunction Loadable(opts) {\n return createLoadableComponent(load, opts);\n}\nfunction flushInitializers(initializers, ids) {\n let promises = [];\n while(initializers.length){\n let init = initializers.pop();\n promises.push(init(ids));\n }\n return Promise.all(promises).then(()=>{\n if (initializers.length) {\n return flushInitializers(initializers, ids);\n }\n });\n}\nLoadable.preloadAll = ()=>{\n return new Promise((resolveInitializers, reject)=>{\n flushInitializers(ALL_INITIALIZERS).then(resolveInitializers, reject);\n });\n};\nLoadable.preloadReady = (ids = [])=>{\n return new Promise((resolvePreload)=>{\n const res = ()=>{\n initialized = true;\n return resolvePreload();\n };\n // We always will resolve, errors should be handled within loading UIs.\n flushInitializers(READY_INITIALIZERS, ids).then(res, res);\n });\n};\nif (typeof window !== 'undefined') {\n window.__NEXT_PRELOADREADY = Loadable.preloadReady;\n}\nvar _default = Loadable;\nexports.default = _default;\n\n//# sourceMappingURL=loadable.js.map","module.exports = require('./dist/shared/lib/dynamic')\n","module.exports = require('./dist/client/link')\n","var x=String;\nvar create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x}};\nmodule.exports=create();\nmodule.exports.createColors = create;\n","\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\n\nvar _processor = _interopRequireDefault(require(\"./processor\"));\n\nvar selectors = _interopRequireWildcard(require(\"./selectors\"));\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nvar parser = function parser(processor) {\n return new _processor[\"default\"](processor);\n};\n\nObject.assign(parser, selectors);\ndelete parser.__esModule;\nvar _default = parser;\nexports[\"default\"] = _default;\nmodule.exports = exports.default;","\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\n\nvar _root = _interopRequireDefault(require(\"./selectors/root\"));\n\nvar _selector = _interopRequireDefault(require(\"./selectors/selector\"));\n\nvar _className = _interopRequireDefault(require(\"./selectors/className\"));\n\nvar _comment = _interopRequireDefault(require(\"./selectors/comment\"));\n\nvar _id = _interopRequireDefault(require(\"./selectors/id\"));\n\nvar _tag = _interopRequireDefault(require(\"./selectors/tag\"));\n\nvar _string = _interopRequireDefault(require(\"./selectors/string\"));\n\nvar _pseudo = _interopRequireDefault(require(\"./selectors/pseudo\"));\n\nvar _attribute = _interopRequireWildcard(require(\"./selectors/attribute\"));\n\nvar _universal = _interopRequireDefault(require(\"./selectors/universal\"));\n\nvar _combinator = _interopRequireDefault(require(\"./selectors/combinator\"));\n\nvar _nesting = _interopRequireDefault(require(\"./selectors/nesting\"));\n\nvar _sortAscending = _interopRequireDefault(require(\"./sortAscending\"));\n\nvar _tokenize = _interopRequireWildcard(require(\"./tokenize\"));\n\nvar tokens = _interopRequireWildcard(require(\"./tokenTypes\"));\n\nvar types = _interopRequireWildcard(require(\"./selectors/types\"));\n\nvar _util = require(\"./util\");\n\nvar _WHITESPACE_TOKENS, _Object$assign;\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS);\nvar WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign));\n\nfunction tokenStart(token) {\n return {\n line: token[_tokenize.FIELDS.START_LINE],\n column: token[_tokenize.FIELDS.START_COL]\n };\n}\n\nfunction tokenEnd(token) {\n return {\n line: token[_tokenize.FIELDS.END_LINE],\n column: token[_tokenize.FIELDS.END_COL]\n };\n}\n\nfunction getSource(startLine, startColumn, endLine, endColumn) {\n return {\n start: {\n line: startLine,\n column: startColumn\n },\n end: {\n line: endLine,\n column: endColumn\n }\n };\n}\n\nfunction getTokenSource(token) {\n return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]);\n}\n\nfunction getTokenSourceSpan(startToken, endToken) {\n if (!startToken) {\n return undefined;\n }\n\n return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]);\n}\n\nfunction unescapeProp(node, prop) {\n var value = node[prop];\n\n if (typeof value !== \"string\") {\n return;\n }\n\n if (value.indexOf(\"\\\\\") !== -1) {\n (0, _util.ensureObject)(node, 'raws');\n node[prop] = (0, _util.unesc)(value);\n\n if (node.raws[prop] === undefined) {\n node.raws[prop] = value;\n }\n }\n\n return node;\n}\n\nfunction indexesOf(array, item) {\n var i = -1;\n var indexes = [];\n\n while ((i = array.indexOf(item, i + 1)) !== -1) {\n indexes.push(i);\n }\n\n return indexes;\n}\n\nfunction uniqs() {\n var list = Array.prototype.concat.apply([], arguments);\n return list.filter(function (item, i) {\n return i === list.indexOf(item);\n });\n}\n\nvar Parser = /*#__PURE__*/function () {\n function Parser(rule, options) {\n if (options === void 0) {\n options = {};\n }\n\n this.rule = rule;\n this.options = Object.assign({\n lossy: false,\n safe: false\n }, options);\n this.position = 0;\n this.css = typeof this.rule === 'string' ? this.rule : this.rule.selector;\n this.tokens = (0, _tokenize[\"default\"])({\n css: this.css,\n error: this._errorGenerator(),\n safe: this.options.safe\n });\n var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]);\n this.root = new _root[\"default\"]({\n source: rootSource\n });\n this.root.errorGenerator = this._errorGenerator();\n var selector = new _selector[\"default\"]({\n source: {\n start: {\n line: 1,\n column: 1\n }\n }\n });\n this.root.append(selector);\n this.current = selector;\n this.loop();\n }\n\n var _proto = Parser.prototype;\n\n _proto._errorGenerator = function _errorGenerator() {\n var _this = this;\n\n return function (message, errorOptions) {\n if (typeof _this.rule === 'string') {\n return new Error(message);\n }\n\n return _this.rule.error(message, errorOptions);\n };\n };\n\n _proto.attribute = function attribute() {\n var attr = [];\n var startingToken = this.currToken;\n this.position++;\n\n while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) {\n attr.push(this.currToken);\n this.position++;\n }\n\n if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) {\n return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]);\n }\n\n var len = attr.length;\n var node = {\n source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]),\n sourceIndex: startingToken[_tokenize.FIELDS.START_POS]\n };\n\n if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) {\n return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]);\n }\n\n var pos = 0;\n var spaceBefore = '';\n var commentBefore = '';\n var lastAdded = null;\n var spaceAfterMeaningfulToken = false;\n\n while (pos < len) {\n var token = attr[pos];\n var content = this.content(token);\n var next = attr[pos + 1];\n\n switch (token[_tokenize.FIELDS.TYPE]) {\n case tokens.space:\n // if (\n // len === 1 ||\n // pos === 0 && this.content(next) === '|'\n // ) {\n // return this.expected('attribute', token[TOKEN.START_POS], content);\n // }\n spaceAfterMeaningfulToken = true;\n\n if (this.options.lossy) {\n break;\n }\n\n if (lastAdded) {\n (0, _util.ensureObject)(node, 'spaces', lastAdded);\n var prevContent = node.spaces[lastAdded].after || '';\n node.spaces[lastAdded].after = prevContent + content;\n var existingComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null;\n\n if (existingComment) {\n node.raws.spaces[lastAdded].after = existingComment + content;\n }\n } else {\n spaceBefore = spaceBefore + content;\n commentBefore = commentBefore + content;\n }\n\n break;\n\n case tokens.asterisk:\n if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {\n node.operator = content;\n lastAdded = 'operator';\n } else if ((!node.namespace || lastAdded === \"namespace\" && !spaceAfterMeaningfulToken) && next) {\n if (spaceBefore) {\n (0, _util.ensureObject)(node, 'spaces', 'attribute');\n node.spaces.attribute.before = spaceBefore;\n spaceBefore = '';\n }\n\n if (commentBefore) {\n (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute');\n node.raws.spaces.attribute.before = spaceBefore;\n commentBefore = '';\n }\n\n node.namespace = (node.namespace || \"\") + content;\n var rawValue = (0, _util.getProp)(node, 'raws', 'namespace') || null;\n\n if (rawValue) {\n node.raws.namespace += content;\n }\n\n lastAdded = 'namespace';\n }\n\n spaceAfterMeaningfulToken = false;\n break;\n\n case tokens.dollar:\n if (lastAdded === \"value\") {\n var oldRawValue = (0, _util.getProp)(node, 'raws', 'value');\n node.value += \"$\";\n\n if (oldRawValue) {\n node.raws.value = oldRawValue + \"$\";\n }\n\n break;\n }\n\n // Falls through\n\n case tokens.caret:\n if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {\n node.operator = content;\n lastAdded = 'operator';\n }\n\n spaceAfterMeaningfulToken = false;\n break;\n\n case tokens.combinator:\n if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) {\n node.operator = content;\n lastAdded = 'operator';\n }\n\n if (content !== '|') {\n spaceAfterMeaningfulToken = false;\n break;\n }\n\n if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {\n node.operator = content;\n lastAdded = 'operator';\n } else if (!node.namespace && !node.attribute) {\n node.namespace = true;\n }\n\n spaceAfterMeaningfulToken = false;\n break;\n\n case tokens.word:\n if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && // this look-ahead probably fails with comment nodes involved.\n !node.operator && !node.namespace) {\n node.namespace = content;\n lastAdded = 'namespace';\n } else if (!node.attribute || lastAdded === \"attribute\" && !spaceAfterMeaningfulToken) {\n if (spaceBefore) {\n (0, _util.ensureObject)(node, 'spaces', 'attribute');\n node.spaces.attribute.before = spaceBefore;\n spaceBefore = '';\n }\n\n if (commentBefore) {\n (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute');\n node.raws.spaces.attribute.before = commentBefore;\n commentBefore = '';\n }\n\n node.attribute = (node.attribute || \"\") + content;\n\n var _rawValue = (0, _util.getProp)(node, 'raws', 'attribute') || null;\n\n if (_rawValue) {\n node.raws.attribute += content;\n }\n\n lastAdded = 'attribute';\n } else if (!node.value && node.value !== \"\" || lastAdded === \"value\" && !spaceAfterMeaningfulToken) {\n var _unescaped = (0, _util.unesc)(content);\n\n var _oldRawValue = (0, _util.getProp)(node, 'raws', 'value') || '';\n\n var oldValue = node.value || '';\n node.value = oldValue + _unescaped;\n node.quoteMark = null;\n\n if (_unescaped !== content || _oldRawValue) {\n (0, _util.ensureObject)(node, 'raws');\n node.raws.value = (_oldRawValue || oldValue) + content;\n }\n\n lastAdded = 'value';\n } else {\n var insensitive = content === 'i' || content === \"I\";\n\n if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) {\n node.insensitive = insensitive;\n\n if (!insensitive || content === \"I\") {\n (0, _util.ensureObject)(node, 'raws');\n node.raws.insensitiveFlag = content;\n }\n\n lastAdded = 'insensitive';\n\n if (spaceBefore) {\n (0, _util.ensureObject)(node, 'spaces', 'insensitive');\n node.spaces.insensitive.before = spaceBefore;\n spaceBefore = '';\n }\n\n if (commentBefore) {\n (0, _util.ensureObject)(node, 'raws', 'spaces', 'insensitive');\n node.raws.spaces.insensitive.before = commentBefore;\n commentBefore = '';\n }\n } else if (node.value || node.value === '') {\n lastAdded = 'value';\n node.value += content;\n\n if (node.raws.value) {\n node.raws.value += content;\n }\n }\n }\n\n spaceAfterMeaningfulToken = false;\n break;\n\n case tokens.str:\n if (!node.attribute || !node.operator) {\n return this.error(\"Expected an attribute followed by an operator preceding the string.\", {\n index: token[_tokenize.FIELDS.START_POS]\n });\n }\n\n var _unescapeValue = (0, _attribute.unescapeValue)(content),\n unescaped = _unescapeValue.unescaped,\n quoteMark = _unescapeValue.quoteMark;\n\n node.value = unescaped;\n node.quoteMark = quoteMark;\n lastAdded = 'value';\n (0, _util.ensureObject)(node, 'raws');\n node.raws.value = content;\n spaceAfterMeaningfulToken = false;\n break;\n\n case tokens.equals:\n if (!node.attribute) {\n return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content);\n }\n\n if (node.value) {\n return this.error('Unexpected \"=\" found; an operator was already defined.', {\n index: token[_tokenize.FIELDS.START_POS]\n });\n }\n\n node.operator = node.operator ? node.operator + content : content;\n lastAdded = 'operator';\n spaceAfterMeaningfulToken = false;\n break;\n\n case tokens.comment:\n if (lastAdded) {\n if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') {\n var lastComment = (0, _util.getProp)(node, 'spaces', lastAdded, 'after') || '';\n var rawLastComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || lastComment;\n (0, _util.ensureObject)(node, 'raws', 'spaces', lastAdded);\n node.raws.spaces[lastAdded].after = rawLastComment + content;\n } else {\n var lastValue = node[lastAdded] || '';\n var rawLastValue = (0, _util.getProp)(node, 'raws', lastAdded) || lastValue;\n (0, _util.ensureObject)(node, 'raws');\n node.raws[lastAdded] = rawLastValue + content;\n }\n } else {\n commentBefore = commentBefore + content;\n }\n\n break;\n\n default:\n return this.error(\"Unexpected \\\"\" + content + \"\\\" found.\", {\n index: token[_tokenize.FIELDS.START_POS]\n });\n }\n\n pos++;\n }\n\n unescapeProp(node, \"attribute\");\n unescapeProp(node, \"namespace\");\n this.newNode(new _attribute[\"default\"](node));\n this.position++;\n }\n /**\n * return a node containing meaningless garbage up to (but not including) the specified token position.\n * if the token position is negative, all remaining tokens are consumed.\n *\n * This returns an array containing a single string node if all whitespace,\n * otherwise an array of comment nodes with space before and after.\n *\n * These tokens are not added to the current selector, the caller can add them or use them to amend\n * a previous node's space metadata.\n *\n * In lossy mode, this returns only comments.\n */\n ;\n\n _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) {\n if (stopPosition < 0) {\n stopPosition = this.tokens.length;\n }\n\n var startPosition = this.position;\n var nodes = [];\n var space = \"\";\n var lastComment = undefined;\n\n do {\n if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {\n if (!this.options.lossy) {\n space += this.content();\n }\n } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) {\n var spaces = {};\n\n if (space) {\n spaces.before = space;\n space = \"\";\n }\n\n lastComment = new _comment[\"default\"]({\n value: this.content(),\n source: getTokenSource(this.currToken),\n sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],\n spaces: spaces\n });\n nodes.push(lastComment);\n }\n } while (++this.position < stopPosition);\n\n if (space) {\n if (lastComment) {\n lastComment.spaces.after = space;\n } else if (!this.options.lossy) {\n var firstToken = this.tokens[startPosition];\n var lastToken = this.tokens[this.position - 1];\n nodes.push(new _string[\"default\"]({\n value: '',\n source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]),\n sourceIndex: firstToken[_tokenize.FIELDS.START_POS],\n spaces: {\n before: space,\n after: ''\n }\n }));\n }\n }\n\n return nodes;\n }\n /**\n * \n * @param {*} nodes \n */\n ;\n\n _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) {\n var _this2 = this;\n\n if (requiredSpace === void 0) {\n requiredSpace = false;\n }\n\n var space = \"\";\n var rawSpace = \"\";\n nodes.forEach(function (n) {\n var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace);\n\n var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace);\n\n space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0);\n rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0);\n });\n\n if (rawSpace === space) {\n rawSpace = undefined;\n }\n\n var result = {\n space: space,\n rawSpace: rawSpace\n };\n return result;\n };\n\n _proto.isNamedCombinator = function isNamedCombinator(position) {\n if (position === void 0) {\n position = this.position;\n }\n\n return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash;\n };\n\n _proto.namedCombinator = function namedCombinator() {\n if (this.isNamedCombinator()) {\n var nameRaw = this.content(this.tokens[this.position + 1]);\n var name = (0, _util.unesc)(nameRaw).toLowerCase();\n var raws = {};\n\n if (name !== nameRaw) {\n raws.value = \"/\" + nameRaw + \"/\";\n }\n\n var node = new _combinator[\"default\"]({\n value: \"/\" + name + \"/\",\n source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]),\n sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],\n raws: raws\n });\n this.position = this.position + 3;\n return node;\n } else {\n this.unexpected();\n }\n };\n\n _proto.combinator = function combinator() {\n var _this3 = this;\n\n if (this.content() === '|') {\n return this.namespace();\n } // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector.\n\n\n var nextSigTokenPos = this.locateNextMeaningfulToken(this.position);\n\n if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma) {\n var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);\n\n if (nodes.length > 0) {\n var last = this.current.last;\n\n if (last) {\n var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes),\n space = _this$convertWhitespa.space,\n rawSpace = _this$convertWhitespa.rawSpace;\n\n if (rawSpace !== undefined) {\n last.rawSpaceAfter += rawSpace;\n }\n\n last.spaces.after += space;\n } else {\n nodes.forEach(function (n) {\n return _this3.newNode(n);\n });\n }\n }\n\n return;\n }\n\n var firstToken = this.currToken;\n var spaceOrDescendantSelectorNodes = undefined;\n\n if (nextSigTokenPos > this.position) {\n spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);\n }\n\n var node;\n\n if (this.isNamedCombinator()) {\n node = this.namedCombinator();\n } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) {\n node = new _combinator[\"default\"]({\n value: this.content(),\n source: getTokenSource(this.currToken),\n sourceIndex: this.currToken[_tokenize.FIELDS.START_POS]\n });\n this.position++;\n } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {// pass\n } else if (!spaceOrDescendantSelectorNodes) {\n this.unexpected();\n }\n\n if (node) {\n if (spaceOrDescendantSelectorNodes) {\n var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes),\n _space = _this$convertWhitespa2.space,\n _rawSpace = _this$convertWhitespa2.rawSpace;\n\n node.spaces.before = _space;\n node.rawSpaceBefore = _rawSpace;\n }\n } else {\n // descendant combinator\n var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true),\n _space2 = _this$convertWhitespa3.space,\n _rawSpace2 = _this$convertWhitespa3.rawSpace;\n\n if (!_rawSpace2) {\n _rawSpace2 = _space2;\n }\n\n var spaces = {};\n var raws = {\n spaces: {}\n };\n\n if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) {\n spaces.before = _space2.slice(0, _space2.length - 1);\n raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1);\n } else if (_space2.startsWith(' ') && _rawSpace2.startsWith(' ')) {\n spaces.after = _space2.slice(1);\n raws.spaces.after = _rawSpace2.slice(1);\n } else {\n raws.value = _rawSpace2;\n }\n\n node = new _combinator[\"default\"]({\n value: ' ',\n source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]),\n sourceIndex: firstToken[_tokenize.FIELDS.START_POS],\n spaces: spaces,\n raws: raws\n });\n }\n\n if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) {\n node.spaces.after = this.optionalSpace(this.content());\n this.position++;\n }\n\n return this.newNode(node);\n };\n\n _proto.comma = function comma() {\n if (this.position === this.tokens.length - 1) {\n this.root.trailingComma = true;\n this.position++;\n return;\n }\n\n this.current._inferEndPosition();\n\n var selector = new _selector[\"default\"]({\n source: {\n start: tokenStart(this.tokens[this.position + 1])\n }\n });\n this.current.parent.append(selector);\n this.current = selector;\n this.position++;\n };\n\n _proto.comment = function comment() {\n var current = this.currToken;\n this.newNode(new _comment[\"default\"]({\n value: this.content(),\n source: getTokenSource(current),\n sourceIndex: current[_tokenize.FIELDS.START_POS]\n }));\n this.position++;\n };\n\n _proto.error = function error(message, opts) {\n throw this.root.error(message, opts);\n };\n\n _proto.missingBackslash = function missingBackslash() {\n return this.error('Expected a backslash preceding the semicolon.', {\n index: this.currToken[_tokenize.FIELDS.START_POS]\n });\n };\n\n _proto.missingParenthesis = function missingParenthesis() {\n return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]);\n };\n\n _proto.missingSquareBracket = function missingSquareBracket() {\n return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]);\n };\n\n _proto.unexpected = function unexpected() {\n return this.error(\"Unexpected '\" + this.content() + \"'. Escaping special characters with \\\\ may help.\", this.currToken[_tokenize.FIELDS.START_POS]);\n };\n\n _proto.namespace = function namespace() {\n var before = this.prevToken && this.content(this.prevToken) || true;\n\n if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) {\n this.position++;\n return this.word(before);\n } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) {\n this.position++;\n return this.universal(before);\n }\n };\n\n _proto.nesting = function nesting() {\n if (this.nextToken) {\n var nextContent = this.content(this.nextToken);\n\n if (nextContent === \"|\") {\n this.position++;\n return;\n }\n }\n\n var current = this.currToken;\n this.newNode(new _nesting[\"default\"]({\n value: this.content(),\n source: getTokenSource(current),\n sourceIndex: current[_tokenize.FIELDS.START_POS]\n }));\n this.position++;\n };\n\n _proto.parentheses = function parentheses() {\n var last = this.current.last;\n var unbalanced = 1;\n this.position++;\n\n if (last && last.type === types.PSEUDO) {\n var selector = new _selector[\"default\"]({\n source: {\n start: tokenStart(this.tokens[this.position - 1])\n }\n });\n var cache = this.current;\n last.append(selector);\n this.current = selector;\n\n while (this.position < this.tokens.length && unbalanced) {\n if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) {\n unbalanced++;\n }\n\n if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {\n unbalanced--;\n }\n\n if (unbalanced) {\n this.parse();\n } else {\n this.current.source.end = tokenEnd(this.currToken);\n this.current.parent.source.end = tokenEnd(this.currToken);\n this.position++;\n }\n }\n\n this.current = cache;\n } else {\n // I think this case should be an error. It's used to implement a basic parse of media queries\n // but I don't think it's a good idea.\n var parenStart = this.currToken;\n var parenValue = \"(\";\n var parenEnd;\n\n while (this.position < this.tokens.length && unbalanced) {\n if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) {\n unbalanced++;\n }\n\n if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {\n unbalanced--;\n }\n\n parenEnd = this.currToken;\n parenValue += this.parseParenthesisToken(this.currToken);\n this.position++;\n }\n\n if (last) {\n last.appendToPropertyAndEscape(\"value\", parenValue, parenValue);\n } else {\n this.newNode(new _string[\"default\"]({\n value: parenValue,\n source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]),\n sourceIndex: parenStart[_tokenize.FIELDS.START_POS]\n }));\n }\n }\n\n if (unbalanced) {\n return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]);\n }\n };\n\n _proto.pseudo = function pseudo() {\n var _this4 = this;\n\n var pseudoStr = '';\n var startingToken = this.currToken;\n\n while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) {\n pseudoStr += this.content();\n this.position++;\n }\n\n if (!this.currToken) {\n return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1);\n }\n\n if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) {\n this.splitWord(false, function (first, length) {\n pseudoStr += first;\n\n _this4.newNode(new _pseudo[\"default\"]({\n value: pseudoStr,\n source: getTokenSourceSpan(startingToken, _this4.currToken),\n sourceIndex: startingToken[_tokenize.FIELDS.START_POS]\n }));\n\n if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) {\n _this4.error('Misplaced parenthesis.', {\n index: _this4.nextToken[_tokenize.FIELDS.START_POS]\n });\n }\n });\n } else {\n return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]);\n }\n };\n\n _proto.space = function space() {\n var content = this.content(); // Handle space before and after the selector\n\n if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) {\n return node.type === 'comment';\n })) {\n this.spaces = this.optionalSpace(content);\n this.position++;\n } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {\n this.current.last.spaces.after = this.optionalSpace(content);\n this.position++;\n } else {\n this.combinator();\n }\n };\n\n _proto.string = function string() {\n var current = this.currToken;\n this.newNode(new _string[\"default\"]({\n value: this.content(),\n source: getTokenSource(current),\n sourceIndex: current[_tokenize.FIELDS.START_POS]\n }));\n this.position++;\n };\n\n _proto.universal = function universal(namespace) {\n var nextToken = this.nextToken;\n\n if (nextToken && this.content(nextToken) === '|') {\n this.position++;\n return this.namespace();\n }\n\n var current = this.currToken;\n this.newNode(new _universal[\"default\"]({\n value: this.content(),\n source: getTokenSource(current),\n sourceIndex: current[_tokenize.FIELDS.START_POS]\n }), namespace);\n this.position++;\n };\n\n _proto.splitWord = function splitWord(namespace, firstCallback) {\n var _this5 = this;\n\n var nextToken = this.nextToken;\n var word = this.content();\n\n while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) {\n this.position++;\n var current = this.content();\n word += current;\n\n if (current.lastIndexOf('\\\\') === current.length - 1) {\n var next = this.nextToken;\n\n if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) {\n word += this.requiredSpace(this.content(next));\n this.position++;\n }\n }\n\n nextToken = this.nextToken;\n }\n\n var hasClass = indexesOf(word, '.').filter(function (i) {\n // Allow escaped dot within class name\n var escapedDot = word[i - 1] === '\\\\'; // Allow decimal numbers percent in @keyframes\n\n var isKeyframesPercent = /^\\d+\\.\\d+%$/.test(word);\n return !escapedDot && !isKeyframesPercent;\n });\n var hasId = indexesOf(word, '#').filter(function (i) {\n return word[i - 1] !== '\\\\';\n }); // Eliminate Sass interpolations from the list of id indexes\n\n var interpolations = indexesOf(word, '#{');\n\n if (interpolations.length) {\n hasId = hasId.filter(function (hashIndex) {\n return !~interpolations.indexOf(hashIndex);\n });\n }\n\n var indices = (0, _sortAscending[\"default\"])(uniqs([0].concat(hasClass, hasId)));\n indices.forEach(function (ind, i) {\n var index = indices[i + 1] || word.length;\n var value = word.slice(ind, index);\n\n if (i === 0 && firstCallback) {\n return firstCallback.call(_this5, value, indices.length);\n }\n\n var node;\n var current = _this5.currToken;\n var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i];\n var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1));\n\n if (~hasClass.indexOf(ind)) {\n var classNameOpts = {\n value: value.slice(1),\n source: source,\n sourceIndex: sourceIndex\n };\n node = new _className[\"default\"](unescapeProp(classNameOpts, \"value\"));\n } else if (~hasId.indexOf(ind)) {\n var idOpts = {\n value: value.slice(1),\n source: source,\n sourceIndex: sourceIndex\n };\n node = new _id[\"default\"](unescapeProp(idOpts, \"value\"));\n } else {\n var tagOpts = {\n value: value,\n source: source,\n sourceIndex: sourceIndex\n };\n unescapeProp(tagOpts, \"value\");\n node = new _tag[\"default\"](tagOpts);\n }\n\n _this5.newNode(node, namespace); // Ensure that the namespace is used only once\n\n\n namespace = null;\n });\n this.position++;\n };\n\n _proto.word = function word(namespace) {\n var nextToken = this.nextToken;\n\n if (nextToken && this.content(nextToken) === '|') {\n this.position++;\n return this.namespace();\n }\n\n return this.splitWord(namespace);\n };\n\n _proto.loop = function loop() {\n while (this.position < this.tokens.length) {\n this.parse(true);\n }\n\n this.current._inferEndPosition();\n\n return this.root;\n };\n\n _proto.parse = function parse(throwOnParenthesis) {\n switch (this.currToken[_tokenize.FIELDS.TYPE]) {\n case tokens.space:\n this.space();\n break;\n\n case tokens.comment:\n this.comment();\n break;\n\n case tokens.openParenthesis:\n this.parentheses();\n break;\n\n case tokens.closeParenthesis:\n if (throwOnParenthesis) {\n this.missingParenthesis();\n }\n\n break;\n\n case tokens.openSquare:\n this.attribute();\n break;\n\n case tokens.dollar:\n case tokens.caret:\n case tokens.equals:\n case tokens.word:\n this.word();\n break;\n\n case tokens.colon:\n this.pseudo();\n break;\n\n case tokens.comma:\n this.comma();\n break;\n\n case tokens.asterisk:\n this.universal();\n break;\n\n case tokens.ampersand:\n this.nesting();\n break;\n\n case tokens.slash:\n case tokens.combinator:\n this.combinator();\n break;\n\n case tokens.str:\n this.string();\n break;\n // These cases throw; no break needed.\n\n case tokens.closeSquare:\n this.missingSquareBracket();\n\n case tokens.semicolon:\n this.missingBackslash();\n\n default:\n this.unexpected();\n }\n }\n /**\n * Helpers\n */\n ;\n\n _proto.expected = function expected(description, index, found) {\n if (Array.isArray(description)) {\n var last = description.pop();\n description = description.join(', ') + \" or \" + last;\n }\n\n var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a';\n\n if (!found) {\n return this.error(\"Expected \" + an + \" \" + description + \".\", {\n index: index\n });\n }\n\n return this.error(\"Expected \" + an + \" \" + description + \", found \\\"\" + found + \"\\\" instead.\", {\n index: index\n });\n };\n\n _proto.requiredSpace = function requiredSpace(space) {\n return this.options.lossy ? ' ' : space;\n };\n\n _proto.optionalSpace = function optionalSpace(space) {\n return this.options.lossy ? '' : space;\n };\n\n _proto.lossySpace = function lossySpace(space, required) {\n if (this.options.lossy) {\n return required ? ' ' : '';\n } else {\n return space;\n }\n };\n\n _proto.parseParenthesisToken = function parseParenthesisToken(token) {\n var content = this.content(token);\n\n if (token[_tokenize.FIELDS.TYPE] === tokens.space) {\n return this.requiredSpace(content);\n } else {\n return content;\n }\n };\n\n _proto.newNode = function newNode(node, namespace) {\n if (namespace) {\n if (/^ +$/.test(namespace)) {\n if (!this.options.lossy) {\n this.spaces = (this.spaces || '') + namespace;\n }\n\n namespace = true;\n }\n\n node.namespace = namespace;\n unescapeProp(node, \"namespace\");\n }\n\n if (this.spaces) {\n node.spaces.before = this.spaces;\n this.spaces = '';\n }\n\n return this.current.append(node);\n };\n\n _proto.content = function content(token) {\n if (token === void 0) {\n token = this.currToken;\n }\n\n return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]);\n };\n\n /**\n * returns the index of the next non-whitespace, non-comment token.\n * returns -1 if no meaningful token is found.\n */\n _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) {\n if (startPosition === void 0) {\n startPosition = this.position + 1;\n }\n\n var searchPosition = startPosition;\n\n while (searchPosition < this.tokens.length) {\n if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) {\n searchPosition++;\n continue;\n } else {\n return searchPosition;\n }\n }\n\n return -1;\n };\n\n _createClass(Parser, [{\n key: \"currToken\",\n get: function get() {\n return this.tokens[this.position];\n }\n }, {\n key: \"nextToken\",\n get: function get() {\n return this.tokens[this.position + 1];\n }\n }, {\n key: \"prevToken\",\n get: function get() {\n return this.tokens[this.position - 1];\n }\n }]);\n\n return Parser;\n}();\n\nexports[\"default\"] = Parser;\nmodule.exports = exports.default;","\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\n\nvar _parser = _interopRequireDefault(require(\"./parser\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nvar Processor = /*#__PURE__*/function () {\n function Processor(func, options) {\n this.func = func || function noop() {};\n\n this.funcRes = null;\n this.options = options;\n }\n\n var _proto = Processor.prototype;\n\n _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) {\n if (options === void 0) {\n options = {};\n }\n\n var merged = Object.assign({}, this.options, options);\n\n if (merged.updateSelector === false) {\n return false;\n } else {\n return typeof rule !== \"string\";\n }\n };\n\n _proto._isLossy = function _isLossy(options) {\n if (options === void 0) {\n options = {};\n }\n\n var merged = Object.assign({}, this.options, options);\n\n if (merged.lossless === false) {\n return true;\n } else {\n return false;\n }\n };\n\n _proto._root = function _root(rule, options) {\n if (options === void 0) {\n options = {};\n }\n\n var parser = new _parser[\"default\"](rule, this._parseOptions(options));\n return parser.root;\n };\n\n _proto._parseOptions = function _parseOptions(options) {\n return {\n lossy: this._isLossy(options)\n };\n };\n\n _proto._run = function _run(rule, options) {\n var _this = this;\n\n if (options === void 0) {\n options = {};\n }\n\n return new Promise(function (resolve, reject) {\n try {\n var root = _this._root(rule, options);\n\n Promise.resolve(_this.func(root)).then(function (transform) {\n var string = undefined;\n\n if (_this._shouldUpdateSelector(rule, options)) {\n string = root.toString();\n rule.selector = string;\n }\n\n return {\n transform: transform,\n root: root,\n string: string\n };\n }).then(resolve, reject);\n } catch (e) {\n reject(e);\n return;\n }\n });\n };\n\n _proto._runSync = function _runSync(rule, options) {\n if (options === void 0) {\n options = {};\n }\n\n var root = this._root(rule, options);\n\n var transform = this.func(root);\n\n if (transform && typeof transform.then === \"function\") {\n throw new Error(\"Selector processor returned a promise to a synchronous call.\");\n }\n\n var string = undefined;\n\n if (options.updateSelector && typeof rule !== \"string\") {\n string = root.toString();\n rule.selector = string;\n }\n\n return {\n transform: transform,\n root: root,\n string: string\n };\n }\n /**\n * Process rule into a selector AST.\n *\n * @param rule {postcss.Rule | string} The css selector to be processed\n * @param options The options for processing\n * @returns {Promise