less
Version:
Leaner CSS
10 lines • 153 kB
JavaScript
/**
* Less - Leaner CSS v4.2.2
* http://lesscss.org
*
* Copyright (c) 2009-2025, Alexis Sellier <self@cloudhead.net>
* Licensed under the Apache-2.0 License.
*
* @license Apache-2.0
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).less=t()}(this,(function(){"use strict";function e(e){return e.replace(/^[a-z-]+:\/+?[^/]+/,"").replace(/[?&]livereload=\w+/,"").replace(/^\//,"").replace(/\.[a-zA-Z]+$/,"").replace(/[^.\w-]+/g,"-").replace(/\./g,":")}function t(e,t){if(t)for(var n in t.dataset)if(Object.prototype.hasOwnProperty.call(t.dataset,n))if("env"===n||"dumpLineNumbers"===n||"rootpath"===n||"errorReporting"===n)e[n]=t.dataset[n];else try{e[n]=JSON.parse(t.dataset[n])}catch(e){}}var n=function(t,n,i){var r=i.href||"",s="less:".concat(i.title||e(r)),o=t.getElementById(s),a=!1,l=t.createElement("style");l.setAttribute("type","text/css"),i.media&&l.setAttribute("media",i.media),l.id=s,l.styleSheet||(l.appendChild(t.createTextNode(n)),a=null!==o&&o.childNodes.length>0&&l.childNodes.length>0&&o.firstChild.nodeValue===l.firstChild.nodeValue);var u=t.getElementsByTagName("head")[0];if(null===o||!1===a){var c=i&&i.nextSibling||null;c?c.parentNode.insertBefore(l,c):u.appendChild(l)}if(o&&!1===a&&o.parentNode.removeChild(o),l.styleSheet)try{l.styleSheet.cssText=n}catch(e){throw new Error("Couldn't reassign styleSheet.cssText.")}},i=function(e){var t,n=e.document;return n.currentScript||(t=n.getElementsByTagName("script"))[t.length-1]},r={error:function(e){this._fireEvent("error",e)},warn:function(e){this._fireEvent("warn",e)},info:function(e){this._fireEvent("info",e)},debug:function(e){this._fireEvent("debug",e)},addListener:function(e){this._listeners.push(e)},removeListener:function(e){for(var t=0;t<this._listeners.length;t++)if(this._listeners[t]===e)return void this._listeners.splice(t,1)},_fireEvent:function(e,t){for(var n=0;n<this._listeners.length;n++){var i=this._listeners[n][e];i&&i(t)}},_listeners:[]},s=function(){function e(e,t){this.fileManagers=t||[],e=e||{};for(var n=[],i=n.concat(["encodeBase64","mimeLookup","charsetLookup","getSourceMapGenerator"]),r=0;r<i.length;r++){var s=i[r],o=e[s];o?this[s]=o.bind(e):r<n.length&&this.warn("missing required function in environment - ".concat(s))}}return e.prototype.getFileManager=function(e,t,n,i,s){e||r.warn("getFileManager called with no filename.. Please report this issue. continuing."),void 0===t&&r.warn("getFileManager called with null directory.. Please report this issue. continuing.");var o=this.fileManagers;n.pluginManager&&(o=[].concat(o).concat(n.pluginManager.getFileManagers()));for(var a=o.length-1;a>=0;a--){var l=o[a];if(l[s?"supportsSync":"supports"](e,t,n,i))return l}return null},e.prototype.addFileManager=function(e){this.fileManagers.push(e)},e.prototype.clearFileManagers=function(){this.fileManagers=[]},e}(),o={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},a={length:{m:1,cm:.01,mm:.001,in:.0254,px:.0254/96,pt:.0254/72,pc:.0254/72*12},duration:{s:1,ms:.001},angle:{rad:1/(2*Math.PI),deg:1/360,grad:1/400,turn:1}},l={colors:o,unitConversions:a},u=function(){function e(){this.parent=null,this.visibilityBlocks=void 0,this.nodeVisible=void 0,this.rootNode=null,this.parsed=null}return Object.defineProperty(e.prototype,"currentFileInfo",{get:function(){return this.fileInfo()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"index",{get:function(){return this.getIndex()},enumerable:!1,configurable:!0}),e.prototype.setParent=function(t,n){function i(t){t&&t instanceof e&&(t.parent=n)}Array.isArray(t)?t.forEach(i):i(t)},e.prototype.getIndex=function(){return this._index||this.parent&&this.parent.getIndex()||0},e.prototype.fileInfo=function(){return this._fileInfo||this.parent&&this.parent.fileInfo()||{}},e.prototype.isRulesetLike=function(){return!1},e.prototype.toCSS=function(e){var t=[];return this.genCSS(e,{add:function(e,n,i){t.push(e)},isEmpty:function(){return 0===t.length}}),t.join("")},e.prototype.genCSS=function(e,t){t.add(this.value)},e.prototype.accept=function(e){this.value=e.visit(this.value)},e.prototype.eval=function(){return this},e.prototype._operate=function(e,t,n,i){switch(t){case"+":return n+i;case"-":return n-i;case"*":return n*i;case"/":return n/i}},e.prototype.fround=function(e,t){var n=e&&e.numPrecision;return n?Number((t+2e-16).toFixed(n)):t},e.compare=function(t,n){if(t.compare&&"Quoted"!==n.type&&"Anonymous"!==n.type)return t.compare(n);if(n.compare)return-n.compare(t);if(t.type===n.type){if(t=t.value,n=n.value,!Array.isArray(t))return t===n?0:void 0;if(t.length===n.length){for(var i=0;i<t.length;i++)if(0!==e.compare(t[i],n[i]))return;return 0}}},e.numericCompare=function(e,t){return e<t?-1:e===t?0:e>t?1:void 0},e.prototype.blocksVisibility=function(){return void 0===this.visibilityBlocks&&(this.visibilityBlocks=0),0!==this.visibilityBlocks},e.prototype.addVisibilityBlock=function(){void 0===this.visibilityBlocks&&(this.visibilityBlocks=0),this.visibilityBlocks=this.visibilityBlocks+1},e.prototype.removeVisibilityBlock=function(){void 0===this.visibilityBlocks&&(this.visibilityBlocks=0),this.visibilityBlocks=this.visibilityBlocks-1},e.prototype.ensureVisibility=function(){this.nodeVisible=!0},e.prototype.ensureInvisibility=function(){this.nodeVisible=!1},e.prototype.isVisible=function(){return this.nodeVisible},e.prototype.visibilityInfo=function(){return{visibilityBlocks:this.visibilityBlocks,nodeVisible:this.nodeVisible}},e.prototype.copyVisibilityInfo=function(e){e&&(this.visibilityBlocks=e.visibilityBlocks,this.nodeVisible=e.nodeVisible)},e}(),c=function(e,t,n){var i=this;Array.isArray(e)?this.rgb=e:e.length>=6?(this.rgb=[],e.match(/.{2}/g).map((function(e,t){t<3?i.rgb.push(parseInt(e,16)):i.alpha=parseInt(e,16)/255}))):(this.rgb=[],e.split("").map((function(e,t){t<3?i.rgb.push(parseInt(e+e,16)):i.alpha=parseInt(e+e,16)/255}))),this.alpha=this.alpha||("number"==typeof t?t:1),void 0!==n&&(this.value=n)};function h(e,t){return Math.min(Math.max(e,0),t)}function f(e){return"#".concat(e.map((function(e){return((e=h(Math.round(e),255))<16?"0":"")+e.toString(16)})).join(""))}c.prototype=Object.assign(new u,{type:"Color",luma:function(){var e=this.rgb[0]/255,t=this.rgb[1]/255,n=this.rgb[2]/255;return.2126*(e=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t=t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},genCSS:function(e,t){t.add(this.toCSS(e))},toCSS:function(e,t){var n,i,r,s=e&&e.compress&&!t,o=[];if(i=this.fround(e,this.alpha),this.value)if(0===this.value.indexOf("rgb"))i<1&&(r="rgba");else{if(0!==this.value.indexOf("hsl"))return this.value;r=i<1?"hsla":"hsl"}else i<1&&(r="rgba");switch(r){case"rgba":o=this.rgb.map((function(e){return h(Math.round(e),255)})).concat(h(i,1));break;case"hsla":o.push(h(i,1));case"hsl":n=this.toHSL(),o=[this.fround(e,n.h),"".concat(this.fround(e,100*n.s),"%"),"".concat(this.fround(e,100*n.l),"%")].concat(o)}if(r)return"".concat(r,"(").concat(o.join(",".concat(s?"":" ")),")");if(n=this.toRGB(),s){var a=n.split("");a[1]===a[2]&&a[3]===a[4]&&a[5]===a[6]&&(n="#".concat(a[1]).concat(a[3]).concat(a[5]))}return n},operate:function(e,t,n){for(var i=new Array(3),r=this.alpha*(1-n.alpha)+n.alpha,s=0;s<3;s++)i[s]=this._operate(e,t,this.rgb[s],n.rgb[s]);return new c(i,r)},toRGB:function(){return f(this.rgb)},toHSL:function(){var e,t,n=this.rgb[0]/255,i=this.rgb[1]/255,r=this.rgb[2]/255,s=this.alpha,o=Math.max(n,i,r),a=Math.min(n,i,r),l=(o+a)/2,u=o-a;if(o===a)e=t=0;else{switch(t=l>.5?u/(2-o-a):u/(o+a),o){case n:e=(i-r)/u+(i<r?6:0);break;case i:e=(r-n)/u+2;break;case r:e=(n-i)/u+4}e/=6}return{h:360*e,s:t,l:l,a:s}},toHSV:function(){var e,t,n=this.rgb[0]/255,i=this.rgb[1]/255,r=this.rgb[2]/255,s=this.alpha,o=Math.max(n,i,r),a=Math.min(n,i,r),l=o,u=o-a;if(t=0===o?0:u/o,o===a)e=0;else{switch(o){case n:e=(i-r)/u+(i<r?6:0);break;case i:e=(r-n)/u+2;break;case r:e=(n-i)/u+4}e/=6}return{h:360*e,s:t,v:l,a:s}},toARGB:function(){return f([255*this.alpha].concat(this.rgb))},compare:function(e){return e.rgb&&e.rgb[0]===this.rgb[0]&&e.rgb[1]===this.rgb[1]&&e.rgb[2]===this.rgb[2]&&e.alpha===this.alpha?0:void 0}}),c.fromKeyword=function(e){var t,n=e.toLowerCase();if(o.hasOwnProperty(n)?t=new c(o[n].slice(1)):"transparent"===n&&(t=new c([0,0,0],0)),t)return t.value=e,t};var p=function(e){this.value=e};p.prototype=Object.assign(new u,{type:"Paren",genCSS:function(e,t){t.add("("),this.value.genCSS(e,t),t.add(")")},eval:function(e){return new p(this.value.eval(e))}});var v={"":!0," ":!0,"|":!0},d=function(e){" "===e?(this.value=" ",this.emptyOrWhitespace=!0):(this.value=e?e.trim():"",this.emptyOrWhitespace=""===this.value)};d.prototype=Object.assign(new u,{type:"Combinator",genCSS:function(e,t){var n=e.compress||v[this.value]?"":" ";t.add(n+this.value+n)}});var m=function(e,t,n,i,r,s){this.combinator=e instanceof d?e:new d(e),this.value="string"==typeof t?t.trim():t||"",this.isVariable=n,this._index=i,this._fileInfo=r,this.copyVisibilityInfo(s),this.setParent(this.combinator,this)};m.prototype=Object.assign(new u,{type:"Element",accept:function(e){var t=this.value;this.combinator=e.visit(this.combinator),"object"==typeof t&&(this.value=e.visit(t))},eval:function(e){return new m(this.combinator,this.value.eval?this.value.eval(e):this.value,this.isVariable,this.getIndex(),this.fileInfo(),this.visibilityInfo())},clone:function(){return new m(this.combinator,this.value,this.isVariable,this.getIndex(),this.fileInfo(),this.visibilityInfo())},genCSS:function(e,t){t.add(this.toCSS(e),this.fileInfo(),this.getIndex())},toCSS:function(e){e=e||{};var t=this.value,n=e.firstSelector;return t instanceof p&&(e.firstSelector=!0),t=t.toCSS?t.toCSS(e):t,e.firstSelector=n,""===t&&"&"===this.combinator.value.charAt(0)?"":this.combinator.toCSS(e)+t}});var g={ALWAYS:0,PARENS_DIVISION:1,PARENS:2},y=0,b=1,w=2,x=function(){return(x=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function S(e,t,n){if(n||2===arguments.length)for(var i,r=0,s=t.length;r<s;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function I(e){return Object.prototype.toString.call(e).slice(8,-1)}function C(e){return"Array"===I(e)}function k(e,t){if(void 0===t&&(t={}),C(e))return e.map((function(e){return k(e,t)}));if("Object"!==I(n=e)||n.constructor!==Object||Object.getPrototypeOf(n)!==Object.prototype)return e;var n,i=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return S(S([],i,!0),r,!0).reduce((function(n,i){return C(t.props)&&!t.props.includes(i)||function(e,t,n,i,r){var s={}.propertyIsEnumerable.call(i,t)?"enumerable":"nonenumerable";"enumerable"===s&&(e[t]=n),r&&"nonenumerable"===s&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}(n,i,k(e[i],t),e,t.nonenumerable),n}),{})}function _(e,t){for(var n=e+1,i=null,r=-1;--n>=0&&"\n"!==t.charAt(n);)r++;return"number"==typeof e&&(i=(t.slice(0,e).match(/\n/g)||"").length),{line:i,column:r}}function A(e){var t,n=e.length,i=new Array(n);for(t=0;t<n;t++)i[t]=e[t];return i}function P(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function M(e,t){var n=t||{};if(!t._defaults){n={};var i=k(e);n._defaults=i;var r=t?k(t):{};Object.assign(n,i,r)}return n}function E(e,t){if(t&&t._defaults)return t;var n=M(e,t);if(n.strictMath&&(n.math=g.PARENS),n.relativeUrls&&(n.rewriteUrls=w),"string"==typeof n.math)switch(n.math.toLowerCase()){case"always":n.math=g.ALWAYS;break;case"parens-division":n.math=g.PARENS_DIVISION;break;case"strict":case"parens":n.math=g.PARENS;break;default:n.math=g.PARENS}if("string"==typeof n.rewriteUrls)switch(n.rewriteUrls.toLowerCase()){case"off":n.rewriteUrls=y;break;case"local":n.rewriteUrls=b;break;case"all":n.rewriteUrls=w}return n}function R(e,t){void 0===t&&(t=[]);for(var n=0,i=e.length;n<i;n++){var r=e[n];Array.isArray(r)?R(r,t):void 0!==r&&t.push(r)}return t}function O(e){return null==e}"function"==typeof SuppressedError&&SuppressedError;var V=Object.freeze({__proto__:null,getLocation:_,copyArray:A,clone:P,defaults:M,copyOptions:E,merge:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},flattenArray:R,isNullOrUndefined:O}),F=/(<anonymous>|Function):(\d+):(\d+)/,$=function(e,t,n){Error.call(this);var i=e.filename||n;if(this.message=e.message,this.stack=e.stack,t&&i){var r=t.contents[i],s=_(e.index,r),o=s.line,a=s.column,l=e.call&&_(e.call,r).line,u=r?r.split("\n"):"";if(this.type=e.type||"Syntax",this.filename=i,this.index=e.index,this.line="number"==typeof o?o+1:null,this.column=a,!this.line&&this.stack){var c=this.stack.match(F),h=new Function("a","throw new Error()"),f=0;try{h()}catch(e){var p=e.stack.match(F);f=1-parseInt(p[2])}c&&(c[2]&&(this.line=parseInt(c[2])+f),c[3]&&(this.column=parseInt(c[3])))}this.callLine=l+1,this.callExtract=u[l],this.extract=[u[this.line-2],u[this.line-1],u[this.line]]}};if(void 0===Object.create){var L=function(){};L.prototype=Error.prototype,$.prototype=new L}else $.prototype=Object.create(Error.prototype);$.prototype.constructor=$,$.prototype.toString=function(e){e=e||{};var t="",n=this.extract||[],i=[],r=function(e){return e};if(e.stylize){var s=typeof e.stylize;if("function"!==s)throw Error("options.stylize should be a function, got a ".concat(s,"!"));r=e.stylize}if(null!==this.line){if("string"==typeof n[0]&&i.push(r("".concat(this.line-1," ").concat(n[0]),"grey")),"string"==typeof n[1]){var o="".concat(this.line," ");n[1]&&(o+=n[1].slice(0,this.column)+r(r(r(n[1].substr(this.column,1),"bold")+n[1].slice(this.column+1),"red"),"inverse")),i.push(o)}"string"==typeof n[2]&&i.push(r("".concat(this.line+1," ").concat(n[2]),"grey")),i="".concat(i.join("\n")+r("","reset"),"\n")}return t+=r("".concat(this.type,"Error: ").concat(this.message),"red"),this.filename&&(t+=r(" in ","red")+this.filename),this.line&&(t+=r(" on line ".concat(this.line,", column ").concat(this.column+1,":"),"grey")),t+="\n".concat(i),this.callLine&&(t+="".concat(r("from ","red")+(this.filename||""),"/n"),t+="".concat(r(this.callLine,"grey")," ").concat(this.callExtract,"/n")),t};var j={visitDeeper:!0},N=!1;function D(e){return e}var B=function(){function e(e){this._implementation=e,this._visitInCache={},this._visitOutCache={},N||(!function e(t,n){var i,r;for(i in t)switch(typeof(r=t[i])){case"function":r.prototype&&r.prototype.type&&(r.prototype.typeIndex=n++);break;case"object":n=e(r,n)}return n}(Qe,1),N=!0)}return e.prototype.visit=function(e){if(!e)return e;var t=e.typeIndex;if(!t)return e.value&&e.value.typeIndex&&this.visit(e.value),e;var n,i=this._implementation,r=this._visitInCache[t],s=this._visitOutCache[t],o=j;if(o.visitDeeper=!0,r||(r=i[n="visit".concat(e.type)]||D,s=i["".concat(n,"Out")]||D,this._visitInCache[t]=r,this._visitOutCache[t]=s),r!==D){var a=r.call(i,e,o);e&&i.isReplacing&&(e=a)}if(o.visitDeeper&&e)if(e.length)for(var l=0,u=e.length;l<u;l++)e[l].accept&&e[l].accept(this);else e.accept&&e.accept(this);return s!=D&&s.call(i,e),e},e.prototype.visitArray=function(e,t){if(!e)return e;var n,i=e.length;if(t||!this._implementation.isReplacing){for(n=0;n<i;n++)this.visit(e[n]);return e}var r=[];for(n=0;n<i;n++){var s=this.visit(e[n]);void 0!==s&&(s.splice?s.length&&this.flatten(s,r):r.push(s))}return r},e.prototype.flatten=function(e,t){var n,i,r,s,o,a;for(t||(t=[]),i=0,n=e.length;i<n;i++)if(void 0!==(r=e[i]))if(r.splice)for(o=0,s=r.length;o<s;o++)void 0!==(a=r[o])&&(a.splice?a.length&&this.flatten(a,t):t.push(a));else t.push(r);return t},e}(),U={},q=function(e,t,n){if(e)for(var i=0;i<n.length;i++)Object.prototype.hasOwnProperty.call(e,n[i])&&(t[n[i]]=e[n[i]])},T=["paths","rewriteUrls","rootpath","strictImports","insecure","dumpLineNumbers","compress","syncImport","chunkInput","mime","useFileCache","processImports","pluginManager"];U.Parse=function(e){q(e,this,T),"string"==typeof this.paths&&(this.paths=[this.paths])};var z=["paths","compress","math","strictUnits","sourceMap","importMultiple","urlArgs","javascriptEnabled","pluginManager","importantScope","rewriteUrls"];function G(e){return!/^(?:[a-z-]+:|\/|#)/i.test(e)}function W(e){return"."===e.charAt(0)}U.Eval=function(e,t){q(e,this,z),"string"==typeof this.paths&&(this.paths=[this.paths]),this.frames=t||[],this.importantScope=this.importantScope||[]},U.Eval.prototype.enterCalc=function(){this.calcStack||(this.calcStack=[]),this.calcStack.push(!0),this.inCalc=!0},U.Eval.prototype.exitCalc=function(){this.calcStack.pop(),this.calcStack.length||(this.inCalc=!1)},U.Eval.prototype.inParenthesis=function(){this.parensStack||(this.parensStack=[]),this.parensStack.push(!0)},U.Eval.prototype.outOfParenthesis=function(){this.parensStack.pop()},U.Eval.prototype.inCalc=!1,U.Eval.prototype.mathOn=!0,U.Eval.prototype.isMathOn=function(e){return!!this.mathOn&&(!!("/"!==e||this.math===g.ALWAYS||this.parensStack&&this.parensStack.length)&&(!(this.math>g.PARENS_DIVISION)||this.parensStack&&this.parensStack.length))},U.Eval.prototype.pathRequiresRewrite=function(e){return(this.rewriteUrls===b?W:G)(e)},U.Eval.prototype.rewritePath=function(e,t){var n;return t=t||"",n=this.normalizePath(t+e),W(e)&&G(t)&&!1===W(n)&&(n="./".concat(n)),n},U.Eval.prototype.normalizePath=function(e){var t,n=e.split("/").reverse();for(e=[];0!==n.length;)switch(t=n.pop()){case".":break;case"..":0===e.length||".."===e[e.length-1]?e.push(t):e.pop();break;default:e.push(t)}return e.join("/")};var J=function(){function e(e){this.imports=[],this.variableImports=[],this._onSequencerEmpty=e,this._currentDepth=0}return e.prototype.addImport=function(e){var t=this,n={callback:e,args:null,isReady:!1};return this.imports.push(n),function(){n.args=Array.prototype.slice.call(arguments,0),n.isReady=!0,t.tryRun()}},e.prototype.addVariableImport=function(e){this.variableImports.push(e)},e.prototype.tryRun=function(){this._currentDepth++;try{for(;;){for(;this.imports.length>0;){var e=this.imports[0];if(!e.isReady)return;this.imports=this.imports.slice(1),e.callback.apply(null,e.args)}if(0===this.variableImports.length)break;var t=this.variableImports[0];this.variableImports=this.variableImports.slice(1),t()}}finally{this._currentDepth--}0===this._currentDepth&&this._onSequencerEmpty&&this._onSequencerEmpty()},e}(),H=function(e,t){this._visitor=new B(this),this._importer=e,this._finish=t,this.context=new U.Eval,this.importCount=0,this.onceFileDetectionMap={},this.recursionDetector={},this._sequencer=new J(this._onSequencerEmpty.bind(this))};H.prototype={isReplacing:!1,run:function(e){try{this._visitor.visit(e)}catch(e){this.error=e}this.isFinished=!0,this._sequencer.tryRun()},_onSequencerEmpty:function(){this.isFinished&&this._finish(this.error)},visitImport:function(e,t){var n=e.options.inline;if(!e.css||n){var i=new U.Eval(this.context,A(this.context.frames)),r=i.frames[0];this.importCount++,e.isVariableImport()?this._sequencer.addVariableImport(this.processImportNode.bind(this,e,i,r)):this.processImportNode(e,i,r)}t.visitDeeper=!1},processImportNode:function(e,t,n){var i,r=e.options.inline;try{i=e.evalForImport(t)}catch(t){t.filename||(t.index=e.getIndex(),t.filename=e.fileInfo().filename),e.css=!0,e.error=t}if(!i||i.css&&!r)this.importCount--,this.isFinished&&this._sequencer.tryRun();else{i.options.multiple&&(t.importMultiple=!0);for(var s=void 0===i.css,o=0;o<n.rules.length;o++)if(n.rules[o]===e){n.rules[o]=i;break}var a=this.onImported.bind(this,i,t),l=this._sequencer.addImport(a);this._importer.push(i.getPath(),s,i.fileInfo(),i.options,l)}},onImported:function(e,t,n,i,r,s){n&&(n.filename||(n.index=e.getIndex(),n.filename=e.fileInfo().filename),this.error=n);var o=this,a=e.options.inline,l=e.options.isPlugin,u=e.options.optional,c=r||s in o.recursionDetector;if(t.importMultiple||(e.skip=!!c||function(){return s in o.onceFileDetectionMap||(o.onceFileDetectionMap[s]=!0,!1)}),!s&&u&&(e.skip=!0),i&&(e.root=i,e.importedFilename=s,!a&&!l&&(t.importMultiple||!c))){o.recursionDetector[s]=!0;var h=this.context;this.context=t;try{this._visitor.visit(i)}catch(n){this.error=n}this.context=h}o.importCount--,o.isFinished&&o._sequencer.tryRun()},visitDeclaration:function(e,t){"DetachedRuleset"===e.value.type?this.context.frames.unshift(e):t.visitDeeper=!1},visitDeclarationOut:function(e){"DetachedRuleset"===e.value.type&&this.context.frames.shift()},visitAtRule:function(e,t){this.context.frames.unshift(e)},visitAtRuleOut:function(e){this.context.frames.shift()},visitMixinDefinition:function(e,t){this.context.frames.unshift(e)},visitMixinDefinitionOut:function(e){this.context.frames.shift()},visitRuleset:function(e,t){this.context.frames.unshift(e)},visitRulesetOut:function(e){this.context.frames.shift()},visitMedia:function(e,t){this.context.frames.unshift(e.rules[0])},visitMediaOut:function(e){this.context.frames.shift()}};var Q=function(){function e(e){this.visible=e}return e.prototype.run=function(e){this.visit(e)},e.prototype.visitArray=function(e){if(!e)return e;var t,n=e.length;for(t=0;t<n;t++)this.visit(e[t]);return e},e.prototype.visit=function(e){return e?e.constructor===Array?this.visitArray(e):(!e.blocksVisibility||e.blocksVisibility()||(this.visible?e.ensureVisibility():e.ensureInvisibility(),e.accept(this)),e):e},e}(),K=function(){function e(){this._visitor=new B(this),this.contexts=[],this.allExtendsStack=[[]]}return e.prototype.run=function(e){return(e=this._visitor.visit(e)).allExtends=this.allExtendsStack[0],e},e.prototype.visitDeclaration=function(e,t){t.visitDeeper=!1},e.prototype.visitMixinDefinition=function(e,t){t.visitDeeper=!1},e.prototype.visitRuleset=function(e,t){if(!e.root){var n,i,r,s,o=[],a=e.rules,l=a?a.length:0;for(n=0;n<l;n++)e.rules[n]instanceof Qe.Extend&&(o.push(a[n]),e.extendOnEveryPath=!0);var u=e.paths;for(n=0;n<u.length;n++){var c=u[n],h=c[c.length-1].extendList;for((s=h?A(h).concat(o):o)&&(s=s.map((function(e){return e.clone()}))),i=0;i<s.length;i++)this.foundExtends=!0,(r=s[i]).findSelfSelectors(c),r.ruleset=e,0===i&&(r.firstExtendOnThisSelectorPath=!0),this.allExtendsStack[this.allExtendsStack.length-1].push(r)}this.contexts.push(e.selectors)}},e.prototype.visitRulesetOut=function(e){e.root||(this.contexts.length=this.contexts.length-1)},e.prototype.visitMedia=function(e,t){e.allExtends=[],this.allExtendsStack.push(e.allExtends)},e.prototype.visitMediaOut=function(e){this.allExtendsStack.length=this.allExtendsStack.length-1},e.prototype.visitAtRule=function(e,t){e.allExtends=[],this.allExtendsStack.push(e.allExtends)},e.prototype.visitAtRuleOut=function(e){this.allExtendsStack.length=this.allExtendsStack.length-1},e}(),Z=function(){function e(){this._visitor=new B(this)}return e.prototype.run=function(e){var t=new K;if(this.extendIndices={},t.run(e),!t.foundExtends)return e;e.allExtends=e.allExtends.concat(this.doExtendChaining(e.allExtends,e.allExtends)),this.allExtendsStack=[e.allExtends];var n=this._visitor.visit(e);return this.checkExtendsForNonMatched(e.allExtends),n},e.prototype.checkExtendsForNonMatched=function(e){var t=this.extendIndices;e.filter((function(e){return!e.hasFoundMatches&&1==e.parent_ids.length})).forEach((function(e){var n="_unknown_";try{n=e.selector.toCSS({})}catch(e){}t["".concat(e.index," ").concat(n)]||(t["".concat(e.index," ").concat(n)]=!0,r.warn("extend '".concat(n,"' has no matches")))}))},e.prototype.doExtendChaining=function(e,t,n){var i,r,s,o,a,l,u,c,h=[],f=this;for(n=n||0,i=0;i<e.length;i++)for(r=0;r<t.length;r++)l=e[i],u=t[r],l.parent_ids.indexOf(u.object_id)>=0||(a=[u.selfSelectors[0]],(s=f.findMatch(l,a)).length&&(l.hasFoundMatches=!0,l.selfSelectors.forEach((function(e){var t=u.visibilityInfo();o=f.extendSelector(s,a,e,l.isVisible()),(c=new Qe.Extend(u.selector,u.option,0,u.fileInfo(),t)).selfSelectors=o,o[o.length-1].extendList=[c],h.push(c),c.ruleset=u.ruleset,c.parent_ids=c.parent_ids.concat(u.parent_ids,l.parent_ids),u.firstExtendOnThisSelectorPath&&(c.firstExtendOnThisSelectorPath=!0,u.ruleset.paths.push(o))}))));if(h.length){if(this.extendChainCount++,n>100){var p="{unable to calculate}",v="{unable to calculate}";try{p=h[0].selfSelectors[0].toCSS(),v=h[0].selector.toCSS()}catch(e){}throw{message:"extend circular reference detected. One of the circular extends is currently:".concat(p,":extend(").concat(v,")")}}return h.concat(f.doExtendChaining(h,t,n+1))}return h},e.prototype.visitDeclaration=function(e,t){t.visitDeeper=!1},e.prototype.visitMixinDefinition=function(e,t){t.visitDeeper=!1},e.prototype.visitSelector=function(e,t){t.visitDeeper=!1},e.prototype.visitRuleset=function(e,t){if(!e.root){var n,i,r,s,o=this.allExtendsStack[this.allExtendsStack.length-1],a=[],l=this;for(r=0;r<o.length;r++)for(i=0;i<e.paths.length;i++)if(s=e.paths[i],!e.extendOnEveryPath){var u=s[s.length-1].extendList;u&&u.length||(n=this.findMatch(o[r],s)).length&&(o[r].hasFoundMatches=!0,o[r].selfSelectors.forEach((function(e){var t;t=l.extendSelector(n,s,e,o[r].isVisible()),a.push(t)})))}e.paths=e.paths.concat(a)}},e.prototype.findMatch=function(e,t){var n,i,r,s,o,a,l,u=e.selector.elements,c=[],h=[];for(n=0;n<t.length;n++)for(i=t[n],r=0;r<i.elements.length;r++)for(s=i.elements[r],(e.allowBefore||0===n&&0===r)&&c.push({pathIndex:n,index:r,matched:0,initialCombinator:s.combinator}),a=0;a<c.length;a++)l=c[a],""===(o=s.combinator.value)&&0===r&&(o=" "),!this.isElementValuesEqual(u[l.matched].value,s.value)||l.matched>0&&u[l.matched].combinator.value!==o?l=null:l.matched++,l&&(l.finished=l.matched===u.length,l.finished&&!e.allowAfter&&(r+1<i.elements.length||n+1<t.length)&&(l=null)),l?l.finished&&(l.length=u.length,l.endPathIndex=n,l.endPathElementIndex=r+1,c.length=0,h.push(l)):(c.splice(a,1),a--);return h},e.prototype.isElementValuesEqual=function(e,t){if("string"==typeof e||"string"==typeof t)return e===t;if(e instanceof Qe.Attribute)return e.op===t.op&&e.key===t.key&&(e.value&&t.value?(e=e.value.value||e.value)===(t=t.value.value||t.value):!e.value&&!t.value);if(e=e.value,t=t.value,e instanceof Qe.Selector){if(!(t instanceof Qe.Selector)||e.elements.length!==t.elements.length)return!1;for(var n=0;n<e.elements.length;n++){if(e.elements[n].combinator.value!==t.elements[n].combinator.value&&(0!==n||(e.elements[n].combinator.value||" ")!==(t.elements[n].combinator.value||" ")))return!1;if(!this.isElementValuesEqual(e.elements[n].value,t.elements[n].value))return!1}return!0}return!1},e.prototype.extendSelector=function(e,t,n,i){var r,s,o,a,l,u=0,c=0,h=[];for(r=0;r<e.length;r++)s=t[(a=e[r]).pathIndex],o=new Qe.Element(a.initialCombinator,n.elements[0].value,n.elements[0].isVariable,n.elements[0].getIndex(),n.elements[0].fileInfo()),a.pathIndex>u&&c>0&&(h[h.length-1].elements=h[h.length-1].elements.concat(t[u].elements.slice(c)),c=0,u++),l=s.elements.slice(c,a.index).concat([o]).concat(n.elements.slice(1)),u===a.pathIndex&&r>0?h[h.length-1].elements=h[h.length-1].elements.concat(l):(h=h.concat(t.slice(u,a.pathIndex))).push(new Qe.Selector(l)),u=a.endPathIndex,(c=a.endPathElementIndex)>=t[u].elements.length&&(c=0,u++);return u<t.length&&c>0&&(h[h.length-1].elements=h[h.length-1].elements.concat(t[u].elements.slice(c)),u++),h=(h=h.concat(t.slice(u,t.length))).map((function(e){var t=e.createDerived(e.elements);return i?t.ensureVisibility():t.ensureInvisibility(),t}))},e.prototype.visitMedia=function(e,t){var n=e.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);n=n.concat(this.doExtendChaining(n,e.allExtends)),this.allExtendsStack.push(n)},e.prototype.visitMediaOut=function(e){var t=this.allExtendsStack.length-1;this.allExtendsStack.length=t},e.prototype.visitAtRule=function(e,t){var n=e.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);n=n.concat(this.doExtendChaining(n,e.allExtends)),this.allExtendsStack.push(n)},e.prototype.visitAtRuleOut=function(e){var t=this.allExtendsStack.length-1;this.allExtendsStack.length=t},e}(),X=function(){function e(){this.contexts=[[]],this._visitor=new B(this)}return e.prototype.run=function(e){return this._visitor.visit(e)},e.prototype.visitDeclaration=function(e,t){t.visitDeeper=!1},e.prototype.visitMixinDefinition=function(e,t){t.visitDeeper=!1},e.prototype.visitRuleset=function(e,t){var n,i=this.contexts[this.contexts.length-1],r=[];this.contexts.push(r),e.root||((n=e.selectors)&&(n=n.filter((function(e){return e.getIsOutput()})),e.selectors=n.length?n:n=null,n&&e.joinSelectors(r,i,n)),n||(e.rules=null),e.paths=r)},e.prototype.visitRulesetOut=function(e){this.contexts.length=this.contexts.length-1},e.prototype.visitMedia=function(e,t){var n=this.contexts[this.contexts.length-1];e.rules[0].root=0===n.length||n[0].multiMedia},e.prototype.visitAtRule=function(e,t){var n=this.contexts[this.contexts.length-1];e.rules&&e.rules.length&&(e.rules[0].root=e.isRooted||0===n.length||null)},e}(),Y=function(){function e(e){this._visitor=new B(this),this._context=e}return e.prototype.containsSilentNonBlockedChild=function(e){var t;if(!e)return!1;for(var n=0;n<e.length;n++)if((t=e[n]).isSilent&&t.isSilent(this._context)&&!t.blocksVisibility())return!0;return!1},e.prototype.keepOnlyVisibleChilds=function(e){e&&e.rules&&(e.rules=e.rules.filter((function(e){return e.isVisible()})))},e.prototype.isEmpty=function(e){return!e||!e.rules||0===e.rules.length},e.prototype.hasVisibleSelector=function(e){return!(!e||!e.paths)&&e.paths.length>0},e.prototype.resolveVisibility=function(e){if(!e.blocksVisibility()){if(this.isEmpty(e))return;return e}var t=e.rules[0];if(this.keepOnlyVisibleChilds(t),!this.isEmpty(t))return e.ensureVisibility(),e.removeVisibilityBlock(),e},e.prototype.isVisibleRuleset=function(e){return!!e.firstRoot||!this.isEmpty(e)&&!(!e.root&&!this.hasVisibleSelector(e))},e}(),ee=function(e){this._visitor=new B(this),this._context=e,this.utils=new Y(e)};ee.prototype={isReplacing:!0,run:function(e){return this._visitor.visit(e)},visitDeclaration:function(e,t){if(!e.blocksVisibility()&&!e.variable)return e},visitMixinDefinition:function(e,t){e.frames=[]},visitExtend:function(e,t){},visitComment:function(e,t){if(!e.blocksVisibility()&&!e.isSilent(this._context))return e},visitMedia:function(e,t){var n=e.rules[0].rules;return e.accept(this._visitor),t.visitDeeper=!1,this.utils.resolveVisibility(e,n)},visitImport:function(e,t){if(!e.blocksVisibility())return e},visitAtRule:function(e,t){return e.rules&&e.rules.length?this.visitAtRuleWithBody(e,t):this.visitAtRuleWithoutBody(e,t)},visitAnonymous:function(e,t){if(!e.blocksVisibility())return e.accept(this._visitor),e},visitAtRuleWithBody:function(e,t){var n=function(e){var t=e.rules;return function(e){var t=e.rules;return 1===t.length&&(!t[0].paths||0===t[0].paths.length)}(e)?t[0].rules:t}(e);return e.accept(this._visitor),t.visitDeeper=!1,this.utils.isEmpty(e)||this._mergeRules(e.rules[0].rules),this.utils.resolveVisibility(e,n)},visitAtRuleWithoutBody:function(e,t){if(!e.blocksVisibility()){if("@charset"===e.name){if(this.charset){if(e.debugInfo){var n=new Qe.Comment("/* ".concat(e.toCSS(this._context).replace(/\n/g,"")," */\n"));return n.debugInfo=e.debugInfo,this._visitor.visit(n)}return}this.charset=!0}return e}},checkValidNodes:function(e,t){if(e)for(var n=0;n<e.length;n++){var i=e[n];if(t&&i instanceof Qe.Declaration&&!i.variable)throw{message:"Properties must be inside selector blocks. They cannot be in the root",index:i.getIndex(),filename:i.fileInfo()&&i.fileInfo().filename};if(i instanceof Qe.Call)throw{message:"Function '".concat(i.name,"' did not return a root node"),index:i.getIndex(),filename:i.fileInfo()&&i.fileInfo().filename};if(i.type&&!i.allowRoot)throw{message:"".concat(i.type," node returned by a function is not valid here"),index:i.getIndex(),filename:i.fileInfo()&&i.fileInfo().filename}}},visitRuleset:function(e,t){var n,i=[];if(this.checkValidNodes(e.rules,e.firstRoot),e.root)e.accept(this._visitor),t.visitDeeper=!1;else{this._compileRulesetPaths(e);for(var r=e.rules,s=r?r.length:0,o=0;o<s;)(n=r[o])&&n.rules?(i.push(this._visitor.visit(n)),r.splice(o,1),s--):o++;s>0?e.accept(this._visitor):e.rules=null,t.visitDeeper=!1}return e.rules&&(this._mergeRules(e.rules),this._removeDuplicateRules(e.rules)),this.utils.isVisibleRuleset(e)&&(e.ensureVisibility(),i.splice(0,0,e)),1===i.length?i[0]:i},_compileRulesetPaths:function(e){e.paths&&(e.paths=e.paths.filter((function(e){var t;for(" "===e[0].elements[0].combinator.value&&(e[0].elements[0].combinator=new Qe.Combinator("")),t=0;t<e.length;t++)if(e[t].isVisible()&&e[t].getIsOutput())return!0;return!1})))},_removeDuplicateRules:function(e){if(e){var t,n,i,r={};for(i=e.length-1;i>=0;i--)if((n=e[i])instanceof Qe.Declaration)if(r[n.name]){(t=r[n.name])instanceof Qe.Declaration&&(t=r[n.name]=[r[n.name].toCSS(this._context)]);var s=n.toCSS(this._context);-1!==t.indexOf(s)?e.splice(i,1):t.push(s)}else r[n.name]=n}},_mergeRules:function(e){if(e){for(var t={},n=[],i=0;i<e.length;i++){var r=e[i];if(r.merge){var s=r.name;t[s]?e.splice(i--,1):n.push(t[s]=[]),t[s].push(r)}}n.forEach((function(e){if(e.length>0){var t=e[0],n=[],i=[new Qe.Expression(n)];e.forEach((function(e){"+"===e.merge&&n.length>0&&i.push(new Qe.Expression(n=[])),n.push(e.value),t.important=t.important||e.important})),t.value=new Qe.Value(i)}}))}}};var te={Visitor:B,ImportVisitor:H,MarkVisibleSelectorsVisitor:Q,ExtendVisitor:Z,JoinSelectorVisitor:X,ToCSSVisitor:ee};var ne=function(){var e,t,n,i,r,s,o,a=[],l={};function u(n){for(var i,a,c,h=l.i,f=t,p=l.i-o,v=l.i+s.length-p,d=l.i+=n,m=e;l.i<v;l.i++){if(i=m.charCodeAt(l.i),l.autoCommentAbsorb&&47===i){if("/"===(a=m.charAt(l.i+1))){c={index:l.i,isLineComment:!0};var g=m.indexOf("\n",l.i+2);g<0&&(g=v),l.i=g,c.text=m.substr(c.index,l.i-c.index),l.commentStore.push(c);continue}if("*"===a){var y=m.indexOf("*/",l.i+2);if(y>=0){c={index:l.i,text:m.substr(l.i,y+2-l.i),isLineComment:!1},l.i+=c.text.length-1,l.commentStore.push(c);continue}}break}if(32!==i&&10!==i&&9!==i&&13!==i)break}if(s=s.slice(n+l.i-d+p),o=l.i,!s.length){if(t<r.length-1)return s=r[++t],u(0),!0;l.finished=!0}return h!==l.i||f!==t}return l.save=function(){o=l.i,a.push({current:s,i:l.i,j:t})},l.restore=function(e){(l.i>n||l.i===n&&e&&!i)&&(n=l.i,i=e);var r=a.pop();s=r.current,o=l.i=r.i,t=r.j},l.forget=function(){a.pop()},l.isWhitespace=function(t){var n=l.i+(t||0),i=e.charCodeAt(n);return 32===i||13===i||9===i||10===i},l.$re=function(e){l.i>o&&(s=s.slice(l.i-o),o=l.i);var t=e.exec(s);return t?(u(t[0].length),"string"==typeof t?t:1===t.length?t[0]:t):null},l.$char=function(t){return e.charAt(l.i)!==t?null:(u(1),t)},l.$peekChar=function(t){return e.charAt(l.i)!==t?null:t},l.$str=function(t){for(var n=t.length,i=0;i<n;i++)if(e.charAt(l.i+i)!==t.charAt(i))return null;return u(n),t},l.$quoted=function(t){var n=t||l.i,i=e.charAt(n);if("'"===i||'"'===i){for(var r=e.length,s=n,o=1;o+s<r;o++){switch(e.charAt(o+s)){case"\\":o++;continue;case"\r":case"\n":break;case i:var a=e.substr(s,o+1);return t||0===t?[i,a]:(u(o+1),a)}}return null}},l.$parseUntil=function(t){var n,i="",r=null,s=!1,o=0,a=[],c=[],h=e.length,f=l.i,p=l.i,v=l.i,d=!0;n="string"==typeof t?function(e){return e===t}:function(e){return t.test(e)};do{var m=e.charAt(v);if(0===o&&n(m))(r=e.substr(p,v-p))?c.push(r):c.push(" "),r=c,u(v-f),d=!1;else{if(s){"*"===m&&"/"===e.charAt(v+1)&&(v++,o--,s=!1),v++;continue}switch(m){case"\\":v++,m=e.charAt(v),c.push(e.substr(p,v-p+1)),p=v+1;break;case"/":"*"===e.charAt(v+1)&&(v++,s=!0,o++);break;case"'":case'"':(i=l.$quoted(v))?(c.push(e.substr(p,v-p),i),p=(v+=i[1].length-1)+1):(u(v-f),r=m,d=!1);break;case"{":a.push("}"),o++;break;case"(":a.push(")"),o++;break;case"[":a.push("]"),o++;break;case"}":case")":case"]":var g=a.pop();m===g?o--:(u(v-f),r=g,d=!1)}++v>h&&(d=!1)}}while(d);return r||null},l.autoCommentAbsorb=!0,l.commentStore=[],l.finished=!1,l.peek=function(t){if("string"==typeof t){for(var n=0;n<t.length;n++)if(e.charAt(l.i+n)!==t.charAt(n))return!1;return!0}return t.test(s)},l.peekChar=function(t){return e.charAt(l.i)===t},l.currentChar=function(){return e.charAt(l.i)},l.prevChar=function(){return e.charAt(l.i-1)},l.getInput=function(){return e},l.peekNotNumeric=function(){var t=e.charCodeAt(l.i);return t>57||t<43||47===t||44===t},l.start=function(i,a,c){e=i,l.i=t=o=n=0,r=a?function(e,t){var n,i,r,s,o,a,l,u,c,h=e.length,f=0,p=0,v=[],d=0;function m(t){var n=o-d;n<512&&!t||!n||(v.push(e.slice(d,o+1)),d=o+1)}for(o=0;o<h;o++)if(!((l=e.charCodeAt(o))>=97&&l<=122||l<34))switch(l){case 40:p++,i=o;continue;case 41:if(--p<0)return t("missing opening `(`",o);continue;case 59:p||m();continue;case 123:f++,n=o;continue;case 125:if(--f<0)return t("missing opening `{`",o);f||p||m();continue;case 92:if(o<h-1){o++;continue}return t("unescaped `\\`",o);case 34:case 39:case 96:for(c=0,a=o,o+=1;o<h;o++)if(!((u=e.charCodeAt(o))>96)){if(u==l){c=1;break}if(92==u){if(o==h-1)return t("unescaped `\\`",o);o++}}if(c)continue;return t("unmatched `".concat(String.fromCharCode(l),"`"),a);case 47:if(p||o==h-1)continue;if(47==(u=e.charCodeAt(o+1)))for(o+=2;o<h&&(!((u=e.charCodeAt(o))<=13)||10!=u&&13!=u);o++);else if(42==u){for(r=a=o,o+=2;o<h-1&&(125==(u=e.charCodeAt(o))&&(s=o),42!=u||47!=e.charCodeAt(o+1));o++);if(o==h-1)return t("missing closing `*/`",a);o++}continue;case 42:if(o<h-1&&47==e.charCodeAt(o+1))return t("unmatched `/*`",o);continue}return 0!==f?t(r>n&&s>r?"missing closing `}` or `*/`":"missing closing `}`",n):0!==p?t("missing closing `)`",i):(m(!0),v)}(i,c):[i],s=r[0],u(0)},l.end=function(){var t,r=l.i>=e.length;return l.i<n&&(t=i,l.i=n),{isFinished:r,furthest:l.i,furthestPossibleErrorMessage:t,furthestReachedEnd:l.i>=e.length-1,furthestChar:e[l.i]}},l};var ie=function e(t){return{_data:{},add:function(e,t){e=e.toLowerCase(),this._data.hasOwnProperty(e),this._data[e]=t},addMultiple:function(e){var t=this;Object.keys(e).forEach((function(n){t.add(n,e[n])}))},get:function(e){return this._data[e]||t&&t.get(e)},getLocalFunctions:function(){return this._data},inherit:function(){return e(this)},create:function(t){return e(t)}}}(null),re={queryInParens:!0},se={queryInParens:!0},oe=function(e,t,n,i,r,s){this.value=e,this._index=t,this._fileInfo=n,this.mapLines=i,this.rulesetLike=void 0!==r&&r,this.allowRoot=!0,this.copyVisibilityInfo(s)};oe.prototype=Object.assign(new u,{type:"Anonymous",eval:function(){return new oe(this.value,this._index,this._fileInfo,this.mapLines,this.rulesetLike,this.visibilityInfo())},compare:function(e){return e.toCSS&&this.toCSS()===e.toCSS()?0:void 0},isRulesetLike:function(){return this.rulesetLike},genCSS:function(e,t){this.nodeVisible=Boolean(this.value),this.nodeVisible&&t.add(this.value,this._fileInfo,this._index,this.mapLines)}});var ae=function e(t,n,i,r){var s;r=r||0;var o=ne();function a(e,t){throw new $({index:o.i,filename:i.filename,type:t||"Syntax",message:e},n)}function l(e,t){var n=e instanceof Function?e.call(s):o.$re(e);if(n)return n;a(t||("string"==typeof e?"expected '".concat(e,"' got '").concat(o.currentChar(),"'"):"unexpected token"))}function u(e,t){if(o.$char(e))return e;a(t||"expected '".concat(e,"' got '").concat(o.currentChar(),"'"))}function c(e){var t=i.filename;return{lineNumber:_(e,o.getInput()).line+1,fileName:t}}return{parserInput:o,imports:n,fileInfo:i,parseNode:function(e,t,a){var l,u=[],c=o;try{c.start(e,!1,(function(e,t){a({message:e,index:t+r})}));for(var h=0,f=void 0;f=t[h];h++)l=s[f](),u.push(l||null);c.end().isFinished?a(null,u):a(!0,null)}catch(e){throw new $({index:e.index+r,message:e.message},n,i.filename)}},parse:function(r,l,u){var c,h,f,p,v=null,d="";if(u&&u.disablePluginRule&&(s.plugin=function(){o.$re(/^@plugin?\s+/)&&a("@plugin statements are not allowed when disablePluginRule is set to true")}),h=u&&u.globalVars?"".concat(e.serializeVars(u.globalVars),"\n"):"",f=u&&u.modifyVars?"\n".concat(e.serializeVars(u.modifyVars)):"",t.pluginManager)for(var m=t.pluginManager.getPreProcessors(),g=0;g<m.length;g++)r=m[g].process(r,{context:t,imports:n,fileInfo:i});(h||u&&u.banner)&&(d=(u&&u.banner?u.banner:"")+h,(p=n.contentsIgnoredChars)[i.filename]=p[i.filename]||0,p[i.filename]+=d.length),r=d+(r=r.replace(/\r\n?/g,"\n")).replace(/^\uFEFF/,"")+f,n.contents[i.filename]=r;try{o.start(r,t.chunkInput,(function(e,t){throw new $({index:t,type:"Parse",message:e,filename:i.filename},n)})),Qe.Node.prototype.parse=this,c=new Qe.Ruleset(null,this.parsers.primary()),Qe.Node.prototype.rootNode=c,c.root=!0,c.firstRoot=!0,c.functionRegistry=ie.inherit()}catch(e){return l(new $(e,n,i.filename))}var y=o.end();if(!y.isFinished){var b=y.furthestPossibleErrorMessage;b||(b="Unrecognised input","}"===y.furthestChar?b+=". Possibly missing opening '{'":")"===y.furthestChar?b+=". Possibly missing opening '('":y.furthestReachedEnd&&(b+=". Possibly missing something")),v=new $({type:"Parse",message:b,index:y.furthest,filename:i.filename},n)}var w=function(e){return(e=v||e||n.error)?(e instanceof $||(e=new $(e,n,i.filename)),l(e)):l(null,c)};if(!1===t.processImports)return w();new te.ImportVisitor(n,w).run(c)},parsers:s={primary:function(){for(var e,t=this.mixin,n=[];;){for(;e=this.comment();)n.push(e);if(o.finished)break;if(o.peek("}"))break;if(e=this.extendRule())n=n.concat(e);else if(e=t.definition()||this.declaration()||t.call(!1,!1)||this.ruleset()||this.variableCall()||this.entities.call()||this.atrule())n.push(e);else{for(var i=!1;o.$char(";");)i=!0;if(!i)break}}return n},comment:function(){if(o.commentStore.length){var e=o.commentStore.shift();return new Qe.Comment(e.text,e.isLineComment,e.index+r,i)}},entities:{mixinLookup:function(){return s.mixin.call(!0,!0)},quoted:function(e){var t,n=o.i,s=!1;if(o.save(),o.$char("~"))s=!0;else if(e)return void o.restore();if(t=o.$quoted())return o.forget(),new Qe.Quoted(t.charAt(0),t.substr(1,t.length-2),s,n+r,i);o.restore()},keyword:function(){var e=o.$char("%")||o.$re(/^\[?(?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+\]?/);if(e)return Qe.Color.fromKeyword(e)||new Qe.Keyword(e)},call:function(){var e,t,n,s=o.i;if(!o.peek(/^url\(/i))if(o.save(),e=o.$re(/^([\w-]+|%|~|progid:[\w.]+)\(/)){if(e=e[1],(n=this.customFuncCall(e))&&(t=n.parse())&&n.stop)return o.forget(),t;if(t=this.arguments(t),o.$char(")"))return o.forget(),new Qe.Call(e,t,s+r,i);o.restore("Could not parse call arguments or missing ')'")}else o.forget()},declarationCall:function(){var e,t,n=o.i;if(o.save(),e=o.$re(/^[\w]+\(/)){e=e.substring(0,e.length-1);var s,a=this.ruleProperty();if(a&&(s=this.value()),a&&s&&(t=[new Qe.Declaration(a,s,null,null,o.i+r,i,!0)]),o.$char(")"))return o.forget(),new Qe.Call(e,t,n+r,i);o.restore("Could not parse call arguments or missing ')'")}else o.forget()},customFuncCall:function(e){return{alpha:t(s.ieAlpha,!0),boolean:t(n),if:t(n)}[e.toLowerCase()];function t(e,t){return{parse:e,stop:t}}function n(){return[l(s.condition,"expected condition")]}},arguments:function(e){var t,n,i=e||[],r=[];for(o.save();;){if(e)e=!1;else{if(!(n=s.detachedRuleset()||this.assignment()||s.expression()))break;n.value&&1==n.value.length&&(n=n.value[0]),i.push(n)}o.$char(",")||(o.$char(";")||t)&&(t=!0,n=i.length<1?i[0]:new Qe.Value(i),r.push(n),i=[])}return o.forget(),t?r:i},literal:function(){return this.dimension()||this.color()||this.quoted()||this.unicodeDescriptor()},assignment:function(){var e,t;if(o.save(),e=o.$re(/^\w+(?=\s?=)/i))if(o.$char("=")){if(t=s.entity())return o.forget(),new Qe.Assignment(e,t);o.restore()}else o.restore();else o.restore()},url:function(){var e,t=o.i;if(o.autoCommentAbsorb=!1,o.$str("url("))return e=this.quoted()||this.variable()||this.property()||o.$re(/^(?:(?:\\[()'"])|[^()'"])+/)||"",o.autoCommentAbsorb=!0,u(")"),new Qe.URL(void 0!==e.value||e instanceof Qe.Variable||e instanceof Qe.Property?e:new Qe.Anonymous(e,t),t+r,i);o.autoCommentAbsorb=!0},variable:function(){var e,t,n=o.i;if(o.save(),"@"===o.currentChar()&&(t=o.$re(/^@@?[\w-]+/))){if("("===(e=o.currentChar())||"["===e&&!o.prevChar().match(/^\s/)){var a=s.variableCall(t);if(a)return o.forget(),a}return o.forget(),new Qe.Variable(t,n+r,i)}o.restore()},variableCurly:function(){var e,t=o.i;if("@"===o.currentChar()&&(e=o.$re(/^@\{([\w-]+)\}/)))return new Qe.Variable("@".concat(e[1]),t+r,i)},property:function(){var e,t=o.i;if("$"===o.currentChar()&&(e=o.$re(/^\$[\w-]+/)))return new Qe.Property(e,t+r,i)},propertyCurly:function(){var e,t=o.i;if("$"===o.currentChar()&&(e=o.$re(/^\$\{([\w-]+)\}/)))return new Qe.Property("$".concat(e[1]),t+r,i)},color:function(){var e;if(o.save(),"#"===o.currentChar()&&(e=o.$re(/^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3,4})([\w.#[])?/))&&!e[2])return o.forget(),new Qe.Color(e[1],void 0,e[0]);o.restore()},colorKeyword:function(){o.save();var e=o.autoCommentAbsorb;o.autoCommentAbsorb=!1;var t=o.$re(/^[_A-Za-z-][_A-Za-z0-9-]+/);if(o.autoCommentAbsorb=e,t){o.restore();var n=Qe.Color.fromKeyword(t);return n?(o.$str(t),n):void 0}o.forget()},dimension:function(){if(!o.peekNotNumeric()){var e=o.$re(/^([+-]?\d*\.?\d+)(%|[a-z_]+)?/i);return e?new Qe.Dimension(e[1],e[2]):void 0}},unicodeDescriptor:function(){var e;if(e=o.$re(/^U\+[0-9a-fA-F?]+(-[0-9a-fA-F?]+)?/))return new Qe.UnicodeDescriptor(e[0])},javascript:function(){var e,t=o.i;o.save();var n=o.$char("~");if(o.$char("`")){if(e=o.$re(/^[^`]*`/))return o.forget(),new Qe.JavaScript(e.substr(0,e.length-1),Boolean(n),t+r,i);o.restore("invalid javascript definition")}else o.restore()}},variable:function(){var e;if("@"===o.currentChar()&&(e=o.$re(/^(@[\w-]+)\s*:/)))return e[1]},variableCall:function(e){var t,n=o.i,r=!!e,a=e;if(o.save(),a||"@"===o.currentChar()&&(a=o.$re(/^(@[\w-]+)(\(\s*\))?/))){if(!(t=this.mixin.ruleLookups())&&(r&&"()"!==o.$str("()")||"()"!==a[2]))return void o.restore("Missing '[...]' lookup in variable call");r||(a=a[1]);var l=new Qe.VariableCall(a,n,i);return!r&&s.end()?(o.forget(),l):(o.forget(),new Qe.NamespaceValue(l,t,n,i))}o.restore()},extend:function(e){var t,n,s,u,c,h=o.i;if(o.$str(e?"&:extend(":":extend(")){do{for(s=null,t=null;!(s=o.$re(/^(all)(?=\s*(\)|,))/))&&(n=this.element());)t?t.push(n):t=[n];s=s&&s[1],t||a("Missing target selector for :extend()."),c=new Qe.Extend(new Qe.Selector(t),s,h+r,i),u?u.push(c):u=[c]}while(o.$char(","));return l(/^\)/),e&&l(/^;/),u}},extendRule:function(){return this.extend(!0)},mixin:{call:function(e,t){var n,a,l,c,h=o.currentChar(),f=!1,p=o.i;if("."===h||"#"===h){if(o.save(),a=this.elements()){if(o.$char("(")&&(l=this.args(!0).args,u(")"),c=!0),!1!==t&&(n=this.ruleLookups()),!0===t&&!n)return void o.restore();if(e&&!n&&!c)return void o.restore();if(!e&&s.important()&&(f=!0),e||s.end()){o.forget();var v=new Qe.mixin.Call(a,l,p+r,i,!n&&f);return n?new Qe.NamespaceValue(v,n):v}}o.restore()}},elements:function(){for(var e,t,n,s,a,l=/^[#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/;a=o.i,t=o.$re(l);)s=new Qe.Element(n,t,!1,a+r,i),e?e.push(s):e=[s],n=o.$char(">");return e},args:function(e){var t,n,i,r,l,u,c,h=s.entities,f={args:null,variadic:!1},p=[],v=[],d=[],m=!0;for(o.save();;){if(e)u=s.detachedRuleset()||s.exp