%PDF- %PDF-
Direktori : /www/specpages-backup/node_modules/less/lib/less/tree/ |
Current File : /www/specpages-backup/node_modules/less/lib/less/tree/selector.js.map |
{"version":3,"file":"selector.js","sourceRoot":"","sources":["../../../src/less/tree/selector.js"],"names":[],"mappings":";;;;;AAAA,gDAA0B;AAC1B,sDAAgC;AAChC,6DAAsC;AAEtC,IAAM,QAAQ,GAAG,UAAS,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,cAAc;IAC7F,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC3B,IAAI,CAAC,cAAc,GAAG,CAAC,SAAS,CAAC;IACjC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACpB,IAAI,CAAC,SAAS,GAAG,eAAe,CAAC;IACjC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC3C,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;IAChC,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;IACxC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AACxC,CAAC,CAAA;AAED,QAAQ,CAAC,SAAS,GAAG,IAAI,cAAI,EAAE,CAAC;AAEhC,QAAQ,CAAC,SAAS,CAAC,MAAM,GAAG,UAAS,OAAO;IACxC,IAAI,IAAI,CAAC,QAAQ,EAAE;QACf,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACrD;IACD,IAAI,IAAI,CAAC,UAAU,EAAE;QACjB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KACzD;IACD,IAAI,IAAI,CAAC,SAAS,EAAE;QAChB,IAAI,CAAC,SAAS,GAAG,OAAO,CAA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F,QAAQ,CAAC,SAAS,CAAC,IAAI,GAAG,UAAU,CAAC;AACrC,kBAAe,QAAQ,CAAC","sourcesContent":["import Node from './node';\nimport Element from './element';\nimport LessError from '../less-error';\n\nconst Selector = function(elements, extendList, condition, index, currentFileInfo, visibilityInfo) {\n this.extendList = extendList;\n this.condition = condition;\n this.evaldCondition = !condition;\n this._index = index;\n this._fileInfo = currentFileInfo;\n this.elements = this.getElements(elements);\n this.mixinElements_ = undefined;\n this.copyVisibilityInfo(visibilityInfo);\n this.setParent(this.elements, this);\n}\n\nSelector.prototype = new Node();\n\nSelector.prototype.accept = function(visitor) {\n if (this.elements) {\n this.elements = visitor.visitArray(this.elements);\n }\n if (this.extendList) {\n this.extendList = visitor.visitArray(this.extendList);\n }\n if (this.condition) {\n this.condition = visitor.visit(this.condition);\n }\n};\n\nSelector.prototype.createDerived = function(elements, extendList, evaldCondition) {\n elements = this.getElements(elements);\n const newSelector = new Selector(elements, extendList || this.extendList,\n null, this.getIndex(), this.fileInfo(), this.visibilityInfo());\n newSelector.evaldCondition = (evaldCondition != null) ? evaldCondition : this.evaldCondition;\n newSelector.mediaEmpty = this.mediaEmpty;\n return newSelector;\n};\n\nSelector.prototype.getElements = function(els) {\n if (!els) {\n return [new Element('', '&', false, this._index, this._fileInfo)];\n }\n if (typeof els === 'string') {\n this.parse.parseNode(\n els, \n ['selector'],\n this._index, \n this._fileInfo, \n function(err, result) {\n if (err) {\n throw new LessError({\n index: err.index,\n message: err.message\n }, this.parse.imports, this._fileInfo.filename);\n }\n els = result[0].elements;\n });\n }\n return els;\n};\n\nSelector.prototype.createEmptySelectors = function() {\n const el = new Element('', '&', false, this._index, this._fileInfo);\n const sels = [new Selector([el], null, null, this._index, this._fileInfo)];\n sels[0].mediaEmpty = true;\n return sels;\n};\n\nSelector.prototype.match = function(other) {\n const elements = this.elements;\n const len = elements.length;\n let olen;\n let i;\n\n other = other.mixinElements();\n olen = other.length;\n if (olen === 0 || len < olen) {\n return 0;\n } else {\n for (i = 0; i < olen; i++) {\n if (elements[i].value !== other[i]) {\n return 0;\n }\n }\n }\n\n return olen; // return number of matched elements\n};\n\nSelector.prototype.mixinElements = function() {\n if (this.mixinElements_) {\n return this.mixinElements_;\n }\n\n let elements = this.elements.map( v => v.combinator.value + (v.value.value || v.value)).join('').match(/[,&#\\*\\.\\w-]([\\w-]|(\\\\.))*/g);\n\n if (elements) {\n if (elements[0] === '&') {\n elements.shift();\n }\n } else {\n elements = [];\n }\n\n return (this.mixinElements_ = elements);\n};\n\nSelector.prototype.isJustParentSelector = function() {\n return !this.mediaEmpty &&\n this.elements.length === 1 &&\n this.elements[0].value === '&' &&\n (this.elements[0].combinator.value === ' ' || this.elements[0].combinator.value === '');\n};\n\nSelector.prototype.eval = function(context) {\n const evaldCondition = this.condition && this.condition.eval(context);\n let elements = this.elements;\n let extendList = this.extendList;\n\n elements = elements && elements.map(e => e.eval(context));\n extendList = extendList && extendList.map(extend => extend.eval(context));\n\n return this.createDerived(elements, extendList, evaldCondition);\n};\n\nSelector.prototype.genCSS = function(context, output) {\n let i;\n let element;\n if ((!context || !context.firstSelector) && this.elements[0].combinator.value === '') {\n output.add(' ', this.fileInfo(), this.getIndex());\n }\n for (i = 0; i < this.elements.length; i++) {\n element = this.elements[i];\n element.genCSS(context, output);\n }\n};\n\nSelector.prototype.getIsOutput = function() {\n return this.evaldCondition;\n};\n\nSelector.prototype.type = 'Selector';\nexport default Selector;\n"]}