First version

This commit is contained in:
Senad Uka
2023-07-05 11:02:15 +02:00
parent f21c24b599
commit 8eabf79994
4052 changed files with 723968 additions and 232443 deletions

20
CTOAsYouGo/node_modules/autoprefixer/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright 2013 Andrey Sitnik <andrey@sitnik.ru>
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.

73
CTOAsYouGo/node_modules/autoprefixer/README.md generated vendored Normal file
View File

@@ -0,0 +1,73 @@
# Autoprefixer [![Cult Of Martians][cult-img]][cult]
<img align="right" width="94" height="71"
src="http://postcss.github.io/autoprefixer/logo.svg"
title="Autoprefixer logo by Anton Lovchikov">
[PostCSS] plugin to parse CSS and add vendor prefixes to CSS rules using values
from [Can I Use]. It is [recommended] by Google and used in Twitter and Alibaba.
Write your CSS rules without vendor prefixes (in fact, forget about them
entirely):
```css
::placeholder {
color: gray;
}
.image {
background-image: url(image@1x.png);
}
@media (min-resolution: 2dppx) {
.image {
background-image: url(image@2x.png);
}
}
```
Autoprefixer will use the data based on current browser popularity and property
support to apply prefixes for you. You can try the [interactive demo]
of Autoprefixer.
```css
::-moz-placeholder {
color: gray;
}
:-ms-input-placeholder {
color: gray;
}
::-ms-input-placeholder {
color: gray;
}
::placeholder {
color: gray;
}
.image {
background-image: url(image@1x.png);
}
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 2dppx) {
.image {
background-image: url(image@2x.png);
}
}
```
Twitter account for news and releases: [@autoprefixer].
<a href="https://evilmartians.com/?utm_source=autoprefixer">
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54">
</a>
[interactive demo]: https://autoprefixer.github.io/
[@autoprefixer]: https://twitter.com/autoprefixer
[recommended]: https://developers.google.com/web/tools/setup/setup-buildtools#dont_trip_up_with_vendor_prefixes
[Can I Use]: https://caniuse.com/
[cult-img]: http://cultofmartians.com/assets/badges/badge.svg
[PostCSS]: https://github.com/postcss/postcss
[cult]: http://cultofmartians.com/tasks/autoprefixer-grid.html
## Docs
Read **[full docs](https://github.com/postcss/autoprefixer#readme)** on GitHub.

22
CTOAsYouGo/node_modules/autoprefixer/bin/autoprefixer generated vendored Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env node
let mode = process.argv[2]
if (mode === '--info') {
process.stdout.write(
require('../')().info() + '\n')
} else if (mode === '--version') {
process.stdout.write(
'autoprefixer ' + require('../package.json').version + '\n')
} else {
process.stdout.write(
'autoprefix\n' +
'\n' +
'Options:\n' +
' --info Show target browsers and used prefixes\n' +
' --version Show version number\n' +
' --help Show help\n' +
'\n' +
'Usage:\n' +
' autoprefixer --info\n'
)
}

714
CTOAsYouGo/node_modules/autoprefixer/data/prefixes.js generated vendored Normal file
View File

@@ -0,0 +1,714 @@
"use strict";
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var unpack = require('caniuse-lite').feature;
function browsersSort(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 Math.sign(parseFloat(a[1]) - parseFloat(b[1]));
}
} // Convert Can I Use data
function f(data, opts, callback) {
data = unpack(data);
if (!callback) {
var _ref = [opts, {}];
callback = _ref[0];
opts = _ref[1];
}
var match = opts.match || /\sx($|\s)/;
var need = [];
for (var browser in data.stats) {
var versions = data.stats[browser];
for (var version in versions) {
var support = versions[version];
if (support.match(match)) {
need.push(browser + ' ' + version);
}
}
}
callback(need.sort(browsersSort));
} // Add data for all properties
var result = {};
function prefix(names, data) {
for (var _iterator = _createForOfIteratorHelperLoose(names), _step; !(_step = _iterator()).done;) {
var name = _step.value;
result[name] = Object.assign({}, data);
}
}
function add(names, data) {
for (var _iterator2 = _createForOfIteratorHelperLoose(names), _step2; !(_step2 = _iterator2()).done;) {
var name = _step2.value;
result[name].browsers = result[name].browsers.concat(data.browsers).sort(browsersSort);
}
}
module.exports = result; // Border Radius
f(require('caniuse-lite/data/features/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: ['-khtml-', '-ms-', '-o-'],
feature: 'border-radius',
browsers: browsers
});
}); // Box Shadow
f(require('caniuse-lite/data/features/css-boxshadow'), function (browsers) {
return prefix(['box-shadow'], {
mistakes: ['-khtml-'],
feature: 'css-boxshadow',
browsers: browsers
});
}); // Animation
f(require('caniuse-lite/data/features/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'], {
mistakes: ['-khtml-', '-ms-'],
feature: 'css-animation',
browsers: browsers
});
}); // Transition
f(require('caniuse-lite/data/features/css-transitions'), function (browsers) {
return prefix(['transition', 'transition-property', 'transition-duration', 'transition-delay', 'transition-timing-function'], {
mistakes: ['-khtml-', '-ms-'],
browsers: browsers,
feature: 'css-transitions'
});
}); // Transform 2D
f(require('caniuse-lite/data/features/transforms2d'), function (browsers) {
return prefix(['transform', 'transform-origin'], {
feature: 'transforms2d',
browsers: browsers
});
}); // Transform 3D
var transforms3d = require('caniuse-lite/data/features/transforms3d');
f(transforms3d, function (browsers) {
prefix(['perspective', 'perspective-origin'], {
feature: 'transforms3d',
browsers: browsers
});
return prefix(['transform-style'], {
mistakes: ['-ms-', '-o-'],
browsers: browsers,
feature: 'transforms3d'
});
});
f(transforms3d, {
match: /y\sx|y\s#2/
}, function (browsers) {
return prefix(['backface-visibility'], {
mistakes: ['-ms-', '-o-'],
feature: 'transforms3d',
browsers: browsers
});
}); // Gradients
var gradients = require('caniuse-lite/data/features/css-gradients');
f(gradients, {
match: /y\sx/
}, function (browsers) {
return prefix(['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient'], {
props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
mistakes: ['-ms-'],
feature: 'css-gradients',
browsers: browsers
});
});
f(gradients, {
match: /a\sx/
}, function (browsers) {
browsers = browsers.map(function (i) {
if (/firefox|op/.test(i)) {
return i;
} else {
return i + " old";
}
});
return add(['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient'], {
feature: 'css-gradients',
browsers: browsers
});
}); // Box sizing
f(require('caniuse-lite/data/features/css3-boxsizing'), function (browsers) {
return prefix(['box-sizing'], {
feature: 'css3-boxsizing',
browsers: browsers
});
}); // Filter Effects
f(require('caniuse-lite/data/features/css-filters'), function (browsers) {
return prefix(['filter'], {
feature: 'css-filters',
browsers: browsers
});
}); // filter() function
f(require('caniuse-lite/data/features/css-filter-function'), function (browsers) {
return prefix(['filter-function'], {
props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
feature: 'css-filter-function',
browsers: browsers
});
}); // Backdrop-filter
var backdrop = require('caniuse-lite/data/features/css-backdrop-filter');
f(backdrop, {
match: /y\sx|y\s#2/
}, function (browsers) {
return prefix(['backdrop-filter'], {
feature: 'css-backdrop-filter',
browsers: browsers
});
}); // element() function
f(require('caniuse-lite/data/features/css-element-function'), function (browsers) {
return prefix(['element'], {
props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
feature: 'css-element-function',
browsers: browsers
});
}); // Multicolumns
f(require('caniuse-lite/data/features/multicolumn'), function (browsers) {
prefix(['columns', 'column-width', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width', 'column-count', 'column-rule-style', 'column-span', 'column-fill'], {
feature: 'multicolumn',
browsers: browsers
});
var noff = browsers.filter(function (i) {
return !/firefox/.test(i);
});
prefix(['break-before', 'break-after', 'break-inside'], {
feature: 'multicolumn',
browsers: noff
});
}); // User select
f(require('caniuse-lite/data/features/user-select-none'), function (browsers) {
return prefix(['user-select'], {
mistakes: ['-khtml-'],
feature: 'user-select-none',
browsers: browsers
});
}); // Flexible Box Layout
var flexbox = require('caniuse-lite/data/features/flexbox');
f(flexbox, {
match: /a\sx/
}, function (browsers) {
browsers = browsers.map(function (i) {
if (/ie|firefox/.test(i)) {
return i;
} else {
return i + " 2009";
}
});
prefix(['display-flex', 'inline-flex'], {
props: ['display'],
feature: 'flexbox',
browsers: browsers
});
prefix(['flex', 'flex-grow', 'flex-shrink', 'flex-basis'], {
feature: 'flexbox',
browsers: browsers
});
prefix(['flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content'], {
feature: 'flexbox',
browsers: browsers
});
});
f(flexbox, {
match: /y\sx/
}, function (browsers) {
add(['display-flex', 'inline-flex'], {
feature: 'flexbox',
browsers: browsers
});
add(['flex', 'flex-grow', 'flex-shrink', 'flex-basis'], {
feature: 'flexbox',
browsers: browsers
});
add(['flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content'], {
feature: 'flexbox',
browsers: browsers
});
}); // calc() unit
f(require('caniuse-lite/data/features/calc'), function (browsers) {
return prefix(['calc'], {
props: ['*'],
feature: 'calc',
browsers: browsers
});
}); // Background options
f(require('caniuse-lite/data/features/background-img-opts'), function (browsers) {
return prefix(['background-origin', 'background-size'], {
feature: 'background-img-opts',
browsers: browsers
});
}); // background-clip: text
f(require('caniuse-lite/data/features/background-clip-text'), function (browsers) {
return prefix(['background-clip'], {
feature: 'background-clip-text',
browsers: browsers
});
}); // Font feature settings
f(require('caniuse-lite/data/features/font-feature'), function (browsers) {
return prefix(['font-feature-settings', 'font-variant-ligatures', 'font-language-override'], {
feature: 'font-feature',
browsers: browsers
});
}); // CSS font-kerning property
f(require('caniuse-lite/data/features/font-kerning'), function (browsers) {
return prefix(['font-kerning'], {
feature: 'font-kerning',
browsers: browsers
});
}); // Border image
f(require('caniuse-lite/data/features/border-image'), function (browsers) {
return prefix(['border-image'], {
feature: 'border-image',
browsers: browsers
});
}); // Selection selector
f(require('caniuse-lite/data/features/css-selection'), function (browsers) {
return prefix(['::selection'], {
selector: true,
feature: 'css-selection',
browsers: browsers
});
}); // Placeholder selector
f(require('caniuse-lite/data/features/css-placeholder'), function (browsers) {
prefix(['::placeholder'], {
selector: true,
feature: 'css-placeholder',
browsers: browsers.concat(['ie 10 old', 'ie 11 old', 'firefox 18 old'])
});
}); // Placeholder-shown selector
f(require('caniuse-lite/data/features/css-placeholder-shown'), function (browsers) {
prefix([':placeholder-shown'], {
selector: true,
feature: 'css-placeholder-shown',
browsers: browsers
});
}); // Hyphenation
f(require('caniuse-lite/data/features/css-hyphens'), function (browsers) {
return prefix(['hyphens'], {
feature: 'css-hyphens',
browsers: browsers
});
}); // Fullscreen selector
var fullscreen = require('caniuse-lite/data/features/fullscreen');
f(fullscreen, function (browsers) {
return prefix([':fullscreen'], {
selector: true,
feature: 'fullscreen',
browsers: browsers
});
});
f(fullscreen, {
match: /x(\s#2|$)/
}, function (browsers) {
return prefix(['::backdrop'], {
selector: true,
feature: 'fullscreen',
browsers: browsers
});
}); // Tab size
f(require('caniuse-lite/data/features/css3-tabsize'), function (browsers) {
return prefix(['tab-size'], {
feature: 'css3-tabsize',
browsers: browsers
});
}); // Intrinsic & extrinsic sizing
var intrinsic = require('caniuse-lite/data/features/intrinsic-width');
var sizeProps = ['width', 'min-width', 'max-width', 'height', 'min-height', 'max-height', 'inline-size', 'min-inline-size', 'max-inline-size', 'block-size', 'min-block-size', 'max-block-size', 'grid', 'grid-template', 'grid-template-rows', 'grid-template-columns', 'grid-auto-columns', 'grid-auto-rows'];
f(intrinsic, function (browsers) {
return prefix(['max-content', 'min-content'], {
props: sizeProps,
feature: 'intrinsic-width',
browsers: browsers
});
});
f(intrinsic, {
match: /x|\s#4/
}, function (browsers) {
return prefix(['fill', 'fill-available', 'stretch'], {
props: sizeProps,
feature: 'intrinsic-width',
browsers: browsers
});
});
f(intrinsic, {
match: /x|\s#5/
}, function (browsers) {
return prefix(['fit-content'], {
props: sizeProps,
feature: 'intrinsic-width',
browsers: browsers
});
}); // Zoom cursors
f(require('caniuse-lite/data/features/css3-cursors-newer'), function (browsers) {
return prefix(['zoom-in', 'zoom-out'], {
props: ['cursor'],
feature: 'css3-cursors-newer',
browsers: browsers
});
}); // Grab cursors
f(require('caniuse-lite/data/features/css3-cursors-grab'), function (browsers) {
return prefix(['grab', 'grabbing'], {
props: ['cursor'],
feature: 'css3-cursors-grab',
browsers: browsers
});
}); // Sticky position
f(require('caniuse-lite/data/features/css-sticky'), function (browsers) {
return prefix(['sticky'], {
props: ['position'],
feature: 'css-sticky',
browsers: browsers
});
}); // Pointer Events
f(require('caniuse-lite/data/features/pointer'), function (browsers) {
return prefix(['touch-action'], {
feature: 'pointer',
browsers: browsers
});
}); // Text decoration
var decoration = require('caniuse-lite/data/features/text-decoration');
f(decoration, function (browsers) {
return prefix(['text-decoration-style', 'text-decoration-color', 'text-decoration-line', 'text-decoration'], {
feature: 'text-decoration',
browsers: browsers
});
});
f(decoration, {
match: /x.*#[235]/
}, function (browsers) {
return prefix(['text-decoration-skip', 'text-decoration-skip-ink'], {
feature: 'text-decoration',
browsers: browsers
});
}); // Text Size Adjust
f(require('caniuse-lite/data/features/text-size-adjust'), function (browsers) {
return prefix(['text-size-adjust'], {
feature: 'text-size-adjust',
browsers: browsers
});
}); // CSS Masks
f(require('caniuse-lite/data/features/css-masks'), function (browsers) {
prefix(['mask-clip', 'mask-composite', 'mask-image', 'mask-origin', 'mask-repeat', 'mask-border-repeat', 'mask-border-source'], {
feature: 'css-masks',
browsers: browsers
});
prefix(['mask', 'mask-position', 'mask-size', 'mask-border', 'mask-border-outset', 'mask-border-width', 'mask-border-slice'], {
feature: 'css-masks',
browsers: browsers
});
}); // CSS clip-path property
f(require('caniuse-lite/data/features/css-clip-path'), function (browsers) {
return prefix(['clip-path'], {
feature: 'css-clip-path',
browsers: browsers
});
}); // Fragmented Borders and Backgrounds
f(require('caniuse-lite/data/features/css-boxdecorationbreak'), function (browsers) {
return prefix(['box-decoration-break'], {
feature: 'css-boxdecorationbreak',
browsers: browsers
});
}); // CSS3 object-fit/object-position
f(require('caniuse-lite/data/features/object-fit'), function (browsers) {
return prefix(['object-fit', 'object-position'], {
feature: 'object-fit',
browsers: browsers
});
}); // CSS Shapes
f(require('caniuse-lite/data/features/css-shapes'), function (browsers) {
return prefix(['shape-margin', 'shape-outside', 'shape-image-threshold'], {
feature: 'css-shapes',
browsers: browsers
});
}); // CSS3 text-overflow
f(require('caniuse-lite/data/features/text-overflow'), function (browsers) {
return prefix(['text-overflow'], {
feature: 'text-overflow',
browsers: browsers
});
}); // Viewport at-rule
f(require('caniuse-lite/data/features/css-deviceadaptation'), function (browsers) {
return prefix(['@viewport'], {
feature: 'css-deviceadaptation',
browsers: browsers
});
}); // Resolution Media Queries
var resolut = require('caniuse-lite/data/features/css-media-resolution');
f(resolut, {
match: /( x($| )|a #2)/
}, function (browsers) {
return prefix(['@resolution'], {
feature: 'css-media-resolution',
browsers: browsers
});
}); // CSS text-align-last
f(require('caniuse-lite/data/features/css-text-align-last'), function (browsers) {
return prefix(['text-align-last'], {
feature: 'css-text-align-last',
browsers: browsers
});
}); // Crisp Edges Image Rendering Algorithm
var crispedges = require('caniuse-lite/data/features/css-crisp-edges');
f(crispedges, {
match: /y x|a x #1/
}, function (browsers) {
return prefix(['pixelated'], {
props: ['image-rendering'],
feature: 'css-crisp-edges',
browsers: browsers
});
});
f(crispedges, {
match: /a x #2/
}, function (browsers) {
return prefix(['image-rendering'], {
feature: 'css-crisp-edges',
browsers: browsers
});
}); // Logical Properties
var logicalProps = require('caniuse-lite/data/features/css-logical-props');
f(logicalProps, function (browsers) {
return prefix(['border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end'], {
feature: 'css-logical-props',
browsers: browsers
});
});
f(logicalProps, {
match: /x\s#2/
}, function (browsers) {
return prefix(['border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end'], {
feature: 'css-logical-props',
browsers: browsers
});
}); // CSS appearance
var appearance = require('caniuse-lite/data/features/css-appearance');
f(appearance, {
match: /#2|x/
}, function (browsers) {
return prefix(['appearance'], {
feature: 'css-appearance',
browsers: browsers
});
}); // CSS Scroll snap points
f(require('caniuse-lite/data/features/css-snappoints'), function (browsers) {
return prefix(['scroll-snap-type', 'scroll-snap-coordinate', 'scroll-snap-destination', 'scroll-snap-points-x', 'scroll-snap-points-y'], {
feature: 'css-snappoints',
browsers: browsers
});
}); // CSS Regions
f(require('caniuse-lite/data/features/css-regions'), function (browsers) {
return prefix(['flow-into', 'flow-from', 'region-fragment'], {
feature: 'css-regions',
browsers: browsers
});
}); // CSS image-set
f(require('caniuse-lite/data/features/css-image-set'), function (browsers) {
return prefix(['image-set'], {
props: ['background', 'background-image', 'border-image', 'cursor', 'mask', 'mask-image', 'list-style', 'list-style-image', 'content'],
feature: 'css-image-set',
browsers: browsers
});
}); // Writing Mode
var writingMode = require('caniuse-lite/data/features/css-writing-mode');
f(writingMode, {
match: /a|x/
}, function (browsers) {
return prefix(['writing-mode'], {
feature: 'css-writing-mode',
browsers: browsers
});
}); // Cross-Fade Function
f(require('caniuse-lite/data/features/css-cross-fade'), function (browsers) {
return prefix(['cross-fade'], {
props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'],
feature: 'css-cross-fade',
browsers: browsers
});
}); // Read Only selector
f(require('caniuse-lite/data/features/css-read-only-write'), function (browsers) {
return prefix([':read-only', ':read-write'], {
selector: true,
feature: 'css-read-only-write',
browsers: browsers
});
}); // Text Emphasize
f(require('caniuse-lite/data/features/text-emphasis'), function (browsers) {
return prefix(['text-emphasis', 'text-emphasis-position', 'text-emphasis-style', 'text-emphasis-color'], {
feature: 'text-emphasis',
browsers: browsers
});
}); // CSS Grid Layout
var grid = require('caniuse-lite/data/features/css-grid');
f(grid, function (browsers) {
prefix(['display-grid', 'inline-grid'], {
props: ['display'],
feature: 'css-grid',
browsers: browsers
});
prefix(['grid-template-columns', 'grid-template-rows', 'grid-row-start', 'grid-column-start', 'grid-row-end', 'grid-column-end', 'grid-row', 'grid-column', 'grid-area', 'grid-template', 'grid-template-areas', 'place-self'], {
feature: 'css-grid',
browsers: browsers
});
});
f(grid, {
match: /a x/
}, function (browsers) {
return prefix(['grid-column-align', 'grid-row-align'], {
feature: 'css-grid',
browsers: browsers
});
}); // CSS text-spacing
f(require('caniuse-lite/data/features/css-text-spacing'), function (browsers) {
return prefix(['text-spacing'], {
feature: 'css-text-spacing',
browsers: browsers
});
}); // :any-link selector
f(require('caniuse-lite/data/features/css-any-link'), function (browsers) {
return prefix([':any-link'], {
selector: true,
feature: 'css-any-link',
browsers: browsers
});
}); // unicode-bidi
var bidi = require('caniuse-lite/data/features/css-unicode-bidi');
f(bidi, function (browsers) {
return prefix(['isolate'], {
props: ['unicode-bidi'],
feature: 'css-unicode-bidi',
browsers: browsers
});
});
f(bidi, {
match: /y x|a x #2/
}, function (browsers) {
return prefix(['plaintext'], {
props: ['unicode-bidi'],
feature: 'css-unicode-bidi',
browsers: browsers
});
});
f(bidi, {
match: /y x/
}, function (browsers) {
return prefix(['isolate-override'], {
props: ['unicode-bidi'],
feature: 'css-unicode-bidi',
browsers: browsers
});
}); // overscroll-behavior selector
var over = require('caniuse-lite/data/features/css-overscroll-behavior');
f(over, {
match: /a #1/
}, function (browsers) {
return prefix(['overscroll-behavior'], {
feature: 'css-overscroll-behavior',
browsers: browsers
});
}); // color-adjust
f(require('caniuse-lite/data/features/css-color-adjust'), function (browsers) {
return prefix(['color-adjust'], {
feature: 'css-color-adjust',
browsers: browsers
});
}); // text-orientation
f(require('caniuse-lite/data/features/css-text-orientation'), function (browsers) {
return prefix(['text-orientation'], {
feature: 'css-text-orientation',
browsers: browsers
});
});

62
CTOAsYouGo/node_modules/autoprefixer/lib/at-rule.js generated vendored Normal file
View File

@@ -0,0 +1,62 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
var Prefixer = require('./prefixer');
var AtRule = /*#__PURE__*/function (_Prefixer) {
_inheritsLoose(AtRule, _Prefixer);
function AtRule() {
return _Prefixer.apply(this, arguments) || this;
}
var _proto = AtRule.prototype;
/**
* Clone and add prefixes for at-rule
*/
_proto.add = function add(rule, prefix) {
var prefixed = prefix + rule.name;
var already = rule.parent.some(function (i) {
return i.name === prefixed && i.params === rule.params;
});
if (already) {
return undefined;
}
var cloned = this.clone(rule, {
name: prefixed
});
return rule.parent.insertBefore(rule, cloned);
}
/**
* Clone node with prefixes
*/
;
_proto.process = function process(node) {
var parent = this.parentPrefix(node);
for (var _iterator = _createForOfIteratorHelperLoose(this.prefixes), _step; !(_step = _iterator()).done;) {
var prefix = _step.value;
if (!parent || parent === prefix) {
this.add(node, prefix);
}
}
};
return AtRule;
}(Prefixer);
module.exports = AtRule;

View File

@@ -0,0 +1,150 @@
"use strict";
var browserslist = require('browserslist');
var postcss = require('postcss');
var agents = require('caniuse-lite').agents;
var pico = require('picocolors');
var Browsers = require('./browsers');
var Prefixes = require('./prefixes');
var data = require('../data/prefixes');
var info = require('./info');
var WARNING = '\n' + ' Replace Autoprefixer `browsers` option to Browserslist config.\n' + ' Use `browserslist` key in `package.json` or `.browserslistrc` file.\n' + '\n' + ' Using `browsers` option can cause errors. Browserslist config \n' + ' can be used for Babel, Autoprefixer, postcss-normalize and other tools.\n' + '\n' + ' If you really need to use option, rename it to `overrideBrowserslist`.\n' + '\n' + ' Learn more at:\n' + ' https://github.com/browserslist/browserslist#readme\n' + ' https://twitter.com/browserslist\n' + '\n';
function isPlainObject(obj) {
return Object.prototype.toString.apply(obj) === '[object Object]';
}
var cache = {};
function timeCapsule(result, prefixes) {
if (prefixes.browsers.selected.length === 0) {
return;
}
if (prefixes.add.selectors.length > 0) {
return;
}
if (Object.keys(prefixes.add).length > 2) {
return;
}
/* istanbul ignore next */
result.warn('Greetings, time traveller. ' + 'We are in the golden age of prefix-less CSS, ' + 'where Autoprefixer is no longer needed for your stylesheet.');
}
module.exports = postcss.plugin('autoprefixer', function () {
for (var _len = arguments.length, reqs = new Array(_len), _key = 0; _key < _len; _key++) {
reqs[_key] = arguments[_key];
}
var options;
if (reqs.length === 1 && isPlainObject(reqs[0])) {
options = reqs[0];
reqs = undefined;
} else if (reqs.length === 0 || reqs.length === 1 && !reqs[0]) {
reqs = undefined;
} else if (reqs.length <= 2 && (Array.isArray(reqs[0]) || !reqs[0])) {
options = reqs[1];
reqs = reqs[0];
} else if (typeof reqs[reqs.length - 1] === 'object') {
options = reqs.pop();
}
if (!options) {
options = {};
}
if (options.browser) {
throw new Error('Change `browser` option to `overrideBrowserslist` in Autoprefixer');
} else if (options.browserslist) {
throw new Error('Change `browserslist` option to `overrideBrowserslist` in Autoprefixer');
}
if (options.overrideBrowserslist) {
reqs = options.overrideBrowserslist;
} else if (options.browsers) {
if (typeof console !== 'undefined' && console.warn) {
console.warn(pico.red(WARNING.replace(/`[^`]+`/g, function (i) {
return pico.yellow(i.slice(1, -1));
})));
}
reqs = options.browsers;
}
var brwlstOpts = {
ignoreUnknownVersions: options.ignoreUnknownVersions,
stats: options.stats,
env: options.env
};
function loadPrefixes(opts) {
var d = module.exports.data;
var browsers = new Browsers(d.browsers, reqs, opts, brwlstOpts);
var key = browsers.selected.join(', ') + JSON.stringify(options);
if (!cache[key]) {
cache[key] = new Prefixes(d.prefixes, browsers, options);
}
return cache[key];
}
function plugin(css, result) {
var prefixes = loadPrefixes({
from: css.source && css.source.input.file,
env: options.env
});
timeCapsule(result, prefixes);
if (options.remove !== false) {
prefixes.processor.remove(css, result);
}
if (options.add !== false) {
prefixes.processor.add(css, result);
}
}
plugin.options = options;
plugin.browsers = reqs;
plugin.info = function (opts) {
opts = opts || {};
opts.from = opts.from || process.cwd();
return info(loadPrefixes(opts));
};
return plugin;
});
/**
* Autoprefixer data
*/
module.exports.data = {
browsers: agents,
prefixes: data
};
/**
* Autoprefixer default browsers
*/
module.exports.defaults = browserslist.defaults;
/**
* Inspect with default Autoprefixer
*/
module.exports.info = function () {
return module.exports().info();
};

64
CTOAsYouGo/node_modules/autoprefixer/lib/brackets.js generated vendored Normal file
View File

@@ -0,0 +1,64 @@
"use strict";
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function last(array) {
return array[array.length - 1];
}
var brackets = {
/**
* Parse string to nodes tree
*/
parse: function parse(str) {
var current = [''];
var stack = [current];
for (var _iterator = _createForOfIteratorHelperLoose(str), _step; !(_step = _iterator()).done;) {
var sym = _step.value;
if (sym === '(') {
current = [''];
last(stack).push(current);
stack.push(current);
continue;
}
if (sym === ')') {
stack.pop();
current = last(stack);
current.push('');
continue;
}
current[current.length - 1] += sym;
}
return stack[0];
},
/**
* Generate output string by nodes tree
*/
stringify: function stringify(ast) {
var result = '';
for (var _iterator2 = _createForOfIteratorHelperLoose(ast), _step2; !(_step2 = _iterator2()).done;) {
var i = _step2.value;
if (typeof i === 'object') {
result += "(" + brackets.stringify(i) + ")";
continue;
}
result += i;
}
return result;
}
};
module.exports = brackets;

96
CTOAsYouGo/node_modules/autoprefixer/lib/browsers.js generated vendored Normal file
View File

@@ -0,0 +1,96 @@
"use strict";
var browserslist = require('browserslist');
var agents = require('caniuse-lite').agents;
var utils = require('./utils');
var Browsers = /*#__PURE__*/function () {
/**
* Return all prefixes for default browser data
*/
Browsers.prefixes = function prefixes() {
if (this.prefixesCache) {
return this.prefixesCache;
}
this.prefixesCache = [];
for (var name in agents) {
this.prefixesCache.push("-" + agents[name].prefix + "-");
}
this.prefixesCache = utils.uniq(this.prefixesCache).sort(function (a, b) {
return b.length - a.length;
});
return this.prefixesCache;
}
/**
* Check is value contain any possible prefix
*/
;
Browsers.withPrefix = function withPrefix(value) {
if (!this.prefixesRegexp) {
this.prefixesRegexp = new RegExp(this.prefixes().join('|'));
}
return this.prefixesRegexp.test(value);
};
function Browsers(data, requirements, options, browserslistOpts) {
this.data = data;
this.options = options || {};
this.browserslistOpts = browserslistOpts || {};
this.selected = this.parse(requirements);
}
/**
* Return browsers selected by requirements
*/
var _proto = Browsers.prototype;
_proto.parse = function parse(requirements) {
var opts = {};
for (var i in this.browserslistOpts) {
opts[i] = this.browserslistOpts[i];
}
opts.path = this.options.from;
return browserslist(requirements, opts);
}
/**
* Return prefix for selected browser
*/
;
_proto.prefix = function prefix(browser) {
var _browser$split = browser.split(' '),
name = _browser$split[0],
version = _browser$split[1];
var data = this.data[name];
var prefix = data.prefix_exceptions && data.prefix_exceptions[version];
if (!prefix) {
prefix = data.prefix;
}
return "-" + prefix + "-";
}
/**
* Is browser is selected by requirements
*/
;
_proto.isSelected = function isSelected(browser) {
return this.selected.includes(browser);
};
return Browsers;
}();
module.exports = Browsers;

243
CTOAsYouGo/node_modules/autoprefixer/lib/declaration.js generated vendored Normal file
View File

@@ -0,0 +1,243 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
var Prefixer = require('./prefixer');
var Browsers = require('./browsers');
var utils = require('./utils');
var Declaration = /*#__PURE__*/function (_Prefixer) {
_inheritsLoose(Declaration, _Prefixer);
function Declaration() {
return _Prefixer.apply(this, arguments) || this;
}
var _proto = Declaration.prototype;
/**
* Always true, because we already get prefixer by property name
*/
_proto.check = function check()
/* decl */
{
return true;
}
/**
* Return prefixed version of property
*/
;
_proto.prefixed = function prefixed(prop, prefix) {
return prefix + prop;
}
/**
* Return unprefixed version of property
*/
;
_proto.normalize = function normalize(prop) {
return prop;
}
/**
* Check `value`, that it contain other prefixes, rather than `prefix`
*/
;
_proto.otherPrefixes = function otherPrefixes(value, prefix) {
for (var _iterator = _createForOfIteratorHelperLoose(Browsers.prefixes()), _step; !(_step = _iterator()).done;) {
var other = _step.value;
if (other === prefix) {
continue;
}
if (value.includes(other)) {
return true;
}
}
return false;
}
/**
* Set prefix to declaration
*/
;
_proto.set = function set(decl, prefix) {
decl.prop = this.prefixed(decl.prop, prefix);
return decl;
}
/**
* Should we use visual cascade for prefixes
*/
;
_proto.needCascade = function needCascade(decl) {
if (!decl._autoprefixerCascade) {
decl._autoprefixerCascade = this.all.options.cascade !== false && decl.raw('before').includes('\n');
}
return decl._autoprefixerCascade;
}
/**
* Return maximum length of possible prefixed property
*/
;
_proto.maxPrefixed = function maxPrefixed(prefixes, decl) {
if (decl._autoprefixerMax) {
return decl._autoprefixerMax;
}
var max = 0;
for (var _iterator2 = _createForOfIteratorHelperLoose(prefixes), _step2; !(_step2 = _iterator2()).done;) {
var prefix = _step2.value;
prefix = utils.removeNote(prefix);
if (prefix.length > max) {
max = prefix.length;
}
}
decl._autoprefixerMax = max;
return decl._autoprefixerMax;
}
/**
* Calculate indentation to create visual cascade
*/
;
_proto.calcBefore = function calcBefore(prefixes, decl, prefix) {
if (prefix === void 0) {
prefix = '';
}
var max = this.maxPrefixed(prefixes, decl);
var diff = max - utils.removeNote(prefix).length;
var before = decl.raw('before');
if (diff > 0) {
before += Array(diff).fill(' ').join('');
}
return before;
}
/**
* Remove visual cascade
*/
;
_proto.restoreBefore = function restoreBefore(decl) {
var lines = decl.raw('before').split('\n');
var min = lines[lines.length - 1];
this.all.group(decl).up(function (prefixed) {
var array = prefixed.raw('before').split('\n');
var last = array[array.length - 1];
if (last.length < min.length) {
min = last;
}
});
lines[lines.length - 1] = min;
decl.raws.before = lines.join('\n');
}
/**
* Clone and insert new declaration
*/
;
_proto.insert = function insert(decl, prefix, prefixes) {
var cloned = this.set(this.clone(decl), prefix);
if (!cloned) return undefined;
var already = decl.parent.some(function (i) {
return i.prop === cloned.prop && i.value === cloned.value;
});
if (already) {
return undefined;
}
if (this.needCascade(decl)) {
cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
}
return decl.parent.insertBefore(decl, cloned);
}
/**
* Did this declaration has this prefix above
*/
;
_proto.isAlready = function isAlready(decl, prefixed) {
var already = this.all.group(decl).up(function (i) {
return i.prop === prefixed;
});
if (!already) {
already = this.all.group(decl).down(function (i) {
return i.prop === prefixed;
});
}
return already;
}
/**
* Clone and add prefixes for declaration
*/
;
_proto.add = function add(decl, prefix, prefixes, result) {
var prefixed = this.prefixed(decl.prop, prefix);
if (this.isAlready(decl, prefixed) || this.otherPrefixes(decl.value, prefix)) {
return undefined;
}
return this.insert(decl, prefix, prefixes, result);
}
/**
* Add spaces for visual cascade
*/
;
_proto.process = function process(decl, result) {
if (!this.needCascade(decl)) {
_Prefixer.prototype.process.call(this, decl, result);
return;
}
var prefixes = _Prefixer.prototype.process.call(this, decl, result);
if (!prefixes || !prefixes.length) {
return;
}
this.restoreBefore(decl);
decl.raws.before = this.calcBefore(prefixes, decl);
}
/**
* Return list of prefixed properties to clean old prefixes
*/
;
_proto.old = function old(prop, prefix) {
return [this.prefixed(prop, prefix)];
};
return Declaration;
}(Prefixer);
module.exports = Declaration;

View File

@@ -0,0 +1,79 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var flexSpec = require('./flex-spec');
var Declaration = require('../declaration');
var AlignContent = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(AlignContent, _Declaration);
function AlignContent() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = AlignContent.prototype;
/**
* Change property name for 2012 spec
*/
_proto.prefixed = function prefixed(prop, prefix) {
var spec;
var _flexSpec = flexSpec(prefix);
spec = _flexSpec[0];
prefix = _flexSpec[1];
if (spec === 2012) {
return prefix + 'flex-line-pack';
}
return _Declaration.prototype.prefixed.call(this, prop, prefix);
}
/**
* Return property name by final spec
*/
;
_proto.normalize = function normalize() {
return 'align-content';
}
/**
* Change value for 2012 spec and ignore prefix for 2009
*/
;
_proto.set = function set(decl, prefix) {
var spec = flexSpec(prefix)[0];
if (spec === 2012) {
decl.value = AlignContent.oldValues[decl.value] || decl.value;
return _Declaration.prototype.set.call(this, decl, prefix);
}
if (spec === 'final') {
return _Declaration.prototype.set.call(this, decl, prefix);
}
return undefined;
};
return AlignContent;
}(Declaration);
_defineProperty(AlignContent, "names", ['align-content', 'flex-line-pack']);
_defineProperty(AlignContent, "oldValues", {
'flex-end': 'end',
'flex-start': 'start',
'space-between': 'justify',
'space-around': 'distribute'
});
module.exports = AlignContent;

View File

@@ -0,0 +1,76 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var flexSpec = require('./flex-spec');
var Declaration = require('../declaration');
var AlignItems = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(AlignItems, _Declaration);
function AlignItems() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = AlignItems.prototype;
/**
* Change property name for 2009 and 2012 specs
*/
_proto.prefixed = function prefixed(prop, prefix) {
var spec;
var _flexSpec = flexSpec(prefix);
spec = _flexSpec[0];
prefix = _flexSpec[1];
if (spec === 2009) {
return prefix + 'box-align';
}
if (spec === 2012) {
return prefix + 'flex-align';
}
return _Declaration.prototype.prefixed.call(this, prop, prefix);
}
/**
* Return property name by final spec
*/
;
_proto.normalize = function normalize() {
return 'align-items';
}
/**
* Change value for 2009 and 2012 specs
*/
;
_proto.set = function set(decl, prefix) {
var spec = flexSpec(prefix)[0];
if (spec === 2009 || spec === 2012) {
decl.value = AlignItems.oldValues[decl.value] || decl.value;
}
return _Declaration.prototype.set.call(this, decl, prefix);
};
return AlignItems;
}(Declaration);
_defineProperty(AlignItems, "names", ['align-items', 'flex-align', 'box-align']);
_defineProperty(AlignItems, "oldValues", {
'flex-end': 'end',
'flex-start': 'start'
});
module.exports = AlignItems;

View File

@@ -0,0 +1,84 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var flexSpec = require('./flex-spec');
var Declaration = require('../declaration');
var AlignSelf = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(AlignSelf, _Declaration);
function AlignSelf() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = AlignSelf.prototype;
_proto.check = function check(decl) {
return decl.parent && !decl.parent.some(function (i) {
return i.prop && i.prop.startsWith('grid-');
});
}
/**
* Change property name for 2012 specs
*/
;
_proto.prefixed = function prefixed(prop, prefix) {
var spec;
var _flexSpec = flexSpec(prefix);
spec = _flexSpec[0];
prefix = _flexSpec[1];
if (spec === 2012) {
return prefix + 'flex-item-align';
}
return _Declaration.prototype.prefixed.call(this, prop, prefix);
}
/**
* Return property name by final spec
*/
;
_proto.normalize = function normalize() {
return 'align-self';
}
/**
* Change value for 2012 spec and ignore prefix for 2009
*/
;
_proto.set = function set(decl, prefix) {
var spec = flexSpec(prefix)[0];
if (spec === 2012) {
decl.value = AlignSelf.oldValues[decl.value] || decl.value;
return _Declaration.prototype.set.call(this, decl, prefix);
}
if (spec === 'final') {
return _Declaration.prototype.set.call(this, decl, prefix);
}
return undefined;
};
return AlignSelf;
}(Declaration);
_defineProperty(AlignSelf, "names", ['align-self', 'flex-item-align']);
_defineProperty(AlignSelf, "oldValues", {
'flex-end': 'end',
'flex-start': 'start'
});
module.exports = AlignSelf;

View File

@@ -0,0 +1,35 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var Animation = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(Animation, _Declaration);
function Animation() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = Animation.prototype;
/**
* Dont add prefixes for modern values.
*/
_proto.check = function check(decl) {
return !decl.value.split(/\s+/).some(function (i) {
var lower = i.toLowerCase();
return lower === 'reverse' || lower === 'alternate-reverse';
});
};
return Animation;
}(Declaration);
_defineProperty(Animation, "names", ['animation', 'animation-direction']);
module.exports = Animation;

View File

@@ -0,0 +1,39 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var utils = require('../utils');
var Appearance = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(Appearance, _Declaration);
function Appearance(name, prefixes, all) {
var _this;
_this = _Declaration.call(this, name, prefixes, all) || this;
if (_this.prefixes) {
_this.prefixes = utils.uniq(_this.prefixes.map(function (i) {
if (i === '-ms-') {
return '-webkit-';
}
return i;
}));
}
return _this;
}
return Appearance;
}(Declaration);
_defineProperty(Appearance, "names", ['appearance']);
module.exports = Appearance;

View File

@@ -0,0 +1,35 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var utils = require('../utils');
var BackdropFilter = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(BackdropFilter, _Declaration);
function BackdropFilter(name, prefixes, all) {
var _this;
_this = _Declaration.call(this, name, prefixes, all) || this;
if (_this.prefixes) {
_this.prefixes = utils.uniq(_this.prefixes.map(function (i) {
return i === '-ms-' ? '-webkit-' : i;
}));
}
return _this;
}
return BackdropFilter;
}(Declaration);
_defineProperty(BackdropFilter, "names", ['backdrop-filter']);
module.exports = BackdropFilter;

View File

@@ -0,0 +1,41 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var utils = require('../utils');
var BackgroundClip = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(BackgroundClip, _Declaration);
function BackgroundClip(name, prefixes, all) {
var _this;
_this = _Declaration.call(this, name, prefixes, all) || this;
if (_this.prefixes) {
_this.prefixes = utils.uniq(_this.prefixes.map(function (i) {
return i === '-ms-' ? '-webkit-' : i;
}));
}
return _this;
}
var _proto = BackgroundClip.prototype;
_proto.check = function check(decl) {
return decl.value.toLowerCase() === 'text';
};
return BackgroundClip;
}(Declaration);
_defineProperty(BackgroundClip, "names", ['background-clip']);
module.exports = BackgroundClip;

View File

@@ -0,0 +1,38 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var BackgroundSize = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(BackgroundSize, _Declaration);
function BackgroundSize() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = BackgroundSize.prototype;
/**
* Duplication parameter for -webkit- browsers
*/
_proto.set = function set(decl, prefix) {
var value = decl.value.toLowerCase();
if (prefix === '-webkit-' && !value.includes(' ') && value !== 'contain' && value !== 'cover') {
decl.value = decl.value + ' ' + decl.value;
}
return _Declaration.prototype.set.call(this, decl, prefix);
};
return BackgroundSize;
}(Declaration);
_defineProperty(BackgroundSize, "names", ['background-size']);
module.exports = BackgroundSize;

View File

@@ -0,0 +1,48 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var BlockLogical = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(BlockLogical, _Declaration);
function BlockLogical() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = BlockLogical.prototype;
/**
* Use old syntax for -moz- and -webkit-
*/
_proto.prefixed = function prefixed(prop, prefix) {
if (prop.includes('-start')) {
return prefix + prop.replace('-block-start', '-before');
}
return prefix + prop.replace('-block-end', '-after');
}
/**
* Return property name by spec
*/
;
_proto.normalize = function normalize(prop) {
if (prop.includes('-before')) {
return prop.replace('-before', '-block-start');
}
return prop.replace('-after', '-block-end');
};
return BlockLogical;
}(Declaration);
_defineProperty(BlockLogical, "names", ['border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end', 'border-before', 'border-after', 'margin-before', 'margin-after', 'padding-before', 'padding-after']);
module.exports = BlockLogical;

View File

@@ -0,0 +1,33 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var BorderImage = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(BorderImage, _Declaration);
function BorderImage() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = BorderImage.prototype;
/**
* Remove fill parameter for prefixed declarations
*/
_proto.set = function set(decl, prefix) {
decl.value = decl.value.replace(/\s+fill(\s)/, '$1');
return _Declaration.prototype.set.call(this, decl, prefix);
};
return BorderImage;
}(Declaration);
_defineProperty(BorderImage, "names", ['border-image']);
module.exports = BorderImage;

View File

@@ -0,0 +1,62 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var BorderRadius = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(BorderRadius, _Declaration);
function BorderRadius() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = BorderRadius.prototype;
/**
* Change syntax, when add Mozilla prefix
*/
_proto.prefixed = function prefixed(prop, prefix) {
if (prefix === '-moz-') {
return prefix + (BorderRadius.toMozilla[prop] || prop);
}
return _Declaration.prototype.prefixed.call(this, prop, prefix);
}
/**
* Return unprefixed version of property
*/
;
_proto.normalize = function normalize(prop) {
return BorderRadius.toNormal[prop] || prop;
};
return BorderRadius;
}(Declaration);
_defineProperty(BorderRadius, "names", ['border-radius']);
_defineProperty(BorderRadius, "toMozilla", {});
_defineProperty(BorderRadius, "toNormal", {});
for (var _i = 0, _arr = ['top', 'bottom']; _i < _arr.length; _i++) {
var ver = _arr[_i];
for (var _i2 = 0, _arr2 = ['left', 'right']; _i2 < _arr2.length; _i2++) {
var hor = _arr2[_i2];
var normal = "border-" + ver + "-" + hor + "-radius";
var mozilla = "border-radius-" + ver + hor;
BorderRadius.names.push(normal);
BorderRadius.names.push(mozilla);
BorderRadius.toMozilla[normal] = mozilla;
BorderRadius.toNormal[mozilla] = normal;
}
}
module.exports = BorderRadius;

View File

@@ -0,0 +1,76 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var BreakProps = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(BreakProps, _Declaration);
function BreakProps() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = BreakProps.prototype;
/**
* Change name for -webkit- and -moz- prefix
*/
_proto.prefixed = function prefixed(prop, prefix) {
return prefix + "column-" + prop;
}
/**
* Return property name by final spec
*/
;
_proto.normalize = function normalize(prop) {
if (prop.includes('inside')) {
return 'break-inside';
}
if (prop.includes('before')) {
return 'break-before';
}
return 'break-after';
}
/**
* Change prefixed value for avoid-column and avoid-page
*/
;
_proto.set = function set(decl, prefix) {
if (decl.prop === 'break-inside' && decl.value === 'avoid-column' || decl.value === 'avoid-page') {
decl.value = 'avoid';
}
return _Declaration.prototype.set.call(this, decl, prefix);
}
/**
* Dont prefix some values
*/
;
_proto.insert = function insert(decl, prefix, prefixes) {
if (decl.prop !== 'break-inside') {
return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
}
if (/region/i.test(decl.value) || /page/i.test(decl.value)) {
return undefined;
}
return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
};
return BreakProps;
}(Declaration);
_defineProperty(BreakProps, "names", ['break-inside', 'page-break-inside', 'column-break-inside', 'break-before', 'page-break-before', 'column-break-before', 'break-after', 'page-break-after', 'column-break-after']);
module.exports = BreakProps;

View File

@@ -0,0 +1,40 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var ColorAdjust = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(ColorAdjust, _Declaration);
function ColorAdjust() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = ColorAdjust.prototype;
/**
* Change property name for WebKit-based browsers
*/
_proto.prefixed = function prefixed(prop, prefix) {
return prefix + 'print-color-adjust';
}
/**
* Return property name by spec
*/
;
_proto.normalize = function normalize() {
return 'color-adjust';
};
return ColorAdjust;
}(Declaration);
_defineProperty(ColorAdjust, "names", ['color-adjust', 'print-color-adjust']);
module.exports = ColorAdjust;

View File

@@ -0,0 +1,54 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var list = require('postcss').list;
var Value = require('../value');
var CrossFade = /*#__PURE__*/function (_Value) {
_inheritsLoose(CrossFade, _Value);
function CrossFade() {
return _Value.apply(this, arguments) || this;
}
var _proto = CrossFade.prototype;
_proto.replace = function replace(string, prefix) {
var _this = this;
return list.space(string).map(function (value) {
if (value.slice(0, +_this.name.length + 1) !== _this.name + '(') {
return value;
}
var close = value.lastIndexOf(')');
var after = value.slice(close + 1);
var args = value.slice(_this.name.length + 1, close);
if (prefix === '-webkit-') {
var match = args.match(/\d*.?\d+%?/);
if (match) {
args = args.slice(match[0].length).trim();
args += ", " + match[0];
} else {
args += ', 0.5';
}
}
return prefix + _this.name + '(' + args + ')' + after;
}).join(' ');
};
return CrossFade;
}(Value);
_defineProperty(CrossFade, "names", ['cross-fade']);
module.exports = CrossFade;

View File

@@ -0,0 +1,94 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var flexSpec = require('./flex-spec');
var OldValue = require('../old-value');
var Value = require('../value');
var DisplayFlex = /*#__PURE__*/function (_Value) {
_inheritsLoose(DisplayFlex, _Value);
function DisplayFlex(name, prefixes) {
var _this;
_this = _Value.call(this, name, prefixes) || this;
if (name === 'display-flex') {
_this.name = 'flex';
}
return _this;
}
/**
* Faster check for flex value
*/
var _proto = DisplayFlex.prototype;
_proto.check = function check(decl) {
return decl.prop === 'display' && decl.value === this.name;
}
/**
* Return value by spec
*/
;
_proto.prefixed = function prefixed(prefix) {
var spec, value;
var _flexSpec = flexSpec(prefix);
spec = _flexSpec[0];
prefix = _flexSpec[1];
if (spec === 2009) {
if (this.name === 'flex') {
value = 'box';
} else {
value = 'inline-box';
}
} else if (spec === 2012) {
if (this.name === 'flex') {
value = 'flexbox';
} else {
value = 'inline-flexbox';
}
} else if (spec === 'final') {
value = this.name;
}
return prefix + value;
}
/**
* Add prefix to value depend on flebox spec version
*/
;
_proto.replace = function replace(string, prefix) {
return this.prefixed(prefix);
}
/**
* Change value for old specs
*/
;
_proto.old = function old(prefix) {
var prefixed = this.prefixed(prefix);
if (!prefixed) return undefined;
return new OldValue(this.name, prefixed);
};
return DisplayFlex;
}(Value);
_defineProperty(DisplayFlex, "names", ['display-flex', 'inline-flex']);
module.exports = DisplayFlex;

View File

@@ -0,0 +1,41 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Value = require('../value');
var DisplayGrid = /*#__PURE__*/function (_Value) {
_inheritsLoose(DisplayGrid, _Value);
function DisplayGrid(name, prefixes) {
var _this;
_this = _Value.call(this, name, prefixes) || this;
if (name === 'display-grid') {
_this.name = 'grid';
}
return _this;
}
/**
* Faster check for flex value
*/
var _proto = DisplayGrid.prototype;
_proto.check = function check(decl) {
return decl.prop === 'display' && decl.value === this.name;
};
return DisplayGrid;
}(Value);
_defineProperty(DisplayGrid, "names", ['display-grid', 'inline-grid']);
module.exports = DisplayGrid;

View File

@@ -0,0 +1,31 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Value = require('../value');
var FilterValue = /*#__PURE__*/function (_Value) {
_inheritsLoose(FilterValue, _Value);
function FilterValue(name, prefixes) {
var _this;
_this = _Value.call(this, name, prefixes) || this;
if (name === 'filter-function') {
_this.name = 'filter';
}
return _this;
}
return FilterValue;
}(Value);
_defineProperty(FilterValue, "names", ['filter', 'filter-function']);
module.exports = FilterValue;

View File

@@ -0,0 +1,33 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var Filter = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(Filter, _Declaration);
function Filter() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = Filter.prototype;
/**
* Check is it Internet Explorer filter
*/
_proto.check = function check(decl) {
var v = decl.value;
return !v.toLowerCase().includes('alpha(') && !v.includes('DXImageTransform.Microsoft') && !v.includes('data:image/svg+xml');
};
return Filter;
}(Declaration);
_defineProperty(Filter, "names", ['filter']);
module.exports = Filter;

View File

@@ -0,0 +1,72 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var flexSpec = require('./flex-spec');
var Declaration = require('../declaration');
var FlexBasis = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(FlexBasis, _Declaration);
function FlexBasis() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = FlexBasis.prototype;
/**
* Return property name by final spec
*/
_proto.normalize = function normalize() {
return 'flex-basis';
}
/**
* Return flex property for 2012 spec
*/
;
_proto.prefixed = function prefixed(prop, prefix) {
var spec;
var _flexSpec = flexSpec(prefix);
spec = _flexSpec[0];
prefix = _flexSpec[1];
if (spec === 2012) {
return prefix + 'flex-preferred-size';
}
return _Declaration.prototype.prefixed.call(this, prop, prefix);
}
/**
* Ignore 2009 spec and use flex property for 2012
*/
;
_proto.set = function set(decl, prefix) {
var spec;
var _flexSpec2 = flexSpec(prefix);
spec = _flexSpec2[0];
prefix = _flexSpec2[1];
if (spec === 2012 || spec === 'final') {
return _Declaration.prototype.set.call(this, decl, prefix);
}
return undefined;
};
return FlexBasis;
}(Declaration);
_defineProperty(FlexBasis, "names", ['flex-basis', 'flex-preferred-size']);
module.exports = FlexBasis;

View File

@@ -0,0 +1,108 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var flexSpec = require('./flex-spec');
var Declaration = require('../declaration');
var FlexDirection = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(FlexDirection, _Declaration);
function FlexDirection() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = FlexDirection.prototype;
/**
* Return property name by final spec
*/
_proto.normalize = function normalize() {
return 'flex-direction';
}
/**
* Use two properties for 2009 spec
*/
;
_proto.insert = function insert(decl, prefix, prefixes) {
var spec;
var _flexSpec = flexSpec(prefix);
spec = _flexSpec[0];
prefix = _flexSpec[1];
if (spec !== 2009) {
return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
}
var already = decl.parent.some(function (i) {
return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
});
if (already) {
return undefined;
}
var v = decl.value;
var orient, dir;
if (v === 'inherit' || v === 'initial' || v === 'unset') {
orient = v;
dir = v;
} else {
orient = v.includes('row') ? 'horizontal' : 'vertical';
dir = v.includes('reverse') ? 'reverse' : 'normal';
}
var cloned = this.clone(decl);
cloned.prop = prefix + 'box-orient';
cloned.value = orient;
if (this.needCascade(decl)) {
cloned.raws.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.raws.before = this.calcBefore(prefixes, decl, prefix);
}
return decl.parent.insertBefore(decl, cloned);
}
/**
* Clean two properties for 2009 spec
*/
;
_proto.old = function old(prop, prefix) {
var spec;
var _flexSpec2 = flexSpec(prefix);
spec = _flexSpec2[0];
prefix = _flexSpec2[1];
if (spec === 2009) {
return [prefix + 'box-orient', prefix + 'box-direction'];
} else {
return _Declaration.prototype.old.call(this, prop, prefix);
}
};
return FlexDirection;
}(Declaration);
_defineProperty(FlexDirection, "names", ['flex-direction', 'box-direction', 'box-orient']);
module.exports = FlexDirection;

View File

@@ -0,0 +1,81 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var flexSpec = require('./flex-spec');
var Declaration = require('../declaration');
var FlexFlow = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(FlexFlow, _Declaration);
function FlexFlow() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = FlexFlow.prototype;
/**
* Use two properties for 2009 spec
*/
_proto.insert = function insert(decl, prefix, prefixes) {
var spec;
var _flexSpec = flexSpec(prefix);
spec = _flexSpec[0];
prefix = _flexSpec[1];
if (spec !== 2009) {
return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
}
var values = decl.value.split(/\s+/).filter(function (i) {
return i !== 'wrap' && i !== 'nowrap' && 'wrap-reverse';
});
if (values.length === 0) {
return undefined;
}
var already = decl.parent.some(function (i) {
return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
});
if (already) {
return undefined;
}
var value = values[0];
var orient = value.includes('row') ? 'horizontal' : 'vertical';
var dir = value.includes('reverse') ? 'reverse' : 'normal';
var cloned = this.clone(decl);
cloned.prop = prefix + 'box-orient';
cloned.value = orient;
if (this.needCascade(decl)) {
cloned.raws.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.raws.before = this.calcBefore(prefixes, decl, prefix);
}
return decl.parent.insertBefore(decl, cloned);
};
return FlexFlow;
}(Declaration);
_defineProperty(FlexFlow, "names", ['flex-flow', 'box-direction', 'box-orient']);
module.exports = FlexFlow;

View File

@@ -0,0 +1,57 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var flexSpec = require('./flex-spec');
var Declaration = require('../declaration');
var Flex = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(Flex, _Declaration);
function Flex() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = Flex.prototype;
/**
* Return property name by final spec
*/
_proto.normalize = function normalize() {
return 'flex';
}
/**
* Return flex property for 2009 and 2012 specs
*/
;
_proto.prefixed = function prefixed(prop, prefix) {
var spec;
var _flexSpec = flexSpec(prefix);
spec = _flexSpec[0];
prefix = _flexSpec[1];
if (spec === 2009) {
return prefix + 'box-flex';
}
if (spec === 2012) {
return prefix + 'flex-positive';
}
return _Declaration.prototype.prefixed.call(this, prop, prefix);
};
return Flex;
}(Declaration);
_defineProperty(Flex, "names", ['flex-grow', 'flex-positive']);
module.exports = Flex;

View File

@@ -0,0 +1,72 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var flexSpec = require('./flex-spec');
var Declaration = require('../declaration');
var FlexShrink = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(FlexShrink, _Declaration);
function FlexShrink() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = FlexShrink.prototype;
/**
* Return property name by final spec
*/
_proto.normalize = function normalize() {
return 'flex-shrink';
}
/**
* Return flex property for 2012 spec
*/
;
_proto.prefixed = function prefixed(prop, prefix) {
var spec;
var _flexSpec = flexSpec(prefix);
spec = _flexSpec[0];
prefix = _flexSpec[1];
if (spec === 2012) {
return prefix + 'flex-negative';
}
return _Declaration.prototype.prefixed.call(this, prop, prefix);
}
/**
* Ignore 2009 spec and use flex property for 2012
*/
;
_proto.set = function set(decl, prefix) {
var spec;
var _flexSpec2 = flexSpec(prefix);
spec = _flexSpec2[0];
prefix = _flexSpec2[1];
if (spec === 2012 || spec === 'final') {
return _Declaration.prototype.set.call(this, decl, prefix);
}
return undefined;
};
return FlexShrink;
}(Declaration);
_defineProperty(FlexShrink, "names", ['flex-shrink', 'flex-negative']);
module.exports = FlexShrink;

View File

@@ -0,0 +1,22 @@
"use strict";
/**
* Return flexbox spec versions by prefix
*/
module.exports = function (prefix) {
var spec;
if (prefix === '-webkit- 2009' || prefix === '-moz-') {
spec = 2009;
} else if (prefix === '-ms-') {
spec = 2012;
} else if (prefix === '-webkit-') {
spec = 'final';
}
if (prefix === '-webkit- 2009') {
prefix = '-webkit-';
}
return [spec, prefix];
};

View File

@@ -0,0 +1,40 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var flexSpec = require('./flex-spec');
var Declaration = require('../declaration');
var FlexWrap = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(FlexWrap, _Declaration);
function FlexWrap() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = FlexWrap.prototype;
/**
* Don't add prefix for 2009 spec
*/
_proto.set = function set(decl, prefix) {
var spec = flexSpec(prefix)[0];
if (spec !== 2009) {
return _Declaration.prototype.set.call(this, decl, prefix);
}
return undefined;
};
return FlexWrap;
}(Declaration);
_defineProperty(FlexWrap, "names", ['flex-wrap']);
module.exports = FlexWrap;

85
CTOAsYouGo/node_modules/autoprefixer/lib/hacks/flex.js generated vendored Normal file
View File

@@ -0,0 +1,85 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var list = require('postcss').list;
var flexSpec = require('./flex-spec');
var Declaration = require('../declaration');
var Flex = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(Flex, _Declaration);
function Flex() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = Flex.prototype;
/**
* Change property name for 2009 spec
*/
_proto.prefixed = function prefixed(prop, prefix) {
var spec;
var _flexSpec = flexSpec(prefix);
spec = _flexSpec[0];
prefix = _flexSpec[1];
if (spec === 2009) {
return prefix + 'box-flex';
}
return _Declaration.prototype.prefixed.call(this, prop, prefix);
}
/**
* Return property name by final spec
*/
;
_proto.normalize = function normalize() {
return 'flex';
}
/**
* Spec 2009 supports only first argument
* Spec 2012 disallows unitless basis
*/
;
_proto.set = function set(decl, prefix) {
var spec = flexSpec(prefix)[0];
if (spec === 2009) {
decl.value = list.space(decl.value)[0];
decl.value = Flex.oldValues[decl.value] || decl.value;
return _Declaration.prototype.set.call(this, decl, prefix);
}
if (spec === 2012) {
var components = list.space(decl.value);
if (components.length === 3 && components[2] === '0') {
decl.value = components.slice(0, 2).concat('0px').join(' ');
}
}
return _Declaration.prototype.set.call(this, decl, prefix);
};
return Flex;
}(Declaration);
_defineProperty(Flex, "names", ['flex', 'box-flex']);
_defineProperty(Flex, "oldValues", {
auto: '1',
none: '0'
});
module.exports = Flex;

View File

@@ -0,0 +1,40 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Selector = require('../selector');
var Fullscreen = /*#__PURE__*/function (_Selector) {
_inheritsLoose(Fullscreen, _Selector);
function Fullscreen() {
return _Selector.apply(this, arguments) || this;
}
var _proto = Fullscreen.prototype;
/**
* Return different selectors depend on prefix
*/
_proto.prefixed = function prefixed(prefix) {
if (prefix === '-webkit-') {
return ':-webkit-full-screen';
}
if (prefix === '-moz-') {
return ':-moz-full-screen';
}
return ":" + prefix + "fullscreen";
};
return Fullscreen;
}(Selector);
_defineProperty(Fullscreen, "names", [':fullscreen']);
module.exports = Fullscreen;

View File

@@ -0,0 +1,519 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var parser = require('postcss-value-parser');
var range = require('normalize-range');
var OldValue = require('../old-value');
var Value = require('../value');
var utils = require('../utils');
var IS_DIRECTION = /top|left|right|bottom/gi;
var Gradient = /*#__PURE__*/function (_Value) {
_inheritsLoose(Gradient, _Value);
function Gradient() {
var _this;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _Value.call.apply(_Value, [this].concat(args)) || this;
_defineProperty(_assertThisInitialized(_this), "directions", {
top: 'bottom',
left: 'right',
bottom: 'top',
right: 'left'
});
_defineProperty(_assertThisInitialized(_this), "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'
});
return _this;
}
var _proto = Gradient.prototype;
/**
* Change degrees for webkit prefix
*/
_proto.replace = function replace(string, prefix) {
var ast = parser(string);
for (var _iterator = _createForOfIteratorHelperLoose(ast.nodes), _step; !(_step = _iterator()).done;) {
var node = _step.value;
if (node.type === 'function' && node.value === this.name) {
node.nodes = this.newDirection(node.nodes);
node.nodes = this.normalize(node.nodes);
if (prefix === '-webkit- old') {
var changes = this.oldWebkit(node);
if (!changes) {
return false;
}
} else {
node.nodes = this.convertDirection(node.nodes);
node.value = prefix + node.value;
}
}
}
return ast.toString();
}
/**
* Replace first token
*/
;
_proto.replaceFirst = function replaceFirst(params) {
for (var _len2 = arguments.length, words = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
words[_key2 - 1] = arguments[_key2];
}
var prefix = words.map(function (i) {
if (i === ' ') {
return {
type: 'space',
value: i
};
}
return {
type: 'word',
value: i
};
});
return prefix.concat(params.slice(1));
}
/**
* Convert angle unit to deg
*/
;
_proto.normalizeUnit = function normalizeUnit(str, full) {
var num = parseFloat(str);
var deg = num / full * 360;
return deg + "deg";
}
/**
* Normalize angle
*/
;
_proto.normalize = function normalize(nodes) {
if (!nodes[0]) return nodes;
if (/-?\d+(.\d+)?grad/.test(nodes[0].value)) {
nodes[0].value = this.normalizeUnit(nodes[0].value, 400);
} else if (/-?\d+(.\d+)?rad/.test(nodes[0].value)) {
nodes[0].value = this.normalizeUnit(nodes[0].value, 2 * Math.PI);
} else if (/-?\d+(.\d+)?turn/.test(nodes[0].value)) {
nodes[0].value = this.normalizeUnit(nodes[0].value, 1);
} else if (nodes[0].value.includes('deg')) {
var num = parseFloat(nodes[0].value);
num = range.wrap(0, 360, num);
nodes[0].value = num + "deg";
}
if (nodes[0].value === '0deg') {
nodes = this.replaceFirst(nodes, 'to', ' ', 'top');
} else if (nodes[0].value === '90deg') {
nodes = this.replaceFirst(nodes, 'to', ' ', 'right');
} else if (nodes[0].value === '180deg') {
nodes = this.replaceFirst(nodes, 'to', ' ', 'bottom');
} else if (nodes[0].value === '270deg') {
nodes = this.replaceFirst(nodes, 'to', ' ', 'left');
}
return nodes;
}
/**
* Replace old direction to new
*/
;
_proto.newDirection = function newDirection(params) {
if (params[0].value === 'to') {
return params;
}
IS_DIRECTION.lastIndex = 0; // reset search index of global regexp
if (!IS_DIRECTION.test(params[0].value)) {
return params;
}
params.unshift({
type: 'word',
value: 'to'
}, {
type: 'space',
value: ' '
});
for (var i = 2; i < params.length; i++) {
if (params[i].type === 'div') {
break;
}
if (params[i].type === 'word') {
params[i].value = this.revertDirection(params[i].value);
}
}
return params;
}
/**
* Look for at word
*/
;
_proto.isRadial = function isRadial(params) {
var state = 'before';
for (var _iterator2 = _createForOfIteratorHelperLoose(params), _step2; !(_step2 = _iterator2()).done;) {
var param = _step2.value;
if (state === 'before' && param.type === 'space') {
state = 'at';
} else if (state === 'at' && param.value === 'at') {
state = 'after';
} else if (state === 'after' && param.type === 'space') {
return true;
} else if (param.type === 'div') {
break;
} else {
state = 'before';
}
}
return false;
}
/**
* Change new direction to old
*/
;
_proto.convertDirection = function convertDirection(params) {
if (params.length > 0) {
if (params[0].value === 'to') {
this.fixDirection(params);
} else if (params[0].value.includes('deg')) {
this.fixAngle(params);
} else if (this.isRadial(params)) {
this.fixRadial(params);
}
}
return params;
}
/**
* Replace `to top left` to `bottom right`
*/
;
_proto.fixDirection = function fixDirection(params) {
params.splice(0, 2);
for (var _iterator3 = _createForOfIteratorHelperLoose(params), _step3; !(_step3 = _iterator3()).done;) {
var param = _step3.value;
if (param.type === 'div') {
break;
}
if (param.type === 'word') {
param.value = this.revertDirection(param.value);
}
}
}
/**
* Add 90 degrees
*/
;
_proto.fixAngle = function fixAngle(params) {
var first = params[0].value;
first = parseFloat(first);
first = Math.abs(450 - first) % 360;
first = this.roundFloat(first, 3);
params[0].value = first + "deg";
}
/**
* Fix radial direction syntax
*/
;
_proto.fixRadial = function fixRadial(params) {
var first = [];
var second = [];
var a, b, c, i, next;
for (i = 0; i < params.length - 2; i++) {
a = params[i];
b = params[i + 1];
c = params[i + 2];
if (a.type === 'space' && b.value === 'at' && c.type === 'space') {
next = i + 3;
break;
} else {
first.push(a);
}
}
var div;
for (i = next; i < params.length; i++) {
if (params[i].type === 'div') {
div = params[i];
break;
} else {
second.push(params[i]);
}
}
params.splice.apply(params, [0, i].concat(second, [div], first));
};
_proto.revertDirection = function revertDirection(word) {
return this.directions[word.toLowerCase()] || word;
}
/**
* Round float and save digits under dot
*/
;
_proto.roundFloat = function roundFloat(_float, digits) {
return parseFloat(_float.toFixed(digits));
}
/**
* Convert to old webkit syntax
*/
;
_proto.oldWebkit = function oldWebkit(node) {
var nodes = node.nodes;
var string = parser.stringify(node.nodes);
if (this.name !== 'linear-gradient') {
return false;
}
if (nodes[0] && nodes[0].value.includes('deg')) {
return false;
}
if (string.includes('px') || string.includes('-corner') || string.includes('-side')) {
return false;
}
var params = [[]];
for (var _iterator4 = _createForOfIteratorHelperLoose(nodes), _step4; !(_step4 = _iterator4()).done;) {
var i = _step4.value;
params[params.length - 1].push(i);
if (i.type === 'div' && i.value === ',') {
params.push([]);
}
}
this.oldDirection(params);
this.colorStops(params);
node.nodes = [];
for (var _i = 0, _params = params; _i < _params.length; _i++) {
var param = _params[_i];
node.nodes = node.nodes.concat(param);
}
node.nodes.unshift({
type: 'word',
value: 'linear'
}, this.cloneDiv(node.nodes));
node.value = '-webkit-gradient';
return true;
}
/**
* Change direction syntax to old webkit
*/
;
_proto.oldDirection = function oldDirection(params) {
var div = this.cloneDiv(params[0]);
if (params[0][0].value !== 'to') {
return params.unshift([{
type: 'word',
value: this.oldDirections.bottom
}, div]);
} else {
var words = [];
for (var _iterator5 = _createForOfIteratorHelperLoose(params[0].slice(2)), _step5; !(_step5 = _iterator5()).done;) {
var node = _step5.value;
if (node.type === 'word') {
words.push(node.value.toLowerCase());
}
}
words = words.join(' ');
var old = this.oldDirections[words] || words;
params[0] = [{
type: 'word',
value: old
}, div];
return params[0];
}
}
/**
* Get div token from exists parameters
*/
;
_proto.cloneDiv = function cloneDiv(params) {
for (var _iterator6 = _createForOfIteratorHelperLoose(params), _step6; !(_step6 = _iterator6()).done;) {
var i = _step6.value;
if (i.type === 'div' && i.value === ',') {
return i;
}
}
return {
type: 'div',
value: ',',
after: ' '
};
}
/**
* Change colors syntax to old webkit
*/
;
_proto.colorStops = function colorStops(params) {
var result = [];
for (var i = 0; i < params.length; i++) {
var pos = void 0;
var param = params[i];
var item = void 0;
if (i === 0) {
continue;
}
var color = parser.stringify(param[0]);
if (param[1] && param[1].type === 'word') {
pos = param[1].value;
} else if (param[2] && param[2].type === 'word') {
pos = param[2].value;
}
var stop = void 0;
if (i === 1 && (!pos || pos === '0%')) {
stop = "from(" + color + ")";
} else if (i === params.length - 1 && (!pos || pos === '100%')) {
stop = "to(" + color + ")";
} else if (pos) {
stop = "color-stop(" + pos + ", " + color + ")";
} else {
stop = "color-stop(" + color + ")";
}
var div = param[param.length - 1];
params[i] = [{
type: 'word',
value: stop
}];
if (div.type === 'div' && div.value === ',') {
item = params[i].push(div);
}
result.push(item);
}
return result;
}
/**
* Remove old WebKit gradient too
*/
;
_proto.old = function old(prefix) {
if (prefix === '-webkit-') {
var type = this.name === 'linear-gradient' ? 'linear' : 'radial';
var string = '-gradient';
var regexp = utils.regexp("-webkit-(" + type + "-gradient|gradient\\(\\s*" + type + ")", false);
return new OldValue(this.name, prefix + this.name, string, regexp);
} else {
return _Value.prototype.old.call(this, prefix);
}
}
/**
* Do not add non-webkit prefixes for list-style and object
*/
;
_proto.add = function add(decl, prefix) {
var p = decl.prop;
if (p.includes('mask')) {
if (prefix === '-webkit-' || prefix === '-webkit- old') {
return _Value.prototype.add.call(this, decl, prefix);
}
} else if (p === 'list-style' || p === 'list-style-image' || p === 'content') {
if (prefix === '-webkit-' || prefix === '-webkit- old') {
return _Value.prototype.add.call(this, decl, prefix);
}
} else {
return _Value.prototype.add.call(this, decl, prefix);
}
return undefined;
};
return Gradient;
}(Value);
_defineProperty(Gradient, "names", ['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient']);
module.exports = Gradient;

View File

@@ -0,0 +1,52 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var utils = require('./grid-utils');
var GridArea = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(GridArea, _Declaration);
function GridArea() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = GridArea.prototype;
/**
* Translate grid-area to separate -ms- prefixed properties
*/
_proto.insert = function insert(decl, prefix, prefixes, result) {
if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
var values = utils.parse(decl);
var _utils$translate = utils.translate(values, 0, 2),
rowStart = _utils$translate[0],
rowSpan = _utils$translate[1];
var _utils$translate2 = utils.translate(values, 1, 3),
columnStart = _utils$translate2[0],
columnSpan = _utils$translate2[1];
[['grid-row', rowStart], ['grid-row-span', rowSpan], ['grid-column', columnStart], ['grid-column-span', columnSpan]].forEach(function (_ref) {
var prop = _ref[0],
value = _ref[1];
utils.insertDecl(decl, prop, value);
});
utils.warnTemplateSelectorNotFound(decl, result);
utils.warnIfGridRowColumnExists(decl, result);
return undefined;
};
return GridArea;
}(Declaration);
_defineProperty(GridArea, "names", ['grid-area']);
module.exports = GridArea;

View File

@@ -0,0 +1,48 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var GridColumnAlign = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(GridColumnAlign, _Declaration);
function GridColumnAlign() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = GridColumnAlign.prototype;
/**
* Do not prefix flexbox values
*/
_proto.check = function check(decl) {
return !decl.value.includes('flex-') && decl.value !== 'baseline';
}
/**
* Change property name for IE
*/
;
_proto.prefixed = function prefixed(prop, prefix) {
return prefix + 'grid-column-align';
}
/**
* Change IE property back
*/
;
_proto.normalize = function normalize() {
return 'justify-self';
};
return GridColumnAlign;
}(Declaration);
_defineProperty(GridColumnAlign, "names", ['grid-column-align']);
module.exports = GridColumnAlign;

View File

@@ -0,0 +1,62 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var GridEnd = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(GridEnd, _Declaration);
function GridEnd() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = GridEnd.prototype;
/**
* Change repeating syntax for IE
*/
_proto.insert = function insert(decl, prefix, prefixes, result) {
if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
var clonedDecl = this.clone(decl);
var startProp = decl.prop.replace(/end$/, 'start');
var spanProp = prefix + decl.prop.replace(/end$/, 'span');
if (decl.parent.some(function (i) {
return i.prop === spanProp;
})) {
return undefined;
}
clonedDecl.prop = spanProp;
if (decl.value.includes('span')) {
clonedDecl.value = decl.value.replace(/span\s/i, '');
} else {
var startDecl;
decl.parent.walkDecls(startProp, function (d) {
startDecl = d;
});
if (startDecl) {
var value = Number(decl.value) - Number(startDecl.value) + '';
clonedDecl.value = value;
} else {
decl.warn(result, "Can not prefix " + decl.prop + " (" + startProp + " is not found)");
}
}
decl.cloneBefore(clonedDecl);
return undefined;
};
return GridEnd;
}(Declaration);
_defineProperty(GridEnd, "names", ['grid-row-end', 'grid-column-end']);
module.exports = GridEnd;

View File

@@ -0,0 +1,48 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var GridRowAlign = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(GridRowAlign, _Declaration);
function GridRowAlign() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = GridRowAlign.prototype;
/**
* Do not prefix flexbox values
*/
_proto.check = function check(decl) {
return !decl.value.includes('flex-') && decl.value !== 'baseline';
}
/**
* Change property name for IE
*/
;
_proto.prefixed = function prefixed(prop, prefix) {
return prefix + 'grid-row-align';
}
/**
* Change IE property back
*/
;
_proto.normalize = function normalize() {
return 'align-self';
};
return GridRowAlign;
}(Declaration);
_defineProperty(GridRowAlign, "names", ['grid-row-align']);
module.exports = GridRowAlign;

View File

@@ -0,0 +1,52 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var utils = require('./grid-utils');
var GridRowColumn = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(GridRowColumn, _Declaration);
function GridRowColumn() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = GridRowColumn.prototype;
/**
* Translate grid-row / grid-column to separate -ms- prefixed properties
*/
_proto.insert = function insert(decl, prefix, prefixes) {
if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
var values = utils.parse(decl);
var _utils$translate = utils.translate(values, 0, 1),
start = _utils$translate[0],
span = _utils$translate[1];
var hasStartValueSpan = values[0] && values[0].includes('span');
if (hasStartValueSpan) {
span = values[0].join('').replace(/\D/g, '');
}
[[decl.prop, start], [decl.prop + "-span", span]].forEach(function (_ref) {
var prop = _ref[0],
value = _ref[1];
utils.insertDecl(decl, prop, value);
});
return undefined;
};
return GridRowColumn;
}(Declaration);
_defineProperty(GridRowColumn, "names", ['grid-row', 'grid-column']);
module.exports = GridRowColumn;

View File

@@ -0,0 +1,149 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var _require = require('./grid-utils'),
prefixTrackProp = _require.prefixTrackProp,
prefixTrackValue = _require.prefixTrackValue,
autoplaceGridItems = _require.autoplaceGridItems,
getGridGap = _require.getGridGap,
inheritGridGap = _require.inheritGridGap;
var Processor = require('../processor');
var GridRowsColumns = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(GridRowsColumns, _Declaration);
function GridRowsColumns() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = GridRowsColumns.prototype;
/**
* Change property name for IE
*/
_proto.prefixed = function prefixed(prop, prefix) {
if (prefix === '-ms-') {
return prefixTrackProp({
prop: prop,
prefix: prefix
});
}
return _Declaration.prototype.prefixed.call(this, prop, prefix);
}
/**
* Change IE property back
*/
;
_proto.normalize = function normalize(prop) {
return prop.replace(/^grid-(rows|columns)/, 'grid-template-$1');
};
_proto.insert = function insert(decl, prefix, prefixes, result) {
if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
var parent = decl.parent,
prop = decl.prop,
value = decl.value;
var isRowProp = prop.includes('rows');
var isColumnProp = prop.includes('columns');
var hasGridTemplate = parent.some(function (i) {
return i.prop === 'grid-template' || i.prop === 'grid-template-areas';
});
/**
* Not to prefix rows declaration if grid-template(-areas) is present
*/
if (hasGridTemplate && isRowProp) {
return false;
}
var processor = new Processor({
options: {}
});
var status = processor.gridStatus(parent, result);
var gap = getGridGap(decl);
gap = inheritGridGap(decl, gap) || gap;
var gapValue = isRowProp ? gap.row : gap.column;
if ((status === 'no-autoplace' || status === true) && !hasGridTemplate) {
gapValue = null;
}
var prefixValue = prefixTrackValue({
value: value,
gap: gapValue
});
/**
* Insert prefixes
*/
decl.cloneBefore({
prop: prefixTrackProp({
prop: prop,
prefix: prefix
}),
value: prefixValue
});
var autoflow = parent.nodes.find(function (i) {
return i.prop === 'grid-auto-flow';
});
var autoflowValue = 'row';
if (autoflow && !processor.disabled(autoflow, result)) {
autoflowValue = autoflow.value.trim();
}
if (status === 'autoplace') {
/**
* Show warning if grid-template-rows decl is not found
*/
var rowDecl = parent.nodes.find(function (i) {
return i.prop === 'grid-template-rows';
});
if (!rowDecl && hasGridTemplate) {
return undefined;
} else if (!rowDecl && !hasGridTemplate) {
decl.warn(result, 'Autoplacement does not work without grid-template-rows property');
return undefined;
}
/**
* Show warning if grid-template-columns decl is not found
*/
var columnDecl = parent.nodes.find(function (i) {
return i.prop === 'grid-template-columns';
});
if (!columnDecl && !hasGridTemplate) {
decl.warn(result, 'Autoplacement does not work without grid-template-columns property');
}
/**
* Autoplace grid items
*/
if (isColumnProp && !hasGridTemplate) {
autoplaceGridItems(decl, result, gap, autoflowValue);
}
}
return undefined;
};
return GridRowsColumns;
}(Declaration);
_defineProperty(GridRowsColumns, "names", ['grid-template-rows', 'grid-template-columns', 'grid-rows', 'grid-columns']);
module.exports = GridRowsColumns;

View File

@@ -0,0 +1,55 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var GridStart = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(GridStart, _Declaration);
function GridStart() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = GridStart.prototype;
/**
* Do not add prefix for unsupported value in IE
*/
_proto.check = function check(decl) {
var value = decl.value;
return !value.includes('/') || value.includes('span');
}
/**
* Return a final spec property
*/
;
_proto.normalize = function normalize(prop) {
return prop.replace('-start', '');
}
/**
* Change property name for IE
*/
;
_proto.prefixed = function prefixed(prop, prefix) {
var result = _Declaration.prototype.prefixed.call(this, prop, prefix);
if (prefix === '-ms-') {
result = result.replace('-start', '');
}
return result;
};
return GridStart;
}(Declaration);
_defineProperty(GridStart, "names", ['grid-row-start', 'grid-column-start']);
module.exports = GridStart;

View File

@@ -0,0 +1,101 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var _require = require('./grid-utils'),
parseGridAreas = _require.parseGridAreas,
warnMissedAreas = _require.warnMissedAreas,
prefixTrackProp = _require.prefixTrackProp,
prefixTrackValue = _require.prefixTrackValue,
getGridGap = _require.getGridGap,
warnGridGap = _require.warnGridGap,
inheritGridGap = _require.inheritGridGap;
function getGridRows(tpl) {
return tpl.trim().slice(1, -1).split(/["']\s*["']?/g);
}
var GridTemplateAreas = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(GridTemplateAreas, _Declaration);
function GridTemplateAreas() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = GridTemplateAreas.prototype;
/**
* Translate grid-template-areas to separate -ms- prefixed properties
*/
_proto.insert = function insert(decl, prefix, prefixes, result) {
if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
var hasColumns = false;
var hasRows = false;
var parent = decl.parent;
var gap = getGridGap(decl);
gap = inheritGridGap(decl, gap) || gap; // remove already prefixed rows
// to prevent doubling prefixes
parent.walkDecls(/-ms-grid-rows/, function (i) {
return i.remove();
}); // add empty tracks to rows
parent.walkDecls(/grid-template-(rows|columns)/, function (trackDecl) {
if (trackDecl.prop === 'grid-template-rows') {
hasRows = true;
var prop = trackDecl.prop,
value = trackDecl.value;
trackDecl.cloneBefore({
prop: prefixTrackProp({
prop: prop,
prefix: prefix
}),
value: prefixTrackValue({
value: value,
gap: gap.row
})
});
} else {
hasColumns = true;
}
});
var gridRows = getGridRows(decl.value);
if (hasColumns && !hasRows && gap.row && gridRows.length > 1) {
decl.cloneBefore({
prop: '-ms-grid-rows',
value: prefixTrackValue({
value: "repeat(" + gridRows.length + ", auto)",
gap: gap.row
}),
raws: {}
});
} // warnings
warnGridGap({
gap: gap,
hasColumns: hasColumns,
decl: decl,
result: result
});
var areas = parseGridAreas({
rows: gridRows,
gap: gap
});
warnMissedAreas(areas, decl, result);
return decl;
};
return GridTemplateAreas;
}(Declaration);
_defineProperty(GridTemplateAreas, "names", ['grid-template-areas']);
module.exports = GridTemplateAreas;

View File

@@ -0,0 +1,90 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var _require = require('./grid-utils'),
parseTemplate = _require.parseTemplate,
warnMissedAreas = _require.warnMissedAreas,
getGridGap = _require.getGridGap,
warnGridGap = _require.warnGridGap,
inheritGridGap = _require.inheritGridGap;
var GridTemplate = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(GridTemplate, _Declaration);
function GridTemplate() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = GridTemplate.prototype;
/**
* Translate grid-template to separate -ms- prefixed properties
*/
_proto.insert = function insert(decl, prefix, prefixes, result) {
if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
if (decl.parent.some(function (i) {
return i.prop === '-ms-grid-rows';
})) {
return undefined;
}
var gap = getGridGap(decl);
/**
* we must insert inherited gap values in some cases:
* if we are inside media query && if we have no grid-gap value
*/
var inheritedGap = inheritGridGap(decl, gap);
var _parseTemplate = parseTemplate({
decl: decl,
gap: inheritedGap || gap
}),
rows = _parseTemplate.rows,
columns = _parseTemplate.columns,
areas = _parseTemplate.areas;
var hasAreas = Object.keys(areas).length > 0;
var hasRows = Boolean(rows);
var hasColumns = Boolean(columns);
warnGridGap({
gap: gap,
hasColumns: hasColumns,
decl: decl,
result: result
});
warnMissedAreas(areas, decl, result);
if (hasRows && hasColumns || hasAreas) {
decl.cloneBefore({
prop: '-ms-grid-rows',
value: rows,
raws: {}
});
}
if (hasColumns) {
decl.cloneBefore({
prop: '-ms-grid-columns',
value: columns,
raws: {}
});
}
return decl;
};
return GridTemplate;
}(Declaration);
_defineProperty(GridTemplate, "names", ['grid-template']);
module.exports = GridTemplate;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,71 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var ImageRendering = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(ImageRendering, _Declaration);
function ImageRendering() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = ImageRendering.prototype;
/**
* Add hack only for crisp-edges
*/
_proto.check = function check(decl) {
return decl.value === 'pixelated';
}
/**
* Change property name for IE
*/
;
_proto.prefixed = function prefixed(prop, prefix) {
if (prefix === '-ms-') {
return '-ms-interpolation-mode';
}
return _Declaration.prototype.prefixed.call(this, prop, prefix);
}
/**
* Change property and value for IE
*/
;
_proto.set = function set(decl, prefix) {
if (prefix !== '-ms-') return _Declaration.prototype.set.call(this, decl, prefix);
decl.prop = '-ms-interpolation-mode';
decl.value = 'nearest-neighbor';
return decl;
}
/**
* Return property name by spec
*/
;
_proto.normalize = function normalize() {
return 'image-rendering';
}
/**
* Warn on old value
*/
;
_proto.process = function process(node, result) {
return _Declaration.prototype.process.call(this, node, result);
};
return ImageRendering;
}(Declaration);
_defineProperty(ImageRendering, "names", ['image-rendering', 'interpolation-mode']);
module.exports = ImageRendering;

View File

@@ -0,0 +1,38 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Value = require('../value');
var ImageSet = /*#__PURE__*/function (_Value) {
_inheritsLoose(ImageSet, _Value);
function ImageSet() {
return _Value.apply(this, arguments) || this;
}
var _proto = ImageSet.prototype;
/**
* Use non-standard name for WebKit and Firefox
*/
_proto.replace = function replace(string, prefix) {
var fixed = _Value.prototype.replace.call(this, string, prefix);
if (prefix === '-webkit-') {
fixed = fixed.replace(/("[^"]+"|'[^']+')(\s+\d+\w)/gi, 'url($1)$2');
}
return fixed;
};
return ImageSet;
}(Value);
_defineProperty(ImageSet, "names", ['image-set']);
module.exports = ImageSet;

View File

@@ -0,0 +1,40 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var InlineLogical = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(InlineLogical, _Declaration);
function InlineLogical() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = InlineLogical.prototype;
/**
* Use old syntax for -moz- and -webkit-
*/
_proto.prefixed = function prefixed(prop, prefix) {
return prefix + prop.replace('-inline', '');
}
/**
* Return property name by spec
*/
;
_proto.normalize = function normalize(prop) {
return prop.replace(/(margin|padding|border)-(start|end)/, '$1-inline-$2');
};
return InlineLogical;
}(Declaration);
_defineProperty(InlineLogical, "names", ['border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end', 'border-start', 'border-end', 'margin-start', 'margin-end', 'padding-start', 'padding-end']);
module.exports = InlineLogical;

View File

@@ -0,0 +1,74 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var OldValue = require('../old-value');
var Value = require('../value');
function _regexp(name) {
return new RegExp("(^|[\\s,(])(" + name + "($|[\\s),]))", 'gi');
}
var Intrinsic = /*#__PURE__*/function (_Value) {
_inheritsLoose(Intrinsic, _Value);
function Intrinsic() {
return _Value.apply(this, arguments) || this;
}
var _proto = Intrinsic.prototype;
_proto.regexp = function regexp() {
if (!this.regexpCache) this.regexpCache = _regexp(this.name);
return this.regexpCache;
};
_proto.isStretch = function isStretch() {
return this.name === 'stretch' || this.name === 'fill' || this.name === 'fill-available';
};
_proto.replace = function replace(string, prefix) {
if (prefix === '-moz-' && this.isStretch()) {
return string.replace(this.regexp(), '$1-moz-available$3');
}
if (prefix === '-webkit-' && this.isStretch()) {
return string.replace(this.regexp(), '$1-webkit-fill-available$3');
}
return _Value.prototype.replace.call(this, string, prefix);
};
_proto.old = function old(prefix) {
var prefixed = prefix + this.name;
if (this.isStretch()) {
if (prefix === '-moz-') {
prefixed = '-moz-available';
} else if (prefix === '-webkit-') {
prefixed = '-webkit-fill-available';
}
}
return new OldValue(this.name, prefixed, prefixed, _regexp(prefixed));
};
_proto.add = function add(decl, prefix) {
if (decl.prop.includes('grid') && prefix !== '-webkit-') {
return undefined;
}
return _Value.prototype.add.call(this, decl, prefix);
};
return Intrinsic;
}(Value);
_defineProperty(Intrinsic, "names", ['max-content', 'min-content', 'fit-content', 'fill', 'fill-available', 'stretch']);
module.exports = Intrinsic;

View File

@@ -0,0 +1,85 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var flexSpec = require('./flex-spec');
var Declaration = require('../declaration');
var JustifyContent = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(JustifyContent, _Declaration);
function JustifyContent() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = JustifyContent.prototype;
/**
* Change property name for 2009 and 2012 specs
*/
_proto.prefixed = function prefixed(prop, prefix) {
var spec;
var _flexSpec = flexSpec(prefix);
spec = _flexSpec[0];
prefix = _flexSpec[1];
if (spec === 2009) {
return prefix + 'box-pack';
}
if (spec === 2012) {
return prefix + 'flex-pack';
}
return _Declaration.prototype.prefixed.call(this, prop, prefix);
}
/**
* Return property name by final spec
*/
;
_proto.normalize = function normalize() {
return 'justify-content';
}
/**
* Change value for 2009 and 2012 specs
*/
;
_proto.set = function set(decl, prefix) {
var spec = flexSpec(prefix)[0];
if (spec === 2009 || spec === 2012) {
var value = JustifyContent.oldValues[decl.value] || decl.value;
decl.value = value;
if (spec !== 2009 || value !== 'distribute') {
return _Declaration.prototype.set.call(this, decl, prefix);
}
} else if (spec === 'final') {
return _Declaration.prototype.set.call(this, decl, prefix);
}
return undefined;
};
return JustifyContent;
}(Declaration);
_defineProperty(JustifyContent, "names", ['justify-content', 'flex-pack', 'box-pack']);
_defineProperty(JustifyContent, "oldValues", {
'flex-end': 'end',
'flex-start': 'start',
'space-between': 'justify',
'space-around': 'distribute'
});
module.exports = JustifyContent;

View File

@@ -0,0 +1,46 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var MaskBorder = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(MaskBorder, _Declaration);
function MaskBorder() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = MaskBorder.prototype;
/**
* Return property name by final spec
*/
_proto.normalize = function normalize() {
return this.name.replace('box-image', 'border');
}
/**
* Return flex property for 2012 spec
*/
;
_proto.prefixed = function prefixed(prop, prefix) {
var result = _Declaration.prototype.prefixed.call(this, prop, prefix);
if (prefix === '-webkit-') {
result = result.replace('border', 'box-image');
}
return result;
};
return MaskBorder;
}(Declaration);
_defineProperty(MaskBorder, "names", ['mask-border', 'mask-border-source', 'mask-border-slice', 'mask-border-width', 'mask-border-outset', 'mask-border-repeat', 'mask-box-image', 'mask-box-image-source', 'mask-box-image-slice', 'mask-box-image-width', 'mask-box-image-outset', 'mask-box-image-repeat']);
module.exports = MaskBorder;

View File

@@ -0,0 +1,104 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var MaskComposite = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(MaskComposite, _Declaration);
function MaskComposite() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = MaskComposite.prototype;
/**
* Prefix mask-composite for webkit
*/
_proto.insert = function insert(decl, prefix, prefixes) {
var isCompositeProp = decl.prop === 'mask-composite';
var compositeValues;
if (isCompositeProp) {
compositeValues = decl.value.split(',');
} else {
compositeValues = decl.value.match(MaskComposite.regexp) || [];
}
compositeValues = compositeValues.map(function (el) {
return el.trim();
}).filter(function (el) {
return el;
});
var hasCompositeValues = compositeValues.length;
var compositeDecl;
if (hasCompositeValues) {
compositeDecl = this.clone(decl);
compositeDecl.value = compositeValues.map(function (value) {
return MaskComposite.oldValues[value] || value;
}).join(', ');
if (compositeValues.includes('intersect')) {
compositeDecl.value += ', xor';
}
compositeDecl.prop = prefix + 'mask-composite';
}
if (isCompositeProp) {
if (!hasCompositeValues) {
return undefined;
}
if (this.needCascade(decl)) {
compositeDecl.raws.before = this.calcBefore(prefixes, decl, prefix);
}
return decl.parent.insertBefore(decl, compositeDecl);
}
var cloned = this.clone(decl);
cloned.prop = prefix + cloned.prop;
if (hasCompositeValues) {
cloned.value = cloned.value.replace(MaskComposite.regexp, '');
}
if (this.needCascade(decl)) {
cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
}
decl.parent.insertBefore(decl, cloned);
if (!hasCompositeValues) {
return decl;
}
if (this.needCascade(decl)) {
compositeDecl.raws.before = this.calcBefore(prefixes, decl, prefix);
}
return decl.parent.insertBefore(decl, compositeDecl);
};
return MaskComposite;
}(Declaration);
_defineProperty(MaskComposite, "names", ['mask', 'mask-composite']);
_defineProperty(MaskComposite, "oldValues", {
add: 'source-over',
substract: 'source-out',
intersect: 'source-in',
exclude: 'xor'
});
_defineProperty(MaskComposite, "regexp", new RegExp("\\s+(" + Object.keys(MaskComposite.oldValues).join('|') + ")\\b(?!\\))\\s*(?=[,])", 'ig'));
module.exports = MaskComposite;

View File

@@ -0,0 +1,72 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var flexSpec = require('./flex-spec');
var Declaration = require('../declaration');
var Order = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(Order, _Declaration);
function Order() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = Order.prototype;
/**
* Change property name for 2009 and 2012 specs
*/
_proto.prefixed = function prefixed(prop, prefix) {
var spec;
var _flexSpec = flexSpec(prefix);
spec = _flexSpec[0];
prefix = _flexSpec[1];
if (spec === 2009) {
return prefix + 'box-ordinal-group';
}
if (spec === 2012) {
return prefix + 'flex-order';
}
return _Declaration.prototype.prefixed.call(this, prop, prefix);
}
/**
* Return property name by final spec
*/
;
_proto.normalize = function normalize() {
return 'order';
}
/**
* Fix value for 2009 spec
*/
;
_proto.set = function set(decl, prefix) {
var spec = flexSpec(prefix)[0];
if (spec === 2009 && /\d/.test(decl.value)) {
decl.value = (parseInt(decl.value) + 1).toString();
return _Declaration.prototype.set.call(this, decl, prefix);
}
return _Declaration.prototype.set.call(this, decl, prefix);
};
return Order;
}(Declaration);
_defineProperty(Order, "names", ['order', 'flex-order', 'box-ordinal-group']);
module.exports = Order;

View File

@@ -0,0 +1,54 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var OverscrollBehavior = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(OverscrollBehavior, _Declaration);
function OverscrollBehavior() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = OverscrollBehavior.prototype;
/**
* Change property name for IE
*/
_proto.prefixed = function prefixed(prop, prefix) {
return prefix + 'scroll-chaining';
}
/**
* Return property name by spec
*/
;
_proto.normalize = function normalize() {
return 'overscroll-behavior';
}
/**
* Change value for IE
*/
;
_proto.set = function set(decl, prefix) {
if (decl.value === 'auto') {
decl.value = 'chained';
} else if (decl.value === 'none' || decl.value === 'contain') {
decl.value = 'none';
}
return _Declaration.prototype.set.call(this, decl, prefix);
};
return OverscrollBehavior;
}(Declaration);
_defineProperty(OverscrollBehavior, "names", ['overscroll-behavior', 'scroll-chaining']);
module.exports = OverscrollBehavior;

View File

@@ -0,0 +1,58 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var OldValue = require('../old-value');
var Value = require('../value');
var Pixelated = /*#__PURE__*/function (_Value) {
_inheritsLoose(Pixelated, _Value);
function Pixelated() {
return _Value.apply(this, arguments) || this;
}
var _proto = Pixelated.prototype;
/**
* Use non-standard name for WebKit and Firefox
*/
_proto.replace = function replace(string, prefix) {
if (prefix === '-webkit-') {
return string.replace(this.regexp(), '$1-webkit-optimize-contrast');
}
if (prefix === '-moz-') {
return string.replace(this.regexp(), '$1-moz-crisp-edges');
}
return _Value.prototype.replace.call(this, string, prefix);
}
/**
* Different name for WebKit and Firefox
*/
;
_proto.old = function old(prefix) {
if (prefix === '-webkit-') {
return new OldValue(this.name, '-webkit-optimize-contrast');
}
if (prefix === '-moz-') {
return new OldValue(this.name, '-moz-crisp-edges');
}
return _Value.prototype.old.call(this, prefix);
};
return Pixelated;
}(Value);
_defineProperty(Pixelated, "names", ['pixelated']);
module.exports = Pixelated;

View File

@@ -0,0 +1,55 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var utils = require('./grid-utils');
var PlaceSelf = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(PlaceSelf, _Declaration);
function PlaceSelf() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = PlaceSelf.prototype;
/**
* Translate place-self to separate -ms- prefixed properties
*/
_proto.insert = function insert(decl, prefix, prefixes) {
if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes); // prevent doubling of prefixes
if (decl.parent.some(function (i) {
return i.prop === '-ms-grid-row-align';
})) {
return undefined;
}
var _utils$parse = utils.parse(decl),
_utils$parse$ = _utils$parse[0],
first = _utils$parse$[0],
second = _utils$parse$[1];
if (second) {
utils.insertDecl(decl, 'grid-row-align', first);
utils.insertDecl(decl, 'grid-column-align', second);
} else {
utils.insertDecl(decl, 'grid-row-align', first);
utils.insertDecl(decl, 'grid-column-align', first);
}
return undefined;
};
return PlaceSelf;
}(Declaration);
_defineProperty(PlaceSelf, "names", ['place-self']);
module.exports = PlaceSelf;

View File

@@ -0,0 +1,36 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Selector = require('../selector');
var PlaceholderShown = /*#__PURE__*/function (_Selector) {
_inheritsLoose(PlaceholderShown, _Selector);
function PlaceholderShown() {
return _Selector.apply(this, arguments) || this;
}
var _proto = PlaceholderShown.prototype;
/**
* Return different selectors depend on prefix
*/
_proto.prefixed = function prefixed(prefix) {
if (prefix === '-ms-') {
return ':-ms-input-placeholder';
}
return ":" + prefix + "placeholder-shown";
};
return PlaceholderShown;
}(Selector);
_defineProperty(PlaceholderShown, "names", [':placeholder-shown']);
module.exports = PlaceholderShown;

View File

@@ -0,0 +1,56 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Selector = require('../selector');
var Placeholder = /*#__PURE__*/function (_Selector) {
_inheritsLoose(Placeholder, _Selector);
function Placeholder() {
return _Selector.apply(this, arguments) || this;
}
var _proto = Placeholder.prototype;
/**
* Add old mozilla to possible prefixes
*/
_proto.possible = function possible() {
return _Selector.prototype.possible.call(this).concat(['-moz- old', '-ms- old']);
}
/**
* Return different selectors depend on prefix
*/
;
_proto.prefixed = function prefixed(prefix) {
if (prefix === '-webkit-') {
return '::-webkit-input-placeholder';
}
if (prefix === '-ms-') {
return '::-ms-input-placeholder';
}
if (prefix === '-ms- old') {
return ':-ms-input-placeholder';
}
if (prefix === '-moz- old') {
return ':-moz-placeholder';
}
return "::" + prefix + "placeholder";
};
return Placeholder;
}(Selector);
_defineProperty(Placeholder, "names", ['::placeholder']);
module.exports = Placeholder;

View File

@@ -0,0 +1,38 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var TextDecorationSkipInk = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(TextDecorationSkipInk, _Declaration);
function TextDecorationSkipInk() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = TextDecorationSkipInk.prototype;
/**
* Change prefix for ink value
*/
_proto.set = function set(decl, prefix) {
if (decl.prop === 'text-decoration-skip-ink' && decl.value === 'auto') {
decl.prop = prefix + 'text-decoration-skip';
decl.value = 'ink';
return decl;
} else {
return _Declaration.prototype.set.call(this, decl, prefix);
}
};
return TextDecorationSkipInk;
}(Declaration);
_defineProperty(TextDecorationSkipInk, "names", ['text-decoration-skip-ink', 'text-decoration-skip']);
module.exports = TextDecorationSkipInk;

View File

@@ -0,0 +1,36 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var BASIC = ['none', 'underline', 'overline', 'line-through', 'blink', 'inherit', 'initial', 'unset'];
var TextDecoration = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(TextDecoration, _Declaration);
function TextDecoration() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = TextDecoration.prototype;
/**
* Do not add prefixes for basic values.
*/
_proto.check = function check(decl) {
return decl.value.split(/\s+/).some(function (i) {
return !BASIC.includes(i);
});
};
return TextDecoration;
}(Declaration);
_defineProperty(TextDecoration, "names", ['text-decoration']);
module.exports = TextDecoration;

View File

@@ -0,0 +1,33 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var TextEmphasisPosition = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(TextEmphasisPosition, _Declaration);
function TextEmphasisPosition() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = TextEmphasisPosition.prototype;
_proto.set = function set(decl, prefix) {
if (prefix === '-webkit-') {
decl.value = decl.value.replace(/\s*(right|left)\s*/i, '');
}
return _Declaration.prototype.set.call(this, decl, prefix);
};
return TextEmphasisPosition;
}(Declaration);
_defineProperty(TextEmphasisPosition, "names", ['text-emphasis-position']);
module.exports = TextEmphasisPosition;

View File

@@ -0,0 +1,105 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var TransformDecl = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(TransformDecl, _Declaration);
function TransformDecl() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = TransformDecl.prototype;
/**
* Recursively check all parents for @keyframes
*/
_proto.keyframeParents = function keyframeParents(decl) {
var parent = decl.parent;
while (parent) {
if (parent.type === 'atrule' && parent.name === 'keyframes') {
return true;
}
var _parent = parent;
parent = _parent.parent;
}
return false;
}
/**
* Is transform contain 3D commands
*/
;
_proto.contain3d = function contain3d(decl) {
if (decl.prop === 'transform-origin') {
return false;
}
for (var _iterator = _createForOfIteratorHelperLoose(TransformDecl.functions3d), _step; !(_step = _iterator()).done;) {
var func = _step.value;
if (decl.value.includes(func + "(")) {
return true;
}
}
return false;
}
/**
* Replace rotateZ to rotate for IE 9
*/
;
_proto.set = function set(decl, prefix) {
decl = _Declaration.prototype.set.call(this, decl, prefix);
if (prefix === '-ms-') {
decl.value = decl.value.replace(/rotatez/gi, 'rotate');
}
return decl;
}
/**
* Don't add prefix for IE in keyframes
*/
;
_proto.insert = function insert(decl, prefix, prefixes) {
if (prefix === '-ms-') {
if (!this.contain3d(decl) && !this.keyframeParents(decl)) {
return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
}
} else if (prefix === '-o-') {
if (!this.contain3d(decl)) {
return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
}
} else {
return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
}
return undefined;
};
return TransformDecl;
}(Declaration);
_defineProperty(TransformDecl, "names", ['transform', 'transform-origin']);
_defineProperty(TransformDecl, "functions3d", ['matrix3d', 'translate3d', 'translateZ', 'scale3d', 'scaleZ', 'rotate3d', 'rotateX', 'rotateY', 'perspective']);
module.exports = TransformDecl;

View File

@@ -0,0 +1,36 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var UserSelect = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(UserSelect, _Declaration);
function UserSelect() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = UserSelect.prototype;
/**
* Change prefixed value for IE
*/
_proto.set = function set(decl, prefix) {
if (prefix === '-ms-' && decl.value === 'contain') {
decl.value = 'element';
}
return _Declaration.prototype.set.call(this, decl, prefix);
};
return UserSelect;
}(Declaration);
_defineProperty(UserSelect, "names", ['user-select']);
module.exports = UserSelect;

View File

@@ -0,0 +1,59 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Declaration = require('../declaration');
var WritingMode = /*#__PURE__*/function (_Declaration) {
_inheritsLoose(WritingMode, _Declaration);
function WritingMode() {
return _Declaration.apply(this, arguments) || this;
}
var _proto = WritingMode.prototype;
_proto.insert = function insert(decl, prefix, prefixes) {
if (prefix === '-ms-') {
var cloned = this.set(this.clone(decl), prefix);
if (this.needCascade(decl)) {
cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
}
var direction = 'ltr';
decl.parent.nodes.forEach(function (i) {
if (i.prop === 'direction') {
if (i.value === 'rtl' || i.value === 'ltr') direction = i.value;
}
});
cloned.value = WritingMode.msValues[direction][decl.value] || decl.value;
return decl.parent.insertBefore(decl, cloned);
}
return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
};
return WritingMode;
}(Declaration);
_defineProperty(WritingMode, "names", ['writing-mode']);
_defineProperty(WritingMode, "msValues", {
ltr: {
'horizontal-tb': 'lr-tb',
'vertical-rl': 'tb-rl',
'vertical-lr': 'tb-lr'
},
rtl: {
'horizontal-tb': 'rl-tb',
'vertical-rl': 'bt-rl',
'vertical-lr': 'bt-lr'
}
});
module.exports = WritingMode;

149
CTOAsYouGo/node_modules/autoprefixer/lib/info.js generated vendored Normal file
View File

@@ -0,0 +1,149 @@
"use strict";
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var browserslist = require('browserslist');
function capitalize(str) {
return str.slice(0, 1).toUpperCase() + str.slice(1);
}
var 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',
and_uc: 'UC for Android'
};
function prefix(name, prefixes, note) {
var out = " " + name;
if (note) out += ' *';
out += ': ';
out += prefixes.map(function (i) {
return i.replace(/^-(.*)-$/g, '$1');
}).join(', ');
out += '\n';
return out;
}
module.exports = function (prefixes) {
if (prefixes.browsers.selected.length === 0) {
return 'No browsers selected';
}
var versions = {};
for (var _iterator = _createForOfIteratorHelperLoose(prefixes.browsers.selected), _step; !(_step = _iterator()).done;) {
var _browser = _step.value;
var parts = _browser.split(' ');
var _name2 = parts[0];
var version = parts[1];
_name2 = NAMES[_name2] || capitalize(_name2);
if (versions[_name2]) {
versions[_name2].push(version);
} else {
versions[_name2] = [version];
}
}
var out = 'Browsers:\n';
for (var browser in versions) {
var list = versions[browser];
list = list.sort(function (a, b) {
return parseFloat(b) - parseFloat(a);
});
out += " " + browser + ": " + list.join(', ') + "\n";
}
var coverage = browserslist.coverage(prefixes.browsers.selected);
var round = Math.round(coverage * 100) / 100.0;
out += "\nThese browsers account for " + round + "% of all users globally\n";
var atrules = [];
for (var name in prefixes.add) {
var data = prefixes.add[name];
if (name[0] === '@' && data.prefixes) {
atrules.push(prefix(name, data.prefixes));
}
}
if (atrules.length > 0) {
out += "\nAt-Rules:\n" + atrules.sort().join('');
}
var selectors = [];
for (var _iterator2 = _createForOfIteratorHelperLoose(prefixes.add.selectors), _step2; !(_step2 = _iterator2()).done;) {
var selector = _step2.value;
if (selector.prefixes) {
selectors.push(prefix(selector.name, selector.prefixes));
}
}
if (selectors.length > 0) {
out += "\nSelectors:\n" + selectors.sort().join('');
}
var values = [];
var props = [];
var hadGrid = false;
for (var _name in prefixes.add) {
var _data = prefixes.add[_name];
if (_name[0] !== '@' && _data.prefixes) {
var grid = _name.indexOf('grid-') === 0;
if (grid) hadGrid = true;
props.push(prefix(_name, _data.prefixes, grid));
}
if (!Array.isArray(_data.values)) {
continue;
}
for (var _iterator3 = _createForOfIteratorHelperLoose(_data.values), _step3; !(_step3 = _iterator3()).done;) {
var value = _step3.value;
var _grid = value.name.includes('grid');
if (_grid) hadGrid = true;
var string = prefix(value.name, value.prefixes, _grid);
if (!values.includes(string)) {
values.push(string);
}
}
}
if (props.length > 0) {
out += "\nProperties:\n" + props.sort().join('');
}
if (values.length > 0) {
out += "\nValues:\n" + values.sort().join('');
}
if (hadGrid) {
out += '\n* - Prefixes will be added only on grid: true option.\n';
}
if (!atrules.length && !selectors.length && !props.length && !values.length) {
out += '\nAwesome! Your browsers don\'t require any vendor prefixes.' + '\nNow you can remove Autoprefixer from build steps.';
}
return out;
};

View File

@@ -0,0 +1,88 @@
"use strict";
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var OldSelector = /*#__PURE__*/function () {
function OldSelector(selector, prefix) {
this.prefix = prefix;
this.prefixed = selector.prefixed(this.prefix);
this.regexp = selector.regexp(this.prefix);
this.prefixeds = selector.possible().map(function (x) {
return [selector.prefixed(x), selector.regexp(x)];
});
this.unprefixed = selector.name;
this.nameRegexp = selector.regexp();
}
/**
* Is rule a hack without unprefixed version bottom
*/
var _proto = OldSelector.prototype;
_proto.isHack = function isHack(rule) {
var index = rule.parent.index(rule) + 1;
var rules = rule.parent.nodes;
while (index < rules.length) {
var before = rules[index].selector;
if (!before) {
return true;
}
if (before.includes(this.unprefixed) && before.match(this.nameRegexp)) {
return false;
}
var some = false;
for (var _iterator = _createForOfIteratorHelperLoose(this.prefixeds), _step; !(_step = _iterator()).done;) {
var _step$value = _step.value,
string = _step$value[0],
regexp = _step$value[1];
if (before.includes(string) && before.match(regexp)) {
some = true;
break;
}
}
if (!some) {
return true;
}
index += 1;
}
return true;
}
/**
* Does rule contain an unnecessary prefixed selector
*/
;
_proto.check = function check(rule) {
if (!rule.selector.includes(this.prefixed)) {
return false;
}
if (!rule.selector.match(this.regexp)) {
return false;
}
if (this.isHack(rule)) {
return false;
}
return true;
};
return OldSelector;
}();
module.exports = OldSelector;

30
CTOAsYouGo/node_modules/autoprefixer/lib/old-value.js generated vendored Normal file
View File

@@ -0,0 +1,30 @@
"use strict";
var utils = require('./utils');
var OldValue = /*#__PURE__*/function () {
function OldValue(unprefixed, prefixed, string, regexp) {
this.unprefixed = unprefixed;
this.prefixed = prefixed;
this.string = string || prefixed;
this.regexp = regexp || utils.regexp(prefixed);
}
/**
* Check, that value contain old value
*/
var _proto = OldValue.prototype;
_proto.check = function check(value) {
if (value.includes(this.string)) {
return !!value.match(this.regexp);
}
return false;
};
return OldValue;
}();
module.exports = OldValue;

167
CTOAsYouGo/node_modules/autoprefixer/lib/prefixer.js generated vendored Normal file
View File

@@ -0,0 +1,167 @@
"use strict";
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var vendor = require('postcss').vendor;
var Browsers = require('./browsers');
var utils = require('./utils');
/**
* Recursively clone objects
*/
function _clone(obj, parent) {
var cloned = new obj.constructor();
for (var _i = 0, _Object$keys = Object.keys(obj || {}); _i < _Object$keys.length; _i++) {
var i = _Object$keys[_i];
var value = obj[i];
if (i === 'parent' && typeof value === 'object') {
if (parent) {
cloned[i] = parent;
}
} else if (i === 'source' || i === null) {
cloned[i] = value;
} else if (Array.isArray(value)) {
cloned[i] = value.map(function (x) {
return _clone(x, cloned);
});
} else if (i !== '_autoprefixerPrefix' && i !== '_autoprefixerValues') {
if (typeof value === 'object' && value !== null) {
value = _clone(value, cloned);
}
cloned[i] = value;
}
}
return cloned;
}
var Prefixer = /*#__PURE__*/function () {
/**
* Add hack to selected names
*/
Prefixer.hack = function hack(klass) {
var _this = this;
if (!this.hacks) {
this.hacks = {};
}
return klass.names.map(function (name) {
_this.hacks[name] = klass;
return _this.hacks[name];
});
}
/**
* Load hacks for some names
*/
;
Prefixer.load = function load(name, prefixes, all) {
var Klass = this.hacks && this.hacks[name];
if (Klass) {
return new Klass(name, prefixes, all);
} else {
return new this(name, prefixes, all);
}
}
/**
* Clone node and clean autprefixer custom caches
*/
;
Prefixer.clone = function clone(node, overrides) {
var cloned = _clone(node);
for (var name in overrides) {
cloned[name] = overrides[name];
}
return cloned;
};
function Prefixer(name, prefixes, all) {
this.prefixes = prefixes;
this.name = name;
this.all = all;
}
/**
* Find prefix in node parents
*/
var _proto = Prefixer.prototype;
_proto.parentPrefix = function parentPrefix(node) {
var prefix;
if (typeof node._autoprefixerPrefix !== 'undefined') {
prefix = node._autoprefixerPrefix;
} else if (node.type === 'decl' && node.prop[0] === '-') {
prefix = vendor.prefix(node.prop);
} else if (node.type === 'root') {
prefix = false;
} else if (node.type === 'rule' && node.selector.includes(':-') && /:(-\w+-)/.test(node.selector)) {
prefix = node.selector.match(/:(-\w+-)/)[1];
} else if (node.type === 'atrule' && node.name[0] === '-') {
prefix = vendor.prefix(node.name);
} else {
prefix = this.parentPrefix(node.parent);
}
if (!Browsers.prefixes().includes(prefix)) {
prefix = false;
}
node._autoprefixerPrefix = prefix;
return node._autoprefixerPrefix;
}
/**
* Clone node with prefixes
*/
;
_proto.process = function process(node, result) {
if (!this.check(node)) {
return undefined;
}
var parent = this.parentPrefix(node);
var prefixes = this.prefixes.filter(function (prefix) {
return !parent || parent === utils.removeNote(prefix);
});
var added = [];
for (var _iterator = _createForOfIteratorHelperLoose(prefixes), _step; !(_step = _iterator()).done;) {
var prefix = _step.value;
if (this.add(node, prefix, added.concat([prefix]), result)) {
added.push(prefix);
}
}
return added;
}
/**
* Shortcut for Prefixer.clone
*/
;
_proto.clone = function clone(node, overrides) {
return Prefixer.clone(node, overrides);
};
return Prefixer;
}();
module.exports = Prefixer;

471
CTOAsYouGo/node_modules/autoprefixer/lib/prefixes.js generated vendored Normal file
View File

@@ -0,0 +1,471 @@
"use strict";
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var vendor = require('postcss').vendor;
var Declaration = require('./declaration');
var Resolution = require('./resolution');
var Transition = require('./transition');
var Processor = require('./processor');
var Supports = require('./supports');
var Browsers = require('./browsers');
var Selector = require('./selector');
var AtRule = require('./at-rule');
var Value = require('./value');
var utils = require('./utils');
Selector.hack(require('./hacks/fullscreen'));
Selector.hack(require('./hacks/placeholder'));
Selector.hack(require('./hacks/placeholder-shown'));
Declaration.hack(require('./hacks/flex'));
Declaration.hack(require('./hacks/order'));
Declaration.hack(require('./hacks/filter'));
Declaration.hack(require('./hacks/grid-end'));
Declaration.hack(require('./hacks/animation'));
Declaration.hack(require('./hacks/flex-flow'));
Declaration.hack(require('./hacks/flex-grow'));
Declaration.hack(require('./hacks/flex-wrap'));
Declaration.hack(require('./hacks/grid-area'));
Declaration.hack(require('./hacks/place-self'));
Declaration.hack(require('./hacks/grid-start'));
Declaration.hack(require('./hacks/align-self'));
Declaration.hack(require('./hacks/appearance'));
Declaration.hack(require('./hacks/flex-basis'));
Declaration.hack(require('./hacks/mask-border'));
Declaration.hack(require('./hacks/mask-composite'));
Declaration.hack(require('./hacks/align-items'));
Declaration.hack(require('./hacks/user-select'));
Declaration.hack(require('./hacks/flex-shrink'));
Declaration.hack(require('./hacks/break-props'));
Declaration.hack(require('./hacks/color-adjust'));
Declaration.hack(require('./hacks/writing-mode'));
Declaration.hack(require('./hacks/border-image'));
Declaration.hack(require('./hacks/align-content'));
Declaration.hack(require('./hacks/border-radius'));
Declaration.hack(require('./hacks/block-logical'));
Declaration.hack(require('./hacks/grid-template'));
Declaration.hack(require('./hacks/inline-logical'));
Declaration.hack(require('./hacks/grid-row-align'));
Declaration.hack(require('./hacks/transform-decl'));
Declaration.hack(require('./hacks/flex-direction'));
Declaration.hack(require('./hacks/image-rendering'));
Declaration.hack(require('./hacks/backdrop-filter'));
Declaration.hack(require('./hacks/background-clip'));
Declaration.hack(require('./hacks/text-decoration'));
Declaration.hack(require('./hacks/justify-content'));
Declaration.hack(require('./hacks/background-size'));
Declaration.hack(require('./hacks/grid-row-column'));
Declaration.hack(require('./hacks/grid-rows-columns'));
Declaration.hack(require('./hacks/grid-column-align'));
Declaration.hack(require('./hacks/overscroll-behavior'));
Declaration.hack(require('./hacks/grid-template-areas'));
Declaration.hack(require('./hacks/text-emphasis-position'));
Declaration.hack(require('./hacks/text-decoration-skip-ink'));
Value.hack(require('./hacks/gradient'));
Value.hack(require('./hacks/intrinsic'));
Value.hack(require('./hacks/pixelated'));
Value.hack(require('./hacks/image-set'));
Value.hack(require('./hacks/cross-fade'));
Value.hack(require('./hacks/display-flex'));
Value.hack(require('./hacks/display-grid'));
Value.hack(require('./hacks/filter-value'));
var declsCache = {};
var Prefixes = /*#__PURE__*/function () {
function Prefixes(data, browsers, options) {
if (options === void 0) {
options = {};
}
this.data = data;
this.browsers = browsers;
this.options = options;
var _this$preprocess = this.preprocess(this.select(this.data));
this.add = _this$preprocess[0];
this.remove = _this$preprocess[1];
this.transition = new Transition(this);
this.processor = new Processor(this);
}
/**
* Return clone instance to remove all prefixes
*/
var _proto = Prefixes.prototype;
_proto.cleaner = function cleaner() {
if (this.cleanerCache) {
return this.cleanerCache;
}
if (this.browsers.selected.length) {
var empty = new Browsers(this.browsers.data, []);
this.cleanerCache = new Prefixes(this.data, empty, this.options);
} else {
return this;
}
return this.cleanerCache;
}
/**
* Select prefixes from data, which is necessary for selected browsers
*/
;
_proto.select = function select(list) {
var _this = this;
var selected = {
add: {},
remove: {}
};
var _loop = function _loop(name) {
var data = list[name];
var add = data.browsers.map(function (i) {
var params = i.split(' ');
return {
browser: params[0] + " " + params[1],
note: params[2]
};
});
var notes = add.filter(function (i) {
return i.note;
}).map(function (i) {
return _this.browsers.prefix(i.browser) + " " + i.note;
});
notes = utils.uniq(notes);
add = add.filter(function (i) {
return _this.browsers.isSelected(i.browser);
}).map(function (i) {
var prefix = _this.browsers.prefix(i.browser);
if (i.note) {
return prefix + " " + i.note;
} else {
return prefix;
}
});
add = _this.sort(utils.uniq(add));
if (_this.options.flexbox === 'no-2009') {
add = add.filter(function (i) {
return !i.includes('2009');
});
}
var all = data.browsers.map(function (i) {
return _this.browsers.prefix(i);
});
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.includes(i);
});
}
} else {
selected.remove[name] = all;
}
};
for (var name in list) {
_loop(name);
}
return selected;
}
/**
* Sort vendor prefixes
*/
;
_proto.sort = function sort(prefixes) {
return prefixes.sort(function (a, b) {
var aLength = utils.removeNote(a).length;
var bLength = utils.removeNote(b).length;
if (aLength === bLength) {
return b.length - a.length;
} else {
return bLength - aLength;
}
});
}
/**
* Cache prefixes data to fast CSS processing
*/
;
_proto.preprocess = function preprocess(selected) {
var add = {
'selectors': [],
'@supports': new Supports(Prefixes, this)
};
for (var name in selected.add) {
var prefixes = selected.add[name];
if (name === '@keyframes' || name === '@viewport') {
add[name] = new AtRule(name, prefixes, this);
} else if (name === '@resolution') {
add[name] = new Resolution(name, prefixes, this);
} else if (this.data[name].selector) {
add.selectors.push(Selector.load(name, prefixes, this));
} else {
var props = this.data[name].props;
if (props) {
var value = Value.load(name, prefixes, this);
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done;) {
var prop = _step.value;
if (!add[prop]) {
add[prop] = {
values: []
};
}
add[prop].values.push(value);
}
} else {
var values = add[name] && add[name].values || [];
add[name] = Declaration.load(name, prefixes, this);
add[name].values = values;
}
}
}
var remove = {
selectors: []
};
for (var _name in selected.remove) {
var _prefixes = selected.remove[_name];
if (this.data[_name].selector) {
var selector = Selector.load(_name, _prefixes);
for (var _iterator2 = _createForOfIteratorHelperLoose(_prefixes), _step2; !(_step2 = _iterator2()).done;) {
var prefix = _step2.value;
remove.selectors.push(selector.old(prefix));
}
} else if (_name === '@keyframes' || _name === '@viewport') {
for (var _iterator3 = _createForOfIteratorHelperLoose(_prefixes), _step3; !(_step3 = _iterator3()).done;) {
var _prefix = _step3.value;
var prefixed = "@" + _prefix + _name.slice(1);
remove[prefixed] = {
remove: true
};
}
} else if (_name === '@resolution') {
remove[_name] = new Resolution(_name, _prefixes, this);
} else {
var _props = this.data[_name].props;
if (_props) {
var _value = Value.load(_name, [], this);
for (var _iterator4 = _createForOfIteratorHelperLoose(_prefixes), _step4; !(_step4 = _iterator4()).done;) {
var _prefix2 = _step4.value;
var old = _value.old(_prefix2);
if (old) {
for (var _iterator5 = _createForOfIteratorHelperLoose(_props), _step5; !(_step5 = _iterator5()).done;) {
var _prop = _step5.value;
if (!remove[_prop]) {
remove[_prop] = {};
}
if (!remove[_prop].values) {
remove[_prop].values = [];
}
remove[_prop].values.push(old);
}
}
}
} else {
for (var _iterator6 = _createForOfIteratorHelperLoose(_prefixes), _step6; !(_step6 = _iterator6()).done;) {
var p = _step6.value;
var olds = this.decl(_name).old(_name, p);
if (_name === 'align-self') {
var a = add[_name] && add[_name].prefixes;
if (a) {
if (p === '-webkit- 2009' && a.includes('-webkit-')) {
continue;
} else if (p === '-webkit-' && a.includes('-webkit- 2009')) {
continue;
}
}
}
for (var _iterator7 = _createForOfIteratorHelperLoose(olds), _step7; !(_step7 = _iterator7()).done;) {
var _prefixed = _step7.value;
if (!remove[_prefixed]) {
remove[_prefixed] = {};
}
remove[_prefixed].remove = true;
}
}
}
}
}
return [add, remove];
}
/**
* Declaration loader with caching
*/
;
_proto.decl = function decl(prop) {
var decl = declsCache[prop];
if (decl) {
return decl;
} else {
declsCache[prop] = Declaration.load(prop);
return declsCache[prop];
}
}
/**
* Return unprefixed version of property
*/
;
_proto.unprefixed = function unprefixed(prop) {
var value = this.normalize(vendor.unprefixed(prop));
if (value === 'flex-direction') {
value = 'flex-flow';
}
return value;
}
/**
* Normalize prefix for remover
*/
;
_proto.normalize = function normalize(prop) {
return this.decl(prop).normalize(prop);
}
/**
* Return prefixed version of property
*/
;
_proto.prefixed = function prefixed(prop, prefix) {
prop = vendor.unprefixed(prop);
return this.decl(prop).prefixed(prop, prefix);
}
/**
* Return values, which must be prefixed in selected property
*/
;
_proto.values = function values(type, prop) {
var data = this[type];
var global = data['*'] && data['*'].values;
var values = data[prop] && data[prop].values;
if (global && values) {
return utils.uniq(global.concat(values));
} else {
return global || values || [];
}
}
/**
* Group declaration by unprefixed property to check them
*/
;
_proto.group = function group(decl) {
var _this2 = this;
var rule = decl.parent;
var index = rule.index(decl);
var length = rule.nodes.length;
var unprefixed = this.unprefixed(decl.prop);
var checker = function checker(step, callback) {
index += step;
while (index >= 0 && index < length) {
var other = rule.nodes[index];
if (other.type === 'decl') {
if (step === -1 && other.prop === unprefixed) {
if (!Browsers.withPrefix(other.value)) {
break;
}
}
if (_this2.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;
};
return {
up: function up(callback) {
return checker(-1, callback);
},
down: function down(callback) {
return checker(+1, callback);
}
};
};
return Prefixes;
}();
module.exports = Prefixes;

703
CTOAsYouGo/node_modules/autoprefixer/lib/processor.js generated vendored Normal file
View File

@@ -0,0 +1,703 @@
"use strict";
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var parser = require('postcss-value-parser');
var Value = require('./value');
var insertAreas = require('./hacks/grid-utils').insertAreas;
var OLD_LINEAR = /(^|[^-])linear-gradient\(\s*(top|left|right|bottom)/i;
var OLD_RADIAL = /(^|[^-])radial-gradient\(\s*\d+(\w*|%)\s+\d+(\w*|%)\s*,/i;
var IGNORE_NEXT = /(!\s*)?autoprefixer:\s*ignore\s+next/i;
var GRID_REGEX = /(!\s*)?autoprefixer\s*grid:\s*(on|off|(no-)?autoplace)/i;
var SIZES = ['width', 'height', 'min-width', 'max-width', 'min-height', 'max-height', 'inline-size', 'min-inline-size', 'max-inline-size', 'block-size', 'min-block-size', 'max-block-size'];
function hasGridTemplate(decl) {
return decl.parent.some(function (i) {
return i.prop === 'grid-template' || i.prop === 'grid-template-areas';
});
}
function hasRowsAndColumns(decl) {
var hasRows = decl.parent.some(function (i) {
return i.prop === 'grid-template-rows';
});
var hasColumns = decl.parent.some(function (i) {
return i.prop === 'grid-template-columns';
});
return hasRows && hasColumns;
}
var Processor = /*#__PURE__*/function () {
function Processor(prefixes) {
this.prefixes = prefixes;
}
/**
* Add necessary prefixes
*/
var _proto = Processor.prototype;
_proto.add = function add(css, result) {
var _this = this;
// At-rules
var resolution = this.prefixes.add['@resolution'];
var keyframes = this.prefixes.add['@keyframes'];
var viewport = this.prefixes.add['@viewport'];
var supports = this.prefixes.add['@supports'];
css.walkAtRules(function (rule) {
if (rule.name === 'keyframes') {
if (!_this.disabled(rule, result)) {
return keyframes && keyframes.process(rule);
}
} else if (rule.name === 'viewport') {
if (!_this.disabled(rule, result)) {
return viewport && viewport.process(rule);
}
} else if (rule.name === 'supports') {
if (_this.prefixes.options.supports !== false && !_this.disabled(rule, result)) {
return supports.process(rule);
}
} else if (rule.name === 'media' && rule.params.includes('-resolution')) {
if (!_this.disabled(rule, result)) {
return resolution && resolution.process(rule);
}
}
return undefined;
}); // Selectors
css.walkRules(function (rule) {
if (_this.disabled(rule, result)) return undefined;
return _this.prefixes.add.selectors.map(function (selector) {
return selector.process(rule, result);
});
});
function insideGrid(decl) {
return decl.parent.nodes.some(function (node) {
if (node.type !== 'decl') return false;
var displayGrid = node.prop === 'display' && /(inline-)?grid/.test(node.value);
var gridTemplate = node.prop.startsWith('grid-template');
var gridGap = /^grid-([A-z]+-)?gap/.test(node.prop);
return displayGrid || gridTemplate || gridGap;
});
}
function insideFlex(decl) {
return decl.parent.some(function (node) {
return node.prop === 'display' && /(inline-)?flex/.test(node.value);
});
}
var gridPrefixes = this.gridStatus(css, result) && this.prefixes.add['grid-area'] && this.prefixes.add['grid-area'].prefixes;
css.walkDecls(function (decl) {
if (_this.disabledDecl(decl, result)) return undefined;
var parent = decl.parent;
var prop = decl.prop;
var value = decl.value;
if (prop === 'grid-row-span') {
result.warn('grid-row-span is not part of final Grid Layout. Use grid-row.', {
node: decl
});
return undefined;
} else if (prop === 'grid-column-span') {
result.warn('grid-column-span is not part of final Grid Layout. Use grid-column.', {
node: decl
});
return undefined;
} else if (prop === 'display' && value === 'box') {
result.warn('You should write display: flex by final spec ' + 'instead of display: box', {
node: decl
});
return undefined;
} else if (prop === 'text-emphasis-position') {
if (value === 'under' || value === 'over') {
result.warn('You should use 2 values for text-emphasis-position ' + 'For example, `under left` instead of just `under`.', {
node: decl
});
}
} else if (/^(align|justify|place)-(items|content)$/.test(prop) && insideFlex(decl)) {
if (value === 'start' || value === 'end') {
result.warn(value + " value has mixed support, consider using " + ("flex-" + value + " instead"), {
node: decl
});
}
} else if (prop === 'text-decoration-skip' && value === 'ink') {
result.warn('Replace text-decoration-skip: ink to ' + 'text-decoration-skip-ink: auto, because spec had been changed', {
node: decl
});
} else {
if (gridPrefixes && _this.gridStatus(decl, result)) {
if (decl.value === 'subgrid') {
result.warn('IE does not support subgrid', {
node: decl
});
}
if (/^(align|justify|place)-items$/.test(prop) && insideGrid(decl)) {
var fixed = prop.replace('-items', '-self');
result.warn("IE does not support " + prop + " on grid containers. " + ("Try using " + fixed + " on child elements instead: ") + (decl.parent.selector + " > * { " + fixed + ": " + decl.value + " }"), {
node: decl
});
} else if (/^(align|justify|place)-content$/.test(prop) && insideGrid(decl)) {
result.warn("IE does not support " + decl.prop + " on grid containers", {
node: decl
});
} else if (prop === 'display' && decl.value === 'contents') {
result.warn('Please do not use display: contents; ' + 'if you have grid setting enabled', {
node: decl
});
return undefined;
} else if (decl.prop === 'grid-gap') {
var status = _this.gridStatus(decl, result);
if (status === 'autoplace' && !hasRowsAndColumns(decl) && !hasGridTemplate(decl)) {
result.warn('grid-gap only works if grid-template(-areas) is being ' + 'used or both rows and columns have been declared ' + 'and cells have not been manually ' + 'placed inside the explicit grid', {
node: decl
});
} else if ((status === true || status === 'no-autoplace') && !hasGridTemplate(decl)) {
result.warn('grid-gap only works if grid-template(-areas) is being used', {
node: decl
});
}
} else if (prop === 'grid-auto-columns') {
result.warn('grid-auto-columns is not supported by IE', {
node: decl
});
return undefined;
} else if (prop === 'grid-auto-rows') {
result.warn('grid-auto-rows is not supported by IE', {
node: decl
});
return undefined;
} else if (prop === 'grid-auto-flow') {
var hasRows = parent.some(function (i) {
return i.prop === 'grid-template-rows';
});
var hasCols = parent.some(function (i) {
return i.prop === 'grid-template-columns';
});
if (hasGridTemplate(decl)) {
result.warn('grid-auto-flow is not supported by IE', {
node: decl
});
} else if (value.includes('dense')) {
result.warn('grid-auto-flow: dense is not supported by IE', {
node: decl
});
} else if (!hasRows && !hasCols) {
result.warn('grid-auto-flow works only if grid-template-rows and ' + 'grid-template-columns are present in the same rule', {
node: decl
});
}
return undefined;
} else if (value.includes('auto-fit')) {
result.warn('auto-fit value is not supported by IE', {
node: decl,
word: 'auto-fit'
});
return undefined;
} else if (value.includes('auto-fill')) {
result.warn('auto-fill value is not supported by IE', {
node: decl,
word: 'auto-fill'
});
return undefined;
} else if (prop.startsWith('grid-template') && value.includes('[')) {
result.warn('Autoprefixer currently does not support line names. ' + 'Try using grid-template-areas instead.', {
node: decl,
word: '['
});
}
}
if (value.includes('radial-gradient')) {
if (OLD_RADIAL.test(decl.value)) {
result.warn('Gradient has outdated direction syntax. ' + 'New syntax is like `closest-side at 0 0` ' + 'instead of `0 0, closest-side`.', {
node: decl
});
} else {
var ast = parser(value);
for (var _iterator = _createForOfIteratorHelperLoose(ast.nodes), _step; !(_step = _iterator()).done;) {
var i = _step.value;
if (i.type === 'function' && i.value === 'radial-gradient') {
for (var _iterator2 = _createForOfIteratorHelperLoose(i.nodes), _step2; !(_step2 = _iterator2()).done;) {
var word = _step2.value;
if (word.type === 'word') {
if (word.value === 'cover') {
result.warn('Gradient has outdated direction syntax. ' + 'Replace `cover` to `farthest-corner`.', {
node: decl
});
} else if (word.value === 'contain') {
result.warn('Gradient has outdated direction syntax. ' + 'Replace `contain` to `closest-side`.', {
node: decl
});
}
}
}
}
}
}
}
if (value.includes('linear-gradient')) {
if (OLD_LINEAR.test(value)) {
result.warn('Gradient has outdated direction syntax. ' + 'New syntax is like `to left` instead of `right`.', {
node: decl
});
}
}
}
if (SIZES.includes(decl.prop)) {
if (!decl.value.includes('-fill-available')) {
if (decl.value.includes('fill-available')) {
result.warn('Replace fill-available to stretch, ' + 'because spec had been changed', {
node: decl
});
} else if (decl.value.includes('fill')) {
var _ast = parser(value);
if (_ast.nodes.some(function (i) {
return i.type === 'word' && i.value === 'fill';
})) {
result.warn('Replace fill to stretch, because spec had been changed', {
node: decl
});
}
}
}
}
var prefixer;
if (decl.prop === 'transition' || decl.prop === 'transition-property') {
// Transition
return _this.prefixes.transition.add(decl, result);
} else if (decl.prop === 'align-self') {
// align-self flexbox or grid
var display = _this.displayType(decl);
if (display !== 'grid' && _this.prefixes.options.flexbox !== false) {
prefixer = _this.prefixes.add['align-self'];
if (prefixer && prefixer.prefixes) {
prefixer.process(decl);
}
}
if (_this.gridStatus(decl, result) !== false) {
prefixer = _this.prefixes.add['grid-row-align'];
if (prefixer && prefixer.prefixes) {
return prefixer.process(decl, result);
}
}
} else if (decl.prop === 'justify-self') {
// justify-self flexbox or grid
if (_this.gridStatus(decl, result) !== false) {
prefixer = _this.prefixes.add['grid-column-align'];
if (prefixer && prefixer.prefixes) {
return prefixer.process(decl, result);
}
}
} else if (decl.prop === 'place-self') {
prefixer = _this.prefixes.add['place-self'];
if (prefixer && prefixer.prefixes && _this.gridStatus(decl, result) !== false) {
return prefixer.process(decl, result);
}
} else {
// Properties
prefixer = _this.prefixes.add[decl.prop];
if (prefixer && prefixer.prefixes) {
return prefixer.process(decl, result);
}
}
return undefined;
}); // Insert grid-area prefixes. We need to be able to store the different
// rules as a data and hack API is not enough for this
if (this.gridStatus(css, result)) {
insertAreas(css, this.disabled);
} // Values
return css.walkDecls(function (decl) {
if (_this.disabledValue(decl, result)) return;
var unprefixed = _this.prefixes.unprefixed(decl.prop);
var list = _this.prefixes.values('add', unprefixed);
if (Array.isArray(list)) {
for (var _iterator3 = _createForOfIteratorHelperLoose(list), _step3; !(_step3 = _iterator3()).done;) {
var value = _step3.value;
if (value.process) value.process(decl, result);
}
}
Value.save(_this.prefixes, decl);
});
}
/**
* Remove unnecessary pefixes
*/
;
_proto.remove = function remove(css, result) {
var _this2 = this;
// At-rules
var resolution = this.prefixes.remove['@resolution'];
css.walkAtRules(function (rule, i) {
if (_this2.prefixes.remove["@" + rule.name]) {
if (!_this2.disabled(rule, result)) {
rule.parent.removeChild(i);
}
} else if (rule.name === 'media' && rule.params.includes('-resolution') && resolution) {
resolution.clean(rule);
}
}); // Selectors
var _loop = function _loop() {
var checker = _step4.value;
css.walkRules(function (rule, i) {
if (checker.check(rule)) {
if (!_this2.disabled(rule, result)) {
rule.parent.removeChild(i);
}
}
});
};
for (var _iterator4 = _createForOfIteratorHelperLoose(this.prefixes.remove.selectors), _step4; !(_step4 = _iterator4()).done;) {
_loop();
}
return css.walkDecls(function (decl, i) {
if (_this2.disabled(decl, result)) return;
var rule = decl.parent;
var unprefixed = _this2.prefixes.unprefixed(decl.prop); // Transition
if (decl.prop === 'transition' || decl.prop === 'transition-property') {
_this2.prefixes.transition.remove(decl);
} // Properties
if (_this2.prefixes.remove[decl.prop] && _this2.prefixes.remove[decl.prop].remove) {
var notHack = _this2.prefixes.group(decl).down(function (other) {
return _this2.prefixes.normalize(other.prop) === unprefixed;
});
if (unprefixed === 'flex-flow') {
notHack = true;
}
if (decl.prop === '-webkit-box-orient') {
var hacks = {
'flex-direction': true,
'flex-flow': true
};
if (!decl.parent.some(function (j) {
return hacks[j.prop];
})) return;
}
if (notHack && !_this2.withHackValue(decl)) {
if (decl.raw('before').includes('\n')) {
_this2.reduceSpaces(decl);
}
rule.removeChild(i);
return;
}
} // Values
for (var _iterator5 = _createForOfIteratorHelperLoose(_this2.prefixes.values('remove', unprefixed)), _step5; !(_step5 = _iterator5()).done;) {
var checker = _step5.value;
if (!checker.check) continue;
if (!checker.check(decl.value)) continue;
unprefixed = checker.unprefixed;
var _notHack = _this2.prefixes.group(decl).down(function (other) {
return other.value.includes(unprefixed);
});
if (_notHack) {
rule.removeChild(i);
return;
}
}
});
}
/**
* Some rare old values, which is not in standard
*/
;
_proto.withHackValue = function withHackValue(decl) {
return decl.prop === '-webkit-background-clip' && decl.value === 'text';
}
/**
* Check for grid/flexbox options.
*/
;
_proto.disabledValue = function disabledValue(node, result) {
if (this.gridStatus(node, result) === false && node.type === 'decl') {
if (node.prop === 'display' && node.value.includes('grid')) {
return true;
}
}
if (this.prefixes.options.flexbox === false && node.type === 'decl') {
if (node.prop === 'display' && node.value.includes('flex')) {
return true;
}
}
return this.disabled(node, result);
}
/**
* Check for grid/flexbox options.
*/
;
_proto.disabledDecl = function disabledDecl(node, result) {
if (this.gridStatus(node, result) === false && node.type === 'decl') {
if (node.prop.includes('grid') || node.prop === 'justify-items') {
return true;
}
}
if (this.prefixes.options.flexbox === false && node.type === 'decl') {
var other = ['order', 'justify-content', 'align-items', 'align-content'];
if (node.prop.includes('flex') || other.includes(node.prop)) {
return true;
}
}
return this.disabled(node, result);
}
/**
* Check for control comment and global options
*/
;
_proto.disabled = function disabled(node, result) {
if (!node) return false;
if (node._autoprefixerDisabled !== undefined) {
return node._autoprefixerDisabled;
}
if (node.parent) {
var p = node.prev();
if (p && p.type === 'comment' && IGNORE_NEXT.test(p.text)) {
node._autoprefixerDisabled = true;
node._autoprefixerSelfDisabled = true;
return true;
}
}
var value = null;
if (node.nodes) {
var status;
node.each(function (i) {
if (i.type !== 'comment') return;
if (/(!\s*)?autoprefixer:\s*(off|on)/i.test(i.text)) {
if (typeof status !== 'undefined') {
result.warn('Second Autoprefixer control comment ' + 'was ignored. Autoprefixer applies control ' + 'comment to whole block, not to next rules.', {
node: i
});
} else {
status = /on/i.test(i.text);
}
}
});
if (status !== undefined) {
value = !status;
}
}
if (!node.nodes || value === null) {
if (node.parent) {
var isParentDisabled = this.disabled(node.parent, result);
if (node.parent._autoprefixerSelfDisabled === true) {
value = false;
} else {
value = isParentDisabled;
}
} else {
value = false;
}
}
node._autoprefixerDisabled = value;
return value;
}
/**
* Normalize spaces in cascade declaration group
*/
;
_proto.reduceSpaces = function reduceSpaces(decl) {
var stop = false;
this.prefixes.group(decl).up(function () {
stop = true;
return true;
});
if (stop) {
return;
}
var parts = decl.raw('before').split('\n');
var prevMin = parts[parts.length - 1].length;
var diff = false;
this.prefixes.group(decl).down(function (other) {
parts = other.raw('before').split('\n');
var last = parts.length - 1;
if (parts[last].length > prevMin) {
if (diff === false) {
diff = parts[last].length - prevMin;
}
parts[last] = parts[last].slice(0, -diff);
other.raws.before = parts.join('\n');
}
});
}
/**
* Is it flebox or grid rule
*/
;
_proto.displayType = function displayType(decl) {
for (var _iterator6 = _createForOfIteratorHelperLoose(decl.parent.nodes), _step6; !(_step6 = _iterator6()).done;) {
var i = _step6.value;
if (i.prop !== 'display') {
continue;
}
if (i.value.includes('flex')) {
return 'flex';
}
if (i.value.includes('grid')) {
return 'grid';
}
}
return false;
}
/**
* Set grid option via control comment
*/
;
_proto.gridStatus = function gridStatus(node, result) {
if (!node) return false;
if (node._autoprefixerGridStatus !== undefined) {
return node._autoprefixerGridStatus;
}
var value = null;
if (node.nodes) {
var status;
node.each(function (i) {
if (i.type !== 'comment') return;
if (GRID_REGEX.test(i.text)) {
var hasAutoplace = /:\s*autoplace/i.test(i.text);
var noAutoplace = /no-autoplace/i.test(i.text);
if (typeof status !== 'undefined') {
result.warn('Second Autoprefixer grid control comment was ' + 'ignored. Autoprefixer applies control comments to the whole ' + 'block, not to the next rules.', {
node: i
});
} else if (hasAutoplace) {
status = 'autoplace';
} else if (noAutoplace) {
status = true;
} else {
status = /on/i.test(i.text);
}
}
});
if (status !== undefined) {
value = status;
}
}
if (node.type === 'atrule' && node.name === 'supports') {
var params = node.params;
if (params.includes('grid') && params.includes('auto')) {
value = false;
}
}
if (!node.nodes || value === null) {
if (node.parent) {
var isParentGrid = this.gridStatus(node.parent, result);
if (node.parent._autoprefixerSelfDisabled === true) {
value = false;
} else {
value = isParentGrid;
}
} else if (typeof this.prefixes.options.grid !== 'undefined') {
value = this.prefixes.options.grid;
} else if (typeof process.env.AUTOPREFIXER_GRID !== 'undefined') {
if (process.env.AUTOPREFIXER_GRID === 'autoplace') {
value = 'autoplace';
} else {
value = true;
}
} else {
value = false;
}
}
node._autoprefixerGridStatus = value;
return value;
};
return Processor;
}();
module.exports = Processor;

125
CTOAsYouGo/node_modules/autoprefixer/lib/resolution.js generated vendored Normal file
View File

@@ -0,0 +1,125 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
var n2f = require('num2fraction');
var Prefixer = require('./prefixer');
var utils = require('./utils');
var REGEXP = /(min|max)-resolution\s*:\s*\d*\.?\d+(dppx|dpi|x)/gi;
var SPLIT = /(min|max)-resolution(\s*:\s*)(\d*\.?\d+)(dppx|dpi|x)/i;
var Resolution = /*#__PURE__*/function (_Prefixer) {
_inheritsLoose(Resolution, _Prefixer);
function Resolution() {
return _Prefixer.apply(this, arguments) || this;
}
var _proto = Resolution.prototype;
/**
* Return prefixed query name
*/
_proto.prefixName = function prefixName(prefix, name) {
if (prefix === '-moz-') {
return name + '--moz-device-pixel-ratio';
} else {
return prefix + name + '-device-pixel-ratio';
}
}
/**
* Return prefixed query
*/
;
_proto.prefixQuery = function prefixQuery(prefix, name, colon, value, units) {
if (units === 'dpi') {
value = Number(value / 96);
}
if (prefix === '-o-') {
value = n2f(value);
}
return this.prefixName(prefix, name) + colon + value;
}
/**
* Remove prefixed queries
*/
;
_proto.clean = function clean(rule) {
var _this = this;
if (!this.bad) {
this.bad = [];
for (var _iterator = _createForOfIteratorHelperLoose(this.prefixes), _step; !(_step = _iterator()).done;) {
var prefix = _step.value;
this.bad.push(this.prefixName(prefix, 'min'));
this.bad.push(this.prefixName(prefix, 'max'));
}
}
rule.params = utils.editList(rule.params, function (queries) {
return queries.filter(function (query) {
return _this.bad.every(function (i) {
return !query.includes(i);
});
});
});
}
/**
* Add prefixed queries
*/
;
_proto.process = function process(rule) {
var _this2 = this;
var parent = this.parentPrefix(rule);
var prefixes = parent ? [parent] : this.prefixes;
rule.params = utils.editList(rule.params, function (origin, prefixed) {
for (var _iterator2 = _createForOfIteratorHelperLoose(origin), _step2; !(_step2 = _iterator2()).done;) {
var query = _step2.value;
if (!query.includes('min-resolution') && !query.includes('max-resolution')) {
prefixed.push(query);
continue;
}
var _loop = function _loop() {
var prefix = _step3.value;
var processed = query.replace(REGEXP, function (str) {
var parts = str.match(SPLIT);
return _this2.prefixQuery(prefix, parts[1], parts[2], parts[3], parts[4]);
});
prefixed.push(processed);
};
for (var _iterator3 = _createForOfIteratorHelperLoose(prefixes), _step3; !(_step3 = _iterator3()).done;) {
_loop();
}
prefixed.push(query);
}
return utils.uniq(prefixed);
});
};
return Resolution;
}(Prefixer);
module.exports = Resolution;

198
CTOAsYouGo/node_modules/autoprefixer/lib/selector.js generated vendored Normal file
View File

@@ -0,0 +1,198 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
var _require = require('postcss'),
list = _require.list;
var OldSelector = require('./old-selector');
var Prefixer = require('./prefixer');
var Browsers = require('./browsers');
var utils = require('./utils');
var Selector = /*#__PURE__*/function (_Prefixer) {
_inheritsLoose(Selector, _Prefixer);
function Selector(name, prefixes, all) {
var _this;
_this = _Prefixer.call(this, name, prefixes, all) || this;
_this.regexpCache = {};
return _this;
}
/**
* Is rule selectors need to be prefixed
*/
var _proto = Selector.prototype;
_proto.check = function check(rule) {
if (rule.selector.includes(this.name)) {
return !!rule.selector.match(this.regexp());
}
return false;
}
/**
* Return prefixed version of selector
*/
;
_proto.prefixed = function prefixed(prefix) {
return this.name.replace(/^(\W*)/, "$1" + prefix);
}
/**
* Lazy loadRegExp for name
*/
;
_proto.regexp = function regexp(prefix) {
if (this.regexpCache[prefix]) {
return this.regexpCache[prefix];
}
var name = prefix ? this.prefixed(prefix) : this.name;
this.regexpCache[prefix] = new RegExp("(^|[^:\"'=])" + utils.escapeRegexp(name), 'gi');
return this.regexpCache[prefix];
}
/**
* All possible prefixes
*/
;
_proto.possible = function possible() {
return Browsers.prefixes();
}
/**
* Return all possible selector prefixes
*/
;
_proto.prefixeds = function prefixeds(rule) {
var _this2 = this;
if (rule._autoprefixerPrefixeds) {
if (rule._autoprefixerPrefixeds[this.name]) {
return rule._autoprefixerPrefixeds;
}
} else {
rule._autoprefixerPrefixeds = {};
}
var prefixeds = {};
if (rule.selector.includes(',')) {
var ruleParts = list.comma(rule.selector);
var toProcess = ruleParts.filter(function (el) {
return el.includes(_this2.name);
});
var _loop = function _loop() {
var prefix = _step.value;
prefixeds[prefix] = toProcess.map(function (el) {
return _this2.replace(el, prefix);
}).join(', ');
};
for (var _iterator = _createForOfIteratorHelperLoose(this.possible()), _step; !(_step = _iterator()).done;) {
_loop();
}
} else {
for (var _iterator2 = _createForOfIteratorHelperLoose(this.possible()), _step2; !(_step2 = _iterator2()).done;) {
var prefix = _step2.value;
prefixeds[prefix] = this.replace(rule.selector, prefix);
}
}
rule._autoprefixerPrefixeds[this.name] = prefixeds;
return rule._autoprefixerPrefixeds;
}
/**
* Is rule already prefixed before
*/
;
_proto.already = function already(rule, prefixeds, prefix) {
var index = rule.parent.index(rule) - 1;
while (index >= 0) {
var before = rule.parent.nodes[index];
if (before.type !== 'rule') {
return false;
}
var some = false;
for (var key in prefixeds[this.name]) {
var prefixed = prefixeds[this.name][key];
if (before.selector === prefixed) {
if (prefix === key) {
return true;
} else {
some = true;
break;
}
}
}
if (!some) {
return false;
}
index -= 1;
}
return false;
}
/**
* Replace selectors by prefixed one
*/
;
_proto.replace = function replace(selector, prefix) {
return selector.replace(this.regexp(), "$1" + this.prefixed(prefix));
}
/**
* Clone and add prefixes for at-rule
*/
;
_proto.add = function add(rule, prefix) {
var prefixeds = this.prefixeds(rule);
if (this.already(rule, prefixeds, prefix)) {
return;
}
var cloned = this.clone(rule, {
selector: prefixeds[this.name][prefix]
});
rule.parent.insertBefore(rule, cloned);
}
/**
* Return function to fast find prefixed selector
*/
;
_proto.old = function old(prefix) {
return new OldSelector(this, prefix);
};
return Selector;
}(Prefixer);
module.exports = Selector;

346
CTOAsYouGo/node_modules/autoprefixer/lib/supports.js generated vendored Normal file
View File

@@ -0,0 +1,346 @@
"use strict";
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var postcss = require('postcss');
var data = require('caniuse-lite').feature(require('caniuse-lite/data/features/css-featurequeries.js'));
var Browsers = require('./browsers');
var brackets = require('./brackets');
var Value = require('./value');
var utils = require('./utils');
var supported = [];
for (var browser in data.stats) {
var versions = data.stats[browser];
for (var version in versions) {
var support = versions[version];
if (/y/.test(support)) {
supported.push(browser + ' ' + version);
}
}
}
var Supports = /*#__PURE__*/function () {
function Supports(Prefixes, all) {
this.Prefixes = Prefixes;
this.all = all;
}
/**
* Return prefixer only with @supports supported browsers
*/
var _proto = Supports.prototype;
_proto.prefixer = function prefixer() {
if (this.prefixerCache) {
return this.prefixerCache;
}
var filtered = this.all.browsers.selected.filter(function (i) {
return supported.includes(i);
});
var browsers = new Browsers(this.all.browsers.data, filtered, this.all.options);
this.prefixerCache = new this.Prefixes(this.all.data, browsers, this.all.options);
return this.prefixerCache;
}
/**
* Parse string into declaration property and value
*/
;
_proto.parse = function parse(str) {
var parts = str.split(':');
var prop = parts[0];
var value = parts[1];
if (!value) value = '';
return [prop.trim(), value.trim()];
}
/**
* Create virtual rule to process it by prefixer
*/
;
_proto.virtual = function virtual(str) {
var _this$parse = this.parse(str),
prop = _this$parse[0],
value = _this$parse[1];
var rule = postcss.parse('a{}').first;
rule.append({
prop: prop,
value: value,
raws: {
before: ''
}
});
return rule;
}
/**
* Return array of Declaration with all necessary prefixes
*/
;
_proto.prefixed = function prefixed(str) {
var rule = this.virtual(str);
if (this.disabled(rule.first)) {
return rule.nodes;
}
var result = {
warn: function warn() {
return null;
}
};
var prefixer = this.prefixer().add[rule.first.prop];
prefixer && prefixer.process && prefixer.process(rule.first, result);
for (var _iterator = _createForOfIteratorHelperLoose(rule.nodes), _step; !(_step = _iterator()).done;) {
var decl = _step.value;
for (var _iterator2 = _createForOfIteratorHelperLoose(this.prefixer().values('add', rule.first.prop)), _step2; !(_step2 = _iterator2()).done;) {
var value = _step2.value;
value.process(decl);
}
Value.save(this.all, decl);
}
return rule.nodes;
}
/**
* Return true if brackets node is "not" word
*/
;
_proto.isNot = function isNot(node) {
return typeof node === 'string' && /not\s*/i.test(node);
}
/**
* Return true if brackets node is "or" word
*/
;
_proto.isOr = function isOr(node) {
return typeof node === 'string' && /\s*or\s*/i.test(node);
}
/**
* Return true if brackets node is (prop: value)
*/
;
_proto.isProp = function isProp(node) {
return typeof node === 'object' && node.length === 1 && typeof node[0] === 'string';
}
/**
* Return true if prefixed property has no unprefixed
*/
;
_proto.isHack = function isHack(all, unprefixed) {
var check = new RegExp("(\\(|\\s)" + utils.escapeRegexp(unprefixed) + ":");
return !check.test(all);
}
/**
* Return true if we need to remove node
*/
;
_proto.toRemove = function toRemove(str, all) {
var _this$parse2 = this.parse(str),
prop = _this$parse2[0],
value = _this$parse2[1];
var unprefixed = this.all.unprefixed(prop);
var cleaner = this.all.cleaner();
if (cleaner.remove[prop] && cleaner.remove[prop].remove && !this.isHack(all, unprefixed)) {
return true;
}
for (var _iterator3 = _createForOfIteratorHelperLoose(cleaner.values('remove', unprefixed)), _step3; !(_step3 = _iterator3()).done;) {
var checker = _step3.value;
if (checker.check(value)) {
return true;
}
}
return false;
}
/**
* Remove all unnecessary prefixes
*/
;
_proto.remove = function remove(nodes, all) {
var i = 0;
while (i < nodes.length) {
if (!this.isNot(nodes[i - 1]) && this.isProp(nodes[i]) && this.isOr(nodes[i + 1])) {
if (this.toRemove(nodes[i][0], all)) {
nodes.splice(i, 2);
continue;
}
i += 2;
continue;
}
if (typeof nodes[i] === 'object') {
nodes[i] = this.remove(nodes[i], all);
}
i += 1;
}
return nodes;
}
/**
* Clean brackets with one child
*/
;
_proto.cleanBrackets = function cleanBrackets(nodes) {
var _this = this;
return nodes.map(function (i) {
if (typeof i !== 'object') {
return i;
}
if (i.length === 1 && typeof i[0] === 'object') {
return _this.cleanBrackets(i[0]);
}
return _this.cleanBrackets(i);
});
}
/**
* Add " or " between properties and convert it to brackets format
*/
;
_proto.convert = function convert(progress) {
var result = [''];
for (var _iterator4 = _createForOfIteratorHelperLoose(progress), _step4; !(_step4 = _iterator4()).done;) {
var i = _step4.value;
result.push([i.prop + ": " + i.value]);
result.push(' or ');
}
result[result.length - 1] = '';
return result;
}
/**
* Compress value functions into a string nodes
*/
;
_proto.normalize = function normalize(nodes) {
var _this2 = this;
if (typeof nodes !== 'object') {
return nodes;
}
nodes = nodes.filter(function (i) {
return i !== '';
});
if (typeof nodes[0] === 'string' && nodes[0].includes(':')) {
return [brackets.stringify(nodes)];
}
return nodes.map(function (i) {
return _this2.normalize(i);
});
}
/**
* Add prefixes
*/
;
_proto.add = function add(nodes, all) {
var _this3 = this;
return nodes.map(function (i) {
if (_this3.isProp(i)) {
var prefixed = _this3.prefixed(i[0]);
if (prefixed.length > 1) {
return _this3.convert(prefixed);
}
return i;
}
if (typeof i === 'object') {
return _this3.add(i, all);
}
return i;
});
}
/**
* Add prefixed declaration
*/
;
_proto.process = function process(rule) {
var ast = brackets.parse(rule.params);
ast = this.normalize(ast);
ast = this.remove(ast, rule.params);
ast = this.add(ast, rule.params);
ast = this.cleanBrackets(ast);
rule.params = brackets.stringify(ast);
}
/**
* Check global options
*/
;
_proto.disabled = function disabled(node) {
if (!this.all.options.grid) {
if (node.prop === 'display' && node.value.includes('grid')) {
return true;
}
if (node.prop.includes('grid') || node.prop === 'justify-items') {
return true;
}
}
if (this.all.options.flexbox === false) {
if (node.prop === 'display' && node.value.includes('flex')) {
return true;
}
var other = ['order', 'justify-content', 'align-items', 'align-content'];
if (node.prop.includes('flex') || other.includes(node.prop)) {
return true;
}
}
return false;
};
return Supports;
}();
module.exports = Supports;

411
CTOAsYouGo/node_modules/autoprefixer/lib/transition.js generated vendored Normal file
View File

@@ -0,0 +1,411 @@
"use strict";
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var parser = require('postcss-value-parser');
var vendor = require('postcss').vendor;
var list = require('postcss').list;
var Browsers = require('./browsers');
var Transition = /*#__PURE__*/function () {
function Transition(prefixes) {
_defineProperty(this, "props", ['transition', 'transition-property']);
this.prefixes = prefixes;
}
/**
* Process transition and add prefixes for all necessary properties
*/
var _proto = Transition.prototype;
_proto.add = function add(decl, result) {
var _this = this;
var prefix, prop;
var add = this.prefixes.add[decl.prop];
var vendorPrefixes = this.ruleVendorPrefixes(decl);
var declPrefixes = vendorPrefixes || add && add.prefixes || [];
var params = this.parse(decl.value);
var names = params.map(function (i) {
return _this.findProp(i);
});
var added = [];
if (names.some(function (i) {
return i[0] === '-';
})) {
return;
}
for (var _iterator = _createForOfIteratorHelperLoose(params), _step; !(_step = _iterator()).done;) {
var param = _step.value;
prop = this.findProp(param);
if (prop[0] === '-') continue;
var prefixer = this.prefixes.add[prop];
if (!prefixer || !prefixer.prefixes) continue;
for (var _iterator3 = _createForOfIteratorHelperLoose(prefixer.prefixes), _step3; !(_step3 = _iterator3()).done;) {
prefix = _step3.value;
if (vendorPrefixes && !vendorPrefixes.some(function (p) {
return prefix.includes(p);
})) {
continue;
}
var prefixed = this.prefixes.prefixed(prop, prefix);
if (prefixed !== '-ms-transform' && !names.includes(prefixed)) {
if (!this.disabled(prop, prefix)) {
added.push(this.clone(prop, prefixed, param));
}
}
}
}
params = params.concat(added);
var value = this.stringify(params);
var webkitClean = this.stringify(this.cleanFromUnprefixed(params, '-webkit-'));
if (declPrefixes.includes('-webkit-')) {
this.cloneBefore(decl, "-webkit-" + decl.prop, webkitClean);
}
this.cloneBefore(decl, decl.prop, webkitClean);
if (declPrefixes.includes('-o-')) {
var operaClean = this.stringify(this.cleanFromUnprefixed(params, '-o-'));
this.cloneBefore(decl, "-o-" + decl.prop, operaClean);
}
for (var _iterator2 = _createForOfIteratorHelperLoose(declPrefixes), _step2; !(_step2 = _iterator2()).done;) {
prefix = _step2.value;
if (prefix !== '-webkit-' && prefix !== '-o-') {
var prefixValue = this.stringify(this.cleanOtherPrefixes(params, prefix));
this.cloneBefore(decl, prefix + decl.prop, prefixValue);
}
}
if (value !== decl.value && !this.already(decl, decl.prop, value)) {
this.checkForWarning(result, decl);
decl.cloneBefore();
decl.value = value;
}
}
/**
* Find property name
*/
;
_proto.findProp = function findProp(param) {
var prop = param[0].value;
if (/^\d/.test(prop)) {
for (var _iterator4 = _createForOfIteratorHelperLoose(param.entries()), _step4; !(_step4 = _iterator4()).done;) {
var _step4$value = _step4.value,
i = _step4$value[0],
token = _step4$value[1];
if (i !== 0 && token.type === 'word') {
return token.value;
}
}
}
return prop;
}
/**
* Does we already have this declaration
*/
;
_proto.already = function already(decl, prop, value) {
return decl.parent.some(function (i) {
return i.prop === prop && i.value === value;
});
}
/**
* Add declaration if it is not exist
*/
;
_proto.cloneBefore = function cloneBefore(decl, prop, value) {
if (!this.already(decl, prop, value)) {
decl.cloneBefore({
prop: prop,
value: value
});
}
}
/**
* Show transition-property warning
*/
;
_proto.checkForWarning = function checkForWarning(result, decl) {
if (decl.prop !== 'transition-property') {
return;
}
decl.parent.each(function (i) {
if (i.type !== 'decl') {
return undefined;
}
if (i.prop.indexOf('transition-') !== 0) {
return undefined;
}
if (i.prop === 'transition-property') {
return undefined;
}
if (list.comma(i.value).length > 1) {
decl.warn(result, 'Replace transition-property to transition, ' + 'because Autoprefixer could not support ' + 'any cases of transition-property ' + 'and other transition-*');
}
return false;
});
}
/**
* Process transition and remove all unnecessary properties
*/
;
_proto.remove = function remove(decl) {
var _this2 = this;
var params = this.parse(decl.value);
params = params.filter(function (i) {
var prop = _this2.prefixes.remove[_this2.findProp(i)];
return !prop || !prop.remove;
});
var value = this.stringify(params);
if (decl.value === value) {
return;
}
if (params.length === 0) {
decl.remove();
return;
}
var _double = decl.parent.some(function (i) {
return i.prop === decl.prop && i.value === value;
});
var smaller = decl.parent.some(function (i) {
return i !== decl && i.prop === decl.prop && i.value.length > value.length;
});
if (_double || smaller) {
decl.remove();
return;
}
decl.value = value;
}
/**
* Parse properties list to array
*/
;
_proto.parse = function parse(value) {
var ast = parser(value);
var result = [];
var param = [];
for (var _iterator5 = _createForOfIteratorHelperLoose(ast.nodes), _step5; !(_step5 = _iterator5()).done;) {
var node = _step5.value;
param.push(node);
if (node.type === 'div' && node.value === ',') {
result.push(param);
param = [];
}
}
result.push(param);
return result.filter(function (i) {
return i.length > 0;
});
}
/**
* Return properties string from array
*/
;
_proto.stringify = function stringify(params) {
if (params.length === 0) {
return '';
}
var nodes = [];
for (var _iterator6 = _createForOfIteratorHelperLoose(params), _step6; !(_step6 = _iterator6()).done;) {
var param = _step6.value;
if (param[param.length - 1].type !== 'div') {
param.push(this.div(params));
}
nodes = nodes.concat(param);
}
if (nodes[0].type === 'div') {
nodes = nodes.slice(1);
}
if (nodes[nodes.length - 1].type === 'div') {
nodes = nodes.slice(0, +-2 + 1 || undefined);
}
return parser.stringify({
nodes: nodes
});
}
/**
* Return new param array with different name
*/
;
_proto.clone = function clone(origin, name, param) {
var result = [];
var changed = false;
for (var _iterator7 = _createForOfIteratorHelperLoose(param), _step7; !(_step7 = _iterator7()).done;) {
var i = _step7.value;
if (!changed && i.type === 'word' && i.value === origin) {
result.push({
type: 'word',
value: name
});
changed = true;
} else {
result.push(i);
}
}
return result;
}
/**
* Find or create separator
*/
;
_proto.div = function div(params) {
for (var _iterator8 = _createForOfIteratorHelperLoose(params), _step8; !(_step8 = _iterator8()).done;) {
var param = _step8.value;
for (var _iterator9 = _createForOfIteratorHelperLoose(param), _step9; !(_step9 = _iterator9()).done;) {
var node = _step9.value;
if (node.type === 'div' && node.value === ',') {
return node;
}
}
}
return {
type: 'div',
value: ',',
after: ' '
};
};
_proto.cleanOtherPrefixes = function cleanOtherPrefixes(params, prefix) {
var _this3 = this;
return params.filter(function (param) {
var current = vendor.prefix(_this3.findProp(param));
return current === '' || current === prefix;
});
}
/**
* Remove all non-webkit prefixes and unprefixed params if we have prefixed
*/
;
_proto.cleanFromUnprefixed = function cleanFromUnprefixed(params, prefix) {
var _this4 = this;
var remove = params.map(function (i) {
return _this4.findProp(i);
}).filter(function (i) {
return i.slice(0, prefix.length) === prefix;
}).map(function (i) {
return _this4.prefixes.unprefixed(i);
});
var result = [];
for (var _iterator10 = _createForOfIteratorHelperLoose(params), _step10; !(_step10 = _iterator10()).done;) {
var param = _step10.value;
var prop = this.findProp(param);
var p = vendor.prefix(prop);
if (!remove.includes(prop) && (p === prefix || p === '')) {
result.push(param);
}
}
return result;
}
/**
* Check property for disabled by option
*/
;
_proto.disabled = function disabled(prop, prefix) {
var other = ['order', 'justify-content', 'align-self', 'align-content'];
if (prop.includes('flex') || other.includes(prop)) {
if (this.prefixes.options.flexbox === false) {
return true;
}
if (this.prefixes.options.flexbox === 'no-2009') {
return prefix.includes('2009');
}
}
return undefined;
}
/**
* Check if transition prop is inside vendor specific rule
*/
;
_proto.ruleVendorPrefixes = function ruleVendorPrefixes(decl) {
var parent = decl.parent;
if (parent.type !== 'rule') {
return false;
} else if (!parent.selector.includes(':-')) {
return false;
}
var selectors = Browsers.prefixes().filter(function (s) {
return parent.selector.includes(':' + s);
});
return selectors.length > 0 ? selectors : false;
};
return Transition;
}();
module.exports = Transition;

103
CTOAsYouGo/node_modules/autoprefixer/lib/utils.js generated vendored Normal file
View File

@@ -0,0 +1,103 @@
"use strict";
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var list = require('postcss').list;
module.exports = {
/**
* Throw special error, to tell beniary,
* that this error is from Autoprefixer.
*/
error: function error(text) {
var err = new Error(text);
err.autoprefixer = true;
throw err;
},
/**
* Return array, that doesnt contain duplicates.
*/
uniq: function uniq(array) {
var filtered = [];
for (var _iterator = _createForOfIteratorHelperLoose(array), _step; !(_step = _iterator()).done;) {
var i = _step.value;
if (!filtered.includes(i)) {
filtered.push(i);
}
}
return filtered;
},
/**
* Return "-webkit-" on "-webkit- old"
*/
removeNote: function removeNote(string) {
if (!string.includes(' ')) {
return string;
}
return string.split(' ')[0];
},
/**
* Escape RegExp symbols
*/
escapeRegexp: function escapeRegexp(string) {
return string.replace(/[$()*+-.?[\\\]^{|}]/g, '\\$&');
},
/**
* Return regexp to check, that CSS string contain word
*/
regexp: function regexp(word, escape) {
if (escape === void 0) {
escape = true;
}
if (escape) {
word = this.escapeRegexp(word);
}
return new RegExp("(^|[\\s,(])(" + word + "($|[\\s(,]))", 'gi');
},
/**
* Change comma list
*/
editList: function editList(value, callback) {
var origin = list.comma(value);
var changed = callback(origin, []);
if (origin === changed) {
return value;
}
var join = value.match(/,\s*/);
join = join ? join[0] : ', ';
return changed.join(join);
},
/**
* Split the selector into parts.
* It returns 3 level deep array because selectors can be comma
* separated (1), space separated (2), and combined (3)
* @param {String} selector selector string
* @return {Array<Array<Array>>} 3 level deep array of split selector
* @see utils.test.js for examples
*/
splitSelector: function splitSelector(selector) {
return list.comma(selector).map(function (i) {
return list.space(i).map(function (k) {
return k.split(/(?=\.|#)/g);
});
});
}
};

164
CTOAsYouGo/node_modules/autoprefixer/lib/value.js generated vendored Normal file
View File

@@ -0,0 +1,164 @@
"use strict";
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
var vendor = require('postcss').vendor;
var Prefixer = require('./prefixer');
var OldValue = require('./old-value');
var utils = require('./utils');
var Value = /*#__PURE__*/function (_Prefixer) {
_inheritsLoose(Value, _Prefixer);
function Value() {
return _Prefixer.apply(this, arguments) || this;
}
/**
* Clone decl for each prefixed values
*/
Value.save = function save(prefixes, decl) {
var _this = this;
var prop = decl.prop;
var result = [];
var _loop = function _loop(prefix) {
var value = decl._autoprefixerValues[prefix];
if (value === decl.value) {
return "continue";
}
var item = void 0;
var propPrefix = vendor.prefix(prop);
if (propPrefix === '-pie-') {
return "continue";
}
if (propPrefix === prefix) {
item = decl.value = value;
result.push(item);
return "continue";
}
var prefixed = prefixes.prefixed(prop, prefix);
var rule = decl.parent;
if (!rule.every(function (i) {
return i.prop !== prefixed;
})) {
result.push(item);
return "continue";
}
var trimmed = value.replace(/\s+/, ' ');
var already = rule.some(function (i) {
return i.prop === decl.prop && i.value.replace(/\s+/, ' ') === trimmed;
});
if (already) {
result.push(item);
return "continue";
}
var cloned = _this.clone(decl, {
value: value
});
item = decl.parent.insertBefore(decl, cloned);
result.push(item);
};
for (var prefix in decl._autoprefixerValues) {
var _ret = _loop(prefix);
if (_ret === "continue") continue;
}
return result;
}
/**
* Is declaration need to be prefixed
*/
;
var _proto = Value.prototype;
_proto.check = function check(decl) {
var value = decl.value;
if (!value.includes(this.name)) {
return false;
}
return !!value.match(this.regexp());
}
/**
* Lazy regexp loading
*/
;
_proto.regexp = function regexp() {
return this.regexpCache || (this.regexpCache = utils.regexp(this.name));
}
/**
* Add prefix to values in string
*/
;
_proto.replace = function replace(string, prefix) {
return string.replace(this.regexp(), "$1" + prefix + "$2");
}
/**
* Get value with comments if it was not changed
*/
;
_proto.value = function value(decl) {
if (decl.raws.value && decl.raws.value.value === decl.value) {
return decl.raws.value.raw;
} else {
return decl.value;
}
}
/**
* Save values with next prefixed token
*/
;
_proto.add = function add(decl, prefix) {
if (!decl._autoprefixerValues) {
decl._autoprefixerValues = {};
}
var value = decl._autoprefixerValues[prefix] || this.value(decl);
var before;
do {
before = value;
value = this.replace(value, prefix);
if (value === false) return;
} while (value !== before);
decl._autoprefixerValues[prefix] = value;
}
/**
* Return function to fast find prefixed value
*/
;
_proto.old = function old(prefix) {
return new OldValue(this.name, prefix + this.name);
};
return Value;
}(Prefixer);
module.exports = Value;

30
CTOAsYouGo/node_modules/autoprefixer/package.json generated vendored Normal file
View File

@@ -0,0 +1,30 @@
{
"name": "autoprefixer",
"version": "9.8.8",
"description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website",
"keywords": [
"autoprefixer",
"css",
"prefix",
"postcss",
"postcss-plugin"
],
"bin": "./bin/autoprefixer",
"funding": {
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/autoprefixer"
},
"author": "Andrey Sitnik <andrey@sitnik.ru>",
"license": "MIT",
"repository": "postcss/autoprefixer",
"dependencies": {
"browserslist": "^4.12.0",
"caniuse-lite": "^1.0.30001109",
"normalize-range": "^0.1.2",
"num2fraction": "^1.2.2",
"picocolors": "^0.2.1",
"postcss": "^7.0.32",
"postcss-value-parser": "^4.1.0"
},
"main": "lib/autoprefixer"
}