├── vendor ├── meenie │ └── javascript-packer │ │ ├── .gitignore │ │ ├── class.JavaScriptPacker.php4 │ │ ├── composer.json │ │ ├── readme.txt │ │ ├── example-file.php │ │ ├── example-inline.php │ │ └── class.JavaScriptPacker.php ├── wyrihaximus │ └── html-compress │ │ ├── .coveralls.yml │ │ ├── phpcs.xml │ │ ├── src │ │ ├── Compressor │ │ │ ├── CssMinifierCompressor.php │ │ │ ├── ReturnCompressor.php │ │ │ ├── Compressor.php │ │ │ ├── CompressorInterface.php │ │ │ ├── JavaScriptPackerCompressor.php │ │ │ ├── JSMinCompressor.php │ │ │ ├── JSqueezeCompressor.php │ │ │ ├── BestResultCompressor.php │ │ │ ├── CssMinCompressor.php │ │ │ └── HtmlCompressor.php │ │ ├── Patterns.php │ │ ├── Tokens.php │ │ ├── Token.php │ │ ├── Frameworks │ │ │ └── SculpinListener.php │ │ ├── Parser.php │ │ ├── Tokenizer.php │ │ └── Factory.php │ │ ├── .dunitconfig │ │ ├── Makefile │ │ ├── LICENSE │ │ ├── composer.json │ │ ├── CONTRIBUTING.md │ │ └── README.md ├── websharks │ └── css-minifier │ │ ├── CHANGELOG.md │ │ ├── src │ │ ├── includes │ │ │ ├── stub.php │ │ │ ├── phar-stub.php │ │ │ └── classes │ │ │ │ └── Core.php │ │ └── .htaccess │ │ ├── composer.lock │ │ ├── composer.json │ │ ├── README.md │ │ └── LICENSE.txt ├── linkorb │ └── jsmin-php │ │ ├── README.md │ │ ├── composer.json │ │ └── src │ │ └── jsmin-1.1.1.php ├── natxet │ └── CssMin │ │ ├── README │ │ └── composer.json ├── autoload.php ├── composer │ ├── autoload_namespaces.php │ ├── autoload_files.php │ ├── autoload_psr4.php │ ├── LICENSE │ ├── autoload_real.php │ ├── autoload_classmap.php │ ├── autoload_static.php │ ├── installed.json │ └── ClassLoader.php └── patchwork │ └── jsqueeze │ ├── composer.json │ ├── README.md │ ├── LICENSE.ASL20 │ └── LICENSE.GPLv2 ├── composer.json ├── README.md ├── Plugin.php └── composer.lock /vendor/meenie/javascript-packer/.gitignore: -------------------------------------------------------------------------------- 1 | .idea -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/.coveralls.yml: -------------------------------------------------------------------------------- 1 | src_dir: src/ 2 | -------------------------------------------------------------------------------- /vendor/websharks/css-minifier/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## v150510 2 | 3 | - Initial release. 4 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "wyrihaximus/html-compress": "^1.2" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /vendor/linkorb/jsmin-php/README.md: -------------------------------------------------------------------------------- 1 | # jsmin-php 2 | 3 | Unofficial repo containing a composer enabled jsmin-php 4 | 5 | Please check the composer.json for original authors and credits. 6 | -------------------------------------------------------------------------------- /vendor/meenie/javascript-packer/class.JavaScriptPacker.php4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kokororin/typecho-plugin-HTMLCompress/HEAD/vendor/meenie/javascript-packer/class.JavaScriptPacker.php4 -------------------------------------------------------------------------------- /vendor/natxet/CssMin/README: -------------------------------------------------------------------------------- 1 | This is just a copy of the CssMin by Joe Scylla to format it for Composer. 2 | Composer: http://packagist.org/about-composer 3 | CssMin: http://code.google.com/p/cssmin/ 4 | -------------------------------------------------------------------------------- /vendor/autoload.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Object Calisthenics 4 | 5 | 6 | -------------------------------------------------------------------------------- /vendor/composer/autoload_files.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/meenie/javascript-packer/class.JavaScriptPacker.php', 10 | ); 11 | -------------------------------------------------------------------------------- /vendor/websharks/css-minifier/src/includes/phar-stub.php: -------------------------------------------------------------------------------- 1 | =5.4,以下版本请用[1.2版](https://github.com/kokororin/typecho-plugin-HTMLCompress/tree/1.2) -------------------------------------------------------------------------------- /vendor/websharks/css-minifier/src/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Require all denied 3 | 4 | 5 | deny from all 6 | 7 | 8 | 9 | 10 | Require all granted 11 | 12 | 13 | allow from all 14 | 15 | 16 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/src/Compressor/CssMinifierCompressor.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class CssMinifierCompressor extends Compressor 13 | { 14 | protected function execute($string) 15 | { 16 | return Core::compress($string); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vendor/composer/autoload_psr4.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/wyrihaximus/html-compress/src'), 10 | 'WebSharks\\CssMinifier\\' => array($vendorDir . '/websharks/css-minifier/src/includes/classes'), 11 | 'Patchwork\\' => array($vendorDir . '/patchwork/jsqueeze/src'), 12 | ); 13 | -------------------------------------------------------------------------------- /vendor/meenie/javascript-packer/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "meenie/javascript-packer", 3 | "description": "Composer hosted mirror of the PHP Version of Dean Edwards' JavaScript Packer", 4 | "keywords": ["javascript packer"], 5 | "homepage": "http://joliclic.free.fr/php/javascript-packer/en/", 6 | "license": "LGPL 2.1", 7 | "authors": [ 8 | { 9 | "name": "Nicolas Martin", 10 | "role": "Developer" 11 | } 12 | ], 13 | "autoload": { 14 | "files": ["class.JavaScriptPacker.php"] 15 | } 16 | } -------------------------------------------------------------------------------- /vendor/meenie/javascript-packer/readme.txt: -------------------------------------------------------------------------------- 1 | PHP 5 : 2 | use class.JavaScriptPacker.php (Tested under PHP 5.1.2, 5.1.3, 5.1.4, 5.2.3.) 3 | - usage and comments in source. 4 | - there is 2 examples in this archive for PHP 5, 5 | 'example-file.php' and example-inline.php 6 | 7 | PHP 4 : 8 | use class.JavaScriptPacker.php4, it's an adaptation for PHP4. 9 | The examples in this archive will not work directly with PHP 4, they are 10 | writed in PHP5, you'll need to adapt them. If some functions are missing in 11 | PHP 4, you can find their equivalent here : 12 | http://pear.php.net/package/PHP_Compat 13 | -------------------------------------------------------------------------------- /vendor/natxet/CssMin/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "natxet/cssmin", 3 | "description": "Minifying CSS", 4 | "type": "library", 5 | "keywords": ["css","minify"], 6 | "homepage": "http://code.google.com/p/cssmin/", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Joe Scylla", 11 | "email": "joe.scylla@gmail.com", 12 | "homepage": "https://profiles.google.com/joe.scylla" 13 | } 14 | ], 15 | "require": { 16 | "php": ">=5.0" 17 | }, 18 | "autoload": { 19 | "classmap": ["src/"] 20 | }, 21 | "extra": { 22 | "branch-alias": { 23 | "dev-master": "3.0-dev" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/.dunitconfig: -------------------------------------------------------------------------------- 1 | // the list of docker images to run against 2 | images=" 3 | vectorface/php5.4 4 | vectorface/php5.5 5 | vectorface/php5.6 6 | vectorface/hhvm"; 7 | 8 | 9 | // a flag indicating whether to run the syntax check 10 | checkSyntax="true"; 11 | // the syntax command to execute 12 | syntaxCommand="find /opt/source -type f -name \"*.php\" ! -path \"*/vendor/*\" -print0 | xargs -0 -n 1 -P 8 php -l | grep -v 'No syntax errors'" 13 | 14 | // a flag indicating whether to run the phpunit test suite 15 | runTests="true"; 16 | // the phpunit command to execute 17 | unitTestsCommand="/opt/source/vendor/bin/phpunit" 18 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/Makefile: -------------------------------------------------------------------------------- 1 | all: cs dunit unit 2 | travis: cs unit-travis 3 | 4 | init: 5 | if [ ! -d vendor ]; then composer install; fi; 6 | 7 | cs: init 8 | ./vendor/bin/phpcs --standard=PSR2 src/ 9 | 10 | unit: init 11 | ./vendor/bin/phpunit --coverage-text --coverage-html covHtml 12 | 13 | unit-travis: init 14 | ./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml 15 | 16 | dunit: init 17 | ./vendor/bin/dunit 18 | 19 | travis-coverage: init 20 | if [ -f ./build/logs/clover.xml ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi 21 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/src/Compressor/ReturnCompressor.php: -------------------------------------------------------------------------------- 1 | execute($source); 18 | 19 | if (strlen($source) > strlen($result)) { 20 | return $result; 21 | } 22 | 23 | return $source; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/src/Compressor/CompressorInterface.php: -------------------------------------------------------------------------------- 1 | =5.3", 17 | "ext-mbstring": "*" 18 | }, 19 | "platform-dev": [] 20 | } 21 | -------------------------------------------------------------------------------- /vendor/patchwork/jsqueeze/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "patchwork/jsqueeze", 3 | "type": "library", 4 | "description": "Efficient JavaScript minification in PHP", 5 | "keywords": ["javascript","compression","minification"], 6 | "homepage": "https://github.com/tchwork/jsqueeze", 7 | "license": "(Apache-2.0 or GPL-2.0)", 8 | "authors": [ 9 | { 10 | "name": "Nicolas Grekas", 11 | "email": "p@tchwork.com" 12 | } 13 | ], 14 | "require": { 15 | "php": ">=5.3.0" 16 | }, 17 | "autoload": { 18 | "psr-4": { 19 | "Patchwork\\": "src/" 20 | } 21 | }, 22 | "extra": { 23 | "branch-alias": { 24 | "dev-master": "2.0-dev" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/src/Compressor/JavaScriptPackerCompressor.php: -------------------------------------------------------------------------------- 1 | pack(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/src/Compressor/JSMinCompressor.php: -------------------------------------------------------------------------------- 1 | = 3) { 11 | $src = $argv[1]; 12 | $out = $argv[2]; 13 | } else { 14 | echo 'you must specify a source file and a result filename',"\n"; 15 | echo 'example :', "\n", 'php example-file.php myScript-src.js myPackedScript.js',"\n"; 16 | return; 17 | } 18 | */ 19 | 20 | require 'class.JavaScriptPacker.php'; 21 | 22 | $script = file_get_contents($src); 23 | 24 | $t1 = microtime(true); 25 | 26 | $packer = new JavaScriptPacker($script, 'Normal', true, false); 27 | $packed = $packer->pack(); 28 | 29 | $t2 = microtime(true); 30 | $time = sprintf('%.4f', ($t2 - $t1) ); 31 | echo 'script ', $src, ' packed in ' , $out, ', in ', $time, ' s.', "\n"; 32 | 33 | file_put_contents($out, $packed); 34 | ?> 35 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/src/Compressor/JSqueezeCompressor.php: -------------------------------------------------------------------------------- 1 | squeeze($string); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vendor/linkorb/jsmin-php/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "linkorb/jsmin-php", 3 | "description": "Unofficial package of jsmin-php", 4 | "homepage": "http://www.github.com/linkorb/jsmin-php", 5 | "keywords": ["minify", "jsmin", "javascript"], 6 | "type": "library", 7 | "authors": [ 8 | { 9 | "name": "Joost Faassen", 10 | "email": "j.faassen@linkorb.com", 11 | "role": "Packaging for composer" 12 | }, 13 | { 14 | "name": "Douglas Crockford", 15 | "email": "douglas@crockford.com", 16 | "role": "" 17 | }, 18 | { 19 | "name": "Ryan Grove", 20 | "email": "ryan@wonko.com", 21 | "role": "PHP port" 22 | }, 23 | { 24 | "name": "Adam Gofort", 25 | "email": "aag@adamgoforth.com", 26 | "role": "Updates to the PHP port" 27 | } 28 | ], 29 | "require": { 30 | "php": ">=5.0.0" 31 | }, 32 | "autoload": { 33 | "classmap": ["src/"] 34 | }, 35 | "license": "MIT" 36 | } 37 | -------------------------------------------------------------------------------- /vendor/composer/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2016 Nils Adermann, Jordi Boggiano 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is furnished 9 | to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/src/Patterns.php: -------------------------------------------------------------------------------- 1 | |]*>?)(.*?)()!is'; 21 | const MATCH_TEXTAREA = '!()!is'; 22 | const MATCH_STYLE = '!()!is'; 23 | const MATCH_STYLE_INLINE = '!(<[^>]* style=")(.*?)(")!is'; 24 | // @codingStandardsIgnoreStart 25 | const MATCH_JSCRIPT = '!()!is'; 26 | // @codingStandardsIgnoreEnd 27 | const MATCH_SCRIPT = '!(]*>?)(.*?)()!is'; 28 | const MATCH_NOCOMPRESS = '!()(.*?)()!is'; 29 | } 30 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Cees-Jan Kiewiet 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/src/Tokens.php: -------------------------------------------------------------------------------- 1 | tokens = $tokens; 14 | } 15 | 16 | /** 17 | * @param $index 18 | * @param Tokens $tokens 19 | */ 20 | public function replace($index, Tokens $tokens) 21 | { 22 | $this->tokens = array_merge( 23 | array_slice($this->tokens, 0, $index), 24 | $tokens->getTokens(), 25 | array_slice($this->tokens, $index + 1) 26 | ); 27 | } 28 | 29 | /** 30 | * @return array|Token[] 31 | */ 32 | public function getTokens() 33 | { 34 | return $this->tokens; 35 | } 36 | 37 | public function getHtml() 38 | { 39 | $html = ''; 40 | foreach ($this->tokens as $token) { 41 | $html .= $token->getCombinedHtml(); 42 | } 43 | return $html; 44 | } 45 | 46 | public function count() 47 | { 48 | return count($this->tokens); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wyrihaximus/html-compress", 3 | "description": "Compress/minify your HTML", 4 | "license": "MIT", 5 | "authors": [ 6 | { 7 | "name": "Cees-Jan Kiewiet", 8 | "email": "ceesjank@gmail.com", 9 | "homepage": "http://wyrihaximus.net/" 10 | } 11 | ], 12 | "keywords": [ 13 | "html", 14 | "compress" 15 | ], 16 | "require": { 17 | "php": ">=5.4.0", 18 | "meenie/javascript-packer": "1.1", 19 | "linkorb/jsmin-php": "1.0.0", 20 | "patchwork/jsqueeze": "~1.0|~2.0", 21 | "natxet/CssMin": "^3.0", 22 | "websharks/css-minifier": "150820" 23 | }, 24 | "require-dev": { 25 | "phpunit/phpunit": "^4.0", 26 | "phake/phake": "^1.0", 27 | "vectorface/dunit": "^2.0", 28 | "squizlabs/php_codesniffer": "^1.0" 29 | }, 30 | "autoload": { 31 | "psr-4": { 32 | "WyriHaximus\\HtmlCompress\\": "src/" 33 | } 34 | }, 35 | "autoload-dev": { 36 | "psr-4": { 37 | "WyriHaximus\\HtmlCompress\\Tests\\": "tests/" 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Plugin.php: -------------------------------------------------------------------------------- 1 | beforeRender = array('HTMLCompress_Plugin', 'before'); 19 | } 20 | 21 | /** 22 | * 禁用插件 23 | */ 24 | public static function deactivate() 25 | { 26 | } 27 | 28 | /** 29 | * 插件设置 30 | */ 31 | public static function config(Typecho_Widget_Helper_Form $form) 32 | { 33 | } 34 | 35 | public static function personalConfig(Typecho_Widget_Helper_Form $form) 36 | { 37 | } 38 | 39 | public static function before($archive) 40 | { 41 | ob_start(array('HTMLCompress_Plugin', 'parser')); 42 | } 43 | 44 | public static function parser($html) 45 | { 46 | require_once __DIR__ . '/vendor/autoload.php'; 47 | $parser = \WyriHaximus\HtmlCompress\Factory::construct(); 48 | return $parser->compress($html); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/src/Compressor/BestResultCompressor.php: -------------------------------------------------------------------------------- 1 | compressors = $compressors; 25 | } 26 | 27 | /** 28 | * {@inheritdoc} 29 | */ 30 | protected function execute($string) 31 | { 32 | $result = $string; 33 | foreach ($this->compressors as $compressor) { 34 | $currentResult = $compressor->compress($string); 35 | 36 | if (strlen($currentResult) < strlen($result) && strlen($currentResult) > 0) { 37 | $result = $currentResult; 38 | } 39 | } 40 | 41 | return $result; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/src/Compressor/CssMinCompressor.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class CssMinCompressor extends Compressor 11 | { 12 | private $cssMin; 13 | 14 | public function __construct() 15 | { 16 | $this->cssMin = new \CssMin(); 17 | } 18 | 19 | protected function execute($string) 20 | { 21 | // If there's no selector, this must be an inline CSS attribute 22 | if (strlen($string) > 0 && strpos($string, '{') === false) { 23 | return $this->minifyInline($string); 24 | } 25 | 26 | return $this->cssMin->minify($string); 27 | } 28 | 29 | /** 30 | * Minifies inline CSS attributes. 31 | * 32 | * @param string $string 33 | * 34 | * @return string 35 | */ 36 | private function minifyInline($string) 37 | { 38 | // Get CssMin to compress inline CSS by adding and stripping a selector 39 | $mock = 'body{' . $string . '}'; 40 | $minified = $this->execute($mock); 41 | 42 | return substr($minified, 5, -1); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /vendor/websharks/css-minifier/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "websharks/css-minifier", 3 | "homepage": "https://github.com/websharks/css-minifier", 4 | "description": "Compresses CSS.", 5 | "keywords": [ 6 | "websharks", 7 | "css", 8 | "compressor" 9 | ], 10 | "type": "library", 11 | "license": "GPL-3.0+", 12 | "authors": [{ 13 | "name": "websharks", 14 | "homepage": "http://websharks-inc.com/", 15 | "role": "company" 16 | }, { 17 | "name": "jaswsinc", 18 | "homepage": "http://jaswsinc.com/", 19 | "role": "developer" 20 | }, { 21 | "name": "raamdev", 22 | "homepage": "http://raam.org/", 23 | "role": "developer" 24 | }], 25 | "support": { 26 | "source": "https://github.com/websharks/css-minifier", 27 | "issues": "https://github.com/websharks/css-minifier/issues" 28 | }, 29 | 30 | "require": { 31 | "php": ">=5.3", 32 | "ext-mbstring": "*" 33 | }, 34 | "minimum-stability": "dev", 35 | "prefer-stable": true, 36 | 37 | "autoload": { 38 | "psr-4": { 39 | "WebSharks\\CssMinifier\\": "src/includes/classes" 40 | } 41 | }, 42 | 43 | "config": { 44 | "vendor-dir": "src/vendor", 45 | "preferred-install": "dist" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/src/Compressor/HtmlCompressor.php: -------------------------------------------------------------------------------- 1 | or < 31 | $string = preg_replace('/ (>)/', '$1', $string); 32 | // Remove spaces that are preceded by either > or < 33 | $string = preg_replace('/(<) /', '$1', $string); 34 | // Remove spaces that are between > and < 35 | $string = preg_replace('/(>) (<)/', '>$2', $string); 36 | 37 | return trim($string); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Pull requests are highly appreciated. Here's a quick guide. 4 | 5 | Fork, then clone the repo: 6 | 7 | git clone git@github.com:your-username/HtmlCompress.git 8 | 9 | Set up your machine: 10 | 11 | composer install 12 | 13 | Make sure the tests pass: 14 | 15 | make unit 16 | 17 | Make sure the tests pass on all supported PHP versions (requires docker): 18 | 19 | make dunit 20 | 21 | Make your change. Add tests for your change. Make the tests pass: 22 | 23 | make dunit && make unit 24 | 25 | Before committing and submitting your pull request make sure it passes PSR2 coding style, unit tests pass and pass on all supported PHP versions: 26 | 27 | make contrib 28 | 29 | Push to your fork and [submit a pull request][pr]. 30 | 31 | [pr]: https://help.github.com/articles/creating-a-pull-request/ 32 | 33 | At this point you're waiting on me. I like to at least comment on pull requests 34 | within a day or two. I may suggest some changes or improvements or alternatives. 35 | 36 | Some things that will increase the chance that your pull request is accepted: 37 | 38 | * Write tests. 39 | * Follow PSR2 (travis will also check for this). 40 | * Write a [good commit message][commit]. 41 | 42 | [commit]: http://chris.beams.io/posts/git-commit/ 43 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/src/Token.php: -------------------------------------------------------------------------------- 1 | prefix = $prefix; 30 | $this->html = $html; 31 | $this->suffix = $suffix; 32 | $this->compressor = $compressor; 33 | } 34 | 35 | public function getPrefix() 36 | { 37 | return $this->prefix; 38 | } 39 | 40 | public function getSuffix() 41 | { 42 | return $this->suffix; 43 | } 44 | 45 | public function getHtml() 46 | { 47 | return $this->html; 48 | } 49 | 50 | public function getCombinedHtml() 51 | { 52 | return $this->getPrefix() . $this->getHtml() . $this->getSuffix(); 53 | } 54 | 55 | public function getCompressor() 56 | { 57 | return $this->compressor; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /vendor/websharks/css-minifier/README.md: -------------------------------------------------------------------------------- 1 | ## CSS Minification 2 | 3 | CSS minifier (i.e., compressor). 4 | 5 | [![](https://img.shields.io/github/license/websharks/css-minifier.svg)](https://github.com/websharks/css-minifier/blob/HEAD/LICENSE.txt) 6 | [![](https://img.shields.io/badge/made-w%2F_100%25_pure_awesome_sauce-AB815F.svg?label=made)](http://websharks-inc.com/) 7 | [![](https://img.shields.io/badge/by-WebSharks_Inc.-656598.svg?label=by)](http://www.websharks-inc.com/team/) 8 | [![](https://img.shields.io/github/release/websharks/css-minifier.svg?label=latest)](https://github.com/websharks/css-minifier/releases) 9 | [![](https://img.shields.io/packagist/v/websharks/css-minifier.svg?label=packagist)](https://packagist.org/packages/websharks/css-minifier) 10 | [![](https://img.shields.io/github/issues/websharks/css-minifier.svg?label=issues)](https://github.com/websharks/css-minifier/issues) 11 | [![](https://img.shields.io/github/forks/websharks/css-minifier.svg?label=forks)](https://github.com/websharks/css-minifier/network) 12 | [![](https://img.shields.io/github/stars/websharks/css-minifier.svg?label=stars)](https://github.com/websharks/css-minifier/stargazers) 13 | [![](https://img.shields.io/github/downloads/websharks/css-minifier/latest/total.svg?label=downloads)](https://github.com/websharks/css-minifier/releases) 14 | [![](https://img.shields.io/packagist/dt/websharks/css-minifier.svg?label=packagist)](https://packagist.org/packages/websharks/css-minifier) 15 | 16 | --- 17 | 18 | ## Installation Instructions (Two Options) 19 | 20 | 1. As a [Composer](https://packagist.org/packages/websharks/css-minifier) Dependency 21 | 22 | ```json 23 | { 24 | "require": { 25 | "websharks/css-minifier": "dev-master" 26 | } 27 | } 28 | ``` 29 | 30 | 2. Or, Download the PHAR Binary 31 | See: https://github.com/websharks/css-minifier/releases 32 | 33 | --- 34 | 35 | ## Usage Example 36 | 37 | ```php 38 | $css = '.hello { font-family: World; }'; 39 | $compressed_css = WebSharks\CssMinifier\Core::compress($css); 40 | ``` 41 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/src/Frameworks/SculpinListener.php: -------------------------------------------------------------------------------- 1 | compress($parser, $event); 31 | } 32 | 33 | /** 34 | * @param SourceSetEvent $event 35 | */ 36 | public function onAfterFormat(SourceSetEvent $event) 37 | { 38 | $parser = Factory::construct(); 39 | $this->compress($parser, $event); 40 | } 41 | 42 | /** 43 | * @param SourceSetEvent $event 44 | */ 45 | public function onAfterFormatSmallest(SourceSetEvent $event) 46 | { 47 | $parser = Factory::constructSmallest(); 48 | $this->compress($parser, $event); 49 | } 50 | 51 | /** 52 | * @param Parser $parser 53 | * @param SourceSetEvent $event 54 | */ 55 | protected function compress(Parser $parser, SourceSetEvent $event) 56 | { 57 | foreach ($event->allSources() as $source) { 58 | $ext = explode('.', $source->filename()); 59 | $ext = $ext[(count($ext) - 1)]; 60 | if (in_array( 61 | $ext, 62 | [ 63 | 'html', 64 | 'md', 65 | 'markdown', 66 | ] 67 | )) { 68 | $source->setFormattedContent($parser->compress($source->formattedContent())); 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/src/Parser.php: -------------------------------------------------------------------------------- 1 | options = $options; 40 | 41 | if ($defaultCompressor === null) { 42 | $defaultCompressor = new HtmlCompressor(); 43 | } 44 | $this->defaultCompressor = $defaultCompressor; 45 | } 46 | 47 | /** 48 | * @param string $html 49 | * @return string 50 | */ 51 | public function compress($html) 52 | { 53 | $tokens = $this->tokenize($html); 54 | 55 | $compressedHtml = ''; 56 | do { 57 | $token = array_shift($tokens); 58 | $compressedHtml .= $token->getCompressor()->compress($token->getCombinedHtml()); 59 | } while (count($tokens) > 0); 60 | 61 | return $compressedHtml; 62 | } 63 | 64 | /** 65 | * @param string $html 66 | * @return array 67 | */ 68 | public function tokenize($html) 69 | { 70 | return Tokenizer::tokenize($html, $this->getCompressors(), $this->getDefaultCompressor()); 71 | } 72 | 73 | /** 74 | * @return CompressorInterface|HtmlCompressor 75 | */ 76 | public function getDefaultCompressor() 77 | { 78 | return $this->defaultCompressor; 79 | } 80 | 81 | /** 82 | * @return mixed 83 | */ 84 | public function getCompressors() 85 | { 86 | return $this->options['compressors']; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /vendor/composer/autoload_real.php: -------------------------------------------------------------------------------- 1 | = 50600 && !defined('HHVM_VERSION'); 27 | if ($useStaticLoader) { 28 | require_once __DIR__ . '/autoload_static.php'; 29 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInitb4dd446a199521a3fffcdb919199a6ad::getInitializer($loader)); 31 | } else { 32 | $map = require __DIR__ . '/autoload_namespaces.php'; 33 | foreach ($map as $namespace => $path) { 34 | $loader->set($namespace, $path); 35 | } 36 | 37 | $map = require __DIR__ . '/autoload_psr4.php'; 38 | foreach ($map as $namespace => $path) { 39 | $loader->setPsr4($namespace, $path); 40 | } 41 | 42 | $classMap = require __DIR__ . '/autoload_classmap.php'; 43 | if ($classMap) { 44 | $loader->addClassMap($classMap); 45 | } 46 | } 47 | 48 | $loader->register(true); 49 | 50 | if ($useStaticLoader) { 51 | $includeFiles = Composer\Autoload\ComposerStaticInitb4dd446a199521a3fffcdb919199a6ad::$files; 52 | } else { 53 | $includeFiles = require __DIR__ . '/autoload_files.php'; 54 | } 55 | foreach ($includeFiles as $fileIdentifier => $file) { 56 | composerRequireb4dd446a199521a3fffcdb919199a6ad($fileIdentifier, $file); 57 | } 58 | 59 | return $loader; 60 | } 61 | } 62 | 63 | function composerRequireb4dd446a199521a3fffcdb919199a6ad($fileIdentifier, $file) 64 | { 65 | if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { 66 | require $file; 67 | 68 | $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/README.md: -------------------------------------------------------------------------------- 1 | HtmlCompress 2 | ============ 3 | 4 | [![Build Status](https://travis-ci.org/WyriHaximus/HtmlCompress.png)](https://travis-ci.org/WyriHaximus/HtmlCompress) 5 | [![Latest Stable Version](https://poser.pugx.org/WyriHaximus/html-compress/v/stable.png)](https://packagist.org/packages/WyriHaximus/html-compress) 6 | [![Total Downloads](https://poser.pugx.org/WyriHaximus/html-compress/downloads.png)](https://packagist.org/packages/WyriHaximus/html-compress) 7 | [![Coverage Status](https://coveralls.io/repos/WyriHaximus/HtmlCompress/badge.png)](https://coveralls.io/r/WyriHaximus/HtmlCompress) 8 | [![License](https://poser.pugx.org/wyrihaximus/html-compress/license.png)](https://packagist.org/packages/wyrihaximus/html-compress) 9 | 10 | ## Installation ## 11 | 12 | To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `~`. 13 | 14 | ``` 15 | composer require wyrihaximus/html-compress 16 | ``` 17 | 18 | ## Basic Usage ## 19 | 20 | ```php 21 | compress($sourceHtml); 27 | ``` 28 | 29 | ## Integration ## 30 | 31 | * [CakePHP](https://github.com/WyriHaximus/MinifyHtml) 32 | * [Neos CMS](https://github.com/Flownative/neos-compressor) 33 | * [Sculpin](https://github.com/WyriHaximus/html-compress-sculpin) 34 | * [Twig](https://github.com/nochso/html-compress-twig) 35 | 36 | ## License ## 37 | 38 | Copyright 2016 [Cees-Jan Kiewiet](http://wyrihaximus.net/) 39 | 40 | Permission is hereby granted, free of charge, to any person 41 | obtaining a copy of this software and associated documentation 42 | files (the "Software"), to deal in the Software without 43 | restriction, including without limitation the rights to use, 44 | copy, modify, merge, publish, distribute, sublicense, and/or sell 45 | copies of the Software, and to permit persons to whom the 46 | Software is furnished to do so, subject to the following 47 | conditions: 48 | 49 | The above copyright notice and this permission notice shall be 50 | included in all copies or substantial portions of the Software. 51 | 52 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 53 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 54 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 55 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 56 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 57 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 58 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 59 | OTHER DEALINGS IN THE SOFTWARE. 60 | -------------------------------------------------------------------------------- /vendor/patchwork/jsqueeze/README.md: -------------------------------------------------------------------------------- 1 | JSqueeze: Efficient JavaScript minification in PHP 2 | ================================================== 3 | 4 | [![Latest Stable Version](https://poser.pugx.org/patchwork/jsqueeze/v/stable.png)](https://packagist.org/packages/patchwork/jsqueeze) 5 | [![Total Downloads](https://poser.pugx.org/patchwork/jsqueeze/downloads.png)](https://packagist.org/packages/patchwork/jsqueeze) 6 | [![Build Status](https://secure.travis-ci.org/tchwork/jsqueeze.png?branch=master)](http://travis-ci.org/tchwork/jsqueeze) 7 | 8 | JSqueeze shrinks / compresses / minifies / mangles Javascript code. 9 | 10 | It's a single PHP class that has been developed, maintained and thoroughly 11 | tested since 2003 on major JavaScript frameworks (e.g. jQuery). 12 | 13 | JSqueeze operates on any parse error free JavaScript code, even when semi-colons 14 | are missing. 15 | 16 | In term of compression ratio, it compares to YUI Compressor and UglifyJS. 17 | 18 | Installation 19 | ------------ 20 | 21 | Through [composer](https://getcomposer.org/): 22 | 23 | ```javascript 24 | { 25 | "require": { 26 | "patchwork/jsqueeze": "~2.0" 27 | } 28 | } 29 | ``` 30 | 31 | Usage 32 | ----- 33 | 34 | ```php 35 | 36 | use Patchwork\JSqueeze; 37 | 38 | $jz = new JSqueeze(); 39 | 40 | $minifiedJs = $jz->squeeze( 41 | $fatJs, 42 | true, // $singleLine 43 | true, // $keepImportantComments 44 | false // $specialVarRx 45 | ); 46 | ``` 47 | 48 | Features 49 | -------- 50 | 51 | * Removes comments and white spaces. 52 | * Renames every local vars, typically to a single character. 53 | * Keep Microsoft's conditional comments. 54 | * In order to maximise later HTTP compression (deflate, gzip), new variables 55 | names are choosen by considering closures, variables' frequency and 56 | characters' frequency. 57 | * Can rename also global vars, methods and properties, but only if they are marked 58 | special by some naming convention. Use JSqueeze::SPECIAL_VAR_PACKER to rename vars 59 | whose name begins with one or more `$` or with a single `_`. 60 | * Renames also local/global vars found in strings, but only if they are marked 61 | special. 62 | * If you use `with/eval` then be careful. 63 | 64 | Bonus 65 | ----- 66 | 67 | * Replaces `false/true` by `!1/!0` 68 | * Replaces `new Array/Object` by `[]/{}` 69 | * Merges consecutive `var` declarations with commas 70 | * Merges consecutive concatened strings 71 | * Can replace optional semi-colons by line feeds, thus facilitating output 72 | debugging. 73 | * Keep important comments marked with `/*!...` 74 | * Treats three semi-colons `;;;` [like single-line comments](http://dean.edwards.name/packer/2/usage/#triple-semi-colon). 75 | * Fix special catch scope across browsers 76 | * Work around buggy-handling of named function expressions in IE<=8 77 | 78 | To do? 79 | ------ 80 | 81 | * foo['bar'] => foo.bar 82 | * {'foo':'bar'} => {foo:'bar'} 83 | * Dead code removal (never used function) 84 | * Munge primitives: var WINDOW=window, etc. 85 | 86 | License 87 | ------- 88 | 89 | This library is free software; you can redistribute it and/or modify it 90 | under the terms of the (at your option): 91 | Apache License v2.0 (see provided LICENCE.ASL20 file), or 92 | GNU General Public License v2.0 (see provided LICENCE.GPLv2 file). 93 | -------------------------------------------------------------------------------- /vendor/meenie/javascript-packer/example-inline.php: -------------------------------------------------------------------------------- 1 | pack(); 16 | $t2 = microtime(true); 17 | 18 | $originalLength = strlen($script); 19 | $packedLength = strlen($packed); 20 | $ratio = number_format($packedLength / $originalLength, 3); 21 | $time = sprintf('%.4f', ($t2 - $t1) ); 22 | 23 | $treat = true; 24 | } 25 | ?> 26 | 28 | 29 | 30 | JavaScript Packer in PHP 31 | 32 | 40 | 46 | 47 | 48 |
49 |
50 |

