less
Version:
Leaner CSS
10 lines • 154 kB
JavaScript
/**
* Less - Leaner CSS v4.6.4
* http://lesscss.org
*
* Copyright (c) 2009-2026, 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(const i in t.dataset)if(Object.prototype.hasOwnProperty.call(t.dataset,i))if("env"===i||"dumpLineNumbers"===i||"rootpath"===i||"errorReporting"===i)e[i]=t.dataset[i];else try{e[i]=JSON.parse(t.dataset[i])}catch(e){}}var i=function(t,i,n){const s=n.href||"",r="less:"+(n.title||e(s)),o=t.getElementById(r);let a=!1;const l=t.createElement("style");l.setAttribute("type","text/css"),n.media&&l.setAttribute("media",n.media),l.id=r,l.styleSheet||(l.appendChild(t.createTextNode(i)),a=null!==o&&o.childNodes.length>0&&l.childNodes.length>0&&o.firstChild.nodeValue===l.firstChild.nodeValue);const u=t.getElementsByTagName("head")[0];if(null===o||!1===a){const e=n&&n.nextSibling||null;e?e.parentNode.insertBefore(l,e):u.appendChild(l)}if(o&&!1===a&&o.parentNode.removeChild(o),l.styleSheet)try{l.styleSheet.cssText=i}catch(e){throw new Error("Couldn't reassign styleSheet.cssText.")}},n=function(e){const t=e.document;return t.currentScript||(()=>{const e=t.getElementsByTagName("script");return e[e.length-1]})()},s={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(let t=0;t<this._listeners.length;t++)if(this._listeners[t]===e)return void this._listeners.splice(t,1)},_fireEvent:function(e,t){for(let i=0;i<this._listeners.length;i++){const n=this._listeners[i][e];n&&n(t)}},_listeners:[]};class r{constructor(e,t){this.fileManagers=t||[],e=e||{};const i=[],n=i.concat(["encodeBase64","mimeLookup","charsetLookup","getSourceMapGenerator"]);for(let t=0;t<n.length;t++){const s=n[t],r=e[s];r?this[s]=r.bind(e):t<i.length&&this.warn("missing required function in environment - "+s)}}getFileManager(e,t,i,n,r){e||s.warn("getFileManager called with no filename.. Please report this issue. continuing."),void 0===t&&s.warn("getFileManager called with null directory.. Please report this issue. continuing.");let o=this.fileManagers;i.pluginManager&&(o=[].concat(o).concat(i.pluginManager.getFileManagers()));for(let s=o.length-1;s>=0;s--){const a=o[s];if(a[r?"supportsSync":"supports"](e,t,i,n))return a}return null}addFileManager(e){this.fileManagers.push(e)}clearFileManagers(){this.fileManagers=[]}}var 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};class u{get type(){return""}constructor(){this.parent=null,this.visibilityBlocks=void 0,this.nodeVisible=void 0,this.rootNode=null,this.parsed=null,this.value=void 0,this._index=void 0,this._fileInfo=void 0}get currentFileInfo(){return this.fileInfo()}get index(){return this.getIndex()}setParent(e,t){function i(e){e&&e instanceof u&&(e.parent=t)}Array.isArray(e)?e.forEach(i):i(e)}getIndex(){return this._index||this.parent&&this.parent.getIndex()||0}fileInfo(){return this._fileInfo||this.parent&&this.parent.fileInfo()||{}}isRulesetLike(){return!1}toCSS(e){const t=[];return this.genCSS(e,{add:function(e,i,n){t.push(e)},isEmpty:function(){return 0===t.length}}),t.join("")}genCSS(e,t){t.add(this.value)}accept(e){this.value=e.visit(this.value)}eval(e){return this}_operate(e,t,i,n){switch(t){case"+":return i+n;case"-":return i-n;case"*":return i*n;case"/":return i/n}}fround(e,t){const i=e&&e.numPrecision;return i?Number((t+2e-16).toFixed(i)):t}static compare(e,t){if(e.compare&&"Quoted"!==t.type&&"Anonymous"!==t.type)return e.compare(t);if(t.compare)return-t.compare(e);if(e.type!==t.type)return;let i=e.value,n=t.value;if(!Array.isArray(i))return i===n?0:void 0;if(Array.isArray(n)&&i.length===n.length){for(let e=0;e<i.length;e++)if(0!==u.compare(i[e],n[e]))return;return 0}}static numericCompare(e,t){return e<t?-1:e===t?0:e>t?1:void 0}blocksVisibility(){return void 0===this.visibilityBlocks&&(this.visibilityBlocks=0),0!==this.visibilityBlocks}addVisibilityBlock(){void 0===this.visibilityBlocks&&(this.visibilityBlocks=0),this.visibilityBlocks=this.visibilityBlocks+1}removeVisibilityBlock(){void 0===this.visibilityBlocks&&(this.visibilityBlocks=0),this.visibilityBlocks=this.visibilityBlocks-1}ensureVisibility(){this.nodeVisible=!0}ensureInvisibility(){this.nodeVisible=!1}isVisible(){return this.nodeVisible}visibilityInfo(){return{visibilityBlocks:this.visibilityBlocks,nodeVisible:this.nodeVisible}}copyVisibilityInfo(e){e&&(this.visibilityBlocks=e.visibilityBlocks,this.nodeVisible=e.nodeVisible)}}u.prototype.parse=void 0;class c extends u{get type(){return"Color"}constructor(e,t,i){super();const n=this;Array.isArray(e)?this.rgb=e:e.length>=6?(this.rgb=[],e.match(/.{2}/g).map((function(e,t){t<3?n.rgb.push(parseInt(e,16)):n.alpha=parseInt(e,16)/255}))):(this.rgb=[],e.split("").map((function(e,t){t<3?n.rgb.push(parseInt(e+e,16)):n.alpha=parseInt(e+e,16)/255}))),void 0===this.alpha&&(this.alpha="number"==typeof t?t:1),void 0!==i&&(this.value=i)}luma(){let e=this.rgb[0]/255,t=this.rgb[1]/255,i=this.rgb[2]/255;return e=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4),t=t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4),i=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4),.2126*e+.7152*t+.0722*i}genCSS(e,t){t.add(this.toCSS(e))}toCSS(e,t){const i=e&&e.compress&&!t;let n,s,r,o=[];if(s=this.fround(e,this.alpha),this.value)if(0===this.value.indexOf("rgb"))s<1&&(r="rgba");else{if(0!==this.value.indexOf("hsl"))return this.value;r=s<1?"hsla":"hsl"}else s<1&&(r="rgba");switch(r){case"rgba":o=this.rgb.map((function(e){return h(Math.round(e),255)})).concat(h(s,1));break;case"hsla":o.push(h(s,1));case"hsl":n=this.toHSL(),o=[this.fround(e,n.h),this.fround(e,100*n.s)+"%",this.fround(e,100*n.l)+"%"].concat(o)}if(r)return`${r}(${o.join(","+(i?"":" "))})`;if(n=this.toRGB(),i){const e=n.split("");e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]&&(n=`#${e[1]}${e[3]}${e[5]}`)}return n}operate(e,t,i){const n=new Array(3),s=this.alpha*(1-i.alpha)+i.alpha;for(let s=0;s<3;s++)n[s]=this._operate(e,t,this.rgb[s],i.rgb[s]);return new c(n,s)}toRGB(){return f(this.rgb)}toHSL(){const e=this.rgb[0]/255,t=this.rgb[1]/255,i=this.rgb[2]/255,n=this.alpha,s=Math.max(e,t,i),r=Math.min(e,t,i);let o,a;const l=(s+r)/2,u=s-r;if(s===r)o=a=0;else{switch(a=l>.5?u/(2-s-r):u/(s+r),s){case e:o=(t-i)/u+(t<i?6:0);break;case t:o=(i-e)/u+2;break;case i:o=(e-t)/u+4}o/=6}return{h:360*o,s:a,l:l,a:n}}toHSV(){const e=this.rgb[0]/255,t=this.rgb[1]/255,i=this.rgb[2]/255,n=this.alpha,s=Math.max(e,t,i),r=Math.min(e,t,i);let o,a;const l=s,u=s-r;if(a=0===s?0:u/s,s===r)o=0;else{switch(s){case e:o=(t-i)/u+(t<i?6:0);break;case t:o=(i-e)/u+2;break;case i:o=(e-t)/u+4}o/=6}return{h:360*o,s:a,v:l,a:n}}toARGB(){return f([255*this.alpha].concat(this.rgb))}compare(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}static fromKeyword(e){let t;const i=e.toLowerCase();if(o.hasOwnProperty(i)?t=new c(o[i].slice(1)):"transparent"===i&&(t=new c([0,0,0],0)),t)return t.value=e,t}}function h(e,t){return Math.min(Math.max(e,0),t)}function f(e){return"#"+e.map((function(e){return((e=h(Math.round(e),255))<16?"0":"")+e.toString(16)})).join("")}class p extends u{get type(){return"Paren"}constructor(e){super(),this.value=e,this.noSpacing=void 0}genCSS(e,t){t.add("("),this.value.genCSS(e,t),t.add(")")}eval(e){const t=new p(this.value.eval(e));return this.noSpacing&&(t.noSpacing=!0),t}}const d={"":!0," ":!0,"|":!0};class m extends u{get type(){return"Combinator"}constructor(e){super()," "===e?(this.value=" ",this.emptyOrWhitespace=!0):(this.value=e?e.trim():"",this.emptyOrWhitespace=""===this.value)}genCSS(e,t){const i=e.compress||d[this.value]?"":" ";t.add(i+this.value+i)}}class g extends u{get type(){return"Element"}constructor(e,t,i,n,s,r){super(),this.combinator=e instanceof m?e:new m(e),this.value="string"==typeof t?t.trim():t||"",this.isVariable=i,this._index=n,this._fileInfo=s,this.copyVisibilityInfo(r),this.setParent(this.combinator,this)}accept(e){const t=this.value;this.combinator=e.visit(this.combinator),"object"==typeof t&&(this.value=e.visit(t))}eval(e){return new g(this.combinator,this.value.eval?this.value.eval(e):this.value,this.isVariable,this.getIndex(),this.fileInfo(),this.visibilityInfo())}clone(){return new g(this.combinator,this.value,this.isVariable,this.getIndex(),this.fileInfo(),this.visibilityInfo())}genCSS(e,t){t.add(this.toCSS(e),this.fileInfo(),this.getIndex())}toCSS(e){const t=e||{};let i=this.value;const n=t.firstSelector;return i instanceof p&&(t.firstSelector=!0),i=i.toCSS?i.toCSS(t):i,t.firstSelector=n,""===i&&"&"===this.combinator.value.charAt(0)?"":this.combinator.toCSS(t)+i}}const v={ALWAYS:0,PARENS_DIVISION:1,PARENS:2},y=0,b=1,w=2;function x(e){return Object.prototype.toString.call(e).slice(8,-1)}function S(e){return"Array"===x(e)}function I(e,t={}){if(S(e))return e.map(e=>I(e,t));if(!function(e){if("Object"!==x(e))return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}(e))return e;return[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)].reduce((i,n)=>{if(S(t.props)&&!t.props.includes(n))return i;return function(e,t,i,n,s){const r={}.propertyIsEnumerable.call(n,t)?"enumerable":"nonenumerable";"enumerable"===r&&(e[t]=i),s&&"nonenumerable"===r&&Object.defineProperty(e,t,{value:i,enumerable:!1,writable:!0,configurable:!0})}(i,n,I(e[n],t),e,t.nonenumerable),i},{})}function C(e,t){let i=e+1,n=null,s=-1;for(;--i>=0&&"\n"!==t.charAt(i);)s++;return"number"==typeof e&&(n=(t.slice(0,e).match(/\n/g)||"").length),{line:n,column:s}}function k(e){let t;const i=e.length,n=new Array(i);for(t=0;t<i;t++)n[t]=e[t];return n}function A(e){const t={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function _(e,t){let i=t||{};if(!t._defaults){i={};const n=I(e);i._defaults=n;const s=t?I(t):{};Object.assign(i,n,s)}return i}function $(e,t){if(t&&t._defaults)return t;const i=_(e,t);if(i.strictMath&&(i.math=v.PARENS),i.relativeUrls&&(i.rewriteUrls=w),"string"==typeof i.math)switch(i.math.toLowerCase()){case"always":i.math=v.ALWAYS;break;case"parens-division":i.math=v.PARENS_DIVISION;break;case"strict":case"parens":i.math=v.PARENS;break;default:i.math=v.PARENS}if("string"==typeof i.rewriteUrls)switch(i.rewriteUrls.toLowerCase()){case"off":i.rewriteUrls=y;break;case"local":i.rewriteUrls=b;break;case"all":i.rewriteUrls=w}return i}function M(e,t=[]){for(let i=0,n=e.length;i<n;i++){const n=e[i];Array.isArray(n)?M(n,t):void 0!==n&&t.push(n)}return t}function E(e){return null==e}var P=Object.freeze({__proto__:null,getLocation:C,copyArray:k,clone:A,defaults:_,copyOptions:$,merge:function(e,t){for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},flattenArray:M,isNullOrUndefined:E});const R=/(<anonymous>|Function):(\d+):(\d+)/,F=function(e,t,i){Error.call(this);const n=e.filename||i;if(this.message=e.message,this.stack=e.stack,this.type=e.type||"Syntax",t&&n){const i=t.contents[n],r=C(e.index,i);var s=r.line;const o=r.column,a=e.call&&C(e.call,i).line,l=i?i.split("\n"):"";if(this.filename=n,this.index=e.index,this.line="number"==typeof s?s+1:null,this.column=o,!this.line&&this.stack){const t=this.stack.match(R),i=new Function("a","throw new Error()");let n=0;try{i()}catch(e){const t=e.stack.match(R);n=1-parseInt(t[2])}t&&(t[2]&&(this.line=parseInt(t[2])+n),t[3]&&(this.column=parseInt(t[3])))}this.callLine=a+1,this.callExtract=l[a],this.extract=[l[this.line-2],l[this.line-1],l[this.line]]}};if(void 0===Object.create){const e=function(){};e.prototype=Error.prototype,F.prototype=new e}else F.prototype=Object.create(Error.prototype);F.prototype.constructor=F,F.prototype.toString=function(e){e=e||{};const t=(this.type??"").toLowerCase().includes("warning"),i=t?this.type:this.type+"Error",n=t?"yellow":"red";let s="";const r=this.extract||[];let o=[],a=function(e){return e};if(e.stylize){const t=typeof e.stylize;if("function"!==t)throw Error(`options.stylize should be a function, got a ${t}!`);a=e.stylize}if(null!==this.line){if(t||"string"!=typeof r[0]||o.push(a(`${this.line-1} ${r[0]}`,"grey")),"string"==typeof r[1]){let e=this.line+" ";r[1]&&(e+=r[1].slice(0,this.column)+a(a(a(r[1].slice(this.column,this.column+1),"bold")+r[1].slice(this.column+1),"red"),"inverse")),o.push(e)}t||"string"!=typeof r[2]||o.push(a(`${this.line+1} ${r[2]}`,"grey")),o=o.join("\n")+a("","reset")+"\n"}return s+=a(`${i}: ${this.message}`,n),this.filename&&(s+=a(" in ",n)+this.filename),this.line&&(s+=a(` on line ${this.line}, column ${this.column+1}:`,"grey")),s+="\n"+o,this.callLine&&(s+=a("from ",n)+(this.filename||"")+"/n",s+=`${a(this.callLine,"grey")} ${this.callExtract}/n`),s};const O={visitDeeper:!0};let V=!1;function L(e){return e}class D{constructor(e){this._implementation=e,this._visitInCache={},this._visitOutCache={},V||(!function e(t,i){let n,s;for(n in t)switch(s=t[n],typeof s){case"function":s.prototype&&s.prototype.type&&(s.prototype.typeIndex=i++);break;case"object":i=e(s,i)}return i}(ze,1),V=!0)}visit(e){if(!e)return e;const t=e.typeIndex;if(!t)return e.value&&e.value.typeIndex&&this.visit(e.value),e;const i=this._implementation;let n=this._visitInCache[t],s=this._visitOutCache[t];const r=O;let o;if(r.visitDeeper=!0,n||(o="visit"+e.type,n=i[o]||L,s=i[o+"Out"]||L,this._visitInCache[t]=n,this._visitOutCache[t]=s),n!==L){const t=n.call(i,e,r);e&&i.isReplacing&&(e=t)}if(r.visitDeeper&&e)if(e.length)for(let t=0,i=e.length;t<i;t++)e[t].accept&&e[t].accept(this);else e.accept&&e.accept(this);return s!=L&&s.call(i,e),e}visitArray(e,t){if(!e)return e;const i=e.length;let n;if(t||!this._implementation.isReplacing){for(n=0;n<i;n++)this.visit(e[n]);return e}const s=[];for(n=0;n<i;n++){const t=this.visit(e[n]);void 0!==t&&(t.splice?t.length&&this.flatten(t,s):s.push(t))}return s}flatten(e,t){let i,n,s,r,o,a;for(t||(t=[]),n=0,i=e.length;n<i;n++)if(s=e[n],void 0!==s)if(s.splice)for(o=0,r=s.length;o<r;o++)a=s[o],void 0!==a&&(a.splice?a.length&&this.flatten(a,t):t.push(a));else t.push(s);return t}}const N={},B=function(e,t,i){if(e)for(let n=0;n<i.length;n++)Object.prototype.hasOwnProperty.call(e,i[n])&&(t[i[n]]=e[i[n]])},U=["paths","rewriteUrls","rootpath","strictImports","insecure","dumpLineNumbers","compress","syncImport","mime","useFileCache","processImports","pluginManager","quiet","quietDeprecations"];N.Parse=function(e){B(e,this,U),"string"==typeof this.paths&&(this.paths=[this.paths])};const j=["paths","compress","math","strictUnits","sourceMap","importMultiple","urlArgs","javascriptEnabled","pluginManager","importantScope","rewriteUrls"];function q(e){return!/^(?:[a-z-]+:|\/|#)/i.test(e)}function T(e){return"."===e.charAt(0)}N.Eval=function(e,t){B(e,this,j),"string"==typeof this.paths&&(this.paths=[this.paths]),this.frames=t||[],this.importantScope=this.importantScope||[]},N.Eval.prototype.enterCalc=function(){this.calcStack||(this.calcStack=[]),this.calcStack.push(!0),this.inCalc=!0},N.Eval.prototype.exitCalc=function(){this.calcStack.pop(),this.calcStack.length||(this.inCalc=!1)},N.Eval.prototype.inParenthesis=function(){this.parensStack||(this.parensStack=[]),this.parensStack.push(!0)},N.Eval.prototype.outOfParenthesis=function(){this.parensStack.pop()},N.Eval.prototype.inCalc=!1,N.Eval.prototype.mathOn=!0,N.Eval.prototype.isMathOn=function(e){return!!this.mathOn&&(!!("/"!==e||this.math===v.ALWAYS||this.parensStack&&this.parensStack.length)&&(!(this.math>v.PARENS_DIVISION)||this.parensStack&&this.parensStack.length))},N.Eval.prototype.pathRequiresRewrite=function(e){return(this.rewriteUrls===b?T:q)(e)},N.Eval.prototype.rewritePath=function(e,t){let i;return t=t||"",i=this.normalizePath(t+e),T(e)&&q(t)&&!1===T(i)&&(i="./"+i),i},N.Eval.prototype.normalizePath=function(e){const t=e.split("/").reverse();let i;for(e=[];0!==t.length;)switch(i=t.pop(),i){case".":break;case"..":0===e.length||".."===e[e.length-1]?e.push(i):e.pop();break;default:e.push(i)}return e.join("/")};class z{constructor(e){this.imports=[],this.variableImports=[],this._onSequencerEmpty=e,this._currentDepth=0}addImport(e){const t=this,i={callback:e,args:null,isReady:!1};return this.imports.push(i),function(){i.args=Array.prototype.slice.call(arguments,0),i.isReady=!0,t.tryRun()}}addVariableImport(e){this.variableImports.push(e)}tryRun(){this._currentDepth++;try{for(;;){for(;this.imports.length>0;){const 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;const e=this.variableImports[0];this.variableImports=this.variableImports.slice(1),e()}}finally{this._currentDepth--}0===this._currentDepth&&this._onSequencerEmpty&&this._onSequencerEmpty()}}const G=function(e,t){this._visitor=new D(this),this._importer=e,this._finish=t,this.context=new N.Eval,this.importCount=0,this.onceFileDetectionMap={},this.recursionDetector={},this._sequencer=new z(this._onSequencerEmpty.bind(this))};G.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){const i=e.options.inline;if(!e.css||i){const t=new N.Eval(this.context,k(this.context.frames)),i=t.frames[0];this.importCount++,e.isVariableImport()?this._sequencer.addVariableImport(this.processImportNode.bind(this,e,t,i)):this.processImportNode(e,t,i)}t.visitDeeper=!1},processImportNode:function(e,t,i){let n;const s=e.options.inline;try{n=e.evalForImport(t)}catch(t){t.filename||(t.index=e.getIndex(),t.filename=e.fileInfo().filename),e.css=!0,e.error=t}if(!n||n.css&&!s)this.importCount--,this.isFinished&&this._sequencer.tryRun();else{n.options.multiple&&(t.importMultiple=!0);const s=void 0===n.css;for(let t=0;t<i.rules.length;t++)if(i.rules[t]===e){i.rules[t]=n;break}const r=this.onImported.bind(this,n,t),o=this._sequencer.addImport(r);this._importer.push(n.getPath(),s,n.fileInfo(),n.options,o)}},onImported:function(e,t,i,n,s,r){i&&(i.filename||(i.index=e.getIndex(),i.filename=e.fileInfo().filename),this.error=i);const o=this,a=e.options.inline,l=e.options.isPlugin,u=e.options.optional,c=s||r in o.recursionDetector;if(t.importMultiple||(e.skip=!!c||function(){return r in o.onceFileDetectionMap||(o.onceFileDetectionMap[r]=!0,!1)}),!r&&u&&(e.skip=!0),n&&(e.root=n,e.importedFilename=r,!a&&!l&&(t.importMultiple||!c))){o.recursionDetector[r]=!0;const e=this.context;this.context=t;try{this._visitor.visit(n)}catch(i){this.error=i}this.context=e}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){e.value?this.context.frames.unshift(e):e.declarations&&e.declarations.length?e.isRooted?this.context.frames.unshift(e):this.context.frames.unshift(e.declarations[0]):e.rules&&e.rules.length&&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()}};class W{constructor(){this._visitor=new D(this),this.contexts=[],this.allExtendsStack=[[]]}run(e){return(e=this._visitor.visit(e)).allExtends=this.allExtendsStack[0],e}visitDeclaration(e,t){t.visitDeeper=!1}visitMixinDefinition(e,t){t.visitDeeper=!1}visitRuleset(e,t){if(e.root)return;let i,n,s;const r=[];let o;const a=e.rules,l=a?a.length:0;for(i=0;i<l;i++)e.rules[i]instanceof ze.Extend&&(r.push(a[i]),e.extendOnEveryPath=!0);const u=e.paths;for(i=0;i<u.length;i++){const t=u[i],a=t[t.length-1].extendList;for(o=a?k(a).concat(r):r,o&&(o=o.map((function(e){return e.clone()}))),n=0;n<o.length;n++)this.foundExtends=!0,s=o[n],s.findSelfSelectors(t),s.ruleset=e,0===n&&(s.firstExtendOnThisSelectorPath=!0),this.allExtendsStack[this.allExtendsStack.length-1].push(s)}this.contexts.push(e.selectors)}visitRulesetOut(e){e.root||(this.contexts.length=this.contexts.length-1)}visitMedia(e,t){e.allExtends=[],this.allExtendsStack.push(e.allExtends)}visitMediaOut(e){this.allExtendsStack.length=this.allExtendsStack.length-1}visitAtRule(e,t){e.allExtends=[],this.allExtendsStack.push(e.allExtends)}visitAtRuleOut(e){this.allExtendsStack.length=this.allExtendsStack.length-1}}function J(e){return`/* line ${e.debugInfo.lineNumber}, ${e.debugInfo.fileName} */\n`}function K(e){let t=e.debugInfo.fileName;return/^[a-z]+:\/\//i.test(t)||(t="file://"+t),`@media -sass-debug-info{filename{font-family:${t.replace(/([.:/\\])/g,(function(e){return"\\"==e&&(e="/"),"\\"+e}))}}line{font-family:\\00003${e.debugInfo.lineNumber}}}\n`}function H(e,t,i){let n="";if(e.dumpLineNumbers&&!e.compress)switch(e.dumpLineNumbers){case"comments":n=J(t);break;case"mediaquery":n=K(t);break;case"all":n=J(t)+(i||"")+K(t)}return n}class Q extends u{get type(){return"Comment"}constructor(e,t,i,n){super(),this.value=e,this.isLineComment=t,this._index=i,this._fileInfo=n,this.allowRoot=!0,this.debugInfo=void 0}genCSS(e,t){this.debugInfo&&t.add(H(e,this),this.fileInfo(),this.getIndex()),t.add(this.value)}isSilent(e){const t=e.compress&&"!"!==this.value[2];return this.isLineComment||t}}class Z extends u{get type(){return"Unit"}constructor(e,t,i){super(),this.numerator=e?k(e).sort():[],this.denominator=t?k(t).sort():[],i?this.backupUnit=i:e&&e.length&&(this.backupUnit=e[0])}clone(){return new Z(k(this.numerator),k(this.denominator),this.backupUnit)}genCSS(e,t){const i=e&&e.strictUnits;1===this.numerator.length?t.add(this.numerator[0]):!i&&this.backupUnit?t.add(this.backupUnit):!i&&this.denominator.length&&t.add(this.denominator[0])}toString(){let e,t=this.numerator.join("*");for(e=0;e<this.denominator.length;e++)t+="/"+this.denominator[e];return t}compare(e){return this.is(e.toString())?0:void 0}is(e){return this.toString().toUpperCase()===e.toUpperCase()}isLength(){return RegExp("^(px|em|ex|ch|rem|in|cm|mm|pc|pt|ex|vw|vh|vmin|vmax)$","gi").test(this.toCSS({}))}isEmpty(){return 0===this.numerator.length&&0===this.denominator.length}isSingular(){return this.numerator.length<=1&&0===this.denominator.length}map(e){let t;for(t=0;t<this.numerator.length;t++)this.numerator[t]=e(this.numerator[t],!1);for(t=0;t<this.denominator.length;t++)this.denominator[t]=e(this.denominator[t],!0)}usedUnits(){let e;const t={};let i,n;for(n in i=function(i){return e.hasOwnProperty(i)&&!t[n]&&(t[n]=i),i},a)a.hasOwnProperty(n)&&(e=a[n],this.map(i));return t}cancel(){const e={};let t,i;for(i=0;i<this.numerator.length;i++)t=this.numerator[i],e[t]=(e[t]||0)+1;for(i=0;i<this.denominator.length;i++)t=this.denominator[i],e[t]=(e[t]||0)-1;for(t in this.numerator=[],this.denominator=[],e)if(e.hasOwnProperty(t)){const n=e[t];if(n>0)for(i=0;i<n;i++)this.numerator.push(t);else if(n<0)for(i=0;i<-n;i++)this.denominator.push(t)}this.numerator.sort(),this.denominator.sort()}}class X extends u{get type(){return"Dimension"}constructor(e,t){if(super(),this.value=parseFloat(e),isNaN(this.value))throw new Error("Dimension is not a number.");this.unit=t&&t instanceof Z?t:new Z(t?[t]:void 0),this.setParent(this.unit,this)}accept(e){this.unit=e.visit(this.unit)}eval(e){return this}toColor(){const e=this.value;return new c([e,e,e])}genCSS(e,t){if(e&&e.strictUnits&&!this.unit.isSingular())throw new Error("Multiple units in dimension. Correct the units or use the unit function. Bad unit: "+this.unit.toString());const i=this.fround(e,this.value);let n=String(i);if(0!==i&&i<1e-6&&i>-1e-6&&(n=i.toFixed(20).replace(/0+$/,"")),e&&e.compress){if(0===i&&this.unit.isLength())return void t.add(n);i>0&&i<1&&(n=n.slice(1))}t.add(n),this.unit.genCSS(e,t)}operate(e,t,i){let n=this._operate(e,t,this.value,i.value),s=this.unit.clone();if("+"===t||"-"===t)if(0===s.numerator.length&&0===s.denominator.length)s=i.unit.clone(),this.unit.backupUnit&&(s.backupUnit=this.unit.backupUnit);else if(0===i.unit.numerator.length&&0===s.denominator.length);else{if(i=i.convertTo(this.unit.usedUnits()),e.strictUnits&&i.unit.toString()!==s.toString())throw new Error(`Incompatible units. Change the units or use the unit function. Bad units: '${s.toString()}' and '${i.unit.toString()}'.`);n=this._operate(e,t,this.value,i.value)}else"*"===t?(s.numerator=s.numerator.concat(i.unit.numerator).sort(),s.denominator=s.denominator.concat(i.unit.denominator).sort(),s.cancel()):"/"===t&&(s.numerator=s.numerator.concat(i.unit.denominator).sort(),s.denominator=s.denominator.concat(i.unit.numerator).sort(),s.cancel());return new X(n,s)}compare(e){let t,i;if(e instanceof X){if(this.unit.isEmpty()||e.unit.isEmpty())t=this,i=e;else if(t=this.unify(),i=e.unify(),0!==t.unit.compare(i.unit))return;return u.numericCompare(t.value,i.value)}}unify(){return this.convertTo({length:"px",duration:"s",angle:"rad"})}convertTo(e){let t=this.value;const i=this.unit.clone();let n,s,r,o,l,u={};if("string"==typeof e){for(n in a)a[n].hasOwnProperty(e)&&(u={},u[n]=e);e=u}for(s in l=function(e,i){return r.hasOwnProperty(e)?(i?t/=r[e]/r[o]:t*=r[e]/r[o],o):e},e)e.hasOwnProperty(s)&&(o=e[s],r=a[s],i.map(l));return i.cancel(),new X(t,i)}}class Y extends u{get type(){return"Anonymous"}constructor(e,t,i,n,s,r){super(),this.value=e,this._index=t,this._fileInfo=i,this.mapLines=n,this.rulesetLike=void 0!==s&&s,this.allowRoot=!0,this.copyVisibilityInfo(r)}eval(){return new Y(this.value,this._index,this._fileInfo,this.mapLines,this.rulesetLike,this.visibilityInfo())}compare(e){return e.toCSS&&this.toCSS({})===e.toCSS({})?0:void 0}isRulesetLike(){return this.rulesetLike}genCSS(e,t){this.nodeVisible=Boolean(this.value),this.nodeVisible&&t.add(this.value,this._fileInfo,this._index,this.mapLines)}}class ee extends u{get type(){return"Expression"}constructor(e,t){if(super(),this.value=e,this.noSpacing=t,this.parens=void 0,this.parensInOp=void 0,!e)throw new Error("Expression requires an array parameter")}accept(e){this.value=e.visitArray(this.value)}eval(e){const t=this.noSpacing;let i;const n=e.isMathOn(),s=this.parens;let r=!1;s&&e.inParenthesis();const o=this.value;if(o.length>1)i=new ee(o.map((function(t){return t.eval?t.eval(e):t})),this.noSpacing);else if(1===o.length){const t=o[0];!t.parens||t.parensInOp||e.inCalc||(r=!0),i=o[0].eval(e)}else i=this;return s&&e.outOfParenthesis(),!this.parens||!this.parensInOp||n||r||i instanceof X||(i=new p(i)),i.noSpacing=i.noSpacing||t,i}genCSS(e,t){const i=this.value;for(let n=0;n<i.length;n++)i[n].genCSS(e,t),!this.noSpacing&&n+1<i.length&&(i[n+1]instanceof Y&&!(i[n+1]instanceof Y&&","!==i[n+1].value)||t.add(" "))}throwAwayComments(){this.value=this.value.filter((function(e){return!(e instanceof Q)}))}}class te extends u{get type(){return"Value"}constructor(e){if(super(),!e)throw new Error("Value requires an array argument");Array.isArray(e)?this.value=e:this.value=[e]}accept(e){this.value&&(this.value=e.visitArray(this.value))}eval(e){const t=this.value;return 1===t.length?t[0].eval(e):new te(t.map((function(t){return t.eval(e)})))}genCSS(e,t){const i=this.value;let n;for(n=0;n<i.length;n++)i[n].genCSS(e,t),n+1<i.length&&t.add(e&&e.compress?",":", ")}}function ie(e){if(!e)return;const t={},i=[];for(let n=0;n<e.length;n++){const s=e[n];if(s.merge){const r=s.name;t[r]?e.splice(n--,1):i.push(t[r]=[]),t[r].push(s)}}i.forEach(e=>{if(e.length>0){const t=e[0];let i=[];const n=[new ee(i)];e.forEach(e=>{"+"===e.merge&&i.length>0&&n.push(new ee(i=[])),i.push(e.value),t.important=t.important||e.important}),t.value=new te(n)}})}class ne{constructor(e){this._visitor=new D(this),this._context=e}containsSilentNonBlockedChild(e){let t;if(!e)return!1;for(let i=0;i<e.length;i++)if(t=e[i],t.isSilent&&t.isSilent(this._context)&&!t.blocksVisibility())return!0;return!1}keepOnlyVisibleChilds(e){e&&e.rules&&(e.rules=e.rules.filter(e=>e.isVisible()))}isEmpty(e){return!e||!e.rules||0===e.rules.length}hasVisibleSelector(e){return!(!e||!e.paths)&&e.paths.length>0}resolveVisibility(e){if(!e.blocksVisibility()){if(this.isEmpty(e))return;return e}const t=e.rules[0];if(this.keepOnlyVisibleChilds(t),!this.isEmpty(t))return e.ensureVisibility(),e.removeVisibilityBlock(),e}isVisibleRuleset(e){return!!e.firstRoot||!this.isEmpty(e)&&!(!e.root&&!this.hasVisibleSelector(e))}}const se=function(e){this._visitor=new D(this),this._context=e,this.utils=new ne(e)};se.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){const i=e.rules[0].rules;return e.accept(this._visitor),t.visitDeeper=!1,this.utils.resolveVisibility(e,i)},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){const i=function(e){const t=e.rules;return function(e){const 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,i)},visitAtRuleWithoutBody:function(e,t){if(!e.blocksVisibility()){if("@charset"===e.name){if(this.charset){if(e.debugInfo){const t=new ze.Comment(`/* ${e.toCSS(this._context).replace(/\n/g,"")} */\n`);return t.debugInfo=e.debugInfo,this._visitor.visit(t)}return}this.charset=!0}return e}},checkValidNodes:function(e,t){if(e)for(let i=0;i<e.length;i++){const n=e[i];if(t&&n instanceof ze.Declaration&&!n.variable)throw{message:"Properties must be inside selector blocks. They cannot be in the root",index:n.getIndex(),filename:n.fileInfo()&&n.fileInfo().filename};if(n instanceof ze.Call)throw{message:`Function '${n.name}' did not return a root node`,index:n.getIndex(),filename:n.fileInfo()&&n.fileInfo().filename};if(n.type&&!n.allowRoot)throw{message:n.type+" node returned by a function is not valid here",index:n.getIndex(),filename:n.fileInfo()&&n.fileInfo().filename}}},visitRuleset:function(e,t){let i;const n=[];if(this.checkValidNodes(e.rules,e.firstRoot),e.root)e.accept(this._visitor),t.visitDeeper=!1;else{this._compileRulesetPaths(e);const s=e.rules;let r=s?s.length:0;for(let e=0;e<r;)i=s[e],i&&i.rules?(n.push(this._visitor.visit(i)),s.splice(e,1),r--):e++;r>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(),n.splice(0,0,e)),1===n.length?n[0]:n},_compileRulesetPaths:function(e){e.paths&&(e.paths=e.paths.filter(e=>{let t;for(" "===e[0].elements[0].combinator.value&&(e[0].elements[0].combinator=new ze.Combinator("")),t=0;t<e.length;t++)if(e[t].isVisible()&&e[t].getIsOutput())return!0;return!1}))},_removeDuplicateRules:function(e){if(!e)return;const t={};for(let i=e.length-1;i>=0;i--){let n=e[i];if(n instanceof ze.Declaration)if(Object.prototype.hasOwnProperty.call(t,n.name)){let s=t[n.name];if(!Array.isArray(s)){const e=s.toCSS(this._context);s=t[n.name]=[e]}const r=n.toCSS(this._context);-1!==s.indexOf(r)?e.splice(i,1):s.push(r)}else t[n.name]=n}},_mergeRules:ie};var re={Visitor:D,ImportVisitor:G,MarkVisibleSelectorsVisitor:class{constructor(e){this.visible=e}run(e){this.visit(e)}visitArray(e){if(!e)return e;const t=e.length;let i;for(i=0;i<t;i++)this.visit(e[i]);return e}visit(e){return e?e.constructor===Array?this.visitArray(e):(!e.blocksVisibility||e.blocksVisibility()||(this.visible?e.ensureVisibility():e.ensureInvisibility(),e.accept(this)),e):e}},ExtendVisitor:class{constructor(){this._visitor=new D(this)}run(e){const t=new W;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];const i=this._visitor.visit(e);return this.checkExtendsForNonMatched(e.allExtends),i}checkExtendsForNonMatched(e){const t=this.extendIndices;e.filter((function(e){return!e.hasFoundMatches&&1==e.parent_ids.length})).forEach((function(e){let i="_unknown_";try{i=e.selector.toCSS({})}catch(e){}t[`${e.index} ${i}`]||(t[`${e.index} ${i}`]=!0,s.warn(`WARNING: extend '${i}' has no matches`))}))}doExtendChaining(e,t,i){let n,s,r;const o=[];let a;const l=this;let u,c,h,f;for(i=i||0,n=0;n<e.length;n++)for(s=0;s<t.length;s++)c=e[n],h=t[s],c.parent_ids.indexOf(h.object_id)>=0||(u=[h.selfSelectors[0]],r=l.findMatch(c,u),r.length&&(c.hasFoundMatches=!0,c.selfSelectors.forEach((function(e){const t=h.visibilityInfo();a=l.extendSelector(r,u,e,c.isVisible()),f=new ze.Extend(h.selector,h.option,0,h.fileInfo(),t),f.selfSelectors=a,a[a.length-1].extendList=[f],o.push(f),f.ruleset=h.ruleset,f.parent_ids=f.parent_ids.concat(h.parent_ids,c.parent_ids),h.firstExtendOnThisSelectorPath&&(f.firstExtendOnThisSelectorPath=!0,h.ruleset.paths.push(a))}))));if(o.length){if(this.extendChainCount++,i>100){let e="{unable to calculate}",t="{unable to calculate}";try{e=o[0].selfSelectors[0].toCSS(),t=o[0].selector.toCSS()}catch(e){}throw{message:`extend circular reference detected. One of the circular extends is currently:${e}:extend(${t})`}}return o.concat(l.doExtendChaining(o,t,i+1))}return o}visitDeclaration(e,t){t.visitDeeper=!1}visitMixinDefinition(e,t){t.visitDeeper=!1}visitSelector(e,t){t.visitDeeper=!1}visitRuleset(e,t){if(e.root)return;let i;const n=this.allExtendsStack[this.allExtendsStack.length-1],s=[],r=e.paths,o=r.length;for(let t=0;t<n.length;t++){const a=n[t];for(let t=0;t<o;t++){const n=r[t];if(e.extendOnEveryPath)continue;const o=n[n.length-1].extendList;if((!o||!o.length)&&(i=this.findMatch(a,n),i.length)){a.hasFoundMatches=!0;const e=a.selfSelectors,t=a.isVisible();for(let r=0;r<e.length;r++)s.push(this.extendSelector(i,n,e[r],t))}}}e.paths=r.concat(s)}findMatch(e,t){let i,n,s,r,o,a;const l=e.selector.elements,u=[];let c;const h=[];for(i=0;i<t.length;i++)for(n=t[i],s=0;s<n.elements.length;s++)for(r=n.elements[s],(e.allowBefore||0===i&&0===s)&&u.push({pathIndex:i,index:s,matched:0,initialCombinator:r.combinator}),a=0;a<u.length;a++)c=u[a],o=r.combinator.value,""===o&&0===s&&(o=" "),!this.isElementValuesEqual(l[c.matched].value,r.value)||c.matched>0&&l[c.matched].combinator.value!==o?c=null:c.matched++,c&&(c.finished=c.matched===l.length,c.finished&&!e.allowAfter&&(s+1<n.elements.length||i+1<t.length)&&(c=null)),c?c.finished&&(c.length=l.length,c.endPathIndex=i,c.endPathElementIndex=s+1,u.length=0,h.push(c)):(u.splice(a,1),a--);return h}isElementValuesEqual(e,t){if("string"==typeof e||"string"==typeof t)return e===t;if(e instanceof ze.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 ze.Selector){if(!(t instanceof ze.Selector)||e.elements.length!==t.elements.length)return!1;for(let i=0;i<e.elements.length;i++){if(e.elements[i].combinator.value!==t.elements[i].combinator.value&&(0!==i||(e.elements[i].combinator.value||" ")!==(t.elements[i].combinator.value||" ")))return!1;if(!this.isElementValuesEqual(e.elements[i].value,t.elements[i].value))return!1}return!0}return!1}extendSelector(e,t,i,n){let s,r,o,a,l,u=0,c=0,h=[];for(s=0;s<e.length;s++)a=e[s],r=t[a.pathIndex],o=new ze.Element(a.initialCombinator,i.elements[0].value,i.elements[0].isVariable,i.elements[0].getIndex(),i.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=r.elements.slice(c,a.index).concat([o]).concat(i.elements.slice(1)),u===a.pathIndex&&s>0?h[h.length-1].elements=h[h.length-1].elements.concat(l):(h=h.concat(t.slice(u,a.pathIndex)),h.push(new ze.Selector(l))),u=a.endPathIndex,c=a.endPathElementIndex,c>=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.concat(t.slice(u,t.length)),h=h.map((function(e){const t=e.createDerived(e.elements);return n?t.ensureVisibility():t.ensureInvisibility(),t})),h}visitMedia(e,t){let i=e.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);i=i.concat(this.doExtendChaining(i,e.allExtends)),this.allExtendsStack.push(i)}visitMediaOut(e){const t=this.allExtendsStack.length-1;this.allExtendsStack.length=t}visitAtRule(e,t){let i=e.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);i=i.concat(this.doExtendChaining(i,e.allExtends)),this.allExtendsStack.push(i)}visitAtRuleOut(e){const t=this.allExtendsStack.length-1;this.allExtendsStack.length=t}},JoinSelectorVisitor:class{constructor(){this.contexts=[[]],this._visitor=new D(this)}run(e){return this._visitor.visit(e)}visitDeclaration(e,t){t.visitDeeper=!1}visitMixinDefinition(e,t){t.visitDeeper=!1}visitRuleset(e,t){const i=this.contexts[this.contexts.length-1],n=[];let s;this.contexts.push(n),e.root||(s=e.selectors,s&&(s=s.filter((function(e){return e.getIsOutput()})),e.selectors=s.length?s:s=null,s&&e.joinSelectors(n,i,s)),s||(e.rules=null),e.paths=n)}visitRulesetOut(e){this.contexts.length=this.contexts.length-1}visitMedia(e,t){const i=this.contexts[this.contexts.length-1];e.rules[0].root=0===i.length||i[0].multiMedia}visitAtRule(e,t){const i=this.contexts[this.contexts.length-1];e.declarations&&e.declarations.length?e.declarations[0].root=0===i.length||i[0].multiMedia:e.rules&&e.rules.length&&(e.rules[0].root=e.isRooted||0===i.length||null)}},ToCSSVisitor:se};var oe=function e(t){return{_data:{},add:function(e,t){e=e.toLowerCase(),this._data.hasOwnProperty(e),this._data[e]=t},addMultiple:function(e){Object.keys(e).forEach(t=>{this.add(t,e[t])})},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);const ae={queryInParens:!0},le={queryInParens:!0};class ue{constructor(){this._counts={}}shouldWarn(e){if(!e)return!0;const t=(this._counts[e]||0)+1;return this._counts[e]=t,t<=5}summarize(e){for(const t of Object.keys(this._counts)){const i=this._counts[t]-5;i>0&&e.warn(`${i} repetitive "${t}" deprecation warning(s) omitted.`)}}}const ce=function e(t,i,n,r){let o;r=r||0;const a=(()=>{let e,t;const i=[];let n,s,r,o,a;const l={};function u(i){const n=l.i,s=t,c=l.i-a,h=l.i+o.length-c,f=l.i+=i,p=e;let d,m,g;for(;l.i<h;l.i++){if(d=p.charCodeAt(l.i),l.autoCommentAbsorb&&47===d){if(m=p.charAt(l.i+1),"/"===m){g={index:l.i,isLineComment:!0};let e=p.indexOf("\n",l.i+2);e<0&&(e=h),l.i=e,g.text=p.slice(g.index,l.i),l.commentStore.push(g);continue}if("*"===m){const e=p.indexOf("*/",l.i+2);if(e>=0){g={index:l.i,text:p.slice(l.i,e+2),isLineComment:!1},l.i+=g.text.length-1,l.commentStore.push(g);continue}}break}if(32!==d&&10!==d&&9!==d&&13!==d)break}if(o=o.slice(i+l.i-f+c),a=l.i,!o.length){if(t<r.length-1)return o=r[++t],u(0),!0;l.finished=!0}return n!==l.i||s!==t}return l.save=()=>{a=l.i,i.push({current:o,i:l.i,j:t})},l.restore=e=>{(l.i>n||l.i===n&&e&&!s)&&(n=l.i,s=e);const r=i.pop();o=r.current,a=l.i=r.i,t=r.j},l.forget=()=>{i.pop()},l.isWhitespace=t=>{const i=l.i+(t||0),n=e.charCodeAt(i);return 32===n||13===n||9===n||10===n},l.$re=e=>{l.i>a&&(o=o.slice(l.i-a),a=l.i);const t=e.exec(o);return t?(u(t[0].length),"string"==typeof t?t:1===t.length?t[0]:t):null},l.$char=t=>e.charAt(l.i)!==t?null:(u(1),t),l.$peekChar=t=>e.charAt(l.i)!==t?null:t,l.$str=t=>{const i=t.length;for(let n=0;n<i;n++)if(e.charAt(l.i+n)!==t.charAt(n))return null;return u(i),t},l.$quoted=t=>{const i=t||l.i,n=e.charAt(i);if("'"!==n&&'"'!==n)return;const s=e.length,r=i;for(let i=1;i+r<s;i++){switch(e.charAt(i+r)){case"\\":i++;continue;case"\r":case"\n":break;case n:{const s=e.slice(r,r+i+1);return t||0===t?[n,s]:(u(i+1),s)}}}return null},l.$parseUntil=t=>{let i="",n=null,s=!1,r=0;const o=[],a=[],c=e.length,h=l.i;let f,p=l.i,d=l.i,m=!0;f="string"==typeof t?e=>e===t:e=>t.test(e);do{let t=e.charAt(d);if(0===r&&f(t))n=e.slice(p,d),n?a.push(n):a.push(" "),n=a,u(d-h),m=!1;else{if(s){"*"===t&&"/"===e.charAt(d+1)&&(d++,r--,s=!1),d++;continue}switch(t){case"\\":d++,t=e.charAt(d),a.push(e.slice(p,d+1)),p=d+1;break;case"/":"*"===e.charAt(d+1)&&(d++,s=!0,r++);break;case"'":case'"':i=l.$quoted(d),i?(a.push(e.slice(p,d),i),d+=i[1].length-1,p=d+1):(u(d-h),n=t,m=!1);break;case"{":o.push("}"),r++;break;case"(":o.push(")"),r++;break;case"[":o.push("]"),r++;break;case"}":case")":case"]":{const e=o.pop();t===e?r--:(u(d-h),n=e,m=!1)}}d++,d>c&&(m=!1)}}while(m);return n||null},l.autoCommentAbsorb=!0,l.commentStore=[],l.finished=!1,l.peek=t=>{if("string"==typeof t){for(let i=0;i<t.length;i++)if(e.charAt(l.i+i)!==t.charAt(i))return!1;return!0}return t.test(o)},l.peekChar=t=>e.charAt(l.i)===t,l.currentChar=()=>e.charAt(l.i),l.prevChar=()=>e.charAt(l.i-1),l.getInput=()=>e,l.peekNotNumeric=()=>{const t=e.charCodeAt(l.i);return t>57||t<43||47===t||44===t},l.start=i=>{e=i,l.i=t=a=n=0,r=[i],o=r[0],u(0)},l.end=()=>{let t;const i=l.i>=e.length;return l.i<n&&(t=s,l.i=n),{isFinished:i,furthest:l.i,furthestPossibleErrorMessage:t,furthestReachedEnd:l.i>=e.length-1,furthestChar:e[l.i]}},l})();function l(e,t){throw new F({index:a.i,filename:n.filename,type:t||"Syntax",message:e},i)}const u=new ue;function c(e,r,o,l){t.quiet||l&&t.quietDeprecations||l&&!u.shouldWarn(l)||s.warn(new F({index:r??a.i,filename:n.filename,type:o?o.toUpperCase()+" WARNING":"WARNING",message:e},i).toString())}function h(e,t){const i=e instanceof Function?e.call(o):a.$re(e);if(i)return i;l(t||("string"==typeof e?`expected '${e}' got '${a.currentChar()}'`:"unexpected token"))}function f(e,t){if(a.$char(e))return e;l(t||`expected '${e}' got '${a.currentChar()}'`)}function p(e){const t=n.filename;return{lineNumber:C(e,a.getInput()).line+1,fileName:t}}return{parserInput:a,imports:i,fileInfo:n,parseNode:function(e,t,s){let l;const u=[],c=a;try{c.start(e);for(let e,i=0;e=t[i];i++)l=o[e](),u.push(l||null);c.end().isFinished?s(null,u):s(!0,null)}catch(e){throw new F({index:e.index+r,message:e.message},i,n.filename)}},parse:function(s,r,u){let c,h,f,p,d=null,m="";if(u&&u.disablePluginRule&&(o.plugin=function(){a.$re(/^@plugin?\s+/)&&l("@plugin statements are not allowed when disablePluginRule is set to true")}),h=u&&u.globalVars?e.serializeVars(u.globalVars)+"\n":"",f=u&&u.modifyVars?"\n"+e.serializeVars(u.modifyVars):"",t.pluginManager){const e=t.pluginManager.getPreProcessors();for(let r=0;r<e.length;r++)s=e[r].process(s,{context:t,imports:i,fileInfo:n})}(h||u&&u.banner)&&(m=(u&&u.banner?u.banner:"")+h,p=i.contentsIgnoredChars,p[n.filename]=p[n.filename]||0,p[n.filename]+=m.length),s=m+(s=s.replace(/\r\n?/g,"\n")).replace(/^\uFEFF/,"")+f,i.contents[n.filename]=s;try{a.start(s),ze.Node.prototype.parse=this,c=new ze.Ruleset(null,this.parsers.primary()),ze.Node.prototype.rootNode=c,c.root=!0,c.firstRoot=!0,c.functionRegistry=oe.inherit()}catch(e){return r(new F(e,i,n.filename))}const g=a.end();if(!g.isFinished){let e=g.furthestPossibleErrorMessage;e||(e="Unrecognised input","}"===g.furthestChar?e+=". Possibly missing opening '{'":")"===g.furthestChar?e+=". Possibly missing opening '('":g.furthestReachedEnd&&(e+=". Possibly missing something")),d=new F({type:"Parse",message:e,index:g.furthest,filename:n.filename},i)}const v=e=>(e=d||e||i.error)?(e instanceof F||(e=new F(e,i,n.filename)),r(e)):r(null,c);if(!1===t.processImports)return v();new re.ImportVisitor(i,v).run(c)},parsers:o={primary:function(){const e=this.mixin;let t,i=[];for(;;){for(;t=this.comment(),t;)i.push(t);if(a.finished)break;if(a.peek("}"))break;if(t=this.extendRule(),t)i=i.concat(t);else if(t=e.definition()||this.declaration()||e.call(!1,!1)||this.ruleset()||this.variableCall()||this.entities.call()||this.atrule(),t)i.push(t);else{let e=!1;for(;a.$char(";");)e=!0;if(!e)break}}return i},comment:function(){if(a.commentStore.length){const e=a.commentStore.shift();return new ze.Comment(e.text,e.isLineComment,e.index+r,n)}},entities:{mixinLookup:function(){return o.mixin.call(!0,!0)},quoted:function(e){let t;const i=a.i;let s=!1;if(a.save(),a.$char("~"))s=!0;else if(e)return void a.restore();if(t=a.$quoted(),t)return a.forget(),new ze.Quoted(t.charAt(0),t.slice(1,-1),s,i+r,n);a.restore()},keyword:function(){const e=a.$char("%")||a.$re(/^\[?(?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+\]?/);if(e)return ze.Color.fromKeyword(e)||new ze.Keyword(e)},call:function(){let e,t,i;const s=a.i;if(!a.peek(/^url\(/i))if(a.save(),e=a.$re(/^([\w-]+|%|~|progid:[\w.]+)\(/),e){if(e=e[1],i=this.customFuncCall(e),i&&(t=i.parse(),t&&i.stop))return a.forget(),t;if(t=this.arguments(t),a.$char(")"))return a.forget(),new ze.Call(e,t,s+r,n);a.restore("Could not parse call arguments or missing ')'")}else a.forget()},declarationCall:function(){let e,t;const i=a.i;if(a.save(),e=a.$re(/^[\w]+\(/),!e)return void a.forget();if(e=e.substring(0,e.length-1),/^(and|or|not|only|layer)$/i.test(e))return void a.restore();let s,o=this.ruleProperty();if(o&&(s=this.value()),o&&s&&(t=[new ze.Declaration(o,s,null,null,a.i+r,n,!0)]),a.$char(")"))return a.forget(),new ze.Call(e,t,i+r,n);a.restore("Could not parse call arguments or missing ')'")},customFuncCall:function(e){return{alpha:t(o.ieAlpha,!0),boolean:t(i),if:t(i)}[e.toLowerCase()];function t(e,t){return{parse:e,stop:t}}function i(){return[h(o.condition,"expected condition")]}},arguments:function(e){let t=e||[];const i=[];let n,s;for(a.save();;){if(e)e=!1;else{if(s=o.detachedRuleset()||this.assignment()||o.expression(),!s)break;s.value&&1==s.value.length&&(s=s.value[0]),t.push(s)}a.$char(",")||(a.$char(";")||n)&&(n=!0,s=t.length<1?t[0]:new ze.Value(t),i.push(s),t=[])}return a.forget(),n?i:t},literal:function(){return this.dimension()||this.color()||this.quoted()||this.unicodeDescriptor()},assignment:function(){let e,t;if(a.save(),e=a.$re(/^\w+(?=\s?=)/i),e)if(a.$char("=")){if(t=o.entity(),t)return a.forget(),new ze.Assignment(e,t);a.restore()}else a.restore();else a.restore()},url:funct