postcss 7.0.1 → 7.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of postcss might be problematic. Click here for more details.

package/CHANGELOG.md CHANGED
@@ -1,12 +1,25 @@
1
1
  # Change Log
2
2
  This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
+ ## 7.0.5
5
+ * Reduce npm package size (by Gilad Peleg).
6
+
7
+ ## 7.0.4
8
+ * Fix safe parser regression.
9
+
10
+ ## 7.0.3
11
+ * Fix tokenizer extendability (by Andrew Powell).
12
+ * Reduce npm package size.
13
+
14
+ ## 7.0.2
15
+ * Fix warning text (by Rui Pedro M Lima).
16
+
4
17
  ## 7.0.1
5
18
  * Fix JSDoc (by Steven Lambert).
6
19
 
7
20
  ## 7.0 “President Amy”
8
21
  * Remove Node.js 9 and Node.js 4 support.
9
- * Remove IE and “dead” browsers from Babel.
22
+ * Remove IE and “dead” browsers support for client-side Babel transpiling.
10
23
  * Add CSS position on error happened inside `walk()` (by Nikhil Gaba).
11
24
  * Add `LazyResult#finally` (by Igor Kamyshev).
12
25
  * Add warning on calling PostCSS without plugins and syntax options.
@@ -1,6 +1,6 @@
1
1
  ## PostCSS Architecture
2
2
 
3
- General overview of PostCSS architecture.
3
+ General overview of the PostCSS architecture.
4
4
  It can be useful for everyone who wish to contribute to core or develop better understanding of the tool.
5
5
 
6
6
  **Table of Contents**
@@ -37,7 +37,7 @@ Before diving deeper into development of PostCSS let's briefly describe what is
37
37
 
38
38
  ### Workflow
39
39
 
40
- This is high level overview of whole PostCSS workflow
40
+ This is high-level overview of whole PostCSS workflow
41
41
 
42
42
  <img width="300" src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/aa/PostCSS_scheme.svg/512px-PostCSS_scheme.svg.png" alt="workflow">
43
43
 
@@ -54,7 +54,7 @@ That being said, there are few ways to write parser
54
54
  - *Split it into lexical analysis/parsing steps (source string → tokens → AST)*
55
55
 
56
56
  This is the way of how we do it in PostCSS and also the most popular one.