script to pack:

51 | 52 |
53 | 54 |
55 | 56 | 62 | 66 | 70 | 71 |
72 | 73 |
74 | 75 | 76 |
77 |

packed result:

78 | 79 |

80 | compression ratio: 81 | 82 |
performed in s. 83 |

84 |

85 |
86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /vendor/websharks/css-minifier/src/includes/classes/Core.php: -------------------------------------------------------------------------------- 1 | css = (string) $css; 37 | } 38 | 39 | /** 40 | * Compressor. 41 | * 42 | * @since 150510 Initial release. 43 | * 44 | * @param string $css Input CSS. 45 | */ 46 | public static function compress($css) 47 | { 48 | $css = (string) $css; 49 | try { 50 | $css_minifier = new static($css); 51 | $minified_css = $css_minifier->min(); 52 | return $minified_css; 53 | } catch (\Exception $exception) { 54 | return $css; 55 | } 56 | } 57 | 58 | /** 59 | * Minifier. 60 | * 61 | * @since 150510 Initial release. 62 | * 63 | * @return string Output (minified) CSS. 64 | */ 65 | public function min() 66 | { 67 | return $this->selfMin(); 68 | } 69 | 70 | /** 71 | * Self minifier. 72 | * 73 | * @since 15xxxx Adding SCSS compiler. 74 | * 75 | * @return string Output (minified) CSS. 76 | */ 77 | protected function selfMin() 78 | { 79 | if (!$this->css) { 80 | return $this->css; 81 | } 82 | $static = &static::$static[__FUNCTION__.'_map']; 83 | 84 | if (!isset($static['replace'], $static['with'], $static['colors'])) { 85 | $de_spacifiables = array( 86 | '{', 87 | '}', 88 | '!=', 89 | '|=', 90 | '^=', 91 | '$=', 92 | '*=', 93 | '~=', 94 | '=', 95 | '~', 96 | ';', 97 | ',', 98 | '>', 99 | ); 100 | $de_spacifiables = array_map( 101 | function ($string) { 102 | return preg_quote($string, '/'); 103 | }, 104 | $de_spacifiables 105 | ); 106 | $de_spacifiables = implode('|', $de_spacifiables); 107 | 108 | $static['replace'] = array( 109 | 'comments' => '/\/\*.*?\*\//s', 110 | 'line_breaks' => '/['."\r\n".']+/', 111 | 'extra_spaces' => '/\s{2,}/', 112 | 'de_spacifiables' => '/ *('.$de_spacifiables.') */', 113 | 'unnecessary_;s' => '/;\}/', 114 | ); 115 | $static['with'] = array('', ' ', ' ', '${1}', '}'); 116 | $static['colors'] = '/(?P[:,\h]+#)(?P[a-z0-9]{6})/i'; 117 | } 118 | $this->css = preg_replace($static['replace'], $static['with'], $this->css); 119 | $this->css = preg_replace_callback($static['colors'], array($this, 'selfMaybeCompressCssColorCb'), $this->css); 120 | $this->css = trim($this->css); 121 | 122 | return $this->css; 123 | } 124 | 125 | /** 126 | * Compresses HEX color codes. 127 | * 128 | * @since 140417 Initial release. 129 | * 130 | * @param array $m Regular expression matches. 131 | * 132 | * @return string Full match with compressed HEX color code. 133 | */ 134 | protected function selfMaybeCompressCssColorCb(array $m) 135 | { 136 | $m['hex'] = strtoupper($m['hex']); // Convert to uppercase for easy comparison. 137 | 138 | if ($m['hex'][0] === $m['hex'][1] && $m['hex'][2] === $m['hex'][3] && $m['hex'][4] === $m['hex'][5]) { 139 | return $m['context'].$m['hex'][0].$m['hex'][2].$m['hex'][4]; 140 | } 141 | return $m[0]; 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/src/Tokenizer.php: -------------------------------------------------------------------------------- 1 | parse($html)->getTokens(); 42 | } 43 | 44 | /** 45 | * @param array $compressors 46 | * @param CompressorInterface $defaultCompressor 47 | */ 48 | public function __construct(array $compressors, CompressorInterface $defaultCompressor = null) 49 | { 50 | $this->compressors = $compressors; 51 | $this->defaultCompressor = $defaultCompressor; 52 | } 53 | 54 | /** 55 | * @param string $html 56 | * @return Tokens 57 | */ 58 | public function parse($html) 59 | { 60 | $tokens = new Tokens( 61 | [ 62 | new Token('', $html, '', $this->defaultCompressor), 63 | ] 64 | ); 65 | 66 | do { 67 | $compressor = array_shift($this->compressors); 68 | $tokens = $this->split($tokens, $compressor); 69 | } while (count($this->compressors) > 0); 70 | 71 | return $tokens; 72 | } 73 | 74 | /** 75 | * @param Tokens $tokens 76 | * @param array $compressor 77 | * @return Tokens 78 | */ 79 | protected function split(Tokens $tokens, array $compressor) 80 | { 81 | foreach ($compressor['patterns'] as $pattern) { 82 | $tokens = $this->walkTokens($tokens, $pattern, $compressor['compressor']); 83 | } 84 | 85 | return $tokens; 86 | } 87 | 88 | /** 89 | * @param Tokens $tokens 90 | * @param string $pattern 91 | * @param CompressorInterface $compressor 92 | * @return Tokens 93 | */ 94 | protected function walkTokens(Tokens $tokens, $pattern, CompressorInterface $compressor) 95 | { 96 | foreach ($tokens->getTokens() as $index => $token) { 97 | if ($token->getCompressor() === $this->defaultCompressor) { 98 | $html = preg_split($pattern, $token->getCombinedHtml()); 99 | preg_match_all($pattern, $token->getCombinedHtml(), $bits); 100 | 101 | if (count($bits[0]) > 0) { 102 | $newTokens = $this->walkBits($bits, $html, $compressor); 103 | if ($newTokens->count() > 0) { 104 | $tokens->replace($index, $newTokens); 105 | return $this->walkTokens($tokens, $pattern, $compressor); 106 | } 107 | } 108 | } 109 | } 110 | 111 | return $tokens; 112 | } 113 | 114 | /** 115 | * @param array $bits 116 | * @param array $html 117 | * @param CompressorInterface $compressor 118 | * @return Tokens 119 | */ 120 | protected function walkBits($bits, $html, $compressor) 121 | { 122 | $newTokens = []; 123 | $prepend = ''; 124 | for ($i = 0; $i < count($bits[0]); $i++) { 125 | if ($bits[1][$i] === '' && $bits[2][$i] === '' && $bits[3][$i] === '') { 126 | continue; 127 | } 128 | $newTokens[] = new Token($prepend, $html[$i], $bits[1][$i], $this->defaultCompressor); 129 | $newTokens[] = new Token('', $bits[2][$i], '', $compressor); 130 | $prepend = $bits[3][$i]; 131 | } 132 | 133 | if ($prepend !== '' || $html[$i] !== '') { 134 | $newTokens[] = new Token($prepend, $html[$i], '', $this->defaultCompressor); 135 | } 136 | 137 | return new Tokens($newTokens); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /vendor/wyrihaximus/html-compress/src/Factory.php: -------------------------------------------------------------------------------- 1 | [ 36 | [ 37 | 'patterns' => [ 38 | Patterns::MATCH_NOCOMPRESS, 39 | Patterns::MATCH_STYLE, 40 | Patterns::MATCH_JSCRIPT, 41 | Patterns::MATCH_SCRIPT, 42 | Patterns::MATCH_PRE, 43 | Patterns::MATCH_TEXTAREA, 44 | ], 45 | 'compressor' => new ReturnCompressor(), 46 | ], 47 | ], 48 | ] 49 | ); 50 | } 51 | 52 | /** 53 | * @return Parser 54 | */ 55 | public static function construct() 56 | { 57 | return new Parser( 58 | [ 59 | 'compressors' => [ 60 | [ 61 | 'patterns' => [ 62 | Patterns::MATCH_NOCOMPRESS, 63 | ], 64 | 'compressor' => new ReturnCompressor(), 65 | ], 66 | [ 67 | 'patterns' => [ 68 | Patterns::MATCH_JSCRIPT, 69 | ], 70 | 'compressor' => new JSqueezeCompressor(), 71 | ], 72 | [ 73 | 'patterns' => [ 74 | Patterns::MATCH_SCRIPT, 75 | Patterns::MATCH_PRE, 76 | Patterns::MATCH_TEXTAREA, 77 | ], 78 | 'compressor' => new ReturnCompressor(), 79 | ], 80 | [ 81 | 'patterns' => [ 82 | Patterns::MATCH_STYLE, 83 | Patterns::MATCH_STYLE_INLINE, 84 | ], 85 | 'compressor' => new CssMinCompressor(), 86 | ], 87 | ], 88 | ] 89 | ); 90 | } 91 | 92 | /** 93 | * @return Parser 94 | */ 95 | public static function constructSmallest() 96 | { 97 | return new Parser( 98 | [ 99 | 'compressors' => [ 100 | [ 101 | 'patterns' => [ 102 | Patterns::MATCH_NOCOMPRESS, 103 | ], 104 | 'compressor' => new ReturnCompressor(), 105 | ], 106 | [ 107 | 'patterns' => [ 108 | Patterns::MATCH_JSCRIPT, 109 | ], 110 | 'compressor' => new BestResultCompressor( 111 | [ 112 | new JSqueezeCompressor(), 113 | new JSMinCompressor(), 114 | new JavaScriptPackerCompressor(), 115 | new ReturnCompressor(), // Sometimes no compression can already be the smallest 116 | ] 117 | ), 118 | ], 119 | [ 120 | 'patterns' => [ 121 | Patterns::MATCH_SCRIPT, 122 | Patterns::MATCH_PRE, 123 | Patterns::MATCH_TEXTAREA, 124 | ], 125 | 'compressor' => new ReturnCompressor(), 126 | ], 127 | [ 128 | 'patterns' => [ 129 | Patterns::MATCH_STYLE, 130 | Patterns::MATCH_STYLE_INLINE, 131 | ], 132 | 'compressor' => new BestResultCompressor( 133 | [ 134 | new CssMinCompressor(), 135 | new CssMinifierCompressor(), 136 | new ReturnCompressor(), 137 | ] 138 | ), 139 | ], 140 | ], 141 | ] 142 | ); 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /vendor/composer/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/natxet/CssMin/src/CssMin.php', 10 | 'CssAtCharsetToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 11 | 'CssAtFontFaceDeclarationToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 12 | 'CssAtFontFaceEndToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 13 | 'CssAtFontFaceParserPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 14 | 'CssAtFontFaceStartToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 15 | 'CssAtImportParserPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 16 | 'CssAtImportToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 17 | 'CssAtKeyframesEndToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 18 | 'CssAtKeyframesParserPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 19 | 'CssAtKeyframesRulesetDeclarationToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 20 | 'CssAtKeyframesRulesetEndToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 21 | 'CssAtKeyframesRulesetStartToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 22 | 'CssAtKeyframesStartToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 23 | 'CssAtMediaEndToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 24 | 'CssAtMediaParserPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 25 | 'CssAtMediaStartToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 26 | 'CssAtPageDeclarationToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 27 | 'CssAtPageEndToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 28 | 'CssAtPageParserPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 29 | 'CssAtPageStartToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 30 | 'CssAtVariablesDeclarationToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 31 | 'CssAtVariablesEndToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 32 | 'CssAtVariablesParserPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 33 | 'CssAtVariablesStartToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 34 | 'CssCommentParserPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 35 | 'CssCommentToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 36 | 'CssCompressColorValuesMinifierPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 37 | 'CssCompressExpressionValuesMinifierPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 38 | 'CssCompressUnitValuesMinifierPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 39 | 'CssConvertFontWeightMinifierPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 40 | 'CssConvertHslColorsMinifierPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 41 | 'CssConvertLevel3AtKeyframesMinifierFilter' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 42 | 'CssConvertLevel3PropertiesMinifierFilter' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 43 | 'CssConvertNamedColorsMinifierPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 44 | 'CssConvertRgbColorsMinifierPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 45 | 'CssError' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 46 | 'CssExpressionParserPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 47 | 'CssImportImportsMinifierFilter' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 48 | 'CssMin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 49 | 'CssMinifier' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 50 | 'CssNullToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 51 | 'CssOtbsFormatter' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 52 | 'CssParser' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 53 | 'CssRemoveCommentsMinifierFilter' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 54 | 'CssRemoveEmptyAtBlocksMinifierFilter' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 55 | 'CssRemoveEmptyRulesetsMinifierFilter' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 56 | 'CssRemoveLastDelarationSemiColonMinifierFilter' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 57 | 'CssRulesetDeclarationToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 58 | 'CssRulesetEndToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 59 | 'CssRulesetParserPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 60 | 'CssRulesetStartToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 61 | 'CssSortRulesetPropertiesMinifierFilter' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 62 | 'CssStringParserPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 63 | 'CssUrlParserPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 64 | 'CssVariablesMinifierFilter' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 65 | 'CssVariablesMinifierPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 66 | 'CssWhitesmithsFormatter' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 67 | 'JSMin' => $vendorDir . '/linkorb/jsmin-php/src/jsmin-1.1.1.php', 68 | 'JSMinException' => $vendorDir . '/linkorb/jsmin-php/src/jsmin-1.1.1.php', 69 | 'aCssAtBlockEndToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 70 | 'aCssAtBlockStartToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 71 | 'aCssDeclarationToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 72 | 'aCssFormatter' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 73 | 'aCssMinifierFilter' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 74 | 'aCssMinifierPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 75 | 'aCssParserPlugin' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 76 | 'aCssRulesetEndToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 77 | 'aCssRulesetStartToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 78 | 'aCssToken' => $vendorDir . '/natxet/CssMin/src/CssMin.php', 79 | ); 80 | -------------------------------------------------------------------------------- /vendor/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | __DIR__ . '/..' . '/meenie/javascript-packer/class.JavaScriptPacker.php', 11 | ); 12 | 13 | public static $prefixLengthsPsr4 = array ( 14 | 'W' => 15 | array ( 16 | 'WyriHaximus\\HtmlCompress\\' => 25, 17 | 'WebSharks\\CssMinifier\\' => 22, 18 | ), 19 | 'P' => 20 | array ( 21 | 'Patchwork\\' => 10, 22 | ), 23 | ); 24 | 25 | public static $prefixDirsPsr4 = array ( 26 | 'WyriHaximus\\HtmlCompress\\' => 27 | array ( 28 | 0 => __DIR__ . '/..' . '/wyrihaximus/html-compress/src', 29 | ), 30 | 'WebSharks\\CssMinifier\\' => 31 | array ( 32 | 0 => __DIR__ . '/..' . '/websharks/css-minifier/src/includes/classes', 33 | ), 34 | 'Patchwork\\' => 35 | array ( 36 | 0 => __DIR__ . '/..' . '/patchwork/jsqueeze/src', 37 | ), 38 | ); 39 | 40 | public static $classMap = array ( 41 | 'CssAtCharsetParserPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 42 | 'CssAtCharsetToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 43 | 'CssAtFontFaceDeclarationToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 44 | 'CssAtFontFaceEndToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 45 | 'CssAtFontFaceParserPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 46 | 'CssAtFontFaceStartToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 47 | 'CssAtImportParserPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 48 | 'CssAtImportToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 49 | 'CssAtKeyframesEndToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 50 | 'CssAtKeyframesParserPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 51 | 'CssAtKeyframesRulesetDeclarationToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 52 | 'CssAtKeyframesRulesetEndToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 53 | 'CssAtKeyframesRulesetStartToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 54 | 'CssAtKeyframesStartToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 55 | 'CssAtMediaEndToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 56 | 'CssAtMediaParserPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 57 | 'CssAtMediaStartToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 58 | 'CssAtPageDeclarationToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 59 | 'CssAtPageEndToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 60 | 'CssAtPageParserPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 61 | 'CssAtPageStartToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 62 | 'CssAtVariablesDeclarationToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 63 | 'CssAtVariablesEndToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 64 | 'CssAtVariablesParserPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 65 | 'CssAtVariablesStartToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 66 | 'CssCommentParserPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 67 | 'CssCommentToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 68 | 'CssCompressColorValuesMinifierPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 69 | 'CssCompressExpressionValuesMinifierPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 70 | 'CssCompressUnitValuesMinifierPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 71 | 'CssConvertFontWeightMinifierPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 72 | 'CssConvertHslColorsMinifierPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 73 | 'CssConvertLevel3AtKeyframesMinifierFilter' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 74 | 'CssConvertLevel3PropertiesMinifierFilter' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 75 | 'CssConvertNamedColorsMinifierPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 76 | 'CssConvertRgbColorsMinifierPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 77 | 'CssError' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 78 | 'CssExpressionParserPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 79 | 'CssImportImportsMinifierFilter' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 80 | 'CssMin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 81 | 'CssMinifier' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 82 | 'CssNullToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 83 | 'CssOtbsFormatter' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 84 | 'CssParser' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 85 | 'CssRemoveCommentsMinifierFilter' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 86 | 'CssRemoveEmptyAtBlocksMinifierFilter' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 87 | 'CssRemoveEmptyRulesetsMinifierFilter' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 88 | 'CssRemoveLastDelarationSemiColonMinifierFilter' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 89 | 'CssRulesetDeclarationToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 90 | 'CssRulesetEndToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 91 | 'CssRulesetParserPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 92 | 'CssRulesetStartToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 93 | 'CssSortRulesetPropertiesMinifierFilter' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 94 | 'CssStringParserPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 95 | 'CssUrlParserPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 96 | 'CssVariablesMinifierFilter' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 97 | 'CssVariablesMinifierPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 98 | 'CssWhitesmithsFormatter' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 99 | 'JSMin' => __DIR__ . '/..' . '/linkorb/jsmin-php/src/jsmin-1.1.1.php', 100 | 'JSMinException' => __DIR__ . '/..' . '/linkorb/jsmin-php/src/jsmin-1.1.1.php', 101 | 'aCssAtBlockEndToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 102 | 'aCssAtBlockStartToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 103 | 'aCssDeclarationToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 104 | 'aCssFormatter' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 105 | 'aCssMinifierFilter' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 106 | 'aCssMinifierPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 107 | 'aCssParserPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 108 | 'aCssRulesetEndToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 109 | 'aCssRulesetStartToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 110 | 'aCssToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php', 111 | ); 112 | 113 | public static function getInitializer(ClassLoader $loader) 114 | { 115 | return \Closure::bind(function () use ($loader) { 116 | $loader->prefixLengthsPsr4 = ComposerStaticInitb4dd446a199521a3fffcdb919199a6ad::$prefixLengthsPsr4; 117 | $loader->prefixDirsPsr4 = ComposerStaticInitb4dd446a199521a3fffcdb919199a6ad::$prefixDirsPsr4; 118 | $loader->classMap = ComposerStaticInitb4dd446a199521a3fffcdb919199a6ad::$classMap; 119 | 120 | }, null, ClassLoader::class); 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /vendor/linkorb/jsmin-php/src/jsmin-1.1.1.php: -------------------------------------------------------------------------------- 1 | 41 | * @copyright 2002 Douglas Crockford (jsmin.c) 42 | * @copyright 2008 Ryan Grove (PHP port) 43 | * @license http://opensource.org/licenses/mit-license.php MIT License 44 | * @version 1.1.1 (2008-03-02) 45 | * @link http://code.google.com/p/jsmin-php/ 46 | */ 47 | 48 | class JSMin { 49 | const ORD_LF = 10; 50 | const ORD_SPACE = 32; 51 | 52 | protected $a = ''; 53 | protected $b = ''; 54 | protected $input = ''; 55 | protected $inputIndex = 0; 56 | protected $inputLength = 0; 57 | protected $lookAhead = null; 58 | protected $output = ''; 59 | 60 | // -- Public Static Methods -------------------------------------------------- 61 | 62 | public static function minify($js) { 63 | $jsmin = new JSMin($js); 64 | return $jsmin->min(); 65 | } 66 | 67 | // -- Public Instance Methods ------------------------------------------------ 68 | 69 | public function __construct($input) { 70 | $this->input = str_replace("\r\n", "\n", $input); 71 | $this->inputLength = strlen($this->input); 72 | } 73 | 74 | // -- Protected Instance Methods --------------------------------------------- 75 | 76 | protected function action($d) { 77 | switch($d) { 78 | case 1: 79 | $this->output .= $this->a; 80 | 81 | case 2: 82 | $this->a = $this->b; 83 | 84 | if ($this->a === "'" || $this->a === '"') { 85 | for (;;) { 86 | $this->output .= $this->a; 87 | $this->a = $this->get(); 88 | 89 | if ($this->a === $this->b) { 90 | break; 91 | } 92 | 93 | if (ord($this->a) <= self::ORD_LF) { 94 | throw new JSMinException('Unterminated string literal.'); 95 | } 96 | 97 | if ($this->a === '\\') { 98 | $this->output .= $this->a; 99 | $this->a = $this->get(); 100 | } 101 | } 102 | } 103 | 104 | case 3: 105 | $this->b = $this->next(); 106 | 107 | if ($this->b === '/' && ( 108 | $this->a === '(' || $this->a === ',' || $this->a === '=' || 109 | $this->a === ':' || $this->a === '[' || $this->a === '!' || 110 | $this->a === '&' || $this->a === '|' || $this->a === '?')) { 111 | 112 | $this->output .= $this->a . $this->b; 113 | 114 | for (;;) { 115 | $this->a = $this->get(); 116 | 117 | if ($this->a === '/') { 118 | break; 119 | } elseif ($this->a === '\\') { 120 | $this->output .= $this->a; 121 | $this->a = $this->get(); 122 | } elseif (ord($this->a) <= self::ORD_LF) { 123 | throw new JSMinException('Unterminated regular expression '. 124 | 'literal.'); 125 | } 126 | 127 | $this->output .= $this->a; 128 | } 129 | 130 | $this->b = $this->next(); 131 | } 132 | } 133 | } 134 | 135 | protected function get() { 136 | $c = $this->lookAhead; 137 | $this->lookAhead = null; 138 | 139 | if ($c === null) { 140 | if ($this->inputIndex < $this->inputLength) { 141 | $c = $this->input[$this->inputIndex]; 142 | $this->inputIndex += 1; 143 | } else { 144 | $c = null; 145 | } 146 | } 147 | 148 | if ($c === "\r") { 149 | return "\n"; 150 | } 151 | 152 | if ($c === null || $c === "\n" || ord($c) >= self::ORD_SPACE) { 153 | return $c; 154 | } 155 | 156 | return ' '; 157 | } 158 | 159 | protected function isAlphaNum($c) { 160 | return ord($c) > 126 || $c === '\\' || preg_match('/^[\w\$]$/', $c) === 1; 161 | } 162 | 163 | protected function min() { 164 | $this->a = "\n"; 165 | $this->action(3); 166 | 167 | while ($this->a !== null) { 168 | switch ($this->a) { 169 | case ' ': 170 | if ($this->isAlphaNum($this->b)) { 171 | $this->action(1); 172 | } else { 173 | $this->action(2); 174 | } 175 | break; 176 | 177 | case "\n": 178 | switch ($this->b) { 179 | case '{': 180 | case '[': 181 | case '(': 182 | case '+': 183 | case '-': 184 | $this->action(1); 185 | break; 186 | 187 | case ' ': 188 | $this->action(3); 189 | break; 190 | 191 | default: 192 | if ($this->isAlphaNum($this->b)) { 193 | $this->action(1); 194 | } 195 | else { 196 | $this->action(2); 197 | } 198 | } 199 | break; 200 | 201 | default: 202 | switch ($this->b) { 203 | case ' ': 204 | if ($this->isAlphaNum($this->a)) { 205 | $this->action(1); 206 | break; 207 | } 208 | 209 | $this->action(3); 210 | break; 211 | 212 | case "\n": 213 | switch ($this->a) { 214 | case '}': 215 | case ']': 216 | case ')': 217 | case '+': 218 | case '-': 219 | case '"': 220 | case "'": 221 | $this->action(1); 222 | break; 223 | 224 | default: 225 | if ($this->isAlphaNum($this->a)) { 226 | $this->action(1); 227 | } 228 | else { 229 | $this->action(3); 230 | } 231 | } 232 | break; 233 | 234 | default: 235 | $this->action(1); 236 | break; 237 | } 238 | } 239 | } 240 | 241 | return $this->output; 242 | } 243 | 244 | protected function next() { 245 | $c = $this->get(); 246 | 247 | if ($c === '/') { 248 | switch($this->peek()) { 249 | case '/': 250 | for (;;) { 251 | $c = $this->get(); 252 | 253 | if (ord($c) <= self::ORD_LF) { 254 | return $c; 255 | } 256 | } 257 | 258 | case '*': 259 | $this->get(); 260 | 261 | for (;;) { 262 | switch($this->get()) { 263 | case '*': 264 | if ($this->peek() === '/') { 265 | $this->get(); 266 | return ' '; 267 | } 268 | break; 269 | 270 | case null: 271 | throw new JSMinException('Unterminated comment.'); 272 | } 273 | } 274 | 275 | default: 276 | return $c; 277 | } 278 | } 279 | 280 | return $c; 281 | } 282 | 283 | protected function peek() { 284 | $this->lookAhead = $this->get(); 285 | return $this->lookAhead; 286 | } 287 | } 288 | 289 | // -- Exceptions --------------------------------------------------------------- 290 | class JSMinException extends Exception {} 291 | ?> -------------------------------------------------------------------------------- /vendor/composer/installed.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "websharks/css-minifier", 4 | "version": "150820", 5 | "version_normalized": "150820", 6 | "source": { 7 | "type": "git", 8 | "url": "https://github.com/websharks/css-minifier.git", 9 | "reference": "da1d0254c41e1f59c7337aa444d743e6056046ff" 10 | }, 11 | "dist": { 12 | "type": "zip", 13 | "url": "https://packagist.phpcomposer.com/files/websharks/css-minifier/da1d0254c41e1f59c7337aa444d743e6056046ff.zip", 14 | "reference": "da1d0254c41e1f59c7337aa444d743e6056046ff", 15 | "shasum": "" 16 | }, 17 | "require": { 18 | "ext-mbstring": "*", 19 | "php": ">=5.3" 20 | }, 21 | "time": "2015-08-21 03:19:25", 22 | "type": "library", 23 | "installation-source": "dist", 24 | "autoload": { 25 | "psr-4": { 26 | "WebSharks\\CssMinifier\\": "src/includes/classes" 27 | } 28 | }, 29 | "notification-url": "https://packagist.org/downloads/", 30 | "license": [ 31 | "GPL-3.0+" 32 | ], 33 | "authors": [ 34 | { 35 | "name": "websharks", 36 | "homepage": "http://websharks-inc.com/", 37 | "role": "company" 38 | }, 39 | { 40 | "name": "jaswsinc", 41 | "homepage": "http://jaswsinc.com/", 42 | "role": "developer" 43 | }, 44 | { 45 | "name": "raamdev", 46 | "homepage": "http://raam.org/", 47 | "role": "developer" 48 | } 49 | ], 50 | "description": "Compresses CSS.", 51 | "homepage": "https://github.com/websharks/css-minifier", 52 | "keywords": [ 53 | "compressor", 54 | "css", 55 | "websharks" 56 | ] 57 | }, 58 | { 59 | "name": "natxet/CssMin", 60 | "version": "v3.0.4", 61 | "version_normalized": "3.0.4.0", 62 | "source": { 63 | "type": "git", 64 | "url": "https://github.com/natxet/CssMin.git", 65 | "reference": "92de3fe3ccb4f8298d31952490ef7d5395855c39" 66 | }, 67 | "dist": { 68 | "type": "zip", 69 | "url": "https://packagist.phpcomposer.com/files/natxet/CssMin/92de3fe3ccb4f8298d31952490ef7d5395855c39.zip", 70 | "reference": "92de3fe3ccb4f8298d31952490ef7d5395855c39", 71 | "shasum": "" 72 | }, 73 | "require": { 74 | "php": ">=5.0" 75 | }, 76 | "time": "2015-09-25 11:13:11", 77 | "type": "library", 78 | "extra": { 79 | "branch-alias": { 80 | "dev-master": "3.0-dev" 81 | } 82 | }, 83 | "installation-source": "dist", 84 | "autoload": { 85 | "classmap": [ 86 | "src/" 87 | ] 88 | }, 89 | "notification-url": "https://packagist.org/downloads/", 90 | "license": [ 91 | "MIT" 92 | ], 93 | "authors": [ 94 | { 95 | "name": "Joe Scylla", 96 | "email": "joe.scylla@gmail.com", 97 | "homepage": "https://profiles.google.com/joe.scylla" 98 | } 99 | ], 100 | "description": "Minifying CSS", 101 | "homepage": "http://code.google.com/p/cssmin/", 102 | "keywords": [ 103 | "css", 104 | "minify" 105 | ] 106 | }, 107 | { 108 | "name": "patchwork/jsqueeze", 109 | "version": "v2.0.5", 110 | "version_normalized": "2.0.5.0", 111 | "source": { 112 | "type": "git", 113 | "url": "https://github.com/tchwork/jsqueeze.git", 114 | "reference": "693d64850eab2ce6a7c8f7cf547e1ab46e69d542" 115 | }, 116 | "dist": { 117 | "type": "zip", 118 | "url": "https://packagist.phpcomposer.com/files/tchwork/jsqueeze/693d64850eab2ce6a7c8f7cf547e1ab46e69d542.zip", 119 | "reference": "693d64850eab2ce6a7c8f7cf547e1ab46e69d542", 120 | "shasum": "" 121 | }, 122 | "require": { 123 | "php": ">=5.3.0" 124 | }, 125 | "time": "2016-04-19 09:28:22", 126 | "type": "library", 127 | "extra": { 128 | "branch-alias": { 129 | "dev-master": "2.0-dev" 130 | } 131 | }, 132 | "installation-source": "dist", 133 | "autoload": { 134 | "psr-4": { 135 | "Patchwork\\": "src/" 136 | } 137 | }, 138 | "notification-url": "https://packagist.org/downloads/", 139 | "license": [ 140 | "(Apache-2.0 or GPL-2.0)" 141 | ], 142 | "authors": [ 143 | { 144 | "name": "Nicolas Grekas", 145 | "email": "p@tchwork.com" 146 | } 147 | ], 148 | "description": "Efficient JavaScript minification in PHP", 149 | "homepage": "https://github.com/tchwork/jsqueeze", 150 | "keywords": [ 151 | "compression", 152 | "javascript", 153 | "minification" 154 | ] 155 | }, 156 | { 157 | "name": "linkorb/jsmin-php", 158 | "version": "1.0.0", 159 | "version_normalized": "1.0.0.0", 160 | "source": { 161 | "type": "git", 162 | "url": "https://github.com/linkorb/jsmin-php.git", 163 | "reference": "be85d87fc9c27730e7e9ced742b13010dafc1026" 164 | }, 165 | "dist": { 166 | "type": "zip", 167 | "url": "https://packagist.phpcomposer.com/files/linkorb/jsmin-php/be85d87fc9c27730e7e9ced742b13010dafc1026.zip", 168 | "reference": "be85d87fc9c27730e7e9ced742b13010dafc1026", 169 | "shasum": "" 170 | }, 171 | "require": { 172 | "php": ">=5.0.0" 173 | }, 174 | "time": "2013-03-15 13:16:35", 175 | "type": "library", 176 | "installation-source": "dist", 177 | "autoload": { 178 | "classmap": [ 179 | "src/" 180 | ] 181 | }, 182 | "notification-url": "https://packagist.org/downloads/", 183 | "license": [ 184 | "MIT" 185 | ], 186 | "authors": [ 187 | { 188 | "name": "Joost Faassen", 189 | "email": "j.faassen@linkorb.com", 190 | "role": "Packaging for composer" 191 | }, 192 | { 193 | "name": "Ryan Grove", 194 | "email": "ryan@wonko.com", 195 | "role": "PHP port" 196 | }, 197 | { 198 | "name": "Adam Gofort", 199 | "email": "aag@adamgoforth.com", 200 | "role": "Updates to the PHP port" 201 | }, 202 | { 203 | "name": "Douglas Crockford", 204 | "email": "douglas@crockford.com" 205 | } 206 | ], 207 | "description": "Unofficial package of jsmin-php", 208 | "homepage": "http://www.github.com/linkorb/jsmin-php", 209 | "keywords": [ 210 | "javascript", 211 | "jsmin", 212 | "minify" 213 | ] 214 | }, 215 | { 216 | "name": "meenie/javascript-packer", 217 | "version": "1.1", 218 | "version_normalized": "1.1.0.0", 219 | "source": { 220 | "type": "git", 221 | "url": "https://github.com/meenie/javascript-packer.git", 222 | "reference": "dcab0159ae1ed9d7535c034fb8afe1e4c3495d22" 223 | }, 224 | "dist": { 225 | "type": "zip", 226 | "url": "https://packagist.phpcomposer.com/files/meenie/javascript-packer/dcab0159ae1ed9d7535c034fb8afe1e4c3495d22.zip", 227 | "reference": "dcab0159ae1ed9d7535c034fb8afe1e4c3495d22", 228 | "shasum": "" 229 | }, 230 | "time": "2013-03-25 21:54:33", 231 | "type": "library", 232 | "installation-source": "dist", 233 | "autoload": { 234 | "files": [ 235 | "class.JavaScriptPacker.php" 236 | ] 237 | }, 238 | "notification-url": "https://packagist.org/downloads/", 239 | "license": [ 240 | "LGPL 2.1" 241 | ], 242 | "authors": [ 243 | { 244 | "name": "Nicolas Martin", 245 | "role": "Developer" 246 | } 247 | ], 248 | "description": "Composer hosted mirror of the PHP Version of Dean Edwards' JavaScript Packer", 249 | "homepage": "http://joliclic.free.fr/php/javascript-packer/en/", 250 | "keywords": [ 251 | "javascript packer" 252 | ] 253 | }, 254 | { 255 | "name": "wyrihaximus/html-compress", 256 | "version": "1.2.1", 257 | "version_normalized": "1.2.1.0", 258 | "source": { 259 | "type": "git", 260 | "url": "https://github.com/WyriHaximus/HtmlCompress.git", 261 | "reference": "b51fb7593cde54f364782d13c731b711be7f77b9" 262 | }, 263 | "dist": { 264 | "type": "zip", 265 | "url": "https://packagist.phpcomposer.com/files/WyriHaximus/HtmlCompress/b51fb7593cde54f364782d13c731b711be7f77b9.zip", 266 | "reference": "b51fb7593cde54f364782d13c731b711be7f77b9", 267 | "shasum": "" 268 | }, 269 | "require": { 270 | "linkorb/jsmin-php": "1.0.0", 271 | "meenie/javascript-packer": "1.1", 272 | "natxet/cssmin": "^3.0", 273 | "patchwork/jsqueeze": "~1.0|~2.0", 274 | "php": ">=5.4.0", 275 | "websharks/css-minifier": "150820" 276 | }, 277 | "require-dev": { 278 | "phake/phake": "^1.0", 279 | "phpunit/phpunit": "^4.0", 280 | "squizlabs/php_codesniffer": "^1.0", 281 | "vectorface/dunit": "^2.0" 282 | }, 283 | "time": "2016-07-26 21:15:52", 284 | "type": "library", 285 | "installation-source": "dist", 286 | "autoload": { 287 | "psr-4": { 288 | "WyriHaximus\\HtmlCompress\\": "src/" 289 | } 290 | }, 291 | "notification-url": "https://packagist.org/downloads/", 292 | "license": [ 293 | "MIT" 294 | ], 295 | "authors": [ 296 | { 297 | "name": "Cees-Jan Kiewiet", 298 | "email": "ceesjank@gmail.com", 299 | "homepage": "http://wyrihaximus.net/" 300 | } 301 | ], 302 | "description": "Compress/minify your HTML", 303 | "keywords": [ 304 | "compress", 305 | "html" 306 | ] 307 | } 308 | ] 309 | -------------------------------------------------------------------------------- /vendor/patchwork/jsqueeze/LICENSE.ASL20: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", 5 | "This file is @generated automatically" 6 | ], 7 | "hash": "836281c11549ad0a2d33faa8b4cbf5f7", 8 | "content-hash": "14d8ee13938ee36440c7d3f47831e4a3", 9 | "packages": [ 10 | { 11 | "name": "linkorb/jsmin-php", 12 | "version": "1.0.0", 13 | "source": { 14 | "type": "git", 15 | "url": "https://github.com/linkorb/jsmin-php.git", 16 | "reference": "be85d87fc9c27730e7e9ced742b13010dafc1026" 17 | }, 18 | "dist": { 19 | "type": "zip", 20 | "url": "https://packagist.phpcomposer.com/files/linkorb/jsmin-php/be85d87fc9c27730e7e9ced742b13010dafc1026.zip", 21 | "reference": "be85d87fc9c27730e7e9ced742b13010dafc1026", 22 | "shasum": "" 23 | }, 24 | "require": { 25 | "php": ">=5.0.0" 26 | }, 27 | "type": "library", 28 | "autoload": { 29 | "classmap": [ 30 | "src/" 31 | ] 32 | }, 33 | "notification-url": "https://packagist.org/downloads/", 34 | "license": [ 35 | "MIT" 36 | ], 37 | "authors": [ 38 | { 39 | "name": "Joost Faassen", 40 | "email": "j.faassen@linkorb.com", 41 | "role": "Packaging for composer" 42 | }, 43 | { 44 | "name": "Ryan Grove", 45 | "email": "ryan@wonko.com", 46 | "role": "PHP port" 47 | }, 48 | { 49 | "name": "Adam Gofort", 50 | "email": "aag@adamgoforth.com", 51 | "role": "Updates to the PHP port" 52 | }, 53 | { 54 | "name": "Douglas Crockford", 55 | "email": "douglas@crockford.com" 56 | } 57 | ], 58 | "description": "Unofficial package of jsmin-php", 59 | "homepage": "http://www.github.com/linkorb/jsmin-php", 60 | "keywords": [ 61 | "javascript", 62 | "jsmin", 63 | "minify" 64 | ], 65 | "time": "2013-03-15 13:16:35" 66 | }, 67 | { 68 | "name": "meenie/javascript-packer", 69 | "version": "1.1", 70 | "source": { 71 | "type": "git", 72 | "url": "https://github.com/meenie/javascript-packer.git", 73 | "reference": "dcab0159ae1ed9d7535c034fb8afe1e4c3495d22" 74 | }, 75 | "dist": { 76 | "type": "zip", 77 | "url": "https://packagist.phpcomposer.com/files/meenie/javascript-packer/dcab0159ae1ed9d7535c034fb8afe1e4c3495d22.zip", 78 | "reference": "dcab0159ae1ed9d7535c034fb8afe1e4c3495d22", 79 | "shasum": "" 80 | }, 81 | "type": "library", 82 | "autoload": { 83 | "files": [ 84 | "class.JavaScriptPacker.php" 85 | ] 86 | }, 87 | "notification-url": "https://packagist.org/downloads/", 88 | "license": [ 89 | "LGPL 2.1" 90 | ], 91 | "authors": [ 92 | { 93 | "name": "Nicolas Martin", 94 | "role": "Developer" 95 | } 96 | ], 97 | "description": "Composer hosted mirror of the PHP Version of Dean Edwards' JavaScript Packer", 98 | "homepage": "http://joliclic.free.fr/php/javascript-packer/en/", 99 | "keywords": [ 100 | "javascript packer" 101 | ], 102 | "time": "2013-03-25 21:54:33" 103 | }, 104 | { 105 | "name": "natxet/CssMin", 106 | "version": "v3.0.4", 107 | "source": { 108 | "type": "git", 109 | "url": "https://github.com/natxet/CssMin.git", 110 | "reference": "92de3fe3ccb4f8298d31952490ef7d5395855c39" 111 | }, 112 | "dist": { 113 | "type": "zip", 114 | "url": "https://packagist.phpcomposer.com/files/natxet/CssMin/92de3fe3ccb4f8298d31952490ef7d5395855c39.zip", 115 | "reference": "92de3fe3ccb4f8298d31952490ef7d5395855c39", 116 | "shasum": "" 117 | }, 118 | "require": { 119 | "php": ">=5.0" 120 | }, 121 | "type": "library", 122 | "extra": { 123 | "branch-alias": { 124 | "dev-master": "3.0-dev" 125 | } 126 | }, 127 | "autoload": { 128 | "classmap": [ 129 | "src/" 130 | ] 131 | }, 132 | "notification-url": "https://packagist.org/downloads/", 133 | "license": [ 134 | "MIT" 135 | ], 136 | "authors": [ 137 | { 138 | "name": "Joe Scylla", 139 | "email": "joe.scylla@gmail.com", 140 | "homepage": "https://profiles.google.com/joe.scylla" 141 | } 142 | ], 143 | "description": "Minifying CSS", 144 | "homepage": "http://code.google.com/p/cssmin/", 145 | "keywords": [ 146 | "css", 147 | "minify" 148 | ], 149 | "time": "2015-09-25 11:13:11" 150 | }, 151 | { 152 | "name": "patchwork/jsqueeze", 153 | "version": "v2.0.5", 154 | "source": { 155 | "type": "git", 156 | "url": "https://github.com/tchwork/jsqueeze.git", 157 | "reference": "693d64850eab2ce6a7c8f7cf547e1ab46e69d542" 158 | }, 159 | "dist": { 160 | "type": "zip", 161 | "url": "https://packagist.phpcomposer.com/files/tchwork/jsqueeze/693d64850eab2ce6a7c8f7cf547e1ab46e69d542.zip", 162 | "reference": "693d64850eab2ce6a7c8f7cf547e1ab46e69d542", 163 | "shasum": "" 164 | }, 165 | "require": { 166 | "php": ">=5.3.0" 167 | }, 168 | "type": "library", 169 | "extra": { 170 | "branch-alias": { 171 | "dev-master": "2.0-dev" 172 | } 173 | }, 174 | "autoload": { 175 | "psr-4": { 176 | "Patchwork\\": "src/" 177 | } 178 | }, 179 | "notification-url": "https://packagist.org/downloads/", 180 | "license": [ 181 | "(Apache-2.0 or GPL-2.0)" 182 | ], 183 | "authors": [ 184 | { 185 | "name": "Nicolas Grekas", 186 | "email": "p@tchwork.com" 187 | } 188 | ], 189 | "description": "Efficient JavaScript minification in PHP", 190 | "homepage": "https://github.com/tchwork/jsqueeze", 191 | "keywords": [ 192 | "compression", 193 | "javascript", 194 | "minification" 195 | ], 196 | "time": "2016-04-19 09:28:22" 197 | }, 198 | { 199 | "name": "websharks/css-minifier", 200 | "version": "150820", 201 | "source": { 202 | "type": "git", 203 | "url": "https://github.com/websharks/css-minifier.git", 204 | "reference": "da1d0254c41e1f59c7337aa444d743e6056046ff" 205 | }, 206 | "dist": { 207 | "type": "zip", 208 | "url": "https://packagist.phpcomposer.com/files/websharks/css-minifier/da1d0254c41e1f59c7337aa444d743e6056046ff.zip", 209 | "reference": "da1d0254c41e1f59c7337aa444d743e6056046ff", 210 | "shasum": "" 211 | }, 212 | "require": { 213 | "ext-mbstring": "*", 214 | "php": ">=5.3" 215 | }, 216 | "type": "library", 217 | "autoload": { 218 | "psr-4": { 219 | "WebSharks\\CssMinifier\\": "src/includes/classes" 220 | } 221 | }, 222 | "notification-url": "https://packagist.org/downloads/", 223 | "license": [ 224 | "GPL-3.0+" 225 | ], 226 | "authors": [ 227 | { 228 | "name": "websharks", 229 | "homepage": "http://websharks-inc.com/", 230 | "role": "company" 231 | }, 232 | { 233 | "name": "jaswsinc", 234 | "homepage": "http://jaswsinc.com/", 235 | "role": "developer" 236 | }, 237 | { 238 | "name": "raamdev", 239 | "homepage": "http://raam.org/", 240 | "role": "developer" 241 | } 242 | ], 243 | "description": "Compresses CSS.", 244 | "homepage": "https://github.com/websharks/css-minifier", 245 | "keywords": [ 246 | "compressor", 247 | "css", 248 | "websharks" 249 | ], 250 | "time": "2015-08-21 03:19:25" 251 | }, 252 | { 253 | "name": "wyrihaximus/html-compress", 254 | "version": "1.2.1", 255 | "source": { 256 | "type": "git", 257 | "url": "https://github.com/WyriHaximus/HtmlCompress.git", 258 | "reference": "b51fb7593cde54f364782d13c731b711be7f77b9" 259 | }, 260 | "dist": { 261 | "type": "zip", 262 | "url": "https://packagist.phpcomposer.com/files/WyriHaximus/HtmlCompress/b51fb7593cde54f364782d13c731b711be7f77b9.zip", 263 | "reference": "b51fb7593cde54f364782d13c731b711be7f77b9", 264 | "shasum": "" 265 | }, 266 | "require": { 267 | "linkorb/jsmin-php": "1.0.0", 268 | "meenie/javascript-packer": "1.1", 269 | "natxet/cssmin": "^3.0", 270 | "patchwork/jsqueeze": "~1.0|~2.0", 271 | "php": ">=5.4.0", 272 | "websharks/css-minifier": "150820" 273 | }, 274 | "require-dev": { 275 | "phake/phake": "^1.0", 276 | "phpunit/phpunit": "^4.0", 277 | "squizlabs/php_codesniffer": "^1.0", 278 | "vectorface/dunit": "^2.0" 279 | }, 280 | "type": "library", 281 | "autoload": { 282 | "psr-4": { 283 | "WyriHaximus\\HtmlCompress\\": "src/" 284 | } 285 | }, 286 | "notification-url": "https://packagist.org/downloads/", 287 | "license": [ 288 | "MIT" 289 | ], 290 | "authors": [ 291 | { 292 | "name": "Cees-Jan Kiewiet", 293 | "email": "ceesjank@gmail.com", 294 | "homepage": "http://wyrihaximus.net/" 295 | } 296 | ], 297 | "description": "Compress/minify your HTML", 298 | "keywords": [ 299 | "compress", 300 | "html" 301 | ], 302 | "time": "2016-07-26 21:15:52" 303 | } 304 | ], 305 | "packages-dev": [], 306 | "aliases": [], 307 | "minimum-stability": "stable", 308 | "stability-flags": [], 309 | "prefer-stable": false, 310 | "prefer-lowest": false, 311 | "platform": [], 312 | "platform-dev": [] 313 | } 314 | -------------------------------------------------------------------------------- /vendor/composer/ClassLoader.php: -------------------------------------------------------------------------------- 1 | 7 | * Jordi Boggiano 8 | * 9 | * For the full copyright and license information, please view the LICENSE 10 | * file that was distributed with this source code. 11 | */ 12 | 13 | namespace Composer\Autoload; 14 | 15 | /** 16 | * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. 17 | * 18 | * $loader = new \Composer\Autoload\ClassLoader(); 19 | * 20 | * // register classes with namespaces 21 | * $loader->add('Symfony\Component', __DIR__.'/component'); 22 | * $loader->add('Symfony', __DIR__.'/framework'); 23 | * 24 | * // activate the autoloader 25 | * $loader->register(); 26 | * 27 | * // to enable searching the include path (eg. for PEAR packages) 28 | * $loader->setUseIncludePath(true); 29 | * 30 | * In this example, if you try to use a class in the Symfony\Component 31 | * namespace or one of its children (Symfony\Component\Console for instance), 32 | * the autoloader will first look for the class under the component/ 33 | * directory, and it will then fallback to the framework/ directory if not 34 | * found before giving up. 35 | * 36 | * This class is loosely based on the Symfony UniversalClassLoader. 37 | * 38 | * @author Fabien Potencier 39 | * @author Jordi Boggiano 40 | * @see http://www.php-fig.org/psr/psr-0/ 41 | * @see http://www.php-fig.org/psr/psr-4/ 42 | */ 43 | class ClassLoader 44 | { 45 | // PSR-4 46 | private $prefixLengthsPsr4 = array(); 47 | private $prefixDirsPsr4 = array(); 48 | private $fallbackDirsPsr4 = array(); 49 | 50 | // PSR-0 51 | private $prefixesPsr0 = array(); 52 | private $fallbackDirsPsr0 = array(); 53 | 54 | private $useIncludePath = false; 55 | private $classMap = array(); 56 | private $classMapAuthoritative = false; 57 | private $missingClasses = array(); 58 | 59 | public function getPrefixes() 60 | { 61 | if (!empty($this->prefixesPsr0)) { 62 | return call_user_func_array('array_merge', $this->prefixesPsr0); 63 | } 64 | 65 | return array(); 66 | } 67 | 68 | public function getPrefixesPsr4() 69 | { 70 | return $this->prefixDirsPsr4; 71 | } 72 | 73 | public function getFallbackDirs() 74 | { 75 | return $this->fallbackDirsPsr0; 76 | } 77 | 78 | public function getFallbackDirsPsr4() 79 | { 80 | return $this->fallbackDirsPsr4; 81 | } 82 | 83 | public function getClassMap() 84 | { 85 | return $this->classMap; 86 | } 87 | 88 | /** 89 | * @param array $classMap Class to filename map 90 | */ 91 | public function addClassMap(array $classMap) 92 | { 93 | if ($this->classMap) { 94 | $this->classMap = array_merge($this->classMap, $classMap); 95 | } else { 96 | $this->classMap = $classMap; 97 | } 98 | } 99 | 100 | /** 101 | * Registers a set of PSR-0 directories for a given prefix, either 102 | * appending or prepending to the ones previously set for this prefix. 103 | * 104 | * @param string $prefix The prefix 105 | * @param array|string $paths The PSR-0 root directories 106 | * @param bool $prepend Whether to prepend the directories 107 | */ 108 | public function add($prefix, $paths, $prepend = false) 109 | { 110 | if (!$prefix) { 111 | if ($prepend) { 112 | $this->fallbackDirsPsr0 = array_merge( 113 | (array) $paths, 114 | $this->fallbackDirsPsr0 115 | ); 116 | } else { 117 | $this->fallbackDirsPsr0 = array_merge( 118 | $this->fallbackDirsPsr0, 119 | (array) $paths 120 | ); 121 | } 122 | 123 | return; 124 | } 125 | 126 | $first = $prefix[0]; 127 | if (!isset($this->prefixesPsr0[$first][$prefix])) { 128 | $this->prefixesPsr0[$first][$prefix] = (array) $paths; 129 | 130 | return; 131 | } 132 | if ($prepend) { 133 | $this->prefixesPsr0[$first][$prefix] = array_merge( 134 | (array) $paths, 135 | $this->prefixesPsr0[$first][$prefix] 136 | ); 137 | } else { 138 | $this->prefixesPsr0[$first][$prefix] = array_merge( 139 | $this->prefixesPsr0[$first][$prefix], 140 | (array) $paths 141 | ); 142 | } 143 | } 144 | 145 | /** 146 | * Registers a set of PSR-4 directories for a given namespace, either 147 | * appending or prepending to the ones previously set for this namespace. 148 | * 149 | * @param string $prefix The prefix/namespace, with trailing '\\' 150 | * @param array|string $paths The PSR-4 base directories 151 | * @param bool $prepend Whether to prepend the directories 152 | * 153 | * @throws \InvalidArgumentException 154 | */ 155 | public function addPsr4($prefix, $paths, $prepend = false) 156 | { 157 | if (!$prefix) { 158 | // Register directories for the root namespace. 159 | if ($prepend) { 160 | $this->fallbackDirsPsr4 = array_merge( 161 | (array) $paths, 162 | $this->fallbackDirsPsr4 163 | ); 164 | } else { 165 | $this->fallbackDirsPsr4 = array_merge( 166 | $this->fallbackDirsPsr4, 167 | (array) $paths 168 | ); 169 | } 170 | } elseif (!isset($this->prefixDirsPsr4[$prefix])) { 171 | // Register directories for a new namespace. 172 | $length = strlen($prefix); 173 | if ('\\' !== $prefix[$length - 1]) { 174 | throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); 175 | } 176 | $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; 177 | $this->prefixDirsPsr4[$prefix] = (array) $paths; 178 | } elseif ($prepend) { 179 | // Prepend directories for an already registered namespace. 180 | $this->prefixDirsPsr4[$prefix] = array_merge( 181 | (array) $paths, 182 | $this->prefixDirsPsr4[$prefix] 183 | ); 184 | } else { 185 | // Append directories for an already registered namespace. 186 | $this->prefixDirsPsr4[$prefix] = array_merge( 187 | $this->prefixDirsPsr4[$prefix], 188 | (array) $paths 189 | ); 190 | } 191 | } 192 | 193 | /** 194 | * Registers a set of PSR-0 directories for a given prefix, 195 | * replacing any others previously set for this prefix. 196 | * 197 | * @param string $prefix The prefix 198 | * @param array|string $paths The PSR-0 base directories 199 | */ 200 | public function set($prefix, $paths) 201 | { 202 | if (!$prefix) { 203 | $this->fallbackDirsPsr0 = (array) $paths; 204 | } else { 205 | $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; 206 | } 207 | } 208 | 209 | /** 210 | * Registers a set of PSR-4 directories for a given namespace, 211 | * replacing any others previously set for this namespace. 212 | * 213 | * @param string $prefix The prefix/namespace, with trailing '\\' 214 | * @param array|string $paths The PSR-4 base directories 215 | * 216 | * @throws \InvalidArgumentException 217 | */ 218 | public function setPsr4($prefix, $paths) 219 | { 220 | if (!$prefix) { 221 | $this->fallbackDirsPsr4 = (array) $paths; 222 | } else { 223 | $length = strlen($prefix); 224 | if ('\\' !== $prefix[$length - 1]) { 225 | throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); 226 | } 227 | $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; 228 | $this->prefixDirsPsr4[$prefix] = (array) $paths; 229 | } 230 | } 231 | 232 | /** 233 | * Turns on searching the include path for class files. 234 | * 235 | * @param bool $useIncludePath 236 | */ 237 | public function setUseIncludePath($useIncludePath) 238 | { 239 | $this->useIncludePath = $useIncludePath; 240 | } 241 | 242 | /** 243 | * Can be used to check if the autoloader uses the include path to check 244 | * for classes. 245 | * 246 | * @return bool 247 | */ 248 | public function getUseIncludePath() 249 | { 250 | return $this->useIncludePath; 251 | } 252 | 253 | /** 254 | * Turns off searching the prefix and fallback directories for classes 255 | * that have not been registered with the class map. 256 | * 257 | * @param bool $classMapAuthoritative 258 | */ 259 | public function setClassMapAuthoritative($classMapAuthoritative) 260 | { 261 | $this->classMapAuthoritative = $classMapAuthoritative; 262 | } 263 | 264 | /** 265 | * Should class lookup fail if not found in the current class map? 266 | * 267 | * @return bool 268 | */ 269 | public function isClassMapAuthoritative() 270 | { 271 | return $this->classMapAuthoritative; 272 | } 273 | 274 | /** 275 | * Registers this instance as an autoloader. 276 | * 277 | * @param bool $prepend Whether to prepend the autoloader or not 278 | */ 279 | public function register($prepend = false) 280 | { 281 | spl_autoload_register(array($this, 'loadClass'), true, $prepend); 282 | } 283 | 284 | /** 285 | * Unregisters this instance as an autoloader. 286 | */ 287 | public function unregister() 288 | { 289 | spl_autoload_unregister(array($this, 'loadClass')); 290 | } 291 | 292 | /** 293 | * Loads the given class or interface. 294 | * 295 | * @param string $class The name of the class 296 | * @return bool|null True if loaded, null otherwise 297 | */ 298 | public function loadClass($class) 299 | { 300 | if ($file = $this->findFile($class)) { 301 | includeFile($file); 302 | 303 | return true; 304 | } 305 | } 306 | 307 | /** 308 | * Finds the path to the file where the class is defined. 309 | * 310 | * @param string $class The name of the class 311 | * 312 | * @return string|false The path if found, false otherwise 313 | */ 314 | public function findFile($class) 315 | { 316 | // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731 317 | if ('\\' == $class[0]) { 318 | $class = substr($class, 1); 319 | } 320 | 321 | // class map lookup 322 | if (isset($this->classMap[$class])) { 323 | return $this->classMap[$class]; 324 | } 325 | if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { 326 | return false; 327 | } 328 | 329 | $file = $this->findFileWithExtension($class, '.php'); 330 | 331 | // Search for Hack files if we are running on HHVM 332 | if (false === $file && defined('HHVM_VERSION')) { 333 | $file = $this->findFileWithExtension($class, '.hh'); 334 | } 335 | 336 | if (false === $file) { 337 | // Remember that this class does not exist. 338 | $this->missingClasses[$class] = true; 339 | } 340 | 341 | return $file; 342 | } 343 | 344 | private function findFileWithExtension($class, $ext) 345 | { 346 | // PSR-4 lookup 347 | $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; 348 | 349 | $first = $class[0]; 350 | if (isset($this->prefixLengthsPsr4[$first])) { 351 | foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { 352 | if (0 === strpos($class, $prefix)) { 353 | foreach ($this->prefixDirsPsr4[$prefix] as $dir) { 354 | if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { 355 | return $file; 356 | } 357 | } 358 | } 359 | } 360 | } 361 | 362 | // PSR-4 fallback dirs 363 | foreach ($this->fallbackDirsPsr4 as $dir) { 364 | if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { 365 | return $file; 366 | } 367 | } 368 | 369 | // PSR-0 lookup 370 | if (false !== $pos = strrpos($class, '\\')) { 371 | // namespaced class name 372 | $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) 373 | . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); 374 | } else { 375 | // PEAR-like class name 376 | $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; 377 | } 378 | 379 | if (isset($this->prefixesPsr0[$first])) { 380 | foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { 381 | if (0 === strpos($class, $prefix)) { 382 | foreach ($dirs as $dir) { 383 | if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { 384 | return $file; 385 | } 386 | } 387 | } 388 | } 389 | } 390 | 391 | // PSR-0 fallback dirs 392 | foreach ($this->fallbackDirsPsr0 as $dir) { 393 | if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { 394 | return $file; 395 | } 396 | } 397 | 398 | // PSR-0 include paths. 399 | if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { 400 | return $file; 401 | } 402 | 403 | return false; 404 | } 405 | } 406 | 407 | /** 408 | * Scope isolated include. 409 | * 410 | * Prevents access to $this/self from included files. 411 | */ 412 | function includeFile($file) 413 | { 414 | include $file; 415 | } 416 | -------------------------------------------------------------------------------- /vendor/patchwork/jsqueeze/LICENSE.GPLv2: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /vendor/meenie/javascript-packer/class.JavaScriptPacker.php: -------------------------------------------------------------------------------- 1 | pack(); 26 | * 27 | * or 28 | * 29 | * $myPacker = new JavaScriptPacker($script, 'Normal', true, false); 30 | * $packed = $myPacker->pack(); 31 | * 32 | * or (default values) 33 | * 34 | * $myPacker = new JavaScriptPacker($script); 35 | * $packed = $myPacker->pack(); 36 | * 37 | * 38 | * params of the constructor : 39 | * $script: the JavaScript to pack, string. 40 | * $encoding: level of encoding, int or string : 41 | * 0,10,62,95 or 'None', 'Numeric', 'Normal', 'High ASCII'. 42 | * default: 62. 43 | * $fastDecode: include the fast decoder in the packed result, boolean. 44 | * default : true. 45 | * $specialChars: if you are flagged your private and local variables 46 | * in the script, boolean. 47 | * default: false. 48 | * 49 | * The pack() method return the compressed JavasScript, as a string. 50 | * 51 | * see http://dean.edwards.name/packer/usage/ for more information. 52 | * 53 | * Notes : 54 | * # need PHP 5 . Tested with PHP 5.1.2, 5.1.3, 5.1.4, 5.2.3 55 | * 56 | * # The packed result may be different than with the Dean Edwards 57 | * version, but with the same length. The reason is that the PHP 58 | * function usort to sort array don't necessarily preserve the 59 | * original order of two equal member. The Javascript sort function 60 | * in fact preserve this order (but that's not require by the 61 | * ECMAScript standard). So the encoded keywords order can be 62 | * different in the two results. 63 | * 64 | * # Be careful with the 'High ASCII' Level encoding if you use 65 | * UTF-8 in your files... 66 | */ 67 | 68 | 69 | class JavaScriptPacker { 70 | // constants 71 | const IGNORE = '$1'; 72 | 73 | // validate parameters 74 | private $_script = ''; 75 | private $_encoding = 62; 76 | private $_fastDecode = true; 77 | private $_specialChars = false; 78 | 79 | private $LITERAL_ENCODING = array( 80 | 'None' => 0, 81 | 'Numeric' => 10, 82 | 'Normal' => 62, 83 | 'High ASCII' => 95 84 | ); 85 | 86 | public function __construct($_script, $_encoding = 62, $_fastDecode = true, $_specialChars = false) 87 | { 88 | $this->_script = $_script . "\n"; 89 | if (array_key_exists($_encoding, $this->LITERAL_ENCODING)) 90 | $_encoding = $this->LITERAL_ENCODING[$_encoding]; 91 | $this->_encoding = min((int)$_encoding, 95); 92 | $this->_fastDecode = $_fastDecode; 93 | $this->_specialChars = $_specialChars; 94 | } 95 | 96 | public function pack() { 97 | $this->_addParser('_basicCompression'); 98 | if ($this->_specialChars) 99 | $this->_addParser('_encodeSpecialChars'); 100 | if ($this->_encoding) 101 | $this->_addParser('_encodeKeywords'); 102 | 103 | // go! 104 | return $this->_pack($this->_script); 105 | } 106 | 107 | // apply all parsing routines 108 | private function _pack($script) { 109 | for ($i = 0; isset($this->_parsers[$i]); $i++) { 110 | $script = call_user_func(array(&$this,$this->_parsers[$i]), $script); 111 | } 112 | return $script; 113 | } 114 | 115 | // keep a list of parsing functions, they'll be executed all at once 116 | private $_parsers = array(); 117 | private function _addParser($parser) { 118 | $this->_parsers[] = $parser; 119 | } 120 | 121 | // zero encoding - just removal of white space and comments 122 | private function _basicCompression($script) { 123 | $parser = new ParseMaster(); 124 | // make safe 125 | $parser->escapeChar = '\\'; 126 | // protect strings 127 | $parser->add('/\'[^\'\\n\\r]*\'/', self::IGNORE); 128 | $parser->add('/"[^"\\n\\r]*"/', self::IGNORE); 129 | // remove comments 130 | $parser->add('/\\/\\/[^\\n\\r]*[\\n\\r]/', ' '); 131 | $parser->add('/\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\//', ' '); 132 | // protect regular expressions 133 | $parser->add('/\\s+(\\/[^\\/\\n\\r\\*][^\\/\\n\\r]*\\/g?i?)/', '$2'); // IGNORE 134 | $parser->add('/[^\\w\\x24\\/\'"*)\\?:]\\/[^\\/\\n\\r\\*][^\\/\\n\\r]*\\/g?i?/', self::IGNORE); 135 | // remove: ;;; doSomething(); 136 | if ($this->_specialChars) $parser->add('/;;;[^\\n\\r]+[\\n\\r]/'); 137 | // remove redundant semi-colons 138 | $parser->add('/\\(;;\\)/', self::IGNORE); // protect for (;;) loops 139 | $parser->add('/;+\\s*([};])/', '$2'); 140 | // apply the above 141 | $script = $parser->exec($script); 142 | 143 | // remove white-space 144 | $parser->add('/(\\b|\\x24)\\s+(\\b|\\x24)/', '$2 $3'); 145 | $parser->add('/([+\\-])\\s+([+\\-])/', '$2 $3'); 146 | $parser->add('/\\s+/', ''); 147 | // done 148 | return $parser->exec($script); 149 | } 150 | 151 | private function _encodeSpecialChars($script) { 152 | $parser = new ParseMaster(); 153 | // replace: $name -> n, $$name -> na 154 | $parser->add('/((\\x24+)([a-zA-Z$_]+))(\\d*)/', 155 | array('fn' => '_replace_name') 156 | ); 157 | // replace: _name -> _0, double-underscore (__name) is ignored 158 | $regexp = '/\\b_[A-Za-z\\d]\\w*/'; 159 | // build the word list 160 | $keywords = $this->_analyze($script, $regexp, '_encodePrivate'); 161 | // quick ref 162 | $encoded = $keywords['encoded']; 163 | 164 | $parser->add($regexp, 165 | array( 166 | 'fn' => '_replace_encoded', 167 | 'data' => $encoded 168 | ) 169 | ); 170 | return $parser->exec($script); 171 | } 172 | 173 | private function _encodeKeywords($script) { 174 | // escape high-ascii values already in the script (i.e. in strings) 175 | if ($this->_encoding > 62) 176 | $script = $this->_escape95($script); 177 | // create the parser 178 | $parser = new ParseMaster(); 179 | $encode = $this->_getEncoder($this->_encoding); 180 | // for high-ascii, don't encode single character low-ascii 181 | $regexp = ($this->_encoding > 62) ? '/\\w\\w+/' : '/\\w+/'; 182 | // build the word list 183 | $keywords = $this->_analyze($script, $regexp, $encode); 184 | $encoded = $keywords['encoded']; 185 | 186 | // encode 187 | $parser->add($regexp, 188 | array( 189 | 'fn' => '_replace_encoded', 190 | 'data' => $encoded 191 | ) 192 | ); 193 | if (empty($script)) return $script; 194 | else { 195 | //$res = $parser->exec($script); 196 | //$res = $this->_bootStrap($res, $keywords); 197 | //return $res; 198 | return $this->_bootStrap($parser->exec($script), $keywords); 199 | } 200 | } 201 | 202 | private function _analyze($script, $regexp, $encode) { 203 | // analyse 204 | // retreive all words in the script 205 | $all = array(); 206 | preg_match_all($regexp, $script, $all); 207 | $_sorted = array(); // list of words sorted by frequency 208 | $_encoded = array(); // dictionary of word->encoding 209 | $_protected = array(); // instances of "protected" words 210 | $all = $all[0]; // simulate the javascript comportement of global match 211 | if (!empty($all)) { 212 | $unsorted = array(); // same list, not sorted 213 | $protected = array(); // "protected" words (dictionary of word->"word") 214 | $value = array(); // dictionary of charCode->encoding (eg. 256->ff) 215 | $this->_count = array(); // word->count 216 | $i = count($all); $j = 0; //$word = null; 217 | // count the occurrences - used for sorting later 218 | do { 219 | --$i; 220 | $word = '$' . $all[$i]; 221 | if (!isset($this->_count[$word])) { 222 | $this->_count[$word] = 0; 223 | $unsorted[$j] = $word; 224 | // make a dictionary of all of the protected words in this script 225 | // these are words that might be mistaken for encoding 226 | //if (is_string($encode) && method_exists($this, $encode)) 227 | $values[$j] = call_user_func(array(&$this, $encode), $j); 228 | $protected['$' . $values[$j]] = $j++; 229 | } 230 | // increment the word counter 231 | $this->_count[$word]++; 232 | } while ($i > 0); 233 | // prepare to sort the word list, first we must protect 234 | // words that are also used as codes. we assign them a code 235 | // equivalent to the word itself. 236 | // e.g. if "do" falls within our encoding range 237 | // then we store keywords["do"] = "do"; 238 | // this avoids problems when decoding 239 | $i = count($unsorted); 240 | do { 241 | $word = $unsorted[--$i]; 242 | if (isset($protected[$word]) /*!= null*/) { 243 | $_sorted[$protected[$word]] = substr($word, 1); 244 | $_protected[$protected[$word]] = true; 245 | $this->_count[$word] = 0; 246 | } 247 | } while ($i); 248 | 249 | // sort the words by frequency 250 | // Note: the javascript and php version of sort can be different : 251 | // in php manual, usort : 252 | // " If two members compare as equal, 253 | // their order in the sorted array is undefined." 254 | // so the final packed script is different of the Dean's javascript version 255 | // but equivalent. 256 | // the ECMAscript standard does not guarantee this behaviour, 257 | // and thus not all browsers (e.g. Mozilla versions dating back to at 258 | // least 2003) respect this. 259 | usort($unsorted, array(&$this, '_sortWords')); 260 | $j = 0; 261 | // because there are "protected" words in the list 262 | // we must add the sorted words around them 263 | do { 264 | if (!isset($_sorted[$i])) 265 | $_sorted[$i] = substr($unsorted[$j++], 1); 266 | $_encoded[$_sorted[$i]] = $values[$i]; 267 | } while (++$i < count($unsorted)); 268 | } 269 | return array( 270 | 'sorted' => $_sorted, 271 | 'encoded' => $_encoded, 272 | 'protected' => $_protected); 273 | } 274 | 275 | private $_count = array(); 276 | private function _sortWords($match1, $match2) { 277 | return $this->_count[$match2] - $this->_count[$match1]; 278 | } 279 | 280 | // build the boot function used for loading and decoding 281 | private function _bootStrap($packed, $keywords) { 282 | $ENCODE = $this->_safeRegExp('$encode\\($count\\)'); 283 | 284 | // $packed: the packed script 285 | $packed = "'" . $this->_escape($packed) . "'"; 286 | 287 | // $ascii: base for encoding 288 | $ascii = min(count($keywords['sorted']), $this->_encoding); 289 | if ($ascii == 0) $ascii = 1; 290 | 291 | // $count: number of words contained in the script 292 | $count = count($keywords['sorted']); 293 | 294 | // $keywords: list of words contained in the script 295 | foreach ($keywords['protected'] as $i=>$value) { 296 | $keywords['sorted'][$i] = ''; 297 | } 298 | // convert from a string to an array 299 | ksort($keywords['sorted']); 300 | $keywords = "'" . implode('|',$keywords['sorted']) . "'.split('|')"; 301 | 302 | $encode = ($this->_encoding > 62) ? '_encode95' : $this->_getEncoder($ascii); 303 | $encode = $this->_getJSFunction($encode); 304 | $encode = preg_replace('/_encoding/','$ascii', $encode); 305 | $encode = preg_replace('/arguments\\.callee/','$encode', $encode); 306 | $inline = '\\$count' . ($ascii > 10 ? '.toString(\\$ascii)' : ''); 307 | 308 | // $decode: code snippet to speed up decoding 309 | if ($this->_fastDecode) { 310 | // create the decoder 311 | $decode = $this->_getJSFunction('_decodeBody'); 312 | if ($this->_encoding > 62) 313 | $decode = preg_replace('/\\\\w/', '[\\xa1-\\xff]', $decode); 314 | // perform the encoding inline for lower ascii values 315 | elseif ($ascii < 36) 316 | $decode = preg_replace($ENCODE, $inline, $decode); 317 | // special case: when $count==0 there are no keywords. I want to keep 318 | // the basic shape of the unpacking funcion so i'll frig the code... 319 | if ($count == 0) 320 | $decode = preg_replace($this->_safeRegExp('($count)\\s*=\\s*1'), '$1=0', $decode, 1); 321 | } 322 | 323 | // boot function 324 | $unpack = $this->_getJSFunction('_unpack'); 325 | if ($this->_fastDecode) { 326 | // insert the decoder 327 | $this->buffer = $decode; 328 | $unpack = preg_replace_callback('/\\{/', array(&$this, '_insertFastDecode'), $unpack, 1); 329 | } 330 | $unpack = preg_replace('/"/', "'", $unpack); 331 | if ($this->_encoding > 62) { // high-ascii 332 | // get rid of the word-boundaries for regexp matches 333 | $unpack = preg_replace('/\'\\\\\\\\b\'\s*\\+|\\+\s*\'\\\\\\\\b\'/', '', $unpack); 334 | } 335 | if ($ascii > 36 || $this->_encoding > 62 || $this->_fastDecode) { 336 | // insert the encode function 337 | $this->buffer = $encode; 338 | $unpack = preg_replace_callback('/\\{/', array(&$this, '_insertFastEncode'), $unpack, 1); 339 | } else { 340 | // perform the encoding inline 341 | $unpack = preg_replace($ENCODE, $inline, $unpack); 342 | } 343 | // pack the boot function too 344 | $unpackPacker = new JavaScriptPacker($unpack, 0, false, true); 345 | $unpack = $unpackPacker->pack(); 346 | 347 | // arguments 348 | $params = array($packed, $ascii, $count, $keywords); 349 | if ($this->_fastDecode) { 350 | $params[] = 0; 351 | $params[] = '{}'; 352 | } 353 | $params = implode(',', $params); 354 | 355 | // the whole thing 356 | return 'eval(' . $unpack . '(' . $params . "))\n"; 357 | } 358 | 359 | private $buffer; 360 | private function _insertFastDecode($match) { 361 | return '{' . $this->buffer . ';'; 362 | } 363 | private function _insertFastEncode($match) { 364 | return '{$encode=' . $this->buffer . ';'; 365 | } 366 | 367 | // mmm.. ..which one do i need ?? 368 | private function _getEncoder($ascii) { 369 | return $ascii > 10 ? $ascii > 36 ? $ascii > 62 ? 370 | '_encode95' : '_encode62' : '_encode36' : '_encode10'; 371 | } 372 | 373 | // zero encoding 374 | // characters: 0123456789 375 | private function _encode10($charCode) { 376 | return $charCode; 377 | } 378 | 379 | // inherent base36 support 380 | // characters: 0123456789abcdefghijklmnopqrstuvwxyz 381 | private function _encode36($charCode) { 382 | return base_convert($charCode, 10, 36); 383 | } 384 | 385 | // hitch a ride on base36 and add the upper case alpha characters 386 | // characters: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 387 | private function _encode62($charCode) { 388 | $res = ''; 389 | if ($charCode >= $this->_encoding) { 390 | $res = $this->_encode62((int)($charCode / $this->_encoding)); 391 | } 392 | $charCode = $charCode % $this->_encoding; 393 | 394 | if ($charCode > 35) 395 | return $res . chr($charCode + 29); 396 | else 397 | return $res . base_convert($charCode, 10, 36); 398 | } 399 | 400 | // use high-ascii values 401 | // characters: ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþ 402 | private function _encode95($charCode) { 403 | $res = ''; 404 | if ($charCode >= $this->_encoding) 405 | $res = $this->_encode95($charCode / $this->_encoding); 406 | 407 | return $res . chr(($charCode % $this->_encoding) + 161); 408 | } 409 | 410 | private function _safeRegExp($string) { 411 | return '/'.preg_replace('/\$/', '\\\$', $string).'/'; 412 | } 413 | 414 | private function _encodePrivate($charCode) { 415 | return "_" . $charCode; 416 | } 417 | 418 | // protect characters used by the parser 419 | private function _escape($script) { 420 | return preg_replace('/([\\\\\'])/', '\\\$1', $script); 421 | } 422 | 423 | // protect high-ascii characters already in the script 424 | private function _escape95($script) { 425 | return preg_replace_callback( 426 | '/[\\xa1-\\xff]/', 427 | array(&$this, '_escape95Bis'), 428 | $script 429 | ); 430 | } 431 | private function _escape95Bis($match) { 432 | return '\x'.((string)dechex(ord($match))); 433 | } 434 | 435 | 436 | private function _getJSFunction($aName) { 437 | if (defined('self::JSFUNCTION'.$aName)) 438 | return constant('self::JSFUNCTION'.$aName); 439 | else 440 | return ''; 441 | } 442 | 443 | // JavaScript Functions used. 444 | // Note : In Dean's version, these functions are converted 445 | // with 'String(aFunctionName);'. 446 | // This internal conversion complete the original code, ex : 447 | // 'while (aBool) anAction();' is converted to 448 | // 'while (aBool) { anAction(); }'. 449 | // The JavaScript functions below are corrected. 450 | 451 | // unpacking function - this is the boot strap function 452 | // data extracted from this packing routine is passed to 453 | // this function when decoded in the target 454 | // NOTE ! : without the ';' final. 455 | const JSFUNCTION_unpack = 456 | 457 | 'function($packed, $ascii, $count, $keywords, $encode, $decode) { 458 | while ($count--) { 459 | if ($keywords[$count]) { 460 | $packed = $packed.replace(new RegExp(\'\\\\b\' + $encode($count) + \'\\\\b\', \'g\'), $keywords[$count]); 461 | } 462 | } 463 | return $packed; 464 | }'; 465 | /* 466 | 'function($packed, $ascii, $count, $keywords, $encode, $decode) { 467 | while ($count--) 468 | if ($keywords[$count]) 469 | $packed = $packed.replace(new RegExp(\'\\\\b\' + $encode($count) + \'\\\\b\', \'g\'), $keywords[$count]); 470 | return $packed; 471 | }'; 472 | */ 473 | 474 | // code-snippet inserted into the unpacker to speed up decoding 475 | const JSFUNCTION_decodeBody = 476 | //_decode = function() { 477 | // does the browser support String.replace where the 478 | // replacement value is a function? 479 | 480 | ' if (!\'\'.replace(/^/, String)) { 481 | // decode all the values we need 482 | while ($count--) { 483 | $decode[$encode($count)] = $keywords[$count] || $encode($count); 484 | } 485 | // global replacement function 486 | $keywords = [function ($encoded) {return $decode[$encoded]}]; 487 | // generic match 488 | $encode = function () {return \'\\\\w+\'}; 489 | // reset the loop counter - we are now doing a global replace 490 | $count = 1; 491 | } 492 | '; 493 | //}; 494 | /* 495 | ' if (!\'\'.replace(/^/, String)) { 496 | // decode all the values we need 497 | while ($count--) $decode[$encode($count)] = $keywords[$count] || $encode($count); 498 | // global replacement function 499 | $keywords = [function ($encoded) {return $decode[$encoded]}]; 500 | // generic match 501 | $encode = function () {return\'\\\\w+\'}; 502 | // reset the loop counter - we are now doing a global replace 503 | $count = 1; 504 | }'; 505 | */ 506 | 507 | // zero encoding 508 | // characters: 0123456789 509 | const JSFUNCTION_encode10 = 510 | 'function($charCode) { 511 | return $charCode; 512 | }';//;'; 513 | 514 | // inherent base36 support 515 | // characters: 0123456789abcdefghijklmnopqrstuvwxyz 516 | const JSFUNCTION_encode36 = 517 | 'function($charCode) { 518 | return $charCode.toString(36); 519 | }';//;'; 520 | 521 | // hitch a ride on base36 and add the upper case alpha characters 522 | // characters: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 523 | const JSFUNCTION_encode62 = 524 | 'function($charCode) { 525 | return ($charCode < _encoding ? \'\' : arguments.callee(parseInt($charCode / _encoding))) + 526 | (($charCode = $charCode % _encoding) > 35 ? String.fromCharCode($charCode + 29) : $charCode.toString(36)); 527 | }'; 528 | 529 | // use high-ascii values 530 | // characters: ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþ 531 | const JSFUNCTION_encode95 = 532 | 'function($charCode) { 533 | return ($charCode < _encoding ? \'\' : arguments.callee($charCode / _encoding)) + 534 | String.fromCharCode($charCode % _encoding + 161); 535 | }'; 536 | 537 | } 538 | 539 | 540 | class ParseMaster { 541 | public $ignoreCase = false; 542 | public $escapeChar = ''; 543 | 544 | // constants 545 | const EXPRESSION = 0; 546 | const REPLACEMENT = 1; 547 | const LENGTH = 2; 548 | 549 | // used to determine nesting levels 550 | private $GROUPS = '/\\(/';//g 551 | private $SUB_REPLACE = '/\\$\\d/'; 552 | private $INDEXED = '/^\\$\\d+$/'; 553 | private $TRIM = '/([\'"])\\1\\.(.*)\\.\\1\\1$/'; 554 | private $ESCAPE = '/\\\./';//g 555 | private $QUOTE = '/\'/'; 556 | private $DELETED = '/\\x01[^\\x01]*\\x01/';//g 557 | 558 | public function add($expression, $replacement = '') { 559 | // count the number of sub-expressions 560 | // - add one because each pattern is itself a sub-expression 561 | $length = 1 + preg_match_all($this->GROUPS, $this->_internalEscape((string)$expression), $out); 562 | 563 | // treat only strings $replacement 564 | if (is_string($replacement)) { 565 | // does the pattern deal with sub-expressions? 566 | if (preg_match($this->SUB_REPLACE, $replacement)) { 567 | // a simple lookup? (e.g. "$2") 568 | if (preg_match($this->INDEXED, $replacement)) { 569 | // store the index (used for fast retrieval of matched strings) 570 | $replacement = (int)(substr($replacement, 1)) - 1; 571 | } else { // a complicated lookup (e.g. "Hello $2 $1") 572 | // build a function to do the lookup 573 | $quote = preg_match($this->QUOTE, $this->_internalEscape($replacement)) 574 | ? '"' : "'"; 575 | $replacement = array( 576 | 'fn' => '_backReferences', 577 | 'data' => array( 578 | 'replacement' => $replacement, 579 | 'length' => $length, 580 | 'quote' => $quote 581 | ) 582 | ); 583 | } 584 | } 585 | } 586 | // pass the modified arguments 587 | if (!empty($expression)) $this->_add($expression, $replacement, $length); 588 | else $this->_add('/^$/', $replacement, $length); 589 | } 590 | 591 | public function exec($string) { 592 | // execute the global replacement 593 | $this->_escaped = array(); 594 | 595 | // simulate the _patterns.toSTring of Dean 596 | $regexp = '/'; 597 | foreach ($this->_patterns as $reg) { 598 | $regexp .= '(' . substr($reg[self::EXPRESSION], 1, -1) . ')|'; 599 | } 600 | $regexp = substr($regexp, 0, -1) . '/'; 601 | $regexp .= ($this->ignoreCase) ? 'i' : ''; 602 | 603 | $string = $this->_escape($string, $this->escapeChar); 604 | $string = preg_replace_callback( 605 | $regexp, 606 | array( 607 | &$this, 608 | '_replacement' 609 | ), 610 | $string 611 | ); 612 | $string = $this->_unescape($string, $this->escapeChar); 613 | 614 | return preg_replace($this->DELETED, '', $string); 615 | } 616 | 617 | public function reset() { 618 | // clear the patterns collection so that this object may be re-used 619 | $this->_patterns = array(); 620 | } 621 | 622 | // private 623 | private $_escaped = array(); // escaped characters 624 | private $_patterns = array(); // patterns stored by index 625 | 626 | // create and add a new pattern to the patterns collection 627 | private function _add() { 628 | $arguments = func_get_args(); 629 | $this->_patterns[] = $arguments; 630 | } 631 | 632 | // this is the global replace function (it's quite complicated) 633 | private function _replacement($arguments) { 634 | if (empty($arguments)) return ''; 635 | 636 | $i = 1; $j = 0; 637 | // loop through the patterns 638 | while (isset($this->_patterns[$j])) { 639 | $pattern = $this->_patterns[$j++]; 640 | // do we have a result? 641 | if (isset($arguments[$i]) && ($arguments[$i] != '')) { 642 | $replacement = $pattern[self::REPLACEMENT]; 643 | 644 | if (is_array($replacement) && isset($replacement['fn'])) { 645 | 646 | if (isset($replacement['data'])) $this->buffer = $replacement['data']; 647 | return call_user_func(array(&$this, $replacement['fn']), $arguments, $i); 648 | 649 | } elseif (is_int($replacement)) { 650 | return $arguments[$replacement + $i]; 651 | 652 | } 653 | $delete = ($this->escapeChar == '' || 654 | strpos($arguments[$i], $this->escapeChar) === false) 655 | ? '' : "\x01" . $arguments[$i] . "\x01"; 656 | return $delete . $replacement; 657 | 658 | // skip over references to sub-expressions 659 | } else { 660 | $i += $pattern[self::LENGTH]; 661 | } 662 | } 663 | } 664 | 665 | private function _backReferences($match, $offset) { 666 | $replacement = $this->buffer['replacement']; 667 | $quote = $this->buffer['quote']; 668 | $i = $this->buffer['length']; 669 | while ($i) { 670 | $replacement = str_replace('$'.$i--, $match[$offset + $i], $replacement); 671 | } 672 | return $replacement; 673 | } 674 | 675 | private function _replace_name($match, $offset){ 676 | $length = strlen($match[$offset + 2]); 677 | $start = $length - max($length - strlen($match[$offset + 3]), 0); 678 | return substr($match[$offset + 1], $start, $length) . $match[$offset + 4]; 679 | } 680 | 681 | private function _replace_encoded($match, $offset) { 682 | return $this->buffer[$match[$offset]]; 683 | } 684 | 685 | 686 | // php : we cannot pass additional data to preg_replace_callback, 687 | // and we cannot use &$this in create_function, so let's go to lower level 688 | private $buffer; 689 | 690 | // encode escaped characters 691 | private function _escape($string, $escapeChar) { 692 | if ($escapeChar) { 693 | $this->buffer = $escapeChar; 694 | return preg_replace_callback( 695 | '/\\' . $escapeChar . '(.)' .'/', 696 | array(&$this, '_escapeBis'), 697 | $string 698 | ); 699 | 700 | } else { 701 | return $string; 702 | } 703 | } 704 | private function _escapeBis($match) { 705 | $this->_escaped[] = $match[1]; 706 | return $this->buffer; 707 | } 708 | 709 | // decode escaped characters 710 | private function _unescape($string, $escapeChar) { 711 | if ($escapeChar) { 712 | $regexp = '/'.'\\'.$escapeChar.'/'; 713 | $this->buffer = array('escapeChar'=> $escapeChar, 'i' => 0); 714 | return preg_replace_callback 715 | ( 716 | $regexp, 717 | array(&$this, '_unescapeBis'), 718 | $string 719 | ); 720 | 721 | } else { 722 | return $string; 723 | } 724 | } 725 | private function _unescapeBis() { 726 | if (isset($this->_escaped[$this->buffer['i']]) 727 | && $this->_escaped[$this->buffer['i']] != '') 728 | { 729 | $temp = $this->_escaped[$this->buffer['i']]; 730 | } else { 731 | $temp = ''; 732 | } 733 | $this->buffer['i']++; 734 | return $this->buffer['escapeChar'] . $temp; 735 | } 736 | 737 | private function _internalEscape($string) { 738 | return preg_replace($this->ESCAPE, '', $string); 739 | } 740 | } 741 | ?> 742 | -------------------------------------------------------------------------------- /vendor/websharks/css-minifier/LICENSE.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------