diff --git a/README.md b/README.md
index e28aad3..41bc072 100755
--- a/README.md
+++ b/README.md
@@ -15,6 +15,7 @@ Features:
* Auto Save.
* Collaborative Editing.
* Multi Cursor.
+* Overscroll ( Ability to center bottom of code ).
* PHP 7.2 Compatibility.
* Self updating.
* Split editor mode.
@@ -24,24 +25,22 @@ When you see a - in front of a task that means it is a possibility but we aren't
Task List:
-* Add ability to center bottom of code.
-* Add ability to hide cursors when in collaboration mode.
* Add ability to login with LDAP.
* Add ability to save users in database.
-* -Add ability to see what people are highlighting in collaboration mode.
* Add custom market.
-* Add if file could not be saved 5 times close the editor.
-* Add multi level users. ( Projects for only certain groups, Permission levels )
+* Add if file could not be saved 5 times close the open file.
+* Add multi level users. ( Projects for only certain groups, Permission levels )
* Add mobile compatibility.
* Clean up Collaborative compatibility.
* Clean up update script.
-* Fix [WangYihangs execution exploit](https://github.com/WangYihang/Codiad-Remote-Code-Execute-Exploit)
+* Fix [WangYihangs execution exploit](https://github.com/WangYihang/Codiad-Remote-Code-Execute-Exploit).
* Fix site settings identification issue.
Completed:
* Add Auto Save.
+* Add ability to center bottom of code.
* Add Self Updating Script.
* Add Site renaming.
* Fix Auto Complete.
diff --git a/components/filemanager/download.php b/components/filemanager/download.php
index c3a0a52..bba0cf5 100755
--- a/components/filemanager/download.php
+++ b/components/filemanager/download.php
@@ -43,19 +43,19 @@ if (isset($_GET['type']) && ($_GET['type']=='directory' || $_GET['type']=='root'
//////////////////////////////////////////////////////////////////
// Check system() command and a non windows OS
//////////////////////////////////////////////////////////////////
- if (isAvailable('system') && stripos(PHP_OS, 'win') === false) {
- # Execute the tar command and save file
- $filename .= '.tar.gz';
-
- system("tar -pczf ".escapeshellarg($targetPath.$filename)." -C ".escapeshellarg(WORKSPACE)." ".escapeshellarg($_GET['path']));
- $download_file = $targetPath.$filename;
- } elseif (extension_loaded('zip')) { //Check if zip-Extension is availiable
+ if (extension_loaded('zip')) { //Check if zip-Extension is availiable
//build zipfile
require_once 'class.dirzip.php';
$filename .= '.zip';
$download_file = $targetPath.$filename;
DirZip::zipDir($dir, $targetPath .$filename);
+ } elseif (isAvailable('system') && stripos(PHP_OS, 'win') === false) {
+ # Execute the tar command and save file
+ $filename .= '.tar.gz';
+
+ system("tar -pczf ".escapeshellarg($targetPath.$filename)." -C ".escapeshellarg(WORKSPACE)." ".escapeshellarg($_GET['path']));
+ $download_file = $targetPath.$filename;
} else {
exit('');
}
diff --git a/plugins/Codiad-Archives-master/LICENSE b/plugins/Codiad-Archives-master/LICENSE
deleted file mode 100755
index d962f73..0000000
--- a/plugins/Codiad-Archives-master/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Raphaël Dartigues
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
diff --git a/plugins/Codiad-Archives-master/README.md b/plugins/Codiad-Archives-master/README.md
deleted file mode 100755
index eb865d3..0000000
--- a/plugins/Codiad-Archives-master/README.md
+++ /dev/null
@@ -1,59 +0,0 @@
-#Unpack archives
-
-Unpack archives directly through the filemanager.
-
-Supports:
-- .zip
-- .tar
-- .rar
-- .tar.bzip2
-- .tar.gz
-
-To support all types of archives you might have to install the packages for your server, for Ubunt/Debian for example:
-
-```bash
-apt-get install tar unzip bzip2 gzip unrar gcc phpize php-pear php5-dev
-```
-
-To install the php rar package
-
-```bash
-pecl -v install rar
-```
-###Activation
-
-To use the plugin you also need to activate it in the php.ini file on your server and put this on the top
-
-```bash
-[PHP]
-zend_extension=/usr/local/lib/ioncube/ioncube_loader_lin_5.3.so
-zend_extension=/usr/local/lib/Zend/ZendGuardLoader.so
-zend_optimizer.optimization_level=15
-zend_loader.enable=1
-zend_loader.disable_licensing=0
-zend_loader.obfuscation_level_support=3
-;extension=php_curl.dll
-;extension=curl.so
-extension=rar.so
-```
-
-Please restart your Server
-
-```bash
-/etc/init.d/apache2 restart
-```
-
-##Installation
-
-- Download the zip file and extract it to your plugin folder.
-
-##TODO
-
-- ~~Extract .zip~~ -> ~~Extract subZip~~
-- ~~Extract .gzip~~ -> ~~Extract subGZ~~
-- ~~Extract .bzip2~~ -> ~~Extract subBzip2~~
-- ~~Extract .rar~~ -> Extract subRar
-- ~~Extract .tar~~ -> Extract subTar
-- Extract .7z
-- ~~Open and navigate inside~~ (select markup implementation)
-- Extract subdirectory only
diff --git a/plugins/Codiad-Archives-master/controller.php b/plugins/Codiad-Archives-master/controller.php
deleted file mode 100755
index 3ef1d41..0000000
--- a/plugins/Codiad-Archives-master/controller.php
+++ /dev/null
@@ -1,260 +0,0 @@
-open($source)){
-
- $epath = '';
-
- if(isset($_GET['epath'])){
-
- $epath = trim($_GET['epath']);
- }
-
- if($epath==''||$epath=='/'||$epath==$source_info['basename']){
-
- // extract all archive to the path we determined above
-
- if($zip->extractTo($des)){
-
- echo '{"status":"success","message":"Archive extracted"}';
- }
- else{
-
- echo '{"status":"error","message":"Failed to extract contents"}';
- }
- }
- else{
-
- // extract epath to the path we determined above
-
- if(substr($epath, -1)!=='/'){
-
- //extract single file
-
- if(copy("zip://".$source."#".$epath, $des.'/'.basename($epath)) === TRUE){
-
- echo '{"status":"success","message":"Sub contents extracted"}';
- }
- else{
-
- echo '{"status":"error","message":"Failed to extract sub contents"}';
- }
- }
- else{
-
- //extract sub directory recursively
-
- $response='{"status":"success","message":"Sub contents extracted"}';
-
- for($i = 0; $i < $zip->numFiles; $i++){
-
- $info = $zip->statIndex($i);
-
- $entry = $info['name'];
-
- $is_dir=false;
-
- if($info['crc'] == 0 && substr($entry, -1)=='/'){
-
- $is_dir=true;
- }
-
- if(strpos($entry,$epath)===0){
-
- //get branche path from targeted directory
-
- $branche=explode($epath,$entry,2);
- $branche=$branche[1];
-
- if($is_dir){
-
- if($branche!=''&&!is_dir($des.'/'.$branche)&&!mkdir($des.'/'.$branche,0755,true)){
-
- $response= '{"status":"error","message":"Failed to create sub directory"}';
- break;
- }
- }
- elseif(!copy("zip://".$source."#".$entry, $des.'/'.$branche)){
-
- $response= '{"status":"error","message":"Failed to copy sub file"}';
- break;
- }
- }
- }
-
- echo $response;
- }
- }
-
- $zip->close();
-
- }
- else {
-
- echo '{"status":"error","message":"Could not open zip archive"}';
- }
- }
- }
- elseif($source_info['extension']=='tar') {
-
- if(class_exists('PharData') && $tar = new PharData($source)) {
-
- if($tar->extractTo($des)){
-
- echo '{"status":"success","message":"File extracted"}';
- }
- else{
-
- echo '{"status":"error","message":"Failed to extract contents"}';
- }
-
- }
- else {
-
- echo '{"status":"error","message":"PharData extension missing or cloud not open tar archive"}';
- }
- }
- elseif($source_info['extension']=='gz') {
-
- if(class_exists('PharData') && $gz = new PharData($source)) {
-
- if($tar_gzip_files = $gz->decompress()) {
-
- $tar_gzip = new PharData($tar_gzip_files);
-
- if($$tar_gzip->extractTo($des)){
- echo '{"status":"success","message":"File extracted"}';
- }
- else {
- echo '{"status":"error","message":"Failed to extract the files"}';
- }
- }
- else {
- echo '{"status":"error","message":"Failed to extract the .gzip file"}';
- }
-
-
- }
- else {
-
- echo '{"status":"error","message":"PharData extension missing or cloud not open tar archive"}';
- }
- }
- elseif($source_info['extension']=='bz2') {
-
- if(class_exists('PharData') && $bz = new PharData($source)) {
-
- if($tar_bzip2_files = $bz->decompress()) {
-
- $tar_bzip2 = new PharData($tar_bzip2_files);
-
- if($$tar_bzip2->extractTo($des)){
- echo '{"status":"success","message":"File extracted"}';
- }
- else {
- echo '{"status":"error","message":"Failed to extract the files"}';
- }
- }
- else {
- echo '{"status":"error","message":"Failed to extract the .bzip2 file"}';
- }
-
-
- }
- else {
-
- echo '{"status":"error","message":"PharData extension missing or cloud not open tar archive"}';
- }
- }
- elseif($source_info['extension']=='rar') {
-
- if(class_exists('rar_open') && $rar = new rar_open) {
-
- if($res = $rar->open($source)){
-
- $entries = rar_list($res);
- try {
- foreach ($entries as $entry) {
- $entry->extract($des);
- }
- } catch (Exception $e) {
- $error = true;
- }
-
- // extract it to the path we determined above
- if($error === false){
-
- echo '{"status":"success","message":"File extracted"}';
- }
- else{
-
- echo '{"status":"error","message":"Failed to extract contents"}';
- }
-
- $rar->close();
-
- }
- else {
-
- echo '{"status":"error","message":"Could not open rar archive"}';
- }
- }
- else {
-
- echo '{"status":"error","message":"Cloud not open rar archive"}';
- }
- }
- else {
-
- echo '{"status":"error","message":"Looks like a .'.$source_info['extension'].'"}';
- }
- }
- }
- else {
-
- echo '{"status":"error","message":"Missing Parameter"}';
- }
- break;
-
- default:
- echo '{"status":"error","message":"No Type"}';
- break;
- }
-?>
diff --git a/plugins/Codiad-Archives-master/dialog.php b/plugins/Codiad-Archives-master/dialog.php
deleted file mode 100755
index f8df42a..0000000
--- a/plugins/Codiad-Archives-master/dialog.php
+++ /dev/null
@@ -1,41 +0,0 @@
-
-';
-
- echo'';
-
- //echo'';
-
- echo'';
-
- echo'';
-
- echo'';
-
- echo'';
-
-?>
diff --git a/plugins/Codiad-Archives-master/functions.php b/plugins/Codiad-Archives-master/functions.php
deleted file mode 100755
index 51a4b25..0000000
--- a/plugins/Codiad-Archives-master/functions.php
+++ /dev/null
@@ -1,106 +0,0 @@
-open($source)){
-
- for ($i = 0; $i < $zip->numFiles; $i++) {
-
- $name = $zip->getNameIndex($i);
- $path = $name;
-
- $count=substr_count($path, '/');
-
- if($count > $level){
-
- continue;
- }
-
- $tree[$name]=$path;
- }
-
- $zip->close();
-
- }
- }
- }
- elseif($source_info['extension']=='tar') {
-
- if(class_exists('PharData') && $tar = new PharData($source)) {
-
- //TODO: get tar tree
- }
- }
- elseif($source_info['extension']=='rar') {
-
- if(class_exists('rar_open') && $rar = new rar_open) {
-
- if($res = $rar->open($source)){
-
- $entries = rar_list($res);
-
- //TODO: get rar tree
-
- $rar->close();
-
- }
- }
- }
- }
- }
- }
-
- return $tree;
- }
-
-?>
diff --git a/plugins/Codiad-Archives-master/init.js b/plugins/Codiad-Archives-master/init.js
deleted file mode 100755
index 07ff93c..0000000
--- a/plugins/Codiad-Archives-master/init.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) Codiad & Rafasashi, distributed
- * as-is and without warranty under the MIT License.
- * See http://opensource.org/licenses/MIT for more information.
- * This information must remain intact.
- */
-
-(function(global, $){
-
- var codiad = global.codiad,
- scripts = document.getElementsByTagName('script'),
- path = scripts[scripts.length-1].src.split('?')[0],
- curpath = path.split('/').slice(0, -1).join('/')+'/';
-
- $(function() {
- codiad.Extract.init();
- });
-
- codiad.Extract = {
-
- path: curpath,
- file: "",
-
- init: function() {
-
- },
-
- //////////////////////////////////////////////////////////
- //
- // Show dialog to enter new epath
- //
- // Parameter
- //
- // path - {String} - File path
- //
- //////////////////////////////////////////////////////////
- showDialog: function(path) {
- this.file = path;
- var epath = this.getName(path);
- codiad.modal.load(400, this.path+"dialog.php?path="+path+"&epath="+epath);
- },
-
- //////////////////////////////////////////////////////////
- //
- // Extract file
- //
- // Parameter
- //
- // path - {String} - File path
- // epath - {String} - Archive path
- //
- //////////////////////////////////////////////////////////
- extract: function(path, epath) {
- var _this = this;
- if (typeof(path) == 'undefined') {
- path = this.file;
- }
- if (typeof(epath) == 'undefined') {
- epath = $('#extract_path').val();
- codiad.modal.unload();
- }
- // console.log(_this.path+"controller.php?action=extract&path="+path+"&epath="+epath);
- $.getJSON(_this.path+"controller.php?action=extract&path="+path+"&epath="+epath, function(json){
- codiad.message[json.status](json.message);
- codiad.filemanager.rescan(codiad.project.getCurrent());
- });
- },
-
- //////////////////////////////////////////////////////////
- //
- // Get basename of file
- //
- // Parameter
- //
- // path - {String} - File path
- //
- //////////////////////////////////////////////////////////
- getName: function(path) {
- return path.substring(path.lastIndexOf("/")+1);
- }
- };
-})(this, jQuery);
diff --git a/plugins/Codiad-Archives-master/plugin.json b/plugins/Codiad-Archives-master/plugin.json
deleted file mode 100755
index d09140d..0000000
--- a/plugins/Codiad-Archives-master/plugin.json
+++ /dev/null
@@ -1,11 +0,0 @@
-[{ "author" : "Rafasashi & beli3ver",
- "version": "0.0.4",
- "name" : "Archives",
- "url" : "https://github.com/rafasashi/Codiad-Archives",
- "contextmenu" : [{
- "action" : "codiad.Extract.showDialog($('#context-menu').attr('data-path'));",
- "icon" : "icon-list-add",
- "applies-to" : "file-only",
- "title" : "Extract"
- }]
-}]
diff --git a/plugins/Codiad-AutoPrefixer-master/README.md b/plugins/Codiad-AutoPrefixer-master/README.md
deleted file mode 100755
index a440f98..0000000
--- a/plugins/Codiad-AutoPrefixer-master/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-#AutoPrefixer
-
-Parse CSS and add vendor prefixes to rules
-
-#Installation
-
-- Download the zip file and unzip it to your plugin folder.
-
-#Usage
-
-- Select "AutoPrefixer" in the context menu
-- Press "Ctrl-Alt-P" without any selection to prefix complete file
-- Press "Ctrl-Alt-P" with selected rules to prefix them
-
-#Example
-![Example](http://andrano.de/Plugins/img/autoprefixer.jpg)
-
-#Credit
-
-Uses [autoprefixer](https://github.com/postcss/autoprefixer)
\ No newline at end of file
diff --git a/plugins/Codiad-AutoPrefixer-master/autoprefixer.js b/plugins/Codiad-AutoPrefixer-master/autoprefixer.js
deleted file mode 100755
index 617467c..0000000
--- a/plugins/Codiad-AutoPrefixer-master/autoprefixer.js
+++ /dev/null
@@ -1,15699 +0,0 @@
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.autoprefixer=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 1%', 'last 2 versions', 'Firefox ESR', 'Opera 12.1'];
-
- autoprefixer.loadDefault = function() {
- return this.defaultCache || (this.defaultCache = autoprefixer({
- browsers: this["default"]
- }));
- };
-
- autoprefixer.process = function(str, options) {
- if (options == null) {
- options = {};
- }
- return this.loadDefault().process(str, options);
- };
-
- autoprefixer.postcss = function(css) {
- return autoprefixer.loadDefault().postcss(css);
- };
-
- autoprefixer.info = function() {
- return this.loadDefault().info();
- };
-
- module.exports = autoprefixer;
-
-}).call(this);
-
-},{"../data/browsers":2,"../data/prefixes":3,"./browsers":4,"./info":33,"./prefixes":38,"postcss":89}],2:[function(require,module,exports){
-(function() {
- var convert, data, intervals, major, name, names, normalize, _ref;
-
- names = ['firefox', 'chrome', 'safari', 'ios_saf', 'opera', 'ie', 'bb', 'android'];
-
- major = ['firefox', 'chrome', 'safari', 'ios_saf', 'opera', 'android', 'ie', 'ie_mob'];
-
- normalize = function(array) {
- return array.reverse().filter(function(i) {
- return i;
- });
- };
-
- intervals = function(array) {
- var i, interval, result, splited, sub, _i, _len;
- result = [];
- for (_i = 0, _len = array.length; _i < _len; _i++) {
- interval = array[_i];
- splited = interval.split('-');
- splited = splited.sort().reverse();
- sub = (function() {
- var _j, _len1, _results;
- _results = [];
- for (_j = 0, _len1 = splited.length; _j < _len1; _j++) {
- i = splited[_j];
- _results.push([i, interval, splited.length]);
- }
- return _results;
- })();
- result = result.concat(sub);
- }
- return result;
- };
-
- convert = function(name, data) {
- var future, result, versions;
- future = normalize(data.versions.slice(-3));
- versions = intervals(normalize(data.versions.slice(0, -3)));
- result = {};
- result.prefix = name === 'opera' ? '-o-' : "-" + data.prefix + "-";
- if (major.indexOf(name) === -1) {
- result.minor = true;
- }
- if (future.length) {
- result.future = future;
- }
- result.versions = versions.map(function(i) {
- return i[0];
- });
- result.popularity = versions.map(function(i) {
- return data.usage_global[i[1]] / i[2];
- });
- return result;
- };
-
- module.exports = {};
-
- _ref = require('caniuse-db/data').agents;
- for (name in _ref) {
- data = _ref[name];
- module.exports[name] = convert(name, data);
- }
-
-}).call(this);
-
-},{"caniuse-db/data":51}],3:[function(require,module,exports){
-(function() {
- var browsers, feature, map, prefix, textDecoration,
- __slice = [].slice;
-
- browsers = require('./browsers');
-
- feature = function(data, opts, callback) {
- var browser, interval, match, need, sorted, support, version, versions, _i, _len, _ref, _ref1, _ref2;
- if (!callback) {
- _ref = [opts, {}], callback = _ref[0], opts = _ref[1];
- }
- match = opts.full ? /y\sx($|\s)/ : /\sx($|\s)/;
- need = [];
- _ref1 = data.stats;
- for (browser in _ref1) {
- versions = _ref1[browser];
- for (interval in versions) {
- support = versions[interval];
- _ref2 = interval.split('-');
- for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
- version = _ref2[_i];
- if (browsers[browser] && support.match(match)) {
- version = version.replace(/\.0$/, '');
- need.push(browser + ' ' + version);
- }
- }
- }
- }
- sorted = need.sort(function(a, b) {
- a = a.split(' ');
- b = b.split(' ');
- if (a[0] > b[0]) {
- return 1;
- } else if (a[0] < b[0]) {
- return -1;
- } else {
- return parseFloat(a[1]) - parseFloat(b[1]);
- }
- });
- return callback(sorted);
- };
-
- map = function(browsers, callback) {
- var browser, name, version, _i, _len, _ref, _results;
- _results = [];
- for (_i = 0, _len = browsers.length; _i < _len; _i++) {
- browser = browsers[_i];
- _ref = browser.split(' '), name = _ref[0], version = _ref[1];
- version = parseFloat(version);
- _results.push(callback(browser, name, version));
- }
- return _results;
- };
-
- prefix = function() {
- var data, name, names, _i, _j, _len, _results;
- names = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), data = arguments[_i++];
- _results = [];
- for (_j = 0, _len = names.length; _j < _len; _j++) {
- name = names[_j];
- _results.push(module.exports[name] = data);
- }
- return _results;
- };
-
- module.exports = {};
-
- feature(require('caniuse-db/features-json/border-radius'), function(browsers) {
- return prefix('border-radius', 'border-top-left-radius', 'border-top-right-radius', 'border-bottom-right-radius', 'border-bottom-left-radius', {
- mistakes: ['-ms-'],
- browsers: browsers,
- transition: true
- });
- });
-
- feature(require('caniuse-db/features-json/css-boxshadow'), function(browsers) {
- return prefix('box-shadow', {
- browsers: browsers,
- transition: true
- });
- });
-
- feature(require('caniuse-db/features-json/css-animation'), function(browsers) {
- return prefix('animation', 'animation-name', 'animation-duration', 'animation-delay', 'animation-direction', 'animation-fill-mode', 'animation-iteration-count', 'animation-play-state', 'animation-timing-function', '@keyframes', {
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/css-transitions'), function(browsers) {
- return prefix('transition', 'transition-property', 'transition-duration', 'transition-delay', 'transition-timing-function', {
- mistakes: ['-ms-'],
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/transforms2d'), function(browsers) {
- return prefix('transform', 'transform-origin', {
- browsers: browsers,
- transition: true
- });
- });
-
- feature(require('caniuse-db/features-json/transforms3d'), function(browsers) {
- prefix('perspective', 'perspective-origin', {
- browsers: browsers,
- transition: true
- });
- return prefix('transform-style', 'backface-visibility', {
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/css-gradients'), function(browsers) {
- browsers = map(browsers, function(browser, name, version) {
- if (name === 'android' && version < 4 || name === 'ios_saf' && version < 5 || name === 'safari' && version < 5.1) {
- return browser + ' old';
- } else {
- return browser;
- }
- });
- return prefix('linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient', {
- props: ['background', 'background-image', 'border-image'],
- mistakes: ['-ms-'],
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/css3-boxsizing'), function(browsers) {
- return prefix('box-sizing', {
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/css-filters'), function(browsers) {
- return prefix('filter', {
- browsers: browsers,
- transition: true
- });
- });
-
- feature(require('caniuse-db/features-json/multicolumn'), function(browsers) {
- prefix('columns', 'column-width', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width', {
- browsers: browsers,
- transition: true
- });
- return prefix('column-count', 'column-rule-style', 'column-span', 'column-fill', 'break-before', 'break-after', 'break-inside', {
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/user-select-none'), function(browsers) {
- return prefix('user-select', {
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/flexbox'), function(browsers) {
- browsers = map(browsers, function(browser, name, version) {
- if (name === 'safari' && version < 6.1 || name === 'ios_saf' && version < 7) {
- return browser + ' 2009';
- } else if (name === 'chrome' && version < 21) {
- return browser + ' 2009';
- } else {
- return browser;
- }
- });
- prefix('display-flex', 'inline-flex', {
- props: ['display'],
- browsers: browsers
- });
- prefix('flex', 'flex-grow', 'flex-shrink', 'flex-basis', {
- transition: true,
- browsers: browsers
- });
- return prefix('flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content', {
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/calc'), function(browsers) {
- return prefix('calc', {
- props: ['*'],
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/background-img-opts'), function(browsers) {
- return prefix('background-clip', 'background-origin', 'background-size', {
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/font-feature'), function(browsers) {
- return prefix('font-feature-settings', 'font-variant-ligatures', 'font-language-override', 'font-kerning', {
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/border-image'), function(browsers) {
- return prefix('border-image', {
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/css-selection'), function(browsers) {
- return prefix('::selection', {
- selector: true,
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/css-placeholder'), function(browsers) {
- browsers = map(browsers, function(browser, name, version) {
- if (name === 'firefox' && version <= 18) {
- return browser + ' old';
- } else {
- return browser;
- }
- });
- return prefix('::placeholder', {
- selector: true,
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/css-hyphens'), function(browsers) {
- return prefix('hyphens', {
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/fullscreen'), function(browsers) {
- return prefix(':fullscreen', {
- selector: true,
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/css3-tabsize'), function(browsers) {
- return prefix('tab-size', {
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/intrinsic-width'), function(browsers) {
- return prefix('max-content', 'min-content', 'fit-content', 'fill-available', {
- props: ['width', 'min-width', 'max-width', 'height', 'min-height', 'max-height'],
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/css3-cursors-newer'), function(browsers) {
- prefix('zoom-in', 'zoom-out', {
- props: ['cursor'],
- browsers: browsers.concat(['chrome 3'])
- });
- return prefix('grab', 'grabbing', {
- props: ['cursor'],
- browsers: browsers.concat(['firefox 24', 'firefox 25', 'firefox 26'])
- });
- });
-
- feature(require('caniuse-db/features-json/css-sticky'), function(browsers) {
- return prefix('sticky', {
- props: ['position'],
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/pointer'), function(browsers) {
- return prefix('touch-action', {
- browsers: browsers
- });
- });
-
- textDecoration = require('caniuse-db/features-json/text-decoration');
-
- feature(textDecoration, function(browsers) {
- return prefix('text-decoration-style', {
- browsers: browsers
- });
- });
-
- feature(textDecoration, {
- full: true
- }, function(browsers) {
- return prefix('text-decoration-line', 'text-decoration-color', {
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/text-size-adjust'), function(browsers) {
- return prefix('text-size-adjust', {
- browsers: browsers
- });
- });
-
- feature(require('caniuse-db/features-json/css-masks'), function(browsers) {
- return prefix('clip-path', 'mask', 'mask-clip', 'mask-composite', 'mask-image', 'mask-origin', 'mask-position', 'mask-repeat', 'mask-size', {
- browsers: browsers
- });
- });
-
-}).call(this);
-
-},{"./browsers":2,"caniuse-db/features-json/background-img-opts":52,"caniuse-db/features-json/border-image":53,"caniuse-db/features-json/border-radius":54,"caniuse-db/features-json/calc":55,"caniuse-db/features-json/css-animation":56,"caniuse-db/features-json/css-boxshadow":57,"caniuse-db/features-json/css-filters":58,"caniuse-db/features-json/css-gradients":59,"caniuse-db/features-json/css-hyphens":60,"caniuse-db/features-json/css-masks":61,"caniuse-db/features-json/css-placeholder":62,"caniuse-db/features-json/css-selection":63,"caniuse-db/features-json/css-sticky":64,"caniuse-db/features-json/css-transitions":65,"caniuse-db/features-json/css3-boxsizing":66,"caniuse-db/features-json/css3-cursors-newer":67,"caniuse-db/features-json/css3-tabsize":68,"caniuse-db/features-json/flexbox":69,"caniuse-db/features-json/font-feature":70,"caniuse-db/features-json/fullscreen":71,"caniuse-db/features-json/intrinsic-width":72,"caniuse-db/features-json/multicolumn":73,"caniuse-db/features-json/pointer":74,"caniuse-db/features-json/text-decoration":75,"caniuse-db/features-json/text-size-adjust":76,"caniuse-db/features-json/transforms2d":77,"caniuse-db/features-json/transforms3d":78,"caniuse-db/features-json/user-select-none":79}],4:[function(require,module,exports){
-(function() {
- var Browsers, utils;
-
- utils = require('./utils');
-
- Browsers = (function() {
- Browsers.prefixes = function() {
- var data, i, name;
- if (this.prefixesCache) {
- return this.prefixesCache;
- }
- data = require('../data/browsers');
- return this.prefixesCache = utils.uniq((function() {
- var _results;
- _results = [];
- for (name in data) {
- i = data[name];
- _results.push(i.prefix);
- }
- return _results;
- })()).sort(function(a, b) {
- return b.length - a.length;
- });
- };
-
- Browsers.withPrefix = function(value) {
- if (!this.prefixesRegexp) {
- this.prefixesRegexp = RegExp("" + (this.prefixes().join('|')));
- }
- return this.prefixesRegexp.test(value);
- };
-
- function Browsers(data, requirements) {
- this.data = data;
- this.selected = this.parse(requirements);
- }
-
- Browsers.prototype.parse = function(requirements) {
- var selected;
- if (!(requirements instanceof Array)) {
- requirements = [requirements];
- }
- selected = [];
- requirements.map((function(_this) {
- return function(req) {
- var i, match, name, _ref;
- _ref = _this.requirements;
- for (name in _ref) {
- i = _ref[name];
- if (match = req.match(i.regexp)) {
- selected = selected.concat(i.select.apply(_this, match.slice(1)));
- return;
- }
- }
- return utils.error("Unknown browser requirement `" + req + "`");
- };
- })(this));
- return utils.uniq(selected);
- };
-
- Browsers.prototype.aliases = {
- fx: 'firefox',
- ff: 'firefox',
- ios: 'ios_saf',
- explorer: 'ie',
- blackberry: 'bb',
- explorermobile: 'ie_mob',
- operamini: 'op_mini',
- operamobile: 'op_mob',
- chromeandroid: 'and_chr',
- firefoxandroid: 'and_ff'
- };
-
- Browsers.prototype.requirements = {
- none: {
- regexp: /^none$/i,
- select: function() {
- if (typeof console !== "undefined" && console !== null) {
- console.warn("autoprefixer(\'none\') is deprecated and will be " + 'removed in 3.1. ' + 'Use autoprefixer({ browsers: [] })');
- }
- return [];
- }
- },
- lastVersions: {
- regexp: /^last (\d+) versions?$/i,
- select: function(versions) {
- return this.browsers(function(data) {
- if (data.minor) {
- return [];
- } else {
- return data.versions.slice(0, versions);
- }
- });
- }
- },
- lastByBrowser: {
- regexp: /^last (\d+) (\w+) versions?$/i,
- select: function(versions, browser) {
- var data;
- data = this.byName(browser);
- return data.versions.slice(0, versions).map(function(v) {
- return "" + data.name + " " + v;
- });
- }
- },
- globalStatistics: {
- regexp: /^> (\d+(\.\d+)?)%$/,
- select: function(popularity) {
- return this.browsers(function(data) {
- if (data.minor) {
- return [];
- } else {
- return data.versions.filter(function(version, i) {
- return data.popularity[i] > popularity;
- });
- }
- });
- }
- },
- newerThan: {
- regexp: /^(\w+) (>=?)\s*([\d\.]+)/,
- select: function(browser, sign, version) {
- var data, filter;
- data = this.byName(browser);
- version = parseFloat(version);
- if (sign === '>') {
- filter = function(v) {
- return v > version;
- };
- } else if (sign === '>=') {
- filter = function(v) {
- return v >= version;
- };
- }
- return data.versions.filter(filter).map(function(v) {
- return "" + data.name + " " + v;
- });
- }
- },
- olderThan: {
- regexp: /^(\w+) (<=?)\s*([\d\.]+)/,
- select: function(browser, sign, version) {
- var data, filter;
- data = this.byName(browser);
- version = parseFloat(version);
- if (sign === '<') {
- filter = function(v) {
- return v < version;
- };
- } else if (sign === '<=') {
- filter = function(v) {
- return v <= version;
- };
- }
- return data.versions.filter(filter).map(function(v) {
- return "" + data.name + " " + v;
- });
- }
- },
- esr: {
- regexp: /^(firefox|ff|fx) esr$/i,
- select: function() {
- return ['firefox 24'];
- }
- },
- direct: {
- regexp: /^(\w+) ([\d\.]+)$/,
- select: function(browser, version) {
- var data, first, last;
- data = this.byName(browser);
- version = parseFloat(version);
- last = data.future ? data.future[0] : data.versions[0];
- first = data.versions[data.versions.length - 1];
- if (version > last) {
- version = last;
- } else if (version < first) {
- version = first;
- }
- return ["" + data.name + " " + version];
- }
- }
- };
-
- Browsers.prototype.browsers = function(criteria) {
- var browser, data, selected, versions, _ref;
- selected = [];
- _ref = this.data;
- for (browser in _ref) {
- data = _ref[browser];
- versions = criteria(data).map(function(version) {
- return "" + browser + " " + version;
- });
- selected = selected.concat(versions);
- }
- return selected;
- };
-
- Browsers.prototype.prefix = function(browser) {
- var name, version, _ref;
- _ref = browser.split(' '), name = _ref[0], version = _ref[1];
- if (name === 'opera' && parseFloat(version) >= 15) {
- return '-webkit-';
- } else {
- return this.data[name].prefix;
- }
- };
-
- Browsers.prototype.isSelected = function(browser) {
- return this.selected.indexOf(browser) !== -1;
- };
-
- Browsers.prototype.byName = function(name) {
- var data;
- name = name.toLowerCase();
- name = this.aliases[name] || name;
- data = this.data[name];
- if (!data) {
- utils.error("Unknown browser " + browser);
- }
- data.name = name;
- return data;
- };
-
- return Browsers;
-
- })();
-
- module.exports = Browsers;
-
-}).call(this);
-
-},{"../data/browsers":2,"./utils":42}],5:[function(require,module,exports){
-(function() {
- var Browsers, Declaration, Prefixer, utils, vendor,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- Prefixer = require('./prefixer');
-
- Browsers = require('./browsers');
-
- vendor = require('postcss/lib/vendor');
-
- utils = require('./utils');
-
- Declaration = (function(_super) {
- __extends(Declaration, _super);
-
- function Declaration() {
- return Declaration.__super__.constructor.apply(this, arguments);
- }
-
- Declaration.prototype.check = function(decl) {
- return true;
- };
-
- Declaration.prototype.prefixed = function(prop, prefix) {
- return prefix + prop;
- };
-
- Declaration.prototype.normalize = function(prop) {
- return prop;
- };
-
- Declaration.prototype.otherPrefixes = function(value, prefix) {
- var other, _i, _len, _ref;
- _ref = Browsers.prefixes();
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- other = _ref[_i];
- if (other === prefix) {
- continue;
- }
- if (value.indexOf(other) !== -1) {
- return true;
- }
- }
- return false;
- };
-
- Declaration.prototype.set = function(decl, prefix) {
- decl.prop = this.prefixed(decl.prop, prefix);
- return decl;
- };
-
- Declaration.prototype.needCascade = function(decl) {
- return decl._autoprefixerCascade || (decl._autoprefixerCascade = this.all.options.cascade !== false && decl.before.indexOf("\n") !== -1);
- };
-
- Declaration.prototype.maxPrefixed = function(prefixes, decl) {
- var max, prefix, _i, _len;
- if (decl._autoprefixerMax) {
- return decl._autoprefixerMax;
- }
- max = 0;
- for (_i = 0, _len = prefixes.length; _i < _len; _i++) {
- prefix = prefixes[_i];
- prefix = utils.removeNote(prefix);
- if (prefix.length > max) {
- max = prefix.length;
- }
- }
- return decl._autoprefixerMax = max;
- };
-
- Declaration.prototype.calcBefore = function(prefixes, decl, prefix) {
- var before, diff, i, max, _i;
- if (prefix == null) {
- prefix = '';
- }
- before = decl.before;
- max = this.maxPrefixed(prefixes, decl);
- diff = max - utils.removeNote(prefix).length;
- for (i = _i = 0; 0 <= diff ? _i < diff : _i > diff; i = 0 <= diff ? ++_i : --_i) {
- before += ' ';
- }
- return before;
- };
-
- Declaration.prototype.restoreBefore = function(decl) {
- var lines, min;
- lines = decl.before.split("\n");
- min = lines[lines.length - 1];
- this.all.group(decl).up(function(prefixed) {
- var array, last;
- array = prefixed.before.split("\n");
- last = array[array.length - 1];
- if (last.length < min.length) {
- return min = last;
- }
- });
- lines[lines.length - 1] = min;
- return decl.before = lines.join("\n");
- };
-
- Declaration.prototype.insert = function(decl, prefix, prefixes) {
- var cloned;
- cloned = this.set(this.clone(decl), prefix);
- if (!cloned) {
- return;
- }
- if (this.needCascade(decl)) {
- cloned.before = this.calcBefore(prefixes, decl, prefix);
- }
- return decl.parent.insertBefore(decl, cloned);
- };
-
- Declaration.prototype.add = function(decl, prefix, prefixes) {
- var already, prefixed;
- prefixed = this.prefixed(decl.prop, prefix);
- already = this.all.group(decl).up(function(i) {
- return i.prop === prefixed;
- });
- already || (already = this.all.group(decl).down(function(i) {
- return i.prop === prefixed;
- }));
- if (already || this.otherPrefixes(decl.value, prefix)) {
- return;
- }
- return this.insert(decl, prefix, prefixes);
- };
-
- Declaration.prototype.process = function(decl) {
- var prefixes;
- if (this.needCascade(decl)) {
- prefixes = Declaration.__super__.process.apply(this, arguments);
- if (prefixes != null ? prefixes.length : void 0) {
- this.restoreBefore(decl);
- return decl.before = this.calcBefore(prefixes, decl);
- }
- } else {
- return Declaration.__super__.process.apply(this, arguments);
- }
- };
-
- Declaration.prototype.old = function(prop, prefix) {
- return [this.prefixed(prop, prefix)];
- };
-
- return Declaration;
-
- })(Prefixer);
-
- module.exports = Declaration;
-
-}).call(this);
-
-},{"./browsers":4,"./prefixer":37,"./utils":42,"postcss/lib/vendor":94}],6:[function(require,module,exports){
-(function() {
- var AlignContent, Declaration, flexSpec,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- flexSpec = require('./flex-spec');
-
- Declaration = require('../declaration');
-
- AlignContent = (function(_super) {
- __extends(AlignContent, _super);
-
- function AlignContent() {
- return AlignContent.__super__.constructor.apply(this, arguments);
- }
-
- AlignContent.names = ['align-content', 'flex-line-pack'];
-
- AlignContent.oldValues = {
- 'flex-end': 'end',
- 'flex-start': 'start',
- 'space-between': 'justify',
- 'space-around': 'distribute'
- };
-
- AlignContent.prototype.prefixed = function(prop, prefix) {
- var spec, _ref;
- _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
- if (spec === 2012) {
- return prefix + 'flex-line-pack';
- } else {
- return AlignContent.__super__.prefixed.apply(this, arguments);
- }
- };
-
- AlignContent.prototype.normalize = function(prop) {
- return 'align-content';
- };
-
- AlignContent.prototype.set = function(decl, prefix) {
- var spec;
- spec = flexSpec(prefix)[0];
- if (spec === 2012) {
- decl.value = AlignContent.oldValues[decl.value] || decl.value;
- return AlignContent.__super__.set.call(this, decl, prefix);
- } else if (spec === 'final') {
- return AlignContent.__super__.set.apply(this, arguments);
- }
- };
-
- return AlignContent;
-
- })(Declaration);
-
- module.exports = AlignContent;
-
-}).call(this);
-
-},{"../declaration":5,"./flex-spec":22}],7:[function(require,module,exports){
-(function() {
- var AlignItems, Declaration, flexSpec,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- flexSpec = require('./flex-spec');
-
- Declaration = require('../declaration');
-
- AlignItems = (function(_super) {
- __extends(AlignItems, _super);
-
- function AlignItems() {
- return AlignItems.__super__.constructor.apply(this, arguments);
- }
-
- AlignItems.names = ['align-items', 'flex-align', 'box-align'];
-
- AlignItems.oldValues = {
- 'flex-end': 'end',
- 'flex-start': 'start'
- };
-
- AlignItems.prototype.prefixed = function(prop, prefix) {
- var spec, _ref;
- _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
- if (spec === 2009) {
- return prefix + 'box-align';
- } else if (spec === 2012) {
- return prefix + 'flex-align';
- } else {
- return AlignItems.__super__.prefixed.apply(this, arguments);
- }
- };
-
- AlignItems.prototype.normalize = function(prop) {
- return 'align-items';
- };
-
- AlignItems.prototype.set = function(decl, prefix) {
- var spec;
- spec = flexSpec(prefix)[0];
- if (spec === 2009 || spec === 2012) {
- decl.value = AlignItems.oldValues[decl.value] || decl.value;
- return AlignItems.__super__.set.call(this, decl, prefix);
- } else {
- return AlignItems.__super__.set.apply(this, arguments);
- }
- };
-
- return AlignItems;
-
- })(Declaration);
-
- module.exports = AlignItems;
-
-}).call(this);
-
-},{"../declaration":5,"./flex-spec":22}],8:[function(require,module,exports){
-(function() {
- var AlignSelf, Declaration, flexSpec,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- flexSpec = require('./flex-spec');
-
- Declaration = require('../declaration');
-
- AlignSelf = (function(_super) {
- __extends(AlignSelf, _super);
-
- function AlignSelf() {
- return AlignSelf.__super__.constructor.apply(this, arguments);
- }
-
- AlignSelf.names = ['align-self', 'flex-item-align'];
-
- AlignSelf.oldValues = {
- 'flex-end': 'end',
- 'flex-start': 'start'
- };
-
- AlignSelf.prototype.prefixed = function(prop, prefix) {
- var spec, _ref;
- _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
- if (spec === 2012) {
- return prefix + 'flex-item-align';
- } else {
- return AlignSelf.__super__.prefixed.apply(this, arguments);
- }
- };
-
- AlignSelf.prototype.normalize = function(prop) {
- return 'align-self';
- };
-
- AlignSelf.prototype.set = function(decl, prefix) {
- var spec;
- spec = flexSpec(prefix)[0];
- if (spec === 2012) {
- decl.value = AlignSelf.oldValues[decl.value] || decl.value;
- return AlignSelf.__super__.set.call(this, decl, prefix);
- } else if (spec === 'final') {
- return AlignSelf.__super__.set.apply(this, arguments);
- }
- };
-
- return AlignSelf;
-
- })(Declaration);
-
- module.exports = AlignSelf;
-
-}).call(this);
-
-},{"../declaration":5,"./flex-spec":22}],9:[function(require,module,exports){
-(function() {
- var BackgroundSize, Declaration,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- Declaration = require('../declaration');
-
- BackgroundSize = (function(_super) {
- __extends(BackgroundSize, _super);
-
- function BackgroundSize() {
- return BackgroundSize.__super__.constructor.apply(this, arguments);
- }
-
- BackgroundSize.names = ['background-size'];
-
- BackgroundSize.prototype.set = function(decl, prefix) {
- var value;
- value = decl.value.toLowerCase();
- if (prefix === '-webkit-' && value.indexOf(' ') === -1 && value !== 'contain' && value !== 'cover') {
- decl.value = decl.value + ' ' + decl.value;
- }
- return BackgroundSize.__super__.set.call(this, decl, prefix);
- };
-
- return BackgroundSize;
-
- })(Declaration);
-
- module.exports = BackgroundSize;
-
-}).call(this);
-
-},{"../declaration":5}],10:[function(require,module,exports){
-(function() {
- var BorderImage, Declaration,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- Declaration = require('../declaration');
-
- BorderImage = (function(_super) {
- __extends(BorderImage, _super);
-
- function BorderImage() {
- return BorderImage.__super__.constructor.apply(this, arguments);
- }
-
- BorderImage.names = ['border-image'];
-
- BorderImage.prototype.set = function(decl, prefix) {
- decl.value = decl.value.replace(/\s+fill(\s)/, '$1');
- return BorderImage.__super__.set.call(this, decl, prefix);
- };
-
- return BorderImage;
-
- })(Declaration);
-
- module.exports = BorderImage;
-
-}).call(this);
-
-},{"../declaration":5}],11:[function(require,module,exports){
-(function() {
- var BorderRadius, Declaration,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- Declaration = require('../declaration');
-
- BorderRadius = (function(_super) {
- var hor, mozilla, normal, ver, _i, _j, _len, _len1, _ref, _ref1;
-
- __extends(BorderRadius, _super);
-
- function BorderRadius() {
- return BorderRadius.__super__.constructor.apply(this, arguments);
- }
-
- BorderRadius.names = ['border-radius'];
-
- BorderRadius.toMozilla = {};
-
- BorderRadius.toNormal = {};
-
- _ref = ['top', 'bottom'];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- ver = _ref[_i];
- _ref1 = ['left', 'right'];
- for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
- hor = _ref1[_j];
- normal = "border-" + ver + "-" + hor + "-radius";
- mozilla = "border-radius-" + ver + hor;
- BorderRadius.names.push(normal);
- BorderRadius.names.push(mozilla);
- BorderRadius.toMozilla[normal] = mozilla;
- BorderRadius.toNormal[mozilla] = normal;
- }
- }
-
- BorderRadius.prototype.prefixed = function(prop, prefix) {
- if (prefix === '-moz-') {
- return prefix + (BorderRadius.toMozilla[prop] || prop);
- } else {
- return BorderRadius.__super__.prefixed.apply(this, arguments);
- }
- };
-
- BorderRadius.prototype.normalize = function(prop) {
- return BorderRadius.toNormal[prop] || prop;
- };
-
- return BorderRadius;
-
- })(Declaration);
-
- module.exports = BorderRadius;
-
-}).call(this);
-
-},{"../declaration":5}],12:[function(require,module,exports){
-(function() {
- var BreakInside, Declaration,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- Declaration = require('../declaration');
-
- BreakInside = (function(_super) {
- __extends(BreakInside, _super);
-
- function BreakInside() {
- return BreakInside.__super__.constructor.apply(this, arguments);
- }
-
- BreakInside.names = ['break-inside', 'page-break-inside', 'column-break-inside'];
-
- BreakInside.prototype.prefixed = function(prop, prefix) {
- if (prefix === '-webkit-') {
- return prefix + 'column-break-inside';
- } else if (prefix === '-moz-') {
- return 'page-break-inside';
- } else {
- return BreakInside.__super__.prefixed.apply(this, arguments);
- }
- };
-
- BreakInside.prototype.normalize = function() {
- return 'break-inside';
- };
-
- BreakInside.prototype.set = function(decl, prefix) {
- if (decl.value === 'avoid-column' || decl.value === 'avoid-page') {
- decl.value = 'avoid';
- }
- return BreakInside.__super__.set.apply(this, arguments);
- };
-
- BreakInside.prototype.insert = function(decl, prefix, prefixes) {
- if (decl.value === 'avoid-region') {
-
- } else if (decl.value === 'avoid-page' && prefix === '-webkit-') {
-
- } else {
- return BreakInside.__super__.insert.apply(this, arguments);
- }
- };
-
- return BreakInside;
-
- })(Declaration);
-
- module.exports = BreakInside;
-
-}).call(this);
-
-},{"../declaration":5}],13:[function(require,module,exports){
-(function() {
- var DisplayFlex, OldDisplayFlex, OldValue, Value, flexSpec,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- flexSpec = require('./flex-spec');
-
- OldValue = require('../old-value');
-
- Value = require('../value');
-
- OldDisplayFlex = (function(_super) {
- __extends(OldDisplayFlex, _super);
-
- function OldDisplayFlex(name) {
- this.name = name;
- }
-
- OldDisplayFlex.prototype.check = function(value) {
- return value === this.name;
- };
-
- return OldDisplayFlex;
-
- })(OldValue);
-
- DisplayFlex = (function(_super) {
- __extends(DisplayFlex, _super);
-
- DisplayFlex.names = ['display-flex', 'inline-flex'];
-
- function DisplayFlex(name, prefixes) {
- DisplayFlex.__super__.constructor.apply(this, arguments);
- if (name === 'display-flex') {
- this.name = 'flex';
- }
- }
-
- DisplayFlex.prototype.check = function(decl) {
- return decl.value === this.name;
- };
-
- DisplayFlex.prototype.prefixed = function(prefix) {
- var spec, _ref;
- _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
- return prefix + (spec === 2009 ? this.name === 'flex' ? 'box' : 'inline-box' : spec === 2012 ? this.name === 'flex' ? 'flexbox' : 'inline-flexbox' : spec === 'final' ? this.name : void 0);
- };
-
- DisplayFlex.prototype.replace = function(string, prefix) {
- return this.prefixed(prefix);
- };
-
- DisplayFlex.prototype.old = function(prefix) {
- var prefixed;
- prefixed = this.prefixed(prefix);
- if (prefixed) {
- return new OldValue(prefixed);
- }
- };
-
- return DisplayFlex;
-
- })(Value);
-
- module.exports = DisplayFlex;
-
-}).call(this);
-
-},{"../old-value":36,"../value":43,"./flex-spec":22}],14:[function(require,module,exports){
-(function() {
- var FillAvailable, OldValue, Value,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- OldValue = require('../old-value');
-
- Value = require('../value');
-
- FillAvailable = (function(_super) {
- __extends(FillAvailable, _super);
-
- function FillAvailable() {
- return FillAvailable.__super__.constructor.apply(this, arguments);
- }
-
- FillAvailable.names = ['fill-available'];
-
- FillAvailable.prototype.replace = function(string, prefix) {
- if (prefix === '-moz-') {
- return string.replace(this.regexp(), '$1-moz-available$3');
- } else {
- return FillAvailable.__super__.replace.apply(this, arguments);
- }
- };
-
- FillAvailable.prototype.old = function(prefix) {
- if (prefix === '-moz-') {
- return new OldValue('-moz-available');
- } else {
- return FillAvailable.__super__.old.apply(this, arguments);
- }
- };
-
- return FillAvailable;
-
- })(Value);
-
- module.exports = FillAvailable;
-
-}).call(this);
-
-},{"../old-value":36,"../value":43}],15:[function(require,module,exports){
-(function() {
- var FilterValue, Value,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- Value = require('../value');
-
- FilterValue = (function(_super) {
- __extends(FilterValue, _super);
-
- function FilterValue() {
- return FilterValue.__super__.constructor.apply(this, arguments);
- }
-
- FilterValue.names = ['filter'];
-
- FilterValue.prototype.replace = function(value, prefix) {
- if (prefix === '-webkit-') {
- if (value.indexOf('-webkit-filter') === -1) {
- return FilterValue.__super__.replace.apply(this, arguments) + ', ' + value;
- } else {
- return value;
- }
- } else {
- return FilterValue.__super__.replace.apply(this, arguments);
- }
- };
-
- return FilterValue;
-
- })(Value);
-
- module.exports = FilterValue;
-
-}).call(this);
-
-},{"../value":43}],16:[function(require,module,exports){
-(function() {
- var Declaration, Filter,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- Declaration = require('../declaration');
-
- Filter = (function(_super) {
- __extends(Filter, _super);
-
- function Filter() {
- return Filter.__super__.constructor.apply(this, arguments);
- }
-
- Filter.names = ['filter'];
-
- Filter.prototype.check = function(decl) {
- var v;
- v = decl.value;
- return v.toLowerCase().indexOf('alpha(') === -1 && v.indexOf('DXImageTransform.Microsoft') === -1 && v.indexOf('data:image/svg+xml') === -1;
- };
-
- return Filter;
-
- })(Declaration);
-
- module.exports = Filter;
-
-}).call(this);
-
-},{"../declaration":5}],17:[function(require,module,exports){
-(function() {
- var Declaration, FlexBasis, flexSpec,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- flexSpec = require('./flex-spec');
-
- Declaration = require('../declaration');
-
- FlexBasis = (function(_super) {
- __extends(FlexBasis, _super);
-
- function FlexBasis() {
- return FlexBasis.__super__.constructor.apply(this, arguments);
- }
-
- FlexBasis.names = ['flex-basis', 'flex-preferred-size'];
-
- FlexBasis.prototype.normalize = function() {
- return 'flex-basis';
- };
-
- FlexBasis.prototype.prefixed = function(prop, prefix) {
- var spec, _ref;
- _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
- if (spec === 2012) {
- return prefix + 'flex-preferred-size';
- } else {
- return FlexBasis.__super__.prefixed.apply(this, arguments);
- }
- };
-
- FlexBasis.prototype.set = function(decl, prefix) {
- var spec, _ref;
- _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
- if (spec === 2012 || spec === 'final') {
- return FlexBasis.__super__.set.apply(this, arguments);
- }
- };
-
- return FlexBasis;
-
- })(Declaration);
-
- module.exports = FlexBasis;
-
-}).call(this);
-
-},{"../declaration":5,"./flex-spec":22}],18:[function(require,module,exports){
-(function() {
- var Declaration, FlexDirection, flexSpec,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- flexSpec = require('./flex-spec');
-
- Declaration = require('../declaration');
-
- FlexDirection = (function(_super) {
- __extends(FlexDirection, _super);
-
- function FlexDirection() {
- return FlexDirection.__super__.constructor.apply(this, arguments);
- }
-
- FlexDirection.names = ['flex-direction', 'box-direction', 'box-orient'];
-
- FlexDirection.prototype.normalize = function(prop) {
- return 'flex-direction';
- };
-
- FlexDirection.prototype.insert = function(decl, prefix, prefixes) {
- var already, cloned, dir, orient, spec, value, _ref;
- _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
- if (spec === 2009) {
- already = decl.parent.some(function(i) {
- return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
- });
- if (already) {
- return;
- }
- value = decl.value;
- orient = value.indexOf('row') !== -1 ? 'horizontal' : 'vertical';
- dir = value.indexOf('reverse') !== -1 ? 'reverse' : 'normal';
- cloned = this.clone(decl);
- cloned.prop = prefix + 'box-orient';
- cloned.value = orient;
- if (this.needCascade(decl)) {
- cloned.before = this.calcBefore(prefixes, decl, prefix);
- }
- decl.parent.insertBefore(decl, cloned);
- cloned = this.clone(decl);
- cloned.prop = prefix + 'box-direction';
- cloned.value = dir;
- if (this.needCascade(decl)) {
- cloned.before = this.calcBefore(prefixes, decl, prefix);
- }
- return decl.parent.insertBefore(decl, cloned);
- } else {
- return FlexDirection.__super__.insert.apply(this, arguments);
- }
- };
-
- FlexDirection.prototype.old = function(prop, prefix) {
- var spec, _ref;
- _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
- if (spec === 2009) {
- return [prefix + 'box-orient', prefix + 'box-direction'];
- } else {
- return FlexDirection.__super__.old.apply(this, arguments);
- }
- };
-
- return FlexDirection;
-
- })(Declaration);
-
- module.exports = FlexDirection;
-
-}).call(this);
-
-},{"../declaration":5,"./flex-spec":22}],19:[function(require,module,exports){
-(function() {
- var Declaration, FlexFlow, flexSpec,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- flexSpec = require('./flex-spec');
-
- Declaration = require('../declaration');
-
- FlexFlow = (function(_super) {
- __extends(FlexFlow, _super);
-
- function FlexFlow() {
- return FlexFlow.__super__.constructor.apply(this, arguments);
- }
-
- FlexFlow.names = ['flex-flow'];
-
- FlexFlow.prototype.set = function(decl, prefix) {
- var spec, _ref;
- _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
- if (spec === 2012) {
- return FlexFlow.__super__.set.apply(this, arguments);
- } else if (spec === 'final') {
- return FlexFlow.__super__.set.apply(this, arguments);
- }
- };
-
- return FlexFlow;
-
- })(Declaration);
-
- module.exports = FlexFlow;
-
-}).call(this);
-
-},{"../declaration":5,"./flex-spec":22}],20:[function(require,module,exports){
-(function() {
- var Declaration, Flex, flexSpec,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- flexSpec = require('./flex-spec');
-
- Declaration = require('../declaration');
-
- Flex = (function(_super) {
- __extends(Flex, _super);
-
- function Flex() {
- return Flex.__super__.constructor.apply(this, arguments);
- }
-
- Flex.names = ['flex-grow', 'flex-positive'];
-
- Flex.prototype.normalize = function() {
- return 'flex';
- };
-
- Flex.prototype.prefixed = function(prop, prefix) {
- var spec, _ref;
- _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
- if (spec === 2009) {
- return prefix + 'box-flex';
- } else if (spec === 2012) {
- return prefix + 'flex-positive';
- } else {
- return Flex.__super__.prefixed.apply(this, arguments);
- }
- };
-
- return Flex;
-
- })(Declaration);
-
- module.exports = Flex;
-
-}).call(this);
-
-},{"../declaration":5,"./flex-spec":22}],21:[function(require,module,exports){
-(function() {
- var Declaration, FlexShrink, flexSpec,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- flexSpec = require('./flex-spec');
-
- Declaration = require('../declaration');
-
- FlexShrink = (function(_super) {
- __extends(FlexShrink, _super);
-
- function FlexShrink() {
- return FlexShrink.__super__.constructor.apply(this, arguments);
- }
-
- FlexShrink.names = ['flex-shrink', 'flex-negative'];
-
- FlexShrink.prototype.normalize = function() {
- return 'flex-shrink';
- };
-
- FlexShrink.prototype.prefixed = function(prop, prefix) {
- var spec, _ref;
- _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
- if (spec === 2012) {
- return prefix + 'flex-negative';
- } else {
- return FlexShrink.__super__.prefixed.apply(this, arguments);
- }
- };
-
- FlexShrink.prototype.set = function(decl, prefix) {
- var spec, _ref;
- _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
- if (spec === 2012 || spec === 'final') {
- return FlexShrink.__super__.set.apply(this, arguments);
- }
- };
-
- return FlexShrink;
-
- })(Declaration);
-
- module.exports = FlexShrink;
-
-}).call(this);
-
-},{"../declaration":5,"./flex-spec":22}],22:[function(require,module,exports){
-(function() {
- module.exports = function(prefix) {
- var spec;
- spec = prefix === '-webkit- 2009' || prefix === '-moz-' ? 2009 : prefix === '-ms-' ? 2012 : prefix === '-webkit-' ? 'final' : void 0;
- if (prefix === '-webkit- 2009') {
- prefix = '-webkit-';
- }
- return [spec, prefix];
- };
-
-}).call(this);
-
-},{}],23:[function(require,module,exports){
-(function() {
- var Declaration, FlexWrap, flexSpec,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- flexSpec = require('./flex-spec');
-
- Declaration = require('../declaration');
-
- FlexWrap = (function(_super) {
- __extends(FlexWrap, _super);
-
- function FlexWrap() {
- return FlexWrap.__super__.constructor.apply(this, arguments);
- }
-
- FlexWrap.names = ['flex-wrap'];
-
- FlexWrap.prototype.set = function(decl, prefix) {
- var spec;
- spec = flexSpec(prefix)[0];
- if (spec !== 2009) {
- return FlexWrap.__super__.set.apply(this, arguments);
- }
- };
-
- return FlexWrap;
-
- })(Declaration);
-
- module.exports = FlexWrap;
-
-}).call(this);
-
-},{"../declaration":5,"./flex-spec":22}],24:[function(require,module,exports){
-(function() {
- var Declaration, Flex, flexSpec,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- flexSpec = require('./flex-spec');
-
- Declaration = require('../declaration');
-
- Flex = (function(_super) {
- __extends(Flex, _super);
-
- function Flex() {
- return Flex.__super__.constructor.apply(this, arguments);
- }
-
- Flex.names = ['flex', 'box-flex'];
-
- Flex.oldValues = {
- 'auto': '1',
- 'none': '0'
- };
-
- Flex.prototype.prefixed = function(prop, prefix) {
- var spec, _ref;
- _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
- if (spec === 2009) {
- return prefix + 'box-flex';
- } else {
- return Flex.__super__.prefixed.apply(this, arguments);
- }
- };
-
- Flex.prototype.normalize = function() {
- return 'flex';
- };
-
- Flex.prototype.set = function(decl, prefix) {
- var spec;
- spec = flexSpec(prefix)[0];
- if (spec === 2009) {
- decl.value = decl.value.split(' ')[0];
- decl.value = Flex.oldValues[decl.value] || decl.value;
- return Flex.__super__.set.call(this, decl, prefix);
- } else {
- return Flex.__super__.set.apply(this, arguments);
- }
- };
-
- return Flex;
-
- })(Declaration);
-
- module.exports = Flex;
-
-}).call(this);
-
-},{"../declaration":5,"./flex-spec":22}],25:[function(require,module,exports){
-(function() {
- var Fullscreen, Selector,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- Selector = require('../selector');
-
- Fullscreen = (function(_super) {
- __extends(Fullscreen, _super);
-
- function Fullscreen() {
- return Fullscreen.__super__.constructor.apply(this, arguments);
- }
-
- Fullscreen.names = [':fullscreen'];
-
- Fullscreen.prototype.prefixed = function(prefix) {
- if ('-webkit-' === prefix) {
- return ':-webkit-full-screen';
- } else if ('-moz-' === prefix) {
- return ':-moz-full-screen';
- } else {
- return ":" + prefix + "fullscreen";
- }
- };
-
- return Fullscreen;
-
- })(Selector);
-
- module.exports = Fullscreen;
-
-}).call(this);
-
-},{"../selector":40}],26:[function(require,module,exports){
-(function() {
- var Gradient, OldValue, Value, isDirection, list, utils,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- OldValue = require('../old-value');
-
- Value = require('../value');
-
- utils = require('../utils');
-
- list = require('postcss/lib/list');
-
- isDirection = /top|left|right|bottom/gi;
-
- Gradient = (function(_super) {
- __extends(Gradient, _super);
-
- function Gradient() {
- return Gradient.__super__.constructor.apply(this, arguments);
- }
-
- Gradient.names = ['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient'];
-
- Gradient.prototype.replace = function(string, prefix) {
- return list.space(string).map((function(_this) {
- return function(value) {
- var after, args, close, params;
- if (value.slice(0, +_this.name.length + 1 || 9e9) !== _this.name + '(') {
- return value;
- }
- close = value.lastIndexOf(')');
- after = value.slice(close + 1);
- args = value.slice(_this.name.length + 1, +(close - 1) + 1 || 9e9);
- params = list.comma(args);
- params = _this.newDirection(params);
- if (prefix === '-webkit- old') {
- return _this.oldWebkit(value, args, params, after);
- } else {
- _this.convertDirection(params);
- return prefix + _this.name + '(' + params.join(', ') + ')' + after;
- }
- };
- })(this)).join(' ');
- };
-
- Gradient.prototype.directions = {
- top: 'bottom',
- left: 'right',
- bottom: 'top',
- right: 'left'
- };
-
- Gradient.prototype.oldDirections = {
- 'top': 'left bottom, left top',
- 'left': 'right top, left top',
- 'bottom': 'left top, left bottom',
- 'right': 'left top, right top',
- 'top right': 'left bottom, right top',
- 'top left': 'right bottom, left top',
- 'right top': 'left bottom, right top',
- 'right bottom': 'left top, right bottom',
- 'bottom right': 'left top, right bottom',
- 'bottom left': 'right top, left bottom',
- 'left top': 'right bottom, left top',
- 'left bottom': 'right top, left bottom'
- };
-
- Gradient.prototype.newDirection = function(params) {
- var first, value;
- first = params[0];
- if (first.indexOf('to ') === -1 && isDirection.test(first)) {
- first = first.split(' ');
- first = (function() {
- var _i, _len, _results;
- _results = [];
- for (_i = 0, _len = first.length; _i < _len; _i++) {
- value = first[_i];
- _results.push(this.directions[value.toLowerCase()] || value);
- }
- return _results;
- }).call(this);
- params[0] = 'to ' + first.join(' ');
- }
- return params;
- };
-
- Gradient.prototype.oldWebkit = function(value, args, params, after) {
- if (this.name !== 'linear-gradient') {
- return value;
- }
- if (params[0] && params[0].indexOf('deg') !== -1) {
- return value;
- }
- if (args.indexOf('-corner') !== -1) {
- return value;
- }
- if (args.indexOf('-side') !== -1) {
- return value;
- }
- params = this.oldDirection(params);
- params = this.colorStops(params);
- return '-webkit-gradient(linear, ' + params.join(', ') + ')' + after;
- };
-
- Gradient.prototype.convertDirection = function(params) {
- if (params.length > 0) {
- if (params[0].slice(0, 3) === 'to ') {
- return params[0] = this.fixDirection(params[0]);
- } else if (params[0].indexOf('deg') !== -1) {
- return params[0] = this.fixAngle(params[0]);
- } else if (params[0].indexOf(' at ') !== -1) {
- return this.fixRadial(params);
- }
- }
- };
-
- Gradient.prototype.fixDirection = function(param) {
- var value;
- param = param.split(' ');
- param.splice(0, 1);
- param = (function() {
- var _i, _len, _results;
- _results = [];
- for (_i = 0, _len = param.length; _i < _len; _i++) {
- value = param[_i];
- _results.push(this.directions[value.toLowerCase()] || value);
- }
- return _results;
- }).call(this);
- return param.join(' ');
- };
-
- Gradient.prototype.roundFloat = function(float, digits) {
- return parseFloat(float.toFixed(digits));
- };
-
- Gradient.prototype.fixAngle = function(param) {
- param = parseFloat(param);
- param = Math.abs(450 - param) % 360;
- param = this.roundFloat(param, 3);
- return "" + param + "deg";
- };
-
- Gradient.prototype.oldDirection = function(params) {
- var direction;
- if (params.length === 0) {
- params;
- }
- if (params[0].indexOf('to ') !== -1) {
- direction = params[0].replace(/^to\s+/, '');
- direction = this.oldDirections[direction];
- params[0] = direction;
- return params;
- } else {
- direction = this.oldDirections.bottom;
- return [direction].concat(params);
- }
- };
-
- Gradient.prototype.colorStops = function(params) {
- return params.map(function(param, i) {
- var color, match, position, _ref;
- if (i === 0) {
- return param;
- }
- _ref = list.space(param), color = _ref[0], position = _ref[1];
- if (position == null) {
- match = param.match(/^(.*\))(\d.*)$/);
- if (match) {
- color = match[1];
- position = match[2];
- }
- }
- if (position && position.indexOf(')') !== -1) {
- color += ' ' + position;
- position = void 0;
- }
- if (i === 1 && (position === void 0 || position === '0%')) {
- return "from(" + color + ")";
- } else if (i === params.length - 1 && (position === void 0 || position === '100%')) {
- return "to(" + color + ")";
- } else if (position) {
- return "color-stop(" + position + ", " + color + ")";
- } else {
- return "color-stop(" + color + ")";
- }
- });
- };
-
- Gradient.prototype.fixRadial = function(params) {
- var first;
- first = params[0].split(/\s+at\s+/);
- return params.splice(0, 1, first[1], first[0]);
- };
-
- Gradient.prototype.old = function(prefix) {
- var regexp, string, type;
- if (prefix === '-webkit-') {
- type = this.name === 'linear-gradient' ? 'linear' : 'radial';
- string = '-gradient';
- regexp = utils.regexp("-webkit-(" + type + "-gradient|gradient\\(\\s*" + type + ")", false);
- return new OldValue(prefix + this.name, string, regexp);
- } else {
- return Gradient.__super__.old.apply(this, arguments);
- }
- };
-
- return Gradient;
-
- })(Value);
-
- module.exports = Gradient;
-
-}).call(this);
-
-},{"../old-value":36,"../utils":42,"../value":43,"postcss/lib/list":85}],27:[function(require,module,exports){
-(function() {
- var Declaration, JustifyContent, flexSpec,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- flexSpec = require('./flex-spec');
-
- Declaration = require('../declaration');
-
- JustifyContent = (function(_super) {
- __extends(JustifyContent, _super);
-
- function JustifyContent() {
- return JustifyContent.__super__.constructor.apply(this, arguments);
- }
-
- JustifyContent.names = ['justify-content', 'flex-pack', 'box-pack'];
-
- JustifyContent.oldValues = {
- 'flex-end': 'end',
- 'flex-start': 'start',
- 'space-between': 'justify',
- 'space-around': 'distribute'
- };
-
- JustifyContent.prototype.prefixed = function(prop, prefix) {
- var spec, _ref;
- _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
- if (spec === 2009) {
- return prefix + 'box-pack';
- } else if (spec === 2012) {
- return prefix + 'flex-pack';
- } else {
- return JustifyContent.__super__.prefixed.apply(this, arguments);
- }
- };
-
- JustifyContent.prototype.normalize = function(prop) {
- return 'justify-content';
- };
-
- JustifyContent.prototype.set = function(decl, prefix) {
- var spec, value;
- spec = flexSpec(prefix)[0];
- if (spec === 2009 || spec === 2012) {
- value = JustifyContent.oldValues[decl.value] || decl.value;
- decl.value = value;
- if (spec !== 2009 || value !== 'distribute') {
- return JustifyContent.__super__.set.call(this, decl, prefix);
- }
- } else if (spec === 'final') {
- return JustifyContent.__super__.set.apply(this, arguments);
- }
- };
-
- return JustifyContent;
-
- })(Declaration);
-
- module.exports = JustifyContent;
-
-}).call(this);
-
-},{"../declaration":5,"./flex-spec":22}],28:[function(require,module,exports){
-(function() {
- var Declaration, Order, flexSpec,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- flexSpec = require('./flex-spec');
-
- Declaration = require('../declaration');
-
- Order = (function(_super) {
- __extends(Order, _super);
-
- function Order() {
- return Order.__super__.constructor.apply(this, arguments);
- }
-
- Order.names = ['order', 'flex-order', 'box-ordinal-group'];
-
- Order.prototype.prefixed = function(prop, prefix) {
- var spec, _ref;
- _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
- if (spec === 2009) {
- return prefix + 'box-ordinal-group';
- } else if (spec === 2012) {
- return prefix + 'flex-order';
- } else {
- return Order.__super__.prefixed.apply(this, arguments);
- }
- };
-
- Order.prototype.normalize = function(prop) {
- return 'order';
- };
-
- Order.prototype.set = function(decl, prefix) {
- var spec;
- spec = flexSpec(prefix)[0];
- if (spec === 2009) {
- decl.value = (parseInt(decl.value) + 1).toString();
- return Order.__super__.set.call(this, decl, prefix);
- } else {
- return Order.__super__.set.apply(this, arguments);
- }
- };
-
- return Order;
-
- })(Declaration);
-
- module.exports = Order;
-
-}).call(this);
-
-},{"../declaration":5,"./flex-spec":22}],29:[function(require,module,exports){
-(function() {
- var Placeholder, Selector,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- Selector = require('../selector');
-
- Placeholder = (function(_super) {
- __extends(Placeholder, _super);
-
- function Placeholder() {
- return Placeholder.__super__.constructor.apply(this, arguments);
- }
-
- Placeholder.names = ['::placeholder'];
-
- Placeholder.prototype.possible = function() {
- return Placeholder.__super__.possible.apply(this, arguments).concat('-moz- old');
- };
-
- Placeholder.prototype.prefixed = function(prefix) {
- if ('-webkit-' === prefix) {
- return '::-webkit-input-placeholder';
- } else if ('-ms-' === prefix) {
- return ':-ms-input-placeholder';
- } else if ('-moz- old' === prefix) {
- return ':-moz-placeholder';
- } else {
- return "::" + prefix + "placeholder";
- }
- };
-
- return Placeholder;
-
- })(Selector);
-
- module.exports = Placeholder;
-
-}).call(this);
-
-},{"../selector":40}],30:[function(require,module,exports){
-(function() {
- var Declaration, TransformDecl,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- Declaration = require('../declaration');
-
- TransformDecl = (function(_super) {
- __extends(TransformDecl, _super);
-
- function TransformDecl() {
- return TransformDecl.__super__.constructor.apply(this, arguments);
- }
-
- TransformDecl.names = ['transform', 'transform-origin'];
-
- TransformDecl.functions3d = ['matrix3d', 'translate3d', 'translateZ', 'scale3d', 'scaleZ', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'perspective'];
-
- TransformDecl.prototype.keykrameParents = function(decl) {
- var parent;
- parent = decl.parent;
- while (parent) {
- if (parent.type === 'atrule' && parent.name === 'keyframes') {
- return true;
- }
- parent = parent.parent;
- }
- return false;
- };
-
- TransformDecl.prototype.contain3d = function(decl) {
- var func, _i, _len, _ref;
- if (decl.prop === 'transform-origin') {
- return false;
- }
- _ref = TransformDecl.functions3d;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- func = _ref[_i];
- if (decl.value.indexOf("" + func + "(") !== -1) {
- return true;
- }
- }
- return false;
- };
-
- TransformDecl.prototype.insert = function(decl, prefix, prefixes) {
- if (prefix === '-ms-') {
- if (!this.contain3d(decl) && !this.keykrameParents(decl)) {
- return TransformDecl.__super__.insert.apply(this, arguments);
- }
- } else if (prefix === '-o-') {
- if (!this.contain3d(decl)) {
- return TransformDecl.__super__.insert.apply(this, arguments);
- }
- } else {
- return TransformDecl.__super__.insert.apply(this, arguments);
- }
- };
-
- return TransformDecl;
-
- })(Declaration);
-
- module.exports = TransformDecl;
-
-}).call(this);
-
-},{"../declaration":5}],31:[function(require,module,exports){
-(function() {
- var TransformValue, Value,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- Value = require('../value');
-
- TransformValue = (function(_super) {
- __extends(TransformValue, _super);
-
- function TransformValue() {
- return TransformValue.__super__.constructor.apply(this, arguments);
- }
-
- TransformValue.names = ['transform'];
-
- TransformValue.prototype.replace = function(value, prefix) {
- if (prefix === '-ms-') {
- return value;
- } else {
- return TransformValue.__super__.replace.apply(this, arguments);
- }
- };
-
- return TransformValue;
-
- })(Value);
-
- module.exports = TransformValue;
-
-}).call(this);
-
-},{"../value":43}],32:[function(require,module,exports){
-(function() {
- var OldValue, Transition, Value,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- OldValue = require('../old-value');
-
- Value = require('../value');
-
- Transition = (function(_super) {
- __extends(Transition, _super);
-
- function Transition() {
- return Transition.__super__.constructor.apply(this, arguments);
- }
-
- Transition.names = ['flex', 'flex-grow', 'flex-shrink', 'flex-basis'];
-
- Transition.prototype.prefixed = function(prefix) {
- return this.all.prefixed(this.name, prefix);
- };
-
- Transition.prototype.replace = function(string, prefix) {
- return string.replace(this.regexp(), '$1' + this.prefixed(prefix) + '$3');
- };
-
- Transition.prototype.old = function(prefix) {
- return new OldValue(this.prefixed(prefix));
- };
-
- return Transition;
-
- })(Value);
-
- module.exports = Transition;
-
-}).call(this);
-
-},{"../old-value":36,"../value":43}],33:[function(require,module,exports){
-(function() {
- var capitalize, names, prefix;
-
- capitalize = function(str) {
- return str.slice(0, 1).toUpperCase() + str.slice(1);
- };
-
- names = {
- ie: 'IE',
- ie_mob: 'IE Mobile',
- ios_saf: 'iOS',
- op_mini: 'Opera Mini',
- op_mob: 'Opera Mobile',
- and_chr: 'Chrome for Android',
- and_ff: 'Firefox for Android'
- };
-
- prefix = function(name, transition, prefixes) {
- var out;
- out = ' ' + name + (transition ? '*' : '') + ': ';
- out += prefixes.map(function(i) {
- return i.replace(/^-(.*)-$/g, '$1');
- }).join(', ');
- out += "\n";
- return out;
- };
-
- module.exports = function(prefixes) {
- var atrules, browser, data, list, name, needTransition, out, props, selector, selectors, string, transitionProp, useTransition, value, values, version, versions, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6;
- if (prefixes.browsers.selected.length === 0) {
- return "No browsers selected";
- }
- versions = [];
- _ref = prefixes.browsers.selected;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- browser = _ref[_i];
- _ref1 = browser.split(' '), name = _ref1[0], version = _ref1[1];
- name = names[name] || capitalize(name);
- if (versions[name]) {
- versions[name].push(version);
- } else {
- versions[name] = [version];
- }
- }
- out = "Browsers:\n";
- for (browser in versions) {
- list = versions[browser];
- list = list.sort(function(a, b) {
- return parseFloat(b) - parseFloat(a);
- });
- out += ' ' + browser + ': ' + list.join(', ') + "\n";
- }
- atrules = '';
- _ref2 = prefixes.add;
- for (name in _ref2) {
- data = _ref2[name];
- if (name[0] === '@' && data.prefixes) {
- atrules += prefix(name, false, data.prefixes);
- }
- }
- if (atrules !== '') {
- out += "\nAt-Rules:\n" + atrules;
- }
- selectors = '';
- _ref3 = prefixes.add.selectors;
- for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) {
- selector = _ref3[_j];
- if (selector.prefixes) {
- selectors += prefix(selector.name, false, selector.prefixes);
- }
- }
- if (selectors !== '') {
- out += "\nSelectors:\n" + selectors;
- }
- values = '';
- props = '';
- useTransition = false;
- needTransition = (_ref4 = prefixes.add.transition) != null ? _ref4.prefixes : void 0;
- _ref5 = prefixes.add;
- for (name in _ref5) {
- data = _ref5[name];
- if (name[0] !== '@' && data.prefixes) {
- transitionProp = needTransition && prefixes.data[name].transition;
- if (transitionProp) {
- useTransition = true;
- }
- props += prefix(name, transitionProp, data.prefixes);
- }
- if (!data.values) {
- continue;
- }
- if (prefixes.transitionProps.some(function(i) {
- return i === name;
- })) {
- continue;
- }
- _ref6 = data.values;
- for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) {
- value = _ref6[_k];
- string = prefix(value.name, false, value.prefixes);
- if (values.indexOf(string) === -1) {
- values += string;
- }
- }
- }
- if (useTransition) {
- props += " * - can be used in transition\n";
- }
- if (props !== '') {
- out += "\nProperties:\n" + props;
- }
- if (values !== '') {
- out += "\nValues:\n" + values;
- }
- if (atrules === '' && selectors === '' && props === '' && values === '') {
- out += '\nAwesome! Your browsers don\'t require any vendor prefixes.' + '\nNow you can remove Autoprefixer from build steps.';
- }
- return out;
- };
-
-}).call(this);
-
-},{}],34:[function(require,module,exports){
-(function() {
- var Keyframes, Prefixer,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- Prefixer = require('./prefixer');
-
- Keyframes = (function(_super) {
- __extends(Keyframes, _super);
-
- function Keyframes() {
- return Keyframes.__super__.constructor.apply(this, arguments);
- }
-
- Keyframes.prototype.add = function(atRule, prefix) {
- var already, cloned, prefixed;
- prefixed = prefix + atRule.name;
- already = atRule.parent.some(function(i) {
- return i.name === prefixed && i.params === atRule.params;
- });
- if (already) {
- return;
- }
- cloned = this.clone(atRule, {
- name: prefixed
- });
- return atRule.parent.insertBefore(atRule, cloned);
- };
-
- Keyframes.prototype.process = function(node) {
- var parent, prefix, _i, _len, _ref, _results;
- parent = this.parentPrefix(node);
- _ref = this.prefixes;
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- prefix = _ref[_i];
- if (parent && parent !== prefix) {
- continue;
- }
- _results.push(this.add(node, prefix));
- }
- return _results;
- };
-
- return Keyframes;
-
- })(Prefixer);
-
- module.exports = Keyframes;
-
-}).call(this);
-
-},{"./prefixer":37}],35:[function(require,module,exports){
-(function() {
- var OldSelector;
-
- OldSelector = (function() {
- function OldSelector(selector, prefix) {
- var _i, _len, _ref;
- this.prefix = prefix;
- this.prefixed = selector.prefixed(this.prefix);
- this.regexp = selector.regexp(this.prefix);
- this.prefixeds = [];
- _ref = selector.possible();
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- prefix = _ref[_i];
- this.prefixeds.push([selector.prefixed(prefix), selector.regexp(prefix)]);
- }
- this.unprefixed = selector.name;
- this.nameRegexp = selector.regexp();
- }
-
- OldSelector.prototype.isHack = function(rule) {
- var before, index, regexp, rules, some, string, _i, _len, _ref, _ref1;
- index = rule.parent.index(rule) + 1;
- rules = rule.parent.rules;
- while (index < rules.length) {
- before = rules[index].selector;
- if (!before) {
- return true;
- }
- if (before.indexOf(this.unprefixed) !== -1 && before.match(this.nameRegexp)) {
- return false;
- }
- some = false;
- _ref = this.prefixeds;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- _ref1 = _ref[_i], string = _ref1[0], regexp = _ref1[1];
- if (before.indexOf(string) !== -1 && before.match(regexp)) {
- some = true;
- break;
- }
- }
- if (!some) {
- return true;
- }
- index += 1;
- }
- return true;
- };
-
- OldSelector.prototype.check = function(rule) {
- if (rule.selector.indexOf(this.prefixed) === -1) {
- return false;
- }
- if (!rule.selector.match(this.regexp)) {
- return false;
- }
- if (this.isHack(rule)) {
- return false;
- }
- return true;
- };
-
- return OldSelector;
-
- })();
-
- module.exports = OldSelector;
-
-}).call(this);
-
-},{}],36:[function(require,module,exports){
-(function() {
- var OldValue, utils;
-
- utils = require('./utils');
-
- OldValue = (function() {
- function OldValue(name, string, regexp) {
- this.name = name;
- this.string = string;
- this.regexp = regexp;
- this.regexp || (this.regexp = utils.regexp(this.name));
- this.string || (this.string = this.name);
- }
-
- OldValue.prototype.check = function(value) {
- if (value.indexOf(this.string) !== -1) {
- return !!value.match(this.regexp);
- } else {
- return false;
- }
- };
-
- return OldValue;
-
- })();
-
- module.exports = OldValue;
-
-}).call(this);
-
-},{"./utils":42}],37:[function(require,module,exports){
-(function() {
- var Browsers, Prefixer, utils, vendor;
-
- Browsers = require('./browsers');
-
- vendor = require('postcss/lib/vendor');
-
- utils = require('./utils');
-
- Prefixer = (function() {
- Prefixer.hack = function(klass) {
- var name, _i, _len, _ref, _results;
- this.hacks || (this.hacks = {});
- _ref = klass.names;
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- name = _ref[_i];
- _results.push(this.hacks[name] = klass);
- }
- return _results;
- };
-
- Prefixer.load = function(name, prefixes, all) {
- var klass, _ref;
- klass = (_ref = this.hacks) != null ? _ref[name] : void 0;
- if (klass) {
- return new klass(name, prefixes, all);
- } else {
- return new this(name, prefixes, all);
- }
- };
-
- Prefixer.clone = function(node, overrides) {
- var cloned;
- cloned = node.clone(overrides);
- if (node.type === 'decl') {
- cloned.between = node.between;
- }
- delete cloned._autoprefixerPrefix;
- delete cloned._autoprefixerValues;
- return cloned;
- };
-
- function Prefixer(name, prefixes, all) {
- this.name = name;
- this.prefixes = prefixes;
- this.all = all;
- }
-
- Prefixer.prototype.parentPrefix = function(node) {
- var prefix;
- prefix = node._autoprefixerPrefix != null ? node._autoprefixerPrefix : node.type === 'decl' && node.prop[0] === '-' ? vendor.prefix(node.prop) : node.type === 'root' ? false : node.type === 'rule' && node.selector.indexOf(':-') !== -1 ? node.selector.match(/:(-\w+-)/)[1] : node.type === 'atrule' && node.name[0] === '-' ? vendor.prefix(node.name) : this.parentPrefix(node.parent);
- if (Browsers.prefixes().indexOf(prefix) === -1) {
- prefix = false;
- }
- return node._autoprefixerPrefix = prefix;
- };
-
- Prefixer.prototype.process = function(node) {
- var added, parent, prefix, prefixes, _i, _j, _len, _len1, _ref;
- if (!this.check(node)) {
- return;
- }
- parent = this.parentPrefix(node);
- prefixes = [];
- _ref = this.prefixes;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- prefix = _ref[_i];
- if (parent && parent !== utils.removeNote(prefix)) {
- continue;
- }
- prefixes.push(prefix);
- }
- added = [];
- for (_j = 0, _len1 = prefixes.length; _j < _len1; _j++) {
- prefix = prefixes[_j];
- if (this.add(node, prefix, added.concat([prefix]))) {
- added.push(prefix);
- }
- }
- return added;
- };
-
- Prefixer.prototype.clone = function(node, overrides) {
- return Prefixer.clone(node, overrides);
- };
-
- return Prefixer;
-
- })();
-
- module.exports = Prefixer;
-
-}).call(this);
-
-},{"./browsers":4,"./utils":42,"postcss/lib/vendor":94}],38:[function(require,module,exports){
-(function() {
- var Browsers, Declaration, Keyframes, Prefixes, Processor, Selector, Supports, Value, declsCache, utils, vendor;
-
- utils = require('./utils');
-
- vendor = require('postcss/lib/vendor');
-
- Declaration = require('./declaration');
-
- Processor = require('./processor');
-
- Keyframes = require('./keyframes');
-
- Supports = require('./supports');
-
- Browsers = require('./browsers');
-
- Selector = require('./selector');
-
- Value = require('./value');
-
- Selector.hack(require('./hacks/fullscreen'));
-
- Selector.hack(require('./hacks/placeholder'));
-
- Declaration.hack(require('./hacks/flex'));
-
- Declaration.hack(require('./hacks/order'));
-
- Declaration.hack(require('./hacks/filter'));
-
- Declaration.hack(require('./hacks/flex-flow'));
-
- Declaration.hack(require('./hacks/flex-grow'));
-
- Declaration.hack(require('./hacks/flex-wrap'));
-
- Declaration.hack(require('./hacks/align-self'));
-
- Declaration.hack(require('./hacks/flex-basis'));
-
- Declaration.hack(require('./hacks/align-items'));
-
- Declaration.hack(require('./hacks/flex-shrink'));
-
- Declaration.hack(require('./hacks/break-inside'));
-
- Declaration.hack(require('./hacks/border-image'));
-
- Declaration.hack(require('./hacks/align-content'));
-
- Declaration.hack(require('./hacks/border-radius'));
-
- Declaration.hack(require('./hacks/transform-decl'));
-
- Declaration.hack(require('./hacks/flex-direction'));
-
- Declaration.hack(require('./hacks/justify-content'));
-
- Declaration.hack(require('./hacks/background-size'));
-
- Value.hack(require('./hacks/gradient'));
-
- Value.hack(require('./hacks/transition'));
-
- Value.hack(require('./hacks/display-flex'));
-
- Value.hack(require('./hacks/filter-value'));
-
- Value.hack(require('./hacks/fill-available'));
-
- Value.hack(require('./hacks/transform-value'));
-
- declsCache = {};
-
- Prefixes = (function() {
- function Prefixes(data, browsers, options) {
- var _ref;
- this.data = data;
- this.browsers = browsers;
- this.options = options != null ? options : {};
- _ref = this.preprocess(this.select(this.data)), this.add = _ref[0], this.remove = _ref[1];
- this.processor = new Processor(this);
- }
-
- Prefixes.prototype.transitionProps = ['transition', 'transition-property'];
-
- Prefixes.prototype.cleaner = function() {
- var empty;
- if (!this.cleanerCache) {
- if (this.browsers.selected.length) {
- empty = new Browsers(this.browsers.data, []);
- this.cleanerCache = new Prefixes(this.data, empty, this.options);
- } else {
- return this;
- }
- }
- return this.cleanerCache;
- };
-
- Prefixes.prototype.select = function(list) {
- var add, all, data, name, notes, selected;
- selected = {
- add: {},
- remove: {}
- };
- for (name in list) {
- data = list[name];
- add = data.browsers.map(function(i) {
- var params;
- params = i.split(' ');
- return {
- browser: params[0] + ' ' + params[1],
- note: params[2]
- };
- });
- notes = add.filter(function(i) {
- return i.note;
- }).map((function(_this) {
- return function(i) {
- return _this.browsers.prefix(i.browser) + ' ' + i.note;
- };
- })(this));
- notes = utils.uniq(notes);
- add = add.filter((function(_this) {
- return function(i) {
- return _this.browsers.isSelected(i.browser);
- };
- })(this)).map((function(_this) {
- return function(i) {
- var prefix;
- prefix = _this.browsers.prefix(i.browser);
- if (i.note) {
- return prefix + ' ' + i.note;
- } else {
- return prefix;
- }
- };
- })(this));
- add = this.sort(utils.uniq(add));
- all = data.browsers.map((function(_this) {
- return function(i) {
- return _this.browsers.prefix(i);
- };
- })(this));
- if (data.mistakes) {
- all = all.concat(data.mistakes);
- }
- all = all.concat(notes);
- all = utils.uniq(all);
- if (add.length) {
- selected.add[name] = add;
- if (add.length < all.length) {
- selected.remove[name] = all.filter(function(i) {
- return add.indexOf(i) === -1;
- });
- }
- } else {
- selected.remove[name] = all;
- }
- }
- return selected;
- };
-
- Prefixes.prototype.sort = function(prefixes) {
- return prefixes.sort(function(a, b) {
- var aLength, bLength;
- aLength = utils.removeNote(a).length;
- bLength = utils.removeNote(b).length;
- if (aLength === bLength) {
- return b.length - a.length;
- } else {
- return bLength - aLength;
- }
- });
- };
-
- Prefixes.prototype.preprocess = function(selected) {
- var add, name, old, olds, prefix, prefixed, prefixes, prop, props, remove, selector, value, values, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _m, _n, _o, _ref, _ref1, _ref2;
- add = {
- selectors: [],
- '@supports': new Supports(this)
- };
- _ref = selected.add;
- for (name in _ref) {
- prefixes = _ref[name];
- if (name === '@keyframes') {
- add[name] = new Keyframes(name, prefixes, this);
- } else if (this.data[name].selector) {
- add.selectors.push(Selector.load(name, prefixes, this));
- } else {
- props = this.data[name].transition ? this.transitionProps : this.data[name].props;
- if (props) {
- value = Value.load(name, prefixes, this);
- for (_i = 0, _len = props.length; _i < _len; _i++) {
- prop = props[_i];
- if (!add[prop]) {
- add[prop] = {
- values: []
- };
- }
- add[prop].values.push(value);
- }
- }
- if (!this.data[name].props) {
- values = ((_ref1 = add[name]) != null ? _ref1.values : void 0) || [];
- add[name] = Declaration.load(name, prefixes, this);
- add[name].values = values;
- }
- }
- }
- remove = {
- selectors: []
- };
- _ref2 = selected.remove;
- for (name in _ref2) {
- prefixes = _ref2[name];
- if (this.data[name].selector) {
- selector = Selector.load(name, prefixes);
- for (_j = 0, _len1 = prefixes.length; _j < _len1; _j++) {
- prefix = prefixes[_j];
- remove.selectors.push(selector.old(prefix));
- }
- } else if (name[0] === '@') {
- for (_k = 0, _len2 = prefixes.length; _k < _len2; _k++) {
- prefix = prefixes[_k];
- prefixed = '@' + prefix + name.slice(1);
- remove[prefixed] = {
- remove: true
- };
- }
- } else {
- props = this.data[name].transition ? this.transitionProps : this.data[name].props;
- if (props) {
- value = Value.load(name, [], this);
- for (_l = 0, _len3 = prefixes.length; _l < _len3; _l++) {
- prefix = prefixes[_l];
- old = value.old(prefix);
- if (old) {
- for (_m = 0, _len4 = props.length; _m < _len4; _m++) {
- prop = props[_m];
- if (!remove[prop]) {
- remove[prop] = {};
- }
- if (!remove[prop].values) {
- remove[prop].values = [];
- }
- remove[prop].values.push(old);
- }
- }
- }
- }
- if (!this.data[name].props) {
- for (_n = 0, _len5 = prefixes.length; _n < _len5; _n++) {
- prefix = prefixes[_n];
- prop = vendor.unprefixed(name);
- olds = this.decl(name).old(name, prefix);
- for (_o = 0, _len6 = olds.length; _o < _len6; _o++) {
- prefixed = olds[_o];
- if (!remove[prefixed]) {
- remove[prefixed] = {};
- }
- remove[prefixed].remove = true;
- }
- }
- }
- }
- }
- return [add, remove];
- };
-
- Prefixes.prototype.decl = function(prop) {
- var decl;
- decl = declsCache[prop];
- if (decl) {
- return decl;
- } else {
- return declsCache[prop] = Declaration.load(prop);
- }
- };
-
- Prefixes.prototype.unprefixed = function(prop) {
- prop = vendor.unprefixed(prop);
- return this.decl(prop).normalize(prop);
- };
-
- Prefixes.prototype.prefixed = function(prop, prefix) {
- prop = vendor.unprefixed(prop);
- return this.decl(prop).prefixed(prop, prefix);
- };
-
- Prefixes.prototype.values = function(type, prop) {
- var data, global, values, _ref, _ref1;
- data = this[type];
- global = (_ref = data['*']) != null ? _ref.values : void 0;
- values = (_ref1 = data[prop]) != null ? _ref1.values : void 0;
- if (global && values) {
- return utils.uniq(global.concat(values));
- } else {
- return global || values || [];
- }
- };
-
- Prefixes.prototype.group = function(decl) {
- var checker, index, length, rule, unprefixed;
- rule = decl.parent;
- index = rule.index(decl);
- length = rule.decls.length;
- unprefixed = this.unprefixed(decl.prop);
- checker = (function(_this) {
- return function(step, callback) {
- var other;
- index += step;
- while (index >= 0 && index < length) {
- other = rule.decls[index];
- if (other.type === 'decl') {
- if (step === -1 && other.prop === unprefixed) {
- if (!Browsers.withPrefix(other.value)) {
- break;
- }
- }
- if (_this.unprefixed(other.prop) !== unprefixed) {
- break;
- } else if (callback(other) === true) {
- return true;
- }
- if (step === +1 && other.prop === unprefixed) {
- if (!Browsers.withPrefix(other.value)) {
- break;
- }
- }
- }
- index += step;
- }
- return false;
- };
- })(this);
- return {
- up: function(callback) {
- return checker(-1, callback);
- },
- down: function(callback) {
- return checker(+1, callback);
- }
- };
- };
-
- return Prefixes;
-
- })();
-
- module.exports = Prefixes;
-
-}).call(this);
-
-},{"./browsers":4,"./declaration":5,"./hacks/align-content":6,"./hacks/align-items":7,"./hacks/align-self":8,"./hacks/background-size":9,"./hacks/border-image":10,"./hacks/border-radius":11,"./hacks/break-inside":12,"./hacks/display-flex":13,"./hacks/fill-available":14,"./hacks/filter":16,"./hacks/filter-value":15,"./hacks/flex":24,"./hacks/flex-basis":17,"./hacks/flex-direction":18,"./hacks/flex-flow":19,"./hacks/flex-grow":20,"./hacks/flex-shrink":21,"./hacks/flex-wrap":23,"./hacks/fullscreen":25,"./hacks/gradient":26,"./hacks/justify-content":27,"./hacks/order":28,"./hacks/placeholder":29,"./hacks/transform-decl":30,"./hacks/transform-value":31,"./hacks/transition":32,"./keyframes":34,"./processor":39,"./selector":40,"./supports":41,"./utils":42,"./value":43,"postcss/lib/vendor":94}],39:[function(require,module,exports){
-(function() {
- var Processor, Value, utils, vendor;
-
- vendor = require('postcss/lib/vendor');
-
- Value = require('./value');
-
- utils = require('./utils');
-
- Processor = (function() {
- function Processor(prefixes) {
- this.prefixes = prefixes;
- }
-
- Processor.prototype.add = function(css) {
- var keyframes, supports;
- keyframes = this.prefixes.add['@keyframes'];
- supports = this.prefixes.add['@supports'];
- css.eachAtRule((function(_this) {
- return function(rule) {
- if (rule.name === 'keyframes') {
- if (!_this.disabled(rule)) {
- return keyframes != null ? keyframes.process(rule) : void 0;
- }
- } else if (rule.name === 'supports') {
- if (!_this.disabled(rule)) {
- return supports.process(rule);
- }
- }
- };
- })(this));
- css.eachRule((function(_this) {
- return function(rule) {
- var selector, _i, _len, _ref, _results;
- if (_this.disabled(rule)) {
- return;
- }
- _ref = _this.prefixes.add.selectors;
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- selector = _ref[_i];
- _results.push(selector.process(rule));
- }
- return _results;
- };
- })(this));
- css.eachDecl((function(_this) {
- return function(decl) {
- var prefix;
- prefix = _this.prefixes.add[decl.prop];
- if (prefix && prefix.prefixes) {
- if (!_this.disabled(decl)) {
- return prefix.process(decl);
- }
- }
- };
- })(this));
- return css.eachDecl((function(_this) {
- return function(decl) {
- var unprefixed, value, _i, _len, _ref;
- if (_this.disabled(decl)) {
- return;
- }
- unprefixed = _this.prefixes.unprefixed(decl.prop);
- _ref = _this.prefixes.values('add', unprefixed);
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- value = _ref[_i];
- value.process(decl);
- }
- return Value.save(_this.prefixes, decl);
- };
- })(this));
- };
-
- Processor.prototype.remove = function(css) {
- var checker, _i, _len, _ref;
- css.eachAtRule((function(_this) {
- return function(rule, i) {
- if (_this.prefixes.remove['@' + rule.name]) {
- if (!_this.disabled(rule)) {
- return rule.parent.remove(i);
- }
- }
- };
- })(this));
- _ref = this.prefixes.remove.selectors;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- checker = _ref[_i];
- css.eachRule((function(_this) {
- return function(rule, i) {
- if (checker.check(rule)) {
- if (!_this.disabled(rule)) {
- return rule.parent.remove(i);
- }
- }
- };
- })(this));
- }
- return css.eachDecl((function(_this) {
- return function(decl, i) {
- var notHack, rule, unprefixed, _j, _len1, _ref1, _ref2;
- if (_this.disabled(decl)) {
- return;
- }
- rule = decl.parent;
- unprefixed = _this.prefixes.unprefixed(decl.prop);
- if ((_ref1 = _this.prefixes.remove[decl.prop]) != null ? _ref1.remove : void 0) {
- notHack = _this.prefixes.group(decl).down(function(other) {
- return other.prop === unprefixed;
- });
- if (notHack) {
- if (decl.before.indexOf("\n") > -1) {
- _this.reduceSpaces(decl);
- }
- rule.remove(i);
- return;
- }
- }
- _ref2 = _this.prefixes.values('remove', unprefixed);
- for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
- checker = _ref2[_j];
- if (checker.check(decl.value)) {
- rule.remove(i);
- return;
- }
- }
- };
- })(this));
- };
-
- Processor.prototype.disabled = function(node) {
- var status;
- if (node._autoprefixerDisabled != null) {
- return node._autoprefixerDisabled;
- } else if (node.decls || node.rules) {
- status = void 0;
- node.each(function(i) {
- if (i.type !== 'comment') {
- return;
- }
- if (i.text === 'autoprefixer: off') {
- status = false;
- return false;
- } else if (i.text === 'autoprefixer: on') {
- status = true;
- return false;
- }
- });
- return node._autoprefixerDisabled = status != null ? !status : node.parent ? this.disabled(node.parent) : false;
- } else {
- return node._autoprefixerDisabled = this.disabled(node.parent);
- }
- };
-
- Processor.prototype.reduceSpaces = function(decl) {
- var diff, parts, prevMin, stop;
- stop = false;
- this.prefixes.group(decl).up(function(other) {
- return stop = true;
- });
- if (stop) {
- return;
- }
- parts = decl.before.split("\n");
- prevMin = parts[parts.length - 1].length;
- diff = false;
- return this.prefixes.group(decl).down(function(other) {
- var last;
- parts = other.before.split("\n");
- last = parts.length - 1;
- if (parts[last].length > prevMin) {
- if (diff === false) {
- diff = parts[last].length - prevMin;
- }
- parts[last] = parts[last].slice(0, -diff);
- return other.before = parts.join("\n");
- }
- });
- };
-
- return Processor;
-
- })();
-
- module.exports = Processor;
-
-}).call(this);
-
-},{"./utils":42,"./value":43,"postcss/lib/vendor":94}],40:[function(require,module,exports){
-(function() {
- var Browsers, OldSelector, Prefixer, Selector, utils,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- OldSelector = require('./old-selector');
-
- Prefixer = require('./prefixer');
-
- Browsers = require('./browsers');
-
- utils = require('./utils');
-
- Selector = (function(_super) {
- __extends(Selector, _super);
-
- function Selector(name, prefixes, all) {
- this.name = name;
- this.prefixes = prefixes;
- this.all = all;
- this.regexpCache = {};
- }
-
- Selector.prototype.check = function(rule) {
- if (rule.selector.indexOf(this.name) !== -1) {
- return !!rule.selector.match(this.regexp());
- } else {
- return false;
- }
- };
-
- Selector.prototype.prefixed = function(prefix) {
- return this.name.replace(/^([^\w]*)/, '$1' + prefix);
- };
-
- Selector.prototype.regexp = function(prefix) {
- var name;
- if (this.regexpCache[prefix]) {
- return this.regexpCache[prefix];
- }
- name = prefix ? this.prefixed(prefix) : this.name;
- return this.regexpCache[prefix] = RegExp("(^|[^:\"'=])" + (utils.escapeRegexp(name)), "gi");
- };
-
- Selector.prototype.possible = function() {
- return Browsers.prefixes();
- };
-
- Selector.prototype.prefixeds = function(rule) {
- var prefix, prefixeds, _i, _len, _ref;
- if (rule._autoprefixerPrefixeds) {
- return rule._autoprefixerPrefixeds;
- }
- prefixeds = {};
- _ref = this.possible();
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- prefix = _ref[_i];
- prefixeds[prefix] = this.replace(rule.selector, prefix);
- }
- return rule._autoprefixerPrefixeds = prefixeds;
- };
-
- Selector.prototype.already = function(rule, prefixeds, prefix) {
- var before, index, key, prefixed, some;
- index = rule.parent.index(rule) - 1;
- while (index >= 0) {
- before = rule.parent.rules[index];
- if (before.type !== 'rule') {
- return false;
- }
- some = false;
- for (key in prefixeds) {
- prefixed = prefixeds[key];
- if (before.selector === prefixed) {
- if (prefix === key) {
- return true;
- } else {
- some = true;
- break;
- }
- }
- }
- if (!some) {
- return false;
- }
- index -= 1;
- }
- return false;
- };
-
- Selector.prototype.replace = function(selector, prefix) {
- return selector.replace(this.regexp(), '$1' + this.prefixed(prefix));
- };
-
- Selector.prototype.add = function(rule, prefix) {
- var cloned, prefixeds;
- prefixeds = this.prefixeds(rule);
- if (this.already(rule, prefixeds, prefix)) {
- return;
- }
- cloned = this.clone(rule, {
- selector: prefixeds[prefix]
- });
- return rule.parent.insertBefore(rule, cloned);
- };
-
- Selector.prototype.old = function(prefix) {
- return new OldSelector(this, prefix);
- };
-
- return Selector;
-
- })(Prefixer);
-
- module.exports = Selector;
-
-}).call(this);
-
-},{"./browsers":4,"./old-selector":35,"./prefixer":37,"./utils":42}],41:[function(require,module,exports){
-(function() {
- var Prefixes, Supports, Value, findCondition, findDecl, list, postcss, split, utils;
-
- Prefixes = require('./prefixes');
-
- Value = require('./value');
-
- utils = require('./utils');
-
- postcss = require('postcss');
-
- list = require('postcss/lib/list');
-
- split = /\(\s*([^\(\):]+)\s*:([^\)]+)/;
-
- findDecl = /\(\s*([^\(\):]+)\s*:\s*([^\)]+)\s*\)/g;
-
- findCondition = /(not\s*)?\(\s*([^\(\):]+)\s*:\s*([^\)]+)\s*\)\s*or\s*/gi;
-
- Supports = (function() {
- function Supports(all) {
- this.all = all;
- }
-
- Supports.prototype.virtual = function(prop, value) {
- var rule;
- rule = postcss.parse('a{}').first;
- rule.append({
- prop: prop,
- value: value,
- before: ''
- });
- return rule;
- };
-
- Supports.prototype.prefixed = function(prop, value) {
- var decl, prefixer, rule, _i, _j, _len, _len1, _ref, _ref1;
- rule = this.virtual(prop, value);
- prefixer = this.all.add[prop];
- if (prefixer != null) {
- if (typeof prefixer.process === "function") {
- prefixer.process(rule.first);
- }
- }
- _ref = rule.decls;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- decl = _ref[_i];
- _ref1 = this.all.values('add', prop);
- for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
- value = _ref1[_j];
- value.process(decl);
- }
- Value.save(this.all, decl);
- }
- return rule.decls;
- };
-
- Supports.prototype.clean = function(params) {
- return params.replace(findCondition, (function(_this) {
- return function(all) {
- var check, checker, prop, unprefixed, value, _, _i, _len, _ref, _ref1, _ref2;
- if (all.slice(0, 3).toLowerCase() === 'not') {
- return all;
- }
- _ref = all.match(split), _ = _ref[0], prop = _ref[1], value = _ref[2];
- unprefixed = _this.all.unprefixed(prop);
- if ((_ref1 = _this.all.cleaner().remove[prop]) != null ? _ref1.remove : void 0) {
- check = new RegExp('(\\(|\\s)' + utils.escapeRegexp(unprefixed) + ':');
- if (check.test(params)) {
- return '';
- }
- }
- _ref2 = _this.all.cleaner().values('remove', unprefixed);
- for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
- checker = _ref2[_i];
- if (checker.check(value)) {
- return '';
- }
- }
- return all;
- };
- })(this)).replace(/\(\s*\((.*)\)\s*\)/g, '($1)');
- };
-
- Supports.prototype.process = function(rule) {
- rule.params = this.clean(rule.params);
- return rule.params = rule.params.replace(findDecl, (function(_this) {
- return function(all, prop, value) {
- var i, stringed;
- stringed = (function() {
- var _i, _len, _ref, _results;
- _ref = this.prefixed(prop, value);
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- i = _ref[_i];
- _results.push("(" + i.prop + ": " + i.value + ")");
- }
- return _results;
- }).call(_this);
- if (stringed.length === 1) {
- return stringed[0];
- } else {
- return '(' + stringed.join(' or ') + ')';
- }
- };
- })(this));
- };
-
- return Supports;
-
- })();
-
- module.exports = Supports;
-
-}).call(this);
-
-},{"./prefixes":38,"./utils":42,"./value":43,"postcss":89,"postcss/lib/list":85}],42:[function(require,module,exports){
-(function() {
- module.exports = {
- error: function(text) {
- var err;
- err = new Error(text);
- err.autoprefixer = true;
- throw err;
- },
- uniq: function(array) {
- var filtered, i, _i, _len;
- filtered = [];
- for (_i = 0, _len = array.length; _i < _len; _i++) {
- i = array[_i];
- if (filtered.indexOf(i) === -1) {
- filtered.push(i);
- }
- }
- return filtered;
- },
- removeNote: function(string) {
- if (string.indexOf(' ') === -1) {
- return string;
- } else {
- return string.split(' ')[0];
- }
- },
- escapeRegexp: function(string) {
- return string.replace(/[.?*+\^\$\[\]\\(){}|\-]/g, '\\$&');
- },
- regexp: function(word, escape) {
- if (escape == null) {
- escape = true;
- }
- if (escape) {
- word = this.escapeRegexp(word);
- }
- return RegExp("(^|[\\s,(])(" + word + "($|[\\s(,]))", "gi");
- }
- };
-
-}).call(this);
-
-},{}],43:[function(require,module,exports){
-(function() {
- var OldValue, Prefixer, Value, utils, vendor,
- __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- Prefixer = require('./prefixer');
-
- OldValue = require('./old-value');
-
- utils = require('./utils');
-
- vendor = require('postcss/lib/vendor');
-
- Value = (function(_super) {
- __extends(Value, _super);
-
- function Value() {
- return Value.__super__.constructor.apply(this, arguments);
- }
-
- Value.save = function(prefixes, decl) {
- var already, cloned, prefix, prefixed, propPrefix, rule, trimmed, value, _ref, _results;
- _ref = decl._autoprefixerValues;
- _results = [];
- for (prefix in _ref) {
- value = _ref[prefix];
- if (value === decl.value) {
- continue;
- }
- propPrefix = vendor.prefix(decl.prop);
- if (propPrefix === prefix) {
- _results.push(decl.value = value);
- } else if (propPrefix === '-pie-') {
- continue;
- } else {
- prefixed = prefixes.prefixed(decl.prop, prefix);
- rule = decl.parent;
- if (rule.every(function(i) {
- return i.prop !== prefixed;
- })) {
- trimmed = value.replace(/\s+/, ' ');
- already = rule.some(function(i) {
- return i.prop === decl.prop && i.value.replace(/\s+/, ' ') === trimmed;
- });
- if (!already) {
- cloned = this.clone(decl, {
- value: value
- });
- _results.push(decl.parent.insertBefore(decl, cloned));
- } else {
- _results.push(void 0);
- }
- } else {
- _results.push(void 0);
- }
- }
- }
- return _results;
- };
-
- Value.prototype.check = function(decl) {
- var value;
- value = decl.value;
- if (value.indexOf(this.name) !== -1) {
- return !!value.match(this.regexp());
- } else {
- return false;
- }
- };
-
- Value.prototype.regexp = function() {
- return this.regexpCache || (this.regexpCache = utils.regexp(this.name));
- };
-
- Value.prototype.replace = function(string, prefix) {
- return string.replace(this.regexp(), '$1' + prefix + '$2');
- };
-
- Value.prototype.add = function(decl, prefix) {
- var value, _ref;
- decl._autoprefixerValues || (decl._autoprefixerValues = {});
- value = decl._autoprefixerValues[prefix] || ((_ref = decl._value) != null ? _ref.raw : void 0) || decl.value;
- value = this.replace(value, prefix);
- if (value) {
- return decl._autoprefixerValues[prefix] = value;
- }
- };
-
- Value.prototype.old = function(prefix) {
- return new OldValue(prefix + this.name);
- };
-
- return Value;
-
- })(Prefixer);
-
- module.exports = Value;
-
-}).call(this);
-
-},{"./old-value":36,"./prefixer":37,"./utils":42,"postcss/lib/vendor":94}],44:[function(require,module,exports){
-
-},{}],45:[function(require,module,exports){
-/*!
- * The buffer module from node.js, for the browser.
- *
- * @author Feross Aboukhadijeh
- * @license MIT
- */
-
-var base64 = require('base64-js')
-var ieee754 = require('ieee754')
-var isArray = require('is-array')
-
-exports.Buffer = Buffer
-exports.SlowBuffer = Buffer
-exports.INSPECT_MAX_BYTES = 50
-Buffer.poolSize = 8192 // not used by this implementation
-
-var kMaxLength = 0x3fffffff
-
-/**
- * If `Buffer.TYPED_ARRAY_SUPPORT`:
- * === true Use Uint8Array implementation (fastest)
- * === false Use Object implementation (most compatible, even IE6)
- *
- * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
- * Opera 11.6+, iOS 4.2+.
- *
- * Note:
- *
- * - Implementation must support adding new properties to `Uint8Array` instances.
- * Firefox 4-29 lacked support, fixed in Firefox 30+.
- * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
- *
- * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
- *
- * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
- * incorrect length in some situations.
- *
- * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they will
- * get the Object implementation, which is slower but will work correctly.
- */
-Buffer.TYPED_ARRAY_SUPPORT = (function () {
- try {
- var buf = new ArrayBuffer(0)
- var arr = new Uint8Array(buf)
- arr.foo = function () { return 42 }
- return 42 === arr.foo() && // typed array instances can be augmented
- typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
- new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
- } catch (e) {
- return false
- }
-})()
-
-/**
- * Class: Buffer
- * =============
- *
- * The Buffer constructor returns instances of `Uint8Array` that are augmented
- * with function properties for all the node `Buffer` API functions. We use
- * `Uint8Array` so that square bracket notation works as expected -- it returns
- * a single octet.
- *
- * By augmenting the instances, we can avoid modifying the `Uint8Array`
- * prototype.
- */
-function Buffer (subject, encoding, noZero) {
- if (!(this instanceof Buffer))
- return new Buffer(subject, encoding, noZero)
-
- var type = typeof subject
-
- // Find the length
- var length
- if (type === 'number')
- length = subject > 0 ? subject >>> 0 : 0
- else if (type === 'string') {
- if (encoding === 'base64')
- subject = base64clean(subject)
- length = Buffer.byteLength(subject, encoding)
- } else if (type === 'object' && subject !== null) { // assume object is array-like
- if (subject.type === 'Buffer' && isArray(subject.data))
- subject = subject.data
- length = +subject.length > 0 ? Math.floor(+subject.length) : 0
- } else
- throw new TypeError('must start with number, buffer, array or string')
-
- if (this.length > kMaxLength)
- throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
- 'size: 0x' + kMaxLength.toString(16) + ' bytes')
-
- var buf
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- // Preferred: Return an augmented `Uint8Array` instance for best performance
- buf = Buffer._augment(new Uint8Array(length))
- } else {
- // Fallback: Return THIS instance of Buffer (created by `new`)
- buf = this
- buf.length = length
- buf._isBuffer = true
- }
-
- var i
- if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {
- // Speed optimization -- use set if we're copying from a typed array
- buf._set(subject)
- } else if (isArrayish(subject)) {
- // Treat array-ish objects as a byte array
- if (Buffer.isBuffer(subject)) {
- for (i = 0; i < length; i++)
- buf[i] = subject.readUInt8(i)
- } else {
- for (i = 0; i < length; i++)
- buf[i] = ((subject[i] % 256) + 256) % 256
- }
- } else if (type === 'string') {
- buf.write(subject, 0, encoding)
- } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) {
- for (i = 0; i < length; i++) {
- buf[i] = 0
- }
- }
-
- return buf
-}
-
-Buffer.isBuffer = function (b) {
- return !!(b != null && b._isBuffer)
-}
-
-Buffer.compare = function (a, b) {
- if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b))
- throw new TypeError('Arguments must be Buffers')
-
- var x = a.length
- var y = b.length
- for (var i = 0, len = Math.min(x, y); i < len && a[i] === b[i]; i++) {}
- if (i !== len) {
- x = a[i]
- y = b[i]
- }
- if (x < y) return -1
- if (y < x) return 1
- return 0
-}
-
-Buffer.isEncoding = function (encoding) {
- switch (String(encoding).toLowerCase()) {
- case 'hex':
- case 'utf8':
- case 'utf-8':
- case 'ascii':
- case 'binary':
- case 'base64':
- case 'raw':
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return true
- default:
- return false
- }
-}
-
-Buffer.concat = function (list, totalLength) {
- if (!isArray(list)) throw new TypeError('Usage: Buffer.concat(list[, length])')
-
- if (list.length === 0) {
- return new Buffer(0)
- } else if (list.length === 1) {
- return list[0]
- }
-
- var i
- if (totalLength === undefined) {
- totalLength = 0
- for (i = 0; i < list.length; i++) {
- totalLength += list[i].length
- }
- }
-
- var buf = new Buffer(totalLength)
- var pos = 0
- for (i = 0; i < list.length; i++) {
- var item = list[i]
- item.copy(buf, pos)
- pos += item.length
- }
- return buf
-}
-
-Buffer.byteLength = function (str, encoding) {
- var ret
- str = str + ''
- switch (encoding || 'utf8') {
- case 'ascii':
- case 'binary':
- case 'raw':
- ret = str.length
- break
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- ret = str.length * 2
- break
- case 'hex':
- ret = str.length >>> 1
- break
- case 'utf8':
- case 'utf-8':
- ret = utf8ToBytes(str).length
- break
- case 'base64':
- ret = base64ToBytes(str).length
- break
- default:
- ret = str.length
- }
- return ret
-}
-
-// pre-set for values that may exist in the future
-Buffer.prototype.length = undefined
-Buffer.prototype.parent = undefined
-
-// toString(encoding, start=0, end=buffer.length)
-Buffer.prototype.toString = function (encoding, start, end) {
- var loweredCase = false
-
- start = start >>> 0
- end = end === undefined || end === Infinity ? this.length : end >>> 0
-
- if (!encoding) encoding = 'utf8'
- if (start < 0) start = 0
- if (end > this.length) end = this.length
- if (end <= start) return ''
-
- while (true) {
- switch (encoding) {
- case 'hex':
- return hexSlice(this, start, end)
-
- case 'utf8':
- case 'utf-8':
- return utf8Slice(this, start, end)
-
- case 'ascii':
- return asciiSlice(this, start, end)
-
- case 'binary':
- return binarySlice(this, start, end)
-
- case 'base64':
- return base64Slice(this, start, end)
-
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return utf16leSlice(this, start, end)
-
- default:
- if (loweredCase)
- throw new TypeError('Unknown encoding: ' + encoding)
- encoding = (encoding + '').toLowerCase()
- loweredCase = true
- }
- }
-}
-
-Buffer.prototype.equals = function (b) {
- if(!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
- return Buffer.compare(this, b) === 0
-}
-
-Buffer.prototype.inspect = function () {
- var str = ''
- var max = exports.INSPECT_MAX_BYTES
- if (this.length > 0) {
- str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
- if (this.length > max)
- str += ' ... '
- }
- return ''
-}
-
-Buffer.prototype.compare = function (b) {
- if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
- return Buffer.compare(this, b)
-}
-
-// `get` will be removed in Node 0.13+
-Buffer.prototype.get = function (offset) {
- console.log('.get() is deprecated. Access using array indexes instead.')
- return this.readUInt8(offset)
-}
-
-// `set` will be removed in Node 0.13+
-Buffer.prototype.set = function (v, offset) {
- console.log('.set() is deprecated. Access using array indexes instead.')
- return this.writeUInt8(v, offset)
-}
-
-function hexWrite (buf, string, offset, length) {
- offset = Number(offset) || 0
- var remaining = buf.length - offset
- if (!length) {
- length = remaining
- } else {
- length = Number(length)
- if (length > remaining) {
- length = remaining
- }
- }
-
- // must be an even number of digits
- var strLen = string.length
- if (strLen % 2 !== 0) throw new Error('Invalid hex string')
-
- if (length > strLen / 2) {
- length = strLen / 2
- }
- for (var i = 0; i < length; i++) {
- var byte = parseInt(string.substr(i * 2, 2), 16)
- if (isNaN(byte)) throw new Error('Invalid hex string')
- buf[offset + i] = byte
- }
- return i
-}
-
-function utf8Write (buf, string, offset, length) {
- var charsWritten = blitBuffer(utf8ToBytes(string), buf, offset, length)
- return charsWritten
-}
-
-function asciiWrite (buf, string, offset, length) {
- var charsWritten = blitBuffer(asciiToBytes(string), buf, offset, length)
- return charsWritten
-}
-
-function binaryWrite (buf, string, offset, length) {
- return asciiWrite(buf, string, offset, length)
-}
-
-function base64Write (buf, string, offset, length) {
- var charsWritten = blitBuffer(base64ToBytes(string), buf, offset, length)
- return charsWritten
-}
-
-function utf16leWrite (buf, string, offset, length) {
- var charsWritten = blitBuffer(utf16leToBytes(string), buf, offset, length)
- return charsWritten
-}
-
-Buffer.prototype.write = function (string, offset, length, encoding) {
- // Support both (string, offset, length, encoding)
- // and the legacy (string, encoding, offset, length)
- if (isFinite(offset)) {
- if (!isFinite(length)) {
- encoding = length
- length = undefined
- }
- } else { // legacy
- var swap = encoding
- encoding = offset
- offset = length
- length = swap
- }
-
- offset = Number(offset) || 0
- var remaining = this.length - offset
- if (!length) {
- length = remaining
- } else {
- length = Number(length)
- if (length > remaining) {
- length = remaining
- }
- }
- encoding = String(encoding || 'utf8').toLowerCase()
-
- var ret
- switch (encoding) {
- case 'hex':
- ret = hexWrite(this, string, offset, length)
- break
- case 'utf8':
- case 'utf-8':
- ret = utf8Write(this, string, offset, length)
- break
- case 'ascii':
- ret = asciiWrite(this, string, offset, length)
- break
- case 'binary':
- ret = binaryWrite(this, string, offset, length)
- break
- case 'base64':
- ret = base64Write(this, string, offset, length)
- break
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- ret = utf16leWrite(this, string, offset, length)
- break
- default:
- throw new TypeError('Unknown encoding: ' + encoding)
- }
- return ret
-}
-
-Buffer.prototype.toJSON = function () {
- return {
- type: 'Buffer',
- data: Array.prototype.slice.call(this._arr || this, 0)
- }
-}
-
-function base64Slice (buf, start, end) {
- if (start === 0 && end === buf.length) {
- return base64.fromByteArray(buf)
- } else {
- return base64.fromByteArray(buf.slice(start, end))
- }
-}
-
-function utf8Slice (buf, start, end) {
- var res = ''
- var tmp = ''
- end = Math.min(buf.length, end)
-
- for (var i = start; i < end; i++) {
- if (buf[i] <= 0x7F) {
- res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i])
- tmp = ''
- } else {
- tmp += '%' + buf[i].toString(16)
- }
- }
-
- return res + decodeUtf8Char(tmp)
-}
-
-function asciiSlice (buf, start, end) {
- var ret = ''
- end = Math.min(buf.length, end)
-
- for (var i = start; i < end; i++) {
- ret += String.fromCharCode(buf[i])
- }
- return ret
-}
-
-function binarySlice (buf, start, end) {
- return asciiSlice(buf, start, end)
-}
-
-function hexSlice (buf, start, end) {
- var len = buf.length
-
- if (!start || start < 0) start = 0
- if (!end || end < 0 || end > len) end = len
-
- var out = ''
- for (var i = start; i < end; i++) {
- out += toHex(buf[i])
- }
- return out
-}
-
-function utf16leSlice (buf, start, end) {
- var bytes = buf.slice(start, end)
- var res = ''
- for (var i = 0; i < bytes.length; i += 2) {
- res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
- }
- return res
-}
-
-Buffer.prototype.slice = function (start, end) {
- var len = this.length
- start = ~~start
- end = end === undefined ? len : ~~end
-
- if (start < 0) {
- start += len;
- if (start < 0)
- start = 0
- } else if (start > len) {
- start = len
- }
-
- if (end < 0) {
- end += len
- if (end < 0)
- end = 0
- } else if (end > len) {
- end = len
- }
-
- if (end < start)
- end = start
-
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- return Buffer._augment(this.subarray(start, end))
- } else {
- var sliceLen = end - start
- var newBuf = new Buffer(sliceLen, undefined, true)
- for (var i = 0; i < sliceLen; i++) {
- newBuf[i] = this[i + start]
- }
- return newBuf
- }
-}
-
-/*
- * Need to make sure that buffer isn't trying to write out of bounds.
- */
-function checkOffset (offset, ext, length) {
- if ((offset % 1) !== 0 || offset < 0)
- throw new RangeError('offset is not uint')
- if (offset + ext > length)
- throw new RangeError('Trying to access beyond buffer length')
-}
-
-Buffer.prototype.readUInt8 = function (offset, noAssert) {
- if (!noAssert)
- checkOffset(offset, 1, this.length)
- return this[offset]
-}
-
-Buffer.prototype.readUInt16LE = function (offset, noAssert) {
- if (!noAssert)
- checkOffset(offset, 2, this.length)
- return this[offset] | (this[offset + 1] << 8)
-}
-
-Buffer.prototype.readUInt16BE = function (offset, noAssert) {
- if (!noAssert)
- checkOffset(offset, 2, this.length)
- return (this[offset] << 8) | this[offset + 1]
-}
-
-Buffer.prototype.readUInt32LE = function (offset, noAssert) {
- if (!noAssert)
- checkOffset(offset, 4, this.length)
-
- return ((this[offset]) |
- (this[offset + 1] << 8) |
- (this[offset + 2] << 16)) +
- (this[offset + 3] * 0x1000000)
-}
-
-Buffer.prototype.readUInt32BE = function (offset, noAssert) {
- if (!noAssert)
- checkOffset(offset, 4, this.length)
-
- return (this[offset] * 0x1000000) +
- ((this[offset + 1] << 16) |
- (this[offset + 2] << 8) |
- this[offset + 3])
-}
-
-Buffer.prototype.readInt8 = function (offset, noAssert) {
- if (!noAssert)
- checkOffset(offset, 1, this.length)
- if (!(this[offset] & 0x80))
- return (this[offset])
- return ((0xff - this[offset] + 1) * -1)
-}
-
-Buffer.prototype.readInt16LE = function (offset, noAssert) {
- if (!noAssert)
- checkOffset(offset, 2, this.length)
- var val = this[offset] | (this[offset + 1] << 8)
- return (val & 0x8000) ? val | 0xFFFF0000 : val
-}
-
-Buffer.prototype.readInt16BE = function (offset, noAssert) {
- if (!noAssert)
- checkOffset(offset, 2, this.length)
- var val = this[offset + 1] | (this[offset] << 8)
- return (val & 0x8000) ? val | 0xFFFF0000 : val
-}
-
-Buffer.prototype.readInt32LE = function (offset, noAssert) {
- if (!noAssert)
- checkOffset(offset, 4, this.length)
-
- return (this[offset]) |
- (this[offset + 1] << 8) |
- (this[offset + 2] << 16) |
- (this[offset + 3] << 24)
-}
-
-Buffer.prototype.readInt32BE = function (offset, noAssert) {
- if (!noAssert)
- checkOffset(offset, 4, this.length)
-
- return (this[offset] << 24) |
- (this[offset + 1] << 16) |
- (this[offset + 2] << 8) |
- (this[offset + 3])
-}
-
-Buffer.prototype.readFloatLE = function (offset, noAssert) {
- if (!noAssert)
- checkOffset(offset, 4, this.length)
- return ieee754.read(this, offset, true, 23, 4)
-}
-
-Buffer.prototype.readFloatBE = function (offset, noAssert) {
- if (!noAssert)
- checkOffset(offset, 4, this.length)
- return ieee754.read(this, offset, false, 23, 4)
-}
-
-Buffer.prototype.readDoubleLE = function (offset, noAssert) {
- if (!noAssert)
- checkOffset(offset, 8, this.length)
- return ieee754.read(this, offset, true, 52, 8)
-}
-
-Buffer.prototype.readDoubleBE = function (offset, noAssert) {
- if (!noAssert)
- checkOffset(offset, 8, this.length)
- return ieee754.read(this, offset, false, 52, 8)
-}
-
-function checkInt (buf, value, offset, ext, max, min) {
- if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance')
- if (value > max || value < min) throw new TypeError('value is out of bounds')
- if (offset + ext > buf.length) throw new TypeError('index out of range')
-}
-
-Buffer.prototype.writeUInt8 = function (value, offset, noAssert) {
- value = +value
- offset = offset >>> 0
- if (!noAssert)
- checkInt(this, value, offset, 1, 0xff, 0)
- if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
- this[offset] = value
- return offset + 1
-}
-
-function objectWriteUInt16 (buf, value, offset, littleEndian) {
- if (value < 0) value = 0xffff + value + 1
- for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) {
- buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
- (littleEndian ? i : 1 - i) * 8
- }
-}
-
-Buffer.prototype.writeUInt16LE = function (value, offset, noAssert) {
- value = +value
- offset = offset >>> 0
- if (!noAssert)
- checkInt(this, value, offset, 2, 0xffff, 0)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = value
- this[offset + 1] = (value >>> 8)
- } else objectWriteUInt16(this, value, offset, true)
- return offset + 2
-}
-
-Buffer.prototype.writeUInt16BE = function (value, offset, noAssert) {
- value = +value
- offset = offset >>> 0
- if (!noAssert)
- checkInt(this, value, offset, 2, 0xffff, 0)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value >>> 8)
- this[offset + 1] = value
- } else objectWriteUInt16(this, value, offset, false)
- return offset + 2
-}
-
-function objectWriteUInt32 (buf, value, offset, littleEndian) {
- if (value < 0) value = 0xffffffff + value + 1
- for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) {
- buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
- }
-}
-
-Buffer.prototype.writeUInt32LE = function (value, offset, noAssert) {
- value = +value
- offset = offset >>> 0
- if (!noAssert)
- checkInt(this, value, offset, 4, 0xffffffff, 0)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset + 3] = (value >>> 24)
- this[offset + 2] = (value >>> 16)
- this[offset + 1] = (value >>> 8)
- this[offset] = value
- } else objectWriteUInt32(this, value, offset, true)
- return offset + 4
-}
-
-Buffer.prototype.writeUInt32BE = function (value, offset, noAssert) {
- value = +value
- offset = offset >>> 0
- if (!noAssert)
- checkInt(this, value, offset, 4, 0xffffffff, 0)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value >>> 24)
- this[offset + 1] = (value >>> 16)
- this[offset + 2] = (value >>> 8)
- this[offset + 3] = value
- } else objectWriteUInt32(this, value, offset, false)
- return offset + 4
-}
-
-Buffer.prototype.writeInt8 = function (value, offset, noAssert) {
- value = +value
- offset = offset >>> 0
- if (!noAssert)
- checkInt(this, value, offset, 1, 0x7f, -0x80)
- if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
- if (value < 0) value = 0xff + value + 1
- this[offset] = value
- return offset + 1
-}
-
-Buffer.prototype.writeInt16LE = function (value, offset, noAssert) {
- value = +value
- offset = offset >>> 0
- if (!noAssert)
- checkInt(this, value, offset, 2, 0x7fff, -0x8000)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = value
- this[offset + 1] = (value >>> 8)
- } else objectWriteUInt16(this, value, offset, true)
- return offset + 2
-}
-
-Buffer.prototype.writeInt16BE = function (value, offset, noAssert) {
- value = +value
- offset = offset >>> 0
- if (!noAssert)
- checkInt(this, value, offset, 2, 0x7fff, -0x8000)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value >>> 8)
- this[offset + 1] = value
- } else objectWriteUInt16(this, value, offset, false)
- return offset + 2
-}
-
-Buffer.prototype.writeInt32LE = function (value, offset, noAssert) {
- value = +value
- offset = offset >>> 0
- if (!noAssert)
- checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = value
- this[offset + 1] = (value >>> 8)
- this[offset + 2] = (value >>> 16)
- this[offset + 3] = (value >>> 24)
- } else objectWriteUInt32(this, value, offset, true)
- return offset + 4
-}
-
-Buffer.prototype.writeInt32BE = function (value, offset, noAssert) {
- value = +value
- offset = offset >>> 0
- if (!noAssert)
- checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
- if (value < 0) value = 0xffffffff + value + 1
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value >>> 24)
- this[offset + 1] = (value >>> 16)
- this[offset + 2] = (value >>> 8)
- this[offset + 3] = value
- } else objectWriteUInt32(this, value, offset, false)
- return offset + 4
-}
-
-function checkIEEE754 (buf, value, offset, ext, max, min) {
- if (value > max || value < min) throw new TypeError('value is out of bounds')
- if (offset + ext > buf.length) throw new TypeError('index out of range')
-}
-
-function writeFloat (buf, value, offset, littleEndian, noAssert) {
- if (!noAssert)
- checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
- ieee754.write(buf, value, offset, littleEndian, 23, 4)
- return offset + 4
-}
-
-Buffer.prototype.writeFloatLE = function (value, offset, noAssert) {
- return writeFloat(this, value, offset, true, noAssert)
-}
-
-Buffer.prototype.writeFloatBE = function (value, offset, noAssert) {
- return writeFloat(this, value, offset, false, noAssert)
-}
-
-function writeDouble (buf, value, offset, littleEndian, noAssert) {
- if (!noAssert)
- checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
- ieee754.write(buf, value, offset, littleEndian, 52, 8)
- return offset + 8
-}
-
-Buffer.prototype.writeDoubleLE = function (value, offset, noAssert) {
- return writeDouble(this, value, offset, true, noAssert)
-}
-
-Buffer.prototype.writeDoubleBE = function (value, offset, noAssert) {
- return writeDouble(this, value, offset, false, noAssert)
-}
-
-// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
-Buffer.prototype.copy = function (target, target_start, start, end) {
- var source = this
-
- if (!start) start = 0
- if (!end && end !== 0) end = this.length
- if (!target_start) target_start = 0
-
- // Copy 0 bytes; we're done
- if (end === start) return
- if (target.length === 0 || source.length === 0) return
-
- // Fatal error conditions
- if (end < start) throw new TypeError('sourceEnd < sourceStart')
- if (target_start < 0 || target_start >= target.length)
- throw new TypeError('targetStart out of bounds')
- if (start < 0 || start >= source.length) throw new TypeError('sourceStart out of bounds')
- if (end < 0 || end > source.length) throw new TypeError('sourceEnd out of bounds')
-
- // Are we oob?
- if (end > this.length)
- end = this.length
- if (target.length - target_start < end - start)
- end = target.length - target_start + start
-
- var len = end - start
-
- if (len < 100 || !Buffer.TYPED_ARRAY_SUPPORT) {
- for (var i = 0; i < len; i++) {
- target[i + target_start] = this[i + start]
- }
- } else {
- target._set(this.subarray(start, start + len), target_start)
- }
-}
-
-// fill(value, start=0, end=buffer.length)
-Buffer.prototype.fill = function (value, start, end) {
- if (!value) value = 0
- if (!start) start = 0
- if (!end) end = this.length
-
- if (end < start) throw new TypeError('end < start')
-
- // Fill 0 bytes; we're done
- if (end === start) return
- if (this.length === 0) return
-
- if (start < 0 || start >= this.length) throw new TypeError('start out of bounds')
- if (end < 0 || end > this.length) throw new TypeError('end out of bounds')
-
- var i
- if (typeof value === 'number') {
- for (i = start; i < end; i++) {
- this[i] = value
- }
- } else {
- var bytes = utf8ToBytes(value.toString())
- var len = bytes.length
- for (i = start; i < end; i++) {
- this[i] = bytes[i % len]
- }
- }
-
- return this
-}
-
-/**
- * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance.
- * Added in Node 0.12. Only available in browsers that support ArrayBuffer.
- */
-Buffer.prototype.toArrayBuffer = function () {
- if (typeof Uint8Array !== 'undefined') {
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- return (new Buffer(this)).buffer
- } else {
- var buf = new Uint8Array(this.length)
- for (var i = 0, len = buf.length; i < len; i += 1) {
- buf[i] = this[i]
- }
- return buf.buffer
- }
- } else {
- throw new TypeError('Buffer.toArrayBuffer not supported in this browser')
- }
-}
-
-// HELPER FUNCTIONS
-// ================
-
-var BP = Buffer.prototype
-
-/**
- * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
- */
-Buffer._augment = function (arr) {
- arr._isBuffer = true
-
- // save reference to original Uint8Array get/set methods before overwriting
- arr._get = arr.get
- arr._set = arr.set
-
- // deprecated, will be removed in node 0.13+
- arr.get = BP.get
- arr.set = BP.set
-
- arr.write = BP.write
- arr.toString = BP.toString
- arr.toLocaleString = BP.toString
- arr.toJSON = BP.toJSON
- arr.equals = BP.equals
- arr.compare = BP.compare
- arr.copy = BP.copy
- arr.slice = BP.slice
- arr.readUInt8 = BP.readUInt8
- arr.readUInt16LE = BP.readUInt16LE
- arr.readUInt16BE = BP.readUInt16BE
- arr.readUInt32LE = BP.readUInt32LE
- arr.readUInt32BE = BP.readUInt32BE
- arr.readInt8 = BP.readInt8
- arr.readInt16LE = BP.readInt16LE
- arr.readInt16BE = BP.readInt16BE
- arr.readInt32LE = BP.readInt32LE
- arr.readInt32BE = BP.readInt32BE
- arr.readFloatLE = BP.readFloatLE
- arr.readFloatBE = BP.readFloatBE
- arr.readDoubleLE = BP.readDoubleLE
- arr.readDoubleBE = BP.readDoubleBE
- arr.writeUInt8 = BP.writeUInt8
- arr.writeUInt16LE = BP.writeUInt16LE
- arr.writeUInt16BE = BP.writeUInt16BE
- arr.writeUInt32LE = BP.writeUInt32LE
- arr.writeUInt32BE = BP.writeUInt32BE
- arr.writeInt8 = BP.writeInt8
- arr.writeInt16LE = BP.writeInt16LE
- arr.writeInt16BE = BP.writeInt16BE
- arr.writeInt32LE = BP.writeInt32LE
- arr.writeInt32BE = BP.writeInt32BE
- arr.writeFloatLE = BP.writeFloatLE
- arr.writeFloatBE = BP.writeFloatBE
- arr.writeDoubleLE = BP.writeDoubleLE
- arr.writeDoubleBE = BP.writeDoubleBE
- arr.fill = BP.fill
- arr.inspect = BP.inspect
- arr.toArrayBuffer = BP.toArrayBuffer
-
- return arr
-}
-
-var INVALID_BASE64_RE = /[^+\/0-9A-z]/g
-
-function base64clean (str) {
- // Node strips out invalid characters like \n and \t from the string, base64-js does not
- str = stringtrim(str).replace(INVALID_BASE64_RE, '')
- // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
- while (str.length % 4 !== 0) {
- str = str + '='
- }
- return str
-}
-
-function stringtrim (str) {
- if (str.trim) return str.trim()
- return str.replace(/^\s+|\s+$/g, '')
-}
-
-function isArrayish (subject) {
- return isArray(subject) || Buffer.isBuffer(subject) ||
- subject && typeof subject === 'object' &&
- typeof subject.length === 'number'
-}
-
-function toHex (n) {
- if (n < 16) return '0' + n.toString(16)
- return n.toString(16)
-}
-
-function utf8ToBytes (str) {
- var byteArray = []
- for (var i = 0; i < str.length; i++) {
- var b = str.charCodeAt(i)
- if (b <= 0x7F) {
- byteArray.push(b)
- } else {
- var start = i
- if (b >= 0xD800 && b <= 0xDFFF) i++
- var h = encodeURIComponent(str.slice(start, i+1)).substr(1).split('%')
- for (var j = 0; j < h.length; j++) {
- byteArray.push(parseInt(h[j], 16))
- }
- }
- }
- return byteArray
-}
-
-function asciiToBytes (str) {
- var byteArray = []
- for (var i = 0; i < str.length; i++) {
- // Node's code seems to be doing this and not & 0x7F..
- byteArray.push(str.charCodeAt(i) & 0xFF)
- }
- return byteArray
-}
-
-function utf16leToBytes (str) {
- var c, hi, lo
- var byteArray = []
- for (var i = 0; i < str.length; i++) {
- c = str.charCodeAt(i)
- hi = c >> 8
- lo = c % 256
- byteArray.push(lo)
- byteArray.push(hi)
- }
-
- return byteArray
-}
-
-function base64ToBytes (str) {
- return base64.toByteArray(str)
-}
-
-function blitBuffer (src, dst, offset, length) {
- for (var i = 0; i < length; i++) {
- if ((i + offset >= dst.length) || (i >= src.length))
- break
- dst[i + offset] = src[i]
- }
- return i
-}
-
-function decodeUtf8Char (str) {
- try {
- return decodeURIComponent(str)
- } catch (err) {
- return String.fromCharCode(0xFFFD) // UTF 8 invalid char
- }
-}
-
-},{"base64-js":46,"ieee754":47,"is-array":48}],46:[function(require,module,exports){
-var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
-
-;(function (exports) {
- 'use strict';
-
- var Arr = (typeof Uint8Array !== 'undefined')
- ? Uint8Array
- : Array
-
- var PLUS = '+'.charCodeAt(0)
- var SLASH = '/'.charCodeAt(0)
- var NUMBER = '0'.charCodeAt(0)
- var LOWER = 'a'.charCodeAt(0)
- var UPPER = 'A'.charCodeAt(0)
-
- function decode (elt) {
- var code = elt.charCodeAt(0)
- if (code === PLUS)
- return 62 // '+'
- if (code === SLASH)
- return 63 // '/'
- if (code < NUMBER)
- return -1 //no match
- if (code < NUMBER + 10)
- return code - NUMBER + 26 + 26
- if (code < UPPER + 26)
- return code - UPPER
- if (code < LOWER + 26)
- return code - LOWER + 26
- }
-
- function b64ToByteArray (b64) {
- var i, j, l, tmp, placeHolders, arr
-
- if (b64.length % 4 > 0) {
- throw new Error('Invalid string. Length must be a multiple of 4')
- }
-
- // the number of equal signs (place holders)
- // if there are two placeholders, than the two characters before it
- // represent one byte
- // if there is only one, then the three characters before it represent 2 bytes
- // this is just a cheap hack to not do indexOf twice
- var len = b64.length
- placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0
-
- // base64 is 4/3 + up to two characters of the original data
- arr = new Arr(b64.length * 3 / 4 - placeHolders)
-
- // if there are placeholders, only get up to the last complete 4 chars
- l = placeHolders > 0 ? b64.length - 4 : b64.length
-
- var L = 0
-
- function push (v) {
- arr[L++] = v
- }
-
- for (i = 0, j = 0; i < l; i += 4, j += 3) {
- tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3))
- push((tmp & 0xFF0000) >> 16)
- push((tmp & 0xFF00) >> 8)
- push(tmp & 0xFF)
- }
-
- if (placeHolders === 2) {
- tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4)
- push(tmp & 0xFF)
- } else if (placeHolders === 1) {
- tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2)
- push((tmp >> 8) & 0xFF)
- push(tmp & 0xFF)
- }
-
- return arr
- }
-
- function uint8ToBase64 (uint8) {
- var i,
- extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes
- output = "",
- temp, length
-
- function encode (num) {
- return lookup.charAt(num)
- }
-
- function tripletToBase64 (num) {
- return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F)
- }
-
- // go through the array every three bytes, we'll deal with trailing stuff later
- for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) {
- temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
- output += tripletToBase64(temp)
- }
-
- // pad the end with zeros, but make sure to not forget the extra bytes
- switch (extraBytes) {
- case 1:
- temp = uint8[uint8.length - 1]
- output += encode(temp >> 2)
- output += encode((temp << 4) & 0x3F)
- output += '=='
- break
- case 2:
- temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1])
- output += encode(temp >> 10)
- output += encode((temp >> 4) & 0x3F)
- output += encode((temp << 2) & 0x3F)
- output += '='
- break
- }
-
- return output
- }
-
- exports.toByteArray = b64ToByteArray
- exports.fromByteArray = uint8ToBase64
-}(typeof exports === 'undefined' ? (this.base64js = {}) : exports))
-
-},{}],47:[function(require,module,exports){
-exports.read = function(buffer, offset, isLE, mLen, nBytes) {
- var e, m,
- eLen = nBytes * 8 - mLen - 1,
- eMax = (1 << eLen) - 1,
- eBias = eMax >> 1,
- nBits = -7,
- i = isLE ? (nBytes - 1) : 0,
- d = isLE ? -1 : 1,
- s = buffer[offset + i];
-
- i += d;
-
- e = s & ((1 << (-nBits)) - 1);
- s >>= (-nBits);
- nBits += eLen;
- for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8);
-
- m = e & ((1 << (-nBits)) - 1);
- e >>= (-nBits);
- nBits += mLen;
- for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8);
-
- if (e === 0) {
- e = 1 - eBias;
- } else if (e === eMax) {
- return m ? NaN : ((s ? -1 : 1) * Infinity);
- } else {
- m = m + Math.pow(2, mLen);
- e = e - eBias;
- }
- return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
-};
-
-exports.write = function(buffer, value, offset, isLE, mLen, nBytes) {
- var e, m, c,
- eLen = nBytes * 8 - mLen - 1,
- eMax = (1 << eLen) - 1,
- eBias = eMax >> 1,
- rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0),
- i = isLE ? 0 : (nBytes - 1),
- d = isLE ? 1 : -1,
- s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;
-
- value = Math.abs(value);
-
- if (isNaN(value) || value === Infinity) {
- m = isNaN(value) ? 1 : 0;
- e = eMax;
- } else {
- e = Math.floor(Math.log(value) / Math.LN2);
- if (value * (c = Math.pow(2, -e)) < 1) {
- e--;
- c *= 2;
- }
- if (e + eBias >= 1) {
- value += rt / c;
- } else {
- value += rt * Math.pow(2, 1 - eBias);
- }
- if (value * c >= 2) {
- e++;
- c /= 2;
- }
-
- if (e + eBias >= eMax) {
- m = 0;
- e = eMax;
- } else if (e + eBias >= 1) {
- m = (value * c - 1) * Math.pow(2, mLen);
- e = e + eBias;
- } else {
- m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
- e = 0;
- }
- }
-
- for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8);
-
- e = (e << mLen) | m;
- eLen += mLen;
- for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8);
-
- buffer[offset + i - d] |= s * 128;
-};
-
-},{}],48:[function(require,module,exports){
-
-/**
- * isArray
- */
-
-var isArray = Array.isArray;
-
-/**
- * toString
- */
-
-var str = Object.prototype.toString;
-
-/**
- * Whether or not the given `val`
- * is an array.
- *
- * example:
- *
- * isArray([]);
- * // > true
- * isArray(arguments);
- * // > false
- * isArray('');
- * // > false
- *
- * @param {mixed} val
- * @return {bool}
- */
-
-module.exports = isArray || function (val) {
- return !! val && '[object Array]' == str.call(val);
-};
-
-},{}],49:[function(require,module,exports){
-(function (process){
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// resolves . and .. elements in a path array with directory names there
-// must be no slashes, empty elements, or device names (c:\) in the array
-// (so also no leading and trailing slashes - it does not distinguish
-// relative and absolute paths)
-function normalizeArray(parts, allowAboveRoot) {
- // if the path tries to go above the root, `up` ends up > 0
- var up = 0;
- for (var i = parts.length - 1; i >= 0; i--) {
- var last = parts[i];
- if (last === '.') {
- parts.splice(i, 1);
- } else if (last === '..') {
- parts.splice(i, 1);
- up++;
- } else if (up) {
- parts.splice(i, 1);
- up--;
- }
- }
-
- // if the path is allowed to go above the root, restore leading ..s
- if (allowAboveRoot) {
- for (; up--; up) {
- parts.unshift('..');
- }
- }
-
- return parts;
-}
-
-// Split a filename into [root, dir, basename, ext], unix version
-// 'root' is just a slash, or nothing.
-var splitPathRe =
- /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
-var splitPath = function(filename) {
- return splitPathRe.exec(filename).slice(1);
-};
-
-// path.resolve([from ...], to)
-// posix version
-exports.resolve = function() {
- var resolvedPath = '',
- resolvedAbsolute = false;
-
- for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
- var path = (i >= 0) ? arguments[i] : process.cwd();
-
- // Skip empty and invalid entries
- if (typeof path !== 'string') {
- throw new TypeError('Arguments to path.resolve must be strings');
- } else if (!path) {
- continue;
- }
-
- resolvedPath = path + '/' + resolvedPath;
- resolvedAbsolute = path.charAt(0) === '/';
- }
-
- // At this point the path should be resolved to a full absolute path, but
- // handle relative paths to be safe (might happen when process.cwd() fails)
-
- // Normalize the path
- resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
- return !!p;
- }), !resolvedAbsolute).join('/');
-
- return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
-};
-
-// path.normalize(path)
-// posix version
-exports.normalize = function(path) {
- var isAbsolute = exports.isAbsolute(path),
- trailingSlash = substr(path, -1) === '/';
-
- // Normalize the path
- path = normalizeArray(filter(path.split('/'), function(p) {
- return !!p;
- }), !isAbsolute).join('/');
-
- if (!path && !isAbsolute) {
- path = '.';
- }
- if (path && trailingSlash) {
- path += '/';
- }
-
- return (isAbsolute ? '/' : '') + path;
-};
-
-// posix version
-exports.isAbsolute = function(path) {
- return path.charAt(0) === '/';
-};
-
-// posix version
-exports.join = function() {
- var paths = Array.prototype.slice.call(arguments, 0);
- return exports.normalize(filter(paths, function(p, index) {
- if (typeof p !== 'string') {
- throw new TypeError('Arguments to path.join must be strings');
- }
- return p;
- }).join('/'));
-};
-
-
-// path.relative(from, to)
-// posix version
-exports.relative = function(from, to) {
- from = exports.resolve(from).substr(1);
- to = exports.resolve(to).substr(1);
-
- function trim(arr) {
- var start = 0;
- for (; start < arr.length; start++) {
- if (arr[start] !== '') break;
- }
-
- var end = arr.length - 1;
- for (; end >= 0; end--) {
- if (arr[end] !== '') break;
- }
-
- if (start > end) return [];
- return arr.slice(start, end - start + 1);
- }
-
- var fromParts = trim(from.split('/'));
- var toParts = trim(to.split('/'));
-
- var length = Math.min(fromParts.length, toParts.length);
- var samePartsLength = length;
- for (var i = 0; i < length; i++) {
- if (fromParts[i] !== toParts[i]) {
- samePartsLength = i;
- break;
- }
- }
-
- var outputParts = [];
- for (var i = samePartsLength; i < fromParts.length; i++) {
- outputParts.push('..');
- }
-
- outputParts = outputParts.concat(toParts.slice(samePartsLength));
-
- return outputParts.join('/');
-};
-
-exports.sep = '/';
-exports.delimiter = ':';
-
-exports.dirname = function(path) {
- var result = splitPath(path),
- root = result[0],
- dir = result[1];
-
- if (!root && !dir) {
- // No dirname whatsoever
- return '.';
- }
-
- if (dir) {
- // It has a dirname, strip trailing slash
- dir = dir.substr(0, dir.length - 1);
- }
-
- return root + dir;
-};
-
-
-exports.basename = function(path, ext) {
- var f = splitPath(path)[2];
- // TODO: make this comparison case-insensitive on windows?
- if (ext && f.substr(-1 * ext.length) === ext) {
- f = f.substr(0, f.length - ext.length);
- }
- return f;
-};
-
-
-exports.extname = function(path) {
- return splitPath(path)[3];
-};
-
-function filter (xs, f) {
- if (xs.filter) return xs.filter(f);
- var res = [];
- for (var i = 0; i < xs.length; i++) {
- if (f(xs[i], i, xs)) res.push(xs[i]);
- }
- return res;
-}
-
-// String.prototype.substr - negative index don't work in IE8
-var substr = 'ab'.substr(-1) === 'b'
- ? function (str, start, len) { return str.substr(start, len) }
- : function (str, start, len) {
- if (start < 0) start = str.length + start;
- return str.substr(start, len);
- }
-;
-
-}).call(this,require('_process'))
-},{"_process":50}],50:[function(require,module,exports){
-// shim for using process in browser
-
-var process = module.exports = {};
-
-process.nextTick = (function () {
- var canSetImmediate = typeof window !== 'undefined'
- && window.setImmediate;
- var canPost = typeof window !== 'undefined'
- && window.postMessage && window.addEventListener
- ;
-
- if (canSetImmediate) {
- return function (f) { return window.setImmediate(f) };
- }
-
- if (canPost) {
- var queue = [];
- window.addEventListener('message', function (ev) {
- var source = ev.source;
- if ((source === window || source === null) && ev.data === 'process-tick') {
- ev.stopPropagation();
- if (queue.length > 0) {
- var fn = queue.shift();
- fn();
- }
- }
- }, true);
-
- return function nextTick(fn) {
- queue.push(fn);
- window.postMessage('process-tick', '*');
- };
- }
-
- return function nextTick(fn) {
- setTimeout(fn, 0);
- };
-})();
-
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-
-function noop() {}
-
-process.on = noop;
-process.addListener = noop;
-process.once = noop;
-process.off = noop;
-process.removeListener = noop;
-process.removeAllListeners = noop;
-process.emit = noop;
-
-process.binding = function (name) {
- throw new Error('process.binding is not supported');
-}
-
-// TODO(shtylman)
-process.cwd = function () { return '/' };
-process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
-};
-
-},{}],51:[function(require,module,exports){
-module.exports={"eras":{"e-33":"33 versions back","e-32":"32 versions back","e-31":"31 versions back","e-30":"30 versions back","e-29":"29 versions back","e-28":"28 versions back","e-27":"27 versions back","e-26":"26 versions back","e-25":"25 versions back","e-24":"24 versions back","e-23":"23 versions back","e-22":"22 versions back","e-21":"21 versions back","e-20":"20 versions back","e-19":"19 versions back","e-18":"18 versions back","e-17":"17 versions back","e-16":"16 versions back","e-15":"15 versions back","e-14":"14 versions back","e-13":"13 versions back","e-12":"12 versions back","e-11":"11 versions back","e-10":"10 versions back","e-9":"9 versions back","e-8":"8 versions back","e-7":"7 versions back","e-6":"6 versions back","e-5":"5 versions back","e-4":"4 versions back","e-3":"3 versions back","e-2":"2 versions back","e-1":"Previous version","e0":"Current","e1":"Near future","e2":"Farther future","e3":"3 versions ahead"},"agents":{"ie":{"browser":"IE","abbr":"IE","prefix":"ms","type":"desktop","usage_global":{"5.5":0.009298,"6":0.172409,"7":0.107756,"8":3.72116,"9":2.45683,"10":2.39936,"11":7.234},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"5.5","6","7","8","9","10","11",null,null,null]},"firefox":{"browser":"Firefox","abbr":"FF","prefix":"moz","type":"desktop","usage_global":{"2":0.006936,"3":0.048552,"3.5":0.020808,"3.6":0.124848,"4":0.03468,"5":0.020808,"6":0.020808,"7":0.020808,"8":0.041616,"9":0.027744,"10":0.041616,"11":0.041616,"12":0.097104,"13":0.041616,"14":0.041616,"15":0.055488,"16":0.083232,"17":0.062424,"18":0.048552,"19":0.048552,"20":0.055488,"21":0.291312,"22":0.083232,"23":0.06936,"24":0.187272,"25":0.090168,"26":0.10404,"27":0.124848,"28":0.124848,"29":0.221952,"30":0.686664,"31":10.0364,"32":0.360672,"33":0.006936,"34":0.013872,"35":0},"versions":[null,"2","3","3.5","3.6","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35"]},"chrome":{"browser":"Chrome","abbr":"Chr.","prefix":"webkit","type":"desktop","usage_global":{"4":0.020808,"5":0.013872,"6":0.020808,"7":0.013872,"8":0.013872,"9":0.013872,"10":0.027744,"11":0.110976,"12":0.041616,"13":0.03468,"14":0.027744,"15":0.03468,"16":0.027744,"17":0.020808,"18":0.041616,"19":0.027744,"20":0.020808,"21":0.430032,"22":0.097104,"23":0.041616,"24":0.06936,"25":0.048552,"26":0.117912,"27":0.5202,"28":0.110976,"29":0.131784,"30":0.194208,"31":0.568752,"32":0.31212,"33":0.790704,"34":0.672792,"35":1.87272,"36":26.7105,"37":0.929424,"38":0.152592,"39":0.020808,"40":0},"versions":["4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40"]},"safari":{"browser":"Safari","abbr":"Saf.","prefix":"webkit","type":"desktop","usage_global":{"3.1":0,"3.2":0.008692,"4":0.076296,"5":0.1734,"5.1":0.596496,"6":0.263568,"6.1":0.513264,"7":1.74094,"8":0.027744},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"3.1","3.2","4","5","5.1","6","6.1","7","8",null,null]},"opera":{"browser":"Opera","abbr":"Op.","prefix":"webkit","type":"desktop","usage_global":{"9.5-9.6":0.007052,"10.0-10.1":0.020808,"10.5":0.008392,"10.6":0.007296,"11":0.014996,"11.1":0.008219,"11.5":0.013872,"11.6":0.013872,"12":0.027744,"12.1":0.284376,"15":0.006936,"16":0.006936,"17":0.006936,"18":0.020808,"19":0.013872,"20":0.03468,"21":0.020808,"22":0.03468,"23":0.513264,"24":0.013872,"25":0,"26":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,"9.5-9.6","10.0-10.1","10.5","10.6","11","11.1","11.5","11.6","12","12.1","15","16","17","18","19","20","21","22","23","24","25","26",null],"prefix_exceptions":{"9.5-9.6":"o","10.0-10.1":"o","10.5":"o","10.6":"o","11":"o","11.1":"o","11.5":"o","11.6":"o","12":"o","12.1":"o"}},"ios_saf":{"browser":"iOS Safari","abbr":"iOS","prefix":"webkit","type":"mobile","usage_global":{"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.0685548,"6.0-6.1":0.345572,"7.0-7.1":6.5197,"8":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"3.2","4.0-4.1","4.2-4.3","5.0-5.1","6.0-6.1","7.0-7.1","8",null,null]},"op_mini":{"browser":"Opera Mini","abbr":"O.Mini","prefix":"o","type":"mobile","usage_global":{"5.0-7.0":3.35731},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"5.0-7.0",null,null,null]},"android":{"browser":"Android Browser","abbr":"And.","prefix":"webkit","type":"mobile","usage_global":{"2.1":0.0068412,"2.2":0.0478884,"2.3":0.930403,"3":0,"4":0.725167,"4.1":1.81292,"4.2-4.3":1.89501,"4.4":1.42981,"4.4.3":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"2.1","2.2","2.3","3","4","4.1","4.2-4.3","4.4","4.4.3",null,null]},"op_mob":{"browser":"Opera Mobile","abbr":"O.Mob","prefix":"o","type":"mobile","usage_global":{"10":0,"11.5":0,"12":0.00908434,"12.1":0.0499639,"22":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"10",null,null,"11.5","12","12.1","22",null,null,null],"prefix_exceptions":{"22":"webkit"}},"bb":{"browser":"Blackberry Browser","abbr":"BB","prefix":"webkit","type":"mobile","usage_global":{"7":0.09958,"10":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"7","10",null,null,null]},"and_chr":{"browser":"Chrome for Android","abbr":"Chr/And.","prefix":"webkit","type":"mobile","usage_global":{"37":6.94609},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"37",null,null,null]},"and_ff":{"browser":"Firefox for Android","abbr":"FF/And.","prefix":"moz","type":"mobile","usage_global":{"32":0.131752},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"32",null,null,null]},"ie_mob":{"browser":"IE Mobile","abbr":"IE.Mob","prefix":"ms","type":"mobile","usage_global":{"10":0.437355},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"10",null,null,null]}},"statuses":{"rec":"Recommendation","pr":"Proposed Recommendation","cr":"Candidate Recommendation","wd":"Working Draft","other":"Other","unoff":"Unofficial / Note"},"cats":{"CSS":["CSS","CSS2","CSS3"],"HTML5":["Canvas","HTML5"],"JS API":["JS API"],"Other":["Other","DOM","PNG"],"SVG":["SVG"]},"updated":1410498413,"data":{"png-alpha":{"title":"PNG alpha transparency","description":"Semi-transparent areas in PNG files","spec":"http://www.w3.org/TR/PNG/","status":"rec","links":[{"url":"http://en.wikipedia.org/wiki/Portable_Network_Graphics","title":"Wikipedia"},{"url":"http://dillerdesign.com/experiment/DD_belatedPNG/","title":"Workaround for IE6"}],"categories":["PNG"],"stats":{"ie":{"5.5":"n","6":"p","7":"y","8":"y","9":"y","10":"y","11":"y"},"firefox":{"2":"y","3":"y","3.5":"y","3.6":"y","4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y"},"chrome":{"4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y","40":"y"},"safari":{"3.1":"y","3.2":"y","4":"y","5":"y","5.1":"y","6":"y","6.1":"y","7":"y","8":"y"},"opera":{"9":"y","9.5-9.6":"y","10.0-10.1":"y","10.5":"y","10.6":"y","11":"y","11.1":"y","11.5":"y","11.6":"y","12":"y","12.1":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y"},"ios_saf":{"3.2":"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0-7.1":"y","8":"y"},"op_mini":{"5.0-7.0":"y"},"android":{"2.1":"y","2.2":"y","2.3":"y","3":"y","4":"y","4.1":"y","4.2-4.3":"y","4.4":"y","4.4.3":"y"},"bb":{"7":"y","10":"y"},"op_mob":{"10":"y","11":"y","11.1":"y","11.5":"y","12":"y","12.1":"y","22":"y"},"and_chr":{"37":"y"},"and_ff":{"32":"y"},"ie_mob":{"10":"y"}},"notes":"IE6 does support full transparency in 8-bit PNGs, which can sometimes be an alternative to 24-bit PNGs.","notes_by_num":{},"usage_perc_y":92.91,"usage_perc_a":0,"ucprefix":false,"parent":"","keywords":"","ie_id":"","chrome_id":""},"apng":{"title":"Animated PNG (APNG)","description":"Like animated GIFs, but allowing 24-bit colors and alpha transparency","spec":"https://wiki.mozilla.org/APNG_Specification","status":"unoff","links":[{"url":"http://en.wikipedia.org/wiki/APNG","title":"Wikipedia"},{"url":"https://github.com/davidmz/apng-canvas","title":"Polyfill using canvas"},{"url":"https://chrome.google.com/webstore/detail/ehkepjiconegkhpodgoaeamnpckdbblp","title":"Chrome extension providing support"}],"categories":["PNG"],"stats":{"ie":{"5.5":"n","6":"n","7":"n","8":"n","9":"n","10":"n","11":"n"},"firefox":{"2":"n","3":"y","3.5":"y","3.6":"y","4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y"},"chrome":{"4":"n","5":"n","6":"n","7":"n","8":"n","9":"n","10":"n","11":"n","12":"n","13":"n","14":"n","15":"n","16":"n","17":"n","18":"n","19":"n","20":"n","21":"n","22":"n","23":"n","24":"n","25":"n","26":"n","27":"n","28":"n","29":"n","30":"n","31":"n","32":"n","33":"n","34":"n","35":"n","36":"n","37":"n","38":"n","39":"n","40":"n"},"safari":{"3.1":"n","3.2":"n","4":"n","5":"n","5.1":"n","6":"n","6.1":"n","7":"n","8":"y"},"opera":{"9":"n","9.5-9.6":"y","10.0-10.1":"y","10.5":"y","10.6":"y","11":"y","11.1":"y","11.5":"y","11.6":"y","12":"y","12.1":"y","15":"n","16":"n","17":"n","18":"n","19":"n","20":"n","21":"n","22":"n","23":"n","24":"n","25":"n","26":"n"},"ios_saf":{"3.2":"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0-7.1":"n","8":"y"},"op_mini":{"5.0-7.0":"n"},"android":{"2.1":"n","2.2":"n","2.3":"n","3":"n","4":"n","4.1":"n","4.2-4.3":"n","4.4":"n","4.4.3":"n"},"bb":{"7":"n","10":"n"},"op_mob":{"10":"y","11":"y","11.1":"y","11.5":"y","12":"y","12.1":"y","22":"n"},"and_chr":{"37":"n"},"and_ff":{"32":"y"},"ie_mob":{"10":"n"}},"notes":"Where support for APNG is missing, only the first frame is displayed","notes_by_num":{},"usage_perc_y":14,"usage_perc_a":0,"ucprefix":false,"parent":"","keywords":"","ie_id":"","chrome_id":""},"video":{"title":"Video element","description":"Method of playing videos on webpages (without requiring a plug-in)","spec":"http://www.w3.org/TR/html5/embedded-content-0.html#video","status":"cr","links":[{"url":"http://dev.opera.com/articles/view/everything-you-need-to-know-about-html5-video-and-audio/","title":"Detailed article on video/audio elements"},{"url":"http://webmproject.org","title":"WebM format information"},{"url":"http://camendesign.co.uk/code/video_for_everybody","title":"Video for Everybody"},{"url":"http://diveinto.org/html5/video.html","title":"Video on the Web - includes info on Android support"},{"url":"https://raw.github.com/phiggins42/has.js/master/detect/video.js#video","title":"has.js test"},{"url":"http://docs.webplatform.org/wiki/html/elements/video","title":"WebPlatform Docs"}],"categories":["HTML5"],"stats":{"ie":{"5.5":"n","6":"n","7":"n","8":"n","9":"y","10":"y","11":"y"},"firefox":{"2":"n","3":"n","3.5":"y","3.6":"y","4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y"},"chrome":{"4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y","40":"y"},"safari":{"3.1":"n","3.2":"n","4":"y","5":"y","5.1":"y","6":"y","6.1":"y","7":"y","8":"y"},"opera":{"9":"n","9.5-9.6":"n","10.0-10.1":"n","10.5":"y","10.6":"y","11":"y","11.1":"y","11.5":"y","11.6":"y","12":"y","12.1":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y"},"ios_saf":{"3.2":"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0-7.1":"y","8":"y"},"op_mini":{"5.0-7.0":"n"},"android":{"2.1":"a","2.2":"a","2.3":"y","3":"y","4":"y","4.1":"y","4.2-4.3":"y","4.4":"y","4.4.3":"y"},"bb":{"7":"y","10":"y"},"op_mob":{"10":"n","11":"y","11.1":"y","11.5":"y","12":"y","12.1":"y","22":"y"},"and_chr":{"37":"y"},"and_ff":{"32":"y"},"ie_mob":{"10":"y"}},"notes":"Different browsers have support for different video formats, see sub-features for details. \r\n\r\nThe Android browser (before 2.3) requires [specific handling](http://www.broken-links.com/2010/07/08/making-html5-video-work-on-android-phones/) to run the video element.","notes_by_num":{},"usage_perc_y":85.57,"usage_perc_a":0.05,"ucprefix":false,"parent":"","keywords":"
-
- ';
- ?>
- Easy setup
-
-
-
-
-
\ No newline at end of file
diff --git a/plugins/Codiad-Permissions-master/init.js b/plugins/Codiad-Permissions-master/init.js
deleted file mode 100755
index 8f4049f..0000000
--- a/plugins/Codiad-Permissions-master/init.js
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
-* Copyright (c) Codiad & Andr3as, distributed
-* as-is and without warranty under the MIT License.
-* See [root]/license.md for more information. This information must remain intact.
-*/
-
-(function(global, $){
-
- var codiad = global.codiad,
- scripts = document.getElementsByTagName('script'),
- path = scripts[scripts.length-1].src.split('?')[0],
- curpath = path.split('/').slice(0, -1).join('/')+'/';
-
- $(function() {
- codiad.Permissions.init();
- });
-
- codiad.Permissions = {
-
- path : curpath,
- file : "",
-
- init: function() {
- var _this = this;
- $('.more_control').live('click', function(e){
- $('.more').toggle(0, function(){
- $('.more_control span').removeClass('icon-right-open-big');
- $('.more_control span').removeClass('icon-down-open-big');
- if ($('.more').is(':visible')) {
- $('.more_control span').addClass('icon-down-open-big');
- } else {
- $('.more_control span').addClass('icon-right-open-big');
- }
- });
- });
- $('.more input:checkbox').live('change', function(e){
- _this.calculateRights();
- });
- $('#permissions').live('input keyup', function(e){
- _this.calculateBoxes($('#permissions').val());
- });
- },
-
- //////////////////////////////////////////////////////////
- //
- // Show dialog to modify permissions
- //
- // Parameters:
- //
- // path - {String} - File path
- //
- //////////////////////////////////////////////////////////
- showDialog: function(path) {
- this.file = path;
- codiad.modal.load(100, this.path+"dialog.php?path="+path);
- },
-
- //////////////////////////////////////////////////////////
- //
- // Change permissions
- //
- //////////////////////////////////////////////////////////
- change: function() {
- var perm = $('#permissions').val();
- codiad.modal.unload();
- $.getJSON(this.path+"controller.php?action=changePermission&path="+this.file+"&mode="+perm, function(data){
- if (data.status == "error") {
- codiad.message.error(data.message);
- } else {
- codiad.message.success(data.message);
- }
- });
- },
-
- //////////////////////////////////////////////////////////
- //
- // Calculate rights
- //
- //////////////////////////////////////////////////////////
- calculateRights: function() {
- var sum = 0, _this = this;
- $('.more input:checkbox').each(function(i, item){
- var factor = 1, right = 1;
- if (_this.isChecked(item)) {
- if ($(item).hasClass('owner')) {
- factor = 100;
- } else if ($(item).hasClass('group')) {
- factor = 10;
- }
-
- if ($(item).hasClass('r')) {
- right = 4;
- } else if($(item).hasClass('w')) {
- right = 2;
- }
- sum += factor * right;
- }
- });
- var obj = $('.more input:checkbox');
- if (!this.isChecked(obj[0]) && !this.isChecked(obj[1]) && !this.isChecked(obj[2])) {
- sum = '0' + sum;
- if (!this.isChecked(obj[3]) && !this.isChecked(obj[4]) && !this.isChecked(obj[5])) {
- sum = '0' + sum;
- }
- }
- $('#permissions').val(sum);
- },
-
- //////////////////////////////////////////////////////////
- //
- // Calculate checkboxes
- //
- // Parameter:
- //
- // rights - {string} - File rights
- //
- //////////////////////////////////////////////////////////
- calculateBoxes: function(rights) {
- $('.more input:checkbox').removeAttr('checked');
- var fn = function(right, selector) {
- if (right == '1' || right == '3' || right == '5' || right == '7') {
- this.selectCheckbox(selector + ' .x');
- }
- if (right == '2' || right == '3' || right == '6' || right == '7') {
- this.selectCheckbox(selector + ' .w');
- }
- if (right == '4' || right == '5' || right == '6' || right == '7') {
- this.selectCheckbox(selector + ' .r');
- }
- }.bind(this);
- if (rights[0] === '0' && rights.length > 3) {
- rights = rights.substring(1);
- }
- if (rights.length < 1) {
- rights = '000';
- } else if (rights.length < 2) {
- rights += '00';
- } else {
- rights += '0';
- }
- fn(rights[0], ".owner");
- fn(rights[1], ".group");
- fn(rights[2], ".other");
- },
-
- //////////////////////////////////////////////////////////
- //
- // Check if checkbox is checked
- //
- // Parameter:
- //
- // item - {object} - jQuery object
- //
- //////////////////////////////////////////////////////////
- isChecked: function(item) {
- if ($(item).attr('checked') == "checked") {
- return true;
- } else {
- return false;
- }
- },
-
- //////////////////////////////////////////////////////////
- //
- // Select checkbox
- //
- // Parameter:
- //
- // selector - {string} - Selector of checkbox(s)
- //
- //////////////////////////////////////////////////////////
- selectCheckbox: function(selector) {
- $('.more ' + selector).attr('checked', 'checked');
- }
-
- };
-})(this, jQuery);
\ No newline at end of file
diff --git a/plugins/Codiad-Permissions-master/plugin.json b/plugins/Codiad-Permissions-master/plugin.json
deleted file mode 100755
index c4a9b5c..0000000
--- a/plugins/Codiad-Permissions-master/plugin.json
+++ /dev/null
@@ -1,12 +0,0 @@
-[{
- "author": "Andr3as",
- "version": "0.21",
- "name": "Permissions",
- "url": "https://github.com/Andr3as/Codiad-Permissions.git",
- "contextmenu" : [{
- "action" : "codiad.Permissions.showDialog($('#context-menu').attr('data-path'));",
- "icon" : "icon-key",
- "applies-to" : "both",
- "title" : "Edit Permissions"
- }]
-}]
\ No newline at end of file
diff --git a/plugins/Codiad-Permissions-master/screen.css b/plugins/Codiad-Permissions-master/screen.css
deleted file mode 100755
index e692584..0000000
--- a/plugins/Codiad-Permissions-master/screen.css
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) Codiad & Andr3as, distributed
- * as-is and without warranty under the MIT License.
- * See http://opensource.org/licenses/MIT for more information.
- * This information must remain intact.
- */
-.more_control {
- cursor: pointer;
-}
-.more_control .item-icon {
- display: inline;
- font-size: 100%;
-}
-#permissions_dialog .more table td{
- border: none;
- padding: 0;
-}
-#permissions_dialog .more input {
- display: inline;
-}
\ No newline at end of file
diff --git a/plugins/Codiad-Permissions-master/screen.png b/plugins/Codiad-Permissions-master/screen.png
deleted file mode 100755
index 2521873..0000000
Binary files a/plugins/Codiad-Permissions-master/screen.png and /dev/null differ