57
- A lot of parsers like [`Babylon` (parser behind Babel)](https://github.com/babel/babel/tree/master/packages/babylon), [`CSSTree`](https://github.com/csstree/csstree) were written in such way.
57
+ A lot of parsers like [`@babel/parser` (parser behind Babel)](https://github.com/babel/babel/tree/master/packages/babel-parser), [`CSSTree`](https://github.com/csstree/csstree) were written in such way.
58
58
  The main reasons to separate tokenization from parsing steps are performance and abstracting complexity.
59
59
 
60
60
  Let think about why second way is better for our needs.
@@ -77,7 +77,7 @@ So now lets look more closely on structures that play main role in PostCSS workf
77
77
 
78
78
  Token is a simple structure that describes some part of syntax like `at-rule`, `comment` or `word`. It can also contain positional information for more descriptive errors.
79
79
 
80
- For example if we consider following css
80
+ For example if we consider following CSS
81
81
 
82
82
  ```css
83
83
  .className { color: #FFF; }
@@ -133,7 +133,7 @@ So now lets look more closely on structures that play main role in PostCSS workf
133
133
 
134
134
  Parser works in common with Tokenizer and operates over tokens not source string, as it would be very inefficient operation.
135
135
 
136
- It use mostly `nextToken` and `back` methods provided by Tokenizer for obtaining single or multiple tokens and than construct part of AST called `Node`
136
+ It use mostly `nextToken` and `back` methods provided by Tokenizer for obtaining single or multiple tokens and then construct part of AST called `Node`
137
137
 
138
138
  There are multiple Node types that PostCSS could produce but all of them inherit from base Node [class](https://github.com/postcss/postcss/blob/master/lib/node.es6#L34).
139
139
 
@@ -22,34 +22,34 @@ The prefix `postcss-` shows that the plugin is part of the PostCSS ecosystem.
22
22
 
23
23
  This rule is not mandatory for plugins that can run as independent tools,
24
24
  without the user necessarily knowing that it is powered by
25
- PostCSS — for example, [cssnext] and [Autoprefixer].
25
+ PostCSS — for example, [RTLCSS] and [Autoprefixer].
26
26
 
27
27
  [Autoprefixer]: https://github.com/postcss/autoprefixer
28
- [cssnext]: http://cssnext.io/
28
+ [RTLCSS]: https://rtlcss.com/
29
29
 
30
30
  ### 1.2. Do one thing, and do it well
31
31
 
32
32
  Do not create multitool plugins. Several small, one-purpose plugins bundled into
33
33
  a plugin pack is usually a better solution.
34
34
 
35
- For example, [cssnext] contains many small plugins,
36
- one for each W3C specification. And [cssnano] contains a separate plugin
35
+ For example, [`postcss-preset-env`] contains many small plugins,
36
+ one for each W3C specification. And [`cssnano`] contains a separate plugin
37
37
  for each of its optimization.
38
38
 
39
- [cssnext]: http://cssnext.io/
40
- [cssnano]: https://github.com/ben-eb/cssnano
39
+ [`postcss-preset-env`]: https://preset-env.cssdb.org/
40
+ [`cssnano`]: https://github.com/ben-eb/cssnano
41
41
 
42
42
  ### 1.3. Do not use mixins
43
43
 
44
44
  Preprocessors libraries like Compass provide an API with mixins.
45
45
 
46
46
  PostCSS plugins are different.
47
- A plugin cannot be just a set of mixins for [postcss-mixins].
47
+ A plugin cannot be just a set of mixins for [`postcss-mixins`].
48
48
 
49
49
  To achieve your goal, consider transforming valid CSS
50
50
  or using custom at-rules and custom properties.
51
51
 
52
- [postcss-mixins]: https://github.com/postcss/postcss-mixins
52
+ [`postcss-mixins`]: https://github.com/postcss/postcss-mixins
53
53
 
54
54
  ### 1.4. Create plugin by `postcss.plugin`
55
55
 
@@ -98,7 +98,7 @@ postcss.plugin('plugin-sprite', opts => {
98
98
  Every node must have a relevant `source` so PostCSS can generate
99
99
  an accurate source map.
100
100
 
101
- So if you add new declaration based on some existing declaration, you should
101
+ So if you add a new declaration based on some existing declaration, you should
102
102
  clone the existing declaration in order to save that original `source`.
103
103
 
104
104
  ```js
@@ -156,7 +156,7 @@ If CSS input is a source of the warning, the plugin must set the `node` option.
156
156
 
157
157
  ### 4.1. Document your plugin in English
158
158
 
159
- PostCSS plugins must have their `README.md` written in English. Do not be afraid
159
+ PostCSS plugins must have their `README.md` wrote in English. Do not be afraid
160
160
  of your English skills, as the open source community will fix your errors.
161
161
 
162
162
  Of course, you are welcome to write documentation in other languages;
@@ -115,7 +115,7 @@ if (result.map) {
115
115
 
116
116
  ### 4.1. Document your runner in English
117
117
 
118
- PostCSS runners must have their `README.md` written in English. Do not be afraid
118
+ PostCSS runners must have their `README.md` wrote in English. Do not be afraid
119
119
  of your English skills, as the open source community will fix your errors.
120
120
 
121
121
  Of course, you are welcome to write documentation in other languages;
@@ -127,7 +127,7 @@ PostCSS runners must describe changes of all releases in a separate file,
127
127
  such as `ChangeLog.md`, `History.md`, or with [GitHub Releases].
128
128
  Visit [Keep A Changelog] for more information on how to write one of these.
129
129
 
130
- Of course you should use [SemVer].
130
+ Of course, you should use [SemVer].
131
131
 
132
132
  [Keep A Changelog]: http://keepachangelog.com/
133
133
  [GitHub Releases]: https://help.github.com/articles/creating-releases/
package/lib/at-rule.js CHANGED
@@ -1,18 +1,13 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
+ exports.default = void 0;
4
5
 
5
- var _container = require('./container');
6
-
7
- var _container2 = _interopRequireDefault(_container);
6
+ var _container = _interopRequireDefault(require("./container"));
8
7
 
9
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
9
 
11
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12
-
13
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
14
-
15
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
10
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
16
11
 
17
12
  /**
18
13
  * Represents an at-rule.
@@ -32,42 +27,44 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
32
27
  * const media = root.last
33
28
  * media.nodes //=> []
34
29
  */
35
- var AtRule = function (_Container) {
36
- _inherits(AtRule, _Container);
30
+ var AtRule =
31
+ /*#__PURE__*/
32
+ function (_Container) {
33
+ _inheritsLoose(AtRule, _Container);
37
34
 
38
35
  function AtRule(defaults) {
39
- _classCallCheck(this, AtRule);
40
-
41
- var _this = _possibleConstructorReturn(this, _Container.call(this, defaults));
36
+ var _this;
42
37
 
38
+ _this = _Container.call(this, defaults) || this;
43
39
  _this.type = 'atrule';
44
40
  return _this;
45
41
  }
46
42
 
47
- AtRule.prototype.append = function append() {
43
+ var _proto = AtRule.prototype;
44
+
45
+ _proto.append = function append() {
48
46
  var _Container$prototype$;
49
47
 
50
48
  if (!this.nodes) this.nodes = [];
51
49
 
52
- for (var _len = arguments.length, children = Array(_len), _key = 0; _key < _len; _key++) {
50
+ for (var _len = arguments.length, children = new Array(_len), _key = 0; _key < _len; _key++) {
53
51
  children[_key] = arguments[_key];
54
52
  }
55
53
 
56
54
  return (_Container$prototype$ = _Container.prototype.append).call.apply(_Container$prototype$, [this].concat(children));
57
55
  };
58
56
 
59
- AtRule.prototype.prepend = function prepend() {
57
+ _proto.prepend = function prepend() {
60
58
  var _Container$prototype$2;
61
59
 
62
60
  if (!this.nodes) this.nodes = [];
63
61
 
64
- for (var _len2 = arguments.length, children = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
62
+ for (var _len2 = arguments.length, children = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
65
63
  children[_key2] = arguments[_key2];
66
64
  }
67
65
 
68
66
  return (_Container$prototype$2 = _Container.prototype.prepend).call.apply(_Container$prototype$2, [this].concat(children));
69
67
  };
70
-
71
68
  /**
72
69
  * @memberof AtRule#
73
70
  * @member {string} name The at-rule’s name immediately follows the `@`.
@@ -124,8 +121,9 @@ var AtRule = function (_Container) {
124
121
 
125
122
 
126
123
  return AtRule;
127
- }(_container2.default);
124
+ }(_container.default);
128
125
 
129
- exports.default = AtRule;
130
- module.exports = exports['default'];
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jbGFyYXRpb27igJlzIHZhbHVlLFxuICAgKiBQb3N0Q1NTIHdpbGwgdXNlIHRoZSByYXcgdmFsdWUgd2l0aCBjb21tZW50cy5cbiAgICpcbiAgICogQGV4YW1wbGVcbiAgICogY29uc3Qgcm9vdCA9IHBvc3Rjc3MucGFyc2UoJyAgQG1lZGlhXFxucHJpbnQge1xcbn0nKVxuICAgKiByb290LmZpcnN0LmZpcnN0LnJhd3MgLy89PiB7IGJlZm9yZTogJyAgJyxcbiAgICogICAgICAgICAgICAgICAgICAgICAgIC8vICAgICBiZXR3ZWVuOiAnICcsXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgYWZ0ZXJOYW1lOiAnXFxuJyxcbiAgICogICAgICAgICAgICAgICAgICAgICAgIC8vICAgICBhZnRlcjogJ1xcbicgfVxuICAgKi9cbn1cblxuZXhwb3J0IGRlZmF1bHQgQXRSdWxlXG4iXX0=
126
+ var _default = AtRule;
127
+ exports.default = _default;
128
+ module.exports = exports.default;
129
+ //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImF0LXJ1bGUuZXM2Il0sIm5hbWVzIjpbIkF0UnVsZSIsImRlZmF1bHRzIiwidHlwZSIsImFwcGVuZCIsIm5vZGVzIiwiY2hpbGRyZW4iLCJwcmVwZW5kIiwiQ29udGFpbmVyIl0sIm1hcHBpbmdzIjoiOzs7OztBQUFBOzs7Ozs7QUFFQTs7Ozs7Ozs7Ozs7Ozs7Ozs7O0lBa0JNQSxNOzs7OztBQUNKLGtCQUFhQyxRQUFiLEVBQXVCO0FBQUE7O0FBQ3JCLGtDQUFNQSxRQUFOO0FBQ0EsVUFBS0MsSUFBTCxHQUFZLFFBQVo7QUFGcUI7QUFHdEI7Ozs7U0FFREMsTSxxQkFBcUI7QUFBQTs7QUFDbkIsUUFBSSxDQUFDLEtBQUtDLEtBQVYsRUFBaUIsS0FBS0EsS0FBTCxHQUFhLEVBQWI7O0FBRE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gZm9yIGF0LXJ1bGVzLlxuICAgKiAqIGBzZW1pY29sb25gOiBjb250YWlucyB0cnVlIGlmIHRoZSBsYXN0IGNoaWxkIGhhc1xuICAgKiAgIGFuIChvcHRpb25hbCkgc2VtaWNvbG9uLlxuICAgKiAqIGBhZnRlck5hbWVgOiB0aGUgc3BhY2UgYmV0d2VlbiB0aGUgYXQtcnVsZSBuYW1lIGFuZCBpdHMgcGFyYW1ldGVycy5cbiAgICpcbiAgICogUG9zdENTUyBjbGVhbnMgYXQtcnVsZSBwYXJhbWV0ZXJzIGZyb20gY29tbWVudHMgYW5kIGV4dHJhIHNwYWNlcyxcbiAgICogYnV0IGl0IHN0b3JlcyBvcmlnaW4gY29udGVudCBpbiByYXdzIHByb3BlcnRpZXMuXG4gICAqIEFzIHN1Y2gsIGlmIHlvdSBkb27igJl0IGNoYW5nZSBhIGRlY2xhcmF0aW9u4oCZcyB2YWx1ZSxcbiAgICogUG9zdENTUyB3aWxsIHVzZSB0aGUgcmF3IHZhbHVlIHdpdGggY29tbWVudHMuXG4gICAqXG4gICAqIEBleGFtcGxlXG4gICAqIGNvbnN0IHJvb3QgPSBwb3N0Y3NzLnBhcnNlKCcgIEBtZWRpYVxcbnByaW50IHtcXG59JylcbiAgICogcm9vdC5maXJzdC5maXJzdC5yYXdzIC8vPT4geyBiZWZvcmU6ICcgICcsXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgYmV0d2VlbjogJyAnLFxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgIGFmdGVyTmFtZTogJ1xcbicsXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgYWZ0ZXI6ICdcXG4nIH1cbiAgICovXG59XG5cbmV4cG9ydCBkZWZhdWx0IEF0UnVsZVxuIl0sImZpbGUiOiJhdC1ydWxlLmpzIn0=
package/lib/comment.js CHANGED
@@ -1,18 +1,13 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
+ exports.default = void 0;
4
5
 
5
- var _node = require('./node');
6
-
7
- var _node2 = _interopRequireDefault(_node);
6
+ var _node = _interopRequireDefault(require("./node"));
8
7
 
9
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
9
 
11
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12
-
13
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
14
-
15
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
10
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
16
11
 
17
12
  /**
18
13
  * Represents a comment between declarations or statements (rule and at-rules).
@@ -22,18 +17,18 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
22
17
  *
23
18
  * @extends Node
24
19
  */
25
- var Comment = function (_Node) {
26
- _inherits(Comment, _Node);
20
+ var Comment =
21
+ /*#__PURE__*/
22
+ function (_Node) {
23
+ _inheritsLoose(Comment, _Node);
27
24
 
28
25
  function Comment(defaults) {
29
- _classCallCheck(this, Comment);
30
-
31
- var _this = _possibleConstructorReturn(this, _Node.call(this, defaults));
26
+ var _this;
32
27
 
28
+ _this = _Node.call(this, defaults) || this;
33
29
  _this.type = 'comment';
34
30
  return _this;
35
31
  }
36
-
37
32
  /**
38
33
  * @memberof Comment#
39
34
  * @member {string} text The comment’s text.
@@ -54,8 +49,9 @@ var Comment = function (_Node) {
54
49
 
55
50
 
56
51
  return Comment;
57
- }(_node2.default);
52
+ }(_node.default);
58
53
 
59
- exports.default = Comment;
60
- module.exports = exports['default'];
61
- //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbW1lbnQuZXM2Il0sIm5hbWVzIjpbIkNvbW1lbnQiLCJkZWZhdWx0cyIsInR5cGUiLCJOb2RlIl0sIm1hcHBpbmdzIjoiOzs7O0FBQUE7Ozs7Ozs7Ozs7OztBQUVBOzs7Ozs7OztJQVFNQSxPOzs7QUFDSixtQkFBYUMsUUFBYixFQUF1QjtBQUFBOztBQUFBLGlEQUNyQixpQkFBTUEsUUFBTixDQURxQjs7QUFFckIsVUFBS0MsSUFBTCxHQUFZLFNBQVo7QUFGcUI7QUFHdEI7O0FBRUQ7Ozs7O0FBS0E7Ozs7Ozs7Ozs7Ozs7OztFQVhvQkMsYzs7a0JBeUJQSCxPIiwiZmlsZSI6ImNvbW1lbnQuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgTm9kZSBmcm9tICcuL25vZGUnXG5cbi8qKlxuICogUmVwcmVzZW50cyBhIGNvbW1lbnQgYmV0d2VlbiBkZWNsYXJhdGlvbnMgb3Igc3RhdGVtZW50cyAocnVsZSBhbmQgYXQtcnVsZXMpLlxuICpcbiAqIENvbW1lbnRzIGluc2lkZSBzZWxlY3RvcnMsIGF0LXJ1bGUgcGFyYW1ldGVycywgb3IgZGVjbGFyYXRpb24gdmFsdWVzXG4gKiB3aWxsIGJlIHN0b3JlZCBpbiB0aGUgYHJhd3NgIHByb3BlcnRpZXMgZXhwbGFpbmVkIGFib3ZlLlxuICpcbiAqIEBleHRlbmRzIE5vZGVcbiAqL1xuY2xhc3MgQ29tbWVudCBleHRlbmRzIE5vZGUge1xuICBjb25zdHJ1Y3RvciAoZGVmYXVsdHMpIHtcbiAgICBzdXBlcihkZWZhdWx0cylcbiAgICB0aGlzLnR5cGUgPSAnY29tbWVudCdcbiAgfVxuXG4gIC8qKlxuICAgKiBAbWVtYmVyb2YgQ29tbWVudCNcbiAgICogQG1lbWJlciB7c3RyaW5nfSB0ZXh0IFRoZSBjb21tZW504oCZcyB0ZXh0LlxuICAgKi9cblxuICAvKipcbiAgICogQG1lbWJlcm9mIENvbW1lbnQjXG4gICAqIEBtZW1iZXIge29iamVjdH0gcmF3cyBJbmZvcm1hdGlvbiB0byBnZW5lcmF0ZSBieXRlLXRvLWJ5dGUgZXF1YWxcbiAgICogICAgICAgICAgICAgICAgICAgICAgIG5vZGUgc3RyaW5nIGFzIGl0IHdhcyBpbiB0aGUgb3JpZ2luIGlucHV0LlxuICAgKlxuICAgKiBFdmVyeSBwYXJzZXIgc2F2ZXMgaXRzIG93biBwcm9wZXJ0aWVzLFxuICAgKiBidXQgdGhlIGRlZmF1bHQgQ1NTIHBhcnNlciB1c2VzOlxuICAgKlxuICAgKiAqIGBiZWZvcmVgOiB0aGUgc3BhY2Ugc3ltYm9scyBiZWZvcmUgdGhlIG5vZGUuXG4gICAqICogYGxlZnRgOiB0aGUgc3BhY2Ugc3ltYm9scyBiZXR3ZWVuIGAvKmAgYW5kIHRoZSBjb21tZW504oCZcyB0ZXh0LlxuICAgKiAqIGByaWdodGA6IHRoZSBzcGFjZSBzeW1ib2xzIGJldHdlZW4gdGhlIGNvbW1lbnTigJlzIHRleHQuXG4gICAqL1xufVxuXG5leHBvcnQgZGVmYXVsdCBDb21tZW50XG4iXX0=
54
+ var _default = Comment;
55
+ exports.default = _default;
56
+ module.exports = exports.default;
57
+ //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbW1lbnQuZXM2Il0sIm5hbWVzIjpbIkNvbW1lbnQiLCJkZWZhdWx0cyIsInR5cGUiLCJOb2RlIl0sIm1hcHBpbmdzIjoiOzs7OztBQUFBOzs7Ozs7QUFFQTs7Ozs7Ozs7SUFRTUEsTzs7Ozs7QUFDSixtQkFBYUMsUUFBYixFQUF1QjtBQUFBOztBQUNyQiw2QkF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