UNPKG

@bem-plus/class-generator

Version:

The `@bem-plus/class-generator` allows you to generate boilerplate JavaScript or TypeScript code from your Stylesheets.

1,460 lines (1,234 loc) 526 kB
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') { module.exports = factory(); }else if(typeof define === 'function' && define.amd) { define([], factory); } else { var a = factory(); for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; } })(this, () => { return (() => { // webpackBootstrap var __webpack_modules__ = ({ "./node_modules/balanced-match/index.js": (function (module) { "use strict"; module.exports = balanced; function balanced(a, b, str) { if (a instanceof RegExp) a = maybeMatch(a, str); if (b instanceof RegExp) b = maybeMatch(b, str); var r = range(a, b, str); return r && { start: r[0], end: r[1], pre: str.slice(0, r[0]), body: str.slice(r[0] + a.length, r[1]), post: str.slice(r[1] + b.length) }; } function maybeMatch(reg, str) { var m = str.match(reg); return m ? m[0] : null; } balanced.range = range; function range(a, b, str) { var begs, beg, left, right, result; var ai = str.indexOf(a); var bi = str.indexOf(b, ai + 1); var i = ai; if (ai >= 0 && bi > 0) { if(a===b) { return [ai, bi]; } begs = []; left = str.length; while (i >= 0 && !result) { if (i == ai) { begs.push(i); ai = str.indexOf(a, i + 1); } else if (begs.length == 1) { result = [ begs.pop(), bi ]; } else { beg = begs.pop(); if (beg < left) { left = beg; right = bi; } bi = str.indexOf(b, i + 1); } i = ai < bi && ai >= 0 ? ai : bi; } if (begs.length) { result = [ left, right ]; } } return result; } }), "./node_modules/brace-expansion/index.js": (function (module, __unused_webpack_exports, __webpack_require__) { var balanced = __webpack_require__(/*! balanced-match */ "./node_modules/balanced-match/index.js"); module.exports = expandTop; var escSlash = '\0SLASH'+Math.random()+'\0'; var escOpen = '\0OPEN'+Math.random()+'\0'; var escClose = '\0CLOSE'+Math.random()+'\0'; var escComma = '\0COMMA'+Math.random()+'\0'; var escPeriod = '\0PERIOD'+Math.random()+'\0'; function numeric(str) { return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); } function escapeBraces(str) { return str.split('\\\\').join(escSlash) .split('\\{').join(escOpen) .split('\\}').join(escClose) .split('\\,').join(escComma) .split('\\.').join(escPeriod); } function unescapeBraces(str) { return str.split(escSlash).join('\\') .split(escOpen).join('{') .split(escClose).join('}') .split(escComma).join(',') .split(escPeriod).join('.'); } // Basically just str.split(","), but handling cases // where we have nested braced sections, which should be // treated as individual members, like {a,{b,c},d} function parseCommaParts(str) { if (!str) return ['']; var parts = []; var m = balanced('{', '}', str); if (!m) return str.split(','); var pre = m.pre; var body = m.body; var post = m.post; var p = pre.split(','); p[p.length-1] += '{' + body + '}'; var postParts = parseCommaParts(post); if (post.length) { p[p.length-1] += postParts.shift(); p.push.apply(p, postParts); } parts.push.apply(parts, p); return parts; } function expandTop(str) { if (!str) return []; // I don't know why Bash 4.3 does this, but it does. // Anything starting with {} will have the first two bytes preserved // but *only* at the top level, so {},a}b will not expand to anything, // but a{},b}c will be expanded to [a}c,abc]. // One could argue that this is a bug in Bash, but since the goal of // this module is to match Bash's rules, we escape a leading {} if (str.substr(0, 2) === '{}') { str = '\\{\\}' + str.substr(2); } return expand(escapeBraces(str), true).map(unescapeBraces); } function embrace(str) { return '{' + str + '}'; } function isPadded(el) { return /^-?0\d/.test(el); } function lte(i, y) { return i <= y; } function gte(i, y) { return i >= y; } function expand(str, isTop) { var expansions = []; var m = balanced('{', '}', str); if (!m) return [str]; // no need to expand pre, since it is guaranteed to be free of brace-sets var pre = m.pre; var post = m.post.length ? expand(m.post, false) : ['']; if (/\$$/.test(m.pre)) { for (var k = 0; k < post.length; k++) { var expansion = pre+ '{' + m.body + '}' + post[k]; expansions.push(expansion); } } else { var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(',') >= 0; if (!isSequence && !isOptions) { // {a},b} if (m.post.match(/,.*\}/)) { str = m.pre + '{' + m.body + escClose + m.post; return expand(str); } return [str]; } var n; if (isSequence) { n = m.body.split(/\.\./); } else { n = parseCommaParts(m.body); if (n.length === 1) { // x{{a,b}}y ==> x{a}y x{b}y n = expand(n[0], false).map(embrace); if (n.length === 1) { return post.map(function(p) { return m.pre + n[0] + p; }); } } } // at this point, n is the parts, and we know it's not a comma set // with a single entry. var N; if (isSequence) { var x = numeric(n[0]); var y = numeric(n[1]); var width = Math.max(n[0].length, n[1].length) var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; var test = lte; var reverse = y < x; if (reverse) { incr *= -1; test = gte; } var pad = n.some(isPadded); N = []; for (var i = x; test(i, y); i += incr) { var c; if (isAlphaSequence) { c = String.fromCharCode(i); if (c === '\\') c = ''; } else { c = String(i); if (pad) { var need = width - c.length; if (need > 0) { var z = new Array(need + 1).join('0'); if (i < 0) c = '-' + z + c.slice(1); else c = z + c; } } } N.push(c); } } else { N = []; for (var j = 0; j < n.length; j++) { N.push.apply(N, expand(n[j], false)); } } for (var j = 0; j < N.length; j++) { for (var k = 0; k < post.length; k++) { var expansion = pre + N[j] + post[k]; if (!isTop || isSequence || expansion) expansions.push(expansion); } } } return expansions; } }), "./node_modules/colors/lib/colors.js": (function (module, __unused_webpack_exports, __webpack_require__) { /* module decorator */ module = __webpack_require__.nmd(module); /* The MIT License (MIT) Original Library - Copyright (c) Marak Squires Additional functionality - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ var colors = {}; module['exports'] = colors; colors.themes = {}; var util = __webpack_require__(/*! util */ "util"); var ansiStyles = colors.styles = __webpack_require__(/*! ./styles */ "./node_modules/colors/lib/styles.js"); var defineProps = Object.defineProperties; var newLineRegex = new RegExp(/[\r\n]+/g); colors.supportsColor = (__webpack_require__(/*! ./system/supports-colors */ "./node_modules/colors/lib/system/supports-colors.js")/* .supportsColor */.supportsColor); if (typeof colors.enabled === 'undefined') { colors.enabled = colors.supportsColor() !== false; } colors.enable = function() { colors.enabled = true; }; colors.disable = function() { colors.enabled = false; }; colors.stripColors = colors.strip = function(str) { return ('' + str).replace(/\x1B\[\d+m/g, ''); }; // eslint-disable-next-line no-unused-vars var stylize = colors.stylize = function stylize(str, style) { if (!colors.enabled) { return str+''; } var styleMap = ansiStyles[style]; // Stylize should work for non-ANSI styles, too if(!styleMap && style in colors){ // Style maps like trap operate as functions on strings; // they don't have properties like open or close. return colors[style](str); } return styleMap.open + str + styleMap.close; }; var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; var escapeStringRegexp = function(str) { if (typeof str !== 'string') { throw new TypeError('Expected a string'); } return str.replace(matchOperatorsRe, '\\$&'); }; function build(_styles) { var builder = function builder() { return applyStyle.apply(builder, arguments); }; builder._styles = _styles; // __proto__ is used because we must return a function, but there is // no way to create a function with a different prototype. builder.__proto__ = proto; return builder; } var styles = (function() { var ret = {}; ansiStyles.grey = ansiStyles.gray; Object.keys(ansiStyles).forEach(function(key) { ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); ret[key] = { get: function() { return build(this._styles.concat(key)); }, }; }); return ret; })(); var proto = defineProps(function colors() {}, styles); function applyStyle() { var args = Array.prototype.slice.call(arguments); var str = args.map(function(arg) { // Use weak equality check so we can colorize null/undefined in safe mode if (arg != null && arg.constructor === String) { return arg; } else { return util.inspect(arg); } }).join(' '); if (!colors.enabled || !str) { return str; } var newLinesPresent = str.indexOf('\n') != -1; var nestedStyles = this._styles; var i = nestedStyles.length; while (i--) { var code = ansiStyles[nestedStyles[i]]; str = code.open + str.replace(code.closeRe, code.open) + code.close; if (newLinesPresent) { str = str.replace(newLineRegex, function(match) { return code.close + match + code.open; }); } } return str; } colors.setTheme = function(theme) { if (typeof theme === 'string') { console.log('colors.setTheme now only accepts an object, not a string. ' + 'If you are trying to set a theme from a file, it is now your (the ' + 'caller\'s) responsibility to require the file. The old syntax ' + 'looked like colors.setTheme(__dirname + ' + '\'/../themes/generic-logging.js\'); The new syntax looks like '+ 'colors.setTheme(require(__dirname + ' + '\'/../themes/generic-logging.js\'));'); return; } for (var style in theme) { (function(style) { colors[style] = function(str) { if (typeof theme[style] === 'object') { var out = str; for (var i in theme[style]) { out = colors[theme[style][i]](out); } return out; } return colors[theme[style]](str); }; })(style); } }; function init() { var ret = {}; Object.keys(styles).forEach(function(name) { ret[name] = { get: function() { return build([name]); }, }; }); return ret; } var sequencer = function sequencer(map, str) { var exploded = str.split(''); exploded = exploded.map(map); return exploded.join(''); }; // custom formatter methods colors.trap = __webpack_require__(/*! ./custom/trap */ "./node_modules/colors/lib/custom/trap.js"); colors.zalgo = __webpack_require__(/*! ./custom/zalgo */ "./node_modules/colors/lib/custom/zalgo.js"); // maps colors.maps = {}; colors.maps.america = __webpack_require__(/*! ./maps/america */ "./node_modules/colors/lib/maps/america.js")(colors); colors.maps.zebra = __webpack_require__(/*! ./maps/zebra */ "./node_modules/colors/lib/maps/zebra.js")(colors); colors.maps.rainbow = __webpack_require__(/*! ./maps/rainbow */ "./node_modules/colors/lib/maps/rainbow.js")(colors); colors.maps.random = __webpack_require__(/*! ./maps/random */ "./node_modules/colors/lib/maps/random.js")(colors); for (var map in colors.maps) { (function(map) { colors[map] = function(str) { return sequencer(colors.maps[map], str); }; })(map); } defineProps(colors, init()); }), "./node_modules/colors/lib/custom/trap.js": (function (module, __unused_webpack_exports, __webpack_require__) { /* module decorator */ module = __webpack_require__.nmd(module); module['exports'] = function runTheTrap(text, options) { var result = ''; text = text || 'Run the trap, drop the bass'; text = text.split(''); var trap = { a: ['\u0040', '\u0104', '\u023a', '\u0245', '\u0394', '\u039b', '\u0414'], b: ['\u00df', '\u0181', '\u0243', '\u026e', '\u03b2', '\u0e3f'], c: ['\u00a9', '\u023b', '\u03fe'], d: ['\u00d0', '\u018a', '\u0500', '\u0501', '\u0502', '\u0503'], e: ['\u00cb', '\u0115', '\u018e', '\u0258', '\u03a3', '\u03be', '\u04bc', '\u0a6c'], f: ['\u04fa'], g: ['\u0262'], h: ['\u0126', '\u0195', '\u04a2', '\u04ba', '\u04c7', '\u050a'], i: ['\u0f0f'], j: ['\u0134'], k: ['\u0138', '\u04a0', '\u04c3', '\u051e'], l: ['\u0139'], m: ['\u028d', '\u04cd', '\u04ce', '\u0520', '\u0521', '\u0d69'], n: ['\u00d1', '\u014b', '\u019d', '\u0376', '\u03a0', '\u048a'], o: ['\u00d8', '\u00f5', '\u00f8', '\u01fe', '\u0298', '\u047a', '\u05dd', '\u06dd', '\u0e4f'], p: ['\u01f7', '\u048e'], q: ['\u09cd'], r: ['\u00ae', '\u01a6', '\u0210', '\u024c', '\u0280', '\u042f'], s: ['\u00a7', '\u03de', '\u03df', '\u03e8'], t: ['\u0141', '\u0166', '\u0373'], u: ['\u01b1', '\u054d'], v: ['\u05d8'], w: ['\u0428', '\u0460', '\u047c', '\u0d70'], x: ['\u04b2', '\u04fe', '\u04fc', '\u04fd'], y: ['\u00a5', '\u04b0', '\u04cb'], z: ['\u01b5', '\u0240'], }; text.forEach(function(c) { c = c.toLowerCase(); var chars = trap[c] || [' ']; var rand = Math.floor(Math.random() * chars.length); if (typeof trap[c] !== 'undefined') { result += trap[c][rand]; } else { result += c; } }); return result; }; }), "./node_modules/colors/lib/custom/zalgo.js": (function (module, __unused_webpack_exports, __webpack_require__) { /* module decorator */ module = __webpack_require__.nmd(module); // please no module['exports'] = function zalgo(text, options) { text = text || ' he is here '; var soul = { 'up': [ '̍', '̎', '̄', '̅', '̿', '̑', '̆', '̐', '͒', '͗', '͑', '̇', '̈', '̊', '͂', '̓', '̈', '͊', '͋', '͌', '̃', '̂', '̌', '͐', '̀', '́', '̋', '̏', '̒', '̓', '̔', '̽', '̉', 'ͣ', 'ͤ', 'ͥ', 'ͦ', 'ͧ', 'ͨ', 'ͩ', 'ͪ', 'ͫ', 'ͬ', 'ͭ', 'ͮ', 'ͯ', '̾', '͛', '͆', '̚', ], 'down': [ '̖', '̗', '̘', '̙', '̜', '̝', '̞', '̟', '̠', '̤', '̥', '̦', '̩', '̪', '̫', '̬', '̭', '̮', '̯', '̰', '̱', '̲', '̳', '̹', '̺', '̻', '̼', 'ͅ', '͇', '͈', '͉', '͍', '͎', '͓', '͔', '͕', '͖', '͙', '͚', '̣', ], 'mid': [ '̕', '̛', '̀', '́', '͘', '̡', '̢', '̧', '̨', '̴', '̵', '̶', '͜', '͝', '͞', '͟', '͠', '͢', '̸', '̷', '͡', ' ҉', ], }; var all = [].concat(soul.up, soul.down, soul.mid); function randomNumber(range) { var r = Math.floor(Math.random() * range); return r; } function isChar(character) { var bool = false; all.filter(function(i) { bool = (i === character); }); return bool; } function heComes(text, options) { var result = ''; var counts; var l; options = options || {}; options['up'] = typeof options['up'] !== 'undefined' ? options['up'] : true; options['mid'] = typeof options['mid'] !== 'undefined' ? options['mid'] : true; options['down'] = typeof options['down'] !== 'undefined' ? options['down'] : true; options['size'] = typeof options['size'] !== 'undefined' ? options['size'] : 'maxi'; text = text.split(''); for (l in text) { if (isChar(l)) { continue; } result = result + text[l]; counts = {'up': 0, 'down': 0, 'mid': 0}; switch (options.size) { case 'mini': counts.up = randomNumber(8); counts.mid = randomNumber(2); counts.down = randomNumber(8); break; case 'maxi': counts.up = randomNumber(16) + 3; counts.mid = randomNumber(4) + 1; counts.down = randomNumber(64) + 3; break; default: counts.up = randomNumber(8) + 1; counts.mid = randomNumber(6) / 2; counts.down = randomNumber(8) + 1; break; } var arr = ['up', 'mid', 'down']; for (var d in arr) { var index = arr[d]; for (var i = 0; i <= counts[index]; i++) { if (options[index]) { result = result + soul[index][randomNumber(soul[index].length)]; } } } } return result; } // don't summon him return heComes(text, options); }; }), "./node_modules/colors/lib/extendStringPrototype.js": (function (module, __unused_webpack_exports, __webpack_require__) { /* module decorator */ module = __webpack_require__.nmd(module); var colors = __webpack_require__(/*! ./colors */ "./node_modules/colors/lib/colors.js"); module['exports'] = function() { // // Extends prototype of native string object to allow for "foo".red syntax // var addProperty = function(color, func) { String.prototype.__defineGetter__(color, func); }; addProperty('strip', function() { return colors.strip(this); }); addProperty('stripColors', function() { return colors.strip(this); }); addProperty('trap', function() { return colors.trap(this); }); addProperty('zalgo', function() { return colors.zalgo(this); }); addProperty('zebra', function() { return colors.zebra(this); }); addProperty('rainbow', function() { return colors.rainbow(this); }); addProperty('random', function() { return colors.random(this); }); addProperty('america', function() { return colors.america(this); }); // // Iterate through all default styles and colors // var x = Object.keys(colors.styles); x.forEach(function(style) { addProperty(style, function() { return colors.stylize(this, style); }); }); function applyTheme(theme) { // // Remark: This is a list of methods that exist // on String that you should not overwrite. // var stringPrototypeBlacklist = [ '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt', 'indexOf', 'lastIndexOf', 'length', 'localeCompare', 'match', 'repeat', 'replace', 'search', 'slice', 'split', 'substring', 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight', ]; Object.keys(theme).forEach(function(prop) { if (stringPrototypeBlacklist.indexOf(prop) !== -1) { console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. ' + 'Ignoring style name'); } else { if (typeof(theme[prop]) === 'string') { colors[prop] = colors[theme[prop]]; addProperty(prop, function() { return colors[prop](this); }); } else { var themePropApplicator = function(str) { var ret = str || this; for (var t = 0; t < theme[prop].length; t++) { ret = colors[theme[prop][t]](ret); } return ret; }; addProperty(prop, themePropApplicator); colors[prop] = function(str) { return themePropApplicator(str); }; } } }); } colors.setTheme = function(theme) { if (typeof theme === 'string') { console.log('colors.setTheme now only accepts an object, not a string. ' + 'If you are trying to set a theme from a file, it is now your (the ' + 'caller\'s) responsibility to require the file. The old syntax ' + 'looked like colors.setTheme(__dirname + ' + '\'/../themes/generic-logging.js\'); The new syntax looks like '+ 'colors.setTheme(require(__dirname + ' + '\'/../themes/generic-logging.js\'));'); return; } else { applyTheme(theme); } }; }; }), "./node_modules/colors/lib/index.js": (function (module, __unused_webpack_exports, __webpack_require__) { /* module decorator */ module = __webpack_require__.nmd(module); var colors = __webpack_require__(/*! ./colors */ "./node_modules/colors/lib/colors.js"); module['exports'] = colors; // Remark: By default, colors will add style properties to String.prototype. // // If you don't wish to extend String.prototype, you can do this instead and // native String will not be touched: // // var colors = require('colors/safe); // colors.red("foo") // // __webpack_require__(/*! ./extendStringPrototype */ "./node_modules/colors/lib/extendStringPrototype.js")(); }), "./node_modules/colors/lib/maps/america.js": (function (module, __unused_webpack_exports, __webpack_require__) { /* module decorator */ module = __webpack_require__.nmd(module); module['exports'] = function(colors) { return function(letter, i, exploded) { if (letter === ' ') return letter; switch (i%3) { case 0: return colors.red(letter); case 1: return colors.white(letter); case 2: return colors.blue(letter); } }; }; }), "./node_modules/colors/lib/maps/rainbow.js": (function (module, __unused_webpack_exports, __webpack_require__) { /* module decorator */ module = __webpack_require__.nmd(module); module['exports'] = function(colors) { // RoY G BiV var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; return function(letter, i, exploded) { if (letter === ' ') { return letter; } else { return colors[rainbowColors[i++ % rainbowColors.length]](letter); } }; }; }), "./node_modules/colors/lib/maps/random.js": (function (module, __unused_webpack_exports, __webpack_require__) { /* module decorator */ module = __webpack_require__.nmd(module); module['exports'] = function(colors) { var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta', 'brightYellow', 'brightRed', 'brightGreen', 'brightBlue', 'brightWhite', 'brightCyan', 'brightMagenta']; return function(letter, i, exploded) { return letter === ' ' ? letter : colors[ available[Math.round(Math.random() * (available.length - 2))] ](letter); }; }; }), "./node_modules/colors/lib/maps/zebra.js": (function (module, __unused_webpack_exports, __webpack_require__) { /* module decorator */ module = __webpack_require__.nmd(module); module['exports'] = function(colors) { return function(letter, i, exploded) { return i % 2 === 0 ? letter : colors.inverse(letter); }; }; }), "./node_modules/colors/lib/styles.js": (function (module, __unused_webpack_exports, __webpack_require__) { /* module decorator */ module = __webpack_require__.nmd(module); /* The MIT License (MIT) Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ var styles = {}; module['exports'] = styles; var codes = { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29], black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], gray: [90, 39], grey: [90, 39], brightRed: [91, 39], brightGreen: [92, 39], brightYellow: [93, 39], brightBlue: [94, 39], brightMagenta: [95, 39], brightCyan: [96, 39], brightWhite: [97, 39], bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgGray: [100, 49], bgGrey: [100, 49], bgBrightRed: [101, 49], bgBrightGreen: [102, 49], bgBrightYellow: [103, 49], bgBrightBlue: [104, 49], bgBrightMagenta: [105, 49], bgBrightCyan: [106, 49], bgBrightWhite: [107, 49], // legacy styles for colors pre v1.0.0 blackBG: [40, 49], redBG: [41, 49], greenBG: [42, 49], yellowBG: [43, 49], blueBG: [44, 49], magentaBG: [45, 49], cyanBG: [46, 49], whiteBG: [47, 49], }; Object.keys(codes).forEach(function(key) { var val = codes[key]; var style = styles[key] = []; style.open = '\u001b[' + val[0] + 'm'; style.close = '\u001b[' + val[1] + 'm'; }); }), "./node_modules/colors/lib/system/has-flag.js": (function (module) { "use strict"; /* MIT License Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ module.exports = function(flag, argv) { argv = argv || process.argv; var terminatorPos = argv.indexOf('--'); var prefix = /^-{1,2}/.test(flag) ? '' : '--'; var pos = argv.indexOf(prefix + flag); return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); }; }), "./node_modules/colors/lib/system/supports-colors.js": (function (module, __unused_webpack_exports, __webpack_require__) { "use strict"; /* The MIT License (MIT) Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ var os = __webpack_require__(/*! os */ "os"); var hasFlag = __webpack_require__(/*! ./has-flag.js */ "./node_modules/colors/lib/system/has-flag.js"); var env = process.env; var forceColor = void 0; if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) { forceColor = false; } else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) { forceColor = true; } if ('FORCE_COLOR' in env) { forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; } function translateLevel(level) { if (level === 0) { return false; } return { level: level, hasBasic: true, has256: level >= 2, has16m: level >= 3, }; } function supportsColor(stream) { if (forceColor === false) { return 0; } if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) { return 3; } if (hasFlag('color=256')) { return 2; } if (stream && !stream.isTTY && forceColor !== true) { return 0; } var min = forceColor ? 1 : 0; if (process.platform === 'win32') { // Node.js 7.5.0 is the first version of Node.js to include a patch to // libuv that enables 256 color output on Windows. Anything earlier and it // won't work. However, here we target Node.js 8 at minimum as it is an LTS // release, and Node.js 7 is not. Windows 10 build 10586 is the first // Windows release that supports 256 colors. Windows 10 build 14931 is the // first release that supports 16m/TrueColor. var osRelease = os.release().split('.'); if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { return Number(osRelease[2]) >= 14931 ? 3 : 2; } return 1; } if ('CI' in env) { if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function(sign) { return sign in env; }) || env.CI_NAME === 'codeship') { return 1; } return min; } if ('TEAMCITY_VERSION' in env) { return (/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0 ); } if ('TERM_PROGRAM' in env) { var version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); switch (env.TERM_PROGRAM) { case 'iTerm.app': return version >= 3 ? 3 : 2; case 'Hyper': return 3; case 'Apple_Terminal': return 2; // No default } } if (/-256(color)?$/i.test(env.TERM)) { return 2; } if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { return 1; } if ('COLORTERM' in env) { return 1; } if (env.TERM === 'dumb') { return min; } return min; } function getSupportLevel(stream) { var level = supportsColor(stream); return translateLevel(level); } module.exports = { supportsColor: getSupportLevel, stdout: getSupportLevel(process.stdout), stderr: getSupportLevel(process.stderr), }; }), "./src/generator/classes/Autoloader.ts": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, { Autoloader: function() { return Autoloader; } }); /* harmony import */var _const__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../const */ "./src/generator/const.ts"); /* harmony import */var node_path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! node:path */ "node:path"); /* harmony import */var node_path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(node_path__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */var fs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! fs */ "fs"); /* harmony import */var fs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../helpers */ "./src/helpers.ts"); class Autoloader { constructor(config, blocks) { this.config = config; this.blocks = blocks; this.matchers = { export: new RegExp('(?<=export \\* from [\'"`]).*(?=[\'"`])', 'g') }; } async write() { const autoGeneratedDisclaimerString = `/* ${_const__WEBPACK_IMPORTED_MODULE_0__.AUTO_GENERATED_DISCLAIMER} */`; const mapsString = this.blocks.filter((block) => block.module.length).map((block) => block.autoloader).join(',\n'); const fullMap = `${autoGeneratedDisclaimerString}\n\nexport default {\n${mapsString}\n}\n`; const fileName = `autoloader.${this.config.output.language}`; const filePath = node_path__WEBPACK_IMPORTED_MODULE_1___default().resolve(this.config.output.path, fileName); const existing = await (0,_helpers__WEBPACK_IMPORTED_MODULE_3__.getFileContents)([filePath]); if (existing.length) { if (JSON.stringify(existing[0].contents) !== JSON.stringify(fullMap)) { await fs__WEBPACK_IMPORTED_MODULE_2___default().promises.writeFile(filePath, fullMap, { flag: 'w' }); } } } } }), "./src/generator/classes/Barrel.ts": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, { Barrel: function() { return Barrel; } }); /* harmony import */var _const__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../const */ "./src/generator/const.ts"); /* harmony import */var node_path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! node:path */ "node:path"); /* harmony import */var node_path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(node_path__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */var fs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! fs */ "fs"); /* harmony import */var fs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */var _types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../types */ "./src/generator/types.ts"); /* harmony import */var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../helpers */ "./src/helpers.ts"); class Barrel { constructor(config, blocks) { this.config = config; this.blocks = blocks; this.matchers = { export: new RegExp('(?<=export \\* from [\'"`]).*(?=[\'"`])', 'g') }; } async write() { const autoGeneratedDisclaimerString = `/* ${_const__WEBPACK_IMPORTED_MODULE_0__.AUTO_GENERATED_DISCLAIMER} */`; const importsString = this.blocks.filter((block) => block.module.length).map((block) => block.importExport).join('\n'); const fullIndex = `${autoGeneratedDisclaimerString}\n\n${importsString}`; const fileName = `index.${this.config.output.language}`; const filePath = node_path__WEBPACK_IMPORTED_MODULE_1___default().resolve(this.config.output.path, fileName); const existing = await (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.getFileContents)([filePath]); if (existing.length) { if (JSON.stringify(existing[0].contents) !== JSON.stringify(fullIndex)) { await fs__WEBPACK_IMPORTED_MODULE_2___default().promises.writeFile(filePath, fullIndex, { flag: 'w' }); } } } async clearObsoleteModules() { const otherExt = this.config.output.language === _types__WEBPACK_IMPORTED_MODULE_3__.EOutputLanguage.ts ? _types__WEBPACK_IMPORTED_MODULE_3__.EOutputLanguage.js : _types__WEBPACK_IMPORTED_MODULE_3__.EOutputLanguage.ts; let index = await (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.getFileContents)([node_path__WEBPACK_IMPORTED_MODULE_1___default().resolve(this.config.output.path, `index.${this.config.output.language}`)]); if (!index[0].success) { index = await (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.getFileContents)([node_path__WEBPACK_IMPORTED_MODULE_1___default().resolve(this.config.output.path, `index.${otherExt}`)]); if (!index[0].success) { return; } } const oldModulePaths = (index[0].contents.match(this.matchers.export) || []) .map((oldRelativePath) => node_path__WEBPACK_IMPORTED_MODULE_1___default().resolve(this.config.output.path, oldRelativePath)); const newModulePaths = this.blocks .filter((block) => block.module.length) .map((block) => { const parsed = node_path__WEBPACK_IMPORTED_MODULE_1___default().parse(block.output); return node_path__WEBPACK_IMPORTED_MODULE_1___default().resolve(node_path__WEBPACK_IMPORTED_MODULE_1___default().join(parsed.dir, parsed.name)); }); const obsoleteModulePaths = oldModulePaths .filter((oldModulePath) => !newModulePaths.includes(oldModulePath)) .map((oldModulePath) => node_path__WEBPACK_IMPORTED_MODULE_1___default().resolve(this.config.output.path, oldModulePath)); const obsoleteModulePathsWithCurrentExt = obsoleteModulePaths.map((obsoleteModulePath) => `${obsoleteModulePath}.${this.config.output.language}`); const fileContentsWithCurrentExt = await (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.getFileContents)(obsoleteModulePathsWithCurrentExt); const confirmedModules = []; const retryWithOldExt = []; fileContentsWithCurrentExt.forEach((fileContent, key) => { if (!fileContent.success) { retryWithOldExt.push(obsoleteModulePaths[key]); } else if (fileContent.contents.includes(_const__WEBPACK_IMPORTED_MODULE_0__.AUTO_GENERATED_DISCLAIMER)) { confirmedModules.push(obsoleteModulePathsWithCurrentExt[key]); } }); if (retryWithOldExt.length) { const obsoleteModulePathsWithOldExt = retryWithOldExt.map((obsoleteModulePath) => `${obsoleteModulePath}.${otherExt}`); const fileContentsWithOldExt = await (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.getFileContents)(obsoleteModulePathsWithOldExt); fileContentsWithOldExt.forEach((fileContent, key) => { if (fileContent.success && fileContent.contents.includes(_const__WEBPACK_IMPORTED_MODULE_0__.AUTO_GENERATED_DISCLAIMER)) { confirmedModules.push(obsoleteModulePathsWithCurrentExt[key]); } }); } const unlinkPromises = confirmedModules.map((obsoleteModule) => { const fullPath = node_path__WEBPACK_IMPORTED_MODULE_1___default().resolve(this.config.output.path, obsoleteModule); return fs__WEBPACK_IMPORTED_MODULE_2___default().promises.unlink(fullPath); }); await Promise.all(unlinkPromises); (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.unique)(confirmedModules.map((module) => node_path__WEBPACK_IMPORTED_MODULE_1___default().dirname(module))).forEach((dir) => { this.recursivelyDeleteEmptyDir(dir); }); } recursivelyDeleteEmptyDir(dir) { const isEmpty = fs__WEBPACK_IMPORTED_MODULE_2___default().readdirSync(dir).length === 0; if (isEmpty) { fs__WEBPACK_IMPORTED_MODULE_2___default().rmdirSync(dir); this.recursivelyDeleteEmptyDir(node_path__WEBPACK_IMPORTED_MODULE_1___default().resolve(dir, '..')); } } } }), "./src/generator/classes/Block.ts": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, { Block: function() { return Block; } }); /* harmony import */var _templates_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../templates/module */ "./src/generator/templates/module.ts"); /* harmony import */var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../helpers */ "./src/helpers.ts"); /* harmony import */var _types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../types */ "./src/generator/types.ts"); /* harmony import */var _templates_rootReference__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../templates/rootReference */ "./src/generator/templates/rootReference.ts"); /* harmony import */var fs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! fs */ "fs"); /* harmony import */var fs__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */var node_path__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! node:path */ "node:path"); /* harmony import */var node_path__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(node_path__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */var _templates_importExport__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../templates/importExport */ "./src/generator/templates/importExport.ts"); /* harmony import */var _const__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../const */ "./src/generator/const.ts"); class Block { constructor(config, name = '') { this.config = config; this.name = name; this.elements = []; this.output = ''; this.module = ''; this.importExport = ''; this.autoloader = ''; } generateModule() { const isTypeScript = this.config.output.language === _types__WEBPACK_IMPORTED_MODULE_2__.EOutputLanguage.ts; const rootReference = (0,_templates_rootReference__WEBPACK_IMPORTED_MODULE_3__.rootReferenceTemplate)({ isTypeScript, className: (0,_helpers__WEBPACK_IMPORTED_MODULE_1__.pascal)(this.name) }); const elementTemplates = this.elements.map((element) => element.generateTemplates(this.name, isTypeScript)); this.module = (0,_templates_module__WEBPACK_IMPORTED_MODULE_0__.moduleTemplate)({ isTypeScript, elementClasses: elementTemplates.map((templateGroup) => templateGroup.class).join('\n'), elementProperties: elementTemplates.map((templateGroup) => templateGroup.property).filter((prop) => prop.length).join('\n'), elementReferences: elementTemplates.map((templateGroup) => templateGroup.reference).filter((ref) => ref.length).join('\n'), className: this.config.output.moduleClass((0,_helpers__WEBPACK_IMPORTED_MODULE_1__.pascal)(this.name)), rootReference, prefix: this.config.output.prefix, suffix: this.config.output.suffix, autoGeneratedDisclaimer: _const__WEBPACK_IMPORTED_MODULE_7__.AUTO_GENERATED_DISCLAIMER }); } setImportExport() { const relativePath = node_path__WEBPACK_IMPORTED_MODULE_5___default().relative(this.config.output.path, this.output); const pathWithoutExt = relativePath.split('.').slice(0, -1).join('.'); const fullPath = pathWithoutExt.startsWith('.') ? pathWithoutExt : `./${pathWithoutExt}`; this.importExport = (0,_templates_importExport__WEBPACK_IMPORTED_MODULE_6__.importExportTemplate)(fullPath); } async setAutoloader() { } async writeModule() { await this.setAutoloader(); const filePath = node_path__WEBPACK_IMPORTED_MODULE_5___default().dirname(this.output); if (!this.module.length) { return; } if (!fs__WEBPACK_IMPORTED_MODULE_4___default().existsSync(filePath)) { await fs__WEBPACK_IMPORTED_MODULE_4___default().promises.mkdir(filePath, { recursive: true }); } const existing = await (0,_helpers__WEBPACK_IMPORTED_MODULE_1__.getFileContents)([this.output]); if (existing.length) { if (JSON.stringify(existing[0].contents) !== JSON.stringify(this.module)) { await fs__WEBPACK_IMPORTED_MODULE_4___default().promises.writeFile(this.output, this.module, { flag: 'w' }); } } } async init() { } } }), "./src/generator/classes/DistBlock.ts": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, { DistBlock: function() { return DistBlock; } }); /* harmony import */var node_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! node:path */ "node:path"); /* harmony import */var node_path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(node_path__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */var _Element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Element */ "./src/generator/classes/Element.ts"); /* harmony import */var _Block__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Block */ "./src/generator/classes/Block.ts"); class DistBlock extends _Block__WEBPACK_IMPORTED_MODULE_2__.Block { constructor({ config, name, elementStrings, allModifiers }) { super(config, name); const absolutePath = node_path__WEBPACK_IMPORTED_MODULE_0___default().resolve(this.config.output.path, config.output.filename(this.name, config.output.language)); this.output = node_path__WEBPACK_IMPORTED_MODULE_0___default().relative(process.cwd(), absolutePath); this.setImportExport(); this.getElements(elementStrings, allModifiers); this.generateModule(); } async setAutoloader() { this.autoloader = ` '.${this.name}': '${this.output}'`; } getElements(elementStrings, allModifiers) { this.elements = [this.config.input.rootMixinSuffix, ...elementStrings] .map((elementString) => new _Element__WEBPACK_IMPORTED_MODULE_1__.Element({ config: this.config, name: elementString.split(this.config.input.separators.element)[0], blockName: this.name, allModifiers })); } } }), "./src/generator/classes/Element.ts": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, { Element: function() { return Element; } }); /* harmony import */var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helpers */ "./src/helpers.ts"); /* harmony import */var _templates_modifier__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../templates/modifier */ "./src/generator/templates/modifier.ts"); /* harmony import */var _templates_elementClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../templates/elementClass */ "./src/generator/templates/elementClass.ts"); /* harmony import */var _templates_elementReference__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../templates/elementReference */ "./src/generator/templates/elementReference.ts"); /* harmony import */var _templates_elementProperty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../templates/elementProperty */ "./src/generator/templates/elementProperty.ts"); /* harmony import */var _messages__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../messages */ "./src/generator/messages.ts"); /* harmony import */var _const__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../const */ "./src/generator/const.ts"); /* harmony import */var _templates_elementArgumentTemplate__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../templates/elementArgumentTemplate */ "./src/generator/templates/elementArgumentTemplate.ts"); class Element { constructor({ config, name, blockName, allModifiers, context }) { this.props = { type: 'HTMLElement' }; this.matchers = { elementProps: (block, element) => new RegExp(`(?<=@mixin ${block}${this.config.input.separators.mixinElement}${element}\\s*\\()[^)]*`, 'g'),