@codesandbox/sandpack-client
Version:
<img style="width:100%" src="https://user-images.githubusercontent.com/4838076/143581035-ebee5ba2-9cb1-4fe8-a05b-2f44bd69bb4b.gif" alt="Component toolkit for live running code editing experiences" />
1,360 lines • 353 kB
JavaScript
!(function(a) {
function b(a) {
Object.defineProperty(this, a, {
enumerable: !0,
get: function() {
return this[o][a];
},
});
}
function c(a) {
var b;
if (a && a.__esModule) {
b = {};
for (var c in a) Object.hasOwnProperty.call(a, c) && (b[c] = a[c]);
b.__useDefault && delete b.__useDefault, (b.__esModule = !0);
} else {
if (
'[object Module]' === Object.prototype.toString.call(a) ||
('undefined' != typeof System && System.isModule && System.isModule(a))
)
return a;
b = { default: a, __useDefault: !0 };
}
return new d(b);
}
function d(a) {
Object.defineProperty(this, o, { value: a }), Object.keys(a).forEach(
b,
this,
);
}
function e(a) {
return '@node/' === a.substr(0, 6) ? m(a, c(p(a.substr(6))), {}) : n[a];
}
function f(a) {
var b = e(a);
if (!b)
throw new Error(
'Module "' + a + '" expected, but not contained in build.',
);
if (b.module) return b.module;
var c = b.linkRecord;
return g(b, c), l(b, c, []), b.module;
}
function g(a, b) {
if (!b.depLoads) {
b.declare && h(a, b), (b.depLoads = []);
for (var c = 0; c < b.deps.length; c++) {
var d = e(b.deps[c]);
b.depLoads.push(d), d.linkRecord && g(d, d.linkRecord);
var f = b.setters && b.setters[c];
f && (f(d.module || d.linkRecord.moduleObj), d.importerSetters.push(f));
}
return a;
}
}
function h(b, c) {
var d = c.moduleObj,
e = b.importerSetters,
f = !1,
g = c.declare.call(
a,
function(a, b) {
if (!f) {
if ('object' == typeof a)
for (var c in a) '__useDefault' !== c && (d[c] = a[c]);
else d[a] = b;
f = !0;
for (var g = 0; g < e.length; g++) e[g](d);
return (f = !1), b;
}
},
{ id: b.key },
);
'function' != typeof g
? ((c.setters = g.setters), (c.execute = g.execute))
: ((c.setters = []), (c.execute = g));
}
function i(a, b, c) {
return (n[a] = {
key: a,
module: void 0,
importerSetters: [],
linkRecord: {
deps: b,
depLoads: void 0,
declare: c,
setters: void 0,
execute: void 0,
moduleObj: {},
},
});
}
function j(a, b, c, d) {
return (n[a] = {
key: a,
module: void 0,
importerSetters: [],
linkRecord: {
deps: b,
depLoads: void 0,
declare: void 0,
execute: d,
executingRequire: c,
moduleObj: { default: {}, __useDefault: !0 },
setters: void 0,
},
});
}
function k(a, b, c) {
return function(d) {
for (var e = 0; e < a.length; e++)
if (a[e] === d) {
var f,
g = b[e],
h = g.linkRecord;
return (f = h
? -1 === c.indexOf(g) ? l(g, h, c) : h.moduleObj
: g.module), f.__useDefault ? f.default : f;
}
};
}
function l(b, c, e) {
if ((e.push(b), b.module)) return b.module;
if (c.setters) {
for (var f = 0; f < c.deps.length; f++) {
var g = c.depLoads[f],
h = g.linkRecord;
h && -1 === e.indexOf(g) && l(g, h, h.setters ? e : []);
}
c.execute.call(q);
} else {
var i = { id: b.key },
j = c.moduleObj;
Object.defineProperty(i, 'exports', {
configurable: !0,
set: function(a) {
j.default = a;
},
get: function() {
return j.default;
},
});
var m = k(c.deps, c.depLoads, e);
if (!c.executingRequire)
for (var f = 0; f < c.deps.length; f++) m(c.deps[f]);
var n = c.execute.call(a, m, j.default, i);
if (
(
void 0 !== n
? (j.default = n)
: i.exports !== j.default && (j.default = i.exports),
j.default && j.default.__esModule
)
)
for (var o in j.default)
Object.hasOwnProperty.call(j.default, o) &&
'default' !== o &&
(j[o] = j.default[o]);
}
var i = (b.module = new d(c.moduleObj));
if (!c.setters)
for (var f = 0; f < b.importerSetters.length; f++)
b.importerSetters[f](i);
return i;
}
function m(a, b) {
return (n[a] = {
key: a,
module: b,
importerSetters: [],
linkRecord: void 0,
});
}
var n = {},
o = 'undefined' != typeof Symbol ? Symbol() : '@@baseObject';
(d.prototype = Object.create(null)), 'undefined' != typeof Symbol &&
Symbol.toStringTag &&
(d.prototype[Symbol.toStringTag] = 'Module');
var p =
('undefined' != typeof System && System._nodeRequire) ||
('undefined' != typeof require &&
void 0 !== require.resolve &&
'undefined' != typeof process &&
process.platform &&
require),
q = {};
return Object.freeze && Object.freeze(q), function(a, b, e, g) {
return function(h) {
h(function(h) {
var k = {
_nodeRequire: p,
register: i,
registerDynamic: j,
registry: {
get: function(a) {
return n[a].module;
},
set: m,
},
newModule: function(a) {
return new d(a);
},
};
m('@empty', new d({}));
for (var l = 0; l < b.length; l++) m(b[l], c(arguments[l], {}));
g(k);
var o = f(a[0]);
if (a.length > 1) for (var l = 1; l < a.length; l++) f(a[l]);
return e
? o.default
: (
o instanceof d &&
Object.defineProperty(o, '__esModule', { value: !0 }),
o
);
});
};
};
})('undefined' != typeof self ? self : global)(['a'], [], !0, function(a) {
this.require, this.exports, this.module;
a.registerDynamic('@system-env', [], !0, function() {
return { default: !0 };
}), a.registerDynamic('b', ['@system-env'], !0, function(a, b, c) {
function d() {
(l = !1), h.length ? (k = h.concat(k)) : (m = -1), k.length && e();
}
function e() {
if (!l) {
var a = setTimeout(d);
l = !0;
for (var b = k.length; b; ) {
for (h = k, k = []; ++m < b; ) h && h[m].run();
(m = -1), (b = k.length);
}
(h = null), (l = !1), clearTimeout(a);
}
}
function f(a, b) {
(this.fun = a), (this.array = b);
}
function g() {}
var h,
i = (this || self, a('@system-env').production),
j = (c.exports = {}),
k = [],
l = !1,
m = -1;
(j.nextTick = function(a) {
var b = new Array(arguments.length - 1);
if (arguments.length > 1)
for (var c = 1; c < arguments.length; c++) b[c - 1] = arguments[c];
k.push(new f(a, b)), 1 !== k.length || l || setTimeout(e, 0);
}), (f.prototype.run = function() {
this.fun.apply(null, this.array);
}), (j.title = 'browser'), (j.browser = !0), (j.env = { NODE_ENV: i ? 'production' : 'development' }), (j.argv = []), (j.version = ''), (j.versions = {}), (j.on = g), (j.addListener = g), (j.once = g), (j.off = g), (j.removeListener = g), (j.removeAllListeners = g), (j.emit = g), (j.binding = function(
a,
) {
throw new Error('process.binding is not supported');
}), (j.cwd = function() {
return '/';
}), (j.chdir = function(a) {
throw new Error('process.chdir is not supported');
}), (j.umask = function() {
return 0;
});
}), a.registerDynamic('a', ['b'], !0, function(a, b, c) {
var d = (a('b'), this || self);
!(function(a) {
if ('object' == typeof b && void 0 !== c) c.exports = a();
else {
var e;
(e =
'undefined' != typeof window
? window
: void 0 !== d
? d
: 'undefined' != typeof self ? self : this), (e.less = a());
}
})(function() {
return (function b(c, d, e) {
function f(h, i) {
if (!d[h]) {
if (!c[h]) {
var j = 'function' == typeof a && a;
if (!i && j) return j(h, !0);
if (g) return g(h, !0);
var k = new Error("Cannot find module '" + h + "'");
throw ((k.code = 'MODULE_NOT_FOUND'), k);
}
var l = (d[h] = { exports: {} });
c[h][0].call(
l.exports,
function(a) {
var b = c[h][1][a];
return f(b || a);
},
l,
l.exports,
b,
c,
d,
e,
);
}
return d[h].exports;
}
for (var g = 'function' == typeof a && a, h = 0; h < e.length; h++)
f(e[h]);
return f;
})(
{
1: [
function(a, b, c) {
var d = a('./utils').addDataAttr,
e = a('./browser');
b.exports = function(a, b) {
d(b, e.currentScript(a)), void 0 === b.isFileProtocol &&
(b.isFileProtocol = /^(file|(chrome|safari)(-extension)?|resource|qrc|app):/.test(
a.location.protocol,
)), (b.async = b.async || !1), (b.fileAsync =
b.fileAsync || !1), (b.poll =
b.poll || (b.isFileProtocol ? 1e3 : 1500)), (b.env =
b.env ||
('127.0.0.1' == a.location.hostname ||
'0.0.0.0' == a.location.hostname ||
'localhost' == a.location.hostname ||
(a.location.port && a.location.port.length > 0) ||
b.isFileProtocol
? 'development'
: 'production'));
var c = /!dumpLineNumbers:(comments|mediaquery|all)/.exec(
a.location.hash,
);
c && (b.dumpLineNumbers = c[1]), void 0 === b.useFileCache &&
(b.useFileCache = !0), void 0 === b.onReady &&
(b.onReady = !0);
};
},
{ './browser': 3, './utils': 10 },
],
2: [
function(a, b, c) {
function d(a) {
a.filename && console.warn(a), e.async || h.removeChild(i);
}
a('promise/polyfill.js');
var e = window.less || {};
a('./add-default-options')(window, e);
var f = (b.exports = a('./index')(window, e));
window.less = f;
var g, h, i;
e.onReady &&
(
/!watch/.test(window.location.hash) && f.watch(),
e.async ||
(
(g = 'body { display: none !important }'),
(h =
document.head ||
document.getElementsByTagName('head')[0]),
(i = document.createElement('style')),
(i.type = 'text/css'),
i.styleSheet
? (i.styleSheet.cssText = g)
: i.appendChild(document.createTextNode(g)),
h.appendChild(i)
),
f.registerStylesheetsImmediately(),
(f.pageLoadFinished = f
.refresh('development' === f.env)
.then(d, d))
);
},
{
'./add-default-options': 1,
'./index': 8,
'promise/polyfill.js': 97,
},
],
3: [
function(a, b, c) {
var d = a('./utils');
b.exports = {
createCSS: function(a, b, c) {
var e = c.href || '',
f = 'less:' + (c.title || d.extractId(e)),
g = a.getElementById(f),
h = !1,
i = a.createElement('style');
i.setAttribute('type', 'text/css'), c.media &&
i.setAttribute(
'media',
c.media,
), (i.id = f), i.styleSheet ||
(
i.appendChild(a.createTextNode(b)),
(h =
null !== g &&
g.childNodes.length > 0 &&
i.childNodes.length > 0 &&
g.firstChild.nodeValue === i.firstChild.nodeValue)
);
var j = a.getElementsByTagName('head')[0];
if (null === g || !1 === h) {
var k = (c && c.nextSibling) || null;
k ? k.parentNode.insertBefore(i, k) : j.appendChild(i);
}
if (
(g && !1 === h && g.parentNode.removeChild(g), i.styleSheet)
)
try {
i.styleSheet.cssText = b;
} catch (a) {
throw new Error("Couldn't reassign styleSheet.cssText.");
}
},
currentScript: function(a) {
var b = a.document;
return (
b.currentScript ||
(function() {
var a = b.getElementsByTagName('script');
return a[a.length - 1];
})()
);
},
};
},
{ './utils': 10 },
],
4: [
function(a, b, c) {
b.exports = function(a, b, c) {
var d = null;
if ('development' !== b.env)
try {
d = void 0 === a.localStorage ? null : a.localStorage;
} catch (a) {}
return {
setCSS: function(a, b, e, f) {
if (d) {
c.info('saving ' + a + ' to cache.');
try {
d.setItem(a, f), d.setItem(a + ':timestamp', b), e &&
d.setItem(a + ':vars', JSON.stringify(e));
} catch (b) {
c.error(
'failed to save "' +
a +
'" to local storage for caching.',
);
}
}
},
getCSS: function(a, b, c) {
var e = d && d.getItem(a),
f = d && d.getItem(a + ':timestamp'),
g = d && d.getItem(a + ':vars');
if (
(
(c = c || {}),
f &&
b.lastModified &&
new Date(b.lastModified).valueOf() ===
new Date(f).valueOf() &&
((!c && !g) || JSON.stringify(c) === g)
)
)
return e;
},
};
};
},
{},
],
5: [
function(a, b, c) {
var d = a('./utils'),
e = a('./browser');
b.exports = function(a, b, c) {
function f(b, f) {
var g,
h,
i = 'less-error-message:' + d.extractId(f || ''),
j =
'<li><label>{line}</label><pre class="{class}">{content}</pre></li>',
k = a.document.createElement('div'),
l = [],
m = b.filename || f,
n = m.match(/([^\/]+(\?.*)?)$/)[1];
(k.id = i), (k.className = 'less-error-message'), (h =
'<h3>' +
(b.type || 'Syntax') +
'Error: ' +
(b.message || 'There is an error in your .less file') +
'</h3><p>in <a href="' +
m +
'">' +
n +
'</a> ');
var o = function(a, b, c) {
void 0 !== a.extract[b] &&
l.push(
j
.replace(
/\{line\}/,
(parseInt(a.line, 10) || 0) + (b - 1),
)
.replace(/\{class\}/, c)
.replace(/\{content\}/, a.extract[b]),
);
};
b.extract &&
(
o(b, 0, ''),
o(b, 1, 'line'),
o(b, 2, ''),
(h +=
'on line ' +
b.line +
', column ' +
(b.column + 1) +
':</p><ul>' +
l.join('') +
'</ul>')
), b.stack &&
(b.extract || c.logLevel >= 4) &&
(h +=
'<br/>Stack Trace</br />' +
b.stack
.split('\n')
.slice(1)
.join(
'<br/>',
)), (k.innerHTML = h), e.createCSS(
a.document,
[
'.less-error-message ul, .less-error-message li {',
'list-style-type: none;',
'margin-right: 15px;',
'padding: 4px 0;',
'margin: 0;',
'}',
'.less-error-message label {',
'font-size: 12px;',
'margin-right: 15px;',
'padding: 4px 0;',
'color: #cc7777;',
'}',
'.less-error-message pre {',
'color: #dd6666;',
'padding: 4px 0;',
'margin: 0;',
'display: inline-block;',
'}',
'.less-error-message pre.line {',
'color: #ff0000;',
'}',
'.less-error-message h3 {',
'font-size: 20px;',
'font-weight: bold;',
'padding: 15px 0 5px 0;',
'margin: 0;',
'}',
'.less-error-message a {',
'color: #10a',
'}',
'.less-error-message .error {',
'color: red;',
'font-weight: bold;',
'padding-bottom: 2px;',
'border-bottom: 1px dashed red;',
'}',
].join('\n'),
{ title: 'error-message' },
), (k.style.cssText = [
'font-family: Arial, sans-serif',
'border: 1px solid #e00',
'background-color: #eee',
'border-radius: 5px',
'-webkit-border-radius: 5px',
'-moz-border-radius: 5px',
'color: #e00',
'padding: 15px',
'margin-bottom: 15px',
].join(';')), 'development' === c.env &&
(g = setInterval(function() {
var b = a.document,
c = b.body;
c &&
(
b.getElementById(i)
? c.replaceChild(k, b.getElementById(i))
: c.insertBefore(k, c.firstChild),
clearInterval(g)
);
}, 10));
}
function g(b) {
var c = a.document.getElementById(
'less-error-message:' + d.extractId(b),
);
c && c.parentNode.removeChild(c);
}
function h(a) {}
function i(a) {
c.errorReporting && 'html' !== c.errorReporting
? 'console' === c.errorReporting
? h(a)
: 'function' == typeof c.errorReporting &&
c.errorReporting('remove', a)
: g(a);
}
function j(a, d) {
var e = '{line} {content}',
f = a.filename || d,
g = [],
h =
(a.type || 'Syntax') +
'Error: ' +
(a.message || 'There is an error in your .less file') +
' in ' +
f +
' ',
i = function(a, b, c) {
void 0 !== a.extract[b] &&
g.push(
e
.replace(
/\{line\}/,
(parseInt(a.line, 10) || 0) + (b - 1),
)
.replace(/\{class\}/, c)
.replace(/\{content\}/, a.extract[b]),
);
};
a.extract &&
(
i(a, 0, ''),
i(a, 1, 'line'),
i(a, 2, ''),
(h +=
'on line ' +
a.line +
', column ' +
(a.column + 1) +
':\n' +
g.join('\n'))
), a.stack &&
(a.extract || c.logLevel >= 4) &&
(h += '\nStack Trace\n' + a.stack), b.logger.error(h);
}
function k(a, b) {
c.errorReporting && 'html' !== c.errorReporting
? 'console' === c.errorReporting
? j(a, b)
: 'function' == typeof c.errorReporting &&
c.errorReporting('add', a, b)
: f(a, b);
}
return { add: k, remove: i };
};
},
{ './browser': 3, './utils': 10 },
],
6: [
function(a, b, c) {
b.exports = function(b, c) {
function d() {
if (
window.XMLHttpRequest &&
!(
'file:' === window.location.protocol &&
'ActiveXObject' in window
)
)
return new XMLHttpRequest();
try {
return new ActiveXObject('Microsoft.XMLHTTP');
} catch (a) {
return c.error("browser doesn't support AJAX."), null;
}
}
var e = a('../less/environment/abstract-file-manager.js'),
f = {},
g = function() {};
return (g.prototype = new e()), (g.prototype.alwaysMakePathsAbsolute = function() {
return !0;
}), (g.prototype.join = function(a, b) {
return a ? this.extractUrlParts(b, a).path : b;
}), (g.prototype.doXHR = function(a, e, f, g) {
function h(b, c, d) {
b.status >= 200 && b.status < 300
? c(b.responseText, b.getResponseHeader('Last-Modified'))
: 'function' == typeof d && d(b.status, a);
}
var i = d(),
j = !b.isFileProtocol || b.fileAsync;
'function' == typeof i.overrideMimeType &&
i.overrideMimeType('text/css'), c.debug(
"XHR: Getting '" + a + "'",
), i.open('GET', a, j), i.setRequestHeader(
'Accept',
e || 'text/x-less, text/css; q=0.9, */*; q=0.5',
), i.send(null), b.isFileProtocol && !b.fileAsync
? 0 === i.status || (i.status >= 200 && i.status < 300)
? f(i.responseText)
: g(i.status, a)
: j
? (i.onreadystatechange = function() {
4 == i.readyState && h(i, f, g);
})
: h(i, f, g);
}), (g.prototype.supports = function(a, b, c, d) {
return !0;
}), (g.prototype.clearFileCache = function() {
f = {};
}), (g.prototype.loadFile = function(a, b, c, d, e) {
b && !this.isPathAbsolute(a) && (a = b + a), (c = c || {});
var g = this.extractUrlParts(a, window.location.href),
h = g.url;
if (c.useFileCache && f[h])
try {
var i = f[h];
e(null, {
contents: i,
filename: h,
webInfo: { lastModified: new Date() },
});
} catch (a) {
e({
filename: h,
message:
'Error loading file ' + h + ' error was ' + a.message,
});
}
else
this.doXHR(
h,
c.mime,
function(a, b) {
(f[h] = a), e(null, {
contents: a,
filename: h,
webInfo: { lastModified: b },
});
},
function(a, b) {
e({
type: 'File',
message: "'" + b + "' wasn't found (" + a + ')',
href: h,
});
},
);
}), g;
};
},
{ '../less/environment/abstract-file-manager.js': 15 },
],
7: [
function(a, b, c) {
b.exports = function() {
function b() {
throw {
type: 'Runtime',
message:
'Image size functions are not supported in browser version of less',
};
}
var c = a('./../less/functions/function-registry'),
d = {
'image-size': function(a) {
return b(this, a), -1;
},
'image-width': function(a) {
return b(this, a), -1;
},
'image-height': function(a) {
return b(this, a), -1;
},
};
c.addMultiple(d);
};
},
{ './../less/functions/function-registry': 22 },
],
8: [
function(a, b, c) {
var d = a('./utils').addDataAttr,
e = a('./browser');
b.exports = function(b, c) {
function f(a) {
return c.postProcessor &&
'function' == typeof c.postProcessor &&
(a = c.postProcessor.call(a, a) || a), a;
}
function g(a) {
var b = {};
for (var c in a) a.hasOwnProperty(c) && (b[c] = a[c]);
return b;
}
function h(a, b) {
var c = Array.prototype.slice.call(arguments, 2);
return function() {
var d = c.concat(Array.prototype.slice.call(arguments, 0));
return a.apply(b, d);
};
}
function i(a) {
for (
var b, d = m.getElementsByTagName('style'), e = 0;
e < d.length;
e++
)
if (((b = d[e]), b.type.match(t))) {
var f = g(c);
f.modifyVars = a;
var i = b.innerHTML || '';
(f.filename = m.location.href.replace(
/#.*$/,
'',
)), n.render(
i,
f,
h(
function(a, b, c) {
b
? r.add(b, 'inline')
: (
(a.type = 'text/css'),
a.styleSheet
? (a.styleSheet.cssText = c.css)
: (a.innerHTML = c.css)
);
},
null,
b,
),
);
}
}
function j(a, b, e, h, i) {
function j(c) {
var d = c.contents,
g = c.filename,
i = c.webInfo,
j = {
currentDirectory: q.getPath(g),
filename: g,
rootFilename: g,
relativeUrls: k.relativeUrls,
};
if (
(
(j.entryPath = j.currentDirectory),
(j.rootpath = k.rootpath || j.currentDirectory),
i
)
) {
i.remaining = h;
var l = s.getCSS(g, i, k.modifyVars);
if (!e && l)
return (i.local = !0), void b(null, l, d, a, i, g);
}
r.remove(g), (k.rootFileInfo = j), n.render(d, k, function(
c,
e,
) {
c
? ((c.href = g), b(c))
: (
(e.css = f(e.css)),
s.setCSS(
a.href,
i.lastModified,
k.modifyVars,
e.css,
),
b(null, e.css, d, a, i, g)
);
});
}
var k = g(c);
d(k, a), (k.mime = a.type), i &&
(k.modifyVars = i), q.loadFile(a.href, null, k, o, function(
a,
c,
) {
if (a) return void b(a);
j(c);
});
}
function k(a, b, c) {
for (var d = 0; d < n.sheets.length; d++)
j(n.sheets[d], a, b, n.sheets.length - (d + 1), c);
}
function l() {
'development' === n.env &&
(n.watchTimer = setInterval(function() {
n.watchMode &&
(
q.clearFileCache(),
k(function(a, c, d, f, g) {
a
? r.add(a, a.href || f.href)
: c && e.createCSS(b.document, c, f);
})
);
}, c.poll));
}
var m = b.document,
n = a('../less')();
n.options = c;
var o = n.environment,
p = a('./file-manager')(c, n.logger),
q = new p();
o.addFileManager(q), (n.FileManager = p), a('./log-listener')(
n,
c,
);
var r = a('./error-reporting')(b, n, c),
s = (n.cache = c.cache || a('./cache')(b, c, n.logger));
a('./image-size')(n.environment), c.functions &&
n.functions.functionRegistry.addMultiple(c.functions);
var t = /^text\/(x-)?less$/;
return (n.watch = function() {
return n.watchMode ||
((n.env = 'development'), l()), (this.watchMode = !0), !0;
}), (n.unwatch = function() {
return clearInterval(n.watchTimer), (this.watchMode = !1), !1;
}), (n.registerStylesheetsImmediately = function() {
var a = m.getElementsByTagName('link');
n.sheets = [];
for (var b = 0; b < a.length; b++)
('stylesheet/less' === a[b].rel ||
(a[b].rel.match(/stylesheet/) && a[b].type.match(t))) &&
n.sheets.push(a[b]);
}), (n.registerStylesheets = function() {
return new Promise(function(a, b) {
n.registerStylesheetsImmediately(), a();
});
}), (n.modifyVars = function(a) {
return n.refresh(!0, a, !1);
}), (n.refresh = function(a, c, d) {
return (a || d) &&
!1 !== d &&
q.clearFileCache(), new Promise(function(d, f) {
var g, h, j, l;
(g = h = new Date()), (l = n.sheets.length), 0 === l
? (
(h = new Date()),
(j = h - g),
n.logger.info(
'Less has finished and no sheets were loaded.',
),
d({
startTime: g,
endTime: h,
totalMilliseconds: j,
sheets: n.sheets.length,
})
)
: k(
function(a, c, i, k, m) {
if (a) return r.add(a, a.href || k.href), void f(a);
m.local
? n.logger.info(
'Loading ' + k.href + ' from cache.',
)
: n.logger.info(
'Rendered ' + k.href + ' successfully.',
), e.createCSS(b.document, c, k), n.logger.info(
'CSS for ' +
k.href +
' generated in ' +
(new Date() - h) +
'ms',
), l--, 0 === l &&
(
(j = new Date() - g),
n.logger.info(
'Less has finished. CSS generated in ' +
j +
'ms',
),
d({
startTime: g,
endTime: h,
totalMilliseconds: j,
sheets: n.sheets.length,
})
), (h = new Date());
},
a,
c,
), i(c);
});
}), (n.refreshStyles = i), n;
};
},
{
'../less': 31,
'./browser': 3,
'./cache': 4,
'./error-reporting': 5,
'./file-manager': 6,
'./image-size': 7,
'./log-listener': 9,
'./utils': 10,
},
],
9: [
function(a, b, c) {
b.exports = function(a, b) {
var c = 3,
d = 1;
(b.logLevel =
void 0 !== b.logLevel
? b.logLevel
: 'development' === b.env ? c : d), b.loggers ||
(b.loggers = [
{
debug: function(a) {
b.logLevel >= 4 && console.log(a);
},
info: function(a) {
b.logLevel >= c && console.log(a);
},
warn: function(a) {
b.logLevel >= 2 && console.warn(a);
},
error: function(a) {
b.logLevel >= d && console.error(a);
},
},
]);
for (var e = 0; e < b.loggers.length; e++)
a.logger.addListener(b.loggers[e]);
};
},
{},
],
10: [
function(a, b, c) {
b.exports = {
extractId: function(a) {
return a
.replace(/^[a-z-]+:\/+?[^\/]+/, '')
.replace(/[\?\&]livereload=\w+/, '')
.replace(/^\//, '')
.replace(/\.[a-zA-Z]+$/, '')
.replace(/[^\.\w-]+/g, '-')
.replace(/\./g, ':');
},
addDataAttr: function(a, b) {
for (var c in b.dataset)
if (b.dataset.hasOwnProperty(c))
if (
'env' === c ||
'dumpLineNumbers' === c ||
'rootpath' === c ||
'errorReporting' === c
)
a[c] = b.dataset[c];
else
try {
a[c] = JSON.parse(b.dataset[c]);
} catch (a) {}
},
};
},
{},
],
11: [
function(a, b, c) {
var d = {};
b.exports = d;
var e = function(a, b, c) {
if (a)
for (var d = 0; d < c.length; d++)
a.hasOwnProperty(c[d]) && (b[c[d]] = a[c[d]]);
},
f = [
'paths',
'relativeUrls',
'rootpath',
'strictImports',
'insecure',
'dumpLineNumbers',
'compress',
'syncImport',
'chunkInput',
'mime',
'useFileCache',
'processImports',
'pluginManager',
];
d.Parse = function(a) {
e(a, this, f), 'string' == typeof this.paths &&
(this.paths = [this.paths]);
};
var g = [
'paths',
'compress',
'ieCompat',
'strictMath',
'strictUnits',
'sourceMap',
'importMultiple',
'urlArgs',
'javascriptEnabled',
'pluginManager',
'importantScope',
];
(d.Eval = function(a, b) {
e(a, this, g), 'string' == typeof this.paths &&
(this.paths = [this.paths]), (this.frames =
b || []), (this.importantScope = this.importantScope || []);
}), (d.Eval.prototype.inParenthesis = function() {
this.parensStack ||
(this.parensStack = []), this.parensStack.push(!0);
}), (d.Eval.prototype.outOfParenthesis = function() {
this.parensStack.pop();
}), (d.Eval.prototype.isMathOn = function() {
return (
!this.strictMath ||
(this.parensStack && this.parensStack.length)
);
}), (d.Eval.prototype.isPathRelative = function(a) {
return !/^(?:[a-z-]+:|\/|#)/i.test(a);
}), (d.Eval.prototype.normalizePath = function(a) {
var b,
c = a.split('/').reverse();
for (a = []; 0 !== c.length; )
switch ((b = c.pop())) {
case '.':
break;
case '..':
0 === a.length || '..' === a[a.length - 1]
? a.push(b)
: a.pop();
break;
default:
a.push(b);
}
return a.join('/');
});
},
{},
],
12: [
function(a, b, c) {
b.exports = {
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',
};
},
{},
],
13: [
function(a, b, c) {
b.exports = {
colors: a('./colors'),
unitConversions: a('./unit-conversions'),
};
},
{ './colors': 12, './unit-conversions': 14 },
],
14: [
function(a, b, c) {
b.exports = {
length: {
m: 1,
cm: 0.01,
mm: 0.001,
in: 0.0254,
px: 0.0254 / 96,
pt: 0.0254 / 72,
pc: 0.0254 / 72 * 12,
},
duration: { s: 1, ms: 0.001 },
angle: {
rad: 1 / (2 * Math.PI),
deg: 1 / 360,
grad: 0.0025,
turn: 1,
},
};
},
{},
],
15: [
function(a, b, c) {
var d = function() {};
(d.prototype.getPath = function(a) {
var b = a.lastIndexOf('?');
return b > 0 && (a = a.slice(0, b)), (b = a.lastIndexOf(
'/',
)), b < 0 && (b = a.lastIndexOf('\\')), b < 0
? ''
: a.slice(0, b + 1);
}), (d.prototype.tryAppendExtension = function(a, b) {
return /(\.[a-z]*$)|([\?;].*)$/.test(a) ? a : a + b;
}), (d.prototype.tryAppendLessExtension = function(a) {
return this.tryAppendExtension(a, '.less');
}), (d.prototype.supportsSync = function() {
return !1;
}), (d.prototype.alwaysMakePathsAbsolute = function() {
return !1;
}), (d.prototype.isPathAbsolute = function(a) {
return /^(?:[a-z-]+:|\/|\\|#)/i.test(a);
}), (d.prototype.jo