Deployed the page to Github Pages.
This commit is contained in:
		
							parent
							
								
									1d79754e93
								
							
						
					
					
						commit
						2c89899458
					
				
					 62797 changed files with 6551425 additions and 15279 deletions
				
			
		
							
								
								
									
										6
									
								
								node_modules/less/.eslintignore
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								node_modules/less/.eslintignore
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,6 @@
 | 
			
		|||
Gruntfile.js
 | 
			
		||||
dist/*
 | 
			
		||||
tmp/*
 | 
			
		||||
lib/*
 | 
			
		||||
test/browser/less.min.js
 | 
			
		||||
node_modules
 | 
			
		||||
							
								
								
									
										416
									
								
								node_modules/less/Gruntfile.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										416
									
								
								node_modules/less/Gruntfile.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,416 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
 | 
			
		||||
var resolve = require('resolve');
 | 
			
		||||
var path = require('path');
 | 
			
		||||
 | 
			
		||||
var testFolder = path.relative(process.cwd(), path.dirname(resolve.sync('@less/test-data')));
 | 
			
		||||
var lessFolder = path.join(testFolder, 'less');
 | 
			
		||||
 | 
			
		||||
module.exports = function(grunt) {
 | 
			
		||||
    grunt.option("stack", true);
 | 
			
		||||
 | 
			
		||||
    // Report the elapsed execution time of tasks.
 | 
			
		||||
    require("time-grunt")(grunt);
 | 
			
		||||
 | 
			
		||||
    var git = require("git-rev");
 | 
			
		||||
 | 
			
		||||
    // Sauce Labs browser
 | 
			
		||||
    var browsers = [
 | 
			
		||||
        // Desktop browsers
 | 
			
		||||
        {
 | 
			
		||||
            browserName: "chrome",
 | 
			
		||||
            version: "latest",
 | 
			
		||||
            platform: "Windows 7"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            browserName: "firefox",
 | 
			
		||||
            version: "latest",
 | 
			
		||||
            platform: "Linux"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            browserName: "safari",
 | 
			
		||||
            version: "9",
 | 
			
		||||
            platform: "OS X 10.11"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            browserName: "internet explorer",
 | 
			
		||||
            version: "8",
 | 
			
		||||
            platform: "Windows XP"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            browserName: "internet explorer",
 | 
			
		||||
            version: "11",
 | 
			
		||||
            platform: "Windows 8.1"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            browserName: "edge",
 | 
			
		||||
            version: "13",
 | 
			
		||||
            platform: "Windows 10"
 | 
			
		||||
        },
 | 
			
		||||
        // Mobile browsers
 | 
			
		||||
        {
 | 
			
		||||
            browserName: "ipad",
 | 
			
		||||
            deviceName: "iPad Air Simulator",
 | 
			
		||||
            deviceOrientation: "portrait",
 | 
			
		||||
            version: "8.4",
 | 
			
		||||
            platform: "OS X 10.9"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            browserName: "iphone",
 | 
			
		||||
            deviceName: "iPhone 5 Simulator",
 | 
			
		||||
            deviceOrientation: "portrait",
 | 
			
		||||
            version: "9.3",
 | 
			
		||||
            platform: "OS X 10.11"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            browserName: "android",
 | 
			
		||||
            deviceName: "Google Nexus 7 HD Emulator",
 | 
			
		||||
            deviceOrientation: "portrait",
 | 
			
		||||
            version: "4.4",
 | 
			
		||||
            platform: "Linux"
 | 
			
		||||
        }
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    var sauceJobs = {};
 | 
			
		||||
 | 
			
		||||
    var browserTests = [
 | 
			
		||||
        "filemanager-plugin",
 | 
			
		||||
        "visitor-plugin",
 | 
			
		||||
        "global-vars",
 | 
			
		||||
        "modify-vars",
 | 
			
		||||
        "production",
 | 
			
		||||
        "rootpath-relative",
 | 
			
		||||
        "rootpath-rewrite-urls",
 | 
			
		||||
        "rootpath",
 | 
			
		||||
        "relative-urls",
 | 
			
		||||
        "rewrite-urls",
 | 
			
		||||
        "browser",
 | 
			
		||||
        "no-js-errors",
 | 
			
		||||
        "legacy"
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    function makeJob(testName) {
 | 
			
		||||
        sauceJobs[testName] = {
 | 
			
		||||
            options: {
 | 
			
		||||
                urls:
 | 
			
		||||
                    testName === "all"
 | 
			
		||||
                        ? browserTests.map(function(name) {
 | 
			
		||||
                            return (
 | 
			
		||||
                                "http://localhost:8081/tmp/browser/test-runner-" +
 | 
			
		||||
                                  name +
 | 
			
		||||
                                  ".html"
 | 
			
		||||
                            );
 | 
			
		||||
                        })
 | 
			
		||||
                        : [
 | 
			
		||||
                            "http://localhost:8081/tmp/browser/test-runner-" +
 | 
			
		||||
                                  testName +
 | 
			
		||||
                                  ".html"
 | 
			
		||||
                        ],
 | 
			
		||||
                testname:
 | 
			
		||||
                    testName === "all" ? "Unit Tests for Less.js" : testName,
 | 
			
		||||
                browsers: browsers,
 | 
			
		||||
                public: "public",
 | 
			
		||||
                recordVideo: false,
 | 
			
		||||
                videoUploadOnPass: false,
 | 
			
		||||
                recordScreenshots: process.env.TRAVIS_BRANCH !== "master",
 | 
			
		||||
                build:
 | 
			
		||||
                    process.env.TRAVIS_BRANCH === "master"
 | 
			
		||||
                        ? process.env.TRAVIS_JOB_ID
 | 
			
		||||
                        : undefined,
 | 
			
		||||
                tags: [
 | 
			
		||||
                    process.env.TRAVIS_BUILD_NUMBER,
 | 
			
		||||
                    process.env.TRAVIS_PULL_REQUEST,
 | 
			
		||||
                    process.env.TRAVIS_BRANCH
 | 
			
		||||
                ],
 | 
			
		||||
                statusCheckAttempts: -1,
 | 
			
		||||
                sauceConfig: {
 | 
			
		||||
                    "idle-timeout": 100
 | 
			
		||||
                },
 | 
			
		||||
                throttled: 5,
 | 
			
		||||
                onTestComplete: function(result, callback) {
 | 
			
		||||
                    // Called after a unit test is done, per page, per browser
 | 
			
		||||
                    // 'result' param is the object returned by the test framework's reporter
 | 
			
		||||
                    // 'callback' is a Node.js style callback function. You must invoke it after you
 | 
			
		||||
                    // finish your work.
 | 
			
		||||
                    // Pass a non-null value as the callback's first parameter if you want to throw an
 | 
			
		||||
                    // exception. If your function is synchronous you can also throw exceptions
 | 
			
		||||
                    // directly.
 | 
			
		||||
                    // Passing true or false as the callback's second parameter passes or fails the
 | 
			
		||||
                    // test. Passing undefined does not alter the test result. Please note that this
 | 
			
		||||
                    // only affects the grunt task's result. You have to explicitly update the Sauce
 | 
			
		||||
                    // Labs job's status via its REST API, if you want so.
 | 
			
		||||
 | 
			
		||||
                    // This should be the encrypted value in Travis
 | 
			
		||||
                    var user = process.env.SAUCE_USERNAME;
 | 
			
		||||
                    var pass = process.env.SAUCE_ACCESS_KEY;
 | 
			
		||||
 | 
			
		||||
                    git.short(function(hash) {
 | 
			
		||||
                        require("phin")(
 | 
			
		||||
                            {
 | 
			
		||||
                                method: "PUT",
 | 
			
		||||
                                url: [
 | 
			
		||||
                                    "https://saucelabs.com/rest/v1",
 | 
			
		||||
                                    user,
 | 
			
		||||
                                    "jobs",
 | 
			
		||||
                                    result.job_id
 | 
			
		||||
                                ].join("/"),
 | 
			
		||||
                                auth: { user: user, pass: pass },
 | 
			
		||||
                                data: {
 | 
			
		||||
                                    passed: result.passed,
 | 
			
		||||
                                    build: "build-" + hash
 | 
			
		||||
                                }
 | 
			
		||||
                            },
 | 
			
		||||
                            function(error, response) {
 | 
			
		||||
                                if (error) {
 | 
			
		||||
                                    console.log(error);
 | 
			
		||||
                                    callback(error);
 | 
			
		||||
                                } else if (response.statusCode !== 200) {
 | 
			
		||||
                                    console.log(response);
 | 
			
		||||
                                    callback(
 | 
			
		||||
                                        new Error("Unexpected response status")
 | 
			
		||||
                                    );
 | 
			
		||||
                                } else {
 | 
			
		||||
                                    callback(null, result.passed);
 | 
			
		||||
                                }
 | 
			
		||||
                            }
 | 
			
		||||
                        );
 | 
			
		||||
                    });
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Make the SauceLabs jobs
 | 
			
		||||
    ["all"].concat(browserTests).map(makeJob);
 | 
			
		||||
 | 
			
		||||
    var path = require('path');
 | 
			
		||||
 | 
			
		||||
    // Handle async / await in Rollup build for tests
 | 
			
		||||
    const tsNodeRuntime = path.resolve(path.join('node_modules', '.bin', 'ts-node'));
 | 
			
		||||
    const crossEnv = path.resolve(path.join('node_modules', '.bin', 'cross-env'));
 | 
			
		||||
 | 
			
		||||
    // Project configuration.
 | 
			
		||||
    grunt.initConfig({
 | 
			
		||||
        shell: {
 | 
			
		||||
            options: {
 | 
			
		||||
                stdout: true,
 | 
			
		||||
                failOnError: true,
 | 
			
		||||
                execOptions: {
 | 
			
		||||
                    maxBuffer: Infinity
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
            build: {
 | 
			
		||||
                command: [
 | 
			
		||||
                    /** Browser runtime */
 | 
			
		||||
                    "node build/rollup.js --dist",
 | 
			
		||||
                    /** Copy to repo root */
 | 
			
		||||
                    "npm run copy:root",
 | 
			
		||||
                    /** Node.js runtime */
 | 
			
		||||
                    "npm run build"
 | 
			
		||||
                ].join(" && ")
 | 
			
		||||
            },
 | 
			
		||||
            testbuild: {
 | 
			
		||||
                command: [
 | 
			
		||||
                    "npm run build",
 | 
			
		||||
                    "node build/rollup.js --browser --out=./tmp/browser/less.min.js"
 | 
			
		||||
                ].join(" && ")
 | 
			
		||||
            },
 | 
			
		||||
            testcjs: {
 | 
			
		||||
                command: "npm run build"
 | 
			
		||||
            },
 | 
			
		||||
            testbrowser: {
 | 
			
		||||
                command: "node build/rollup.js --browser --out=./tmp/browser/less.min.js"
 | 
			
		||||
            },
 | 
			
		||||
            test: {
 | 
			
		||||
                command: [
 | 
			
		||||
                    // https://github.com/TypeStrong/ts-node/issues/693#issuecomment-848907036
 | 
			
		||||
                    crossEnv + " TS_NODE_SCOPE=true",
 | 
			
		||||
                    tsNodeRuntime + " test/test-es6.ts",
 | 
			
		||||
                    "node test/index.js"
 | 
			
		||||
                ].join(' && ')
 | 
			
		||||
            },
 | 
			
		||||
            generatebrowser: {
 | 
			
		||||
                command: 'node test/browser/generator/generate.js'
 | 
			
		||||
            },
 | 
			
		||||
            runbrowser: {
 | 
			
		||||
                command: 'node test/browser/generator/runner.js'
 | 
			
		||||
            },
 | 
			
		||||
            benchmark: {
 | 
			
		||||
                command: "node benchmark/index.js"
 | 
			
		||||
            },
 | 
			
		||||
            opts: {
 | 
			
		||||
                // test running with all current options (using `opts` since `options` means something already)
 | 
			
		||||
                command: [
 | 
			
		||||
                    // @TODO: make this more thorough
 | 
			
		||||
                    // CURRENT OPTIONS
 | 
			
		||||
                    `node bin/lessc --ie-compat ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`,
 | 
			
		||||
                    // --math
 | 
			
		||||
                    `node bin/lessc --math=always ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`,
 | 
			
		||||
                    `node bin/lessc --math=parens-division ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`,
 | 
			
		||||
                    `node bin/lessc --math=parens ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`,
 | 
			
		||||
                    `node bin/lessc --math=strict ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`,
 | 
			
		||||
                    `node bin/lessc --math=strict-legacy ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`,
 | 
			
		||||
 | 
			
		||||
                    // DEPRECATED OPTIONS
 | 
			
		||||
                    // --strict-math
 | 
			
		||||
                    `node bin/lessc --strict-math=on ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`
 | 
			
		||||
                ].join(" && ")
 | 
			
		||||
            },
 | 
			
		||||
            plugin: {
 | 
			
		||||
                command: [
 | 
			
		||||
                    `node bin/lessc --clean-css="--s1 --advanced" ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`,
 | 
			
		||||
                    "cd lib",
 | 
			
		||||
                    `node ../bin/lessc --clean-css="--s1 --advanced" ../${lessFolder}/_main/lazy-eval.less ../tmp/lazy-eval.css`,
 | 
			
		||||
                    `node ../bin/lessc --source-map=lazy-eval.css.map --autoprefix ../${lessFolder}/_main/lazy-eval.less ../tmp/lazy-eval.css`,
 | 
			
		||||
                    "cd ..",
 | 
			
		||||
                    // Test multiple plugins
 | 
			
		||||
                    `node bin/lessc --plugin=clean-css="--s1 --advanced" --plugin=autoprefix="ie 11,Edge >= 13,Chrome >= 47,Firefox >= 45,iOS >= 9.2,Safari >= 9" ${lessFolder}/_main/lazy-eval.less tmp/lazy-eval.css`
 | 
			
		||||
                ].join(" && ")
 | 
			
		||||
            },
 | 
			
		||||
            "sourcemap-test": {
 | 
			
		||||
                // quoted value doesn't seem to get picked up by time-grunt, or isn't output, at least; maybe just "sourcemap" is fine?
 | 
			
		||||
                command: [
 | 
			
		||||
                    `node bin/lessc --source-map=test/sourcemaps/maps/import-map.map ${lessFolder}/_main/import.less test/sourcemaps/import.css`,
 | 
			
		||||
                    `node bin/lessc --source-map ${lessFolder}/sourcemaps/basic.less test/sourcemaps/basic.css`
 | 
			
		||||
                ].join(" && ")
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
        eslint: {
 | 
			
		||||
            target: [
 | 
			
		||||
                "test/**/*.js",
 | 
			
		||||
                "src/less*/**/*.js",
 | 
			
		||||
                "!test/less/errors/plugin/plugin-error.js"
 | 
			
		||||
            ],
 | 
			
		||||
            options: {
 | 
			
		||||
                configFile: ".eslintrc.js",
 | 
			
		||||
                fix: true
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
        connect: {
 | 
			
		||||
            server: {
 | 
			
		||||
                options: {
 | 
			
		||||
                    port: 8081
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
        "saucelabs-mocha": sauceJobs,
 | 
			
		||||
 | 
			
		||||
        // Clean the version of less built for the tests
 | 
			
		||||
        clean: {
 | 
			
		||||
            test: ["test/browser/less.js", "tmp", "test/less-bom"],
 | 
			
		||||
            "sourcemap-test": [
 | 
			
		||||
                "test/sourcemaps/*.css",
 | 
			
		||||
                "test/sourcemaps/*.map"
 | 
			
		||||
            ],
 | 
			
		||||
            sauce_log: ["sc_*.log"]
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    // Load these plugins to provide the necessary tasks
 | 
			
		||||
    grunt.loadNpmTasks("grunt-saucelabs");
 | 
			
		||||
 | 
			
		||||
    require("jit-grunt")(grunt);
 | 
			
		||||
 | 
			
		||||
    // by default, run tests
 | 
			
		||||
    grunt.registerTask("default", ["test"]);
 | 
			
		||||
 | 
			
		||||
    // Release
 | 
			
		||||
    grunt.registerTask("dist", [
 | 
			
		||||
        "shell:build"
 | 
			
		||||
    ]);
 | 
			
		||||
 | 
			
		||||
    // Create the browser version of less.js
 | 
			
		||||
    grunt.registerTask("browsertest-lessjs", [
 | 
			
		||||
        "shell:testbrowser"
 | 
			
		||||
    ]);
 | 
			
		||||
 | 
			
		||||
    // Run all browser tests
 | 
			
		||||
    grunt.registerTask("browsertest", [
 | 
			
		||||
        "browsertest-lessjs",
 | 
			
		||||
        "connect",
 | 
			
		||||
        "shell:runbrowser"
 | 
			
		||||
    ]);
 | 
			
		||||
 | 
			
		||||
    // setup a web server to run the browser tests in a browser rather than phantom
 | 
			
		||||
    grunt.registerTask("browsertest-server", [
 | 
			
		||||
        "browsertest-lessjs",
 | 
			
		||||
        "shell:generatebrowser",
 | 
			
		||||
        "connect::keepalive"
 | 
			
		||||
    ]);
 | 
			
		||||
 | 
			
		||||
    var previous_force_state = grunt.option("force");
 | 
			
		||||
 | 
			
		||||
    grunt.registerTask("force", function(set) {
 | 
			
		||||
        if (set === "on") {
 | 
			
		||||
            grunt.option("force", true);
 | 
			
		||||
        } else if (set === "off") {
 | 
			
		||||
            grunt.option("force", false);
 | 
			
		||||
        } else if (set === "restore") {
 | 
			
		||||
            grunt.option("force", previous_force_state);
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    grunt.registerTask("sauce", [
 | 
			
		||||
        "browsertest-lessjs",
 | 
			
		||||
        "shell:generatebrowser",
 | 
			
		||||
        "connect",
 | 
			
		||||
        "sauce-after-setup"
 | 
			
		||||
    ]);
 | 
			
		||||
 | 
			
		||||
    grunt.registerTask("sauce-after-setup", [
 | 
			
		||||
        "saucelabs-mocha:all",
 | 
			
		||||
        "clean:sauce_log"
 | 
			
		||||
    ]);
 | 
			
		||||
 | 
			
		||||
    var testTasks = [
 | 
			
		||||
        "clean",
 | 
			
		||||
        "eslint",
 | 
			
		||||
        "shell:testbuild",
 | 
			
		||||
        "shell:test",
 | 
			
		||||
        "shell:opts",
 | 
			
		||||
        "shell:plugin",
 | 
			
		||||
        "connect",
 | 
			
		||||
        "shell:runbrowser"
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    if (
 | 
			
		||||
        isNaN(Number(process.env.TRAVIS_PULL_REQUEST, 10)) &&
 | 
			
		||||
        (process.env.TRAVIS_BRANCH === "master")
 | 
			
		||||
    ) {
 | 
			
		||||
        testTasks.push("force:on");
 | 
			
		||||
        testTasks.push("sauce-after-setup");
 | 
			
		||||
        testTasks.push("force:off");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Run all tests
 | 
			
		||||
    grunt.registerTask("test", testTasks);
 | 
			
		||||
 | 
			
		||||
    // Run shell option tests (includes deprecated options)
 | 
			
		||||
    grunt.registerTask("shell-options", ["shell:opts"]);
 | 
			
		||||
 | 
			
		||||
    // Run shell plugin test
 | 
			
		||||
    grunt.registerTask("shell-plugin", ["shell:plugin"]);
 | 
			
		||||
 | 
			
		||||
    // Quickly build and run Node tests
 | 
			
		||||
    grunt.registerTask("quicktest", [
 | 
			
		||||
        "shell:testcjs",
 | 
			
		||||
        "shell:test"
 | 
			
		||||
    ]);
 | 
			
		||||
 | 
			
		||||
    // generate a good test environment for testing sourcemaps
 | 
			
		||||
    grunt.registerTask("sourcemap-test", [
 | 
			
		||||
        "clean:sourcemap-test",
 | 
			
		||||
        "shell:build:lessc",
 | 
			
		||||
        "shell:sourcemap-test",
 | 
			
		||||
        "connect::keepalive"
 | 
			
		||||
    ]);
 | 
			
		||||
 | 
			
		||||
    // Run benchmark
 | 
			
		||||
    grunt.registerTask("benchmark", [
 | 
			
		||||
        "shell:testcjs",
 | 
			
		||||
        "shell:benchmark"
 | 
			
		||||
    ]);
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										13
									
								
								node_modules/less/README.md
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								node_modules/less/README.md
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,13 @@
 | 
			
		|||
# [Less.js](http://lesscss.org)
 | 
			
		||||
 | 
			
		||||
> The **dynamic** stylesheet language. [http://lesscss.org](http://lesscss.org).
 | 
			
		||||
 | 
			
		||||
This is the JavaScript, official, stable version of Less.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Getting Started
 | 
			
		||||
 | 
			
		||||
Add Less.js to your project:
 | 
			
		||||
```sh
 | 
			
		||||
npm install less
 | 
			
		||||
```
 | 
			
		||||
							
								
								
									
										662
									
								
								node_modules/less/bin/lessc
									
										
									
										generated
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						
									
										662
									
								
								node_modules/less/bin/lessc
									
										
									
										generated
									
									
										vendored
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,662 @@
 | 
			
		|||
#!/usr/bin/env node
 | 
			
		||||
 | 
			
		||||
/* eslint indent: [2, 2, {"SwitchCase": 1}] */
 | 
			
		||||
 | 
			
		||||
"use strict";
 | 
			
		||||
 | 
			
		||||
var path = require('path');
 | 
			
		||||
var fs = require('../lib/less-node/fs').default;
 | 
			
		||||
var os = require('os');
 | 
			
		||||
var utils = require('../lib/less/utils');
 | 
			
		||||
var Constants = require('../lib/less/constants');
 | 
			
		||||
 | 
			
		||||
var less = require('../lib/less-node').default;
 | 
			
		||||
 | 
			
		||||
var errno;
 | 
			
		||||
var mkdirp;
 | 
			
		||||
 | 
			
		||||
try {
 | 
			
		||||
  errno = require('errno');
 | 
			
		||||
} catch (err) {
 | 
			
		||||
  errno = null;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var pluginManager = new less.PluginManager(less);
 | 
			
		||||
var fileManager = new less.FileManager();
 | 
			
		||||
var plugins = [];
 | 
			
		||||
var queuePlugins = [];
 | 
			
		||||
var args = process.argv.slice(1);
 | 
			
		||||
var silent = false;
 | 
			
		||||
var verbose = false;
 | 
			
		||||
var options = less.options;
 | 
			
		||||
options.plugins = plugins;
 | 
			
		||||
options.reUsePluginManager = true;
 | 
			
		||||
var sourceMapOptions = {};
 | 
			
		||||
var continueProcessing = true;
 | 
			
		||||
 | 
			
		||||
var checkArgFunc = function checkArgFunc(arg, option) {
 | 
			
		||||
  if (!option) {
 | 
			
		||||
    console.error("".concat(arg, " option requires a parameter"));
 | 
			
		||||
    continueProcessing = false;
 | 
			
		||||
    process.exitCode = 1;
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return true;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
var checkBooleanArg = function checkBooleanArg(arg) {
 | 
			
		||||
  var onOff = /^((on|t|true|y|yes)|(off|f|false|n|no))$/i.exec(arg);
 | 
			
		||||
 | 
			
		||||
  if (!onOff) {
 | 
			
		||||
    console.error(" unable to parse ".concat(arg, " as a boolean. use one of on/t/true/y/yes/off/f/false/n/no"));
 | 
			
		||||
    continueProcessing = false;
 | 
			
		||||
    process.exitCode = 1;
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return Boolean(onOff[2]);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
var parseVariableOption = function parseVariableOption(option, variables) {
 | 
			
		||||
  var parts = option.split('=', 2);
 | 
			
		||||
  variables[parts[0]] = parts[1];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
var sourceMapFileInline = false;
 | 
			
		||||
 | 
			
		||||
function printUsage() {
 | 
			
		||||
  less.lesscHelper.printUsage();
 | 
			
		||||
 | 
			
		||||
  pluginManager.Loader.printUsage(plugins);
 | 
			
		||||
  continueProcessing = false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function render() {
 | 
			
		||||
  if (!continueProcessing) {
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  var input = args[1];
 | 
			
		||||
 | 
			
		||||
  if (input && input != '-') {
 | 
			
		||||
    input = path.resolve(process.cwd(), input);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  var output = args[2];
 | 
			
		||||
  var outputbase = args[2];
 | 
			
		||||
 | 
			
		||||
  if (output) {
 | 
			
		||||
    output = path.resolve(process.cwd(), output);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (options.disablePluginRule && queuePlugins.length > 0) {
 | 
			
		||||
    console.error('--plugin and --disable-plugin-rule may not be used at the same time');
 | 
			
		||||
    process.exitCode = 1;
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (options.sourceMap) {
 | 
			
		||||
    sourceMapOptions.sourceMapInputFilename = input;
 | 
			
		||||
 | 
			
		||||
    if (!sourceMapOptions.sourceMapFullFilename) {
 | 
			
		||||
      if (!output && !sourceMapFileInline) {
 | 
			
		||||
        console.error('the sourcemap option only has an optional filename if the css filename is given');
 | 
			
		||||
        console.error('consider adding --source-map-map-inline which embeds the sourcemap into the css');
 | 
			
		||||
        process.exitCode = 1;
 | 
			
		||||
        return;
 | 
			
		||||
      } // its in the same directory, so always just the basename
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      if (output) {
 | 
			
		||||
        sourceMapOptions.sourceMapOutputFilename = path.basename(output);
 | 
			
		||||
        sourceMapOptions.sourceMapFullFilename = "".concat(output, ".map");
 | 
			
		||||
      } // its in the same directory, so always just the basename
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      if ('sourceMapFullFilename' in sourceMapOptions) {
 | 
			
		||||
        sourceMapOptions.sourceMapFilename = path.basename(sourceMapOptions.sourceMapFullFilename);
 | 
			
		||||
      }
 | 
			
		||||
    } else if (options.sourceMap && !sourceMapFileInline) {
 | 
			
		||||
      var mapFilename = path.resolve(process.cwd(), sourceMapOptions.sourceMapFullFilename);
 | 
			
		||||
      var mapDir = path.dirname(mapFilename);
 | 
			
		||||
      var outputDir = path.dirname(output); // find the path from the map to the output file
 | 
			
		||||
 | 
			
		||||
      // eslint-disable-next-line max-len
 | 
			
		||||
      sourceMapOptions.sourceMapOutputFilename = path.join(path.relative(mapDir, outputDir), path.basename(output)); // make the sourcemap filename point to the sourcemap relative to the css file output directory
 | 
			
		||||
 | 
			
		||||
      sourceMapOptions.sourceMapFilename = path.join(path.relative(outputDir, mapDir), path.basename(sourceMapOptions.sourceMapFullFilename));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (sourceMapOptions.sourceMapURL && sourceMapOptions.disableSourcemapAnnotation) {
 | 
			
		||||
      console.error('You cannot provide flag --source-map-url with --source-map-no-annotation.');
 | 
			
		||||
      console.error('Please remove one of those flags.');
 | 
			
		||||
      process.exitcode = 1;
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (sourceMapOptions.sourceMapBasepath === undefined) {
 | 
			
		||||
    sourceMapOptions.sourceMapBasepath = input ? path.dirname(input) : process.cwd();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (sourceMapOptions.sourceMapRootpath === undefined) {
 | 
			
		||||
    var pathToMap = path.dirname((sourceMapFileInline ? output : sourceMapOptions.sourceMapFullFilename) || '.');
 | 
			
		||||
    var pathToInput = path.dirname(sourceMapOptions.sourceMapInputFilename || '.');
 | 
			
		||||
    sourceMapOptions.sourceMapRootpath = path.relative(pathToMap, pathToInput);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (!input) {
 | 
			
		||||
    console.error('lessc: no input files');
 | 
			
		||||
    console.error('');
 | 
			
		||||
    printUsage();
 | 
			
		||||
    process.exitCode = 1;
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  var ensureDirectory = function ensureDirectory(filepath) {
 | 
			
		||||
    var dir = path.dirname(filepath);
 | 
			
		||||
    var cmd;
 | 
			
		||||
    var existsSync = fs.existsSync || path.existsSync;
 | 
			
		||||
 | 
			
		||||
    if (!existsSync(dir)) {
 | 
			
		||||
      if (mkdirp === undefined) {
 | 
			
		||||
        try {
 | 
			
		||||
          mkdirp = require('make-dir');
 | 
			
		||||
        } catch (e) {
 | 
			
		||||
          mkdirp = null;
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      cmd = mkdirp && mkdirp.sync || fs.mkdirSync;
 | 
			
		||||
      cmd(dir);
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  if (options.depends) {
 | 
			
		||||
    if (!outputbase) {
 | 
			
		||||
      console.error('option --depends requires an output path to be specified');
 | 
			
		||||
      process.exitCode = 1;
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    process.stdout.write("".concat(outputbase, ": "));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (!sourceMapFileInline) {
 | 
			
		||||
    var writeSourceMap = function writeSourceMap() {
 | 
			
		||||
      var output = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
 | 
			
		||||
      var onDone = arguments.length > 1 ? arguments[1] : undefined;
 | 
			
		||||
      var filename = sourceMapOptions.sourceMapFullFilename;
 | 
			
		||||
      ensureDirectory(filename);
 | 
			
		||||
 | 
			
		||||
      // To fix https://github.com/less/less.js/issues/3646
 | 
			
		||||
      output = output.toString();
 | 
			
		||||
      
 | 
			
		||||
      fs.writeFile(filename, output, 'utf8', function (err) {
 | 
			
		||||
        if (err) {
 | 
			
		||||
          var description = 'Error: ';
 | 
			
		||||
 | 
			
		||||
          if (errno && errno.errno[err.errno]) {
 | 
			
		||||
            description += errno.errno[err.errno].description;
 | 
			
		||||
          } else {
 | 
			
		||||
            description += "".concat(err.code, " ").concat(err.message);
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          console.error("lessc: failed to create file ".concat(filename));
 | 
			
		||||
          console.error(description);
 | 
			
		||||
          process.exitCode = 1;
 | 
			
		||||
        } else {
 | 
			
		||||
          less.logger.info("lessc: wrote ".concat(filename));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        onDone();
 | 
			
		||||
      });
 | 
			
		||||
    };
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  var writeSourceMapIfNeeded = function writeSourceMapIfNeeded(output, onDone) {
 | 
			
		||||
    if (options.sourceMap && !sourceMapFileInline) {
 | 
			
		||||
      writeSourceMap(output, onDone);
 | 
			
		||||
    } else {
 | 
			
		||||
      onDone();
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  var writeOutput = function writeOutput(output, result, onSuccess) {
 | 
			
		||||
    if (options.depends) {
 | 
			
		||||
      onSuccess();
 | 
			
		||||
    } else if (output) {
 | 
			
		||||
      ensureDirectory(output);
 | 
			
		||||
 | 
			
		||||
      fs.writeFile(output, result.css, {
 | 
			
		||||
        encoding: 'utf8'
 | 
			
		||||
      }, function (err) {
 | 
			
		||||
        if (err) {
 | 
			
		||||
          var description = 'Error: ';
 | 
			
		||||
 | 
			
		||||
          if (errno && errno.errno[err.errno]) {
 | 
			
		||||
            description += errno.errno[err.errno].description;
 | 
			
		||||
          } else {
 | 
			
		||||
            description += "".concat(err.code, " ").concat(err.message);
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          console.error("lessc: failed to create file ".concat(output));
 | 
			
		||||
          console.error(description);
 | 
			
		||||
          process.exitCode = 1;
 | 
			
		||||
        } else {
 | 
			
		||||
          less.logger.info("lessc: wrote ".concat(output));
 | 
			
		||||
 | 
			
		||||
          onSuccess();
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    } else if (!options.depends) {
 | 
			
		||||
      process.stdout.write(result.css);
 | 
			
		||||
      onSuccess();
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  var logDependencies = function logDependencies(options, result) {
 | 
			
		||||
    if (options.depends) {
 | 
			
		||||
      var depends = '';
 | 
			
		||||
 | 
			
		||||
      for (var i = 0; i < result.imports.length; i++) {
 | 
			
		||||
        depends += "".concat(result.imports[i], " ");
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      console.log(depends);
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  var parseLessFile = function parseLessFile(e, data) {
 | 
			
		||||
    if (e) {
 | 
			
		||||
      console.error("lessc: ".concat(e.message));
 | 
			
		||||
      process.exitCode = 1;
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    data = data.replace(/^\uFEFF/, '');
 | 
			
		||||
    options.paths = [path.dirname(input)].concat(options.paths);
 | 
			
		||||
    options.filename = input;
 | 
			
		||||
 | 
			
		||||
    if (options.lint) {
 | 
			
		||||
      options.sourceMap = false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    sourceMapOptions.sourceMapFileInline = sourceMapFileInline;
 | 
			
		||||
 | 
			
		||||
    if (options.sourceMap) {
 | 
			
		||||
      options.sourceMap = sourceMapOptions;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    less.logger.addListener({
 | 
			
		||||
      info: function info(msg) {
 | 
			
		||||
        if (verbose) {
 | 
			
		||||
          console.log(msg);
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      warn: function warn(msg) {
 | 
			
		||||
        // do not show warning if the silent option is used
 | 
			
		||||
        if (!silent) {
 | 
			
		||||
          console.warn(msg);
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      error: function error(msg) {
 | 
			
		||||
        console.error(msg);
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    less.render(data, options).then(function (result) {
 | 
			
		||||
      if (!options.lint) {
 | 
			
		||||
        writeOutput(output, result, function () {
 | 
			
		||||
          writeSourceMapIfNeeded(result.map, function () {
 | 
			
		||||
            logDependencies(options, result);
 | 
			
		||||
          });
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    }, function (err) {
 | 
			
		||||
      if (!options.silent) {
 | 
			
		||||
        console.error(err.toString({
 | 
			
		||||
          stylize: options.color && less.lesscHelper.stylize
 | 
			
		||||
        }));
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      process.exitCode = 1;
 | 
			
		||||
    });
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  if (input != '-') {
 | 
			
		||||
    fs.readFile(input, 'utf8', parseLessFile);
 | 
			
		||||
  } else {
 | 
			
		||||
    process.stdin.resume();
 | 
			
		||||
    process.stdin.setEncoding('utf8');
 | 
			
		||||
    var buffer = '';
 | 
			
		||||
    process.stdin.on('data', function (data) {
 | 
			
		||||
      buffer += data;
 | 
			
		||||
    });
 | 
			
		||||
    process.stdin.on('end', function () {
 | 
			
		||||
      parseLessFile(false, buffer);
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function processPluginQueue() {
 | 
			
		||||
  var x = 0;
 | 
			
		||||
 | 
			
		||||
  function pluginError(name) {
 | 
			
		||||
    console.error("Unable to load plugin ".concat(name, " please make sure that it is installed under or at the same level as less"));
 | 
			
		||||
    process.exitCode = 1;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  function pluginFinished(plugin) {
 | 
			
		||||
    x++;
 | 
			
		||||
    plugins.push(plugin);
 | 
			
		||||
 | 
			
		||||
    if (x === queuePlugins.length) {
 | 
			
		||||
      render();
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  queuePlugins.forEach(function (queue) {
 | 
			
		||||
    var context = utils.clone(options);
 | 
			
		||||
    pluginManager.Loader.loadPlugin(queue.name, process.cwd(), context, less.environment, fileManager).then(function (data) {
 | 
			
		||||
      pluginFinished({
 | 
			
		||||
        fileContent: data.contents,
 | 
			
		||||
        filename: data.filename,
 | 
			
		||||
        options: queue.options
 | 
			
		||||
      });
 | 
			
		||||
    }).catch(function () {
 | 
			
		||||
      pluginError(queue.name);
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
} // self executing function so we can return
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
(function () {
 | 
			
		||||
  args = args.filter(function (arg) {
 | 
			
		||||
    var match;
 | 
			
		||||
    match = arg.match(/^-I(.+)$/);
 | 
			
		||||
 | 
			
		||||
    if (match) {
 | 
			
		||||
      options.paths.push(match[1]);
 | 
			
		||||
      return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    match = arg.match(/^--?([a-z][0-9a-z-]*)(?:=(.*))?$/i);
 | 
			
		||||
 | 
			
		||||
    if (match) {
 | 
			
		||||
      arg = match[1];
 | 
			
		||||
    } else {
 | 
			
		||||
      return arg;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    switch (arg) {
 | 
			
		||||
      case 'v':
 | 
			
		||||
      case 'version':
 | 
			
		||||
        console.log("lessc ".concat(less.version.join('.'), " (Less Compiler) [JavaScript]"));
 | 
			
		||||
        continueProcessing = false;
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'verbose':
 | 
			
		||||
        verbose = true;
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 's':
 | 
			
		||||
      case 'silent':
 | 
			
		||||
        silent = true;
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'l':
 | 
			
		||||
      case 'lint':
 | 
			
		||||
        options.lint = true;
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'strict-imports':
 | 
			
		||||
        options.strictImports = true;
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'h':
 | 
			
		||||
      case 'help':
 | 
			
		||||
        printUsage();
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'x':
 | 
			
		||||
      case 'compress':
 | 
			
		||||
        options.compress = true;
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'insecure':
 | 
			
		||||
        options.insecure = true;
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'M':
 | 
			
		||||
      case 'depends':
 | 
			
		||||
        options.depends = true;
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'max-line-len':
 | 
			
		||||
        if (checkArgFunc(arg, match[2])) {
 | 
			
		||||
          options.maxLineLen = parseInt(match[2], 10);
 | 
			
		||||
 | 
			
		||||
          if (options.maxLineLen <= 0) {
 | 
			
		||||
            options.maxLineLen = -1;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'no-color':
 | 
			
		||||
        options.color = false;
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'js':
 | 
			
		||||
        options.javascriptEnabled = true;
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'no-js':
 | 
			
		||||
        // eslint-disable-next-line max-len
 | 
			
		||||
        console.error('The "--no-js" argument is deprecated, as inline JavaScript is disabled by default. Use "--js" to enable inline JavaScript (not recommended).');
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'include-path':
 | 
			
		||||
        if (checkArgFunc(arg, match[2])) {
 | 
			
		||||
          // ; supported on windows.
 | 
			
		||||
          // : supported on windows and linux, excluding a drive letter like C:\ so C:\file:D:\file parses to 2
 | 
			
		||||
          options.paths = match[2].split(os.type().match(/Windows/) ? /:(?!\\)|;/ : ':').map(function (p) {
 | 
			
		||||
            if (p) {
 | 
			
		||||
              return path.resolve(process.cwd(), p);
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'line-numbers':
 | 
			
		||||
        if (checkArgFunc(arg, match[2])) {
 | 
			
		||||
          options.dumpLineNumbers = match[2];
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'source-map':
 | 
			
		||||
        options.sourceMap = true;
 | 
			
		||||
 | 
			
		||||
        if (match[2]) {
 | 
			
		||||
          sourceMapOptions.sourceMapFullFilename = match[2];
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'source-map-rootpath':
 | 
			
		||||
        if (checkArgFunc(arg, match[2])) {
 | 
			
		||||
          sourceMapOptions.sourceMapRootpath = match[2];
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'source-map-basepath':
 | 
			
		||||
        if (checkArgFunc(arg, match[2])) {
 | 
			
		||||
          sourceMapOptions.sourceMapBasepath = match[2];
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'source-map-inline':
 | 
			
		||||
      case 'source-map-map-inline':
 | 
			
		||||
        sourceMapFileInline = true;
 | 
			
		||||
        options.sourceMap = true;
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'source-map-include-source':
 | 
			
		||||
      case 'source-map-less-inline':
 | 
			
		||||
        sourceMapOptions.outputSourceFiles = true;
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'source-map-url':
 | 
			
		||||
        if (checkArgFunc(arg, match[2])) {
 | 
			
		||||
          sourceMapOptions.sourceMapURL = match[2];
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'source-map-no-annotation':
 | 
			
		||||
        sourceMapOptions.disableSourcemapAnnotation = true;
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'rp':
 | 
			
		||||
      case 'rootpath':
 | 
			
		||||
        if (checkArgFunc(arg, match[2])) {
 | 
			
		||||
          options.rootpath = match[2].replace(/\\/g, '/');
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        break;
 | 
			
		||||
      
 | 
			
		||||
      case 'ie-compat':
 | 
			
		||||
        console.warn('The --ie-compat option is deprecated, as it has no effect on compilation.');
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'relative-urls':
 | 
			
		||||
        console.warn('The --relative-urls option has been deprecated. Use --rewrite-urls=all.');
 | 
			
		||||
        options.rewriteUrls = Constants.RewriteUrls.ALL;
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'ru':
 | 
			
		||||
      case 'rewrite-urls':
 | 
			
		||||
        var m = match[2];
 | 
			
		||||
 | 
			
		||||
        if (m) {
 | 
			
		||||
          if (m === 'local') {
 | 
			
		||||
            options.rewriteUrls = Constants.RewriteUrls.LOCAL;
 | 
			
		||||
          } else if (m === 'off') {
 | 
			
		||||
            options.rewriteUrls = Constants.RewriteUrls.OFF;
 | 
			
		||||
          } else if (m === 'all') {
 | 
			
		||||
            options.rewriteUrls = Constants.RewriteUrls.ALL;
 | 
			
		||||
          } else {
 | 
			
		||||
            console.error("Unknown rewrite-urls argument ".concat(m));
 | 
			
		||||
            continueProcessing = false;
 | 
			
		||||
            process.exitCode = 1;
 | 
			
		||||
          }
 | 
			
		||||
        } else {
 | 
			
		||||
          options.rewriteUrls = Constants.RewriteUrls.ALL;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'sm':
 | 
			
		||||
      case 'strict-math':
 | 
			
		||||
        console.warn('The --strict-math option has been deprecated. Use --math=strict.');
 | 
			
		||||
 | 
			
		||||
        if (checkArgFunc(arg, match[2])) {
 | 
			
		||||
          if (checkBooleanArg(match[2])) {
 | 
			
		||||
            options.math = Constants.Math.PARENS;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'm':
 | 
			
		||||
      case 'math':
 | 
			
		||||
        var m = match[2];
 | 
			
		||||
        if (checkArgFunc(arg, m)) {
 | 
			
		||||
          if (m === 'always') {
 | 
			
		||||
            console.warn('--math=always is deprecated and will be removed in the future.');
 | 
			
		||||
            options.math = Constants.Math.ALWAYS;
 | 
			
		||||
          } else if (m === 'parens-division') {
 | 
			
		||||
            options.math = Constants.Math.PARENS_DIVISION;
 | 
			
		||||
          } else if (m === 'parens' || m === 'strict') {
 | 
			
		||||
            options.math = Constants.Math.PARENS;
 | 
			
		||||
          } else if (m === 'strict-legacy') {
 | 
			
		||||
            console.warn('--math=strict-legacy has been removed. Defaulting to --math=strict');
 | 
			
		||||
            options.math = Constants.Math.PARENS;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'su':
 | 
			
		||||
      case 'strict-units':
 | 
			
		||||
        if (checkArgFunc(arg, match[2])) {
 | 
			
		||||
          options.strictUnits = checkBooleanArg(match[2]);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'global-var':
 | 
			
		||||
        if (checkArgFunc(arg, match[2])) {
 | 
			
		||||
          if (!options.globalVars) {
 | 
			
		||||
            options.globalVars = {};
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          parseVariableOption(match[2], options.globalVars);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'modify-var':
 | 
			
		||||
        if (checkArgFunc(arg, match[2])) {
 | 
			
		||||
          if (!options.modifyVars) {
 | 
			
		||||
            options.modifyVars = {};
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          parseVariableOption(match[2], options.modifyVars);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'url-args':
 | 
			
		||||
        if (checkArgFunc(arg, match[2])) {
 | 
			
		||||
          options.urlArgs = match[2];
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'plugin':
 | 
			
		||||
        var splitupArg = match[2].match(/^([^=]+)(=(.*))?/);
 | 
			
		||||
        var name = splitupArg[1];
 | 
			
		||||
        var pluginOptions = splitupArg[3];
 | 
			
		||||
        queuePlugins.push({
 | 
			
		||||
          name: name,
 | 
			
		||||
          options: pluginOptions
 | 
			
		||||
        });
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
      case 'disable-plugin-rule':
 | 
			
		||||
        options.disablePluginRule = true;
 | 
			
		||||
        break;
 | 
			
		||||
  
 | 
			
		||||
      default:
 | 
			
		||||
        queuePlugins.push({
 | 
			
		||||
          name: arg,
 | 
			
		||||
          options: match[2],
 | 
			
		||||
          default: true
 | 
			
		||||
        });
 | 
			
		||||
        break;
 | 
			
		||||
    }
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  if (queuePlugins.length > 0) {
 | 
			
		||||
    processPluginQueue();
 | 
			
		||||
  } else {
 | 
			
		||||
    render();
 | 
			
		||||
  }
 | 
			
		||||
})();
 | 
			
		||||
							
								
								
									
										22
									
								
								node_modules/less/bower.json
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								node_modules/less/bower.json
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,22 @@
 | 
			
		|||
{
 | 
			
		||||
  "name": "less",
 | 
			
		||||
  "main": "dist/less.js",
 | 
			
		||||
  "ignore": [
 | 
			
		||||
    "**/.*",
 | 
			
		||||
    "benchmark",
 | 
			
		||||
    "bin",
 | 
			
		||||
    "lib",
 | 
			
		||||
    "src",
 | 
			
		||||
    "build",
 | 
			
		||||
    "test",
 | 
			
		||||
    "*.md",
 | 
			
		||||
    "LICENSE",
 | 
			
		||||
    "Gruntfile.js",
 | 
			
		||||
    "*.json",
 | 
			
		||||
    "*.yml",
 | 
			
		||||
    ".gitattributes",
 | 
			
		||||
    ".npmignore",
 | 
			
		||||
    ".eslintignore",
 | 
			
		||||
    "tsconfig.json"
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11517
									
								
								node_modules/less/dist/less.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										11517
									
								
								node_modules/less/dist/less.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
							
								
								
									
										11
									
								
								node_modules/less/dist/less.min.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								node_modules/less/dist/less.min.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										1
									
								
								node_modules/less/dist/less.min.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/dist/less.min.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										1
									
								
								node_modules/less/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
module.exports = require('./lib/less-node').default;
 | 
			
		||||
							
								
								
									
										43
									
								
								node_modules/less/lib/less-browser/add-default-options.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								node_modules/less/lib/less-browser/add-default-options.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,43 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var utils_1 = require("./utils");
 | 
			
		||||
var browser_1 = tslib_1.__importDefault(require("./browser"));
 | 
			
		||||
exports.default = (function (window, options) {
 | 
			
		||||
    // use options from the current script tag data attribues
 | 
			
		||||
    utils_1.addDataAttr(options, browser_1.default.currentScript(window));
 | 
			
		||||
    if (options.isFileProtocol === undefined) {
 | 
			
		||||
        options.isFileProtocol = /^(file|(chrome|safari)(-extension)?|resource|qrc|app):/.test(window.location.protocol);
 | 
			
		||||
    }
 | 
			
		||||
    // Load styles asynchronously (default: false)
 | 
			
		||||
    //
 | 
			
		||||
    // This is set to `false` by default, so that the body
 | 
			
		||||
    // doesn't start loading before the stylesheets are parsed.
 | 
			
		||||
    // Setting this to `true` can result in flickering.
 | 
			
		||||
    //
 | 
			
		||||
    options.async = options.async || false;
 | 
			
		||||
    options.fileAsync = options.fileAsync || false;
 | 
			
		||||
    // Interval between watch polls
 | 
			
		||||
    options.poll = options.poll || (options.isFileProtocol ? 1000 : 1500);
 | 
			
		||||
    options.env = options.env || (window.location.hostname == '127.0.0.1' ||
 | 
			
		||||
        window.location.hostname == '0.0.0.0' ||
 | 
			
		||||
        window.location.hostname == 'localhost' ||
 | 
			
		||||
        (window.location.port &&
 | 
			
		||||
            window.location.port.length > 0) ||
 | 
			
		||||
        options.isFileProtocol ? 'development'
 | 
			
		||||
        : 'production');
 | 
			
		||||
    var dumpLineNumbers = /!dumpLineNumbers:(comments|mediaquery|all)/.exec(window.location.hash);
 | 
			
		||||
    if (dumpLineNumbers) {
 | 
			
		||||
        options.dumpLineNumbers = dumpLineNumbers[1];
 | 
			
		||||
    }
 | 
			
		||||
    if (options.useFileCache === undefined) {
 | 
			
		||||
        options.useFileCache = true;
 | 
			
		||||
    }
 | 
			
		||||
    if (options.onReady === undefined) {
 | 
			
		||||
        options.onReady = true;
 | 
			
		||||
    }
 | 
			
		||||
    if (options.relativeUrls) {
 | 
			
		||||
        options.rewriteUrls = 'all';
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
//# sourceMappingURL=add-default-options.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-browser/add-default-options.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-browser/add-default-options.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"add-default-options.js","sourceRoot":"","sources":["../../src/less-browser/add-default-options.js"],"names":[],"mappings":";;;AAAA,iCAAoC;AACpC,8DAAgC;AAEhC,mBAAe,UAAC,MAAM,EAAE,OAAO;IAE3B,yDAAyD;IACzD,mBAAW,CAAC,OAAO,EAAE,iBAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;IAEpD,IAAI,OAAO,CAAC,cAAc,KAAK,SAAS,EAAE;QACtC,OAAO,CAAC,cAAc,GAAG,wDAAwD,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;KACpH;IAED,8CAA8C;IAC9C,EAAE;IACF,sDAAsD;IACtD,2DAA2D;IAC3D,mDAAmD;IACnD,EAAE;IACF,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC;IACvC,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,KAAK,CAAC;IAE/C,+BAA+B;IAC/B,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAEtE,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,IAAI,WAAW;QACjE,MAAM,CAAC,QAAQ,CAAC,QAAQ,IAAI,SAAS;QACrC,MAAM,CAAC,QAAQ,CAAC,QAAQ,IAAI,WAAW;QACvC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI;YACjB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QACpC,OAAO,CAAC,cAAc,CAAmB,CAAC,CAAC,aAAa;QACxD,CAAC,CAAC,YAAY,CAAC,CAAC;IAEpB,IAAM,eAAe,GAAG,4CAA4C,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAChG,IAAI,eAAe,EAAE;QACjB,OAAO,CAAC,eAAe,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;KAChD;IAED,IAAI,OAAO,CAAC,YAAY,KAAK,SAAS,EAAE;QACpC,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;KAC/B;IAED,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE;QAC/B,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;KAC1B;IAED,IAAI,OAAO,CAAC,YAAY,EAAE;QACtB,OAAO,CAAC,WAAW,GAAG,KAAK,CAAC;KAC/B;AACL,CAAC,EAAC","sourcesContent":["import {addDataAttr} from './utils';\nimport browser from './browser';\n\nexport default (window, options) => {\n\n    // use options from the current script tag data attribues\n    addDataAttr(options, browser.currentScript(window));\n\n    if (options.isFileProtocol === undefined) {\n        options.isFileProtocol = /^(file|(chrome|safari)(-extension)?|resource|qrc|app):/.test(window.location.protocol);\n    }\n\n    // Load styles asynchronously (default: false)\n    //\n    // This is set to `false` by default, so that the body\n    // doesn't start loading before the stylesheets are parsed.\n    // Setting this to `true` can result in flickering.\n    //\n    options.async = options.async || false;\n    options.fileAsync = options.fileAsync || false;\n\n    // Interval between watch polls\n    options.poll = options.poll || (options.isFileProtocol ? 1000 : 1500);\n\n    options.env = options.env || (window.location.hostname == '127.0.0.1' ||\n        window.location.hostname == '0.0.0.0'   ||\n        window.location.hostname == 'localhost' ||\n        (window.location.port &&\n            window.location.port.length > 0)      ||\n        options.isFileProtocol                   ? 'development'\n        : 'production');\n\n    const dumpLineNumbers = /!dumpLineNumbers:(comments|mediaquery|all)/.exec(window.location.hash);\n    if (dumpLineNumbers) {\n        options.dumpLineNumbers = dumpLineNumbers[1];\n    }\n\n    if (options.useFileCache === undefined) {\n        options.useFileCache = true;\n    }\n\n    if (options.onReady === undefined) {\n        options.onReady = true;\n    }\n\n    if (options.relativeUrls) {\n        options.rewriteUrls = 'all';\n    }\n};\n"]}
 | 
			
		||||
							
								
								
									
										61
									
								
								node_modules/less/lib/less-browser/bootstrap.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								node_modules/less/lib/less-browser/bootstrap.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,61 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
/**
 | 
			
		||||
 * Kicks off less and compiles any stylesheets
 | 
			
		||||
 * used in the browser distributed version of less
 | 
			
		||||
 * to kick-start less using the browser api
 | 
			
		||||
 */
 | 
			
		||||
var default_options_1 = tslib_1.__importDefault(require("../less/default-options"));
 | 
			
		||||
var add_default_options_1 = tslib_1.__importDefault(require("./add-default-options"));
 | 
			
		||||
var index_1 = tslib_1.__importDefault(require("./index"));
 | 
			
		||||
var options = default_options_1.default();
 | 
			
		||||
if (window.less) {
 | 
			
		||||
    for (var key in window.less) {
 | 
			
		||||
        if (Object.prototype.hasOwnProperty.call(window.less, key)) {
 | 
			
		||||
            options[key] = window.less[key];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
add_default_options_1.default(window, options);
 | 
			
		||||
options.plugins = options.plugins || [];
 | 
			
		||||
if (window.LESS_PLUGINS) {
 | 
			
		||||
    options.plugins = options.plugins.concat(window.LESS_PLUGINS);
 | 
			
		||||
}
 | 
			
		||||
var less = index_1.default(window, options);
 | 
			
		||||
exports.default = less;
 | 
			
		||||
window.less = less;
 | 
			
		||||
var css;
 | 
			
		||||
var head;
 | 
			
		||||
var style;
 | 
			
		||||
// Always restore page visibility
 | 
			
		||||
function resolveOrReject(data) {
 | 
			
		||||
    if (data.filename) {
 | 
			
		||||
        console.warn(data);
 | 
			
		||||
    }
 | 
			
		||||
    if (!options.async) {
 | 
			
		||||
        head.removeChild(style);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
if (options.onReady) {
 | 
			
		||||
    if (/!watch/.test(window.location.hash)) {
 | 
			
		||||
        less.watch();
 | 
			
		||||
    }
 | 
			
		||||
    // Simulate synchronous stylesheet loading by hiding page rendering
 | 
			
		||||
    if (!options.async) {
 | 
			
		||||
        css = 'body { display: none !important }';
 | 
			
		||||
        head = document.head || document.getElementsByTagName('head')[0];
 | 
			
		||||
        style = document.createElement('style');
 | 
			
		||||
        style.type = 'text/css';
 | 
			
		||||
        if (style.styleSheet) {
 | 
			
		||||
            style.styleSheet.cssText = css;
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            style.appendChild(document.createTextNode(css));
 | 
			
		||||
        }
 | 
			
		||||
        head.appendChild(style);
 | 
			
		||||
    }
 | 
			
		||||
    less.registerStylesheetsImmediately();
 | 
			
		||||
    less.pageLoadFinished = less.refresh(less.env === 'development').then(resolveOrReject, resolveOrReject);
 | 
			
		||||
}
 | 
			
		||||
//# sourceMappingURL=bootstrap.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-browser/bootstrap.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-browser/bootstrap.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../src/less-browser/bootstrap.js"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,oFAAqD;AACrD,sFAAsD;AACtD,0DAA2B;AAE3B,IAAM,OAAO,GAAG,yBAAc,EAAE,CAAC;AAEjC,IAAI,MAAM,CAAC,IAAI,EAAE;IACb,KAAK,IAAM,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE;QAC3B,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;YACxD,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACnC;KACJ;CACJ;AACD,6BAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEnC,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;AAExC,IAAI,MAAM,CAAC,YAAY,EAAE;IACrB,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;CACjE;AAED,IAAM,IAAI,GAAG,eAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACnC,kBAAe,IAAI,CAAC;AAEpB,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;AAEnB,IAAI,GAAG,CAAC;AACR,IAAI,IAAI,CAAC;AACT,IAAI,KAAK,CAAC;AAEV,iCAAiC;AACjC,SAAS,eAAe,CAAC,IAAI;IACzB,IAAI,IAAI,CAAC,QAAQ,EAAE;QACf,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACtB;IACD,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;QAChB,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;KAC3B;AACL,CAAC;AAED,IAAI,OAAO,CAAC,OAAO,EAAE;IACjB,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QACrC,IAAI,CAAC,KAAK,EAAE,CAAC;KAChB;IACD,mEAAmE;IACnE,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;QAChB,GAAG,GAAG,mCAAmC,CAAC;QAC1C,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACjE,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAExC,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;QACxB,IAAI,KAAK,CAAC,UAAU,EAAE;YAClB,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;SAClC;aAAM;YACH,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;SACnD;QAED,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;KAC3B;IACD,IAAI,CAAC,8BAA8B,EAAE,CAAC;IACtC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,aAAa,CAAC,CAAC,IAAI,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;CAC3G","sourcesContent":["/**\n * Kicks off less and compiles any stylesheets\n * used in the browser distributed version of less\n * to kick-start less using the browser api\n */\nimport defaultOptions from '../less/default-options';\nimport addDefaultOptions from './add-default-options';\nimport root from './index';\n\nconst options = defaultOptions();\n\nif (window.less) {\n    for (const key in window.less) {\n        if (Object.prototype.hasOwnProperty.call(window.less, key)) {\n            options[key] = window.less[key];\n        }\n    }\n}\naddDefaultOptions(window, options);\n\noptions.plugins = options.plugins || [];\n\nif (window.LESS_PLUGINS) {\n    options.plugins = options.plugins.concat(window.LESS_PLUGINS);\n}\n\nconst less = root(window, options);\nexport default less;\n\nwindow.less = less;\n\nlet css;\nlet head;\nlet style;\n\n// Always restore page visibility\nfunction resolveOrReject(data) {\n    if (data.filename) {\n        console.warn(data);\n    }\n    if (!options.async) {\n        head.removeChild(style);\n    }\n}\n\nif (options.onReady) {\n    if (/!watch/.test(window.location.hash)) {\n        less.watch();\n    }\n    // Simulate synchronous stylesheet loading by hiding page rendering\n    if (!options.async) {\n        css = 'body { display: none !important }';\n        head = document.head || document.getElementsByTagName('head')[0];\n        style = document.createElement('style');\n\n        style.type = 'text/css';\n        if (style.styleSheet) {\n            style.styleSheet.cssText = css;\n        } else {\n            style.appendChild(document.createTextNode(css));\n        }\n\n        head.appendChild(style);\n    }\n    less.registerStylesheetsImmediately();\n    less.pageLoadFinished = less.refresh(less.env === 'development').then(resolveOrReject, resolveOrReject);\n}\n"]}
 | 
			
		||||
							
								
								
									
										62
									
								
								node_modules/less/lib/less-browser/browser.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								node_modules/less/lib/less-browser/browser.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,62 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var utils = tslib_1.__importStar(require("./utils"));
 | 
			
		||||
exports.default = {
 | 
			
		||||
    createCSS: function (document, styles, sheet) {
 | 
			
		||||
        // Strip the query-string
 | 
			
		||||
        var href = sheet.href || '';
 | 
			
		||||
        // If there is no title set, use the filename, minus the extension
 | 
			
		||||
        var id = "less:" + (sheet.title || utils.extractId(href));
 | 
			
		||||
        // If this has already been inserted into the DOM, we may need to replace it
 | 
			
		||||
        var oldStyleNode = document.getElementById(id);
 | 
			
		||||
        var keepOldStyleNode = false;
 | 
			
		||||
        // Create a new stylesheet node for insertion or (if necessary) replacement
 | 
			
		||||
        var styleNode = document.createElement('style');
 | 
			
		||||
        styleNode.setAttribute('type', 'text/css');
 | 
			
		||||
        if (sheet.media) {
 | 
			
		||||
            styleNode.setAttribute('media', sheet.media);
 | 
			
		||||
        }
 | 
			
		||||
        styleNode.id = id;
 | 
			
		||||
        if (!styleNode.styleSheet) {
 | 
			
		||||
            styleNode.appendChild(document.createTextNode(styles));
 | 
			
		||||
            // If new contents match contents of oldStyleNode, don't replace oldStyleNode
 | 
			
		||||
            keepOldStyleNode = (oldStyleNode !== null && oldStyleNode.childNodes.length > 0 && styleNode.childNodes.length > 0 &&
 | 
			
		||||
                oldStyleNode.firstChild.nodeValue === styleNode.firstChild.nodeValue);
 | 
			
		||||
        }
 | 
			
		||||
        var head = document.getElementsByTagName('head')[0];
 | 
			
		||||
        // If there is no oldStyleNode, just append; otherwise, only append if we need
 | 
			
		||||
        // to replace oldStyleNode with an updated stylesheet
 | 
			
		||||
        if (oldStyleNode === null || keepOldStyleNode === false) {
 | 
			
		||||
            var nextEl = sheet && sheet.nextSibling || null;
 | 
			
		||||
            if (nextEl) {
 | 
			
		||||
                nextEl.parentNode.insertBefore(styleNode, nextEl);
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                head.appendChild(styleNode);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        if (oldStyleNode && keepOldStyleNode === false) {
 | 
			
		||||
            oldStyleNode.parentNode.removeChild(oldStyleNode);
 | 
			
		||||
        }
 | 
			
		||||
        // For IE.
 | 
			
		||||
        // This needs to happen *after* the style element is added to the DOM, otherwise IE 7 and 8 may crash.
 | 
			
		||||
        // See http://social.msdn.microsoft.com/Forums/en-US/7e081b65-878a-4c22-8e68-c10d39c2ed32/internet-explorer-crashes-appending-style-element-to-head
 | 
			
		||||
        if (styleNode.styleSheet) {
 | 
			
		||||
            try {
 | 
			
		||||
                styleNode.styleSheet.cssText = styles;
 | 
			
		||||
            }
 | 
			
		||||
            catch (e) {
 | 
			
		||||
                throw new Error('Couldn\'t reassign styleSheet.cssText.');
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    currentScript: function (window) {
 | 
			
		||||
        var document = window.document;
 | 
			
		||||
        return document.currentScript || (function () {
 | 
			
		||||
            var scripts = document.getElementsByTagName('script');
 | 
			
		||||
            return scripts[scripts.length - 1];
 | 
			
		||||
        })();
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
//# sourceMappingURL=browser.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-browser/browser.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-browser/browser.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/less-browser/browser.js"],"names":[],"mappings":";;;AAAA,qDAAiC;AAEjC,kBAAe;IACX,SAAS,EAAE,UAAU,QAAQ,EAAE,MAAM,EAAE,KAAK;QACxC,yBAAyB;QACzB,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC;QAE9B,kEAAkE;QAClE,IAAM,EAAE,GAAG,WAAQ,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAE,CAAC;QAE1D,4EAA4E;QAC5E,IAAM,YAAY,GAAG,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;QACjD,IAAI,gBAAgB,GAAG,KAAK,CAAC;QAE7B,2EAA2E;QAC3E,IAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAClD,SAAS,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAC3C,IAAI,KAAK,CAAC,KAAK,EAAE;YACb,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;SAChD;QACD,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;QAElB,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE;YACvB,SAAS,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;YAEvD,6EAA6E;YAC7E,gBAAgB,GAAG,CAAC,YAAY,KAAK,IAAI,IAAI,YAAY,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC;gBAC9G,YAAY,CAAC,UAAU,CAAC,SAAS,KAAK,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;SAC7E;QAED,IAAM,IAAI,GAAG,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAEtD,8EAA8E;QAC9E,qDAAqD;QACrD,IAAI,YAAY,KAAK,IAAI,IAAI,gBAAgB,KAAK,KAAK,EAAE;YACrD,IAAM,MAAM,GAAG,KAAK,IAAI,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC;YAClD,IAAI,MAAM,EAAE;gBACR,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;aACrD;iBAAM;gBACH,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;aAC/B;SACJ;QACD,IAAI,YAAY,IAAI,gBAAgB,KAAK,KAAK,EAAE;YAC5C,YAAY,CAAC,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;SACrD;QAED,UAAU;QACV,sGAAsG;QACtG,mJAAmJ;QACnJ,IAAI,SAAS,CAAC,UAAU,EAAE;YACtB,IAAI;gBACA,SAAS,CAAC,UAAU,CAAC,OAAO,GAAG,MAAM,CAAC;aACzC;YAAC,OAAO,CAAC,EAAE;gBACR,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;aAC7D;SACJ;IACL,CAAC;IACD,aAAa,EAAE,UAAS,MAAM;QAC1B,IAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QACjC,OAAO,QAAQ,CAAC,aAAa,IAAI,CAAC;YAC9B,IAAM,OAAO,GAAG,QAAQ,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;YACxD,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACvC,CAAC,CAAC,EAAE,CAAC;IACT,CAAC;CACJ,CAAC","sourcesContent":["import * as utils from './utils';\n\nexport default {\n    createCSS: function (document, styles, sheet) {\n        // Strip the query-string\n        const href = sheet.href || '';\n\n        // If there is no title set, use the filename, minus the extension\n        const id = `less:${sheet.title || utils.extractId(href)}`;\n\n        // If this has already been inserted into the DOM, we may need to replace it\n        const oldStyleNode = document.getElementById(id);\n        let keepOldStyleNode = false;\n\n        // Create a new stylesheet node for insertion or (if necessary) replacement\n        const styleNode = document.createElement('style');\n        styleNode.setAttribute('type', 'text/css');\n        if (sheet.media) {\n            styleNode.setAttribute('media', sheet.media);\n        }\n        styleNode.id = id;\n\n        if (!styleNode.styleSheet) {\n            styleNode.appendChild(document.createTextNode(styles));\n\n            // If new contents match contents of oldStyleNode, don't replace oldStyleNode\n            keepOldStyleNode = (oldStyleNode !== null && oldStyleNode.childNodes.length > 0 && styleNode.childNodes.length > 0 &&\n                oldStyleNode.firstChild.nodeValue === styleNode.firstChild.nodeValue);\n        }\n\n        const head = document.getElementsByTagName('head')[0];\n\n        // If there is no oldStyleNode, just append; otherwise, only append if we need\n        // to replace oldStyleNode with an updated stylesheet\n        if (oldStyleNode === null || keepOldStyleNode === false) {\n            const nextEl = sheet && sheet.nextSibling || null;\n            if (nextEl) {\n                nextEl.parentNode.insertBefore(styleNode, nextEl);\n            } else {\n                head.appendChild(styleNode);\n            }\n        }\n        if (oldStyleNode && keepOldStyleNode === false) {\n            oldStyleNode.parentNode.removeChild(oldStyleNode);\n        }\n\n        // For IE.\n        // This needs to happen *after* the style element is added to the DOM, otherwise IE 7 and 8 may crash.\n        // See http://social.msdn.microsoft.com/Forums/en-US/7e081b65-878a-4c22-8e68-c10d39c2ed32/internet-explorer-crashes-appending-style-element-to-head\n        if (styleNode.styleSheet) {\n            try {\n                styleNode.styleSheet.cssText = styles;\n            } catch (e) {\n                throw new Error('Couldn\\'t reassign styleSheet.cssText.');\n            }\n        }\n    },\n    currentScript: function(window) {\n        const document = window.document;\n        return document.currentScript || (() => {\n            const scripts = document.getElementsByTagName('script');\n            return scripts[scripts.length - 1];\n        })();\n    }\n};\n"]}
 | 
			
		||||
							
								
								
									
										45
									
								
								node_modules/less/lib/less-browser/cache.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								node_modules/less/lib/less-browser/cache.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,45 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
// Cache system is a bit outdated and could do with work
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
exports.default = (function (window, options, logger) {
 | 
			
		||||
    var cache = null;
 | 
			
		||||
    if (options.env !== 'development') {
 | 
			
		||||
        try {
 | 
			
		||||
            cache = (typeof window.localStorage === 'undefined') ? null : window.localStorage;
 | 
			
		||||
        }
 | 
			
		||||
        catch (_) { }
 | 
			
		||||
    }
 | 
			
		||||
    return {
 | 
			
		||||
        setCSS: function (path, lastModified, modifyVars, styles) {
 | 
			
		||||
            if (cache) {
 | 
			
		||||
                logger.info("saving " + path + " to cache.");
 | 
			
		||||
                try {
 | 
			
		||||
                    cache.setItem(path, styles);
 | 
			
		||||
                    cache.setItem(path + ":timestamp", lastModified);
 | 
			
		||||
                    if (modifyVars) {
 | 
			
		||||
                        cache.setItem(path + ":vars", JSON.stringify(modifyVars));
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                catch (e) {
 | 
			
		||||
                    // TODO - could do with adding more robust error handling
 | 
			
		||||
                    logger.error("failed to save \"" + path + "\" to local storage for caching.");
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
        getCSS: function (path, webInfo, modifyVars) {
 | 
			
		||||
            var css = cache && cache.getItem(path);
 | 
			
		||||
            var timestamp = cache && cache.getItem(path + ":timestamp");
 | 
			
		||||
            var vars = cache && cache.getItem(path + ":vars");
 | 
			
		||||
            modifyVars = modifyVars || {};
 | 
			
		||||
            vars = vars || '{}'; // if not set, treat as the JSON representation of an empty object
 | 
			
		||||
            if (timestamp && webInfo.lastModified &&
 | 
			
		||||
                (new Date(webInfo.lastModified).valueOf() ===
 | 
			
		||||
                    new Date(timestamp).valueOf()) &&
 | 
			
		||||
                JSON.stringify(modifyVars) === vars) {
 | 
			
		||||
                // Use local copy
 | 
			
		||||
                return css;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
});
 | 
			
		||||
//# sourceMappingURL=cache.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-browser/cache.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-browser/cache.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../src/less-browser/cache.js"],"names":[],"mappings":";AAAA,wDAAwD;;AAExD,mBAAe,UAAC,MAAM,EAAE,OAAO,EAAE,MAAM;IACnC,IAAI,KAAK,GAAG,IAAI,CAAC;IACjB,IAAI,OAAO,CAAC,GAAG,KAAK,aAAa,EAAE;QAC/B,IAAI;YACA,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,YAAY,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;SACrF;QAAC,OAAO,CAAC,EAAE,GAAE;KACjB;IACD,OAAO;QACH,MAAM,EAAE,UAAS,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM;YACnD,IAAI,KAAK,EAAE;gBACP,MAAM,CAAC,IAAI,CAAC,YAAU,IAAI,eAAY,CAAC,CAAC;gBACxC,IAAI;oBACA,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;oBAC5B,KAAK,CAAC,OAAO,CAAI,IAAI,eAAY,EAAE,YAAY,CAAC,CAAC;oBACjD,IAAI,UAAU,EAAE;wBACZ,KAAK,CAAC,OAAO,CAAI,IAAI,UAAO,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;qBAC7D;iBACJ;gBAAC,OAAO,CAAC,EAAE;oBACR,yDAAyD;oBACzD,MAAM,CAAC,KAAK,CAAC,sBAAmB,IAAI,qCAAiC,CAAC,CAAC;iBAC1E;aACJ;QACL,CAAC;QACD,MAAM,EAAE,UAAS,IAAI,EAAE,OAAO,EAAE,UAAU;YACtC,IAAM,GAAG,GAAS,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC/C,IAAM,SAAS,GAAG,KAAK,IAAI,KAAK,CAAC,OAAO,CAAI,IAAI,eAAY,CAAC,CAAC;YAC9D,IAAI,IAAI,GAAQ,KAAK,IAAI,KAAK,CAAC,OAAO,CAAI,IAAI,UAAO,CAAC,CAAC;YAEvD,UAAU,GAAG,UAAU,IAAI,EAAE,CAAC;YAC9B,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC,kEAAkE;YAEvF,IAAI,SAAS,IAAI,OAAO,CAAC,YAAY;gBACjC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE;oBACrC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC;gBAClC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,IAAI,EAAE;gBACrC,iBAAiB;gBACjB,OAAO,GAAG,CAAC;aACd;QACL,CAAC;KACJ,CAAC;AACN,CAAC,EAAC","sourcesContent":["// Cache system is a bit outdated and could do with work\n\nexport default (window, options, logger) => {\n    let cache = null;\n    if (options.env !== 'development') {\n        try {\n            cache = (typeof window.localStorage === 'undefined') ? null : window.localStorage;\n        } catch (_) {}\n    }\n    return {\n        setCSS: function(path, lastModified, modifyVars, styles) {\n            if (cache) {\n                logger.info(`saving ${path} to cache.`);\n                try {\n                    cache.setItem(path, styles);\n                    cache.setItem(`${path}:timestamp`, lastModified);\n                    if (modifyVars) {\n                        cache.setItem(`${path}:vars`, JSON.stringify(modifyVars));\n                    }\n                } catch (e) {\n                    // TODO - could do with adding more robust error handling\n                    logger.error(`failed to save \"${path}\" to local storage for caching.`);\n                }\n            }\n        },\n        getCSS: function(path, webInfo, modifyVars) {\n            const css       = cache && cache.getItem(path);\n            const timestamp = cache && cache.getItem(`${path}:timestamp`);\n            let vars      = cache && cache.getItem(`${path}:vars`);\n\n            modifyVars = modifyVars || {};\n            vars = vars || '{}'; // if not set, treat as the JSON representation of an empty object\n\n            if (timestamp && webInfo.lastModified &&\n                (new Date(webInfo.lastModified).valueOf() ===\n                    new Date(timestamp).valueOf()) &&\n                JSON.stringify(modifyVars) === vars) {\n                // Use local copy\n                return css;\n            }\n        }\n    };\n};\n"]}
 | 
			
		||||
							
								
								
									
										162
									
								
								node_modules/less/lib/less-browser/error-reporting.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										162
									
								
								node_modules/less/lib/less-browser/error-reporting.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,162 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var utils = tslib_1.__importStar(require("./utils"));
 | 
			
		||||
var browser_1 = tslib_1.__importDefault(require("./browser"));
 | 
			
		||||
exports.default = (function (window, less, options) {
 | 
			
		||||
    function errorHTML(e, rootHref) {
 | 
			
		||||
        var id = "less-error-message:" + utils.extractId(rootHref || '');
 | 
			
		||||
        var template = '<li><label>{line}</label><pre class="{class}">{content}</pre></li>';
 | 
			
		||||
        var elem = window.document.createElement('div');
 | 
			
		||||
        var timer;
 | 
			
		||||
        var content;
 | 
			
		||||
        var errors = [];
 | 
			
		||||
        var filename = e.filename || rootHref;
 | 
			
		||||
        var filenameNoPath = filename.match(/([^/]+(\?.*)?)$/)[1];
 | 
			
		||||
        elem.id = id;
 | 
			
		||||
        elem.className = 'less-error-message';
 | 
			
		||||
        content = "<h3>" + (e.type || 'Syntax') + "Error: " + (e.message || 'There is an error in your .less file') +
 | 
			
		||||
            ("</h3><p>in <a href=\"" + filename + "\">" + filenameNoPath + "</a> ");
 | 
			
		||||
        var errorline = function (e, i, classname) {
 | 
			
		||||
            if (e.extract[i] !== undefined) {
 | 
			
		||||
                errors.push(template.replace(/\{line\}/, (parseInt(e.line, 10) || 0) + (i - 1))
 | 
			
		||||
                    .replace(/\{class\}/, classname)
 | 
			
		||||
                    .replace(/\{content\}/, e.extract[i]));
 | 
			
		||||
            }
 | 
			
		||||
        };
 | 
			
		||||
        if (e.line) {
 | 
			
		||||
            errorline(e, 0, '');
 | 
			
		||||
            errorline(e, 1, 'line');
 | 
			
		||||
            errorline(e, 2, '');
 | 
			
		||||
            content += "on line " + e.line + ", column " + (e.column + 1) + ":</p><ul>" + errors.join('') + "</ul>";
 | 
			
		||||
        }
 | 
			
		||||
        if (e.stack && (e.extract || options.logLevel >= 4)) {
 | 
			
		||||
            content += "<br/>Stack Trace</br />" + e.stack.split('\n').slice(1).join('<br/>');
 | 
			
		||||
        }
 | 
			
		||||
        elem.innerHTML = content;
 | 
			
		||||
        // CSS for error messages
 | 
			
		||||
        browser_1.default.createCSS(window.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' });
 | 
			
		||||
        elem.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(';');
 | 
			
		||||
        if (options.env === 'development') {
 | 
			
		||||
            timer = setInterval(function () {
 | 
			
		||||
                var document = window.document;
 | 
			
		||||
                var body = document.body;
 | 
			
		||||
                if (body) {
 | 
			
		||||
                    if (document.getElementById(id)) {
 | 
			
		||||
                        body.replaceChild(elem, document.getElementById(id));
 | 
			
		||||
                    }
 | 
			
		||||
                    else {
 | 
			
		||||
                        body.insertBefore(elem, body.firstChild);
 | 
			
		||||
                    }
 | 
			
		||||
                    clearInterval(timer);
 | 
			
		||||
                }
 | 
			
		||||
            }, 10);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    function removeErrorHTML(path) {
 | 
			
		||||
        var node = window.document.getElementById("less-error-message:" + utils.extractId(path));
 | 
			
		||||
        if (node) {
 | 
			
		||||
            node.parentNode.removeChild(node);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    function removeErrorConsole() {
 | 
			
		||||
        // no action
 | 
			
		||||
    }
 | 
			
		||||
    function removeError(path) {
 | 
			
		||||
        if (!options.errorReporting || options.errorReporting === 'html') {
 | 
			
		||||
            removeErrorHTML(path);
 | 
			
		||||
        }
 | 
			
		||||
        else if (options.errorReporting === 'console') {
 | 
			
		||||
            removeErrorConsole(path);
 | 
			
		||||
        }
 | 
			
		||||
        else if (typeof options.errorReporting === 'function') {
 | 
			
		||||
            options.errorReporting('remove', path);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    function errorConsole(e, rootHref) {
 | 
			
		||||
        var template = '{line} {content}';
 | 
			
		||||
        var filename = e.filename || rootHref;
 | 
			
		||||
        var errors = [];
 | 
			
		||||
        var content = (e.type || 'Syntax') + "Error: " + (e.message || 'There is an error in your .less file') + " in " + filename;
 | 
			
		||||
        var errorline = function (e, i, classname) {
 | 
			
		||||
            if (e.extract[i] !== undefined) {
 | 
			
		||||
                errors.push(template.replace(/\{line\}/, (parseInt(e.line, 10) || 0) + (i - 1))
 | 
			
		||||
                    .replace(/\{class\}/, classname)
 | 
			
		||||
                    .replace(/\{content\}/, e.extract[i]));
 | 
			
		||||
            }
 | 
			
		||||
        };
 | 
			
		||||
        if (e.line) {
 | 
			
		||||
            errorline(e, 0, '');
 | 
			
		||||
            errorline(e, 1, 'line');
 | 
			
		||||
            errorline(e, 2, '');
 | 
			
		||||
            content += " on line " + e.line + ", column " + (e.column + 1) + ":\n" + errors.join('\n');
 | 
			
		||||
        }
 | 
			
		||||
        if (e.stack && (e.extract || options.logLevel >= 4)) {
 | 
			
		||||
            content += "\nStack Trace\n" + e.stack;
 | 
			
		||||
        }
 | 
			
		||||
        less.logger.error(content);
 | 
			
		||||
    }
 | 
			
		||||
    function error(e, rootHref) {
 | 
			
		||||
        if (!options.errorReporting || options.errorReporting === 'html') {
 | 
			
		||||
            errorHTML(e, rootHref);
 | 
			
		||||
        }
 | 
			
		||||
        else if (options.errorReporting === 'console') {
 | 
			
		||||
            errorConsole(e, rootHref);
 | 
			
		||||
        }
 | 
			
		||||
        else if (typeof options.errorReporting === 'function') {
 | 
			
		||||
            options.errorReporting('add', e, rootHref);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    return {
 | 
			
		||||
        add: error,
 | 
			
		||||
        remove: removeError
 | 
			
		||||
    };
 | 
			
		||||
});
 | 
			
		||||
//# sourceMappingURL=error-reporting.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-browser/error-reporting.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-browser/error-reporting.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										102
									
								
								node_modules/less/lib/less-browser/file-manager.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										102
									
								
								node_modules/less/lib/less-browser/file-manager.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,102 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var abstract_file_manager_js_1 = tslib_1.__importDefault(require("../less/environment/abstract-file-manager.js"));
 | 
			
		||||
var options;
 | 
			
		||||
var logger;
 | 
			
		||||
var fileCache = {};
 | 
			
		||||
// TODOS - move log somewhere. pathDiff and doing something similar in node. use pathDiff in the other browser file for the initial load
 | 
			
		||||
var FileManager = function () { };
 | 
			
		||||
FileManager.prototype = Object.assign(new abstract_file_manager_js_1.default(), {
 | 
			
		||||
    alwaysMakePathsAbsolute: function () {
 | 
			
		||||
        return true;
 | 
			
		||||
    },
 | 
			
		||||
    join: function (basePath, laterPath) {
 | 
			
		||||
        if (!basePath) {
 | 
			
		||||
            return laterPath;
 | 
			
		||||
        }
 | 
			
		||||
        return this.extractUrlParts(laterPath, basePath).path;
 | 
			
		||||
    },
 | 
			
		||||
    doXHR: function (url, type, callback, errback) {
 | 
			
		||||
        var xhr = new XMLHttpRequest();
 | 
			
		||||
        var async = options.isFileProtocol ? options.fileAsync : true;
 | 
			
		||||
        if (typeof xhr.overrideMimeType === 'function') {
 | 
			
		||||
            xhr.overrideMimeType('text/css');
 | 
			
		||||
        }
 | 
			
		||||
        logger.debug("XHR: Getting '" + url + "'");
 | 
			
		||||
        xhr.open('GET', url, async);
 | 
			
		||||
        xhr.setRequestHeader('Accept', type || 'text/x-less, text/css; q=0.9, */*; q=0.5');
 | 
			
		||||
        xhr.send(null);
 | 
			
		||||
        function handleResponse(xhr, callback, errback) {
 | 
			
		||||
            if (xhr.status >= 200 && xhr.status < 300) {
 | 
			
		||||
                callback(xhr.responseText, xhr.getResponseHeader('Last-Modified'));
 | 
			
		||||
            }
 | 
			
		||||
            else if (typeof errback === 'function') {
 | 
			
		||||
                errback(xhr.status, url);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        if (options.isFileProtocol && !options.fileAsync) {
 | 
			
		||||
            if (xhr.status === 0 || (xhr.status >= 200 && xhr.status < 300)) {
 | 
			
		||||
                callback(xhr.responseText);
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                errback(xhr.status, url);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else if (async) {
 | 
			
		||||
            xhr.onreadystatechange = function () {
 | 
			
		||||
                if (xhr.readyState == 4) {
 | 
			
		||||
                    handleResponse(xhr, callback, errback);
 | 
			
		||||
                }
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            handleResponse(xhr, callback, errback);
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    supports: function () {
 | 
			
		||||
        return true;
 | 
			
		||||
    },
 | 
			
		||||
    clearFileCache: function () {
 | 
			
		||||
        fileCache = {};
 | 
			
		||||
    },
 | 
			
		||||
    loadFile: function (filename, currentDirectory, options) {
 | 
			
		||||
        // TODO: Add prefix support like less-node?
 | 
			
		||||
        // What about multiple paths?
 | 
			
		||||
        if (currentDirectory && !this.isPathAbsolute(filename)) {
 | 
			
		||||
            filename = currentDirectory + filename;
 | 
			
		||||
        }
 | 
			
		||||
        filename = options.ext ? this.tryAppendExtension(filename, options.ext) : filename;
 | 
			
		||||
        options = options || {};
 | 
			
		||||
        // sheet may be set to the stylesheet for the initial load or a collection of properties including
 | 
			
		||||
        // some context variables for imports
 | 
			
		||||
        var hrefParts = this.extractUrlParts(filename, window.location.href);
 | 
			
		||||
        var href = hrefParts.url;
 | 
			
		||||
        var self = this;
 | 
			
		||||
        return new Promise(function (resolve, reject) {
 | 
			
		||||
            if (options.useFileCache && fileCache[href]) {
 | 
			
		||||
                try {
 | 
			
		||||
                    var lessText = fileCache[href];
 | 
			
		||||
                    return resolve({ contents: lessText, filename: href, webInfo: { lastModified: new Date() } });
 | 
			
		||||
                }
 | 
			
		||||
                catch (e) {
 | 
			
		||||
                    return reject({ filename: href, message: "Error loading file " + href + " error was " + e.message });
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            self.doXHR(href, options.mime, function doXHRCallback(data, lastModified) {
 | 
			
		||||
                // per file cache
 | 
			
		||||
                fileCache[href] = data;
 | 
			
		||||
                // Use remote copy (re-parse)
 | 
			
		||||
                resolve({ contents: data, filename: href, webInfo: { lastModified: lastModified } });
 | 
			
		||||
            }, function doXHRError(status, url) {
 | 
			
		||||
                reject({ type: 'File', message: "'" + url + "' wasn't found (" + status + ")", href: href });
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
exports.default = (function (opts, log) {
 | 
			
		||||
    options = opts;
 | 
			
		||||
    logger = log;
 | 
			
		||||
    return FileManager;
 | 
			
		||||
});
 | 
			
		||||
//# sourceMappingURL=file-manager.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-browser/file-manager.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-browser/file-manager.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										28
									
								
								node_modules/less/lib/less-browser/image-size.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								node_modules/less/lib/less-browser/image-size.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,28 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var function_registry_1 = tslib_1.__importDefault(require("./../less/functions/function-registry"));
 | 
			
		||||
exports.default = (function () {
 | 
			
		||||
    function imageSize() {
 | 
			
		||||
        throw {
 | 
			
		||||
            type: 'Runtime',
 | 
			
		||||
            message: 'Image size functions are not supported in browser version of less'
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
    var imageFunctions = {
 | 
			
		||||
        'image-size': function (filePathNode) {
 | 
			
		||||
            imageSize(this, filePathNode);
 | 
			
		||||
            return -1;
 | 
			
		||||
        },
 | 
			
		||||
        'image-width': function (filePathNode) {
 | 
			
		||||
            imageSize(this, filePathNode);
 | 
			
		||||
            return -1;
 | 
			
		||||
        },
 | 
			
		||||
        'image-height': function (filePathNode) {
 | 
			
		||||
            imageSize(this, filePathNode);
 | 
			
		||||
            return -1;
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
    function_registry_1.default.addMultiple(imageFunctions);
 | 
			
		||||
});
 | 
			
		||||
//# sourceMappingURL=image-size.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-browser/image-size.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-browser/image-size.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"image-size.js","sourceRoot":"","sources":["../../src/less-browser/image-size.js"],"names":[],"mappings":";;;AACA,oGAAqE;AAErE,mBAAe;IACX,SAAS,SAAS;QACd,MAAM;YACF,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,mEAAmE;SAC/E,CAAC;IACN,CAAC;IAED,IAAM,cAAc,GAAG;QACnB,YAAY,EAAE,UAAS,YAAY;YAC/B,SAAS,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;YAC9B,OAAO,CAAC,CAAC,CAAC;QACd,CAAC;QACD,aAAa,EAAE,UAAS,YAAY;YAChC,SAAS,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;YAC9B,OAAO,CAAC,CAAC,CAAC;QACd,CAAC;QACD,cAAc,EAAE,UAAS,YAAY;YACjC,SAAS,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;YAC9B,OAAO,CAAC,CAAC,CAAC;QACd,CAAC;KACJ,CAAC;IAEF,2BAAgB,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;AACjD,CAAC,EAAC","sourcesContent":["\nimport functionRegistry from './../less/functions/function-registry';\n\nexport default () => {\n    function imageSize() {\n        throw {\n            type: 'Runtime',\n            message: 'Image size functions are not supported in browser version of less'\n        };\n    }\n\n    const imageFunctions = {\n        'image-size': function(filePathNode) {\n            imageSize(this, filePathNode);\n            return -1;\n        },\n        'image-width': function(filePathNode) {\n            imageSize(this, filePathNode);\n            return -1;\n        },\n        'image-height': function(filePathNode) {\n            imageSize(this, filePathNode);\n            return -1;\n        }\n    };\n\n    functionRegistry.addMultiple(imageFunctions);\n};\n"]}
 | 
			
		||||
							
								
								
									
										258
									
								
								node_modules/less/lib/less-browser/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										258
									
								
								node_modules/less/lib/less-browser/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,258 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
//
 | 
			
		||||
// index.js
 | 
			
		||||
// Should expose the additional browser functions on to the less object
 | 
			
		||||
//
 | 
			
		||||
var utils_1 = require("./utils");
 | 
			
		||||
var less_1 = tslib_1.__importDefault(require("../less"));
 | 
			
		||||
var browser_1 = tslib_1.__importDefault(require("./browser"));
 | 
			
		||||
var file_manager_1 = tslib_1.__importDefault(require("./file-manager"));
 | 
			
		||||
var plugin_loader_1 = tslib_1.__importDefault(require("./plugin-loader"));
 | 
			
		||||
var log_listener_1 = tslib_1.__importDefault(require("./log-listener"));
 | 
			
		||||
var error_reporting_1 = tslib_1.__importDefault(require("./error-reporting"));
 | 
			
		||||
var cache_1 = tslib_1.__importDefault(require("./cache"));
 | 
			
		||||
var image_size_1 = tslib_1.__importDefault(require("./image-size"));
 | 
			
		||||
exports.default = (function (window, options) {
 | 
			
		||||
    var document = window.document;
 | 
			
		||||
    var less = less_1.default();
 | 
			
		||||
    less.options = options;
 | 
			
		||||
    var environment = less.environment;
 | 
			
		||||
    var FileManager = file_manager_1.default(options, less.logger);
 | 
			
		||||
    var fileManager = new FileManager();
 | 
			
		||||
    environment.addFileManager(fileManager);
 | 
			
		||||
    less.FileManager = FileManager;
 | 
			
		||||
    less.PluginLoader = plugin_loader_1.default;
 | 
			
		||||
    log_listener_1.default(less, options);
 | 
			
		||||
    var errors = error_reporting_1.default(window, less, options);
 | 
			
		||||
    var cache = less.cache = options.cache || cache_1.default(window, options, less.logger);
 | 
			
		||||
    image_size_1.default(less.environment);
 | 
			
		||||
    // Setup user functions - Deprecate?
 | 
			
		||||
    if (options.functions) {
 | 
			
		||||
        less.functions.functionRegistry.addMultiple(options.functions);
 | 
			
		||||
    }
 | 
			
		||||
    var typePattern = /^text\/(x-)?less$/;
 | 
			
		||||
    function clone(obj) {
 | 
			
		||||
        var cloned = {};
 | 
			
		||||
        for (var prop in obj) {
 | 
			
		||||
            if (Object.prototype.hasOwnProperty.call(obj, prop)) {
 | 
			
		||||
                cloned[prop] = obj[prop];
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return cloned;
 | 
			
		||||
    }
 | 
			
		||||
    // only really needed for phantom
 | 
			
		||||
    function bind(func, thisArg) {
 | 
			
		||||
        var curryArgs = Array.prototype.slice.call(arguments, 2);
 | 
			
		||||
        return function () {
 | 
			
		||||
            var args = curryArgs.concat(Array.prototype.slice.call(arguments, 0));
 | 
			
		||||
            return func.apply(thisArg, args);
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
    function loadStyles(modifyVars) {
 | 
			
		||||
        var styles = document.getElementsByTagName('style');
 | 
			
		||||
        var style;
 | 
			
		||||
        for (var i = 0; i < styles.length; i++) {
 | 
			
		||||
            style = styles[i];
 | 
			
		||||
            if (style.type.match(typePattern)) {
 | 
			
		||||
                var instanceOptions = clone(options);
 | 
			
		||||
                instanceOptions.modifyVars = modifyVars;
 | 
			
		||||
                var lessText = style.innerHTML || '';
 | 
			
		||||
                instanceOptions.filename = document.location.href.replace(/#.*$/, '');
 | 
			
		||||
                /* jshint loopfunc:true */
 | 
			
		||||
                // use closure to store current style
 | 
			
		||||
                less.render(lessText, instanceOptions, bind(function (style, e, result) {
 | 
			
		||||
                    if (e) {
 | 
			
		||||
                        errors.add(e, 'inline');
 | 
			
		||||
                    }
 | 
			
		||||
                    else {
 | 
			
		||||
                        style.type = 'text/css';
 | 
			
		||||
                        if (style.styleSheet) {
 | 
			
		||||
                            style.styleSheet.cssText = result.css;
 | 
			
		||||
                        }
 | 
			
		||||
                        else {
 | 
			
		||||
                            style.innerHTML = result.css;
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                }, null, style));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    function loadStyleSheet(sheet, callback, reload, remaining, modifyVars) {
 | 
			
		||||
        var instanceOptions = clone(options);
 | 
			
		||||
        utils_1.addDataAttr(instanceOptions, sheet);
 | 
			
		||||
        instanceOptions.mime = sheet.type;
 | 
			
		||||
        if (modifyVars) {
 | 
			
		||||
            instanceOptions.modifyVars = modifyVars;
 | 
			
		||||
        }
 | 
			
		||||
        function loadInitialFileCallback(loadedFile) {
 | 
			
		||||
            var data = loadedFile.contents;
 | 
			
		||||
            var path = loadedFile.filename;
 | 
			
		||||
            var webInfo = loadedFile.webInfo;
 | 
			
		||||
            var newFileInfo = {
 | 
			
		||||
                currentDirectory: fileManager.getPath(path),
 | 
			
		||||
                filename: path,
 | 
			
		||||
                rootFilename: path,
 | 
			
		||||
                rewriteUrls: instanceOptions.rewriteUrls
 | 
			
		||||
            };
 | 
			
		||||
            newFileInfo.entryPath = newFileInfo.currentDirectory;
 | 
			
		||||
            newFileInfo.rootpath = instanceOptions.rootpath || newFileInfo.currentDirectory;
 | 
			
		||||
            if (webInfo) {
 | 
			
		||||
                webInfo.remaining = remaining;
 | 
			
		||||
                var css = cache.getCSS(path, webInfo, instanceOptions.modifyVars);
 | 
			
		||||
                if (!reload && css) {
 | 
			
		||||
                    webInfo.local = true;
 | 
			
		||||
                    callback(null, css, data, sheet, webInfo, path);
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            // TODO add tests around how this behaves when reloading
 | 
			
		||||
            errors.remove(path);
 | 
			
		||||
            instanceOptions.rootFileInfo = newFileInfo;
 | 
			
		||||
            less.render(data, instanceOptions, function (e, result) {
 | 
			
		||||
                if (e) {
 | 
			
		||||
                    e.href = path;
 | 
			
		||||
                    callback(e);
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    cache.setCSS(sheet.href, webInfo.lastModified, instanceOptions.modifyVars, result.css);
 | 
			
		||||
                    callback(null, result.css, data, sheet, webInfo, path);
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
        fileManager.loadFile(sheet.href, null, instanceOptions, environment)
 | 
			
		||||
            .then(function (loadedFile) {
 | 
			
		||||
            loadInitialFileCallback(loadedFile);
 | 
			
		||||
        }).catch(function (err) {
 | 
			
		||||
            console.log(err);
 | 
			
		||||
            callback(err);
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
    function loadStyleSheets(callback, reload, modifyVars) {
 | 
			
		||||
        for (var i = 0; i < less.sheets.length; i++) {
 | 
			
		||||
            loadStyleSheet(less.sheets[i], callback, reload, less.sheets.length - (i + 1), modifyVars);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    function initRunningMode() {
 | 
			
		||||
        if (less.env === 'development') {
 | 
			
		||||
            less.watchTimer = setInterval(function () {
 | 
			
		||||
                if (less.watchMode) {
 | 
			
		||||
                    fileManager.clearFileCache();
 | 
			
		||||
                    /**
 | 
			
		||||
                     * @todo remove when this is typed with JSDoc
 | 
			
		||||
                     */
 | 
			
		||||
                    // eslint-disable-next-line no-unused-vars
 | 
			
		||||
                    loadStyleSheets(function (e, css, _, sheet, webInfo) {
 | 
			
		||||
                        if (e) {
 | 
			
		||||
                            errors.add(e, e.href || sheet.href);
 | 
			
		||||
                        }
 | 
			
		||||
                        else if (css) {
 | 
			
		||||
                            browser_1.default.createCSS(window.document, css, sheet);
 | 
			
		||||
                        }
 | 
			
		||||
                    });
 | 
			
		||||
                }
 | 
			
		||||
            }, options.poll);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    //
 | 
			
		||||
    // Watch mode
 | 
			
		||||
    //
 | 
			
		||||
    less.watch = function () {
 | 
			
		||||
        if (!less.watchMode) {
 | 
			
		||||
            less.env = 'development';
 | 
			
		||||
            initRunningMode();
 | 
			
		||||
        }
 | 
			
		||||
        this.watchMode = true;
 | 
			
		||||
        return true;
 | 
			
		||||
    };
 | 
			
		||||
    less.unwatch = function () { clearInterval(less.watchTimer); this.watchMode = false; return false; };
 | 
			
		||||
    //
 | 
			
		||||
    // Synchronously get all <link> tags with the 'rel' attribute set to
 | 
			
		||||
    // "stylesheet/less".
 | 
			
		||||
    //
 | 
			
		||||
    less.registerStylesheetsImmediately = function () {
 | 
			
		||||
        var links = document.getElementsByTagName('link');
 | 
			
		||||
        less.sheets = [];
 | 
			
		||||
        for (var i = 0; i < links.length; i++) {
 | 
			
		||||
            if (links[i].rel === 'stylesheet/less' || (links[i].rel.match(/stylesheet/) &&
 | 
			
		||||
                (links[i].type.match(typePattern)))) {
 | 
			
		||||
                less.sheets.push(links[i]);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
    //
 | 
			
		||||
    // Asynchronously get all <link> tags with the 'rel' attribute set to
 | 
			
		||||
    // "stylesheet/less", returning a Promise.
 | 
			
		||||
    //
 | 
			
		||||
    less.registerStylesheets = function () { return new Promise(function (resolve) {
 | 
			
		||||
        less.registerStylesheetsImmediately();
 | 
			
		||||
        resolve();
 | 
			
		||||
    }); };
 | 
			
		||||
    //
 | 
			
		||||
    // With this function, it's possible to alter variables and re-render
 | 
			
		||||
    // CSS without reloading less-files
 | 
			
		||||
    //
 | 
			
		||||
    less.modifyVars = function (record) { return less.refresh(true, record, false); };
 | 
			
		||||
    less.refresh = function (reload, modifyVars, clearFileCache) {
 | 
			
		||||
        if ((reload || clearFileCache) && clearFileCache !== false) {
 | 
			
		||||
            fileManager.clearFileCache();
 | 
			
		||||
        }
 | 
			
		||||
        return new Promise(function (resolve, reject) {
 | 
			
		||||
            var startTime;
 | 
			
		||||
            var endTime;
 | 
			
		||||
            var totalMilliseconds;
 | 
			
		||||
            var remainingSheets;
 | 
			
		||||
            startTime = endTime = new Date();
 | 
			
		||||
            // Set counter for remaining unprocessed sheets
 | 
			
		||||
            remainingSheets = less.sheets.length;
 | 
			
		||||
            if (remainingSheets === 0) {
 | 
			
		||||
                endTime = new Date();
 | 
			
		||||
                totalMilliseconds = endTime - startTime;
 | 
			
		||||
                less.logger.info('Less has finished and no sheets were loaded.');
 | 
			
		||||
                resolve({
 | 
			
		||||
                    startTime: startTime,
 | 
			
		||||
                    endTime: endTime,
 | 
			
		||||
                    totalMilliseconds: totalMilliseconds,
 | 
			
		||||
                    sheets: less.sheets.length
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                // Relies on less.sheets array, callback seems to be guaranteed to be called for every element of the array
 | 
			
		||||
                loadStyleSheets(function (e, css, _, sheet, webInfo) {
 | 
			
		||||
                    if (e) {
 | 
			
		||||
                        errors.add(e, e.href || sheet.href);
 | 
			
		||||
                        reject(e);
 | 
			
		||||
                        return;
 | 
			
		||||
                    }
 | 
			
		||||
                    if (webInfo.local) {
 | 
			
		||||
                        less.logger.info("Loading " + sheet.href + " from cache.");
 | 
			
		||||
                    }
 | 
			
		||||
                    else {
 | 
			
		||||
                        less.logger.info("Rendered " + sheet.href + " successfully.");
 | 
			
		||||
                    }
 | 
			
		||||
                    browser_1.default.createCSS(window.document, css, sheet);
 | 
			
		||||
                    less.logger.info("CSS for " + sheet.href + " generated in " + (new Date() - endTime) + "ms");
 | 
			
		||||
                    // Count completed sheet
 | 
			
		||||
                    remainingSheets--;
 | 
			
		||||
                    // Check if the last remaining sheet was processed and then call the promise
 | 
			
		||||
                    if (remainingSheets === 0) {
 | 
			
		||||
                        totalMilliseconds = new Date() - startTime;
 | 
			
		||||
                        less.logger.info("Less has finished. CSS generated in " + totalMilliseconds + "ms");
 | 
			
		||||
                        resolve({
 | 
			
		||||
                            startTime: startTime,
 | 
			
		||||
                            endTime: endTime,
 | 
			
		||||
                            totalMilliseconds: totalMilliseconds,
 | 
			
		||||
                            sheets: less.sheets.length
 | 
			
		||||
                        });
 | 
			
		||||
                    }
 | 
			
		||||
                    endTime = new Date();
 | 
			
		||||
                }, reload, modifyVars);
 | 
			
		||||
            }
 | 
			
		||||
            loadStyles(modifyVars);
 | 
			
		||||
        });
 | 
			
		||||
    };
 | 
			
		||||
    less.refreshStyles = loadStyles;
 | 
			
		||||
    return less;
 | 
			
		||||
});
 | 
			
		||||
//# sourceMappingURL=index.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-browser/index.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-browser/index.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										43
									
								
								node_modules/less/lib/less-browser/log-listener.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								node_modules/less/lib/less-browser/log-listener.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,43 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
exports.default = (function (less, options) {
 | 
			
		||||
    var logLevel_debug = 4;
 | 
			
		||||
    var logLevel_info = 3;
 | 
			
		||||
    var logLevel_warn = 2;
 | 
			
		||||
    var logLevel_error = 1;
 | 
			
		||||
    // The amount of logging in the javascript console.
 | 
			
		||||
    // 3 - Debug, information and errors
 | 
			
		||||
    // 2 - Information and errors
 | 
			
		||||
    // 1 - Errors
 | 
			
		||||
    // 0 - None
 | 
			
		||||
    // Defaults to 2
 | 
			
		||||
    options.logLevel = typeof options.logLevel !== 'undefined' ? options.logLevel : (options.env === 'development' ? logLevel_info : logLevel_error);
 | 
			
		||||
    if (!options.loggers) {
 | 
			
		||||
        options.loggers = [{
 | 
			
		||||
                debug: function (msg) {
 | 
			
		||||
                    if (options.logLevel >= logLevel_debug) {
 | 
			
		||||
                        console.log(msg);
 | 
			
		||||
                    }
 | 
			
		||||
                },
 | 
			
		||||
                info: function (msg) {
 | 
			
		||||
                    if (options.logLevel >= logLevel_info) {
 | 
			
		||||
                        console.log(msg);
 | 
			
		||||
                    }
 | 
			
		||||
                },
 | 
			
		||||
                warn: function (msg) {
 | 
			
		||||
                    if (options.logLevel >= logLevel_warn) {
 | 
			
		||||
                        console.warn(msg);
 | 
			
		||||
                    }
 | 
			
		||||
                },
 | 
			
		||||
                error: function (msg) {
 | 
			
		||||
                    if (options.logLevel >= logLevel_error) {
 | 
			
		||||
                        console.error(msg);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }];
 | 
			
		||||
    }
 | 
			
		||||
    for (var i = 0; i < options.loggers.length; i++) {
 | 
			
		||||
        less.logger.addListener(options.loggers[i]);
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
//# sourceMappingURL=log-listener.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-browser/log-listener.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-browser/log-listener.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"log-listener.js","sourceRoot":"","sources":["../../src/less-browser/log-listener.js"],"names":[],"mappings":";;AAAA,mBAAe,UAAC,IAAI,EAAE,OAAO;IACzB,IAAM,cAAc,GAAG,CAAC,CAAC;IACzB,IAAM,aAAa,GAAG,CAAC,CAAC;IACxB,IAAM,aAAa,GAAG,CAAC,CAAC;IACxB,IAAM,cAAc,GAAG,CAAC,CAAC;IAEzB,mDAAmD;IACnD,oCAAoC;IACpC,6BAA6B;IAC7B,aAAa;IACb,WAAW;IACX,gBAAgB;IAChB,OAAO,CAAC,QAAQ,GAAG,OAAO,OAAO,CAAC,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,KAAK,aAAa,CAAC,CAAC,CAAE,aAAa,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;IAElJ,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;QAClB,OAAO,CAAC,OAAO,GAAG,CAAC;gBACf,KAAK,EAAE,UAAS,GAAG;oBACf,IAAI,OAAO,CAAC,QAAQ,IAAI,cAAc,EAAE;wBACpC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;qBACpB;gBACL,CAAC;gBACD,IAAI,EAAE,UAAS,GAAG;oBACd,IAAI,OAAO,CAAC,QAAQ,IAAI,aAAa,EAAE;wBACnC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;qBACpB;gBACL,CAAC;gBACD,IAAI,EAAE,UAAS,GAAG;oBACd,IAAI,OAAO,CAAC,QAAQ,IAAI,aAAa,EAAE;wBACnC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;qBACrB;gBACL,CAAC;gBACD,KAAK,EAAE,UAAS,GAAG;oBACf,IAAI,OAAO,CAAC,QAAQ,IAAI,cAAc,EAAE;wBACpC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;qBACtB;gBACL,CAAC;aACJ,CAAC,CAAC;KACN;IACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC7C,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;KAC/C;AACL,CAAC,EAAC","sourcesContent":["export default (less, options) => {\n    const logLevel_debug = 4;\n    const logLevel_info = 3;\n    const logLevel_warn = 2;\n    const logLevel_error = 1;\n\n    // The amount of logging in the javascript console.\n    // 3 - Debug, information and errors\n    // 2 - Information and errors\n    // 1 - Errors\n    // 0 - None\n    // Defaults to 2\n    options.logLevel = typeof options.logLevel !== 'undefined' ? options.logLevel : (options.env === 'development' ?  logLevel_info : logLevel_error);\n\n    if (!options.loggers) {\n        options.loggers = [{\n            debug: function(msg) {\n                if (options.logLevel >= logLevel_debug) {\n                    console.log(msg);\n                }\n            },\n            info: function(msg) {\n                if (options.logLevel >= logLevel_info) {\n                    console.log(msg);\n                }\n            },\n            warn: function(msg) {\n                if (options.logLevel >= logLevel_warn) {\n                    console.warn(msg);\n                }\n            },\n            error: function(msg) {\n                if (options.logLevel >= logLevel_error) {\n                    console.error(msg);\n                }\n            }\n        }];\n    }\n    for (let i = 0; i < options.loggers.length; i++) {\n        less.logger.addListener(options.loggers[i]);\n    }\n};\n"]}
 | 
			
		||||
							
								
								
									
										24
									
								
								node_modules/less/lib/less-browser/plugin-loader.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								node_modules/less/lib/less-browser/plugin-loader.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,24 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
/**
 | 
			
		||||
 * @todo Add tests for browser `@plugin`
 | 
			
		||||
 */
 | 
			
		||||
var abstract_plugin_loader_js_1 = tslib_1.__importDefault(require("../less/environment/abstract-plugin-loader.js"));
 | 
			
		||||
/**
 | 
			
		||||
 * Browser Plugin Loader
 | 
			
		||||
 */
 | 
			
		||||
var PluginLoader = function (less) {
 | 
			
		||||
    this.less = less;
 | 
			
		||||
    // Should we shim this.require for browser? Probably not?
 | 
			
		||||
};
 | 
			
		||||
PluginLoader.prototype = Object.assign(new abstract_plugin_loader_js_1.default(), {
 | 
			
		||||
    loadPlugin: function (filename, basePath, context, environment, fileManager) {
 | 
			
		||||
        return new Promise(function (fulfill, reject) {
 | 
			
		||||
            fileManager.loadFile(filename, basePath, context, environment)
 | 
			
		||||
                .then(fulfill).catch(reject);
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
exports.default = PluginLoader;
 | 
			
		||||
//# sourceMappingURL=plugin-loader.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-browser/plugin-loader.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-browser/plugin-loader.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"plugin-loader.js","sourceRoot":"","sources":["../../src/less-browser/plugin-loader.js"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,oHAAiF;AAEjF;;GAEG;AACH,IAAM,YAAY,GAAG,UAAS,IAAI;IAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,yDAAyD;AAC7D,CAAC,CAAC;AAEF,YAAY,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,mCAAoB,EAAE,EAAE;IAC/D,UAAU,YAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW;QAC5D,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;YAC/B,WAAW,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,CAAC;iBACzD,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAC,CAAC;AAEH,kBAAe,YAAY,CAAC","sourcesContent":["/**\n * @todo Add tests for browser `@plugin`\n */\nimport AbstractPluginLoader from '../less/environment/abstract-plugin-loader.js';\n\n/**\n * Browser Plugin Loader\n */\nconst PluginLoader = function(less) {\n    this.less = less;\n    // Should we shim this.require for browser? Probably not?\n};\n\nPluginLoader.prototype = Object.assign(new AbstractPluginLoader(), {\n    loadPlugin(filename, basePath, context, environment, fileManager) {\n        return new Promise((fulfill, reject) => {\n            fileManager.loadFile(filename, basePath, context, environment)\n                .then(fulfill).catch(reject);\n        });\n    }\n});\n\nexport default PluginLoader;\n\n"]}
 | 
			
		||||
							
								
								
									
										32
									
								
								node_modules/less/lib/less-browser/utils.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								node_modules/less/lib/less-browser/utils.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,32 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
exports.addDataAttr = exports.extractId = void 0;
 | 
			
		||||
function extractId(href) {
 | 
			
		||||
    return href.replace(/^[a-z-]+:\/+?[^/]+/, '') // Remove protocol & domain
 | 
			
		||||
        .replace(/[?&]livereload=\w+/, '') // Remove LiveReload cachebuster
 | 
			
		||||
        .replace(/^\//, '') // Remove root /
 | 
			
		||||
        .replace(/\.[a-zA-Z]+$/, '') // Remove simple extension
 | 
			
		||||
        .replace(/[^.\w-]+/g, '-') // Replace illegal characters
 | 
			
		||||
        .replace(/\./g, ':'); // Replace dots with colons(for valid id)
 | 
			
		||||
}
 | 
			
		||||
exports.extractId = extractId;
 | 
			
		||||
function addDataAttr(options, tag) {
 | 
			
		||||
    if (!tag) {
 | 
			
		||||
        return;
 | 
			
		||||
    } // in case of tag is null or undefined
 | 
			
		||||
    for (var opt in tag.dataset) {
 | 
			
		||||
        if (Object.prototype.hasOwnProperty.call(tag.dataset, opt)) {
 | 
			
		||||
            if (opt === 'env' || opt === 'dumpLineNumbers' || opt === 'rootpath' || opt === 'errorReporting') {
 | 
			
		||||
                options[opt] = tag.dataset[opt];
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                try {
 | 
			
		||||
                    options[opt] = JSON.parse(tag.dataset[opt]);
 | 
			
		||||
                }
 | 
			
		||||
                catch (_) { }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
exports.addDataAttr = addDataAttr;
 | 
			
		||||
//# sourceMappingURL=utils.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-browser/utils.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-browser/utils.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/less-browser/utils.js"],"names":[],"mappings":";;;AACA,SAAgB,SAAS,CAAC,IAAI;IAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAE,2BAA2B;SACrE,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAQ,gCAAgC;SACzE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAyB,gBAAgB;SAC3D,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAgB,0BAA0B;SACrE,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,CAAiB,6BAA6B;SACvE,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAuB,yCAAyC;AAC7F,CAAC;AAPD,8BAOC;AAED,SAAgB,WAAW,CAAC,OAAO,EAAE,GAAG;IACpC,IAAI,CAAC,GAAG,EAAE;QAAC,OAAO;KAAC,CAAC,sCAAsC;IAC1D,KAAK,IAAM,GAAG,IAAI,GAAG,CAAC,OAAO,EAAE;QAC3B,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE;YACxD,IAAI,GAAG,KAAK,KAAK,IAAI,GAAG,KAAK,iBAAiB,IAAI,GAAG,KAAK,UAAU,IAAI,GAAG,KAAK,gBAAgB,EAAE;gBAC9F,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;aACnC;iBAAM;gBACH,IAAI;oBACA,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;iBAC/C;gBACD,OAAO,CAAC,EAAE,GAAE;aACf;SACJ;KACJ;AACL,CAAC;AAdD,kCAcC","sourcesContent":["\nexport function extractId(href) {\n    return href.replace(/^[a-z-]+:\\/+?[^/]+/, '')  // Remove protocol & domain\n        .replace(/[?&]livereload=\\w+/, '')        // Remove LiveReload cachebuster\n        .replace(/^\\//, '')                         // Remove root /\n        .replace(/\\.[a-zA-Z]+$/, '')                // Remove simple extension\n        .replace(/[^.\\w-]+/g, '-')                 // Replace illegal characters\n        .replace(/\\./g, ':');                       // Replace dots with colons(for valid id)\n}\n\nexport function addDataAttr(options, tag) {\n    if (!tag) {return;} // in case of tag is null or undefined\n    for (const opt in tag.dataset) {\n        if (Object.prototype.hasOwnProperty.call(tag.dataset, opt)) {\n            if (opt === 'env' || opt === 'dumpLineNumbers' || opt === 'rootpath' || opt === 'errorReporting') {\n                options[opt] = tag.dataset[opt];\n            } else {\n                try {\n                    options[opt] = JSON.parse(tag.dataset[opt]);\n                }\n                catch (_) {}\n            }\n        }\n    }\n}\n"]}
 | 
			
		||||
							
								
								
									
										19
									
								
								node_modules/less/lib/less-node/environment.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								node_modules/less/lib/less-node/environment.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,19 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
exports.default = {
 | 
			
		||||
    encodeBase64: function encodeBase64(str) {
 | 
			
		||||
        // Avoid Buffer constructor on newer versions of Node.js.
 | 
			
		||||
        var buffer = (Buffer.from ? Buffer.from(str) : (new Buffer(str)));
 | 
			
		||||
        return buffer.toString('base64');
 | 
			
		||||
    },
 | 
			
		||||
    mimeLookup: function (filename) {
 | 
			
		||||
        return require('mime').lookup(filename);
 | 
			
		||||
    },
 | 
			
		||||
    charsetLookup: function (mime) {
 | 
			
		||||
        return require('mime').charsets.lookup(mime);
 | 
			
		||||
    },
 | 
			
		||||
    getSourceMapGenerator: function getSourceMapGenerator() {
 | 
			
		||||
        return require('source-map').SourceMapGenerator;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
//# sourceMappingURL=environment.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-node/environment.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-node/environment.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/less-node/environment.js"],"names":[],"mappings":";;AAAA,kBAAe;IACX,YAAY,EAAE,SAAS,YAAY,CAAC,GAAG;QACnC,yDAAyD;QACzD,IAAM,MAAM,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACpE,OAAO,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IACD,UAAU,EAAE,UAAU,QAAQ;QAC1B,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC5C,CAAC;IACD,aAAa,EAAE,UAAU,IAAI;QACzB,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IACD,qBAAqB,EAAE,SAAS,qBAAqB;QACjD,OAAO,OAAO,CAAC,YAAY,CAAC,CAAC,kBAAkB,CAAC;IACpD,CAAC;CACJ,CAAC","sourcesContent":["export default {\n    encodeBase64: function encodeBase64(str) {\n        // Avoid Buffer constructor on newer versions of Node.js.\n        const buffer = (Buffer.from ? Buffer.from(str) : (new Buffer(str)));\n        return buffer.toString('base64');\n    },\n    mimeLookup: function (filename) {\n        return require('mime').lookup(filename);\n    },\n    charsetLookup: function (mime) {\n        return require('mime').charsets.lookup(mime);\n    },\n    getSourceMapGenerator: function getSourceMapGenerator() {\n        return require('source-map').SourceMapGenerator;\n    }\n};\n"]}
 | 
			
		||||
							
								
								
									
										139
									
								
								node_modules/less/lib/less-node/file-manager.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										139
									
								
								node_modules/less/lib/less-node/file-manager.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,139 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var path_1 = tslib_1.__importDefault(require("path"));
 | 
			
		||||
var fs_1 = tslib_1.__importDefault(require("./fs"));
 | 
			
		||||
var abstract_file_manager_js_1 = tslib_1.__importDefault(require("../less/environment/abstract-file-manager.js"));
 | 
			
		||||
var FileManager = function () { };
 | 
			
		||||
FileManager.prototype = Object.assign(new abstract_file_manager_js_1.default(), {
 | 
			
		||||
    supports: function () {
 | 
			
		||||
        return true;
 | 
			
		||||
    },
 | 
			
		||||
    supportsSync: function () {
 | 
			
		||||
        return true;
 | 
			
		||||
    },
 | 
			
		||||
    loadFile: function (filename, currentDirectory, options, environment, callback) {
 | 
			
		||||
        var fullFilename;
 | 
			
		||||
        var isAbsoluteFilename = this.isPathAbsolute(filename);
 | 
			
		||||
        var filenamesTried = [];
 | 
			
		||||
        var self = this;
 | 
			
		||||
        var prefix = filename.slice(0, 1);
 | 
			
		||||
        var explicit = prefix === '.' || prefix === '/';
 | 
			
		||||
        var result = null;
 | 
			
		||||
        var isNodeModule = false;
 | 
			
		||||
        var npmPrefix = 'npm://';
 | 
			
		||||
        options = options || {};
 | 
			
		||||
        var paths = isAbsoluteFilename ? [''] : [currentDirectory];
 | 
			
		||||
        if (options.paths) {
 | 
			
		||||
            paths.push.apply(paths, options.paths);
 | 
			
		||||
        }
 | 
			
		||||
        if (!isAbsoluteFilename && paths.indexOf('.') === -1) {
 | 
			
		||||
            paths.push('.');
 | 
			
		||||
        }
 | 
			
		||||
        var prefixes = options.prefixes || [''];
 | 
			
		||||
        var fileParts = this.extractUrlParts(filename);
 | 
			
		||||
        if (options.syncImport) {
 | 
			
		||||
            getFileData(returnData, returnData);
 | 
			
		||||
            if (callback) {
 | 
			
		||||
                callback(result.error, result);
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                return result;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            // promise is guaranteed to be asyncronous
 | 
			
		||||
            // which helps as it allows the file handle
 | 
			
		||||
            // to be closed before it continues with the next file
 | 
			
		||||
            return new Promise(getFileData);
 | 
			
		||||
        }
 | 
			
		||||
        function returnData(data) {
 | 
			
		||||
            if (!data.filename) {
 | 
			
		||||
                result = { error: data };
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                result = data;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        function getFileData(fulfill, reject) {
 | 
			
		||||
            (function tryPathIndex(i) {
 | 
			
		||||
                function tryWithExtension() {
 | 
			
		||||
                    var extFilename = options.ext ? self.tryAppendExtension(fullFilename, options.ext) : fullFilename;
 | 
			
		||||
                    if (extFilename !== fullFilename && !explicit && paths[i] === '.') {
 | 
			
		||||
                        try {
 | 
			
		||||
                            fullFilename = require.resolve(extFilename);
 | 
			
		||||
                            isNodeModule = true;
 | 
			
		||||
                        }
 | 
			
		||||
                        catch (e) {
 | 
			
		||||
                            filenamesTried.push(npmPrefix + extFilename);
 | 
			
		||||
                            fullFilename = extFilename;
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    else {
 | 
			
		||||
                        fullFilename = extFilename;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                if (i < paths.length) {
 | 
			
		||||
                    (function tryPrefix(j) {
 | 
			
		||||
                        if (j < prefixes.length) {
 | 
			
		||||
                            isNodeModule = false;
 | 
			
		||||
                            fullFilename = fileParts.rawPath + prefixes[j] + fileParts.filename;
 | 
			
		||||
                            if (paths[i]) {
 | 
			
		||||
                                fullFilename = path_1.default.join(paths[i], fullFilename);
 | 
			
		||||
                            }
 | 
			
		||||
                            if (!explicit && paths[i] === '.') {
 | 
			
		||||
                                try {
 | 
			
		||||
                                    fullFilename = require.resolve(fullFilename);
 | 
			
		||||
                                    isNodeModule = true;
 | 
			
		||||
                                }
 | 
			
		||||
                                catch (e) {
 | 
			
		||||
                                    filenamesTried.push(npmPrefix + fullFilename);
 | 
			
		||||
                                    tryWithExtension();
 | 
			
		||||
                                }
 | 
			
		||||
                            }
 | 
			
		||||
                            else {
 | 
			
		||||
                                tryWithExtension();
 | 
			
		||||
                            }
 | 
			
		||||
                            var readFileArgs = [fullFilename];
 | 
			
		||||
                            if (!options.rawBuffer) {
 | 
			
		||||
                                readFileArgs.push('utf-8');
 | 
			
		||||
                            }
 | 
			
		||||
                            if (options.syncImport) {
 | 
			
		||||
                                try {
 | 
			
		||||
                                    var data = fs_1.default.readFileSync.apply(this, readFileArgs);
 | 
			
		||||
                                    fulfill({ contents: data, filename: fullFilename });
 | 
			
		||||
                                }
 | 
			
		||||
                                catch (e) {
 | 
			
		||||
                                    filenamesTried.push(isNodeModule ? npmPrefix + fullFilename : fullFilename);
 | 
			
		||||
                                    return tryPrefix(j + 1);
 | 
			
		||||
                                }
 | 
			
		||||
                            }
 | 
			
		||||
                            else {
 | 
			
		||||
                                readFileArgs.push(function (e, data) {
 | 
			
		||||
                                    if (e) {
 | 
			
		||||
                                        filenamesTried.push(isNodeModule ? npmPrefix + fullFilename : fullFilename);
 | 
			
		||||
                                        return tryPrefix(j + 1);
 | 
			
		||||
                                    }
 | 
			
		||||
                                    fulfill({ contents: data, filename: fullFilename });
 | 
			
		||||
                                });
 | 
			
		||||
                                fs_1.default.readFile.apply(this, readFileArgs);
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                        else {
 | 
			
		||||
                            tryPathIndex(i + 1);
 | 
			
		||||
                        }
 | 
			
		||||
                    })(0);
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    reject({ type: 'File', message: "'" + filename + "' wasn't found. Tried - " + filenamesTried.join(',') });
 | 
			
		||||
                }
 | 
			
		||||
            }(0));
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    loadFileSync: function (filename, currentDirectory, options, environment) {
 | 
			
		||||
        options.syncImport = true;
 | 
			
		||||
        return this.loadFile(filename, currentDirectory, options, environment);
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
exports.default = FileManager;
 | 
			
		||||
//# sourceMappingURL=file-manager.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-node/file-manager.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-node/file-manager.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										11
									
								
								node_modules/less/lib/less-node/fs.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								node_modules/less/lib/less-node/fs.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var fs;
 | 
			
		||||
try {
 | 
			
		||||
    fs = require('graceful-fs');
 | 
			
		||||
}
 | 
			
		||||
catch (e) {
 | 
			
		||||
    fs = require('fs');
 | 
			
		||||
}
 | 
			
		||||
exports.default = fs;
 | 
			
		||||
//# sourceMappingURL=fs.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-node/fs.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-node/fs.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../../src/less-node/fs.js"],"names":[],"mappings":";;AAAA,IAAI,EAAE,CAAC;AACP,IACA;IACI,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CAC/B;AACD,OAAO,CAAC,EACR;IACI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtB;AACD,kBAAe,EAAE,CAAC","sourcesContent":["let fs;\ntry\n{\n    fs = require('graceful-fs');\n}\ncatch (e)\n{\n    fs = require('fs');\n}\nexport default fs;\n"]}
 | 
			
		||||
							
								
								
									
										50
									
								
								node_modules/less/lib/less-node/image-size.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								node_modules/less/lib/less-node/image-size.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,50 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var dimension_1 = tslib_1.__importDefault(require("../less/tree/dimension"));
 | 
			
		||||
var expression_1 = tslib_1.__importDefault(require("../less/tree/expression"));
 | 
			
		||||
var function_registry_1 = tslib_1.__importDefault(require("./../less/functions/function-registry"));
 | 
			
		||||
exports.default = (function (environment) {
 | 
			
		||||
    function imageSize(functionContext, filePathNode) {
 | 
			
		||||
        var filePath = filePathNode.value;
 | 
			
		||||
        var currentFileInfo = functionContext.currentFileInfo;
 | 
			
		||||
        var currentDirectory = currentFileInfo.rewriteUrls ?
 | 
			
		||||
            currentFileInfo.currentDirectory : currentFileInfo.entryPath;
 | 
			
		||||
        var fragmentStart = filePath.indexOf('#');
 | 
			
		||||
        if (fragmentStart !== -1) {
 | 
			
		||||
            filePath = filePath.slice(0, fragmentStart);
 | 
			
		||||
        }
 | 
			
		||||
        var fileManager = environment.getFileManager(filePath, currentDirectory, functionContext.context, environment, true);
 | 
			
		||||
        if (!fileManager) {
 | 
			
		||||
            throw {
 | 
			
		||||
                type: 'File',
 | 
			
		||||
                message: "Can not set up FileManager for " + filePathNode
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
        var fileSync = fileManager.loadFileSync(filePath, currentDirectory, functionContext.context, environment);
 | 
			
		||||
        if (fileSync.error) {
 | 
			
		||||
            throw fileSync.error;
 | 
			
		||||
        }
 | 
			
		||||
        var sizeOf = require('image-size');
 | 
			
		||||
        return sizeOf(fileSync.filename);
 | 
			
		||||
    }
 | 
			
		||||
    var imageFunctions = {
 | 
			
		||||
        'image-size': function (filePathNode) {
 | 
			
		||||
            var size = imageSize(this, filePathNode);
 | 
			
		||||
            return new expression_1.default([
 | 
			
		||||
                new dimension_1.default(size.width, 'px'),
 | 
			
		||||
                new dimension_1.default(size.height, 'px')
 | 
			
		||||
            ]);
 | 
			
		||||
        },
 | 
			
		||||
        'image-width': function (filePathNode) {
 | 
			
		||||
            var size = imageSize(this, filePathNode);
 | 
			
		||||
            return new dimension_1.default(size.width, 'px');
 | 
			
		||||
        },
 | 
			
		||||
        'image-height': function (filePathNode) {
 | 
			
		||||
            var size = imageSize(this, filePathNode);
 | 
			
		||||
            return new dimension_1.default(size.height, 'px');
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
    function_registry_1.default.addMultiple(imageFunctions);
 | 
			
		||||
});
 | 
			
		||||
//# sourceMappingURL=image-size.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-node/image-size.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-node/image-size.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"image-size.js","sourceRoot":"","sources":["../../src/less-node/image-size.js"],"names":[],"mappings":";;;AAAA,6EAA+C;AAC/C,+EAAiD;AACjD,oGAAqE;AAErE,mBAAe,UAAA,WAAW;IAEtB,SAAS,SAAS,CAAC,eAAe,EAAE,YAAY;QAC5C,IAAI,QAAQ,GAAG,YAAY,CAAC,KAAK,CAAC;QAClC,IAAM,eAAe,GAAG,eAAe,CAAC,eAAe,CAAC;QACxD,IAAM,gBAAgB,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;YAClD,eAAe,CAAC,gBAAgB,CAAC,CAAC,CAAC,eAAe,CAAC,SAAS,CAAC;QAEjE,IAAM,aAAa,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5C,IAAI,aAAa,KAAK,CAAC,CAAC,EAAE;YACtB,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;SAC/C;QAED,IAAM,WAAW,GAAG,WAAW,CAAC,cAAc,CAAC,QAAQ,EAAE,gBAAgB,EAAE,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;QAEvH,IAAI,CAAC,WAAW,EAAE;YACd,MAAM;gBACF,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,oCAAkC,YAAc;aAC5D,CAAC;SACL;QAED,IAAM,QAAQ,GAAG,WAAW,CAAC,YAAY,CAAC,QAAQ,EAAE,gBAAgB,EAAE,eAAe,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QAE5G,IAAI,QAAQ,CAAC,KAAK,EAAE;YAChB,MAAM,QAAQ,CAAC,KAAK,CAAC;SACxB;QAED,IAAM,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;QACrC,OAAO,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IAED,IAAM,cAAc,GAAG;QACnB,YAAY,EAAE,UAAS,YAAY;YAC/B,IAAM,IAAI,GAAG,SAAS,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;YAC3C,OAAO,IAAI,oBAAU,CAAC;gBAClB,IAAI,mBAAS,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC;gBAC/B,IAAI,mBAAS,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC;aACnC,CAAC,CAAC;QACP,CAAC;QACD,aAAa,EAAE,UAAS,YAAY;YAChC,IAAM,IAAI,GAAG,SAAS,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;YAC3C,OAAO,IAAI,mBAAS,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC3C,CAAC;QACD,cAAc,EAAE,UAAS,YAAY;YACjC,IAAM,IAAI,GAAG,SAAS,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;YAC3C,OAAO,IAAI,mBAAS,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC5C,CAAC;KACJ,CAAC;IAEF,2BAAgB,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;AACjD,CAAC,EAAC","sourcesContent":["import Dimension from '../less/tree/dimension';\nimport Expression from '../less/tree/expression';\nimport functionRegistry from './../less/functions/function-registry';\n\nexport default environment => {\n\n    function imageSize(functionContext, filePathNode) {\n        let filePath = filePathNode.value;\n        const currentFileInfo = functionContext.currentFileInfo;\n        const currentDirectory = currentFileInfo.rewriteUrls ?\n            currentFileInfo.currentDirectory : currentFileInfo.entryPath;\n\n        const fragmentStart = filePath.indexOf('#');\n        if (fragmentStart !== -1) {\n            filePath = filePath.slice(0, fragmentStart);\n        }\n\n        const fileManager = environment.getFileManager(filePath, currentDirectory, functionContext.context, environment, true);\n\n        if (!fileManager) {\n            throw {\n                type: 'File',\n                message: `Can not set up FileManager for ${filePathNode}`\n            };\n        }\n\n        const fileSync = fileManager.loadFileSync(filePath, currentDirectory, functionContext.context, environment);\n\n        if (fileSync.error) {\n            throw fileSync.error;\n        }\n\n        const sizeOf = require('image-size');\n        return sizeOf(fileSync.filename);\n    }\n\n    const imageFunctions = {\n        'image-size': function(filePathNode) {\n            const size = imageSize(this, filePathNode);\n            return new Expression([\n                new Dimension(size.width, 'px'),\n                new Dimension(size.height, 'px')\n            ]);\n        },\n        'image-width': function(filePathNode) {\n            const size = imageSize(this, filePathNode);\n            return new Dimension(size.width, 'px');\n        },\n        'image-height': function(filePathNode) {\n            const size = imageSize(this, filePathNode);\n            return new Dimension(size.height, 'px');\n        }\n    };\n\n    functionRegistry.addMultiple(imageFunctions);\n};\n"]}
 | 
			
		||||
							
								
								
									
										22
									
								
								node_modules/less/lib/less-node/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								node_modules/less/lib/less-node/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,22 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var environment_1 = tslib_1.__importDefault(require("./environment"));
 | 
			
		||||
var file_manager_1 = tslib_1.__importDefault(require("./file-manager"));
 | 
			
		||||
var url_file_manager_1 = tslib_1.__importDefault(require("./url-file-manager"));
 | 
			
		||||
var less_1 = tslib_1.__importDefault(require("../less"));
 | 
			
		||||
var less = less_1.default(environment_1.default, [new file_manager_1.default(), new url_file_manager_1.default()]);
 | 
			
		||||
var lessc_helper_1 = tslib_1.__importDefault(require("./lessc-helper"));
 | 
			
		||||
// allow people to create less with their own environment
 | 
			
		||||
less.createFromEnvironment = less_1.default;
 | 
			
		||||
less.lesscHelper = lessc_helper_1.default;
 | 
			
		||||
less.PluginLoader = require('./plugin-loader').default;
 | 
			
		||||
less.fs = require('./fs').default;
 | 
			
		||||
less.FileManager = file_manager_1.default;
 | 
			
		||||
less.UrlFileManager = url_file_manager_1.default;
 | 
			
		||||
// Set up options
 | 
			
		||||
less.options = require('../less/default-options').default();
 | 
			
		||||
// provide image-size functionality
 | 
			
		||||
require('./image-size').default(less.environment);
 | 
			
		||||
exports.default = less;
 | 
			
		||||
//# sourceMappingURL=index.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-node/index.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-node/index.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/less-node/index.js"],"names":[],"mappings":";;;AAAA,sEAAwC;AACxC,wEAAyC;AACzC,gFAAgD;AAChD,yDAA4C;AAC5C,IAAM,IAAI,GAAG,cAAqB,CAAC,qBAAW,EAAE,CAAC,IAAI,sBAAW,EAAE,EAAE,IAAI,0BAAc,EAAE,CAAC,CAAC,CAAC;AAC3F,wEAAyC;AAEzC,yDAAyD;AACzD,IAAI,CAAC,qBAAqB,GAAG,cAAqB,CAAC;AACnD,IAAI,CAAC,WAAW,GAAG,sBAAW,CAAC;AAC/B,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC;AACvD,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;AAClC,IAAI,CAAC,WAAW,GAAG,sBAAW,CAAC;AAC/B,IAAI,CAAC,cAAc,GAAG,0BAAc,CAAC;AAErC,iBAAiB;AACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC,OAAO,EAAE,CAAC;AAE5D,mCAAmC;AACnC,OAAO,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAElD,kBAAe,IAAI,CAAC","sourcesContent":["import environment from './environment';\nimport FileManager from './file-manager';\nimport UrlFileManager from './url-file-manager';\nimport createFromEnvironment from '../less';\nconst less = createFromEnvironment(environment, [new FileManager(), new UrlFileManager()]);\nimport lesscHelper from './lessc-helper';\n\n// allow people to create less with their own environment\nless.createFromEnvironment = createFromEnvironment;\nless.lesscHelper = lesscHelper;\nless.PluginLoader = require('./plugin-loader').default;\nless.fs = require('./fs').default;\nless.FileManager = FileManager;\nless.UrlFileManager = UrlFileManager;\n\n// Set up options\nless.options = require('../less/default-options').default();\n\n// provide image-size functionality\nrequire('./image-size').default(less.environment);\n\nexport default less;\n"]}
 | 
			
		||||
							
								
								
									
										94
									
								
								node_modules/less/lib/less-node/lessc-helper.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										94
									
								
								node_modules/less/lib/less-node/lessc-helper.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,94 @@
 | 
			
		|||
// lessc_helper.js
 | 
			
		||||
//
 | 
			
		||||
//      helper functions for lessc
 | 
			
		||||
var lessc_helper = {
 | 
			
		||||
    // Stylize a string
 | 
			
		||||
    stylize: function (str, style) {
 | 
			
		||||
        var styles = {
 | 
			
		||||
            'reset': [0, 0],
 | 
			
		||||
            'bold': [1, 22],
 | 
			
		||||
            'inverse': [7, 27],
 | 
			
		||||
            'underline': [4, 24],
 | 
			
		||||
            'yellow': [33, 39],
 | 
			
		||||
            'green': [32, 39],
 | 
			
		||||
            'red': [31, 39],
 | 
			
		||||
            'grey': [90, 39]
 | 
			
		||||
        };
 | 
			
		||||
        return "\u001B[" + styles[style][0] + "m" + str + "\u001B[" + styles[style][1] + "m";
 | 
			
		||||
    },
 | 
			
		||||
    // Print command line options
 | 
			
		||||
    printUsage: function () {
 | 
			
		||||
        console.log('usage: lessc [option option=parameter ...] <source> [destination]');
 | 
			
		||||
        console.log('');
 | 
			
		||||
        console.log('If source is set to `-\' (dash or hyphen-minus), input is read from stdin.');
 | 
			
		||||
        console.log('');
 | 
			
		||||
        console.log('options:');
 | 
			
		||||
        console.log('  -h, --help                   Prints help (this message) and exit.');
 | 
			
		||||
        console.log('  --include-path=PATHS         Sets include paths. Separated by `:\'. `;\' also supported on windows.');
 | 
			
		||||
        console.log('  -M, --depends                Outputs a makefile import dependency list to stdout.');
 | 
			
		||||
        console.log('  --no-color                   Disables colorized output.');
 | 
			
		||||
        console.log('  --ie-compat                  Enables IE8 compatibility checks.');
 | 
			
		||||
        console.log('  --js                         Enables inline JavaScript in less files');
 | 
			
		||||
        console.log('  -l, --lint                   Syntax check only (lint).');
 | 
			
		||||
        console.log('  -s, --silent                 Suppresses output of error messages.');
 | 
			
		||||
        console.log('  --strict-imports             Forces evaluation of imports.');
 | 
			
		||||
        console.log('  --insecure                   Allows imports from insecure https hosts.');
 | 
			
		||||
        console.log('  -v, --version                Prints version number and exit.');
 | 
			
		||||
        console.log('  --verbose                    Be verbose.');
 | 
			
		||||
        console.log('  --source-map[=FILENAME]      Outputs a v3 sourcemap to the filename (or output filename.map).');
 | 
			
		||||
        console.log('  --source-map-rootpath=X      Adds this path onto the sourcemap filename and less file paths.');
 | 
			
		||||
        console.log('  --source-map-basepath=X      Sets sourcemap base path, defaults to current working directory.');
 | 
			
		||||
        console.log('  --source-map-include-source  Puts the less files into the map instead of referencing them.');
 | 
			
		||||
        console.log('  --source-map-inline          Puts the map (and any less files) as a base64 data uri into the output css file.');
 | 
			
		||||
        console.log('  --source-map-url=URL         Sets a custom URL to map file, for sourceMappingURL comment');
 | 
			
		||||
        console.log('                               in generated CSS file.');
 | 
			
		||||
        console.log('  --source-map-no-annotation   Excludes the sourceMappingURL comment from the output css file.');
 | 
			
		||||
        console.log('  -rp, --rootpath=URL          Sets rootpath for url rewriting in relative imports and urls');
 | 
			
		||||
        console.log('                               Works with or without the relative-urls option.');
 | 
			
		||||
        console.log('  -ru=, --rewrite-urls=        Rewrites URLs to make them relative to the base less file.');
 | 
			
		||||
        console.log('    all|local|off              \'all\' rewrites all URLs, \'local\' just those starting with a \'.\'');
 | 
			
		||||
        console.log('');
 | 
			
		||||
        console.log('  -m=, --math=');
 | 
			
		||||
        console.log('     always                    Less will eagerly perform math operations always.');
 | 
			
		||||
        console.log('     parens-division           Math performed except for division (/) operator');
 | 
			
		||||
        console.log('     parens | strict           Math only performed inside parentheses');
 | 
			
		||||
        console.log('     strict-legacy             Parens required in very strict terms (legacy --strict-math)');
 | 
			
		||||
        console.log('');
 | 
			
		||||
        console.log('  -su=on|off                   Allows mixed units, e.g. 1px+1em or 1px*1px which have units');
 | 
			
		||||
        console.log('  --strict-units=on|off        that cannot be represented.');
 | 
			
		||||
        console.log('  --global-var=\'VAR=VALUE\'     Defines a variable that can be referenced by the file.');
 | 
			
		||||
        console.log('  --modify-var=\'VAR=VALUE\'     Modifies a variable already declared in the file.');
 | 
			
		||||
        console.log('  --url-args=\'QUERYSTRING\'     Adds params into url tokens (e.g. 42, cb=42 or \'a=1&b=2\')');
 | 
			
		||||
        console.log('  --plugin=PLUGIN=OPTIONS      Loads a plugin. You can also omit the --plugin= if the plugin begins');
 | 
			
		||||
        console.log('                               less-plugin. E.g. the clean css plugin is called less-plugin-clean-css');
 | 
			
		||||
        console.log('                               once installed (npm install less-plugin-clean-css), use either with');
 | 
			
		||||
        console.log('                               --plugin=less-plugin-clean-css or just --clean-css');
 | 
			
		||||
        console.log('                               specify options afterwards e.g. --plugin=less-plugin-clean-css="advanced"');
 | 
			
		||||
        console.log('                               or --clean-css="advanced"');
 | 
			
		||||
        console.log('  --disable-plugin-rule        Disallow @plugin statements');
 | 
			
		||||
        console.log('');
 | 
			
		||||
        console.log('-------------------------- Deprecated ----------------');
 | 
			
		||||
        console.log('  -sm=on|off               Legacy parens-only math. Use --math');
 | 
			
		||||
        console.log('  --strict-math=on|off     ');
 | 
			
		||||
        console.log('');
 | 
			
		||||
        console.log('  --line-numbers=TYPE      Outputs filename and line numbers.');
 | 
			
		||||
        console.log('                           TYPE can be either \'comments\', which will output');
 | 
			
		||||
        console.log('                           the debug info within comments, \'mediaquery\'');
 | 
			
		||||
        console.log('                           that will output the information within a fake');
 | 
			
		||||
        console.log('                           media query which is compatible with the SASS');
 | 
			
		||||
        console.log('                           format, and \'all\' which will do both.');
 | 
			
		||||
        console.log('  -x, --compress           Compresses output by removing some whitespaces.');
 | 
			
		||||
        console.log('                           We recommend you use a dedicated minifer like less-plugin-clean-css');
 | 
			
		||||
        console.log('');
 | 
			
		||||
        console.log('Report bugs to: http://github.com/less/less.js/issues');
 | 
			
		||||
        console.log('Home page: <http://lesscss.org/>');
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
// Exports helper functions
 | 
			
		||||
// eslint-disable-next-line no-prototype-builtins
 | 
			
		||||
for (var h in lessc_helper) {
 | 
			
		||||
    if (lessc_helper.hasOwnProperty(h)) {
 | 
			
		||||
        exports[h] = lessc_helper[h];
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
//# sourceMappingURL=lessc-helper.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-node/lessc-helper.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-node/lessc-helper.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										54
									
								
								node_modules/less/lib/less-node/plugin-loader.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								node_modules/less/lib/less-node/plugin-loader.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,54 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var path_1 = tslib_1.__importDefault(require("path"));
 | 
			
		||||
var abstract_plugin_loader_js_1 = tslib_1.__importDefault(require("../less/environment/abstract-plugin-loader.js"));
 | 
			
		||||
/**
 | 
			
		||||
 * Node Plugin Loader
 | 
			
		||||
 */
 | 
			
		||||
var PluginLoader = function (less) {
 | 
			
		||||
    this.less = less;
 | 
			
		||||
    this.require = function (prefix) {
 | 
			
		||||
        prefix = path_1.default.dirname(prefix);
 | 
			
		||||
        return function (id) {
 | 
			
		||||
            var str = id.substr(0, 2);
 | 
			
		||||
            if (str === '..' || str === './') {
 | 
			
		||||
                return require(path_1.default.join(prefix, id));
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                return require(id);
 | 
			
		||||
            }
 | 
			
		||||
        };
 | 
			
		||||
    };
 | 
			
		||||
};
 | 
			
		||||
PluginLoader.prototype = Object.assign(new abstract_plugin_loader_js_1.default(), {
 | 
			
		||||
    loadPlugin: function (filename, basePath, context, environment, fileManager) {
 | 
			
		||||
        var prefix = filename.slice(0, 1);
 | 
			
		||||
        var explicit = prefix === '.' || prefix === '/' || filename.slice(-3).toLowerCase() === '.js';
 | 
			
		||||
        if (!explicit) {
 | 
			
		||||
            context.prefixes = ['less-plugin-', ''];
 | 
			
		||||
        }
 | 
			
		||||
        if (context.syncImport) {
 | 
			
		||||
            return fileManager.loadFileSync(filename, basePath, context, environment);
 | 
			
		||||
        }
 | 
			
		||||
        return new Promise(function (fulfill, reject) {
 | 
			
		||||
            fileManager.loadFile(filename, basePath, context, environment).then(function (data) {
 | 
			
		||||
                try {
 | 
			
		||||
                    fulfill(data);
 | 
			
		||||
                }
 | 
			
		||||
                catch (e) {
 | 
			
		||||
                    console.log(e);
 | 
			
		||||
                    reject(e);
 | 
			
		||||
                }
 | 
			
		||||
            }).catch(function (err) {
 | 
			
		||||
                reject(err);
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    loadPluginSync: function (filename, basePath, context, environment, fileManager) {
 | 
			
		||||
        context.syncImport = true;
 | 
			
		||||
        return this.loadPlugin(filename, basePath, context, environment, fileManager);
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
exports.default = PluginLoader;
 | 
			
		||||
//# sourceMappingURL=plugin-loader.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-node/plugin-loader.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-node/plugin-loader.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"plugin-loader.js","sourceRoot":"","sources":["../../src/less-node/plugin-loader.js"],"names":[],"mappings":";;;AAAA,sDAAwB;AACxB,oHAAiF;AAEjF;;GAEG;AACH,IAAM,YAAY,GAAG,UAAS,IAAI;IAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,OAAO,GAAG,UAAA,MAAM;QACjB,MAAM,GAAG,cAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC9B,OAAO,UAAA,EAAE;YACL,IAAM,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAC5B,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,IAAI,EAAE;gBAC9B,OAAO,OAAO,CAAC,cAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;aACzC;iBACI;gBACD,OAAO,OAAO,CAAC,EAAE,CAAC,CAAC;aACtB;QACL,CAAC,CAAC;IACN,CAAC,CAAC;AACN,CAAC,CAAC;AAEF,YAAY,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,mCAAoB,EAAE,EAAE;IAC/D,UAAU,YAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW;QAC5D,IAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACpC,IAAM,QAAQ,GAAG,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC;QAChG,IAAI,CAAC,QAAQ,EAAE;YACX,OAAO,CAAC,QAAQ,GAAG,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;SAC3C;QAED,IAAI,OAAO,CAAC,UAAU,EAAE;YACpB,OAAO,WAAW,CAAC,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;SAC7E;QAED,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;YAC/B,WAAW,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,IAAI,CAC/D,UAAA,IAAI;gBACA,IAAI;oBACA,OAAO,CAAC,IAAI,CAAC,CAAC;iBACjB;gBACD,OAAO,CAAC,EAAE;oBACN,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;oBACf,MAAM,CAAC,CAAC,CAAC,CAAC;iBACb;YACL,CAAC,CACJ,CAAC,KAAK,CAAC,UAAA,GAAG;gBACP,MAAM,CAAC,GAAG,CAAC,CAAC;YAChB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;IAED,cAAc,YAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW;QAChE,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IAClF,CAAC;CACJ,CAAC,CAAC;AAEH,kBAAe,YAAY,CAAC","sourcesContent":["import path from 'path';\nimport AbstractPluginLoader from '../less/environment/abstract-plugin-loader.js';\n\n/**\n * Node Plugin Loader\n */\nconst PluginLoader = function(less) {\n    this.less = less;\n    this.require = prefix => {\n        prefix = path.dirname(prefix);\n        return id => {\n            const str = id.substr(0, 2);\n            if (str === '..' || str === './') {\n                return require(path.join(prefix, id));\n            }\n            else {\n                return require(id);\n            }\n        };\n    };\n};\n\nPluginLoader.prototype = Object.assign(new AbstractPluginLoader(), {\n    loadPlugin(filename, basePath, context, environment, fileManager) {\n        const prefix = filename.slice(0, 1);\n        const explicit = prefix === '.' || prefix === '/' || filename.slice(-3).toLowerCase() === '.js';\n        if (!explicit) {\n            context.prefixes = ['less-plugin-', ''];\n        }\n\n        if (context.syncImport) {\n            return fileManager.loadFileSync(filename, basePath, context, environment);\n        }\n\n        return new Promise((fulfill, reject) => {\n            fileManager.loadFile(filename, basePath, context, environment).then(\n                data => {\n                    try {\n                        fulfill(data);\n                    }\n                    catch (e) {\n                        console.log(e);\n                        reject(e);\n                    }\n                }\n            ).catch(err => {\n                reject(err);\n            });\n        });\n    },\n\n    loadPluginSync(filename, basePath, context, environment, fileManager) {\n        context.syncImport = true;\n        return this.loadPlugin(filename, basePath, context, environment, fileManager);\n    }\n});\n\nexport default PluginLoader;\n\n"]}
 | 
			
		||||
							
								
								
									
										58
									
								
								node_modules/less/lib/less-node/url-file-manager.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								node_modules/less/lib/less-node/url-file-manager.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,58 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
/* eslint-disable no-unused-vars */
 | 
			
		||||
/**
 | 
			
		||||
 * @todo - remove top eslint rule when FileManagers have JSDoc type
 | 
			
		||||
 * and are TS-type-checked
 | 
			
		||||
 */
 | 
			
		||||
var isUrlRe = /^(?:https?:)?\/\//i;
 | 
			
		||||
var url_1 = tslib_1.__importDefault(require("url"));
 | 
			
		||||
var request;
 | 
			
		||||
var abstract_file_manager_js_1 = tslib_1.__importDefault(require("../less/environment/abstract-file-manager.js"));
 | 
			
		||||
var logger_1 = tslib_1.__importDefault(require("../less/logger"));
 | 
			
		||||
var UrlFileManager = function () { };
 | 
			
		||||
UrlFileManager.prototype = Object.assign(new abstract_file_manager_js_1.default(), {
 | 
			
		||||
    supports: function (filename, currentDirectory, options, environment) {
 | 
			
		||||
        return isUrlRe.test(filename) || isUrlRe.test(currentDirectory);
 | 
			
		||||
    },
 | 
			
		||||
    loadFile: function (filename, currentDirectory, options, environment) {
 | 
			
		||||
        return new Promise(function (fulfill, reject) {
 | 
			
		||||
            if (request === undefined) {
 | 
			
		||||
                try {
 | 
			
		||||
                    request = require('needle');
 | 
			
		||||
                }
 | 
			
		||||
                catch (e) {
 | 
			
		||||
                    request = null;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            if (!request) {
 | 
			
		||||
                reject({ type: 'File', message: 'optional dependency \'needle\' required to import over http(s)\n' });
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            var urlStr = isUrlRe.test(filename) ? filename : url_1.default.resolve(currentDirectory, filename);
 | 
			
		||||
            /** native-request currently has a bug */
 | 
			
		||||
            var hackUrlStr = urlStr.indexOf('?') === -1 ? urlStr + '?' : urlStr;
 | 
			
		||||
            request.get(hackUrlStr, { follow_max: 5 }, function (err, resp, body) {
 | 
			
		||||
                if (err || resp && resp.statusCode >= 400) {
 | 
			
		||||
                    var message = resp && resp.statusCode === 404
 | 
			
		||||
                        ? "resource '" + urlStr + "' was not found\n"
 | 
			
		||||
                        : "resource '" + urlStr + "' gave this Error:\n  " + (err || resp.statusMessage || resp.statusCode) + "\n";
 | 
			
		||||
                    reject({ type: 'File', message: message });
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
                if (resp.statusCode >= 300) {
 | 
			
		||||
                    reject({ type: 'File', message: "resource '" + urlStr + "' caused too many redirects" });
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
                body = body.toString('utf8');
 | 
			
		||||
                if (!body) {
 | 
			
		||||
                    logger_1.default.warn("Warning: Empty body (HTTP " + resp.statusCode + ") returned by \"" + urlStr + "\"");
 | 
			
		||||
                }
 | 
			
		||||
                fulfill({ contents: body || '', filename: urlStr });
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
exports.default = UrlFileManager;
 | 
			
		||||
//# sourceMappingURL=url-file-manager.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less-node/url-file-manager.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less-node/url-file-manager.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"url-file-manager.js","sourceRoot":"","sources":["../../src/less-node/url-file-manager.js"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC;;;GAGG;AACH,IAAM,OAAO,GAAG,oBAAoB,CAAC;AACrC,oDAAsB;AACtB,IAAI,OAAO,CAAC;AACZ,kHAA+E;AAC/E,kEAAoC;AAEpC,IAAM,cAAc,GAAG,cAAY,CAAC,CAAA;AACpC,cAAc,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,kCAAmB,EAAE,EAAE;IAChE,QAAQ,YAAC,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,WAAW;QACrD,OAAO,OAAO,CAAC,IAAI,CAAE,QAAQ,CAAE,IAAI,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACtE,CAAC;IAED,QAAQ,YAAC,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,WAAW;QACrD,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;YAC/B,IAAI,OAAO,KAAK,SAAS,EAAE;gBACvB,IAAI;oBAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;iBAAE;gBACpC,OAAO,CAAC,EAAE;oBAAE,OAAO,GAAG,IAAI,CAAC;iBAAE;aAChC;YACD,IAAI,CAAC,OAAO,EAAE;gBACV,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,kEAAkE,EAAE,CAAC,CAAC;gBACtG,OAAO;aACV;YAED,IAAI,MAAM,GAAG,OAAO,CAAC,IAAI,CAAE,QAAQ,CAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAG,CAAC,OAAO,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;YAE3F,yCAAyC;YACzC,IAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,MAAM,CAAA;YAErE,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,UAAC,GAAG,EAAE,IAAI,EAAE,IAAI;gBACvD,IAAI,GAAG,IAAI,IAAI,IAAI,IAAI,CAAC,UAAU,IAAI,GAAG,EAAE;oBACvC,IAAM,OAAO,GAAG,IAAI,IAAI,IAAI,CAAC,UAAU,KAAK,GAAG;wBAC3C,CAAC,CAAC,eAAa,MAAM,sBAAmB;wBACxC,CAAC,CAAC,eAAa,MAAM,+BAAyB,GAAG,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,UAAU,QAAI,CAAC;oBACnG,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;oBAClC,OAAO;iBACV;gBACD,IAAI,IAAI,CAAC,UAAU,IAAI,GAAG,EAAE;oBACxB,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAa,MAAM,gCAA6B,EAAE,CAAC,CAAC;oBACpF,OAAO;iBACV;gBACD,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;gBAC7B,IAAI,CAAC,IAAI,EAAE;oBACP,gBAAM,CAAC,IAAI,CAAC,+BAA6B,IAAI,CAAC,UAAU,wBAAkB,MAAM,OAAG,CAAC,CAAC;iBACxF;gBACD,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAC,CAAC;AAEH,kBAAe,cAAc,CAAC","sourcesContent":["/* eslint-disable no-unused-vars */\n/**\n * @todo - remove top eslint rule when FileManagers have JSDoc type\n * and are TS-type-checked\n */\nconst isUrlRe = /^(?:https?:)?\\/\\//i;\nimport url from 'url';\nlet request;\nimport AbstractFileManager from '../less/environment/abstract-file-manager.js';\nimport logger from '../less/logger';\n\nconst UrlFileManager = function() {}\nUrlFileManager.prototype = Object.assign(new AbstractFileManager(), {\n    supports(filename, currentDirectory, options, environment) {\n        return isUrlRe.test( filename ) || isUrlRe.test(currentDirectory);\n    },\n\n    loadFile(filename, currentDirectory, options, environment) {\n        return new Promise((fulfill, reject) => {\n            if (request === undefined) {\n                try { request = require('needle'); }\n                catch (e) { request = null; }\n            }\n            if (!request) {\n                reject({ type: 'File', message: 'optional dependency \\'needle\\' required to import over http(s)\\n' });\n                return;\n            }\n\n            let urlStr = isUrlRe.test( filename ) ? filename : url.resolve(currentDirectory, filename);\n\n            /** native-request currently has a bug */\n            const hackUrlStr = urlStr.indexOf('?') === -1 ? urlStr + '?' : urlStr\n\n            request.get(hackUrlStr, { follow_max: 5 }, (err, resp, body) => {\n                if (err || resp && resp.statusCode >= 400) {\n                    const message = resp && resp.statusCode === 404\n                        ? `resource '${urlStr}' was not found\\n`\n                        : `resource '${urlStr}' gave this Error:\\n  ${err || resp.statusMessage || resp.statusCode}\\n`;\n                    reject({ type: 'File', message });\n                    return;\n                }\n                if (resp.statusCode >= 300) {\n                    reject({ type: 'File', message: `resource '${urlStr}' caused too many redirects` });\n                    return;\n                }\n                body = body.toString('utf8');\n                if (!body) {\n                    logger.warn(`Warning: Empty body (HTTP ${resp.statusCode}) returned by \"${urlStr}\"`);\n                }\n                fulfill({ contents: body || '', filename: urlStr });\n            });\n        });\n    }\n});\n\nexport default UrlFileManager;\n"]}
 | 
			
		||||
							
								
								
									
										15
									
								
								node_modules/less/lib/less/constants.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								node_modules/less/lib/less/constants.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
exports.RewriteUrls = exports.Math = void 0;
 | 
			
		||||
exports.Math = {
 | 
			
		||||
    ALWAYS: 0,
 | 
			
		||||
    PARENS_DIVISION: 1,
 | 
			
		||||
    PARENS: 2
 | 
			
		||||
    // removed - STRICT_LEGACY: 3
 | 
			
		||||
};
 | 
			
		||||
exports.RewriteUrls = {
 | 
			
		||||
    OFF: 0,
 | 
			
		||||
    LOCAL: 1,
 | 
			
		||||
    ALL: 2
 | 
			
		||||
};
 | 
			
		||||
//# sourceMappingURL=constants.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/constants.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/constants.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/less/constants.js"],"names":[],"mappings":";;;AACa,QAAA,IAAI,GAAG;IAChB,MAAM,EAAE,CAAC;IACT,eAAe,EAAE,CAAC;IAClB,MAAM,EAAE,CAAC;IACT,6BAA6B;CAChC,CAAC;AAEW,QAAA,WAAW,GAAG;IACvB,GAAG,EAAE,CAAC;IACN,KAAK,EAAE,CAAC;IACR,GAAG,EAAE,CAAC;CACT,CAAC","sourcesContent":["\nexport const Math = {\n    ALWAYS: 0,\n    PARENS_DIVISION: 1,\n    PARENS: 2\n    // removed - STRICT_LEGACY: 3\n};\n\nexport const RewriteUrls = {\n    OFF: 0,\n    LOCAL: 1,\n    ALL: 2\n};"]}
 | 
			
		||||
							
								
								
									
										149
									
								
								node_modules/less/lib/less/contexts.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										149
									
								
								node_modules/less/lib/less/contexts.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,149 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var contexts = {};
 | 
			
		||||
exports.default = contexts;
 | 
			
		||||
var Constants = tslib_1.__importStar(require("./constants"));
 | 
			
		||||
var copyFromOriginal = function copyFromOriginal(original, destination, propertiesToCopy) {
 | 
			
		||||
    if (!original) {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
    for (var i = 0; i < propertiesToCopy.length; i++) {
 | 
			
		||||
        if (Object.prototype.hasOwnProperty.call(original, propertiesToCopy[i])) {
 | 
			
		||||
            destination[propertiesToCopy[i]] = original[propertiesToCopy[i]];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
/*
 | 
			
		||||
 parse is used whilst parsing
 | 
			
		||||
 */
 | 
			
		||||
var parseCopyProperties = [
 | 
			
		||||
    // options
 | 
			
		||||
    'paths',
 | 
			
		||||
    'rewriteUrls',
 | 
			
		||||
    'rootpath',
 | 
			
		||||
    'strictImports',
 | 
			
		||||
    'insecure',
 | 
			
		||||
    'dumpLineNumbers',
 | 
			
		||||
    'compress',
 | 
			
		||||
    'syncImport',
 | 
			
		||||
    'chunkInput',
 | 
			
		||||
    'mime',
 | 
			
		||||
    'useFileCache',
 | 
			
		||||
    // context
 | 
			
		||||
    'processImports',
 | 
			
		||||
    // Used by the import manager to stop multiple import visitors being created.
 | 
			
		||||
    'pluginManager' // Used as the plugin manager for the session
 | 
			
		||||
];
 | 
			
		||||
contexts.Parse = function (options) {
 | 
			
		||||
    copyFromOriginal(options, this, parseCopyProperties);
 | 
			
		||||
    if (typeof this.paths === 'string') {
 | 
			
		||||
        this.paths = [this.paths];
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
var evalCopyProperties = [
 | 
			
		||||
    'paths',
 | 
			
		||||
    'compress',
 | 
			
		||||
    'math',
 | 
			
		||||
    'strictUnits',
 | 
			
		||||
    'sourceMap',
 | 
			
		||||
    'importMultiple',
 | 
			
		||||
    'urlArgs',
 | 
			
		||||
    'javascriptEnabled',
 | 
			
		||||
    'pluginManager',
 | 
			
		||||
    'importantScope',
 | 
			
		||||
    'rewriteUrls' // option - whether to adjust URL's to be relative
 | 
			
		||||
];
 | 
			
		||||
contexts.Eval = function (options, frames) {
 | 
			
		||||
    copyFromOriginal(options, this, evalCopyProperties);
 | 
			
		||||
    if (typeof this.paths === 'string') {
 | 
			
		||||
        this.paths = [this.paths];
 | 
			
		||||
    }
 | 
			
		||||
    this.frames = frames || [];
 | 
			
		||||
    this.importantScope = this.importantScope || [];
 | 
			
		||||
};
 | 
			
		||||
contexts.Eval.prototype.enterCalc = function () {
 | 
			
		||||
    if (!this.calcStack) {
 | 
			
		||||
        this.calcStack = [];
 | 
			
		||||
    }
 | 
			
		||||
    this.calcStack.push(true);
 | 
			
		||||
    this.inCalc = true;
 | 
			
		||||
};
 | 
			
		||||
contexts.Eval.prototype.exitCalc = function () {
 | 
			
		||||
    this.calcStack.pop();
 | 
			
		||||
    if (!this.calcStack.length) {
 | 
			
		||||
        this.inCalc = false;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
contexts.Eval.prototype.inParenthesis = function () {
 | 
			
		||||
    if (!this.parensStack) {
 | 
			
		||||
        this.parensStack = [];
 | 
			
		||||
    }
 | 
			
		||||
    this.parensStack.push(true);
 | 
			
		||||
};
 | 
			
		||||
contexts.Eval.prototype.outOfParenthesis = function () {
 | 
			
		||||
    this.parensStack.pop();
 | 
			
		||||
};
 | 
			
		||||
contexts.Eval.prototype.inCalc = false;
 | 
			
		||||
contexts.Eval.prototype.mathOn = true;
 | 
			
		||||
contexts.Eval.prototype.isMathOn = function (op) {
 | 
			
		||||
    if (!this.mathOn) {
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
    if (op === '/' && this.math !== Constants.Math.ALWAYS && (!this.parensStack || !this.parensStack.length)) {
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
    if (this.math > Constants.Math.PARENS_DIVISION) {
 | 
			
		||||
        return this.parensStack && this.parensStack.length;
 | 
			
		||||
    }
 | 
			
		||||
    return true;
 | 
			
		||||
};
 | 
			
		||||
contexts.Eval.prototype.pathRequiresRewrite = function (path) {
 | 
			
		||||
    var isRelative = this.rewriteUrls === Constants.RewriteUrls.LOCAL ? isPathLocalRelative : isPathRelative;
 | 
			
		||||
    return isRelative(path);
 | 
			
		||||
};
 | 
			
		||||
contexts.Eval.prototype.rewritePath = function (path, rootpath) {
 | 
			
		||||
    var newPath;
 | 
			
		||||
    rootpath = rootpath || '';
 | 
			
		||||
    newPath = this.normalizePath(rootpath + path);
 | 
			
		||||
    // If a path was explicit relative and the rootpath was not an absolute path
 | 
			
		||||
    // we must ensure that the new path is also explicit relative.
 | 
			
		||||
    if (isPathLocalRelative(path) &&
 | 
			
		||||
        isPathRelative(rootpath) &&
 | 
			
		||||
        isPathLocalRelative(newPath) === false) {
 | 
			
		||||
        newPath = "./" + newPath;
 | 
			
		||||
    }
 | 
			
		||||
    return newPath;
 | 
			
		||||
};
 | 
			
		||||
contexts.Eval.prototype.normalizePath = function (path) {
 | 
			
		||||
    var segments = path.split('/').reverse();
 | 
			
		||||
    var segment;
 | 
			
		||||
    path = [];
 | 
			
		||||
    while (segments.length !== 0) {
 | 
			
		||||
        segment = segments.pop();
 | 
			
		||||
        switch (segment) {
 | 
			
		||||
            case '.':
 | 
			
		||||
                break;
 | 
			
		||||
            case '..':
 | 
			
		||||
                if ((path.length === 0) || (path[path.length - 1] === '..')) {
 | 
			
		||||
                    path.push(segment);
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    path.pop();
 | 
			
		||||
                }
 | 
			
		||||
                break;
 | 
			
		||||
            default:
 | 
			
		||||
                path.push(segment);
 | 
			
		||||
                break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    return path.join('/');
 | 
			
		||||
};
 | 
			
		||||
function isPathRelative(path) {
 | 
			
		||||
    return !/^(?:[a-z-]+:|\/|#)/i.test(path);
 | 
			
		||||
}
 | 
			
		||||
function isPathLocalRelative(path) {
 | 
			
		||||
    return path.charAt(0) === '.';
 | 
			
		||||
}
 | 
			
		||||
// todo - do the same for the toCSS ?
 | 
			
		||||
//# sourceMappingURL=contexts.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/contexts.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/contexts.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										153
									
								
								node_modules/less/lib/less/data/colors.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										153
									
								
								node_modules/less/lib/less/data/colors.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,153 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
exports.default = {
 | 
			
		||||
    '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'
 | 
			
		||||
};
 | 
			
		||||
//# sourceMappingURL=colors.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/data/colors.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/data/colors.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										7
									
								
								node_modules/less/lib/less/data/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								node_modules/less/lib/less/data/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var colors_1 = tslib_1.__importDefault(require("./colors"));
 | 
			
		||||
var unit_conversions_1 = tslib_1.__importDefault(require("./unit-conversions"));
 | 
			
		||||
exports.default = { colors: colors_1.default, unitConversions: unit_conversions_1.default };
 | 
			
		||||
//# sourceMappingURL=index.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/data/index.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/data/index.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/less/data/index.js"],"names":[],"mappings":";;;AAAA,4DAA8B;AAC9B,gFAAiD;AAEjD,kBAAe,EAAE,MAAM,kBAAA,EAAE,eAAe,4BAAA,EAAE,CAAC","sourcesContent":["import colors from './colors';\nimport unitConversions from './unit-conversions';\n\nexport default { colors, unitConversions };\n"]}
 | 
			
		||||
							
								
								
									
										24
									
								
								node_modules/less/lib/less/data/unit-conversions.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								node_modules/less/lib/less/data/unit-conversions.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,24 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
exports.default = {
 | 
			
		||||
    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': 1 / 400,
 | 
			
		||||
        'turn': 1
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
//# sourceMappingURL=unit-conversions.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/data/unit-conversions.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/data/unit-conversions.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"unit-conversions.js","sourceRoot":"","sources":["../../../src/less/data/unit-conversions.js"],"names":[],"mappings":";;AAAA,kBAAe;IACX,MAAM,EAAE;QACJ,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM,GAAG,EAAE;QACjB,IAAI,EAAE,MAAM,GAAG,EAAE;QACjB,IAAI,EAAE,MAAM,GAAG,EAAE,GAAG,EAAE;KACzB;IACD,QAAQ,EAAE;QACN,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,KAAK;KACd;IACD,KAAK,EAAE;QACH,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;QACxB,KAAK,EAAE,CAAC,GAAG,GAAG;QACd,MAAM,EAAE,CAAC,GAAG,GAAG;QACf,MAAM,EAAE,CAAC;KACZ;CACJ,CAAC","sourcesContent":["export default {\n    length: {\n        'm': 1,\n        'cm': 0.01,\n        'mm': 0.001,\n        'in': 0.0254,\n        'px': 0.0254 / 96,\n        'pt': 0.0254 / 72,\n        'pc': 0.0254 / 72 * 12\n    },\n    duration: {\n        's': 1,\n        'ms': 0.001\n    },\n    angle: {\n        'rad': 1 / (2 * Math.PI),\n        'deg': 1 / 360,\n        'grad': 1 / 400,\n        'turn': 1\n    }\n};"]}
 | 
			
		||||
							
								
								
									
										60
									
								
								node_modules/less/lib/less/default-options.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								node_modules/less/lib/less/default-options.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,60 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
// Export a new default each time
 | 
			
		||||
function default_1() {
 | 
			
		||||
    return {
 | 
			
		||||
        /* Inline Javascript - @plugin still allowed */
 | 
			
		||||
        javascriptEnabled: false,
 | 
			
		||||
        /* Outputs a makefile import dependency list to stdout. */
 | 
			
		||||
        depends: false,
 | 
			
		||||
        /* (DEPRECATED) Compress using less built-in compression.
 | 
			
		||||
         * This does an okay job but does not utilise all the tricks of
 | 
			
		||||
         * dedicated css compression. */
 | 
			
		||||
        compress: false,
 | 
			
		||||
        /* Runs the less parser and just reports errors without any output. */
 | 
			
		||||
        lint: false,
 | 
			
		||||
        /* Sets available include paths.
 | 
			
		||||
         * If the file in an @import rule does not exist at that exact location,
 | 
			
		||||
         * less will look for it at the location(s) passed to this option.
 | 
			
		||||
         * You might use this for instance to specify a path to a library which
 | 
			
		||||
         * you want to be referenced simply and relatively in the less files. */
 | 
			
		||||
        paths: [],
 | 
			
		||||
        /* color output in the terminal */
 | 
			
		||||
        color: true,
 | 
			
		||||
        /* The strictImports controls whether the compiler will allow an @import inside of either
 | 
			
		||||
         * @media blocks or (a later addition) other selector blocks.
 | 
			
		||||
         * See: https://github.com/less/less.js/issues/656 */
 | 
			
		||||
        strictImports: false,
 | 
			
		||||
        /* Allow Imports from Insecure HTTPS Hosts */
 | 
			
		||||
        insecure: false,
 | 
			
		||||
        /* Allows you to add a path to every generated import and url in your css.
 | 
			
		||||
         * This does not affect less import statements that are processed, just ones
 | 
			
		||||
         * that are left in the output css. */
 | 
			
		||||
        rootpath: '',
 | 
			
		||||
        /* By default URLs are kept as-is, so if you import a file in a sub-directory
 | 
			
		||||
         * that references an image, exactly the same URL will be output in the css.
 | 
			
		||||
         * This option allows you to re-write URL's in imported files so that the
 | 
			
		||||
         * URL is always relative to the base imported file */
 | 
			
		||||
        rewriteUrls: false,
 | 
			
		||||
        /* How to process math
 | 
			
		||||
         *   0 always           - eagerly try to solve all operations
 | 
			
		||||
         *   1 parens-division  - require parens for division "/"
 | 
			
		||||
         *   2 parens | strict  - require parens for all operations
 | 
			
		||||
         *   3 strict-legacy    - legacy strict behavior (super-strict)
 | 
			
		||||
         */
 | 
			
		||||
        math: 1,
 | 
			
		||||
        /* Without this option, less attempts to guess at the output unit when it does maths. */
 | 
			
		||||
        strictUnits: false,
 | 
			
		||||
        /* Effectively the declaration is put at the top of your base Less file,
 | 
			
		||||
         * meaning it can be used but it also can be overridden if this variable
 | 
			
		||||
         * is defined in the file. */
 | 
			
		||||
        globalVars: null,
 | 
			
		||||
        /* As opposed to the global variable option, this puts the declaration at the
 | 
			
		||||
         * end of your base file, meaning it will override anything defined in your Less file. */
 | 
			
		||||
        modifyVars: null,
 | 
			
		||||
        /* This option allows you to specify a argument to go on to every URL.  */
 | 
			
		||||
        urlArgs: ''
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
exports.default = default_1;
 | 
			
		||||
//# sourceMappingURL=default-options.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/default-options.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/default-options.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"default-options.js","sourceRoot":"","sources":["../../src/less/default-options.js"],"names":[],"mappings":";;AAAA,iCAAiC;AACjC;IACI,OAAO;QACH,+CAA+C;QAC/C,iBAAiB,EAAE,KAAK;QAExB,0DAA0D;QAC1D,OAAO,EAAE,KAAK;QAEd;;wCAEgC;QAChC,QAAQ,EAAE,KAAK;QAEf,sEAAsE;QACtE,IAAI,EAAE,KAAK;QAEX;;;;gFAIwE;QACxE,KAAK,EAAE,EAAE;QAET,kCAAkC;QAClC,KAAK,EAAE,IAAI;QAEX;;6DAEqD;QACrD,aAAa,EAAE,KAAK;QAEpB,6CAA6C;QAC7C,QAAQ,EAAE,KAAK;QAEf;;8CAEsC;QACtC,QAAQ,EAAE,EAAE;QAEZ;;;8DAGsD;QACtD,WAAW,EAAE,KAAK;QAElB;;;;;WAKG;QACH,IAAI,EAAE,CAAC;QAEP,wFAAwF;QACxF,WAAW,EAAE,KAAK;QAElB;;qCAE6B;QAC7B,UAAU,EAAE,IAAI;QAEhB;iGACyF;QACzF,UAAU,EAAE,IAAI;QAEhB,0EAA0E;QAC1E,OAAO,EAAE,EAAE;KACd,CAAA;AACL,CAAC;AApED,4BAoEC","sourcesContent":["// Export a new default each time\nexport default function() {\n    return {\n        /* Inline Javascript - @plugin still allowed */\n        javascriptEnabled: false,\n\n        /* Outputs a makefile import dependency list to stdout. */\n        depends: false,\n\n        /* (DEPRECATED) Compress using less built-in compression. \n         * This does an okay job but does not utilise all the tricks of \n         * dedicated css compression. */\n        compress: false,\n\n        /* Runs the less parser and just reports errors without any output. */\n        lint: false,\n\n        /* Sets available include paths.\n         * If the file in an @import rule does not exist at that exact location, \n         * less will look for it at the location(s) passed to this option. \n         * You might use this for instance to specify a path to a library which \n         * you want to be referenced simply and relatively in the less files. */\n        paths: [],\n\n        /* color output in the terminal */\n        color: true,\n\n        /* The strictImports controls whether the compiler will allow an @import inside of either \n         * @media blocks or (a later addition) other selector blocks.\n         * See: https://github.com/less/less.js/issues/656 */\n        strictImports: false,\n\n        /* Allow Imports from Insecure HTTPS Hosts */\n        insecure: false,\n\n        /* Allows you to add a path to every generated import and url in your css. \n         * This does not affect less import statements that are processed, just ones \n         * that are left in the output css. */\n        rootpath: '',\n\n        /* By default URLs are kept as-is, so if you import a file in a sub-directory \n         * that references an image, exactly the same URL will be output in the css. \n         * This option allows you to re-write URL's in imported files so that the \n         * URL is always relative to the base imported file */\n        rewriteUrls: false,\n\n        /* How to process math \n         *   0 always           - eagerly try to solve all operations\n         *   1 parens-division  - require parens for division \"/\"\n         *   2 parens | strict  - require parens for all operations\n         *   3 strict-legacy    - legacy strict behavior (super-strict)\n         */\n        math: 1,\n\n        /* Without this option, less attempts to guess at the output unit when it does maths. */\n        strictUnits: false,\n\n        /* Effectively the declaration is put at the top of your base Less file, \n         * meaning it can be used but it also can be overridden if this variable \n         * is defined in the file. */\n        globalVars: null,\n\n        /* As opposed to the global variable option, this puts the declaration at the\n         * end of your base file, meaning it will override anything defined in your Less file. */\n        modifyVars: null,\n\n        /* This option allows you to specify a argument to go on to every URL.  */\n        urlArgs: ''\n    }\n}"]}
 | 
			
		||||
							
								
								
									
										128
									
								
								node_modules/less/lib/less/environment/abstract-file-manager.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										128
									
								
								node_modules/less/lib/less/environment/abstract-file-manager.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,128 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var AbstractFileManager = /** @class */ (function () {
 | 
			
		||||
    function AbstractFileManager() {
 | 
			
		||||
    }
 | 
			
		||||
    AbstractFileManager.prototype.getPath = function (filename) {
 | 
			
		||||
        var j = filename.lastIndexOf('?');
 | 
			
		||||
        if (j > 0) {
 | 
			
		||||
            filename = filename.slice(0, j);
 | 
			
		||||
        }
 | 
			
		||||
        j = filename.lastIndexOf('/');
 | 
			
		||||
        if (j < 0) {
 | 
			
		||||
            j = filename.lastIndexOf('\\');
 | 
			
		||||
        }
 | 
			
		||||
        if (j < 0) {
 | 
			
		||||
            return '';
 | 
			
		||||
        }
 | 
			
		||||
        return filename.slice(0, j + 1);
 | 
			
		||||
    };
 | 
			
		||||
    AbstractFileManager.prototype.tryAppendExtension = function (path, ext) {
 | 
			
		||||
        return /(\.[a-z]*$)|([?;].*)$/.test(path) ? path : path + ext;
 | 
			
		||||
    };
 | 
			
		||||
    AbstractFileManager.prototype.tryAppendLessExtension = function (path) {
 | 
			
		||||
        return this.tryAppendExtension(path, '.less');
 | 
			
		||||
    };
 | 
			
		||||
    AbstractFileManager.prototype.supportsSync = function () {
 | 
			
		||||
        return false;
 | 
			
		||||
    };
 | 
			
		||||
    AbstractFileManager.prototype.alwaysMakePathsAbsolute = function () {
 | 
			
		||||
        return false;
 | 
			
		||||
    };
 | 
			
		||||
    AbstractFileManager.prototype.isPathAbsolute = function (filename) {
 | 
			
		||||
        return (/^(?:[a-z-]+:|\/|\\|#)/i).test(filename);
 | 
			
		||||
    };
 | 
			
		||||
    // TODO: pull out / replace?
 | 
			
		||||
    AbstractFileManager.prototype.join = function (basePath, laterPath) {
 | 
			
		||||
        if (!basePath) {
 | 
			
		||||
            return laterPath;
 | 
			
		||||
        }
 | 
			
		||||
        return basePath + laterPath;
 | 
			
		||||
    };
 | 
			
		||||
    AbstractFileManager.prototype.pathDiff = function (url, baseUrl) {
 | 
			
		||||
        // diff between two paths to create a relative path
 | 
			
		||||
        var urlParts = this.extractUrlParts(url);
 | 
			
		||||
        var baseUrlParts = this.extractUrlParts(baseUrl);
 | 
			
		||||
        var i;
 | 
			
		||||
        var max;
 | 
			
		||||
        var urlDirectories;
 | 
			
		||||
        var baseUrlDirectories;
 | 
			
		||||
        var diff = '';
 | 
			
		||||
        if (urlParts.hostPart !== baseUrlParts.hostPart) {
 | 
			
		||||
            return '';
 | 
			
		||||
        }
 | 
			
		||||
        max = Math.max(baseUrlParts.directories.length, urlParts.directories.length);
 | 
			
		||||
        for (i = 0; i < max; i++) {
 | 
			
		||||
            if (baseUrlParts.directories[i] !== urlParts.directories[i]) {
 | 
			
		||||
                break;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        baseUrlDirectories = baseUrlParts.directories.slice(i);
 | 
			
		||||
        urlDirectories = urlParts.directories.slice(i);
 | 
			
		||||
        for (i = 0; i < baseUrlDirectories.length - 1; i++) {
 | 
			
		||||
            diff += '../';
 | 
			
		||||
        }
 | 
			
		||||
        for (i = 0; i < urlDirectories.length - 1; i++) {
 | 
			
		||||
            diff += urlDirectories[i] + "/";
 | 
			
		||||
        }
 | 
			
		||||
        return diff;
 | 
			
		||||
    };
 | 
			
		||||
    /**
 | 
			
		||||
     * Helper function, not part of API.
 | 
			
		||||
     * This should be replaceable by newer Node / Browser APIs
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} url
 | 
			
		||||
     * @param {string} baseUrl
 | 
			
		||||
     */
 | 
			
		||||
    AbstractFileManager.prototype.extractUrlParts = function (url, baseUrl) {
 | 
			
		||||
        // urlParts[1] = protocol://hostname/ OR /
 | 
			
		||||
        // urlParts[2] = / if path relative to host base
 | 
			
		||||
        // urlParts[3] = directories
 | 
			
		||||
        // urlParts[4] = filename
 | 
			
		||||
        // urlParts[5] = parameters
 | 
			
		||||
        var urlPartsRegex = /^((?:[a-z-]+:)?\/{2}(?:[^/?#]*\/)|([/\\]))?((?:[^/\\?#]*[/\\])*)([^/\\?#]*)([#?].*)?$/i;
 | 
			
		||||
        var urlParts = url.match(urlPartsRegex);
 | 
			
		||||
        var returner = {};
 | 
			
		||||
        var rawDirectories = [];
 | 
			
		||||
        var directories = [];
 | 
			
		||||
        var i;
 | 
			
		||||
        var baseUrlParts;
 | 
			
		||||
        if (!urlParts) {
 | 
			
		||||
            throw new Error("Could not parse sheet href - '" + url + "'");
 | 
			
		||||
        }
 | 
			
		||||
        // Stylesheets in IE don't always return the full path
 | 
			
		||||
        if (baseUrl && (!urlParts[1] || urlParts[2])) {
 | 
			
		||||
            baseUrlParts = baseUrl.match(urlPartsRegex);
 | 
			
		||||
            if (!baseUrlParts) {
 | 
			
		||||
                throw new Error("Could not parse page url - '" + baseUrl + "'");
 | 
			
		||||
            }
 | 
			
		||||
            urlParts[1] = urlParts[1] || baseUrlParts[1] || '';
 | 
			
		||||
            if (!urlParts[2]) {
 | 
			
		||||
                urlParts[3] = baseUrlParts[3] + urlParts[3];
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        if (urlParts[3]) {
 | 
			
		||||
            rawDirectories = urlParts[3].replace(/\\/g, '/').split('/');
 | 
			
		||||
            // collapse '..' and skip '.'
 | 
			
		||||
            for (i = 0; i < rawDirectories.length; i++) {
 | 
			
		||||
                if (rawDirectories[i] === '..') {
 | 
			
		||||
                    directories.pop();
 | 
			
		||||
                }
 | 
			
		||||
                else if (rawDirectories[i] !== '.') {
 | 
			
		||||
                    directories.push(rawDirectories[i]);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        returner.hostPart = urlParts[1];
 | 
			
		||||
        returner.directories = directories;
 | 
			
		||||
        returner.rawPath = (urlParts[1] || '') + rawDirectories.join('/');
 | 
			
		||||
        returner.path = (urlParts[1] || '') + directories.join('/');
 | 
			
		||||
        returner.filename = urlParts[4];
 | 
			
		||||
        returner.fileUrl = returner.path + (urlParts[4] || '');
 | 
			
		||||
        returner.url = returner.fileUrl + (urlParts[5] || '');
 | 
			
		||||
        return returner;
 | 
			
		||||
    };
 | 
			
		||||
    return AbstractFileManager;
 | 
			
		||||
}());
 | 
			
		||||
exports.default = AbstractFileManager;
 | 
			
		||||
//# sourceMappingURL=abstract-file-manager.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/environment/abstract-file-manager.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/environment/abstract-file-manager.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										162
									
								
								node_modules/less/lib/less/environment/abstract-plugin-loader.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										162
									
								
								node_modules/less/lib/less/environment/abstract-plugin-loader.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,162 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var function_registry_1 = tslib_1.__importDefault(require("../functions/function-registry"));
 | 
			
		||||
var less_error_1 = tslib_1.__importDefault(require("../less-error"));
 | 
			
		||||
var AbstractPluginLoader = /** @class */ (function () {
 | 
			
		||||
    function AbstractPluginLoader() {
 | 
			
		||||
        // Implemented by Node.js plugin loader
 | 
			
		||||
        this.require = function () {
 | 
			
		||||
            return null;
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
    AbstractPluginLoader.prototype.evalPlugin = function (contents, context, imports, pluginOptions, fileInfo) {
 | 
			
		||||
        var loader, registry, pluginObj, localModule, pluginManager, filename, result;
 | 
			
		||||
        pluginManager = context.pluginManager;
 | 
			
		||||
        if (fileInfo) {
 | 
			
		||||
            if (typeof fileInfo === 'string') {
 | 
			
		||||
                filename = fileInfo;
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                filename = fileInfo.filename;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        var shortname = (new this.less.FileManager()).extractUrlParts(filename).filename;
 | 
			
		||||
        if (filename) {
 | 
			
		||||
            pluginObj = pluginManager.get(filename);
 | 
			
		||||
            if (pluginObj) {
 | 
			
		||||
                result = this.trySetOptions(pluginObj, filename, shortname, pluginOptions);
 | 
			
		||||
                if (result) {
 | 
			
		||||
                    return result;
 | 
			
		||||
                }
 | 
			
		||||
                try {
 | 
			
		||||
                    if (pluginObj.use) {
 | 
			
		||||
                        pluginObj.use.call(this.context, pluginObj);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                catch (e) {
 | 
			
		||||
                    e.message = e.message || 'Error during @plugin call';
 | 
			
		||||
                    return new less_error_1.default(e, imports, filename);
 | 
			
		||||
                }
 | 
			
		||||
                return pluginObj;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        localModule = {
 | 
			
		||||
            exports: {},
 | 
			
		||||
            pluginManager: pluginManager,
 | 
			
		||||
            fileInfo: fileInfo
 | 
			
		||||
        };
 | 
			
		||||
        registry = function_registry_1.default.create();
 | 
			
		||||
        var registerPlugin = function (obj) {
 | 
			
		||||
            pluginObj = obj;
 | 
			
		||||
        };
 | 
			
		||||
        try {
 | 
			
		||||
            loader = new Function('module', 'require', 'registerPlugin', 'functions', 'tree', 'less', 'fileInfo', contents);
 | 
			
		||||
            loader(localModule, this.require(filename), registerPlugin, registry, this.less.tree, this.less, fileInfo);
 | 
			
		||||
        }
 | 
			
		||||
        catch (e) {
 | 
			
		||||
            return new less_error_1.default(e, imports, filename);
 | 
			
		||||
        }
 | 
			
		||||
        if (!pluginObj) {
 | 
			
		||||
            pluginObj = localModule.exports;
 | 
			
		||||
        }
 | 
			
		||||
        pluginObj = this.validatePlugin(pluginObj, filename, shortname);
 | 
			
		||||
        if (pluginObj instanceof less_error_1.default) {
 | 
			
		||||
            return pluginObj;
 | 
			
		||||
        }
 | 
			
		||||
        if (pluginObj) {
 | 
			
		||||
            pluginObj.imports = imports;
 | 
			
		||||
            pluginObj.filename = filename;
 | 
			
		||||
            // For < 3.x (or unspecified minVersion) - setOptions() before install()
 | 
			
		||||
            if (!pluginObj.minVersion || this.compareVersion('3.0.0', pluginObj.minVersion) < 0) {
 | 
			
		||||
                result = this.trySetOptions(pluginObj, filename, shortname, pluginOptions);
 | 
			
		||||
                if (result) {
 | 
			
		||||
                    return result;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            // Run on first load
 | 
			
		||||
            pluginManager.addPlugin(pluginObj, fileInfo.filename, registry);
 | 
			
		||||
            pluginObj.functions = registry.getLocalFunctions();
 | 
			
		||||
            // Need to call setOptions again because the pluginObj might have functions
 | 
			
		||||
            result = this.trySetOptions(pluginObj, filename, shortname, pluginOptions);
 | 
			
		||||
            if (result) {
 | 
			
		||||
                return result;
 | 
			
		||||
            }
 | 
			
		||||
            // Run every @plugin call
 | 
			
		||||
            try {
 | 
			
		||||
                if (pluginObj.use) {
 | 
			
		||||
                    pluginObj.use.call(this.context, pluginObj);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            catch (e) {
 | 
			
		||||
                e.message = e.message || 'Error during @plugin call';
 | 
			
		||||
                return new less_error_1.default(e, imports, filename);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            return new less_error_1.default({ message: 'Not a valid plugin' }, imports, filename);
 | 
			
		||||
        }
 | 
			
		||||
        return pluginObj;
 | 
			
		||||
    };
 | 
			
		||||
    AbstractPluginLoader.prototype.trySetOptions = function (plugin, filename, name, options) {
 | 
			
		||||
        if (options && !plugin.setOptions) {
 | 
			
		||||
            return new less_error_1.default({
 | 
			
		||||
                message: "Options have been provided but the plugin " + name + " does not support any options."
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
        try {
 | 
			
		||||
            plugin.setOptions && plugin.setOptions(options);
 | 
			
		||||
        }
 | 
			
		||||
        catch (e) {
 | 
			
		||||
            return new less_error_1.default(e);
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
    AbstractPluginLoader.prototype.validatePlugin = function (plugin, filename, name) {
 | 
			
		||||
        if (plugin) {
 | 
			
		||||
            // support plugins being a function
 | 
			
		||||
            // so that the plugin can be more usable programmatically
 | 
			
		||||
            if (typeof plugin === 'function') {
 | 
			
		||||
                plugin = new plugin();
 | 
			
		||||
            }
 | 
			
		||||
            if (plugin.minVersion) {
 | 
			
		||||
                if (this.compareVersion(plugin.minVersion, this.less.version) < 0) {
 | 
			
		||||
                    return new less_error_1.default({
 | 
			
		||||
                        message: "Plugin " + name + " requires version " + this.versionToString(plugin.minVersion)
 | 
			
		||||
                    });
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            return plugin;
 | 
			
		||||
        }
 | 
			
		||||
        return null;
 | 
			
		||||
    };
 | 
			
		||||
    AbstractPluginLoader.prototype.compareVersion = function (aVersion, bVersion) {
 | 
			
		||||
        if (typeof aVersion === 'string') {
 | 
			
		||||
            aVersion = aVersion.match(/^(\d+)\.?(\d+)?\.?(\d+)?/);
 | 
			
		||||
            aVersion.shift();
 | 
			
		||||
        }
 | 
			
		||||
        for (var i = 0; i < aVersion.length; i++) {
 | 
			
		||||
            if (aVersion[i] !== bVersion[i]) {
 | 
			
		||||
                return parseInt(aVersion[i]) > parseInt(bVersion[i]) ? -1 : 1;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return 0;
 | 
			
		||||
    };
 | 
			
		||||
    AbstractPluginLoader.prototype.versionToString = function (version) {
 | 
			
		||||
        var versionString = '';
 | 
			
		||||
        for (var i = 0; i < version.length; i++) {
 | 
			
		||||
            versionString += (versionString ? '.' : '') + version[i];
 | 
			
		||||
        }
 | 
			
		||||
        return versionString;
 | 
			
		||||
    };
 | 
			
		||||
    AbstractPluginLoader.prototype.printUsage = function (plugins) {
 | 
			
		||||
        for (var i = 0; i < plugins.length; i++) {
 | 
			
		||||
            var plugin = plugins[i];
 | 
			
		||||
            if (plugin.printUsage) {
 | 
			
		||||
                plugin.printUsage();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
    return AbstractPluginLoader;
 | 
			
		||||
}());
 | 
			
		||||
exports.default = AbstractPluginLoader;
 | 
			
		||||
//# sourceMappingURL=abstract-plugin-loader.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/environment/abstract-plugin-loader.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/environment/abstract-plugin-loader.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										3
									
								
								node_modules/less/lib/less/environment/environment-api.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								node_modules/less/lib/less/environment/environment-api.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,3 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
//# sourceMappingURL=environment-api.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/environment/environment-api.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/environment/environment-api.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"environment-api.js","sourceRoot":"","sources":["../../../src/less/environment/environment-api.ts"],"names":[],"mappings":"","sourcesContent":["export interface Environment {\n    /**\n     * Converts a string to a base 64 string\n     */\n    encodeBase64(str: string): string\n    /**\n     * Lookup the mime-type of a filename\n     */\n    mimeLookup(filename: string): string\n    /**\n     * Look up the charset of a mime type\n     * @param mime\n     */\n    charsetLookup(mime: string): string\n    /**\n     * Gets a source map generator\n     *\n     * @todo - Figure out precise type\n     */\n    getSourceMapGenerator(): any\n}\n"]}
 | 
			
		||||
							
								
								
									
										55
									
								
								node_modules/less/lib/less/environment/environment.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								node_modules/less/lib/less/environment/environment.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,55 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
/**
 | 
			
		||||
 * @todo Document why this abstraction exists, and the relationship between
 | 
			
		||||
 *       environment, file managers, and plugin manager
 | 
			
		||||
 */
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var logger_1 = tslib_1.__importDefault(require("../logger"));
 | 
			
		||||
var Environment = /** @class */ (function () {
 | 
			
		||||
    function Environment(externalEnvironment, fileManagers) {
 | 
			
		||||
        this.fileManagers = fileManagers || [];
 | 
			
		||||
        externalEnvironment = externalEnvironment || {};
 | 
			
		||||
        var optionalFunctions = ['encodeBase64', 'mimeLookup', 'charsetLookup', 'getSourceMapGenerator'];
 | 
			
		||||
        var requiredFunctions = [];
 | 
			
		||||
        var functions = requiredFunctions.concat(optionalFunctions);
 | 
			
		||||
        for (var i = 0; i < functions.length; i++) {
 | 
			
		||||
            var propName = functions[i];
 | 
			
		||||
            var environmentFunc = externalEnvironment[propName];
 | 
			
		||||
            if (environmentFunc) {
 | 
			
		||||
                this[propName] = environmentFunc.bind(externalEnvironment);
 | 
			
		||||
            }
 | 
			
		||||
            else if (i < requiredFunctions.length) {
 | 
			
		||||
                this.warn("missing required function in environment - " + propName);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    Environment.prototype.getFileManager = function (filename, currentDirectory, options, environment, isSync) {
 | 
			
		||||
        if (!filename) {
 | 
			
		||||
            logger_1.default.warn('getFileManager called with no filename.. Please report this issue. continuing.');
 | 
			
		||||
        }
 | 
			
		||||
        if (currentDirectory === undefined) {
 | 
			
		||||
            logger_1.default.warn('getFileManager called with null directory.. Please report this issue. continuing.');
 | 
			
		||||
        }
 | 
			
		||||
        var fileManagers = this.fileManagers;
 | 
			
		||||
        if (options.pluginManager) {
 | 
			
		||||
            fileManagers = [].concat(fileManagers).concat(options.pluginManager.getFileManagers());
 | 
			
		||||
        }
 | 
			
		||||
        for (var i = fileManagers.length - 1; i >= 0; i--) {
 | 
			
		||||
            var fileManager = fileManagers[i];
 | 
			
		||||
            if (fileManager[isSync ? 'supportsSync' : 'supports'](filename, currentDirectory, options, environment)) {
 | 
			
		||||
                return fileManager;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return null;
 | 
			
		||||
    };
 | 
			
		||||
    Environment.prototype.addFileManager = function (fileManager) {
 | 
			
		||||
        this.fileManagers.push(fileManager);
 | 
			
		||||
    };
 | 
			
		||||
    Environment.prototype.clearFileManagers = function () {
 | 
			
		||||
        this.fileManagers = [];
 | 
			
		||||
    };
 | 
			
		||||
    return Environment;
 | 
			
		||||
}());
 | 
			
		||||
exports.default = Environment;
 | 
			
		||||
//# sourceMappingURL=environment.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/environment/environment.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/environment/environment.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../src/less/environment/environment.js"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6DAA+B;AAE/B;IACI,qBAAY,mBAAmB,EAAE,YAAY;QACzC,IAAI,CAAC,YAAY,GAAG,YAAY,IAAI,EAAE,CAAC;QACvC,mBAAmB,GAAG,mBAAmB,IAAI,EAAE,CAAC;QAEhD,IAAM,iBAAiB,GAAG,CAAC,cAAc,EAAE,YAAY,EAAE,eAAe,EAAE,uBAAuB,CAAC,CAAC;QACnG,IAAM,iBAAiB,GAAG,EAAE,CAAC;QAC7B,IAAM,SAAS,GAAG,iBAAiB,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAE9D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACvC,IAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;YAC9B,IAAM,eAAe,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;YACtD,IAAI,eAAe,EAAE;gBACjB,IAAI,CAAC,QAAQ,CAAC,GAAG,eAAe,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;aAC9D;iBAAM,IAAI,CAAC,GAAG,iBAAiB,CAAC,MAAM,EAAE;gBACrC,IAAI,CAAC,IAAI,CAAC,gDAA8C,QAAU,CAAC,CAAC;aACvE;SACJ;IACL,CAAC;IAED,oCAAc,GAAd,UAAe,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM;QAEnE,IAAI,CAAC,QAAQ,EAAE;YACX,gBAAM,CAAC,IAAI,CAAC,gFAAgF,CAAC,CAAC;SACjG;QACD,IAAI,gBAAgB,KAAK,SAAS,EAAE;YAChC,gBAAM,CAAC,IAAI,CAAC,mFAAmF,CAAC,CAAC;SACpG;QAED,IAAI,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QACrC,IAAI,OAAO,CAAC,aAAa,EAAE;YACvB,YAAY,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC,CAAC;SAC1F;QACD,KAAK,IAAI,CAAC,GAAG,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAG,CAAC,EAAE,EAAE;YAChD,IAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;YACpC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE;gBACrG,OAAO,WAAW,CAAC;aACtB;SACJ;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,oCAAc,GAAd,UAAe,WAAW;QACtB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACxC,CAAC;IAED,uCAAiB,GAAjB;QACI,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;IAC3B,CAAC;IACL,kBAAC;AAAD,CAAC,AAjDD,IAiDC;AAED,kBAAe,WAAW,CAAC","sourcesContent":["/**\n * @todo Document why this abstraction exists, and the relationship between\n *       environment, file managers, and plugin manager\n */\n\nimport logger from '../logger';\n\nclass Environment {\n    constructor(externalEnvironment, fileManagers) {\n        this.fileManagers = fileManagers || [];\n        externalEnvironment = externalEnvironment || {};\n\n        const optionalFunctions = ['encodeBase64', 'mimeLookup', 'charsetLookup', 'getSourceMapGenerator'];\n        const requiredFunctions = [];\n        const functions = requiredFunctions.concat(optionalFunctions);\n\n        for (let i = 0; i < functions.length; i++) {\n            const propName = functions[i];\n            const environmentFunc = externalEnvironment[propName];\n            if (environmentFunc) {\n                this[propName] = environmentFunc.bind(externalEnvironment);\n            } else if (i < requiredFunctions.length) {\n                this.warn(`missing required function in environment - ${propName}`);\n            }\n        }\n    }\n\n    getFileManager(filename, currentDirectory, options, environment, isSync) {\n\n        if (!filename) {\n            logger.warn('getFileManager called with no filename.. Please report this issue. continuing.');\n        }\n        if (currentDirectory === undefined) {\n            logger.warn('getFileManager called with null directory.. Please report this issue. continuing.');\n        }\n\n        let fileManagers = this.fileManagers;\n        if (options.pluginManager) {\n            fileManagers = [].concat(fileManagers).concat(options.pluginManager.getFileManagers());\n        }\n        for (let i = fileManagers.length - 1; i >= 0 ; i--) {\n            const fileManager = fileManagers[i];\n            if (fileManager[isSync ? 'supportsSync' : 'supports'](filename, currentDirectory, options, environment)) {\n                return fileManager;\n            }\n        }\n        return null;\n    }\n\n    addFileManager(fileManager) {\n        this.fileManagers.push(fileManager);\n    }\n\n    clearFileManagers() {\n        this.fileManagers = [];\n    }\n}\n\nexport default Environment;\n"]}
 | 
			
		||||
							
								
								
									
										3
									
								
								node_modules/less/lib/less/environment/file-manager-api.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								node_modules/less/lib/less/environment/file-manager-api.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,3 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
//# sourceMappingURL=file-manager-api.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/environment/file-manager-api.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/environment/file-manager-api.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"file-manager-api.js","sourceRoot":"","sources":["../../../src/less/environment/file-manager-api.ts"],"names":[],"mappings":"","sourcesContent":["import type { Environment } from './environment-api'\n\nexport interface FileManager {\n    /**\n     * Given the full path to a file, return the path component\n     * Provided by AbstractFileManager\n     */\n    getPath(filename: string): string\n    /**\n     * Append a .less extension if appropriate. Only called if less thinks one could be added.\n     * Provided by AbstractFileManager\n     */\n    tryAppendLessExtension(filename: string): string\n    /**\n     * Whether the rootpath should be converted to be absolute.\n     * The browser ovverides this to return true because urls must be absolute.\n     * Provided by AbstractFileManager (returns false)\n     */\n    alwaysMakePathsAbsolute(): boolean\n    /**\n     * Returns whether a path is absolute\n     * Provided by AbstractFileManager\n     */\n    isPathAbsolute(path: string): boolean\n    /**\n     * joins together 2 paths\n     * Provided by AbstractFileManager\n     */\n    join(basePath: string, laterPath: string): string\n    /**\n     * Returns the difference between 2 paths\n     * E.g. url = a/ baseUrl = a/b/ returns ../\n     * url = a/b/ baseUrl = a/ returns b/\n     * Provided by AbstractFileManager\n     */\n    pathDiff(url: string, baseUrl: string): string\n    /**\n     * Returns whether this file manager supports this file for syncronous file retrieval\n     * If true is returned, loadFileSync will then be called with the file.\n     * Provided by AbstractFileManager (returns false)\n     * \n     * @todo - Narrow Options type\n     */\n    supportsSync(\n        filename: string,\n        currentDirectory: string,\n        options: Record<string, any>,\n        environment: Environment\n    ): boolean\n    /**\n     * If file manager supports async file retrieval for this file type\n     */\n    supports(\n        filename: string,\n        currentDirectory: string,\n        options: Record<string, any>,\n        environment: Environment\n    ): boolean\n    /**\n     * Loads a file asynchronously.\n     */\n    loadFile(\n        filename: string,\n        currentDirectory: string,\n        options: Record<string, any>,\n        environment: Environment\n    ): Promise<{ filename: string, contents: string }>\n    /**\n     * Loads a file synchronously. Expects an immediate return with an object\n     */\n    loadFileSync(\n        filename: string,\n        currentDirectory: string,\n        options: Record<string, any>,\n        environment: Environment\n    ): { error?: unknown, filename: string, contents: string }\n}\n"]}
 | 
			
		||||
							
								
								
									
										29
									
								
								node_modules/less/lib/less/functions/boolean.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								node_modules/less/lib/less/functions/boolean.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,29 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var anonymous_1 = tslib_1.__importDefault(require("../tree/anonymous"));
 | 
			
		||||
var keyword_1 = tslib_1.__importDefault(require("../tree/keyword"));
 | 
			
		||||
function boolean(condition) {
 | 
			
		||||
    return condition ? keyword_1.default.True : keyword_1.default.False;
 | 
			
		||||
}
 | 
			
		||||
/**
 | 
			
		||||
 * Functions with evalArgs set to false are sent context
 | 
			
		||||
 * as the first argument.
 | 
			
		||||
 */
 | 
			
		||||
function If(context, condition, trueValue, falseValue) {
 | 
			
		||||
    return condition.eval(context) ? trueValue.eval(context)
 | 
			
		||||
        : (falseValue ? falseValue.eval(context) : new anonymous_1.default);
 | 
			
		||||
}
 | 
			
		||||
If.evalArgs = false;
 | 
			
		||||
function isdefined(context, variable) {
 | 
			
		||||
    try {
 | 
			
		||||
        variable.eval(context);
 | 
			
		||||
        return keyword_1.default.True;
 | 
			
		||||
    }
 | 
			
		||||
    catch (e) {
 | 
			
		||||
        return keyword_1.default.False;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
isdefined.evalArgs = false;
 | 
			
		||||
exports.default = { isdefined: isdefined, boolean: boolean, 'if': If };
 | 
			
		||||
//# sourceMappingURL=boolean.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/functions/boolean.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/functions/boolean.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"boolean.js","sourceRoot":"","sources":["../../../src/less/functions/boolean.js"],"names":[],"mappings":";;;AAAA,wEAA0C;AAC1C,oEAAsC;AAEtC,SAAS,OAAO,CAAC,SAAS;IACtB,OAAO,SAAS,CAAC,CAAC,CAAC,iBAAO,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAO,CAAC,KAAK,CAAC;AACpD,CAAC;AAED;;;GAGG;AACH,SAAS,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU;IACjD,OAAO,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC;QACpD,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,mBAAS,CAAC,CAAC;AAClE,CAAC;AACD,EAAE,CAAC,QAAQ,GAAG,KAAK,CAAC;AAEpB,SAAS,SAAS,CAAC,OAAO,EAAE,QAAQ;IAChC,IAAI;QACA,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,OAAO,iBAAO,CAAC,IAAI,CAAC;KACvB;IAAC,OAAO,CAAC,EAAE;QACR,OAAO,iBAAO,CAAC,KAAK,CAAC;KACxB;AACL,CAAC;AAED,SAAS,CAAC,QAAQ,GAAG,KAAK,CAAC;AAE3B,kBAAe,EAAE,SAAS,WAAA,EAAE,OAAO,SAAA,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC","sourcesContent":["import Anonymous from '../tree/anonymous';\nimport Keyword from '../tree/keyword';\n\nfunction boolean(condition) {\n    return condition ? Keyword.True : Keyword.False;\n}\n\n/**\n * Functions with evalArgs set to false are sent context\n * as the first argument.\n */\nfunction If(context, condition, trueValue, falseValue) {\n    return condition.eval(context) ? trueValue.eval(context)\n        : (falseValue ? falseValue.eval(context) : new Anonymous);\n}\nIf.evalArgs = false;\n\nfunction isdefined(context, variable) {\n    try {\n        variable.eval(context);\n        return Keyword.True;\n    } catch (e) {\n        return Keyword.False;\n    }\n}\n\nisdefined.evalArgs = false;\n\nexport default { isdefined, boolean, 'if': If };\n"]}
 | 
			
		||||
							
								
								
									
										77
									
								
								node_modules/less/lib/less/functions/color-blending.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								node_modules/less/lib/less/functions/color-blending.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,77 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var color_1 = tslib_1.__importDefault(require("../tree/color"));
 | 
			
		||||
// Color Blending
 | 
			
		||||
// ref: http://www.w3.org/TR/compositing-1
 | 
			
		||||
function colorBlend(mode, color1, color2) {
 | 
			
		||||
    var ab = color1.alpha; // result
 | 
			
		||||
    var // backdrop
 | 
			
		||||
    cb;
 | 
			
		||||
    var as = color2.alpha;
 | 
			
		||||
    var // source
 | 
			
		||||
    cs;
 | 
			
		||||
    var ar;
 | 
			
		||||
    var cr;
 | 
			
		||||
    var r = [];
 | 
			
		||||
    ar = as + ab * (1 - as);
 | 
			
		||||
    for (var i = 0; i < 3; i++) {
 | 
			
		||||
        cb = color1.rgb[i] / 255;
 | 
			
		||||
        cs = color2.rgb[i] / 255;
 | 
			
		||||
        cr = mode(cb, cs);
 | 
			
		||||
        if (ar) {
 | 
			
		||||
            cr = (as * cs + ab * (cb -
 | 
			
		||||
                as * (cb + cs - cr))) / ar;
 | 
			
		||||
        }
 | 
			
		||||
        r[i] = cr * 255;
 | 
			
		||||
    }
 | 
			
		||||
    return new color_1.default(r, ar);
 | 
			
		||||
}
 | 
			
		||||
var colorBlendModeFunctions = {
 | 
			
		||||
    multiply: function (cb, cs) {
 | 
			
		||||
        return cb * cs;
 | 
			
		||||
    },
 | 
			
		||||
    screen: function (cb, cs) {
 | 
			
		||||
        return cb + cs - cb * cs;
 | 
			
		||||
    },
 | 
			
		||||
    overlay: function (cb, cs) {
 | 
			
		||||
        cb *= 2;
 | 
			
		||||
        return (cb <= 1) ?
 | 
			
		||||
            colorBlendModeFunctions.multiply(cb, cs) :
 | 
			
		||||
            colorBlendModeFunctions.screen(cb - 1, cs);
 | 
			
		||||
    },
 | 
			
		||||
    softlight: function (cb, cs) {
 | 
			
		||||
        var d = 1;
 | 
			
		||||
        var e = cb;
 | 
			
		||||
        if (cs > 0.5) {
 | 
			
		||||
            e = 1;
 | 
			
		||||
            d = (cb > 0.25) ? Math.sqrt(cb)
 | 
			
		||||
                : ((16 * cb - 12) * cb + 4) * cb;
 | 
			
		||||
        }
 | 
			
		||||
        return cb - (1 - 2 * cs) * e * (d - cb);
 | 
			
		||||
    },
 | 
			
		||||
    hardlight: function (cb, cs) {
 | 
			
		||||
        return colorBlendModeFunctions.overlay(cs, cb);
 | 
			
		||||
    },
 | 
			
		||||
    difference: function (cb, cs) {
 | 
			
		||||
        return Math.abs(cb - cs);
 | 
			
		||||
    },
 | 
			
		||||
    exclusion: function (cb, cs) {
 | 
			
		||||
        return cb + cs - 2 * cb * cs;
 | 
			
		||||
    },
 | 
			
		||||
    // non-w3c functions:
 | 
			
		||||
    average: function (cb, cs) {
 | 
			
		||||
        return (cb + cs) / 2;
 | 
			
		||||
    },
 | 
			
		||||
    negation: function (cb, cs) {
 | 
			
		||||
        return 1 - Math.abs(cb + cs - 1);
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
for (var f in colorBlendModeFunctions) {
 | 
			
		||||
    // eslint-disable-next-line no-prototype-builtins
 | 
			
		||||
    if (colorBlendModeFunctions.hasOwnProperty(f)) {
 | 
			
		||||
        colorBlend[f] = colorBlend.bind(null, colorBlendModeFunctions[f]);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
exports.default = colorBlend;
 | 
			
		||||
//# sourceMappingURL=color-blending.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/functions/color-blending.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/functions/color-blending.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"color-blending.js","sourceRoot":"","sources":["../../../src/less/functions/color-blending.js"],"names":[],"mappings":";;;AAAA,gEAAkC;AAElC,iBAAiB;AACjB,0CAA0C;AAE1C,SAAS,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM;IACpC,IAAM,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAQ,SAAS;IAEzC,IAAI,WAAW;IACX,EAAE,CAAC;IAEP,IAAM,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC;IAExB,IAAI,SAAS;IACT,EAAE,CAAC;IAEP,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC;IACP,IAAM,CAAC,GAAG,EAAE,CAAC;IAEb,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACxB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QACxB,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;QACzB,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;QACzB,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAClB,IAAI,EAAE,EAAE;YACJ,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE;gBAClB,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;SACpC;QACD,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC;KACnB;IAED,OAAO,IAAI,eAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAC5B,CAAC;AAED,IAAM,uBAAuB,GAAG;IAC5B,QAAQ,EAAE,UAAS,EAAE,EAAE,EAAE;QACrB,OAAO,EAAE,GAAG,EAAE,CAAC;IACnB,CAAC;IACD,MAAM,EAAE,UAAS,EAAE,EAAE,EAAE;QACnB,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IAC7B,CAAC;IACD,OAAO,EAAE,UAAS,EAAE,EAAE,EAAE;QACpB,EAAE,IAAI,CAAC,CAAC;QACR,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;YACd,uBAAuB,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;YAC1C,uBAAuB,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IACnD,CAAC;IACD,SAAS,EAAE,UAAS,EAAE,EAAE,EAAE;QACtB,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,IAAI,CAAC,GAAG,EAAE,CAAC;QACX,IAAI,EAAE,GAAG,GAAG,EAAE;YACV,CAAC,GAAG,CAAC,CAAC;YACN,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC3B,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;SACxC;QACD,OAAO,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC5C,CAAC;IACD,SAAS,EAAE,UAAS,EAAE,EAAE,EAAE;QACtB,OAAO,uBAAuB,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACnD,CAAC;IACD,UAAU,EAAE,UAAS,EAAE,EAAE,EAAE;QACvB,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;IAC7B,CAAC;IACD,SAAS,EAAE,UAAS,EAAE,EAAE,EAAE;QACtB,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;IACjC,CAAC;IAED,qBAAqB;IACrB,OAAO,EAAE,UAAS,EAAE,EAAE,EAAE;QACpB,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IACD,QAAQ,EAAE,UAAS,EAAE,EAAE,EAAE;QACrB,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IACrC,CAAC;CACJ,CAAC;AAEF,KAAK,IAAM,CAAC,IAAI,uBAAuB,EAAE;IACrC,iDAAiD;IACjD,IAAI,uBAAuB,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;QAC3C,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC;KACrE;CACJ;AAED,kBAAe,UAAU,CAAC","sourcesContent":["import Color from '../tree/color';\n\n// Color Blending\n// ref: http://www.w3.org/TR/compositing-1\n\nfunction colorBlend(mode, color1, color2) {\n    const ab = color1.alpha;        // result\n\n    let // backdrop\n        cb;\n\n    const as = color2.alpha;\n\n    let // source\n        cs;\n\n    let ar;\n    let cr;\n    const r = [];\n\n    ar = as + ab * (1 - as);\n    for (let i = 0; i < 3; i++) {\n        cb = color1.rgb[i] / 255;\n        cs = color2.rgb[i] / 255;\n        cr = mode(cb, cs);\n        if (ar) {\n            cr = (as * cs + ab * (cb -\n                  as * (cb + cs - cr))) / ar;\n        }\n        r[i] = cr * 255;\n    }\n\n    return new Color(r, ar);\n}\n\nconst colorBlendModeFunctions = {\n    multiply: function(cb, cs) {\n        return cb * cs;\n    },\n    screen: function(cb, cs) {\n        return cb + cs - cb * cs;\n    },\n    overlay: function(cb, cs) {\n        cb *= 2;\n        return (cb <= 1) ?\n            colorBlendModeFunctions.multiply(cb, cs) :\n            colorBlendModeFunctions.screen(cb - 1, cs);\n    },\n    softlight: function(cb, cs) {\n        let d = 1;\n        let e = cb;\n        if (cs > 0.5) {\n            e = 1;\n            d = (cb > 0.25) ? Math.sqrt(cb)\n                : ((16 * cb - 12) * cb + 4) * cb;\n        }\n        return cb - (1 - 2 * cs) * e * (d - cb);\n    },\n    hardlight: function(cb, cs) {\n        return colorBlendModeFunctions.overlay(cs, cb);\n    },\n    difference: function(cb, cs) {\n        return Math.abs(cb - cs);\n    },\n    exclusion: function(cb, cs) {\n        return cb + cs - 2 * cb * cs;\n    },\n\n    // non-w3c functions:\n    average: function(cb, cs) {\n        return (cb + cs) / 2;\n    },\n    negation: function(cb, cs) {\n        return 1 - Math.abs(cb + cs - 1);\n    }\n};\n\nfor (const f in colorBlendModeFunctions) {\n    // eslint-disable-next-line no-prototype-builtins\n    if (colorBlendModeFunctions.hasOwnProperty(f)) {\n        colorBlend[f] = colorBlend.bind(null, colorBlendModeFunctions[f]);\n    }\n}\n\nexport default colorBlend;\n"]}
 | 
			
		||||
							
								
								
									
										436
									
								
								node_modules/less/lib/less/functions/color.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										436
									
								
								node_modules/less/lib/less/functions/color.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,436 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var dimension_1 = tslib_1.__importDefault(require("../tree/dimension"));
 | 
			
		||||
var color_1 = tslib_1.__importDefault(require("../tree/color"));
 | 
			
		||||
var quoted_1 = tslib_1.__importDefault(require("../tree/quoted"));
 | 
			
		||||
var anonymous_1 = tslib_1.__importDefault(require("../tree/anonymous"));
 | 
			
		||||
var expression_1 = tslib_1.__importDefault(require("../tree/expression"));
 | 
			
		||||
var operation_1 = tslib_1.__importDefault(require("../tree/operation"));
 | 
			
		||||
var colorFunctions;
 | 
			
		||||
function clamp(val) {
 | 
			
		||||
    return Math.min(1, Math.max(0, val));
 | 
			
		||||
}
 | 
			
		||||
function hsla(origColor, hsl) {
 | 
			
		||||
    var color = colorFunctions.hsla(hsl.h, hsl.s, hsl.l, hsl.a);
 | 
			
		||||
    if (color) {
 | 
			
		||||
        if (origColor.value &&
 | 
			
		||||
            /^(rgb|hsl)/.test(origColor.value)) {
 | 
			
		||||
            color.value = origColor.value;
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            color.value = 'rgb';
 | 
			
		||||
        }
 | 
			
		||||
        return color;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
function toHSL(color) {
 | 
			
		||||
    if (color.toHSL) {
 | 
			
		||||
        return color.toHSL();
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
        throw new Error('Argument cannot be evaluated to a color');
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
function toHSV(color) {
 | 
			
		||||
    if (color.toHSV) {
 | 
			
		||||
        return color.toHSV();
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
        throw new Error('Argument cannot be evaluated to a color');
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
function number(n) {
 | 
			
		||||
    if (n instanceof dimension_1.default) {
 | 
			
		||||
        return parseFloat(n.unit.is('%') ? n.value / 100 : n.value);
 | 
			
		||||
    }
 | 
			
		||||
    else if (typeof n === 'number') {
 | 
			
		||||
        return n;
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
        throw {
 | 
			
		||||
            type: 'Argument',
 | 
			
		||||
            message: 'color functions take numbers as parameters'
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
function scaled(n, size) {
 | 
			
		||||
    if (n instanceof dimension_1.default && n.unit.is('%')) {
 | 
			
		||||
        return parseFloat(n.value * size / 100);
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
        return number(n);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
colorFunctions = {
 | 
			
		||||
    rgb: function (r, g, b) {
 | 
			
		||||
        var a = 1;
 | 
			
		||||
        /**
 | 
			
		||||
         * Comma-less syntax
 | 
			
		||||
         *   e.g. rgb(0 128 255 / 50%)
 | 
			
		||||
         */
 | 
			
		||||
        if (r instanceof expression_1.default) {
 | 
			
		||||
            var val = r.value;
 | 
			
		||||
            r = val[0];
 | 
			
		||||
            g = val[1];
 | 
			
		||||
            b = val[2];
 | 
			
		||||
            /**
 | 
			
		||||
             * @todo - should this be normalized in
 | 
			
		||||
             *   function caller? Or parsed differently?
 | 
			
		||||
             */
 | 
			
		||||
            if (b instanceof operation_1.default) {
 | 
			
		||||
                var op = b;
 | 
			
		||||
                b = op.operands[0];
 | 
			
		||||
                a = op.operands[1];
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        var color = colorFunctions.rgba(r, g, b, a);
 | 
			
		||||
        if (color) {
 | 
			
		||||
            color.value = 'rgb';
 | 
			
		||||
            return color;
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    rgba: function (r, g, b, a) {
 | 
			
		||||
        try {
 | 
			
		||||
            if (r instanceof color_1.default) {
 | 
			
		||||
                if (g) {
 | 
			
		||||
                    a = number(g);
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    a = r.alpha;
 | 
			
		||||
                }
 | 
			
		||||
                return new color_1.default(r.rgb, a, 'rgba');
 | 
			
		||||
            }
 | 
			
		||||
            var rgb = [r, g, b].map(function (c) { return scaled(c, 255); });
 | 
			
		||||
            a = number(a);
 | 
			
		||||
            return new color_1.default(rgb, a, 'rgba');
 | 
			
		||||
        }
 | 
			
		||||
        catch (e) { }
 | 
			
		||||
    },
 | 
			
		||||
    hsl: function (h, s, l) {
 | 
			
		||||
        var a = 1;
 | 
			
		||||
        if (h instanceof expression_1.default) {
 | 
			
		||||
            var val = h.value;
 | 
			
		||||
            h = val[0];
 | 
			
		||||
            s = val[1];
 | 
			
		||||
            l = val[2];
 | 
			
		||||
            if (l instanceof operation_1.default) {
 | 
			
		||||
                var op = l;
 | 
			
		||||
                l = op.operands[0];
 | 
			
		||||
                a = op.operands[1];
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        var color = colorFunctions.hsla(h, s, l, a);
 | 
			
		||||
        if (color) {
 | 
			
		||||
            color.value = 'hsl';
 | 
			
		||||
            return color;
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    hsla: function (h, s, l, a) {
 | 
			
		||||
        var m1;
 | 
			
		||||
        var m2;
 | 
			
		||||
        function hue(h) {
 | 
			
		||||
            h = h < 0 ? h + 1 : (h > 1 ? h - 1 : h);
 | 
			
		||||
            if (h * 6 < 1) {
 | 
			
		||||
                return m1 + (m2 - m1) * h * 6;
 | 
			
		||||
            }
 | 
			
		||||
            else if (h * 2 < 1) {
 | 
			
		||||
                return m2;
 | 
			
		||||
            }
 | 
			
		||||
            else if (h * 3 < 2) {
 | 
			
		||||
                return m1 + (m2 - m1) * (2 / 3 - h) * 6;
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                return m1;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        try {
 | 
			
		||||
            if (h instanceof color_1.default) {
 | 
			
		||||
                if (s) {
 | 
			
		||||
                    a = number(s);
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    a = h.alpha;
 | 
			
		||||
                }
 | 
			
		||||
                return new color_1.default(h.rgb, a, 'hsla');
 | 
			
		||||
            }
 | 
			
		||||
            h = (number(h) % 360) / 360;
 | 
			
		||||
            s = clamp(number(s));
 | 
			
		||||
            l = clamp(number(l));
 | 
			
		||||
            a = clamp(number(a));
 | 
			
		||||
            m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;
 | 
			
		||||
            m1 = l * 2 - m2;
 | 
			
		||||
            var rgb = [
 | 
			
		||||
                hue(h + 1 / 3) * 255,
 | 
			
		||||
                hue(h) * 255,
 | 
			
		||||
                hue(h - 1 / 3) * 255
 | 
			
		||||
            ];
 | 
			
		||||
            a = number(a);
 | 
			
		||||
            return new color_1.default(rgb, a, 'hsla');
 | 
			
		||||
        }
 | 
			
		||||
        catch (e) { }
 | 
			
		||||
    },
 | 
			
		||||
    hsv: function (h, s, v) {
 | 
			
		||||
        return colorFunctions.hsva(h, s, v, 1.0);
 | 
			
		||||
    },
 | 
			
		||||
    hsva: function (h, s, v, a) {
 | 
			
		||||
        h = ((number(h) % 360) / 360) * 360;
 | 
			
		||||
        s = number(s);
 | 
			
		||||
        v = number(v);
 | 
			
		||||
        a = number(a);
 | 
			
		||||
        var i;
 | 
			
		||||
        var f;
 | 
			
		||||
        i = Math.floor((h / 60) % 6);
 | 
			
		||||
        f = (h / 60) - i;
 | 
			
		||||
        var vs = [v,
 | 
			
		||||
            v * (1 - s),
 | 
			
		||||
            v * (1 - f * s),
 | 
			
		||||
            v * (1 - (1 - f) * s)];
 | 
			
		||||
        var perm = [[0, 3, 1],
 | 
			
		||||
            [2, 0, 1],
 | 
			
		||||
            [1, 0, 3],
 | 
			
		||||
            [1, 2, 0],
 | 
			
		||||
            [3, 1, 0],
 | 
			
		||||
            [0, 1, 2]];
 | 
			
		||||
        return colorFunctions.rgba(vs[perm[i][0]] * 255, vs[perm[i][1]] * 255, vs[perm[i][2]] * 255, a);
 | 
			
		||||
    },
 | 
			
		||||
    hue: function (color) {
 | 
			
		||||
        return new dimension_1.default(toHSL(color).h);
 | 
			
		||||
    },
 | 
			
		||||
    saturation: function (color) {
 | 
			
		||||
        return new dimension_1.default(toHSL(color).s * 100, '%');
 | 
			
		||||
    },
 | 
			
		||||
    lightness: function (color) {
 | 
			
		||||
        return new dimension_1.default(toHSL(color).l * 100, '%');
 | 
			
		||||
    },
 | 
			
		||||
    hsvhue: function (color) {
 | 
			
		||||
        return new dimension_1.default(toHSV(color).h);
 | 
			
		||||
    },
 | 
			
		||||
    hsvsaturation: function (color) {
 | 
			
		||||
        return new dimension_1.default(toHSV(color).s * 100, '%');
 | 
			
		||||
    },
 | 
			
		||||
    hsvvalue: function (color) {
 | 
			
		||||
        return new dimension_1.default(toHSV(color).v * 100, '%');
 | 
			
		||||
    },
 | 
			
		||||
    red: function (color) {
 | 
			
		||||
        return new dimension_1.default(color.rgb[0]);
 | 
			
		||||
    },
 | 
			
		||||
    green: function (color) {
 | 
			
		||||
        return new dimension_1.default(color.rgb[1]);
 | 
			
		||||
    },
 | 
			
		||||
    blue: function (color) {
 | 
			
		||||
        return new dimension_1.default(color.rgb[2]);
 | 
			
		||||
    },
 | 
			
		||||
    alpha: function (color) {
 | 
			
		||||
        return new dimension_1.default(toHSL(color).a);
 | 
			
		||||
    },
 | 
			
		||||
    luma: function (color) {
 | 
			
		||||
        return new dimension_1.default(color.luma() * color.alpha * 100, '%');
 | 
			
		||||
    },
 | 
			
		||||
    luminance: function (color) {
 | 
			
		||||
        var luminance = (0.2126 * color.rgb[0] / 255) +
 | 
			
		||||
            (0.7152 * color.rgb[1] / 255) +
 | 
			
		||||
            (0.0722 * color.rgb[2] / 255);
 | 
			
		||||
        return new dimension_1.default(luminance * color.alpha * 100, '%');
 | 
			
		||||
    },
 | 
			
		||||
    saturate: function (color, amount, method) {
 | 
			
		||||
        // filter: saturate(3.2);
 | 
			
		||||
        // should be kept as is, so check for color
 | 
			
		||||
        if (!color.rgb) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
        var hsl = toHSL(color);
 | 
			
		||||
        if (typeof method !== 'undefined' && method.value === 'relative') {
 | 
			
		||||
            hsl.s += hsl.s * amount.value / 100;
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            hsl.s += amount.value / 100;
 | 
			
		||||
        }
 | 
			
		||||
        hsl.s = clamp(hsl.s);
 | 
			
		||||
        return hsla(color, hsl);
 | 
			
		||||
    },
 | 
			
		||||
    desaturate: function (color, amount, method) {
 | 
			
		||||
        var hsl = toHSL(color);
 | 
			
		||||
        if (typeof method !== 'undefined' && method.value === 'relative') {
 | 
			
		||||
            hsl.s -= hsl.s * amount.value / 100;
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            hsl.s -= amount.value / 100;
 | 
			
		||||
        }
 | 
			
		||||
        hsl.s = clamp(hsl.s);
 | 
			
		||||
        return hsla(color, hsl);
 | 
			
		||||
    },
 | 
			
		||||
    lighten: function (color, amount, method) {
 | 
			
		||||
        var hsl = toHSL(color);
 | 
			
		||||
        if (typeof method !== 'undefined' && method.value === 'relative') {
 | 
			
		||||
            hsl.l += hsl.l * amount.value / 100;
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            hsl.l += amount.value / 100;
 | 
			
		||||
        }
 | 
			
		||||
        hsl.l = clamp(hsl.l);
 | 
			
		||||
        return hsla(color, hsl);
 | 
			
		||||
    },
 | 
			
		||||
    darken: function (color, amount, method) {
 | 
			
		||||
        var hsl = toHSL(color);
 | 
			
		||||
        if (typeof method !== 'undefined' && method.value === 'relative') {
 | 
			
		||||
            hsl.l -= hsl.l * amount.value / 100;
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            hsl.l -= amount.value / 100;
 | 
			
		||||
        }
 | 
			
		||||
        hsl.l = clamp(hsl.l);
 | 
			
		||||
        return hsla(color, hsl);
 | 
			
		||||
    },
 | 
			
		||||
    fadein: function (color, amount, method) {
 | 
			
		||||
        var hsl = toHSL(color);
 | 
			
		||||
        if (typeof method !== 'undefined' && method.value === 'relative') {
 | 
			
		||||
            hsl.a += hsl.a * amount.value / 100;
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            hsl.a += amount.value / 100;
 | 
			
		||||
        }
 | 
			
		||||
        hsl.a = clamp(hsl.a);
 | 
			
		||||
        return hsla(color, hsl);
 | 
			
		||||
    },
 | 
			
		||||
    fadeout: function (color, amount, method) {
 | 
			
		||||
        var hsl = toHSL(color);
 | 
			
		||||
        if (typeof method !== 'undefined' && method.value === 'relative') {
 | 
			
		||||
            hsl.a -= hsl.a * amount.value / 100;
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            hsl.a -= amount.value / 100;
 | 
			
		||||
        }
 | 
			
		||||
        hsl.a = clamp(hsl.a);
 | 
			
		||||
        return hsla(color, hsl);
 | 
			
		||||
    },
 | 
			
		||||
    fade: function (color, amount) {
 | 
			
		||||
        var hsl = toHSL(color);
 | 
			
		||||
        hsl.a = amount.value / 100;
 | 
			
		||||
        hsl.a = clamp(hsl.a);
 | 
			
		||||
        return hsla(color, hsl);
 | 
			
		||||
    },
 | 
			
		||||
    spin: function (color, amount) {
 | 
			
		||||
        var hsl = toHSL(color);
 | 
			
		||||
        var hue = (hsl.h + amount.value) % 360;
 | 
			
		||||
        hsl.h = hue < 0 ? 360 + hue : hue;
 | 
			
		||||
        return hsla(color, hsl);
 | 
			
		||||
    },
 | 
			
		||||
    //
 | 
			
		||||
    // Copyright (c) 2006-2009 Hampton Catlin, Natalie Weizenbaum, and Chris Eppstein
 | 
			
		||||
    // http://sass-lang.com
 | 
			
		||||
    //
 | 
			
		||||
    mix: function (color1, color2, weight) {
 | 
			
		||||
        if (!weight) {
 | 
			
		||||
            weight = new dimension_1.default(50);
 | 
			
		||||
        }
 | 
			
		||||
        var p = weight.value / 100.0;
 | 
			
		||||
        var w = p * 2 - 1;
 | 
			
		||||
        var a = toHSL(color1).a - toHSL(color2).a;
 | 
			
		||||
        var w1 = (((w * a == -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;
 | 
			
		||||
        var w2 = 1 - w1;
 | 
			
		||||
        var rgb = [color1.rgb[0] * w1 + color2.rgb[0] * w2,
 | 
			
		||||
            color1.rgb[1] * w1 + color2.rgb[1] * w2,
 | 
			
		||||
            color1.rgb[2] * w1 + color2.rgb[2] * w2];
 | 
			
		||||
        var alpha = color1.alpha * p + color2.alpha * (1 - p);
 | 
			
		||||
        return new color_1.default(rgb, alpha);
 | 
			
		||||
    },
 | 
			
		||||
    greyscale: function (color) {
 | 
			
		||||
        return colorFunctions.desaturate(color, new dimension_1.default(100));
 | 
			
		||||
    },
 | 
			
		||||
    contrast: function (color, dark, light, threshold) {
 | 
			
		||||
        // filter: contrast(3.2);
 | 
			
		||||
        // should be kept as is, so check for color
 | 
			
		||||
        if (!color.rgb) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
        if (typeof light === 'undefined') {
 | 
			
		||||
            light = colorFunctions.rgba(255, 255, 255, 1.0);
 | 
			
		||||
        }
 | 
			
		||||
        if (typeof dark === 'undefined') {
 | 
			
		||||
            dark = colorFunctions.rgba(0, 0, 0, 1.0);
 | 
			
		||||
        }
 | 
			
		||||
        // Figure out which is actually light and dark:
 | 
			
		||||
        if (dark.luma() > light.luma()) {
 | 
			
		||||
            var t = light;
 | 
			
		||||
            light = dark;
 | 
			
		||||
            dark = t;
 | 
			
		||||
        }
 | 
			
		||||
        if (typeof threshold === 'undefined') {
 | 
			
		||||
            threshold = 0.43;
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            threshold = number(threshold);
 | 
			
		||||
        }
 | 
			
		||||
        if (color.luma() < threshold) {
 | 
			
		||||
            return light;
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            return dark;
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    // Changes made in 2.7.0 - Reverted in 3.0.0
 | 
			
		||||
    // contrast: function (color, color1, color2, threshold) {
 | 
			
		||||
    //     // Return which of `color1` and `color2` has the greatest contrast with `color`
 | 
			
		||||
    //     // according to the standard WCAG contrast ratio calculation.
 | 
			
		||||
    //     // http://www.w3.org/TR/WCAG20/#contrast-ratiodef
 | 
			
		||||
    //     // The threshold param is no longer used, in line with SASS.
 | 
			
		||||
    //     // filter: contrast(3.2);
 | 
			
		||||
    //     // should be kept as is, so check for color
 | 
			
		||||
    //     if (!color.rgb) {
 | 
			
		||||
    //         return null;
 | 
			
		||||
    //     }
 | 
			
		||||
    //     if (typeof color1 === 'undefined') {
 | 
			
		||||
    //         color1 = colorFunctions.rgba(0, 0, 0, 1.0);
 | 
			
		||||
    //     }
 | 
			
		||||
    //     if (typeof color2 === 'undefined') {
 | 
			
		||||
    //         color2 = colorFunctions.rgba(255, 255, 255, 1.0);
 | 
			
		||||
    //     }
 | 
			
		||||
    //     var contrast1, contrast2;
 | 
			
		||||
    //     var luma = color.luma();
 | 
			
		||||
    //     var luma1 = color1.luma();
 | 
			
		||||
    //     var luma2 = color2.luma();
 | 
			
		||||
    //     // Calculate contrast ratios for each color
 | 
			
		||||
    //     if (luma > luma1) {
 | 
			
		||||
    //         contrast1 = (luma + 0.05) / (luma1 + 0.05);
 | 
			
		||||
    //     } else {
 | 
			
		||||
    //         contrast1 = (luma1 + 0.05) / (luma + 0.05);
 | 
			
		||||
    //     }
 | 
			
		||||
    //     if (luma > luma2) {
 | 
			
		||||
    //         contrast2 = (luma + 0.05) / (luma2 + 0.05);
 | 
			
		||||
    //     } else {
 | 
			
		||||
    //         contrast2 = (luma2 + 0.05) / (luma + 0.05);
 | 
			
		||||
    //     }
 | 
			
		||||
    //     if (contrast1 > contrast2) {
 | 
			
		||||
    //         return color1;
 | 
			
		||||
    //     } else {
 | 
			
		||||
    //         return color2;
 | 
			
		||||
    //     }
 | 
			
		||||
    // },
 | 
			
		||||
    argb: function (color) {
 | 
			
		||||
        return new anonymous_1.default(color.toARGB());
 | 
			
		||||
    },
 | 
			
		||||
    color: function (c) {
 | 
			
		||||
        if ((c instanceof quoted_1.default) &&
 | 
			
		||||
            (/^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3,4})$/i.test(c.value))) {
 | 
			
		||||
            var val = c.value.slice(1);
 | 
			
		||||
            return new color_1.default(val, undefined, "#" + val);
 | 
			
		||||
        }
 | 
			
		||||
        if ((c instanceof color_1.default) || (c = color_1.default.fromKeyword(c.value))) {
 | 
			
		||||
            c.value = undefined;
 | 
			
		||||
            return c;
 | 
			
		||||
        }
 | 
			
		||||
        throw {
 | 
			
		||||
            type: 'Argument',
 | 
			
		||||
            message: 'argument must be a color keyword or 3|4|6|8 digit hex e.g. #FFF'
 | 
			
		||||
        };
 | 
			
		||||
    },
 | 
			
		||||
    tint: function (color, amount) {
 | 
			
		||||
        return colorFunctions.mix(colorFunctions.rgb(255, 255, 255), color, amount);
 | 
			
		||||
    },
 | 
			
		||||
    shade: function (color, amount) {
 | 
			
		||||
        return colorFunctions.mix(colorFunctions.rgb(0, 0, 0), color, amount);
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
exports.default = colorFunctions;
 | 
			
		||||
//# sourceMappingURL=color.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/functions/color.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/functions/color.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										65
									
								
								node_modules/less/lib/less/functions/data-uri.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								node_modules/less/lib/less/functions/data-uri.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,65 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var quoted_1 = tslib_1.__importDefault(require("../tree/quoted"));
 | 
			
		||||
var url_1 = tslib_1.__importDefault(require("../tree/url"));
 | 
			
		||||
var utils = tslib_1.__importStar(require("../utils"));
 | 
			
		||||
var logger_1 = tslib_1.__importDefault(require("../logger"));
 | 
			
		||||
exports.default = (function (environment) {
 | 
			
		||||
    var fallback = function (functionThis, node) { return new url_1.default(node, functionThis.index, functionThis.currentFileInfo).eval(functionThis.context); };
 | 
			
		||||
    return { 'data-uri': function (mimetypeNode, filePathNode) {
 | 
			
		||||
            if (!filePathNode) {
 | 
			
		||||
                filePathNode = mimetypeNode;
 | 
			
		||||
                mimetypeNode = null;
 | 
			
		||||
            }
 | 
			
		||||
            var mimetype = mimetypeNode && mimetypeNode.value;
 | 
			
		||||
            var filePath = filePathNode.value;
 | 
			
		||||
            var currentFileInfo = this.currentFileInfo;
 | 
			
		||||
            var currentDirectory = currentFileInfo.rewriteUrls ?
 | 
			
		||||
                currentFileInfo.currentDirectory : currentFileInfo.entryPath;
 | 
			
		||||
            var fragmentStart = filePath.indexOf('#');
 | 
			
		||||
            var fragment = '';
 | 
			
		||||
            if (fragmentStart !== -1) {
 | 
			
		||||
                fragment = filePath.slice(fragmentStart);
 | 
			
		||||
                filePath = filePath.slice(0, fragmentStart);
 | 
			
		||||
            }
 | 
			
		||||
            var context = utils.clone(this.context);
 | 
			
		||||
            context.rawBuffer = true;
 | 
			
		||||
            var fileManager = environment.getFileManager(filePath, currentDirectory, context, environment, true);
 | 
			
		||||
            if (!fileManager) {
 | 
			
		||||
                return fallback(this, filePathNode);
 | 
			
		||||
            }
 | 
			
		||||
            var useBase64 = false;
 | 
			
		||||
            // detect the mimetype if not given
 | 
			
		||||
            if (!mimetypeNode) {
 | 
			
		||||
                mimetype = environment.mimeLookup(filePath);
 | 
			
		||||
                if (mimetype === 'image/svg+xml') {
 | 
			
		||||
                    useBase64 = false;
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    // use base 64 unless it's an ASCII or UTF-8 format
 | 
			
		||||
                    var charset = environment.charsetLookup(mimetype);
 | 
			
		||||
                    useBase64 = ['US-ASCII', 'UTF-8'].indexOf(charset) < 0;
 | 
			
		||||
                }
 | 
			
		||||
                if (useBase64) {
 | 
			
		||||
                    mimetype += ';base64';
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                useBase64 = /;base64$/.test(mimetype);
 | 
			
		||||
            }
 | 
			
		||||
            var fileSync = fileManager.loadFileSync(filePath, currentDirectory, context, environment);
 | 
			
		||||
            if (!fileSync.contents) {
 | 
			
		||||
                logger_1.default.warn("Skipped data-uri embedding of " + filePath + " because file not found");
 | 
			
		||||
                return fallback(this, filePathNode || mimetypeNode);
 | 
			
		||||
            }
 | 
			
		||||
            var buf = fileSync.contents;
 | 
			
		||||
            if (useBase64 && !environment.encodeBase64) {
 | 
			
		||||
                return fallback(this, filePathNode);
 | 
			
		||||
            }
 | 
			
		||||
            buf = useBase64 ? environment.encodeBase64(buf) : encodeURIComponent(buf);
 | 
			
		||||
            var uri = "data:" + mimetype + "," + buf + fragment;
 | 
			
		||||
            return new url_1.default(new quoted_1.default("\"" + uri + "\"", uri, false, this.index, this.currentFileInfo), this.index, this.currentFileInfo);
 | 
			
		||||
        } };
 | 
			
		||||
});
 | 
			
		||||
//# sourceMappingURL=data-uri.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/functions/data-uri.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/functions/data-uri.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										28
									
								
								node_modules/less/lib/less/functions/default.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								node_modules/less/lib/less/functions/default.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,28 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var keyword_1 = tslib_1.__importDefault(require("../tree/keyword"));
 | 
			
		||||
var utils = tslib_1.__importStar(require("../utils"));
 | 
			
		||||
var defaultFunc = {
 | 
			
		||||
    eval: function () {
 | 
			
		||||
        var v = this.value_;
 | 
			
		||||
        var e = this.error_;
 | 
			
		||||
        if (e) {
 | 
			
		||||
            throw e;
 | 
			
		||||
        }
 | 
			
		||||
        if (!utils.isNullOrUndefined(v)) {
 | 
			
		||||
            return v ? keyword_1.default.True : keyword_1.default.False;
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    value: function (v) {
 | 
			
		||||
        this.value_ = v;
 | 
			
		||||
    },
 | 
			
		||||
    error: function (e) {
 | 
			
		||||
        this.error_ = e;
 | 
			
		||||
    },
 | 
			
		||||
    reset: function () {
 | 
			
		||||
        this.value_ = this.error_ = null;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
exports.default = defaultFunc;
 | 
			
		||||
//# sourceMappingURL=default.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/functions/default.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/functions/default.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/less/functions/default.js"],"names":[],"mappings":";;;AAAA,oEAAsC;AACtC,sDAAkC;AAElC,IAAM,WAAW,GAAG;IAChB,IAAI,EAAE;QACF,IAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QACtB,IAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QACtB,IAAI,CAAC,EAAE;YACH,MAAM,CAAC,CAAC;SACX;QACD,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE;YAC7B,OAAO,CAAC,CAAC,CAAC,CAAC,iBAAO,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAO,CAAC,KAAK,CAAC;SAC3C;IACL,CAAC;IACD,KAAK,EAAE,UAAU,CAAC;QACd,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACpB,CAAC;IACD,KAAK,EAAE,UAAU,CAAC;QACd,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACpB,CAAC;IACD,KAAK,EAAE;QACH,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACrC,CAAC;CACJ,CAAC;AAEF,kBAAe,WAAW,CAAC","sourcesContent":["import Keyword from '../tree/keyword';\nimport * as utils from '../utils';\n\nconst defaultFunc = {\n    eval: function () {\n        const v = this.value_;\n        const e = this.error_;\n        if (e) {\n            throw e;\n        }\n        if (!utils.isNullOrUndefined(v)) {\n            return v ? Keyword.True : Keyword.False;\n        }\n    },\n    value: function (v) {\n        this.value_ = v;\n    },\n    error: function (e) {\n        this.error_ = e;\n    },\n    reset: function () {\n        this.value_ = this.error_ = null;\n    }\n};\n\nexport default defaultFunc;\n"]}
 | 
			
		||||
							
								
								
									
										54
									
								
								node_modules/less/lib/less/functions/function-caller.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								node_modules/less/lib/less/functions/function-caller.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,54 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var expression_1 = tslib_1.__importDefault(require("../tree/expression"));
 | 
			
		||||
var functionCaller = /** @class */ (function () {
 | 
			
		||||
    function functionCaller(name, context, index, currentFileInfo) {
 | 
			
		||||
        this.name = name.toLowerCase();
 | 
			
		||||
        this.index = index;
 | 
			
		||||
        this.context = context;
 | 
			
		||||
        this.currentFileInfo = currentFileInfo;
 | 
			
		||||
        this.func = context.frames[0].functionRegistry.get(this.name);
 | 
			
		||||
    }
 | 
			
		||||
    functionCaller.prototype.isValid = function () {
 | 
			
		||||
        return Boolean(this.func);
 | 
			
		||||
    };
 | 
			
		||||
    functionCaller.prototype.call = function (args) {
 | 
			
		||||
        var _this = this;
 | 
			
		||||
        if (!(Array.isArray(args))) {
 | 
			
		||||
            args = [args];
 | 
			
		||||
        }
 | 
			
		||||
        var evalArgs = this.func.evalArgs;
 | 
			
		||||
        if (evalArgs !== false) {
 | 
			
		||||
            args = args.map(function (a) { return a.eval(_this.context); });
 | 
			
		||||
        }
 | 
			
		||||
        var commentFilter = function (item) { return !(item.type === 'Comment'); };
 | 
			
		||||
        // This code is terrible and should be replaced as per this issue...
 | 
			
		||||
        // https://github.com/less/less.js/issues/2477
 | 
			
		||||
        args = args
 | 
			
		||||
            .filter(commentFilter)
 | 
			
		||||
            .map(function (item) {
 | 
			
		||||
            if (item.type === 'Expression') {
 | 
			
		||||
                var subNodes = item.value.filter(commentFilter);
 | 
			
		||||
                if (subNodes.length === 1) {
 | 
			
		||||
                    // https://github.com/less/less.js/issues/3616
 | 
			
		||||
                    if (item.parens && subNodes[0].op === '/') {
 | 
			
		||||
                        return item;
 | 
			
		||||
                    }
 | 
			
		||||
                    return subNodes[0];
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    return new expression_1.default(subNodes);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            return item;
 | 
			
		||||
        });
 | 
			
		||||
        if (evalArgs === false) {
 | 
			
		||||
            return this.func.apply(this, tslib_1.__spreadArray([this.context], args));
 | 
			
		||||
        }
 | 
			
		||||
        return this.func.apply(this, args);
 | 
			
		||||
    };
 | 
			
		||||
    return functionCaller;
 | 
			
		||||
}());
 | 
			
		||||
exports.default = functionCaller;
 | 
			
		||||
//# sourceMappingURL=function-caller.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/functions/function-caller.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/functions/function-caller.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"function-caller.js","sourceRoot":"","sources":["../../../src/less/functions/function-caller.js"],"names":[],"mappings":";;;AAAA,0EAA4C;AAE5C;IACI,wBAAY,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe;QAC7C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QAEvC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClE,CAAC;IAED,gCAAO,GAAP;QACI,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,6BAAI,GAAJ,UAAK,IAAI;QAAT,iBAmCC;QAlCG,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE;YACxB,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;SACjB;QACD,IAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;QACpC,IAAI,QAAQ,KAAK,KAAK,EAAE;YACpB,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,IAAI,CAAC,KAAI,CAAC,OAAO,CAAC,EAApB,CAAoB,CAAC,CAAC;SAC9C;QACD,IAAM,aAAa,GAAG,UAAA,IAAI,IAAI,OAAA,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,EAA1B,CAA0B,CAAC;QAEzD,oEAAoE;QACpE,8CAA8C;QAC9C,IAAI,GAAG,IAAI;aACN,MAAM,CAAC,aAAa,CAAC;aACrB,GAAG,CAAC,UAAA,IAAI;YACL,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,EAAE;gBAC5B,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;gBAClD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;oBACvB,8CAA8C;oBAC9C,IAAI,IAAI,CAAC,MAAM,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,EAAE;wBACvC,OAAO,IAAI,CAAC;qBACf;oBACD,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;iBACtB;qBAAM;oBACH,OAAO,IAAI,oBAAU,CAAC,QAAQ,CAAC,CAAC;iBACnC;aACJ;YACD,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC,CAAC;QAEP,IAAI,QAAQ,KAAK,KAAK,EAAE;YACpB,OAAO,IAAI,CAAC,IAAI,OAAT,IAAI,yBAAM,IAAI,CAAC,OAAO,GAAK,IAAI,GAAE;SAC3C;QAED,OAAO,IAAI,CAAC,IAAI,OAAT,IAAI,EAAS,IAAI,EAAE;IAC9B,CAAC;IACL,qBAAC;AAAD,CAAC,AAlDD,IAkDC;AAED,kBAAe,cAAc,CAAC","sourcesContent":["import Expression from '../tree/expression';\n\nclass functionCaller {\n    constructor(name, context, index, currentFileInfo) {\n        this.name = name.toLowerCase();\n        this.index = index;\n        this.context = context;\n        this.currentFileInfo = currentFileInfo;\n\n        this.func = context.frames[0].functionRegistry.get(this.name);\n    }\n\n    isValid() {\n        return Boolean(this.func);\n    }\n\n    call(args) {\n        if (!(Array.isArray(args))) {\n            args = [args];\n        }\n        const evalArgs = this.func.evalArgs;\n        if (evalArgs !== false) {\n            args = args.map(a => a.eval(this.context));\n        }\n        const commentFilter = item => !(item.type === 'Comment');\n\n        // This code is terrible and should be replaced as per this issue...\n        // https://github.com/less/less.js/issues/2477\n        args = args\n            .filter(commentFilter)\n            .map(item => {\n                if (item.type === 'Expression') {\n                    const subNodes = item.value.filter(commentFilter);\n                    if (subNodes.length === 1) {\n                        // https://github.com/less/less.js/issues/3616\n                        if (item.parens && subNodes[0].op === '/') {\n                            return item;\n                        }\n                        return subNodes[0];\n                    } else {\n                        return new Expression(subNodes);\n                    }\n                }\n                return item;\n            });\n\n        if (evalArgs === false) {\n            return this.func(this.context, ...args);\n        }\n\n        return this.func(...args);\n    }\n}\n\nexport default functionCaller;\n"]}
 | 
			
		||||
							
								
								
									
										37
									
								
								node_modules/less/lib/less/functions/function-registry.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								node_modules/less/lib/less/functions/function-registry.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,37 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
function makeRegistry(base) {
 | 
			
		||||
    return {
 | 
			
		||||
        _data: {},
 | 
			
		||||
        add: function (name, func) {
 | 
			
		||||
            // precautionary case conversion, as later querying of
 | 
			
		||||
            // the registry by function-caller uses lower case as well.
 | 
			
		||||
            name = name.toLowerCase();
 | 
			
		||||
            // eslint-disable-next-line no-prototype-builtins
 | 
			
		||||
            if (this._data.hasOwnProperty(name)) {
 | 
			
		||||
                // TODO warn
 | 
			
		||||
            }
 | 
			
		||||
            this._data[name] = func;
 | 
			
		||||
        },
 | 
			
		||||
        addMultiple: function (functions) {
 | 
			
		||||
            var _this = this;
 | 
			
		||||
            Object.keys(functions).forEach(function (name) {
 | 
			
		||||
                _this.add(name, functions[name]);
 | 
			
		||||
            });
 | 
			
		||||
        },
 | 
			
		||||
        get: function (name) {
 | 
			
		||||
            return this._data[name] || (base && base.get(name));
 | 
			
		||||
        },
 | 
			
		||||
        getLocalFunctions: function () {
 | 
			
		||||
            return this._data;
 | 
			
		||||
        },
 | 
			
		||||
        inherit: function () {
 | 
			
		||||
            return makeRegistry(this);
 | 
			
		||||
        },
 | 
			
		||||
        create: function (base) {
 | 
			
		||||
            return makeRegistry(base);
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
exports.default = makeRegistry(null);
 | 
			
		||||
//# sourceMappingURL=function-registry.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/functions/function-registry.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/functions/function-registry.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"function-registry.js","sourceRoot":"","sources":["../../../src/less/functions/function-registry.js"],"names":[],"mappings":";;AAAA,SAAS,YAAY,CAAE,IAAI;IACvB,OAAO;QACH,KAAK,EAAE,EAAE;QACT,GAAG,EAAE,UAAS,IAAI,EAAE,IAAI;YACpB,sDAAsD;YACtD,2DAA2D;YAC3D,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;YAE1B,iDAAiD;YACjD,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;gBACjC,YAAY;aACf;YACD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;QAC5B,CAAC;QACD,WAAW,EAAE,UAAS,SAAS;YAAlB,iBAKZ;YAJG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,CAC1B,UAAA,IAAI;gBACA,KAAI,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;QACX,CAAC;QACD,GAAG,EAAE,UAAS,IAAI;YACd,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAE,IAAI,IAAI,IAAI,CAAC,GAAG,CAAE,IAAI,CAAE,CAAC,CAAC;QAC3D,CAAC;QACD,iBAAiB,EAAE;YACf,OAAO,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC;QACD,OAAO,EAAE;YACL,OAAO,YAAY,CAAE,IAAI,CAAE,CAAC;QAChC,CAAC;QACD,MAAM,EAAE,UAAS,IAAI;YACjB,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC;KACJ,CAAC;AACN,CAAC;AAED,kBAAe,YAAY,CAAE,IAAI,CAAE,CAAC","sourcesContent":["function makeRegistry( base ) {\n    return {\n        _data: {},\n        add: function(name, func) {\n            // precautionary case conversion, as later querying of\n            // the registry by function-caller uses lower case as well.\n            name = name.toLowerCase();\n\n            // eslint-disable-next-line no-prototype-builtins\n            if (this._data.hasOwnProperty(name)) {\n                // TODO warn\n            }\n            this._data[name] = func;\n        },\n        addMultiple: function(functions) {\n            Object.keys(functions).forEach(\n                name => {\n                    this.add(name, functions[name]);\n                });\n        },\n        get: function(name) {\n            return this._data[name] || ( base && base.get( name ));\n        },\n        getLocalFunctions: function() {\n            return this._data;\n        },\n        inherit: function() {\n            return makeRegistry( this );\n        },\n        create: function(base) {\n            return makeRegistry(base);\n        }\n    };\n}\n\nexport default makeRegistry( null );"]}
 | 
			
		||||
							
								
								
									
										33
									
								
								node_modules/less/lib/less/functions/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								node_modules/less/lib/less/functions/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,33 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var function_registry_1 = tslib_1.__importDefault(require("./function-registry"));
 | 
			
		||||
var function_caller_1 = tslib_1.__importDefault(require("./function-caller"));
 | 
			
		||||
var boolean_1 = tslib_1.__importDefault(require("./boolean"));
 | 
			
		||||
var default_1 = tslib_1.__importDefault(require("./default"));
 | 
			
		||||
var color_1 = tslib_1.__importDefault(require("./color"));
 | 
			
		||||
var color_blending_1 = tslib_1.__importDefault(require("./color-blending"));
 | 
			
		||||
var data_uri_1 = tslib_1.__importDefault(require("./data-uri"));
 | 
			
		||||
var list_1 = tslib_1.__importDefault(require("./list"));
 | 
			
		||||
var math_1 = tslib_1.__importDefault(require("./math"));
 | 
			
		||||
var number_1 = tslib_1.__importDefault(require("./number"));
 | 
			
		||||
var string_1 = tslib_1.__importDefault(require("./string"));
 | 
			
		||||
var svg_1 = tslib_1.__importDefault(require("./svg"));
 | 
			
		||||
var types_1 = tslib_1.__importDefault(require("./types"));
 | 
			
		||||
exports.default = (function (environment) {
 | 
			
		||||
    var functions = { functionRegistry: function_registry_1.default, functionCaller: function_caller_1.default };
 | 
			
		||||
    // register functions
 | 
			
		||||
    function_registry_1.default.addMultiple(boolean_1.default);
 | 
			
		||||
    function_registry_1.default.add('default', default_1.default.eval.bind(default_1.default));
 | 
			
		||||
    function_registry_1.default.addMultiple(color_1.default);
 | 
			
		||||
    function_registry_1.default.addMultiple(color_blending_1.default);
 | 
			
		||||
    function_registry_1.default.addMultiple(data_uri_1.default(environment));
 | 
			
		||||
    function_registry_1.default.addMultiple(list_1.default);
 | 
			
		||||
    function_registry_1.default.addMultiple(math_1.default);
 | 
			
		||||
    function_registry_1.default.addMultiple(number_1.default);
 | 
			
		||||
    function_registry_1.default.addMultiple(string_1.default);
 | 
			
		||||
    function_registry_1.default.addMultiple(svg_1.default(environment));
 | 
			
		||||
    function_registry_1.default.addMultiple(types_1.default);
 | 
			
		||||
    return functions;
 | 
			
		||||
});
 | 
			
		||||
//# sourceMappingURL=index.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/functions/index.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/functions/index.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/less/functions/index.js"],"names":[],"mappings":";;;AAAA,kFAAmD;AACnD,8EAA+C;AAE/C,8DAAgC;AAChC,8DAAoC;AACpC,0DAA4B;AAC5B,4EAA6C;AAC7C,gEAAiC;AACjC,wDAA0B;AAC1B,wDAA0B;AAC1B,4DAA8B;AAC9B,4DAA8B;AAC9B,sDAAwB;AACxB,0DAA4B;AAE5B,mBAAe,UAAA,WAAW;IACtB,IAAM,SAAS,GAAG,EAAE,gBAAgB,6BAAA,EAAE,cAAc,2BAAA,EAAE,CAAC;IAEvD,qBAAqB;IACrB,2BAAgB,CAAC,WAAW,CAAC,iBAAO,CAAC,CAAC;IACtC,2BAAgB,CAAC,GAAG,CAAC,SAAS,EAAE,iBAAW,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAW,CAAC,CAAC,CAAC;IACpE,2BAAgB,CAAC,WAAW,CAAC,eAAK,CAAC,CAAC;IACpC,2BAAgB,CAAC,WAAW,CAAC,wBAAa,CAAC,CAAC;IAC5C,2BAAgB,CAAC,WAAW,CAAC,kBAAO,CAAC,WAAW,CAAC,CAAC,CAAC;IACnD,2BAAgB,CAAC,WAAW,CAAC,cAAI,CAAC,CAAC;IACnC,2BAAgB,CAAC,WAAW,CAAC,cAAI,CAAC,CAAC;IACnC,2BAAgB,CAAC,WAAW,CAAC,gBAAM,CAAC,CAAC;IACrC,2BAAgB,CAAC,WAAW,CAAC,gBAAM,CAAC,CAAC;IACrC,2BAAgB,CAAC,WAAW,CAAC,aAAG,CAAC,WAAW,CAAC,CAAC,CAAC;IAC/C,2BAAgB,CAAC,WAAW,CAAC,eAAK,CAAC,CAAC;IAEpC,OAAO,SAAS,CAAC;AACrB,CAAC,EAAC","sourcesContent":["import functionRegistry from './function-registry';\nimport functionCaller from './function-caller';\n\nimport boolean from './boolean';\nimport defaultFunc from './default';\nimport color from './color';\nimport colorBlending from './color-blending';\nimport dataUri from './data-uri';\nimport list from './list';\nimport math from './math';\nimport number from './number';\nimport string from './string';\nimport svg from './svg';\nimport types from './types';\n\nexport default environment => {\n    const functions = { functionRegistry, functionCaller };\n\n    // register functions\n    functionRegistry.addMultiple(boolean);\n    functionRegistry.add('default', defaultFunc.eval.bind(defaultFunc));\n    functionRegistry.addMultiple(color);\n    functionRegistry.addMultiple(colorBlending);\n    functionRegistry.addMultiple(dataUri(environment));\n    functionRegistry.addMultiple(list);\n    functionRegistry.addMultiple(math);\n    functionRegistry.addMultiple(number);\n    functionRegistry.addMultiple(string);\n    functionRegistry.addMultiple(svg(environment));\n    functionRegistry.addMultiple(types);\n\n    return functions;\n};\n"]}
 | 
			
		||||
							
								
								
									
										145
									
								
								node_modules/less/lib/less/functions/list.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										145
									
								
								node_modules/less/lib/less/functions/list.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,145 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var comment_1 = tslib_1.__importDefault(require("../tree/comment"));
 | 
			
		||||
var node_1 = tslib_1.__importDefault(require("../tree/node"));
 | 
			
		||||
var dimension_1 = tslib_1.__importDefault(require("../tree/dimension"));
 | 
			
		||||
var declaration_1 = tslib_1.__importDefault(require("../tree/declaration"));
 | 
			
		||||
var expression_1 = tslib_1.__importDefault(require("../tree/expression"));
 | 
			
		||||
var ruleset_1 = tslib_1.__importDefault(require("../tree/ruleset"));
 | 
			
		||||
var selector_1 = tslib_1.__importDefault(require("../tree/selector"));
 | 
			
		||||
var element_1 = tslib_1.__importDefault(require("../tree/element"));
 | 
			
		||||
var quoted_1 = tslib_1.__importDefault(require("../tree/quoted"));
 | 
			
		||||
var value_1 = tslib_1.__importDefault(require("../tree/value"));
 | 
			
		||||
var getItemsFromNode = function (node) {
 | 
			
		||||
    // handle non-array values as an array of length 1
 | 
			
		||||
    // return 'undefined' if index is invalid
 | 
			
		||||
    var items = Array.isArray(node.value) ?
 | 
			
		||||
        node.value : Array(node);
 | 
			
		||||
    return items;
 | 
			
		||||
};
 | 
			
		||||
exports.default = {
 | 
			
		||||
    _SELF: function (n) {
 | 
			
		||||
        return n;
 | 
			
		||||
    },
 | 
			
		||||
    '~': function () {
 | 
			
		||||
        var expr = [];
 | 
			
		||||
        for (var _i = 0; _i < arguments.length; _i++) {
 | 
			
		||||
            expr[_i] = arguments[_i];
 | 
			
		||||
        }
 | 
			
		||||
        if (expr.length === 1) {
 | 
			
		||||
            return expr[0];
 | 
			
		||||
        }
 | 
			
		||||
        return new value_1.default(expr);
 | 
			
		||||
    },
 | 
			
		||||
    extract: function (values, index) {
 | 
			
		||||
        // (1-based index)
 | 
			
		||||
        index = index.value - 1;
 | 
			
		||||
        return getItemsFromNode(values)[index];
 | 
			
		||||
    },
 | 
			
		||||
    length: function (values) {
 | 
			
		||||
        return new dimension_1.default(getItemsFromNode(values).length);
 | 
			
		||||
    },
 | 
			
		||||
    /**
 | 
			
		||||
     * Creates a Less list of incremental values.
 | 
			
		||||
     * Modeled after Lodash's range function, also exists natively in PHP
 | 
			
		||||
     *
 | 
			
		||||
     * @param {Dimension} [start=1]
 | 
			
		||||
     * @param {Dimension} end  - e.g. 10 or 10px - unit is added to output
 | 
			
		||||
     * @param {Dimension} [step=1]
 | 
			
		||||
     */
 | 
			
		||||
    range: function (start, end, step) {
 | 
			
		||||
        var from;
 | 
			
		||||
        var to;
 | 
			
		||||
        var stepValue = 1;
 | 
			
		||||
        var list = [];
 | 
			
		||||
        if (end) {
 | 
			
		||||
            to = end;
 | 
			
		||||
            from = start.value;
 | 
			
		||||
            if (step) {
 | 
			
		||||
                stepValue = step.value;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            from = 1;
 | 
			
		||||
            to = start;
 | 
			
		||||
        }
 | 
			
		||||
        for (var i = from; i <= to.value; i += stepValue) {
 | 
			
		||||
            list.push(new dimension_1.default(i, to.unit));
 | 
			
		||||
        }
 | 
			
		||||
        return new expression_1.default(list);
 | 
			
		||||
    },
 | 
			
		||||
    each: function (list, rs) {
 | 
			
		||||
        var _this = this;
 | 
			
		||||
        var rules = [];
 | 
			
		||||
        var newRules;
 | 
			
		||||
        var iterator;
 | 
			
		||||
        var tryEval = function (val) {
 | 
			
		||||
            if (val instanceof node_1.default) {
 | 
			
		||||
                return val.eval(_this.context);
 | 
			
		||||
            }
 | 
			
		||||
            return val;
 | 
			
		||||
        };
 | 
			
		||||
        if (list.value && !(list instanceof quoted_1.default)) {
 | 
			
		||||
            if (Array.isArray(list.value)) {
 | 
			
		||||
                iterator = list.value.map(tryEval);
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                iterator = [tryEval(list.value)];
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else if (list.ruleset) {
 | 
			
		||||
            iterator = tryEval(list.ruleset).rules;
 | 
			
		||||
        }
 | 
			
		||||
        else if (list.rules) {
 | 
			
		||||
            iterator = list.rules.map(tryEval);
 | 
			
		||||
        }
 | 
			
		||||
        else if (Array.isArray(list)) {
 | 
			
		||||
            iterator = list.map(tryEval);
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            iterator = [tryEval(list)];
 | 
			
		||||
        }
 | 
			
		||||
        var valueName = '@value';
 | 
			
		||||
        var keyName = '@key';
 | 
			
		||||
        var indexName = '@index';
 | 
			
		||||
        if (rs.params) {
 | 
			
		||||
            valueName = rs.params[0] && rs.params[0].name;
 | 
			
		||||
            keyName = rs.params[1] && rs.params[1].name;
 | 
			
		||||
            indexName = rs.params[2] && rs.params[2].name;
 | 
			
		||||
            rs = rs.rules;
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            rs = rs.ruleset;
 | 
			
		||||
        }
 | 
			
		||||
        for (var i = 0; i < iterator.length; i++) {
 | 
			
		||||
            var key = void 0;
 | 
			
		||||
            var value = void 0;
 | 
			
		||||
            var item = iterator[i];
 | 
			
		||||
            if (item instanceof declaration_1.default) {
 | 
			
		||||
                key = typeof item.name === 'string' ? item.name : item.name[0].value;
 | 
			
		||||
                value = item.value;
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                key = new dimension_1.default(i + 1);
 | 
			
		||||
                value = item;
 | 
			
		||||
            }
 | 
			
		||||
            if (item instanceof comment_1.default) {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
            newRules = rs.rules.slice(0);
 | 
			
		||||
            if (valueName) {
 | 
			
		||||
                newRules.push(new declaration_1.default(valueName, value, false, false, this.index, this.currentFileInfo));
 | 
			
		||||
            }
 | 
			
		||||
            if (indexName) {
 | 
			
		||||
                newRules.push(new declaration_1.default(indexName, new dimension_1.default(i + 1), false, false, this.index, this.currentFileInfo));
 | 
			
		||||
            }
 | 
			
		||||
            if (keyName) {
 | 
			
		||||
                newRules.push(new declaration_1.default(keyName, key, false, false, this.index, this.currentFileInfo));
 | 
			
		||||
            }
 | 
			
		||||
            rules.push(new ruleset_1.default([new (selector_1.default)([new element_1.default('', '&')])], newRules, rs.strictImports, rs.visibilityInfo()));
 | 
			
		||||
        }
 | 
			
		||||
        return new ruleset_1.default([new (selector_1.default)([new element_1.default('', '&')])], rules, rs.strictImports, rs.visibilityInfo()).eval(this.context);
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
//# sourceMappingURL=list.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/functions/list.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/functions/list.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										18
									
								
								node_modules/less/lib/less/functions/math-helper.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								node_modules/less/lib/less/functions/math-helper.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,18 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var dimension_1 = tslib_1.__importDefault(require("../tree/dimension"));
 | 
			
		||||
var MathHelper = function (fn, unit, n) {
 | 
			
		||||
    if (!(n instanceof dimension_1.default)) {
 | 
			
		||||
        throw { type: 'Argument', message: 'argument must be a number' };
 | 
			
		||||
    }
 | 
			
		||||
    if (unit === null) {
 | 
			
		||||
        unit = n.unit;
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
        n = n.unify();
 | 
			
		||||
    }
 | 
			
		||||
    return new dimension_1.default(fn(parseFloat(n.value)), unit);
 | 
			
		||||
};
 | 
			
		||||
exports.default = MathHelper;
 | 
			
		||||
//# sourceMappingURL=math-helper.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/functions/math-helper.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/functions/math-helper.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"math-helper.js","sourceRoot":"","sources":["../../../src/less/functions/math-helper.js"],"names":[],"mappings":";;;AAAA,wEAA0C;AAE1C,IAAM,UAAU,GAAG,UAAC,EAAE,EAAE,IAAI,EAAE,CAAC;IAC3B,IAAI,CAAC,CAAC,CAAC,YAAY,mBAAS,CAAC,EAAE;QAC3B,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC;KACpE;IACD,IAAI,IAAI,KAAK,IAAI,EAAE;QACf,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC;KACjB;SAAM;QACH,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;KACjB;IACD,OAAO,IAAI,mBAAS,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;AACxD,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC","sourcesContent":["import Dimension from '../tree/dimension';\n\nconst MathHelper = (fn, unit, n) => {\n    if (!(n instanceof Dimension)) {\n        throw { type: 'Argument', message: 'argument must be a number' };\n    }\n    if (unit === null) {\n        unit = n.unit;\n    } else {\n        n = n.unify();\n    }\n    return new Dimension(fn(parseFloat(n.value)), unit);\n};\n\nexport default MathHelper;"]}
 | 
			
		||||
							
								
								
									
										29
									
								
								node_modules/less/lib/less/functions/math.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								node_modules/less/lib/less/functions/math.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,29 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var math_helper_js_1 = tslib_1.__importDefault(require("./math-helper.js"));
 | 
			
		||||
var mathFunctions = {
 | 
			
		||||
    // name,  unit
 | 
			
		||||
    ceil: null,
 | 
			
		||||
    floor: null,
 | 
			
		||||
    sqrt: null,
 | 
			
		||||
    abs: null,
 | 
			
		||||
    tan: '',
 | 
			
		||||
    sin: '',
 | 
			
		||||
    cos: '',
 | 
			
		||||
    atan: 'rad',
 | 
			
		||||
    asin: 'rad',
 | 
			
		||||
    acos: 'rad'
 | 
			
		||||
};
 | 
			
		||||
for (var f in mathFunctions) {
 | 
			
		||||
    // eslint-disable-next-line no-prototype-builtins
 | 
			
		||||
    if (mathFunctions.hasOwnProperty(f)) {
 | 
			
		||||
        mathFunctions[f] = math_helper_js_1.default.bind(null, Math[f], mathFunctions[f]);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
mathFunctions.round = function (n, f) {
 | 
			
		||||
    var fraction = typeof f === 'undefined' ? 0 : f.value;
 | 
			
		||||
    return math_helper_js_1.default(function (num) { return num.toFixed(fraction); }, null, n);
 | 
			
		||||
};
 | 
			
		||||
exports.default = mathFunctions;
 | 
			
		||||
//# sourceMappingURL=math.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/functions/math.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/functions/math.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"math.js","sourceRoot":"","sources":["../../../src/less/functions/math.js"],"names":[],"mappings":";;;AAAA,4EAA0C;AAE1C,IAAM,aAAa,GAAG;IAClB,cAAc;IACd,IAAI,EAAG,IAAI;IACX,KAAK,EAAE,IAAI;IACX,IAAI,EAAG,IAAI;IACX,GAAG,EAAI,IAAI;IACX,GAAG,EAAI,EAAE;IACT,GAAG,EAAI,EAAE;IACT,GAAG,EAAI,EAAE;IACT,IAAI,EAAG,KAAK;IACZ,IAAI,EAAG,KAAK;IACZ,IAAI,EAAG,KAAK;CACf,CAAC;AAEF,KAAK,IAAM,CAAC,IAAI,aAAa,EAAE;IAC3B,iDAAiD;IACjD,IAAI,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;QACjC,aAAa,CAAC,CAAC,CAAC,GAAG,wBAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;KACvE;CACJ;AAED,aAAa,CAAC,KAAK,GAAG,UAAC,CAAC,EAAE,CAAC;IACvB,IAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACxD,OAAO,wBAAU,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,EAArB,CAAqB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC7D,CAAC,CAAC;AAEF,kBAAe,aAAa,CAAC","sourcesContent":["import mathHelper from './math-helper.js';\n\nconst mathFunctions = {\n    // name,  unit\n    ceil:  null,\n    floor: null,\n    sqrt:  null,\n    abs:   null,\n    tan:   '',\n    sin:   '',\n    cos:   '',\n    atan:  'rad',\n    asin:  'rad',\n    acos:  'rad'\n};\n\nfor (const f in mathFunctions) {\n    // eslint-disable-next-line no-prototype-builtins\n    if (mathFunctions.hasOwnProperty(f)) {\n        mathFunctions[f] = mathHelper.bind(null, Math[f], mathFunctions[f]);\n    }\n}\n\nmathFunctions.round = (n, f) => {\n    const fraction = typeof f === 'undefined' ? 0 : f.value;\n    return mathHelper(num => num.toFixed(fraction), null, n);\n};\n\nexport default mathFunctions;\n"]}
 | 
			
		||||
							
								
								
									
										103
									
								
								node_modules/less/lib/less/functions/number.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										103
									
								
								node_modules/less/lib/less/functions/number.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,103 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var dimension_1 = tslib_1.__importDefault(require("../tree/dimension"));
 | 
			
		||||
var anonymous_1 = tslib_1.__importDefault(require("../tree/anonymous"));
 | 
			
		||||
var math_helper_js_1 = tslib_1.__importDefault(require("./math-helper.js"));
 | 
			
		||||
var minMax = function (isMin, args) {
 | 
			
		||||
    var _this = this;
 | 
			
		||||
    args = Array.prototype.slice.call(args);
 | 
			
		||||
    switch (args.length) {
 | 
			
		||||
        case 0: throw { type: 'Argument', message: 'one or more arguments required' };
 | 
			
		||||
    }
 | 
			
		||||
    var i; // key is the unit.toString() for unified Dimension values,
 | 
			
		||||
    var j;
 | 
			
		||||
    var current;
 | 
			
		||||
    var currentUnified;
 | 
			
		||||
    var referenceUnified;
 | 
			
		||||
    var unit;
 | 
			
		||||
    var unitStatic;
 | 
			
		||||
    var unitClone;
 | 
			
		||||
    var // elems only contains original argument values.
 | 
			
		||||
    order = [];
 | 
			
		||||
    var values = {};
 | 
			
		||||
    // value is the index into the order array.
 | 
			
		||||
    for (i = 0; i < args.length; i++) {
 | 
			
		||||
        current = args[i];
 | 
			
		||||
        if (!(current instanceof dimension_1.default)) {
 | 
			
		||||
            if (Array.isArray(args[i].value)) {
 | 
			
		||||
                Array.prototype.push.apply(args, Array.prototype.slice.call(args[i].value));
 | 
			
		||||
            }
 | 
			
		||||
            continue;
 | 
			
		||||
        }
 | 
			
		||||
        currentUnified = current.unit.toString() === '' && unitClone !== undefined ? new dimension_1.default(current.value, unitClone).unify() : current.unify();
 | 
			
		||||
        unit = currentUnified.unit.toString() === '' && unitStatic !== undefined ? unitStatic : currentUnified.unit.toString();
 | 
			
		||||
        unitStatic = unit !== '' && unitStatic === undefined || unit !== '' && order[0].unify().unit.toString() === '' ? unit : unitStatic;
 | 
			
		||||
        unitClone = unit !== '' && unitClone === undefined ? current.unit.toString() : unitClone;
 | 
			
		||||
        j = values[''] !== undefined && unit !== '' && unit === unitStatic ? values[''] : values[unit];
 | 
			
		||||
        if (j === undefined) {
 | 
			
		||||
            if (unitStatic !== undefined && unit !== unitStatic) {
 | 
			
		||||
                throw { type: 'Argument', message: 'incompatible types' };
 | 
			
		||||
            }
 | 
			
		||||
            values[unit] = order.length;
 | 
			
		||||
            order.push(current);
 | 
			
		||||
            continue;
 | 
			
		||||
        }
 | 
			
		||||
        referenceUnified = order[j].unit.toString() === '' && unitClone !== undefined ? new dimension_1.default(order[j].value, unitClone).unify() : order[j].unify();
 | 
			
		||||
        if (isMin && currentUnified.value < referenceUnified.value ||
 | 
			
		||||
            !isMin && currentUnified.value > referenceUnified.value) {
 | 
			
		||||
            order[j] = current;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    if (order.length == 1) {
 | 
			
		||||
        return order[0];
 | 
			
		||||
    }
 | 
			
		||||
    args = order.map(function (a) { return a.toCSS(_this.context); }).join(this.context.compress ? ',' : ', ');
 | 
			
		||||
    return new anonymous_1.default((isMin ? 'min' : 'max') + "(" + args + ")");
 | 
			
		||||
};
 | 
			
		||||
exports.default = {
 | 
			
		||||
    min: function () {
 | 
			
		||||
        var args = [];
 | 
			
		||||
        for (var _i = 0; _i < arguments.length; _i++) {
 | 
			
		||||
            args[_i] = arguments[_i];
 | 
			
		||||
        }
 | 
			
		||||
        try {
 | 
			
		||||
            return minMax.call(this, true, args);
 | 
			
		||||
        }
 | 
			
		||||
        catch (e) { }
 | 
			
		||||
    },
 | 
			
		||||
    max: function () {
 | 
			
		||||
        var args = [];
 | 
			
		||||
        for (var _i = 0; _i < arguments.length; _i++) {
 | 
			
		||||
            args[_i] = arguments[_i];
 | 
			
		||||
        }
 | 
			
		||||
        try {
 | 
			
		||||
            return minMax.call(this, false, args);
 | 
			
		||||
        }
 | 
			
		||||
        catch (e) { }
 | 
			
		||||
    },
 | 
			
		||||
    convert: function (val, unit) {
 | 
			
		||||
        return val.convertTo(unit.value);
 | 
			
		||||
    },
 | 
			
		||||
    pi: function () {
 | 
			
		||||
        return new dimension_1.default(Math.PI);
 | 
			
		||||
    },
 | 
			
		||||
    mod: function (a, b) {
 | 
			
		||||
        return new dimension_1.default(a.value % b.value, a.unit);
 | 
			
		||||
    },
 | 
			
		||||
    pow: function (x, y) {
 | 
			
		||||
        if (typeof x === 'number' && typeof y === 'number') {
 | 
			
		||||
            x = new dimension_1.default(x);
 | 
			
		||||
            y = new dimension_1.default(y);
 | 
			
		||||
        }
 | 
			
		||||
        else if (!(x instanceof dimension_1.default) || !(y instanceof dimension_1.default)) {
 | 
			
		||||
            throw { type: 'Argument', message: 'arguments must be numbers' };
 | 
			
		||||
        }
 | 
			
		||||
        return new dimension_1.default(Math.pow(x.value, y.value), x.unit);
 | 
			
		||||
    },
 | 
			
		||||
    percentage: function (n) {
 | 
			
		||||
        var result = math_helper_js_1.default(function (num) { return num * 100; }, '%', n);
 | 
			
		||||
        return result;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
//# sourceMappingURL=number.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/functions/number.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/functions/number.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										40
									
								
								node_modules/less/lib/less/functions/string.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								node_modules/less/lib/less/functions/string.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,40 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var quoted_1 = tslib_1.__importDefault(require("../tree/quoted"));
 | 
			
		||||
var anonymous_1 = tslib_1.__importDefault(require("../tree/anonymous"));
 | 
			
		||||
var javascript_1 = tslib_1.__importDefault(require("../tree/javascript"));
 | 
			
		||||
exports.default = {
 | 
			
		||||
    e: function (str) {
 | 
			
		||||
        return new quoted_1.default('"', str instanceof javascript_1.default ? str.evaluated : str.value, true);
 | 
			
		||||
    },
 | 
			
		||||
    escape: function (str) {
 | 
			
		||||
        return new anonymous_1.default(encodeURI(str.value).replace(/=/g, '%3D').replace(/:/g, '%3A').replace(/#/g, '%23').replace(/;/g, '%3B')
 | 
			
		||||
            .replace(/\(/g, '%28').replace(/\)/g, '%29'));
 | 
			
		||||
    },
 | 
			
		||||
    replace: function (string, pattern, replacement, flags) {
 | 
			
		||||
        var result = string.value;
 | 
			
		||||
        replacement = (replacement.type === 'Quoted') ?
 | 
			
		||||
            replacement.value : replacement.toCSS();
 | 
			
		||||
        result = result.replace(new RegExp(pattern.value, flags ? flags.value : ''), replacement);
 | 
			
		||||
        return new quoted_1.default(string.quote || '', result, string.escaped);
 | 
			
		||||
    },
 | 
			
		||||
    '%': function (string /* arg, arg, ... */) {
 | 
			
		||||
        var args = Array.prototype.slice.call(arguments, 1);
 | 
			
		||||
        var result = string.value;
 | 
			
		||||
        var _loop_1 = function (i) {
 | 
			
		||||
            /* jshint loopfunc:true */
 | 
			
		||||
            result = result.replace(/%[sda]/i, function (token) {
 | 
			
		||||
                var value = ((args[i].type === 'Quoted') &&
 | 
			
		||||
                    token.match(/s/i)) ? args[i].value : args[i].toCSS();
 | 
			
		||||
                return token.match(/[A-Z]$/) ? encodeURIComponent(value) : value;
 | 
			
		||||
            });
 | 
			
		||||
        };
 | 
			
		||||
        for (var i = 0; i < args.length; i++) {
 | 
			
		||||
            _loop_1(i);
 | 
			
		||||
        }
 | 
			
		||||
        result = result.replace(/%%/g, '%');
 | 
			
		||||
        return new quoted_1.default(string.quote || '', result, string.escaped);
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
//# sourceMappingURL=string.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/functions/string.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/functions/string.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"string.js","sourceRoot":"","sources":["../../../src/less/functions/string.js"],"names":[],"mappings":";;;AAAA,kEAAoC;AACpC,wEAA0C;AAC1C,0EAA4C;AAE5C,kBAAe;IACX,CAAC,EAAE,UAAU,GAAG;QACZ,OAAO,IAAI,gBAAM,CAAC,GAAG,EAAE,GAAG,YAAY,oBAAU,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACxF,CAAC;IACD,MAAM,EAAE,UAAU,GAAG;QACjB,OAAO,IAAI,mBAAS,CAChB,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;aACnG,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,EAAE,UAAU,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK;QAClD,IAAI,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,WAAW,GAAG,CAAC,WAAW,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;YAC3C,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;QAC5C,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC;QAC1F,OAAO,IAAI,gBAAM,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAClE,CAAC;IACD,GAAG,EAAE,UAAU,MAAM,CAAC,mBAAmB;QACrC,IAAM,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;QACtD,IAAI,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC;gCAEjB,CAAC;YACN,0BAA0B;YAC1B,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,UAAA,KAAK;gBACpC,IAAM,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC;oBACtC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;gBACzD,OAAO,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YACrE,CAAC,CAAC,CAAC;;QANP,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE;oBAA3B,CAAC;SAOT;QACD,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACpC,OAAO,IAAI,gBAAM,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAClE,CAAC;CACJ,CAAC","sourcesContent":["import Quoted from '../tree/quoted';\nimport Anonymous from '../tree/anonymous';\nimport JavaScript from '../tree/javascript';\n\nexport default {\n    e: function (str) {\n        return new Quoted('\"', str instanceof JavaScript ? str.evaluated : str.value, true);\n    },\n    escape: function (str) {\n        return new Anonymous(\n            encodeURI(str.value).replace(/=/g, '%3D').replace(/:/g, '%3A').replace(/#/g, '%23').replace(/;/g, '%3B')\n                .replace(/\\(/g, '%28').replace(/\\)/g, '%29'));\n    },\n    replace: function (string, pattern, replacement, flags) {\n        let result = string.value;\n        replacement = (replacement.type === 'Quoted') ?\n            replacement.value : replacement.toCSS();\n        result = result.replace(new RegExp(pattern.value, flags ? flags.value : ''), replacement);\n        return new Quoted(string.quote || '', result, string.escaped);\n    },\n    '%': function (string /* arg, arg, ... */) {\n        const args = Array.prototype.slice.call(arguments, 1);\n        let result = string.value;\n\n        for (let i = 0; i < args.length; i++) {\n            /* jshint loopfunc:true */\n            result = result.replace(/%[sda]/i, token => {\n                const value = ((args[i].type === 'Quoted') &&\n                    token.match(/s/i)) ? args[i].value : args[i].toCSS();\n                return token.match(/[A-Z]$/) ? encodeURIComponent(value) : value;\n            });\n        }\n        result = result.replace(/%%/g, '%');\n        return new Quoted(string.quote || '', result, string.escaped);\n    }\n};\n"]}
 | 
			
		||||
							
								
								
									
										86
									
								
								node_modules/less/lib/less/functions/svg.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										86
									
								
								node_modules/less/lib/less/functions/svg.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,86 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var dimension_1 = tslib_1.__importDefault(require("../tree/dimension"));
 | 
			
		||||
var color_1 = tslib_1.__importDefault(require("../tree/color"));
 | 
			
		||||
var expression_1 = tslib_1.__importDefault(require("../tree/expression"));
 | 
			
		||||
var quoted_1 = tslib_1.__importDefault(require("../tree/quoted"));
 | 
			
		||||
var url_1 = tslib_1.__importDefault(require("../tree/url"));
 | 
			
		||||
exports.default = (function () {
 | 
			
		||||
    return { 'svg-gradient': function (direction) {
 | 
			
		||||
            var stops;
 | 
			
		||||
            var gradientDirectionSvg;
 | 
			
		||||
            var gradientType = 'linear';
 | 
			
		||||
            var rectangleDimension = 'x="0" y="0" width="1" height="1"';
 | 
			
		||||
            var renderEnv = { compress: false };
 | 
			
		||||
            var returner;
 | 
			
		||||
            var directionValue = direction.toCSS(renderEnv);
 | 
			
		||||
            var i;
 | 
			
		||||
            var color;
 | 
			
		||||
            var position;
 | 
			
		||||
            var positionValue;
 | 
			
		||||
            var alpha;
 | 
			
		||||
            function throwArgumentDescriptor() {
 | 
			
		||||
                throw { type: 'Argument',
 | 
			
		||||
                    message: 'svg-gradient expects direction, start_color [start_position], [color position,]...,' +
 | 
			
		||||
                        ' end_color [end_position] or direction, color list' };
 | 
			
		||||
            }
 | 
			
		||||
            if (arguments.length == 2) {
 | 
			
		||||
                if (arguments[1].value.length < 2) {
 | 
			
		||||
                    throwArgumentDescriptor();
 | 
			
		||||
                }
 | 
			
		||||
                stops = arguments[1].value;
 | 
			
		||||
            }
 | 
			
		||||
            else if (arguments.length < 3) {
 | 
			
		||||
                throwArgumentDescriptor();
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                stops = Array.prototype.slice.call(arguments, 1);
 | 
			
		||||
            }
 | 
			
		||||
            switch (directionValue) {
 | 
			
		||||
                case 'to bottom':
 | 
			
		||||
                    gradientDirectionSvg = 'x1="0%" y1="0%" x2="0%" y2="100%"';
 | 
			
		||||
                    break;
 | 
			
		||||
                case 'to right':
 | 
			
		||||
                    gradientDirectionSvg = 'x1="0%" y1="0%" x2="100%" y2="0%"';
 | 
			
		||||
                    break;
 | 
			
		||||
                case 'to bottom right':
 | 
			
		||||
                    gradientDirectionSvg = 'x1="0%" y1="0%" x2="100%" y2="100%"';
 | 
			
		||||
                    break;
 | 
			
		||||
                case 'to top right':
 | 
			
		||||
                    gradientDirectionSvg = 'x1="0%" y1="100%" x2="100%" y2="0%"';
 | 
			
		||||
                    break;
 | 
			
		||||
                case 'ellipse':
 | 
			
		||||
                case 'ellipse at center':
 | 
			
		||||
                    gradientType = 'radial';
 | 
			
		||||
                    gradientDirectionSvg = 'cx="50%" cy="50%" r="75%"';
 | 
			
		||||
                    rectangleDimension = 'x="-50" y="-50" width="101" height="101"';
 | 
			
		||||
                    break;
 | 
			
		||||
                default:
 | 
			
		||||
                    throw { type: 'Argument', message: 'svg-gradient direction must be \'to bottom\', \'to right\',' +
 | 
			
		||||
                            ' \'to bottom right\', \'to top right\' or \'ellipse at center\'' };
 | 
			
		||||
            }
 | 
			
		||||
            returner = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1 1\"><" + gradientType + "Gradient id=\"g\" " + gradientDirectionSvg + ">";
 | 
			
		||||
            for (i = 0; i < stops.length; i += 1) {
 | 
			
		||||
                if (stops[i] instanceof expression_1.default) {
 | 
			
		||||
                    color = stops[i].value[0];
 | 
			
		||||
                    position = stops[i].value[1];
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    color = stops[i];
 | 
			
		||||
                    position = undefined;
 | 
			
		||||
                }
 | 
			
		||||
                if (!(color instanceof color_1.default) || (!((i === 0 || i + 1 === stops.length) && position === undefined) && !(position instanceof dimension_1.default))) {
 | 
			
		||||
                    throwArgumentDescriptor();
 | 
			
		||||
                }
 | 
			
		||||
                positionValue = position ? position.toCSS(renderEnv) : i === 0 ? '0%' : '100%';
 | 
			
		||||
                alpha = color.alpha;
 | 
			
		||||
                returner += "<stop offset=\"" + positionValue + "\" stop-color=\"" + color.toRGB() + "\"" + (alpha < 1 ? " stop-opacity=\"" + alpha + "\"" : '') + "/>";
 | 
			
		||||
            }
 | 
			
		||||
            returner += "</" + gradientType + "Gradient><rect " + rectangleDimension + " fill=\"url(#g)\" /></svg>";
 | 
			
		||||
            returner = encodeURIComponent(returner);
 | 
			
		||||
            returner = "data:image/svg+xml," + returner;
 | 
			
		||||
            return new url_1.default(new quoted_1.default("'" + returner + "'", returner, false, this.index, this.currentFileInfo), this.index, this.currentFileInfo);
 | 
			
		||||
        } };
 | 
			
		||||
});
 | 
			
		||||
//# sourceMappingURL=svg.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/functions/svg.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/functions/svg.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										74
									
								
								node_modules/less/lib/less/functions/types.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										74
									
								
								node_modules/less/lib/less/functions/types.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,74 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var keyword_1 = tslib_1.__importDefault(require("../tree/keyword"));
 | 
			
		||||
var detached_ruleset_1 = tslib_1.__importDefault(require("../tree/detached-ruleset"));
 | 
			
		||||
var dimension_1 = tslib_1.__importDefault(require("../tree/dimension"));
 | 
			
		||||
var color_1 = tslib_1.__importDefault(require("../tree/color"));
 | 
			
		||||
var quoted_1 = tslib_1.__importDefault(require("../tree/quoted"));
 | 
			
		||||
var anonymous_1 = tslib_1.__importDefault(require("../tree/anonymous"));
 | 
			
		||||
var url_1 = tslib_1.__importDefault(require("../tree/url"));
 | 
			
		||||
var operation_1 = tslib_1.__importDefault(require("../tree/operation"));
 | 
			
		||||
var isa = function (n, Type) { return (n instanceof Type) ? keyword_1.default.True : keyword_1.default.False; };
 | 
			
		||||
var isunit = function (n, unit) {
 | 
			
		||||
    if (unit === undefined) {
 | 
			
		||||
        throw { type: 'Argument', message: 'missing the required second argument to isunit.' };
 | 
			
		||||
    }
 | 
			
		||||
    unit = typeof unit.value === 'string' ? unit.value : unit;
 | 
			
		||||
    if (typeof unit !== 'string') {
 | 
			
		||||
        throw { type: 'Argument', message: 'Second argument to isunit should be a unit or a string.' };
 | 
			
		||||
    }
 | 
			
		||||
    return (n instanceof dimension_1.default) && n.unit.is(unit) ? keyword_1.default.True : keyword_1.default.False;
 | 
			
		||||
};
 | 
			
		||||
exports.default = {
 | 
			
		||||
    isruleset: function (n) {
 | 
			
		||||
        return isa(n, detached_ruleset_1.default);
 | 
			
		||||
    },
 | 
			
		||||
    iscolor: function (n) {
 | 
			
		||||
        return isa(n, color_1.default);
 | 
			
		||||
    },
 | 
			
		||||
    isnumber: function (n) {
 | 
			
		||||
        return isa(n, dimension_1.default);
 | 
			
		||||
    },
 | 
			
		||||
    isstring: function (n) {
 | 
			
		||||
        return isa(n, quoted_1.default);
 | 
			
		||||
    },
 | 
			
		||||
    iskeyword: function (n) {
 | 
			
		||||
        return isa(n, keyword_1.default);
 | 
			
		||||
    },
 | 
			
		||||
    isurl: function (n) {
 | 
			
		||||
        return isa(n, url_1.default);
 | 
			
		||||
    },
 | 
			
		||||
    ispixel: function (n) {
 | 
			
		||||
        return isunit(n, 'px');
 | 
			
		||||
    },
 | 
			
		||||
    ispercentage: function (n) {
 | 
			
		||||
        return isunit(n, '%');
 | 
			
		||||
    },
 | 
			
		||||
    isem: function (n) {
 | 
			
		||||
        return isunit(n, 'em');
 | 
			
		||||
    },
 | 
			
		||||
    isunit: isunit,
 | 
			
		||||
    unit: function (val, unit) {
 | 
			
		||||
        if (!(val instanceof dimension_1.default)) {
 | 
			
		||||
            throw { type: 'Argument',
 | 
			
		||||
                message: "the first argument to unit must be a number" + (val instanceof operation_1.default ? '. Have you forgotten parenthesis?' : '') };
 | 
			
		||||
        }
 | 
			
		||||
        if (unit) {
 | 
			
		||||
            if (unit instanceof keyword_1.default) {
 | 
			
		||||
                unit = unit.value;
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                unit = unit.toCSS();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            unit = '';
 | 
			
		||||
        }
 | 
			
		||||
        return new dimension_1.default(val.value, unit);
 | 
			
		||||
    },
 | 
			
		||||
    'get-unit': function (n) {
 | 
			
		||||
        return new anonymous_1.default(n.unit);
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
//# sourceMappingURL=types.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								node_modules/less/lib/less/functions/types.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/less/lib/less/functions/types.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/less/functions/types.js"],"names":[],"mappings":";;;AAAA,oEAAsC;AACtC,sFAAuD;AACvD,wEAA0C;AAC1C,gEAAkC;AAClC,kEAAoC;AACpC,wEAA0C;AAC1C,4DAA8B;AAC9B,wEAA0C;AAE1C,IAAM,GAAG,GAAG,UAAC,CAAC,EAAE,IAAI,IAAK,OAAA,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC,iBAAO,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAO,CAAC,KAAK,EAAlD,CAAkD,CAAC;AAC5E,IAAM,MAAM,GAAG,UAAC,CAAC,EAAE,IAAI;IACnB,IAAI,IAAI,KAAK,SAAS,EAAE;QACpB,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,iDAAiD,EAAE,CAAC;KAC1F;IACD,IAAI,GAAG,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1D,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC1B,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,yDAAyD,EAAE,CAAC;KAClG;IACD,OAAO,CAAC,CAAC,YAAY,mBAAS,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,iBAAO,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAO,CAAC,KAAK,CAAC;AACtF,CAAC,CAAC;AAEF,kBAAe;IACX,SAAS,EAAE,UAAU,CAAC;QAClB,OAAO,GAAG,CAAC,CAAC,EAAE,0BAAe,CAAC,CAAC;IACnC,CAAC;IACD,OAAO,EAAE,UAAU,CAAC;QAChB,OAAO,GAAG,CAAC,CAAC,EAAE,eAAK,CAAC,CAAC;IACzB,CAAC;IACD,QAAQ,EAAE,UAAU,CAAC;QACjB,OAAO,GAAG,CAAC,CAAC,EAAE,mBAAS,CAAC,CAAC;IAC7B,CAAC;IACD,QAAQ,EAAE,UAAU,CAAC;QACjB,OAAO,GAAG,CAAC,CAAC,EAAE,gBAAM,CAAC,CAAC;IAC1B,CAAC;IACD,SAAS,EAAE,UAAU,CAAC;QAClB,OAAO,GAAG,CAAC,CAAC,EAAE,iBAAO,CAAC,CAAC;IAC3B,CAAC;IACD,KAAK,EAAE,UAAU,CAAC;QACd,OAAO,GAAG,CAAC,CAAC,EAAE,aAAG,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,EAAE,UAAU,CAAC;QAChB,OAAO,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;IACD,YAAY,EAAE,UAAU,CAAC;QACrB,OAAO,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;IACD,IAAI,EAAE,UAAU,CAAC;QACb,OAAO,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;IACD,MAAM,QAAA;IACN,IAAI,EAAE,UAAU,GAAG,EAAE,IAAI;QACrB,IAAI,CAAC,CAAC,GAAG,YAAY,mBAAS,CAAC,EAAE;YAC7B,MAAM,EAAE,IAAI,EAAE,UAAU;gBACpB,OAAO,EAAE,iDAA8C,GAAG,YAAY,mBAAS,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,EAAE,CAAE,EAAE,CAAC;SACtI;QACD,IAAI,IAAI,EAAE;YACN,IAAI,IAAI,YAAY,iBAAO,EAAE;gBACzB,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;aACrB;iBAAM;gBACH,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;aACvB;SACJ;aAAM;YACH,IAAI,GAAG,EAAE,CAAC;SACb;QACD,OAAO,IAAI,mBAAS,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;IACD,UAAU,EAAE,UAAU,CAAC;QACnB,OAAO,IAAI,mBAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;CACJ,CAAC","sourcesContent":["import Keyword from '../tree/keyword';\nimport DetachedRuleset from '../tree/detached-ruleset';\nimport Dimension from '../tree/dimension';\nimport Color from '../tree/color';\nimport Quoted from '../tree/quoted';\nimport Anonymous from '../tree/anonymous';\nimport URL from '../tree/url';\nimport Operation from '../tree/operation';\n\nconst isa = (n, Type) => (n instanceof Type) ? Keyword.True : Keyword.False;\nconst isunit = (n, unit) => {\n    if (unit === undefined) {\n        throw { type: 'Argument', message: 'missing the required second argument to isunit.' };\n    }\n    unit = typeof unit.value === 'string' ? unit.value : unit;\n    if (typeof unit !== 'string') {\n        throw { type: 'Argument', message: 'Second argument to isunit should be a unit or a string.' };\n    }\n    return (n instanceof Dimension) && n.unit.is(unit) ? Keyword.True : Keyword.False;\n};\n\nexport default {\n    isruleset: function (n) {\n        return isa(n, DetachedRuleset);\n    },\n    iscolor: function (n) {\n        return isa(n, Color);\n    },\n    isnumber: function (n) {\n        return isa(n, Dimension);\n    },\n    isstring: function (n) {\n        return isa(n, Quoted);\n    },\n    iskeyword: function (n) {\n        return isa(n, Keyword);\n    },\n    isurl: function (n) {\n        return isa(n, URL);\n    },\n    ispixel: function (n) {\n        return isunit(n, 'px');\n    },\n    ispercentage: function (n) {\n        return isunit(n, '%');\n    },\n    isem: function (n) {\n        return isunit(n, 'em');\n    },\n    isunit,\n    unit: function (val, unit) {\n        if (!(val instanceof Dimension)) {\n            throw { type: 'Argument',\n                message: `the first argument to unit must be a number${val instanceof Operation ? '. Have you forgotten parenthesis?' : ''}` };\n        }\n        if (unit) {\n            if (unit instanceof Keyword) {\n                unit = unit.value;\n            } else {\n                unit = unit.toCSS();\n            }\n        } else {\n            unit = '';\n        }\n        return new Dimension(val.value, unit);\n    },\n    'get-unit': function (n) {\n        return new Anonymous(n.unit);\n    }\n};\n"]}
 | 
			
		||||
							
								
								
									
										174
									
								
								node_modules/less/lib/less/import-manager.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										174
									
								
								node_modules/less/lib/less/import-manager.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,174 @@
 | 
			
		|||
"use strict";
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
var tslib_1 = require("tslib");
 | 
			
		||||
var contexts_1 = tslib_1.__importDefault(require("./contexts"));
 | 
			
		||||
var parser_1 = tslib_1.__importDefault(require("./parser/parser"));
 | 
			
		||||
var less_error_1 = tslib_1.__importDefault(require("./less-error"));
 | 
			
		||||
var utils = tslib_1.__importStar(require("./utils"));
 | 
			
		||||
var logger_1 = tslib_1.__importDefault(require("./logger"));
 | 
			
		||||
function default_1(environment) {
 | 
			
		||||
    // FileInfo = {
 | 
			
		||||
    //  'rewriteUrls' - option - whether to adjust URL's to be relative
 | 
			
		||||
    //  'filename' - full resolved filename of current file
 | 
			
		||||
    //  'rootpath' - path to append to normal URLs for this node
 | 
			
		||||
    //  'currentDirectory' - path to the current file, absolute
 | 
			
		||||
    //  'rootFilename' - filename of the base file
 | 
			
		||||
    //  'entryPath' - absolute path to the entry file
 | 
			
		||||
    //  'reference' - whether the file should not be output and only output parts that are referenced
 | 
			
		||||
    var ImportManager = /** @class */ (function () {
 | 
			
		||||
        function ImportManager(less, context, rootFileInfo) {
 | 
			
		||||
            this.less = less;
 | 
			
		||||
            this.rootFilename = rootFileInfo.filename;
 | 
			
		||||
            this.paths = context.paths || []; // Search paths, when importing
 | 
			
		||||
            this.contents = {}; // map - filename to contents of all the files
 | 
			
		||||
            this.contentsIgnoredChars = {}; // map - filename to lines at the beginning of each file to ignore
 | 
			
		||||
            this.mime = context.mime;
 | 
			
		||||
            this.error = null;
 | 
			
		||||
            this.context = context;
 | 
			
		||||
            // Deprecated? Unused outside of here, could be useful.
 | 
			
		||||
            this.queue = []; // Files which haven't been imported yet
 | 
			
		||||
            this.files = {}; // Holds the imported parse trees.
 | 
			
		||||
        }
 | 
			
		||||
        /**
 | 
			
		||||
         * Add an import to be imported
 | 
			
		||||
         * @param path - the raw path
 | 
			
		||||
         * @param tryAppendExtension - whether to try appending a file extension (.less or .js if the path has no extension)
 | 
			
		||||
         * @param currentFileInfo - the current file info (used for instance to work out relative paths)
 | 
			
		||||
         * @param importOptions - import options
 | 
			
		||||
         * @param callback - callback for when it is imported
 | 
			
		||||
         */
 | 
			
		||||
        ImportManager.prototype.push = function (path, tryAppendExtension, currentFileInfo, importOptions, callback) {
 | 
			
		||||
            var importManager = this, pluginLoader = this.context.pluginManager.Loader;
 | 
			
		||||
            this.queue.push(path);
 | 
			
		||||
            var fileParsedFunc = function (e, root, fullPath) {
 | 
			
		||||
                importManager.queue.splice(importManager.queue.indexOf(path), 1); // Remove the path from the queue
 | 
			
		||||
                var importedEqualsRoot = fullPath === importManager.rootFilename;
 | 
			
		||||
                if (importOptions.optional && e) {
 | 
			
		||||
                    callback(null, { rules: [] }, false, null);
 | 
			
		||||
                    logger_1.default.info("The file " + fullPath + " was skipped because it was not found and the import was marked optional.");
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    // Inline imports aren't cached here.
 | 
			
		||||
                    // If we start to cache them, please make sure they won't conflict with non-inline imports of the
 | 
			
		||||
                    // same name as they used to do before this comment and the condition below have been added.
 | 
			
		||||
                    if (!importManager.files[fullPath] && !importOptions.inline) {
 | 
			
		||||
                        importManager.files[fullPath] = { root: root, options: importOptions };
 | 
			
		||||
                    }
 | 
			
		||||
                    if (e && !importManager.error) {
 | 
			
		||||
                        importManager.error = e;
 | 
			
		||||
                    }
 | 
			
		||||
                    callback(e, root, importedEqualsRoot, fullPath);
 | 
			
		||||
                }
 | 
			
		||||
            };
 | 
			
		||||
            var newFileInfo = {
 | 
			
		||||
                rewriteUrls: this.context.rewriteUrls,
 | 
			
		||||
                entryPath: currentFileInfo.entryPath,
 | 
			
		||||
                rootpath: currentFileInfo.rootpath,
 | 
			
		||||
                rootFilename: currentFileInfo.rootFilename
 | 
			
		||||
            };
 | 
			
		||||
            var fileManager = environment.getFileManager(path, currentFileInfo.currentDirectory, this.context, environment);
 | 
			
		||||
            if (!fileManager) {
 | 
			
		||||
                fileParsedFunc({ message: "Could not find a file-manager for " + path });
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            var loadFileCallback = function (loadedFile) {
 | 
			
		||||
                var plugin;
 | 
			
		||||
                var resolvedFilename = loadedFile.filename;
 | 
			
		||||
                var contents = loadedFile.contents.replace(/^\uFEFF/, '');
 | 
			
		||||
                // Pass on an updated rootpath if path of imported file is relative and file
 | 
			
		||||
                // is in a (sub|sup) directory
 | 
			
		||||
                //
 | 
			
		||||
                // Examples:
 | 
			
		||||
                // - If path of imported file is 'module/nav/nav.less' and rootpath is 'less/',
 | 
			
		||||
                //   then rootpath should become 'less/module/nav/'
 | 
			
		||||
                // - If path of imported file is '../mixins.less' and rootpath is 'less/',
 | 
			
		||||
                //   then rootpath should become 'less/../'
 | 
			
		||||
                newFileInfo.currentDirectory = fileManager.getPath(resolvedFilename);
 | 
			
		||||
                if (newFileInfo.rewriteUrls) {
 | 
			
		||||
                    newFileInfo.rootpath = fileManager.join((importManager.context.rootpath || ''), fileManager.pathDiff(newFileInfo.currentDirectory, newFileInfo.entryPath));
 | 
			
		||||
                    if (!fileManager.isPathAbsolute(newFileInfo.rootpath) && fileManager.alwaysMakePathsAbsolute()) {
 | 
			
		||||
                        newFileInfo.rootpath = fileManager.join(newFileInfo.entryPath, newFileInfo.rootpath);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                newFileInfo.filename = resolvedFilename;
 | 
			
		||||
                var newEnv = new contexts_1.default.Parse(importManager.context);
 | 
			
		||||
                newEnv.processImports = false;
 | 
			
		||||
                importManager.contents[resolvedFilename] = contents;
 | 
			
		||||
                if (currentFileInfo.reference || importOptions.reference) {
 | 
			
		||||
                    newFileInfo.reference = true;
 | 
			
		||||
                }
 | 
			
		||||
                if (importOptions.isPlugin) {
 | 
			
		||||
                    plugin = pluginLoader.evalPlugin(contents, newEnv, importManager, importOptions.pluginArgs, newFileInfo);
 | 
			
		||||
                    if (plugin instanceof less_error_1.default) {
 | 
			
		||||
                        fileParsedFunc(plugin, null, resolvedFilename);
 | 
			
		||||
                    }
 | 
			
		||||
                    else {
 | 
			
		||||
                        fileParsedFunc(null, plugin, resolvedFilename);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                else if (importOptions.inline) {
 | 
			
		||||
                    fileParsedFunc(null, contents, resolvedFilename);
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    // import (multiple) parse trees apparently get altered and can't be cached.
 | 
			
		||||
                    // TODO: investigate why this is
 | 
			
		||||
                    if (importManager.files[resolvedFilename]
 | 
			
		||||
                        && !importManager.files[resolvedFilename].options.multiple
 | 
			
		||||
                        && !importOptions.multiple) {
 | 
			
		||||
                        fileParsedFunc(null, importManager.files[resolvedFilename].root, resolvedFilename);
 | 
			
		||||
                    }
 | 
			
		||||
                    else {
 | 
			
		||||
                        new parser_1.default(newEnv, importManager, newFileInfo).parse(contents, function (e, root) {
 | 
			
		||||
                            fileParsedFunc(e, root, resolvedFilename);
 | 
			
		||||
                        });
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            };
 | 
			
		||||
            var loadedFile;
 | 
			
		||||
            var promise;
 | 
			
		||||
            var context = utils.clone(this.context);
 | 
			
		||||
            if (tryAppendExtension) {
 | 
			
		||||
                context.ext = importOptions.isPlugin ? '.js' : '.less';
 | 
			
		||||
            }
 | 
			
		||||
            if (importOptions.isPlugin) {
 | 
			
		||||
                context.mime = 'application/javascript';
 | 
			
		||||
                if (context.syncImport) {
 | 
			
		||||
                    loadedFile = pluginLoader.loadPluginSync(path, currentFileInfo.currentDirectory, context, environment, fileManager);
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    promise = pluginLoader.loadPlugin(path, currentFileInfo.currentDirectory, context, environment, fileManager);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                if (context.syncImport) {
 | 
			
		||||
                    loadedFile = fileManager.loadFileSync(path, currentFileInfo.currentDirectory, context, environment);
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    promise = fileManager.loadFile(path, currentFileInfo.currentDirectory, context, environment, function (err, loadedFile) {
 | 
			
		||||
                        if (err) {
 | 
			
		||||
                            fileParsedFunc(err);
 | 
			
		||||
                        }
 | 
			
		||||
                        else {
 | 
			
		||||
                            loadFileCallback(loadedFile);
 | 
			
		||||
                        }
 | 
			
		||||
                    });
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            if (loadedFile) {
 | 
			
		||||
                if (!loadedFile.filename) {
 | 
			
		||||
                    fileParsedFunc(loadedFile);
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    loadFileCallback(loadedFile);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            else if (promise) {
 | 
			
		||||
                promise.then(loadFileCallback, fileParsedFunc);
 | 
			
		||||
            }
 | 
			
		||||
        };
 | 
			
		||||
        return ImportManager;
 | 
			
		||||
    }());
 | 
			
		||||
    return ImportManager;
 | 
			
		||||
}
 | 
			
		||||
exports.default = default_1;
 | 
			
		||||
//# sourceMappingURL=import-manager.js.map
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show more
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue