UNPKG

91.6 kBJavaScriptView Raw
1(function webpackUniversalModuleDefinition(root, factory) {
2 if(typeof exports === 'object' && typeof module === 'object')
3 module.exports = factory();
4 else if(typeof define === 'function' && define.amd)
5 define([], factory);
6 else if(typeof exports === 'object')
7 exports["Glamor"] = factory();
8 else
9 root["Glamor"] = factory();
10})(this, function() {
11return /******/ (function(modules) { // webpackBootstrap
12/******/ // The module cache
13/******/ var installedModules = {};
14/******/
15/******/ // The require function
16/******/ function __webpack_require__(moduleId) {
17/******/
18/******/ // Check if module is in cache
19/******/ if(installedModules[moduleId]) {
20/******/ return installedModules[moduleId].exports;
21/******/ }
22/******/ // Create a new module (and put it into the cache)
23/******/ var module = installedModules[moduleId] = {
24/******/ i: moduleId,
25/******/ l: false,
26/******/ exports: {}
27/******/ };
28/******/
29/******/ // Execute the module function
30/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31/******/
32/******/ // Flag the module as loaded
33/******/ module.l = true;
34/******/
35/******/ // Return the exports of the module
36/******/ return module.exports;
37/******/ }
38/******/
39/******/
40/******/ // expose the modules object (__webpack_modules__)
41/******/ __webpack_require__.m = modules;
42/******/
43/******/ // expose the module cache
44/******/ __webpack_require__.c = installedModules;
45/******/
46/******/ // define getter function for harmony exports
47/******/ __webpack_require__.d = function(exports, name, getter) {
48/******/ if(!__webpack_require__.o(exports, name)) {
49/******/ Object.defineProperty(exports, name, {
50/******/ configurable: false,
51/******/ enumerable: true,
52/******/ get: getter
53/******/ });
54/******/ }
55/******/ };
56/******/
57/******/ // getDefaultExport function for compatibility with non-harmony modules
58/******/ __webpack_require__.n = function(module) {
59/******/ var getter = module && module.__esModule ?
60/******/ function getDefault() { return module['default']; } :
61/******/ function getModuleExports() { return module; };
62/******/ __webpack_require__.d(getter, 'a', getter);
63/******/ return getter;
64/******/ };
65/******/
66/******/ // Object.prototype.hasOwnProperty.call
67/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
68/******/
69/******/ // __webpack_public_path__
70/******/ __webpack_require__.p = "";
71/******/
72/******/ // Load entry module and return exports
73/******/ return __webpack_require__(__webpack_require__.s = 4);
74/******/ })
75/************************************************************************/
76/******/ ([
77/* 0 */
78/***/ (function(module, exports, __webpack_require__) {
79
80"use strict";
81
82
83Object.defineProperty(exports, "__esModule", {
84 value: true
85});
86exports.default = isPrefixedValue;
87
88var regex = /-webkit-|-moz-|-ms-/;
89
90function isPrefixedValue(value) {
91 return typeof value === 'string' && regex.test(value);
92}
93module.exports = exports['default'];
94
95/***/ }),
96/* 1 */
97/***/ (function(module, exports, __webpack_require__) {
98
99"use strict";
100/*
101object-assign
102(c) Sindre Sorhus
103@license MIT
104*/
105
106
107/* eslint-disable no-unused-vars */
108var getOwnPropertySymbols = Object.getOwnPropertySymbols;
109var hasOwnProperty = Object.prototype.hasOwnProperty;
110var propIsEnumerable = Object.prototype.propertyIsEnumerable;
111
112function toObject(val) {
113 if (val === null || val === undefined) {
114 throw new TypeError('Object.assign cannot be called with null or undefined');
115 }
116
117 return Object(val);
118}
119
120function shouldUseNative() {
121 try {
122 if (!Object.assign) {
123 return false;
124 }
125
126 // Detect buggy property enumeration order in older V8 versions.
127
128 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
129 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
130 test1[5] = 'de';
131 if (Object.getOwnPropertyNames(test1)[0] === '5') {
132 return false;
133 }
134
135 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
136 var test2 = {};
137 for (var i = 0; i < 10; i++) {
138 test2['_' + String.fromCharCode(i)] = i;
139 }
140 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
141 return test2[n];
142 });
143 if (order2.join('') !== '0123456789') {
144 return false;
145 }
146
147 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
148 var test3 = {};
149 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
150 test3[letter] = letter;
151 });
152 if (Object.keys(Object.assign({}, test3)).join('') !==
153 'abcdefghijklmnopqrst') {
154 return false;
155 }
156
157 return true;
158 } catch (err) {
159 // We don't expect any of the above to throw, but better to be safe.
160 return false;
161 }
162}
163
164module.exports = shouldUseNative() ? Object.assign : function (target, source) {
165 var from;
166 var to = toObject(target);
167 var symbols;
168
169 for (var s = 1; s < arguments.length; s++) {
170 from = Object(arguments[s]);
171
172 for (var key in from) {
173 if (hasOwnProperty.call(from, key)) {
174 to[key] = from[key];
175 }
176 }
177
178 if (getOwnPropertySymbols) {
179 symbols = getOwnPropertySymbols(from);
180 for (var i = 0; i < symbols.length; i++) {
181 if (propIsEnumerable.call(from, symbols[i])) {
182 to[symbols[i]] = from[symbols[i]];
183 }
184 }
185 }
186 }
187
188 return to;
189};
190
191
192/***/ }),
193/* 2 */
194/***/ (function(module, exports, __webpack_require__) {
195
196"use strict";
197/**
198 * Copyright 2014-2015, Facebook, Inc.
199 * All rights reserved.
200 *
201 * This source code is licensed under the BSD-style license found in the
202 * LICENSE file in the root directory of this source tree. An additional grant
203 * of patent rights can be found in the PATENTS file in the same directory.
204 *
205 */
206
207
208
209var emptyFunction = __webpack_require__(7);
210
211/**
212 * Similar to invariant but only logs a warning if the condition is not met.
213 * This can be used to log issues in development environments in critical
214 * paths. Removing the logging code for production environments will keep the
215 * same logic and follow the same code paths.
216 */
217
218var warning = emptyFunction;
219
220if (true) {
221 (function () {
222 var printWarning = function printWarning(format) {
223 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
224 args[_key - 1] = arguments[_key];
225 }
226
227 var argIndex = 0;
228 var message = 'Warning: ' + format.replace(/%s/g, function () {
229 return args[argIndex++];
230 });
231 if (typeof console !== 'undefined') {
232 console.error(message);
233 }
234 try {
235 // --- Welcome to debugging React ---
236 // This error was thrown as a convenience so that you can use this stack
237 // to find the callsite that caused this warning to fire.
238 throw new Error(message);
239 } catch (x) {}
240 };
241
242 warning = function warning(condition, format) {
243 if (format === undefined) {
244 throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
245 }
246
247 if (format.indexOf('Failed Composite propType: ') === 0) {
248 return; // Ignore CompositeComponent proptype check.
249 }
250
251 if (!condition) {
252 for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
253 args[_key2 - 2] = arguments[_key2];
254 }
255
256 printWarning.apply(undefined, [format].concat(args));
257 }
258 };
259 })();
260}
261
262module.exports = warning;
263
264/***/ }),
265/* 3 */
266/***/ (function(module, exports, __webpack_require__) {
267
268"use strict";
269
270
271Object.defineProperty(exports, "__esModule", {
272 value: true
273});
274exports.default = capitalizeString;
275function capitalizeString(str) {
276 return str.charAt(0).toUpperCase() + str.slice(1);
277}
278module.exports = exports["default"];
279
280/***/ }),
281/* 4 */
282/***/ (function(module, __webpack_exports__, __webpack_require__) {
283
284"use strict";
285Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
286
287// CONCATENATED MODULE: ./src/sheet.js
288/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_object_assign__ = __webpack_require__(1);
289/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_object_assign___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_object_assign__);
290function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
291
292
293/*
294
295high performance StyleSheet for css-in-js systems
296
297- uses multiple style tags behind the scenes for millions of rules
298- uses `insertRule` for appending in production for *much* faster performance
299- 'polyfills' on server side
300
301
302// usage
303
304import StyleSheet from 'glamor/lib/sheet'
305let styleSheet = new StyleSheet()
306
307styleSheet.inject()
308- 'injects' the stylesheet into the page (or into memory if on server)
309
310styleSheet.insert('#box { border: 1px solid red; }')
311- appends a css rule into the stylesheet
312
313styleSheet.flush()
314- empties the stylesheet of all its contents
315
316
317*/
318
319function last(arr) {
320 return arr[arr.length - 1];
321}
322
323function sheetForTag(tag) {
324 if (tag.sheet) {
325 return tag.sheet;
326 }
327
328 // this weirdness brought to you by firefox
329 for (var i = 0; i < document.styleSheets.length; i++) {
330 if (document.styleSheets[i].ownerNode === tag) {
331 return document.styleSheets[i];
332 }
333 }
334}
335
336var isBrowser = typeof window !== 'undefined';
337var isDev = "development" === 'development' || !"development"; //(x => (x === 'development') || !x)(process.env.NODE_ENV)
338var isTest = "development" === 'test';
339
340var oldIE = function () {
341 if (isBrowser) {
342 var div = document.createElement('div');
343 div.innerHTML = '<!--[if lt IE 10]><i></i><![endif]-->';
344 return div.getElementsByTagName('i').length === 1;
345 }
346}();
347
348function makeStyleTag() {
349 var tag = document.createElement('style');
350 tag.type = 'text/css';
351 tag.setAttribute('data-glamor', '');
352 tag.appendChild(document.createTextNode(''));
353 (document.head || document.getElementsByTagName('head')[0]).appendChild(tag);
354 return tag;
355}
356
357function StyleSheet() {
358 var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
359 _ref$speedy = _ref.speedy,
360 speedy = _ref$speedy === undefined ? !isDev && !isTest : _ref$speedy,
361 _ref$maxLength = _ref.maxLength,
362 maxLength = _ref$maxLength === undefined ? isBrowser && oldIE ? 4000 : 65000 : _ref$maxLength;
363
364 this.isSpeedy = speedy; // the big drawback here is that the css won't be editable in devtools
365 this.sheet = undefined;
366 this.tags = [];
367 this.maxLength = maxLength;
368 this.ctr = 0;
369}
370
371__WEBPACK_IMPORTED_MODULE_0_object_assign___default()(StyleSheet.prototype, {
372 getSheet: function getSheet() {
373 return sheetForTag(last(this.tags));
374 },
375 inject: function inject() {
376 var _this = this;
377
378 if (this.injected) {
379 throw new Error('already injected stylesheet!');
380 }
381 if (isBrowser) {
382 this.tags[0] = makeStyleTag();
383 } else {
384 // server side 'polyfill'. just enough behavior to be useful.
385 this.sheet = {
386 cssRules: [],
387 insertRule: function insertRule(rule) {
388 // enough 'spec compliance' to be able to extract the rules later
389 // in other words, just the cssText field
390 _this.sheet.cssRules.push({ cssText: rule });
391 }
392 };
393 }
394 this.injected = true;
395 },
396 speedy: function speedy(bool) {
397 if (this.ctr !== 0) {
398 throw new Error('cannot change speedy mode after inserting any rule to sheet. Either call speedy(' + bool + ') earlier in your app, or call flush() before speedy(' + bool + ')');
399 }
400 this.isSpeedy = !!bool;
401 },
402 _insert: function _insert(rule) {
403 // this weirdness for perf, and chrome's weird bug
404 // https://stackoverflow.com/questions/20007992/chrome-suddenly-stopped-accepting-insertrule
405 try {
406 var sheet = this.getSheet();
407 sheet.insertRule(rule, rule.indexOf('@import') !== -1 ? 0 : sheet.cssRules.length);
408 } catch (e) {
409 if (isDev) {
410 // might need beter dx for this
411 console.warn('whoops, illegal rule inserted', rule); //eslint-disable-line no-console
412 }
413 }
414 },
415 insert: function insert(rule) {
416
417 if (isBrowser) {
418 // this is the ultrafast version, works across browsers
419 if (this.isSpeedy && this.getSheet().insertRule) {
420 this._insert(rule);
421 }
422 // more browser weirdness. I don't even know
423 // else if(this.tags.length > 0 && this.tags::last().styleSheet) {
424 // this.tags::last().styleSheet.cssText+= rule
425 // }
426 else {
427 if (rule.indexOf('@import') !== -1) {
428 var tag = last(this.tags);
429 tag.insertBefore(document.createTextNode(rule), tag.firstChild);
430 } else {
431 last(this.tags).appendChild(document.createTextNode(rule));
432 }
433 }
434 } else {
435 // server side is pretty simple
436 this.sheet.insertRule(rule, rule.indexOf('@import') !== -1 ? 0 : this.sheet.cssRules.length);
437 }
438
439 this.ctr++;
440 if (isBrowser && this.ctr % this.maxLength === 0) {
441 this.tags.push(makeStyleTag());
442 }
443 return this.ctr - 1;
444 },
445
446 // commenting this out till we decide on v3's decision
447 // _replace(index, rule) {
448 // // this weirdness for perf, and chrome's weird bug
449 // // https://stackoverflow.com/questions/20007992/chrome-suddenly-stopped-accepting-insertrule
450 // try {
451 // let sheet = this.getSheet()
452 // sheet.deleteRule(index) // todo - correct index here
453 // sheet.insertRule(rule, index)
454 // }
455 // catch(e) {
456 // if(isDev) {
457 // // might need beter dx for this
458 // console.warn('whoops, problem replacing rule', rule) //eslint-disable-line no-console
459 // }
460 // }
461
462 // }
463 // replace(index, rule) {
464 // if(isBrowser) {
465 // if(this.isSpeedy && this.getSheet().insertRule) {
466 // this._replace(index, rule)
467 // }
468 // else {
469 // let _slot = Math.floor((index + this.maxLength) / this.maxLength) - 1
470 // let _index = (index % this.maxLength) + 1
471 // let tag = this.tags[_slot]
472 // tag.replaceChild(document.createTextNode(rule), tag.childNodes[_index])
473 // }
474 // }
475 // else {
476 // let rules = this.sheet.cssRules
477 // this.sheet.cssRules = [ ...rules.slice(0, index), { cssText: rule }, ...rules.slice(index + 1) ]
478 // }
479 // }
480 delete: function _delete(index) {
481 // we insert a blank rule when 'deleting' so previously returned indexes remain stable
482 return this.replace(index, '');
483 },
484 flush: function flush() {
485 if (isBrowser) {
486 this.tags.forEach(function (tag) {
487 return tag.parentNode.removeChild(tag);
488 });
489 this.tags = [];
490 this.sheet = null;
491 this.ctr = 0;
492 // todo - look for remnants in document.styleSheets
493 } else {
494 // simpler on server
495 this.sheet.cssRules = [];
496 }
497 this.injected = false;
498 },
499 rules: function rules() {
500 if (!isBrowser) {
501 return this.sheet.cssRules;
502 }
503 var arr = [];
504 this.tags.forEach(function (tag) {
505 return arr.splice.apply(arr, [arr.length, 0].concat(_toConsumableArray(Array.from(sheetForTag(tag).cssRules))));
506 });
507 return arr;
508 }
509});
510// CONCATENATED MODULE: ./src/CSSPropertyOperations/CSSProperty.js
511/**
512 * Copyright 2013-present, Facebook, Inc.
513 * All rights reserved.
514 *
515 * This source code is licensed under the BSD-style license found in the
516 * LICENSE file in the root directory of this source tree. An additional grant
517 * of patent rights can be found in the PATENTS file in the same directory.
518 *
519 * @providesModule CSSProperty
520 */
521
522/**
523 * CSS properties which accept numbers but are not in units of "px".
524 */
525
526var isUnitlessNumber = {
527 animationIterationCount: true,
528 borderImageOutset: true,
529 borderImageSlice: true,
530 borderImageWidth: true,
531 boxFlex: true,
532 boxFlexGroup: true,
533 boxOrdinalGroup: true,
534 columnCount: true,
535 flex: true,
536 flexGrow: true,
537 flexPositive: true,
538 flexShrink: true,
539 flexNegative: true,
540 flexOrder: true,
541 gridRow: true,
542 gridRowStart: true,
543 gridRowEnd: true,
544 gridColumn: true,
545 gridColumnStart: true,
546 gridColumnEnd: true,
547 fontWeight: true,
548 lineClamp: true,
549 lineHeight: true,
550 opacity: true,
551 order: true,
552 orphans: true,
553 tabSize: true,
554 widows: true,
555 zIndex: true,
556 zoom: true,
557
558 // SVG-related properties
559 fillOpacity: true,
560 floodOpacity: true,
561 stopOpacity: true,
562 strokeDasharray: true,
563 strokeDashoffset: true,
564 strokeMiterlimit: true,
565 strokeOpacity: true,
566 strokeWidth: true
567
568 /**
569 * @param {string} prefix vendor-specific prefix, eg: Webkit
570 * @param {string} key style name, eg: transitionDuration
571 * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
572 * WebkitTransitionDuration
573 */
574};function prefixKey(prefix, key) {
575 return prefix + key.charAt(0).toUpperCase() + key.substring(1);
576}
577
578/**
579 * Support style names that may come passed in prefixed by adding permutations
580 * of vendor prefixes.
581 */
582var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
583
584// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
585// infinite loop, because it iterates over the newly added props too.
586Object.keys(isUnitlessNumber).forEach(function (prop) {
587 prefixes.forEach(function (prefix) {
588 isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
589 });
590});
591
592/**
593 * Most style properties can be unset by doing .style[prop] = '' but IE8
594 * doesn't like doing that with shorthand properties so for the properties that
595 * IE8 breaks on, which are listed here, we instead unset each of the
596 * individual properties. See http://bugs.jquery.com/ticket/12385.
597 * The 4-value 'clock' properties like margin, padding, border-width seem to
598 * behave without any problems. Curiously, list-style works too without any
599 * special prodding.
600 */
601var shorthandPropertyExpansions = {
602 background: {
603 backgroundAttachment: true,
604 backgroundColor: true,
605 backgroundImage: true,
606 backgroundPositionX: true,
607 backgroundPositionY: true,
608 backgroundRepeat: true
609 },
610 backgroundPosition: {
611 backgroundPositionX: true,
612 backgroundPositionY: true
613 },
614 border: {
615 borderWidth: true,
616 borderStyle: true,
617 borderColor: true
618 },
619 borderBottom: {
620 borderBottomWidth: true,
621 borderBottomStyle: true,
622 borderBottomColor: true
623 },
624 borderLeft: {
625 borderLeftWidth: true,
626 borderLeftStyle: true,
627 borderLeftColor: true
628 },
629 borderRight: {
630 borderRightWidth: true,
631 borderRightStyle: true,
632 borderRightColor: true
633 },
634 borderTop: {
635 borderTopWidth: true,
636 borderTopStyle: true,
637 borderTopColor: true
638 },
639 font: {
640 fontStyle: true,
641 fontVariant: true,
642 fontWeight: true,
643 fontSize: true,
644 lineHeight: true,
645 fontFamily: true
646 },
647 outline: {
648 outlineWidth: true,
649 outlineStyle: true,
650 outlineColor: true
651 }
652};
653
654var CSSProperty = {
655 isUnitlessNumber: isUnitlessNumber,
656 shorthandPropertyExpansions: shorthandPropertyExpansions
657};
658
659/* harmony default export */ var CSSProperty_defaultExport = (CSSProperty);
660// CONCATENATED MODULE: ./src/CSSPropertyOperations/dangerousStyleValue.js
661/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_fbjs_lib_warning__ = __webpack_require__(2);
662/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_fbjs_lib_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_fbjs_lib_warning__);
663/**
664 * Copyright 2013-present, Facebook, Inc.
665 * All rights reserved.
666 *
667 * This source code is licensed under the BSD-style license found in the
668 * LICENSE file in the root directory of this source tree. An additional grant
669 * of patent rights can be found in the PATENTS file in the same directory.
670 *
671 * @providesModule dangerousStyleValue
672 */
673
674
675
676
677var dangerousStyleValue_isUnitlessNumber = CSSProperty_defaultExport.isUnitlessNumber;
678var styleWarnings = {};
679
680/**
681 * Convert a value into the proper css writable value. The style name `name`
682 * should be logical (no hyphens), as specified
683 * in `CSSProperty.isUnitlessNumber`.
684 *
685 * @param {string} name CSS property name such as `topMargin`.
686 * @param {*} value CSS property value such as `10px`.
687 * @param {ReactDOMComponent} component
688 * @return {string} Normalized style value with dimensions applied.
689 */
690function dangerousStyleValue(name, value, component) {
691 // Note that we've removed escapeTextForBrowser() calls here since the
692 // whole string will be escaped when the attribute is injected into
693 // the markup. If you provide unsafe user data here they can inject
694 // arbitrary CSS which may be problematic (I couldn't repro this):
695 // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
696 // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
697 // This is not an XSS hole but instead a potential CSS injection issue
698 // which has lead to a greater discussion about how we're going to
699 // trust URLs moving forward. See #2115901
700
701 var isEmpty = value == null || typeof value === 'boolean' || value === '';
702 if (isEmpty) {
703 return '';
704 }
705
706 var isNonNumeric = isNaN(value);
707 if (isNonNumeric || value === 0 || dangerousStyleValue_isUnitlessNumber.hasOwnProperty(name) && dangerousStyleValue_isUnitlessNumber[name]) {
708 return '' + value; // cast to string
709 }
710
711 if (typeof value === 'string') {
712 if (true) {
713 // Allow '0' to pass through without warning. 0 is already special and
714 // doesn't require units, so we don't need to warn about it.
715 if (component && value !== '0') {
716 var owner = component._currentElement._owner;
717 var ownerName = owner ? owner.getName() : null;
718 if (ownerName && !styleWarnings[ownerName]) {
719 styleWarnings[ownerName] = {};
720 }
721 var warned = false;
722 if (ownerName) {
723 var warnings = styleWarnings[ownerName];
724 warned = warnings[name];
725 if (!warned) {
726 warnings[name] = true;
727 }
728 }
729 if (!warned) {
730 true ? __WEBPACK_IMPORTED_MODULE_1_fbjs_lib_warning___default()(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0;
731 }
732 }
733 }
734 value = value.trim();
735 }
736 return value + 'px';
737}
738
739/* harmony default export */ var dangerousStyleValue_defaultExport = (dangerousStyleValue);
740// CONCATENATED MODULE: ./src/CSSPropertyOperations/index.js
741/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_fbjs_lib_camelizeStyleName__ = __webpack_require__(5);
742/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_fbjs_lib_camelizeStyleName___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_fbjs_lib_camelizeStyleName__);
743/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_fbjs_lib_hyphenateStyleName__ = __webpack_require__(8);
744/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_fbjs_lib_hyphenateStyleName___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_fbjs_lib_hyphenateStyleName__);
745/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_fbjs_lib_memoizeStringOnly__ = __webpack_require__(10);
746/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_fbjs_lib_memoizeStringOnly___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_fbjs_lib_memoizeStringOnly__);
747/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_fbjs_lib_warning__ = __webpack_require__(2);
748/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_fbjs_lib_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_fbjs_lib_warning__);
749/**
750 * Copyright 2013-present, Facebook, Inc.
751 * All rights reserved.
752 *
753 * This source code is licensed under the BSD-style license found in the
754 * LICENSE file in the root directory of this source tree. An additional grant
755 * of patent rights can be found in the PATENTS file in the same directory.
756 *
757 * @providesModule CSSPropertyOperations
758 */
759
760
761
762
763
764
765
766var processStyleName = __WEBPACK_IMPORTED_MODULE_3_fbjs_lib_memoizeStringOnly___default()(__WEBPACK_IMPORTED_MODULE_2_fbjs_lib_hyphenateStyleName___default.a);
767
768if (true) {
769 // 'msTransform' is correct, but the other prefixes should be capitalized
770 var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
771
772 // style values shouldn't contain a semicolon
773 var badStyleValueWithSemicolonPattern = /;\s*$/;
774
775 var warnedStyleNames = {};
776 var warnedStyleValues = {};
777 var warnedForNaNValue = false;
778
779 var warnHyphenatedStyleName = function warnHyphenatedStyleName(name, owner) {
780 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
781 return;
782 }
783
784 warnedStyleNames[name] = true;
785 true ? __WEBPACK_IMPORTED_MODULE_4_fbjs_lib_warning___default()(false, 'Unsupported style property %s. Did you mean %s?%s', name, __WEBPACK_IMPORTED_MODULE_0_fbjs_lib_camelizeStyleName___default()(name), checkRenderMessage(owner)) : void 0;
786 };
787
788 var warnBadVendoredStyleName = function warnBadVendoredStyleName(name, owner) {
789 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
790 return;
791 }
792
793 warnedStyleNames[name] = true;
794 true ? __WEBPACK_IMPORTED_MODULE_4_fbjs_lib_warning___default()(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0;
795 };
796
797 var warnStyleValueWithSemicolon = function warnStyleValueWithSemicolon(name, value, owner) {
798 if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
799 return;
800 }
801
802 warnedStyleValues[value] = true;
803 true ? __WEBPACK_IMPORTED_MODULE_4_fbjs_lib_warning___default()(false, 'Style property values shouldn\'t contain a semicolon.%s ' + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
804 };
805
806 var warnStyleValueIsNaN = function warnStyleValueIsNaN(name, value, owner) {
807 if (warnedForNaNValue) {
808 return;
809 }
810
811 warnedForNaNValue = true;
812 true ? __WEBPACK_IMPORTED_MODULE_4_fbjs_lib_warning___default()(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;
813 };
814
815 var checkRenderMessage = function checkRenderMessage(owner) {
816 if (owner) {
817 var name = owner.getName();
818 if (name) {
819 return ' Check the render method of `' + name + '`.';
820 }
821 }
822 return '';
823 };
824
825 /**
826 * @param {string} name
827 * @param {*} value
828 * @param {ReactDOMComponent} component
829 */
830 var warnValidStyle = function warnValidStyle(name, value, component) {
831 //eslint-disable-line no-var
832 var owner = void 0;
833 if (component) {
834 owner = component._currentElement._owner;
835 }
836 if (name.indexOf('-') > -1) {
837 warnHyphenatedStyleName(name, owner);
838 } else if (badVendoredStyleNamePattern.test(name)) {
839 warnBadVendoredStyleName(name, owner);
840 } else if (badStyleValueWithSemicolonPattern.test(value)) {
841 warnStyleValueWithSemicolon(name, value, owner);
842 }
843
844 if (typeof value === 'number' && isNaN(value)) {
845 warnStyleValueIsNaN(name, value, owner);
846 }
847 };
848}
849
850/**
851 * Serializes a mapping of style properties for use as inline styles:
852 *
853 * > createMarkupForStyles({width: '200px', height: 0})
854 * "width:200px;height:0;"
855 *
856 * Undefined values are ignored so that declarative programming is easier.
857 * The result should be HTML-escaped before insertion into the DOM.
858 *
859 * @param {object} styles
860 * @param {ReactDOMComponent} component
861 * @return {?string}
862 */
863
864function createMarkupForStyles(styles, component) {
865 var serialized = '';
866 for (var styleName in styles) {
867 var isCustomProp = styleName.indexOf('--') === 0;
868 if (!styles.hasOwnProperty(styleName)) {
869 continue;
870 }
871 if (styleName === 'label') {
872 continue;
873 }
874 var styleValue = styles[styleName];
875 if ("development" !== 'production' && !isCustomProp) {
876 warnValidStyle(styleName, styleValue, component);
877 }
878 if (styleValue != null) {
879 if (isCustomProp) {
880 serialized += styleName + ':' + styleValue + ';';
881 } else {
882 serialized += processStyleName(styleName) + ':';
883 serialized += dangerousStyleValue_defaultExport(styleName, styleValue, component) + ';';
884 }
885 }
886 }
887 return serialized || null;
888}
889// CONCATENATED MODULE: ./src/clean.js
890var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
891
892// Returns true for null, false, undefined and {}
893function isFalsy(value) {
894 return value === null || value === undefined || value === false || (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && Object.keys(value).length === 0;
895}
896
897function cleanObject(object) {
898 if (isFalsy(object)) return null;
899 if ((typeof object === 'undefined' ? 'undefined' : _typeof(object)) !== 'object') return object;
900
901 var acc = {},
902 keys = Object.keys(object),
903 hasFalsy = false;
904 for (var i = 0; i < keys.length; i++) {
905 var value = object[keys[i]];
906 var filteredValue = clean(value);
907 if (filteredValue === null || filteredValue !== value) {
908 hasFalsy = true;
909 }
910 if (filteredValue !== null) {
911 acc[keys[i]] = filteredValue;
912 }
913 }
914 return Object.keys(acc).length === 0 ? null : hasFalsy ? acc : object;
915}
916
917function cleanArray(rules) {
918 var hasFalsy = false;
919 var filtered = [];
920 rules.forEach(function (rule) {
921 var filteredRule = clean(rule);
922 if (filteredRule === null || filteredRule !== rule) {
923 hasFalsy = true;
924 }
925 if (filteredRule !== null) {
926 filtered.push(filteredRule);
927 }
928 });
929 return filtered.length == 0 ? null : hasFalsy ? filtered : rules;
930}
931
932// Takes style array or object provided by user and clears all the falsy data
933// If there is no styles left after filtration returns null
934function clean(input) {
935 return Array.isArray(input) ? cleanArray(input) : cleanObject(input);
936}
937// CONCATENATED MODULE: ./src/prefixer.js
938/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_inline_style_prefixer_static_staticData__ = __webpack_require__(11);
939/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_inline_style_prefixer_static_staticData___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_inline_style_prefixer_static_staticData__);
940/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_inline_style_prefixer_utils_prefixProperty__ = __webpack_require__(12);
941/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_inline_style_prefixer_utils_prefixProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_inline_style_prefixer_utils_prefixProperty__);
942/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_inline_style_prefixer_utils_prefixValue__ = __webpack_require__(13);
943/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_inline_style_prefixer_utils_prefixValue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_inline_style_prefixer_utils_prefixValue__);
944/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_inline_style_prefixer_static_plugins_cursor__ = __webpack_require__(14);
945/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_inline_style_prefixer_static_plugins_cursor___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_inline_style_prefixer_static_plugins_cursor__);
946/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_inline_style_prefixer_static_plugins_crossFade__ = __webpack_require__(15);
947/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_inline_style_prefixer_static_plugins_crossFade___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_inline_style_prefixer_static_plugins_crossFade__);
948/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_inline_style_prefixer_static_plugins_filter__ = __webpack_require__(16);
949/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_inline_style_prefixer_static_plugins_filter___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_inline_style_prefixer_static_plugins_filter__);
950/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_inline_style_prefixer_static_plugins_flex__ = __webpack_require__(17);
951/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_inline_style_prefixer_static_plugins_flex___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_inline_style_prefixer_static_plugins_flex__);
952/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_inline_style_prefixer_static_plugins_flexboxOld__ = __webpack_require__(18);
953/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_inline_style_prefixer_static_plugins_flexboxOld___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_inline_style_prefixer_static_plugins_flexboxOld__);
954/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_inline_style_prefixer_static_plugins_gradient__ = __webpack_require__(19);
955/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_inline_style_prefixer_static_plugins_gradient___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_inline_style_prefixer_static_plugins_gradient__);
956/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_inline_style_prefixer_static_plugins_imageSet__ = __webpack_require__(20);
957/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_inline_style_prefixer_static_plugins_imageSet___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_inline_style_prefixer_static_plugins_imageSet__);
958/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_inline_style_prefixer_static_plugins_position__ = __webpack_require__(21);
959/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_inline_style_prefixer_static_plugins_position___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_inline_style_prefixer_static_plugins_position__);
960/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_inline_style_prefixer_static_plugins_sizing__ = __webpack_require__(22);
961/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_inline_style_prefixer_static_plugins_sizing___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_inline_style_prefixer_static_plugins_sizing__);
962/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_inline_style_prefixer_static_plugins_transition__ = __webpack_require__(23);
963/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_inline_style_prefixer_static_plugins_transition___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_inline_style_prefixer_static_plugins_transition__);
964// custom facade for inline-style-prefixer
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982var plugins = [__WEBPACK_IMPORTED_MODULE_4_inline_style_prefixer_static_plugins_crossFade___default.a, __WEBPACK_IMPORTED_MODULE_3_inline_style_prefixer_static_plugins_cursor___default.a, __WEBPACK_IMPORTED_MODULE_5_inline_style_prefixer_static_plugins_filter___default.a, __WEBPACK_IMPORTED_MODULE_7_inline_style_prefixer_static_plugins_flexboxOld___default.a, __WEBPACK_IMPORTED_MODULE_8_inline_style_prefixer_static_plugins_gradient___default.a, __WEBPACK_IMPORTED_MODULE_9_inline_style_prefixer_static_plugins_imageSet___default.a, __WEBPACK_IMPORTED_MODULE_10_inline_style_prefixer_static_plugins_position___default.a, __WEBPACK_IMPORTED_MODULE_11_inline_style_prefixer_static_plugins_sizing___default.a, __WEBPACK_IMPORTED_MODULE_12_inline_style_prefixer_static_plugins_transition___default.a, __WEBPACK_IMPORTED_MODULE_6_inline_style_prefixer_static_plugins_flex___default.a];
983
984var prefixMap = __WEBPACK_IMPORTED_MODULE_0_inline_style_prefixer_static_staticData___default.a.prefixMap;
985
986function prefixer(style) {
987 for (var property in style) {
988 var value = style[property];
989
990 var processedValue = __WEBPACK_IMPORTED_MODULE_2_inline_style_prefixer_utils_prefixValue___default()(plugins, property, value, style, prefixMap);
991
992 // only modify the value if it was touched
993 // by any plugin to prevent unnecessary mutations
994 if (processedValue) {
995 style[property] = processedValue;
996 }
997
998 __WEBPACK_IMPORTED_MODULE_1_inline_style_prefixer_utils_prefixProperty___default()(prefixMap, property, style);
999 }
1000 return style;
1001}
1002// CONCATENATED MODULE: ./src/plugins.js
1003/* harmony import */ var plugins___WEBPACK_IMPORTED_MODULE_0_object_assign__ = __webpack_require__(1);
1004/* harmony import */ var plugins___WEBPACK_IMPORTED_MODULE_0_object_assign___default = __webpack_require__.n(plugins___WEBPACK_IMPORTED_MODULE_0_object_assign__);
1005var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
1006
1007
1008var plugins_isDev = function (x) {
1009 return x === 'development' || !x;
1010}("development");
1011
1012function PluginSet(initial) {
1013 this.fns = initial || [];
1014}
1015
1016plugins___WEBPACK_IMPORTED_MODULE_0_object_assign___default()(PluginSet.prototype, {
1017 add: function add() {
1018 var _this = this;
1019
1020 for (var _len = arguments.length, fns = Array(_len), _key = 0; _key < _len; _key++) {
1021 fns[_key] = arguments[_key];
1022 }
1023
1024 fns.forEach(function (fn) {
1025 if (_this.fns.indexOf(fn) >= 0) {
1026 if (plugins_isDev) {
1027 console.warn('adding the same plugin again, ignoring'); //eslint-disable-line no-console
1028 }
1029 } else {
1030 _this.fns = [fn].concat(_this.fns);
1031 }
1032 });
1033 },
1034 remove: function remove(fn) {
1035 this.fns = this.fns.filter(function (x) {
1036 return x !== fn;
1037 });
1038 },
1039 clear: function clear() {
1040 this.fns = [];
1041 },
1042 transform: function transform(o) {
1043 return this.fns.reduce(function (o, fn) {
1044 return fn(o);
1045 }, o);
1046 }
1047});
1048
1049
1050
1051function fallbacks(node) {
1052 var hasArray = Object.keys(node.style).map(function (x) {
1053 return Array.isArray(node.style[x]);
1054 }).indexOf(true) >= 0;
1055 if (hasArray) {
1056 var style = node.style;
1057
1058 var flattened = Object.keys(style).reduce(function (o, key) {
1059 o[key] = Array.isArray(style[key]) ? style[key].join('; ' + processStyleName(key) + ': ') : style[key];
1060 return o;
1061 }, {});
1062 // todo -
1063 // flatten arrays which haven't been flattened yet
1064 return plugins___WEBPACK_IMPORTED_MODULE_0_object_assign___default()({}, node, { style: flattened });
1065 }
1066 return node;
1067}
1068
1069var contentValues = ['normal', 'none', 'counter', 'open-quote', 'close-quote', 'no-open-quote', 'no-close-quote', 'initial', 'inherit'];
1070
1071function contentWrap(node) {
1072 if (node.style.content) {
1073 var cont = node.style.content;
1074 if (contentValues.indexOf(cont) >= 0) {
1075 return node;
1076 }
1077 if (/^(attr|calc|counters?|url)\(/.test(cont)) {
1078 return node;
1079 }
1080 if (cont.charAt(0) === cont.charAt(cont.length - 1) && (cont.charAt(0) === '"' || cont.charAt(0) === "'")) {
1081 return node;
1082 }
1083 return _extends({}, node, { style: _extends({}, node.style, { content: '"' + cont + '"' }) });
1084 }
1085 return node;
1086}
1087
1088
1089
1090function plugins_prefixes(node) {
1091 return plugins___WEBPACK_IMPORTED_MODULE_0_object_assign___default()({}, node, { style: prefixer(_extends({}, node.style)) });
1092}
1093// CONCATENATED MODULE: ./src/hash.js
1094// murmurhash2 via https://gist.github.com/raycmorgan/588423
1095
1096function doHash(str, seed) {
1097 var m = 0x5bd1e995;
1098 var r = 24;
1099 var h = seed ^ str.length;
1100 var length = str.length;
1101 var currentIndex = 0;
1102
1103 while (length >= 4) {
1104 var k = UInt32(str, currentIndex);
1105
1106 k = Umul32(k, m);
1107 k ^= k >>> r;
1108 k = Umul32(k, m);
1109
1110 h = Umul32(h, m);
1111 h ^= k;
1112
1113 currentIndex += 4;
1114 length -= 4;
1115 }
1116
1117 switch (length) {
1118 case 3:
1119 h ^= UInt16(str, currentIndex);
1120 h ^= str.charCodeAt(currentIndex + 2) << 16;
1121 h = Umul32(h, m);
1122 break;
1123
1124 case 2:
1125 h ^= UInt16(str, currentIndex);
1126 h = Umul32(h, m);
1127 break;
1128
1129 case 1:
1130 h ^= str.charCodeAt(currentIndex);
1131 h = Umul32(h, m);
1132 break;
1133 }
1134
1135 h ^= h >>> 13;
1136 h = Umul32(h, m);
1137 h ^= h >>> 15;
1138
1139 return h >>> 0;
1140}
1141
1142function UInt32(str, pos) {
1143 return str.charCodeAt(pos++) + (str.charCodeAt(pos++) << 8) + (str.charCodeAt(pos++) << 16) + (str.charCodeAt(pos) << 24);
1144}
1145
1146function UInt16(str, pos) {
1147 return str.charCodeAt(pos++) + (str.charCodeAt(pos++) << 8);
1148}
1149
1150function Umul32(n, m) {
1151 n = n | 0;
1152 m = m | 0;
1153 var nlo = n & 0xffff;
1154 var nhi = n >>> 16;
1155 var res = nlo * m + ((nhi * m & 0xffff) << 16) | 0;
1156 return res;
1157}
1158// CONCATENATED MODULE: ./src/index.js
1159/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styleSheet", function() { return styleSheet; });
1160/* harmony export (immutable) */ __webpack_exports__["speedy"] = speedy;
1161/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "plugins", function() { return src_plugins; });
1162/* harmony export (immutable) */ __webpack_exports__["simulations"] = simulations;
1163/* harmony export (immutable) */ __webpack_exports__["simulate"] = simulate;
1164/* harmony export (immutable) */ __webpack_exports__["cssLabels"] = cssLabels;
1165/* harmony export (immutable) */ __webpack_exports__["isLikeRule"] = isLikeRule;
1166/* harmony export (immutable) */ __webpack_exports__["idFor"] = idFor;
1167/* harmony export (immutable) */ __webpack_exports__["css"] = css;
1168/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertRule", function() { return insertRule; });
1169/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertGlobal", function() { return insertGlobal; });
1170/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fontFace", function() { return fontFace; });
1171/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyframes", function() { return keyframes; });
1172/* harmony export (immutable) */ __webpack_exports__["rehydrate"] = rehydrate;
1173/* harmony export (immutable) */ __webpack_exports__["flush"] = flush;
1174/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "presets", function() { return presets; });
1175/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "style", function() { return src_style; });
1176/* harmony export (immutable) */ __webpack_exports__["select"] = select;
1177/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$", function() { return $; });
1178/* harmony export (immutable) */ __webpack_exports__["parent"] = parent;
1179/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
1180/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; });
1181/* harmony export (immutable) */ __webpack_exports__["media"] = media;
1182/* harmony export (immutable) */ __webpack_exports__["pseudo"] = pseudo;
1183/* harmony export (immutable) */ __webpack_exports__["active"] = active;
1184/* harmony export (immutable) */ __webpack_exports__["any"] = any;
1185/* harmony export (immutable) */ __webpack_exports__["checked"] = checked;
1186/* harmony export (immutable) */ __webpack_exports__["disabled"] = disabled;
1187/* harmony export (immutable) */ __webpack_exports__["empty"] = empty;
1188/* harmony export (immutable) */ __webpack_exports__["enabled"] = enabled;
1189/* harmony export (immutable) */ __webpack_exports__["_default"] = _default;
1190/* harmony export (immutable) */ __webpack_exports__["first"] = first;
1191/* harmony export (immutable) */ __webpack_exports__["firstChild"] = firstChild;
1192/* harmony export (immutable) */ __webpack_exports__["firstOfType"] = firstOfType;
1193/* harmony export (immutable) */ __webpack_exports__["fullscreen"] = fullscreen;
1194/* harmony export (immutable) */ __webpack_exports__["focus"] = focus;
1195/* harmony export (immutable) */ __webpack_exports__["hover"] = hover;
1196/* harmony export (immutable) */ __webpack_exports__["indeterminate"] = indeterminate;
1197/* harmony export (immutable) */ __webpack_exports__["inRange"] = inRange;
1198/* harmony export (immutable) */ __webpack_exports__["invalid"] = invalid;
1199/* harmony export (immutable) */ __webpack_exports__["lastChild"] = lastChild;
1200/* harmony export (immutable) */ __webpack_exports__["lastOfType"] = lastOfType;
1201/* harmony export (immutable) */ __webpack_exports__["left"] = left;
1202/* harmony export (immutable) */ __webpack_exports__["link"] = link;
1203/* harmony export (immutable) */ __webpack_exports__["onlyChild"] = onlyChild;
1204/* harmony export (immutable) */ __webpack_exports__["onlyOfType"] = onlyOfType;
1205/* harmony export (immutable) */ __webpack_exports__["optional"] = optional;
1206/* harmony export (immutable) */ __webpack_exports__["outOfRange"] = outOfRange;
1207/* harmony export (immutable) */ __webpack_exports__["readOnly"] = readOnly;
1208/* harmony export (immutable) */ __webpack_exports__["readWrite"] = readWrite;
1209/* harmony export (immutable) */ __webpack_exports__["required"] = required;
1210/* harmony export (immutable) */ __webpack_exports__["right"] = right;
1211/* harmony export (immutable) */ __webpack_exports__["root"] = root;
1212/* harmony export (immutable) */ __webpack_exports__["scope"] = scope;
1213/* harmony export (immutable) */ __webpack_exports__["target"] = target;
1214/* harmony export (immutable) */ __webpack_exports__["valid"] = valid;
1215/* harmony export (immutable) */ __webpack_exports__["visited"] = visited;
1216/* harmony export (immutable) */ __webpack_exports__["dir"] = dir;
1217/* harmony export (immutable) */ __webpack_exports__["lang"] = lang;
1218/* harmony export (immutable) */ __webpack_exports__["not"] = not;
1219/* harmony export (immutable) */ __webpack_exports__["nthChild"] = nthChild;
1220/* harmony export (immutable) */ __webpack_exports__["nthLastChild"] = nthLastChild;
1221/* harmony export (immutable) */ __webpack_exports__["nthLastOfType"] = nthLastOfType;
1222/* harmony export (immutable) */ __webpack_exports__["nthOfType"] = nthOfType;
1223/* harmony export (immutable) */ __webpack_exports__["after"] = after;
1224/* harmony export (immutable) */ __webpack_exports__["before"] = before;
1225/* harmony export (immutable) */ __webpack_exports__["firstLetter"] = firstLetter;
1226/* harmony export (immutable) */ __webpack_exports__["firstLine"] = firstLine;
1227/* harmony export (immutable) */ __webpack_exports__["selection"] = selection;
1228/* harmony export (immutable) */ __webpack_exports__["backdrop"] = backdrop;
1229/* harmony export (immutable) */ __webpack_exports__["placeholder"] = placeholder;
1230/* harmony export (immutable) */ __webpack_exports__["cssFor"] = cssFor;
1231/* harmony export (immutable) */ __webpack_exports__["attribsFor"] = attribsFor;
1232/* harmony import */ var src___WEBPACK_IMPORTED_MODULE_0_object_assign__ = __webpack_require__(1);
1233/* harmony import */ var src___WEBPACK_IMPORTED_MODULE_0_object_assign___default = __webpack_require__.n(src___WEBPACK_IMPORTED_MODULE_0_object_assign__);
1234function src__toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
1235
1236function _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; }
1237
1238
1239/* stylesheet */
1240
1241
1242
1243
1244var styleSheet = new StyleSheet();
1245// an isomorphic StyleSheet shim. hides all the nitty gritty.
1246
1247// /**************** LIFTOFF IN 3... 2... 1... ****************/
1248styleSheet.inject(); //eslint-disable-line indent
1249// /**************** TO THE MOOOOOOON ****************/
1250
1251// convenience function to toggle speedy
1252function speedy(bool) {
1253 return styleSheet.speedy(bool);
1254}
1255
1256// plugins
1257 // we include these by default
1258var src_plugins = styleSheet.plugins = new PluginSet([plugins_prefixes, contentWrap, fallbacks]);
1259src_plugins.media = new PluginSet(); // neat! media, font-face, keyframes
1260src_plugins.fontFace = new PluginSet();
1261src_plugins.keyframes = new PluginSet([plugins_prefixes, fallbacks]);
1262
1263// define some constants
1264
1265var src_isDev = "development" === 'development' || !"development";
1266var src_isTest = "development" === 'test';
1267var src_isBrowser = typeof window !== 'undefined';
1268
1269/**** simulations ****/
1270
1271// a flag to enable simulation meta tags on dom nodes
1272// defaults to true in dev mode. recommend *not* to
1273// toggle often.
1274var canSimulate = src_isDev;
1275
1276// we use these flags for issuing warnings when simulate is called
1277// in prod / in incorrect order
1278var warned1 = false,
1279 warned2 = false;
1280
1281// toggles simulation activity. shouldn't be needed in most cases
1282function simulations() {
1283 var bool = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
1284
1285 canSimulate = !!bool;
1286}
1287
1288// use this on dom nodes to 'simulate' pseudoclasses
1289// <div {...hover({ color: 'red' })} {...simulate('hover', 'visited')}>...</div>
1290// you can even send in some weird ones, as long as it's in simple format
1291// and matches an existing rule on the element
1292// eg simulate('nthChild2', ':hover:active') etc
1293function simulate() {
1294 for (var _len = arguments.length, pseudos = Array(_len), _key = 0; _key < _len; _key++) {
1295 pseudos[_key] = arguments[_key];
1296 }
1297
1298 pseudos = clean(pseudos);
1299 if (!pseudos) return {};
1300 if (!canSimulate) {
1301 if (!warned1) {
1302 console.warn('can\'t simulate without once calling simulations(true)'); //eslint-disable-line no-console
1303 warned1 = true;
1304 }
1305 if (!src_isDev && !src_isTest && !warned2) {
1306 console.warn('don\'t use simulation outside dev'); //eslint-disable-line no-console
1307 warned2 = true;
1308 }
1309 return {};
1310 }
1311 return pseudos.reduce(function (o, p) {
1312 return o['data-simulate-' + simple(p)] = '', o;
1313 }, {});
1314}
1315
1316/**** labels ****/
1317// toggle for debug labels.
1318// *shouldn't* have to mess with this manually
1319var hasLabels = src_isDev;
1320
1321function cssLabels(bool) {
1322 hasLabels = !!bool;
1323}
1324
1325// takes a string, converts to lowercase, strips out nonalphanumeric.
1326function simple(str) {
1327 var char = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
1328
1329 return str.toLowerCase().replace(/[^a-z0-9]/g, char);
1330}
1331
1332// hashes a string to something 'unique'
1333// we use this to generate ids for styles
1334
1335
1336function hashify(obj) {
1337 var str = JSON.stringify(obj);
1338 var toRet = doHash(str).toString(36);
1339 if (obj.label && obj.label.length > 0 && src_isDev) {
1340 return simple(obj.label.join('.'), '-') + '-' + toRet;
1341 }
1342 return toRet;
1343}
1344
1345// of shape { 'data-css-<id>': '' }
1346function isLikeRule(rule) {
1347 var keys = Object.keys(rule).filter(function (x) {
1348 return x !== 'toString';
1349 });
1350 if (keys.length !== 1) {
1351 return false;
1352 }
1353 return !!/data\-css\-([a-zA-Z0-9\-_]+)/.exec(keys[0]);
1354}
1355
1356// extracts id from a { 'data-css-<id>': ''} like object
1357function idFor(rule) {
1358 var keys = Object.keys(rule).filter(function (x) {
1359 return x !== 'toString';
1360 });
1361 if (keys.length !== 1) throw new Error('not a rule');
1362 var regex = /data\-css\-([a-zA-Z0-9\-_]+)/;
1363 var match = regex.exec(keys[0]);
1364 if (!match) throw new Error('not a rule');
1365 return match[1];
1366}
1367
1368// from https://github.com/j2css/j2c/blob/5d381c2d721d04b54fabe6a165d587247c3087cb/src/helpers.js#L28-L61
1369
1370// "Tokenizes" the selectors into parts relevant for the next function.
1371// Strings and comments are matched, but ignored afterwards.
1372// This is not a full tokenizers. It only recognizes comas, parentheses,
1373// strings and comments.
1374// regexp generated by scripts/regexps.js then trimmed by hand
1375var selectorTokenizer = /[(),]|"(?:\\.|[^"\n])*"|'(?:\\.|[^'\n])*'|\/\*[\s\S]*?\*\//g;
1376
1377/**
1378 * This will split a coma-separated selector list into individual selectors,
1379 * ignoring comas in strings, comments and in :pseudo-selectors(parameter, lists).
1380 *
1381 * @param {string} selector
1382 * @return {string[]}
1383 */
1384
1385function splitSelector(selector) {
1386 if (selector.indexOf(',') === -1) {
1387 return [selector];
1388 }
1389
1390 var indices = [],
1391 res = [],
1392 inParen = 0,
1393 o;
1394 /*eslint-disable no-cond-assign*/
1395 while (o = selectorTokenizer.exec(selector)) {
1396 /*eslint-enable no-cond-assign*/
1397 switch (o[0]) {
1398 case '(':
1399 inParen++;break;
1400 case ')':
1401 inParen--;break;
1402 case ',':
1403 if (inParen) break;indices.push(o.index);
1404 }
1405 }
1406 for (o = indices.length; o--;) {
1407 res.unshift(selector.slice(indices[o] + 1));
1408 selector = selector.slice(0, indices[o]);
1409 }
1410 res.unshift(selector);
1411 return res;
1412}
1413
1414function src_selector(id, path) {
1415 if (!id) {
1416 return path.replace(/\&/g, '');
1417 }
1418 if (!path) return '.css-' + id + ',[data-css-' + id + ']';
1419
1420 var x = splitSelector(path).map(function (x) {
1421 return x.indexOf('&') >= 0 ? [x.replace(/\&/mg, '.css-' + id), x.replace(/\&/mg, '[data-css-' + id + ']')].join(',') // todo - make sure each sub selector has an &
1422 : '.css-' + id + x + ',[data-css-' + id + ']' + x;
1423 }).join(',');
1424
1425 if (canSimulate && /^\&\:/.exec(path) && !/\s/.exec(path)) {
1426 x += ',.css-' + id + '[data-simulate-' + simple(path) + '],[data-css-' + id + '][data-simulate-' + simple(path) + ']';
1427 }
1428 return x;
1429}
1430
1431// end https://github.com/j2css/j2c/blob/5d381c2d721d04b54fabe6a165d587247c3087cb/src/helpers.js#L28-L61
1432
1433
1434function toCSS(_ref) {
1435 var selector = _ref.selector,
1436 style = _ref.style;
1437
1438 var result = src_plugins.transform({ selector: selector, style: style });
1439 return result.selector + '{' + createMarkupForStyles(result.style) + '}';
1440}
1441
1442function deconstruct(style) {
1443 // we can be sure it's not infinitely nested here
1444 var plain = void 0,
1445 selects = void 0,
1446 medias = void 0,
1447 supports = void 0;
1448 Object.keys(style).forEach(function (key) {
1449 if (key.indexOf('&') >= 0) {
1450 selects = selects || {};
1451 selects[key] = style[key];
1452 } else if (key.indexOf('@media') === 0) {
1453 medias = medias || {};
1454 medias[key] = deconstruct(style[key]);
1455 } else if (key.indexOf('@supports') === 0) {
1456 supports = supports || {};
1457 supports[key] = deconstruct(style[key]);
1458 } else if (key === 'label') {
1459 if (style.label.length > 0) {
1460 plain = plain || {};
1461 plain.label = hasLabels ? style.label.join('.') : '';
1462 }
1463 } else {
1464 plain = plain || {};
1465 plain[key] = style[key];
1466 }
1467 });
1468 return { plain: plain, selects: selects, medias: medias, supports: supports };
1469}
1470
1471function deconstructedStyleToCSS(id, style) {
1472 var css = [];
1473
1474 // plugins here
1475 var plain = style.plain,
1476 selects = style.selects,
1477 medias = style.medias,
1478 supports = style.supports;
1479
1480 if (plain) {
1481 css.push(toCSS({ style: plain, selector: src_selector(id) }));
1482 }
1483 if (selects) {
1484 Object.keys(selects).forEach(function (key) {
1485 return css.push(toCSS({ style: selects[key], selector: src_selector(id, key) }));
1486 });
1487 }
1488 if (medias) {
1489 Object.keys(medias).forEach(function (key) {
1490 return css.push(key + '{' + deconstructedStyleToCSS(id, medias[key]).join('') + '}');
1491 });
1492 }
1493 if (supports) {
1494 Object.keys(supports).forEach(function (key) {
1495 return css.push(key + '{' + deconstructedStyleToCSS(id, supports[key]).join('') + '}');
1496 });
1497 }
1498 return css;
1499}
1500
1501// this cache to track which rules have
1502// been inserted into the stylesheet
1503var inserted = styleSheet.inserted = {};
1504
1505// and helpers to insert rules into said styleSheet
1506function insert(spec) {
1507 if (!inserted[spec.id]) {
1508 inserted[spec.id] = true;
1509 var deconstructed = deconstruct(spec.style);
1510 var rules = deconstructedStyleToCSS(spec.id, deconstructed);
1511 inserted[spec.id] = src_isBrowser ? true : rules;
1512 rules.forEach(function (cssRule) {
1513 return styleSheet.insert(cssRule);
1514 });
1515 }
1516}
1517
1518// a simple cache to store generated rules
1519var registered = styleSheet.registered = {};
1520function register(spec) {
1521 if (!registered[spec.id]) {
1522 registered[spec.id] = spec;
1523 }
1524}
1525
1526function _getRegistered(rule) {
1527 if (isLikeRule(rule)) {
1528 var ret = registered[idFor(rule)];
1529 if (ret == null) {
1530 throw new Error('[glamor] an unexpected rule cache miss occurred. This is probably a sign of multiple glamor instances in your app. See https://github.com/threepointone/glamor/issues/79');
1531 }
1532 return ret;
1533 }
1534 return rule;
1535}
1536
1537// todo - perf
1538var ruleCache = {};
1539function toRule(spec) {
1540 register(spec);
1541 insert(spec);
1542
1543 if (ruleCache[spec.id]) {
1544 return ruleCache[spec.id];
1545 }
1546
1547 var ret = _defineProperty({}, 'data-css-' + spec.id, hasLabels ? spec.label || '' : '');
1548 Object.defineProperty(ret, 'toString', {
1549 enumerable: false, value: function value() {
1550 return 'css-' + spec.id;
1551 }
1552 });
1553 ruleCache[spec.id] = ret;
1554 return ret;
1555}
1556
1557function log() {
1558 //eslint-disable-line no-unused-vars
1559 console.log(this); //eslint-disable-line no-console
1560 return this;
1561}
1562
1563function isSelector(key) {
1564 var possibles = [':', '.', '[', '>', ' '],
1565 found = false,
1566 ch = key.charAt(0);
1567 for (var i = 0; i < possibles.length; i++) {
1568 if (ch === possibles[i]) {
1569 found = true;
1570 break;
1571 }
1572 }
1573 return found || key.indexOf('&') >= 0;
1574}
1575
1576function joinSelectors(a, b) {
1577 var as = splitSelector(a).map(function (a) {
1578 return !(a.indexOf('&') >= 0) ? '&' + a : a;
1579 });
1580 var bs = splitSelector(b).map(function (b) {
1581 return !(b.indexOf('&') >= 0) ? '&' + b : b;
1582 });
1583
1584 return bs.reduce(function (arr, b) {
1585 return arr.concat(as.map(function (a) {
1586 return b.replace(/\&/g, a);
1587 }));
1588 }, []).join(',');
1589}
1590
1591function joinMediaQueries(a, b) {
1592 return a ? '@media ' + a.substring(6) + ' and ' + b.substring(6) : b;
1593}
1594
1595function isMediaQuery(key) {
1596 return key.indexOf('@media') === 0;
1597}
1598
1599function isSupports(key) {
1600 return key.indexOf('@supports') === 0;
1601}
1602
1603function joinSupports(a, b) {
1604 return a ? '@supports ' + a.substring(9) + ' and ' + b.substring(9) : b;
1605}
1606
1607// flatten a nested array
1608function flatten(inArr) {
1609 var arr = [];
1610 for (var i = 0; i < inArr.length; i++) {
1611 if (Array.isArray(inArr[i])) arr = arr.concat(flatten(inArr[i]));else arr = arr.concat(inArr[i]);
1612 }
1613 return arr;
1614}
1615
1616var prefixedPseudoSelectors = {
1617 '::placeholder': ['::-webkit-input-placeholder', '::-moz-placeholder', '::-ms-input-placeholder'],
1618 ':fullscreen': [':-webkit-full-screen', ':-moz-full-screen', ':-ms-fullscreen']
1619
1620 // mutable! modifies dest.
1621};function build(dest, _ref2) {
1622 var _ref2$selector = _ref2.selector,
1623 selector = _ref2$selector === undefined ? '' : _ref2$selector,
1624 _ref2$mq = _ref2.mq,
1625 mq = _ref2$mq === undefined ? '' : _ref2$mq,
1626 _ref2$supp = _ref2.supp,
1627 supp = _ref2$supp === undefined ? '' : _ref2$supp,
1628 _ref2$src = _ref2.src,
1629 src = _ref2$src === undefined ? {} : _ref2$src;
1630
1631
1632 if (!Array.isArray(src)) {
1633 src = [src];
1634 }
1635 src = flatten(src);
1636
1637 src.forEach(function (_src) {
1638 if (isLikeRule(_src)) {
1639 var reg = _getRegistered(_src);
1640 if (reg.type !== 'css') {
1641 throw new Error('cannot merge this rule');
1642 }
1643 _src = reg.style;
1644 }
1645 _src = clean(_src);
1646 if (_src && _src.composes) {
1647 build(dest, { selector: selector, mq: mq, supp: supp, src: _src.composes });
1648 }
1649 Object.keys(_src || {}).forEach(function (key) {
1650 if (isSelector(key)) {
1651
1652 if (prefixedPseudoSelectors[key]) {
1653 prefixedPseudoSelectors[key].forEach(function (p) {
1654 return build(dest, { selector: joinSelectors(selector, p), mq: mq, supp: supp, src: _src[key] });
1655 });
1656 }
1657
1658 build(dest, { selector: joinSelectors(selector, key), mq: mq, supp: supp, src: _src[key] });
1659 } else if (isMediaQuery(key)) {
1660 build(dest, { selector: selector, mq: joinMediaQueries(mq, key), supp: supp, src: _src[key] });
1661 } else if (isSupports(key)) {
1662 build(dest, { selector: selector, mq: mq, supp: joinSupports(supp, key), src: _src[key] });
1663 } else if (key === 'composes') {
1664 // ignore, we already dealth with it
1665 } else {
1666 var _dest = dest;
1667 if (supp) {
1668 _dest[supp] = _dest[supp] || {};
1669 _dest = _dest[supp];
1670 }
1671 if (mq) {
1672 _dest[mq] = _dest[mq] || {};
1673 _dest = _dest[mq];
1674 }
1675 if (selector) {
1676 _dest[selector] = _dest[selector] || {};
1677 _dest = _dest[selector];
1678 }
1679
1680 if (key === 'label') {
1681 if (hasLabels) {
1682 dest.label = dest.label.concat(_src.label);
1683 }
1684 } else {
1685 _dest[key] = _src[key];
1686 }
1687 }
1688 });
1689 });
1690}
1691
1692function _css(rules) {
1693 var style = { label: [] };
1694 build(style, { src: rules }); // mutative! but worth it.
1695
1696 var spec = {
1697 id: hashify(style),
1698 style: style, label: hasLabels ? style.label.join('.') : '',
1699 type: 'css'
1700 };
1701 return toRule(spec);
1702}
1703
1704var nullrule = {
1705 // 'data-css-nil': ''
1706};
1707Object.defineProperty(nullrule, 'toString', {
1708 enumerable: false, value: function value() {
1709 return 'css-nil';
1710 }
1711});
1712
1713var inputCaches = typeof WeakMap !== 'undefined' ? [nullrule, new WeakMap(), new WeakMap(), new WeakMap()] : [nullrule];
1714
1715var warnedWeakMapError = false;
1716function multiIndexCache(fn) {
1717 return function (args) {
1718 if (inputCaches[args.length]) {
1719 var coi = inputCaches[args.length];
1720 var ctr = 0;
1721 while (ctr < args.length - 1) {
1722 if (!coi.has(args[ctr])) {
1723 coi.set(args[ctr], new WeakMap());
1724 }
1725 coi = coi.get(args[ctr]);
1726 ctr++;
1727 }
1728 if (coi.has(args[args.length - 1])) {
1729 var ret = coi.get(args[ctr]);
1730
1731 if (registered[ret.toString().substring(4)]) {
1732 // make sure it hasn't been flushed
1733 return ret;
1734 }
1735 }
1736 }
1737 var value = fn(args);
1738 if (inputCaches[args.length]) {
1739 var _ctr = 0,
1740 _coi = inputCaches[args.length];
1741 while (_ctr < args.length - 1) {
1742 _coi = _coi.get(args[_ctr]);
1743 _ctr++;
1744 }
1745 try {
1746 _coi.set(args[_ctr], value);
1747 } catch (err) {
1748 if (src_isDev && !warnedWeakMapError) {
1749 var _console;
1750
1751 warnedWeakMapError = true;
1752 (_console = console).warn.apply(_console, ['failed setting the WeakMap cache for args:'].concat(src__toConsumableArray(args))); // eslint-disable-line no-console
1753 console.warn('this should NOT happen, please file a bug on the github repo.'); // eslint-disable-line no-console
1754 }
1755 }
1756 }
1757 return value;
1758 };
1759}
1760
1761var cachedCss = typeof WeakMap !== 'undefined' ? multiIndexCache(_css) : _css;
1762
1763function css() {
1764 for (var _len2 = arguments.length, rules = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
1765 rules[_key2] = arguments[_key2];
1766 }
1767
1768 if (rules[0] && rules[0].length && rules[0].raw) {
1769 throw new Error('you forgot to include glamor/babel in your babel plugins.');
1770 }
1771
1772 rules = clean(rules);
1773 if (!rules) {
1774 return nullrule;
1775 }
1776
1777 return cachedCss(rules);
1778}
1779
1780css.insert = function (css) {
1781 var spec = {
1782 id: hashify(css),
1783 css: css,
1784 type: 'raw'
1785 };
1786 register(spec);
1787 if (!inserted[spec.id]) {
1788 styleSheet.insert(spec.css);
1789 inserted[spec.id] = src_isBrowser ? true : [spec.css];
1790 }
1791};
1792
1793var insertRule = css.insert;
1794
1795css.global = function (selector, style) {
1796 style = clean(style);
1797 if (style) {
1798 return css.insert(toCSS({ selector: selector, style: style }));
1799 }
1800};
1801
1802var insertGlobal = css.global;
1803
1804function insertKeyframe(spec) {
1805 if (!inserted[spec.id]) {
1806 var inner = Object.keys(spec.keyframes).map(function (kf) {
1807 var result = src_plugins.keyframes.transform({ id: spec.id, name: kf, style: spec.keyframes[kf] });
1808 return result.name + '{' + createMarkupForStyles(result.style) + '}';
1809 }).join('');
1810
1811 var rules = ['-webkit-', '-moz-', '-o-', ''].map(function (prefix) {
1812 return '@' + prefix + 'keyframes ' + (spec.name + '_' + spec.id) + '{' + inner + '}';
1813 });
1814 rules.forEach(function (rule) {
1815 return styleSheet.insert(rule);
1816 });
1817
1818 inserted[spec.id] = src_isBrowser ? true : rules;
1819 }
1820}
1821css.keyframes = function (name, kfs) {
1822 if (!kfs) {
1823 kfs = name, name = 'animation';
1824 }
1825
1826 // do not ignore empty keyframe definitions for now.
1827 kfs = clean(kfs) || {};
1828 var spec = {
1829 id: hashify({ name: name, kfs: kfs }),
1830 type: 'keyframes',
1831 name: name,
1832 keyframes: kfs
1833 };
1834 register(spec);
1835 insertKeyframe(spec);
1836 return name + '_' + spec.id;
1837};
1838
1839// we don't go all out for fonts as much, giving a simple font loading strategy
1840// use a fancier lib if you need moar power
1841css.fontFace = function (font) {
1842 font = clean(font);
1843 var spec = {
1844 id: hashify(font),
1845 type: 'font-face',
1846 font: font
1847 };
1848 register(spec);
1849 insertFontFace(spec);
1850
1851 return font.fontFamily;
1852};
1853
1854var fontFace = css.fontFace;
1855var keyframes = css.keyframes;
1856
1857function insertFontFace(spec) {
1858 if (!inserted[spec.id]) {
1859 var rule = '@font-face{' + createMarkupForStyles(spec.font) + '}';
1860 styleSheet.insert(rule);
1861 inserted[spec.id] = src_isBrowser ? true : [rule];
1862 }
1863}
1864
1865// rehydrate the insertion cache with ids sent from
1866// renderStatic / renderStaticOptimized
1867function rehydrate(ids) {
1868 // load up ids
1869 src___WEBPACK_IMPORTED_MODULE_0_object_assign___default()(inserted, ids.reduce(function (o, i) {
1870 return o[i] = true, o;
1871 }, {}));
1872 // assume css loaded separately
1873}
1874
1875// clears out the cache and empties the stylesheet
1876// best for tests, though there might be some value for SSR.
1877
1878function flush() {
1879 inserted = styleSheet.inserted = {};
1880 registered = styleSheet.registered = {};
1881 ruleCache = {};
1882 styleSheet.flush();
1883 styleSheet.inject();
1884}
1885
1886var presets = {
1887 mobile: '(min-width: 400px)',
1888 Mobile: '@media (min-width: 400px)',
1889 phablet: '(min-width: 550px)',
1890 Phablet: '@media (min-width: 550px)',
1891 tablet: '(min-width: 750px)',
1892 Tablet: '@media (min-width: 750px)',
1893 desktop: '(min-width: 1000px)',
1894 Desktop: '@media (min-width: 1000px)',
1895 hd: '(min-width: 1200px)',
1896 Hd: '@media (min-width: 1200px)'
1897};
1898
1899var src_style = css;
1900
1901function select(selector) {
1902 for (var _len3 = arguments.length, styles = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
1903 styles[_key3 - 1] = arguments[_key3];
1904 }
1905
1906 if (!selector) {
1907 return src_style(styles);
1908 }
1909 return css(_defineProperty({}, selector, styles));
1910}
1911var $ = select;
1912
1913function parent(selector) {
1914 for (var _len4 = arguments.length, styles = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
1915 styles[_key4 - 1] = arguments[_key4];
1916 }
1917
1918 return css(_defineProperty({}, selector + ' &', styles));
1919}
1920
1921var merge = css;
1922var compose = css;
1923
1924function media(query) {
1925 for (var _len5 = arguments.length, rules = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
1926 rules[_key5 - 1] = arguments[_key5];
1927 }
1928
1929 return css(_defineProperty({}, '@media ' + query, rules));
1930}
1931
1932function pseudo(selector) {
1933 for (var _len6 = arguments.length, styles = Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
1934 styles[_key6 - 1] = arguments[_key6];
1935 }
1936
1937 return css(_defineProperty({}, selector, styles));
1938}
1939
1940// allllll the pseudoclasses
1941
1942function active(x) {
1943 return pseudo(':active', x);
1944}
1945
1946function any(x) {
1947 return pseudo(':any', x);
1948}
1949
1950function checked(x) {
1951 return pseudo(':checked', x);
1952}
1953
1954function disabled(x) {
1955 return pseudo(':disabled', x);
1956}
1957
1958function empty(x) {
1959 return pseudo(':empty', x);
1960}
1961
1962function enabled(x) {
1963 return pseudo(':enabled', x);
1964}
1965
1966function _default(x) {
1967 return pseudo(':default', x); // note '_default' name
1968}
1969
1970function first(x) {
1971 return pseudo(':first', x);
1972}
1973
1974function firstChild(x) {
1975 return pseudo(':first-child', x);
1976}
1977
1978function firstOfType(x) {
1979 return pseudo(':first-of-type', x);
1980}
1981
1982function fullscreen(x) {
1983 return pseudo(':fullscreen', x);
1984}
1985
1986function focus(x) {
1987 return pseudo(':focus', x);
1988}
1989
1990function hover(x) {
1991 return pseudo(':hover', x);
1992}
1993
1994function indeterminate(x) {
1995 return pseudo(':indeterminate', x);
1996}
1997
1998function inRange(x) {
1999 return pseudo(':in-range', x);
2000}
2001
2002function invalid(x) {
2003 return pseudo(':invalid', x);
2004}
2005
2006function lastChild(x) {
2007 return pseudo(':last-child', x);
2008}
2009
2010function lastOfType(x) {
2011 return pseudo(':last-of-type', x);
2012}
2013
2014function left(x) {
2015 return pseudo(':left', x);
2016}
2017
2018function link(x) {
2019 return pseudo(':link', x);
2020}
2021
2022function onlyChild(x) {
2023 return pseudo(':only-child', x);
2024}
2025
2026function onlyOfType(x) {
2027 return pseudo(':only-of-type', x);
2028}
2029
2030function optional(x) {
2031 return pseudo(':optional', x);
2032}
2033
2034function outOfRange(x) {
2035 return pseudo(':out-of-range', x);
2036}
2037
2038function readOnly(x) {
2039 return pseudo(':read-only', x);
2040}
2041
2042function readWrite(x) {
2043 return pseudo(':read-write', x);
2044}
2045
2046function required(x) {
2047 return pseudo(':required', x);
2048}
2049
2050function right(x) {
2051 return pseudo(':right', x);
2052}
2053
2054function root(x) {
2055 return pseudo(':root', x);
2056}
2057
2058function scope(x) {
2059 return pseudo(':scope', x);
2060}
2061
2062function target(x) {
2063 return pseudo(':target', x);
2064}
2065
2066function valid(x) {
2067 return pseudo(':valid', x);
2068}
2069
2070function visited(x) {
2071 return pseudo(':visited', x);
2072}
2073
2074// parameterized pseudoclasses
2075function dir(p, x) {
2076 return pseudo(':dir(' + p + ')', x);
2077}
2078function lang(p, x) {
2079 return pseudo(':lang(' + p + ')', x);
2080}
2081function not(p, x) {
2082 // should this be a plugin?
2083 var selector = p.split(',').map(function (x) {
2084 return x.trim();
2085 }).map(function (x) {
2086 return ':not(' + x + ')';
2087 });
2088 if (selector.length === 1) {
2089 return pseudo(':not(' + p + ')', x);
2090 }
2091 return select(selector.join(''), x);
2092}
2093function nthChild(p, x) {
2094 return pseudo(':nth-child(' + p + ')', x);
2095}
2096function nthLastChild(p, x) {
2097 return pseudo(':nth-last-child(' + p + ')', x);
2098}
2099function nthLastOfType(p, x) {
2100 return pseudo(':nth-last-of-type(' + p + ')', x);
2101}
2102function nthOfType(p, x) {
2103 return pseudo(':nth-of-type(' + p + ')', x);
2104}
2105
2106// pseudoelements
2107function after(x) {
2108 return pseudo('::after', x);
2109}
2110function before(x) {
2111 return pseudo('::before', x);
2112}
2113function firstLetter(x) {
2114 return pseudo('::first-letter', x);
2115}
2116function firstLine(x) {
2117 return pseudo('::first-line', x);
2118}
2119function selection(x) {
2120 return pseudo('::selection', x);
2121}
2122function backdrop(x) {
2123 return pseudo('::backdrop', x);
2124}
2125function placeholder(x) {
2126 // https://github.com/threepointone/glamor/issues/14
2127 return css({ '::placeholder': x });
2128}
2129
2130/*** helpers for web components ***/
2131// https://github.com/threepointone/glamor/issues/16
2132
2133function cssFor() {
2134 for (var _len7 = arguments.length, rules = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
2135 rules[_key7] = arguments[_key7];
2136 }
2137
2138 rules = clean(rules);
2139 return rules ? rules.map(function (r) {
2140 var style = { label: [] };
2141 build(style, { src: r }); // mutative! but worth it.
2142 return deconstructedStyleToCSS(hashify(style), deconstruct(style)).join('');
2143 }).join('') : '';
2144}
2145
2146function attribsFor() {
2147 for (var _len8 = arguments.length, rules = Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
2148 rules[_key8] = arguments[_key8];
2149 }
2150
2151 rules = clean(rules);
2152 var htmlAttributes = rules ? rules.map(function (rule) {
2153 idFor(rule); // throwaway check for rule
2154 var key = Object.keys(rule)[0],
2155 value = rule[key];
2156 return key + '="' + (value || '') + '"';
2157 }).join(' ') : '';
2158
2159 return htmlAttributes;
2160}
2161
2162/***/ }),
2163/* 5 */
2164/***/ (function(module, exports, __webpack_require__) {
2165
2166"use strict";
2167/**
2168 * Copyright (c) 2013-present, Facebook, Inc.
2169 * All rights reserved.
2170 *
2171 * This source code is licensed under the BSD-style license found in the
2172 * LICENSE file in the root directory of this source tree. An additional grant
2173 * of patent rights can be found in the PATENTS file in the same directory.
2174 *
2175 * @typechecks
2176 */
2177
2178
2179
2180var camelize = __webpack_require__(6);
2181
2182var msPattern = /^-ms-/;
2183
2184/**
2185 * Camelcases a hyphenated CSS property name, for example:
2186 *
2187 * > camelizeStyleName('background-color')
2188 * < "backgroundColor"
2189 * > camelizeStyleName('-moz-transition')
2190 * < "MozTransition"
2191 * > camelizeStyleName('-ms-transition')
2192 * < "msTransition"
2193 *
2194 * As Andi Smith suggests
2195 * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
2196 * is converted to lowercase `ms`.
2197 *
2198 * @param {string} string
2199 * @return {string}
2200 */
2201function camelizeStyleName(string) {
2202 return camelize(string.replace(msPattern, 'ms-'));
2203}
2204
2205module.exports = camelizeStyleName;
2206
2207/***/ }),
2208/* 6 */
2209/***/ (function(module, exports, __webpack_require__) {
2210
2211"use strict";
2212
2213
2214/**
2215 * Copyright (c) 2013-present, Facebook, Inc.
2216 * All rights reserved.
2217 *
2218 * This source code is licensed under the BSD-style license found in the
2219 * LICENSE file in the root directory of this source tree. An additional grant
2220 * of patent rights can be found in the PATENTS file in the same directory.
2221 *
2222 * @typechecks
2223 */
2224
2225var _hyphenPattern = /-(.)/g;
2226
2227/**
2228 * Camelcases a hyphenated string, for example:
2229 *
2230 * > camelize('background-color')
2231 * < "backgroundColor"
2232 *
2233 * @param {string} string
2234 * @return {string}
2235 */
2236function camelize(string) {
2237 return string.replace(_hyphenPattern, function (_, character) {
2238 return character.toUpperCase();
2239 });
2240}
2241
2242module.exports = camelize;
2243
2244/***/ }),
2245/* 7 */
2246/***/ (function(module, exports, __webpack_require__) {
2247
2248"use strict";
2249
2250
2251/**
2252 * Copyright (c) 2013-present, Facebook, Inc.
2253 * All rights reserved.
2254 *
2255 * This source code is licensed under the BSD-style license found in the
2256 * LICENSE file in the root directory of this source tree. An additional grant
2257 * of patent rights can be found in the PATENTS file in the same directory.
2258 *
2259 *
2260 */
2261
2262function makeEmptyFunction(arg) {
2263 return function () {
2264 return arg;
2265 };
2266}
2267
2268/**
2269 * This function accepts and discards inputs; it has no side effects. This is
2270 * primarily useful idiomatically for overridable function endpoints which
2271 * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
2272 */
2273var emptyFunction = function emptyFunction() {};
2274
2275emptyFunction.thatReturns = makeEmptyFunction;
2276emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
2277emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
2278emptyFunction.thatReturnsNull = makeEmptyFunction(null);
2279emptyFunction.thatReturnsThis = function () {
2280 return this;
2281};
2282emptyFunction.thatReturnsArgument = function (arg) {
2283 return arg;
2284};
2285
2286module.exports = emptyFunction;
2287
2288/***/ }),
2289/* 8 */
2290/***/ (function(module, exports, __webpack_require__) {
2291
2292"use strict";
2293/**
2294 * Copyright (c) 2013-present, Facebook, Inc.
2295 * All rights reserved.
2296 *
2297 * This source code is licensed under the BSD-style license found in the
2298 * LICENSE file in the root directory of this source tree. An additional grant
2299 * of patent rights can be found in the PATENTS file in the same directory.
2300 *
2301 * @typechecks
2302 */
2303
2304
2305
2306var hyphenate = __webpack_require__(9);
2307
2308var msPattern = /^ms-/;
2309
2310/**
2311 * Hyphenates a camelcased CSS property name, for example:
2312 *
2313 * > hyphenateStyleName('backgroundColor')
2314 * < "background-color"
2315 * > hyphenateStyleName('MozTransition')
2316 * < "-moz-transition"
2317 * > hyphenateStyleName('msTransition')
2318 * < "-ms-transition"
2319 *
2320 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
2321 * is converted to `-ms-`.
2322 *
2323 * @param {string} string
2324 * @return {string}
2325 */
2326function hyphenateStyleName(string) {
2327 return hyphenate(string).replace(msPattern, '-ms-');
2328}
2329
2330module.exports = hyphenateStyleName;
2331
2332/***/ }),
2333/* 9 */
2334/***/ (function(module, exports, __webpack_require__) {
2335
2336"use strict";
2337
2338
2339/**
2340 * Copyright (c) 2013-present, Facebook, Inc.
2341 * All rights reserved.
2342 *
2343 * This source code is licensed under the BSD-style license found in the
2344 * LICENSE file in the root directory of this source tree. An additional grant
2345 * of patent rights can be found in the PATENTS file in the same directory.
2346 *
2347 * @typechecks
2348 */
2349
2350var _uppercasePattern = /([A-Z])/g;
2351
2352/**
2353 * Hyphenates a camelcased string, for example:
2354 *
2355 * > hyphenate('backgroundColor')
2356 * < "background-color"
2357 *
2358 * For CSS style names, use `hyphenateStyleName` instead which works properly
2359 * with all vendor prefixes, including `ms`.
2360 *
2361 * @param {string} string
2362 * @return {string}
2363 */
2364function hyphenate(string) {
2365 return string.replace(_uppercasePattern, '-$1').toLowerCase();
2366}
2367
2368module.exports = hyphenate;
2369
2370/***/ }),
2371/* 10 */
2372/***/ (function(module, exports, __webpack_require__) {
2373
2374"use strict";
2375/**
2376 * Copyright (c) 2013-present, Facebook, Inc.
2377 * All rights reserved.
2378 *
2379 * This source code is licensed under the BSD-style license found in the
2380 * LICENSE file in the root directory of this source tree. An additional grant
2381 * of patent rights can be found in the PATENTS file in the same directory.
2382 *
2383 *
2384 * @typechecks static-only
2385 */
2386
2387
2388
2389/**
2390 * Memoizes the return value of a function that accepts one string argument.
2391 */
2392
2393function memoizeStringOnly(callback) {
2394 var cache = {};
2395 return function (string) {
2396 if (!cache.hasOwnProperty(string)) {
2397 cache[string] = callback.call(this, string);
2398 }
2399 return cache[string];
2400 };
2401}
2402
2403module.exports = memoizeStringOnly;
2404
2405/***/ }),
2406/* 11 */
2407/***/ (function(module, exports, __webpack_require__) {
2408
2409"use strict";
2410
2411
2412Object.defineProperty(exports, "__esModule", {
2413 value: true
2414});
2415
2416var w = ["Webkit"];
2417var m = ["Moz"];
2418var ms = ["ms"];
2419var wm = ["Webkit", "Moz"];
2420var wms = ["Webkit", "ms"];
2421var wmms = ["Webkit", "Moz", "ms"];
2422
2423exports.default = {
2424 plugins: [],
2425 prefixMap: { "appearance": wm, "userSelect": wmms, "textEmphasisPosition": w, "textEmphasis": w, "textEmphasisStyle": w, "textEmphasisColor": w, "boxDecorationBreak": w, "clipPath": w, "maskImage": w, "maskMode": w, "maskRepeat": w, "maskPosition": w, "maskClip": w, "maskOrigin": w, "maskSize": w, "maskComposite": w, "mask": w, "maskBorderSource": w, "maskBorderMode": w, "maskBorderSlice": w, "maskBorderWidth": w, "maskBorderOutset": w, "maskBorderRepeat": w, "maskBorder": w, "maskType": w, "textDecorationStyle": w, "textDecorationSkip": w, "textDecorationLine": w, "textDecorationColor": w, "filter": w, "fontFeatureSettings": w, "breakAfter": wmms, "breakBefore": wmms, "breakInside": wmms, "columnCount": wm, "columnFill": wm, "columnGap": wm, "columnRule": wm, "columnRuleColor": wm, "columnRuleStyle": wm, "columnRuleWidth": wm, "columns": wm, "columnSpan": wm, "columnWidth": wm, "flex": w, "flexBasis": w, "flexDirection": w, "flexGrow": w, "flexFlow": w, "flexShrink": w, "flexWrap": w, "alignContent": w, "alignItems": w, "alignSelf": w, "justifyContent": w, "order": w, "transform": w, "transformOrigin": w, "transformOriginX": w, "transformOriginY": w, "backfaceVisibility": w, "perspective": w, "perspectiveOrigin": w, "transformStyle": w, "transformOriginZ": w, "animation": w, "animationDelay": w, "animationDirection": w, "animationFillMode": w, "animationDuration": w, "animationIterationCount": w, "animationName": w, "animationPlayState": w, "animationTimingFunction": w, "backdropFilter": w, "fontKerning": w, "scrollSnapType": wms, "scrollSnapPointsX": wms, "scrollSnapPointsY": wms, "scrollSnapDestination": wms, "scrollSnapCoordinate": wms, "shapeImageThreshold": w, "shapeImageMargin": w, "shapeImageOutside": w, "hyphens": wmms, "flowInto": wms, "flowFrom": wms, "regionFragment": wms, "textAlignLast": m, "tabSize": m, "wrapFlow": ms, "wrapThrough": ms, "wrapMargin": ms, "gridTemplateColumns": ms, "gridTemplateRows": ms, "gridTemplateAreas": ms, "gridTemplate": ms, "gridAutoColumns": ms, "gridAutoRows": ms, "gridAutoFlow": ms, "grid": ms, "gridRowStart": ms, "gridColumnStart": ms, "gridRowEnd": ms, "gridRow": ms, "gridColumn": ms, "gridColumnEnd": ms, "gridColumnGap": ms, "gridRowGap": ms, "gridArea": ms, "gridGap": ms, "textSizeAdjust": wms, "borderImage": w, "borderImageOutset": w, "borderImageRepeat": w, "borderImageSlice": w, "borderImageSource": w, "borderImageWidth": w, "transitionDelay": w, "transitionDuration": w, "transitionProperty": w, "transitionTimingFunction": w }
2426};
2427module.exports = exports["default"];
2428
2429/***/ }),
2430/* 12 */
2431/***/ (function(module, exports, __webpack_require__) {
2432
2433"use strict";
2434
2435
2436Object.defineProperty(exports, "__esModule", {
2437 value: true
2438});
2439exports.default = prefixProperty;
2440
2441var _capitalizeString = __webpack_require__(3);
2442
2443var _capitalizeString2 = _interopRequireDefault(_capitalizeString);
2444
2445function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2446
2447function prefixProperty(prefixProperties, property, style) {
2448 if (prefixProperties.hasOwnProperty(property)) {
2449 var requiredPrefixes = prefixProperties[property];
2450 for (var i = 0, len = requiredPrefixes.length; i < len; ++i) {
2451 style[requiredPrefixes[i] + (0, _capitalizeString2.default)(property)] = style[property];
2452 }
2453 }
2454}
2455module.exports = exports['default'];
2456
2457/***/ }),
2458/* 13 */
2459/***/ (function(module, exports, __webpack_require__) {
2460
2461"use strict";
2462
2463
2464Object.defineProperty(exports, "__esModule", {
2465 value: true
2466});
2467exports.default = prefixValue;
2468function prefixValue(plugins, property, value, style, metaData) {
2469 for (var i = 0, len = plugins.length; i < len; ++i) {
2470 var processedValue = plugins[i](property, value, style, metaData
2471
2472 // we can stop processing if a value is returned
2473 // as all plugin criteria are unique
2474 );if (processedValue) {
2475 return processedValue;
2476 }
2477 }
2478}
2479module.exports = exports["default"];
2480
2481/***/ }),
2482/* 14 */
2483/***/ (function(module, exports, __webpack_require__) {
2484
2485"use strict";
2486
2487
2488Object.defineProperty(exports, "__esModule", {
2489 value: true
2490});
2491exports.default = cursor;
2492var prefixes = ['-webkit-', '-moz-', ''];
2493
2494var values = {
2495 'zoom-in': true,
2496 'zoom-out': true,
2497 grab: true,
2498 grabbing: true
2499};
2500
2501function cursor(property, value) {
2502 if (property === 'cursor' && values.hasOwnProperty(value)) {
2503 return prefixes.map(function (prefix) {
2504 return prefix + value;
2505 });
2506 }
2507}
2508module.exports = exports['default'];
2509
2510/***/ }),
2511/* 15 */
2512/***/ (function(module, exports, __webpack_require__) {
2513
2514"use strict";
2515
2516
2517Object.defineProperty(exports, "__esModule", {
2518 value: true
2519});
2520exports.default = crossFade;
2521
2522var _isPrefixedValue = __webpack_require__(0);
2523
2524var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);
2525
2526function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2527
2528// http://caniuse.com/#search=cross-fade
2529var prefixes = ['-webkit-', ''];
2530function crossFade(property, value) {
2531 if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('cross-fade(') > -1) {
2532 return prefixes.map(function (prefix) {
2533 return value.replace(/cross-fade\(/g, prefix + 'cross-fade(');
2534 });
2535 }
2536}
2537module.exports = exports['default'];
2538
2539/***/ }),
2540/* 16 */
2541/***/ (function(module, exports, __webpack_require__) {
2542
2543"use strict";
2544
2545
2546Object.defineProperty(exports, "__esModule", {
2547 value: true
2548});
2549exports.default = filter;
2550
2551var _isPrefixedValue = __webpack_require__(0);
2552
2553var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);
2554
2555function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2556
2557// http://caniuse.com/#feat=css-filter-function
2558var prefixes = ['-webkit-', ''];
2559function filter(property, value) {
2560 if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('filter(') > -1) {
2561 return prefixes.map(function (prefix) {
2562 return value.replace(/filter\(/g, prefix + 'filter(');
2563 });
2564 }
2565}
2566module.exports = exports['default'];
2567
2568/***/ }),
2569/* 17 */
2570/***/ (function(module, exports, __webpack_require__) {
2571
2572"use strict";
2573
2574
2575Object.defineProperty(exports, "__esModule", {
2576 value: true
2577});
2578exports.default = flex;
2579var values = {
2580 flex: ['-webkit-box', '-moz-box', '-ms-flexbox', '-webkit-flex', 'flex'],
2581 'inline-flex': ['-webkit-inline-box', '-moz-inline-box', '-ms-inline-flexbox', '-webkit-inline-flex', 'inline-flex']
2582};
2583
2584function flex(property, value) {
2585 if (property === 'display' && values.hasOwnProperty(value)) {
2586 return values[value];
2587 }
2588}
2589module.exports = exports['default'];
2590
2591/***/ }),
2592/* 18 */
2593/***/ (function(module, exports, __webpack_require__) {
2594
2595"use strict";
2596
2597
2598Object.defineProperty(exports, "__esModule", {
2599 value: true
2600});
2601exports.default = flexboxOld;
2602var alternativeValues = {
2603 'space-around': 'justify',
2604 'space-between': 'justify',
2605 'flex-start': 'start',
2606 'flex-end': 'end',
2607 'wrap-reverse': 'multiple',
2608 wrap: 'multiple'
2609};
2610
2611var alternativeProps = {
2612 alignItems: 'WebkitBoxAlign',
2613 justifyContent: 'WebkitBoxPack',
2614 flexWrap: 'WebkitBoxLines'
2615};
2616
2617function flexboxOld(property, value, style) {
2618 if (property === 'flexDirection' && typeof value === 'string') {
2619 if (value.indexOf('column') > -1) {
2620 style.WebkitBoxOrient = 'vertical';
2621 } else {
2622 style.WebkitBoxOrient = 'horizontal';
2623 }
2624 if (value.indexOf('reverse') > -1) {
2625 style.WebkitBoxDirection = 'reverse';
2626 } else {
2627 style.WebkitBoxDirection = 'normal';
2628 }
2629 }
2630 if (alternativeProps.hasOwnProperty(property)) {
2631 style[alternativeProps[property]] = alternativeValues[value] || value;
2632 }
2633}
2634module.exports = exports['default'];
2635
2636/***/ }),
2637/* 19 */
2638/***/ (function(module, exports, __webpack_require__) {
2639
2640"use strict";
2641
2642
2643Object.defineProperty(exports, "__esModule", {
2644 value: true
2645});
2646exports.default = gradient;
2647
2648var _isPrefixedValue = __webpack_require__(0);
2649
2650var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);
2651
2652function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2653
2654var prefixes = ['-webkit-', '-moz-', ''];
2655
2656var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;
2657
2658function gradient(property, value) {
2659 if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && values.test(value)) {
2660 return prefixes.map(function (prefix) {
2661 return prefix + value;
2662 });
2663 }
2664}
2665module.exports = exports['default'];
2666
2667/***/ }),
2668/* 20 */
2669/***/ (function(module, exports, __webpack_require__) {
2670
2671"use strict";
2672
2673
2674Object.defineProperty(exports, "__esModule", {
2675 value: true
2676});
2677exports.default = imageSet;
2678
2679var _isPrefixedValue = __webpack_require__(0);
2680
2681var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);
2682
2683function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2684
2685// http://caniuse.com/#feat=css-image-set
2686var prefixes = ['-webkit-', ''];
2687function imageSet(property, value) {
2688 if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('image-set(') > -1) {
2689 return prefixes.map(function (prefix) {
2690 return value.replace(/image-set\(/g, prefix + 'image-set(');
2691 });
2692 }
2693}
2694module.exports = exports['default'];
2695
2696/***/ }),
2697/* 21 */
2698/***/ (function(module, exports, __webpack_require__) {
2699
2700"use strict";
2701
2702
2703Object.defineProperty(exports, "__esModule", {
2704 value: true
2705});
2706exports.default = position;
2707function position(property, value) {
2708 if (property === 'position' && value === 'sticky') {
2709 return ['-webkit-sticky', 'sticky'];
2710 }
2711}
2712module.exports = exports['default'];
2713
2714/***/ }),
2715/* 22 */
2716/***/ (function(module, exports, __webpack_require__) {
2717
2718"use strict";
2719
2720
2721Object.defineProperty(exports, "__esModule", {
2722 value: true
2723});
2724exports.default = sizing;
2725var prefixes = ['-webkit-', '-moz-', ''];
2726
2727var properties = {
2728 maxHeight: true,
2729 maxWidth: true,
2730 width: true,
2731 height: true,
2732 columnWidth: true,
2733 minWidth: true,
2734 minHeight: true
2735};
2736var values = {
2737 'min-content': true,
2738 'max-content': true,
2739 'fill-available': true,
2740 'fit-content': true,
2741 'contain-floats': true
2742};
2743
2744function sizing(property, value) {
2745 if (properties.hasOwnProperty(property) && values.hasOwnProperty(value)) {
2746 return prefixes.map(function (prefix) {
2747 return prefix + value;
2748 });
2749 }
2750}
2751module.exports = exports['default'];
2752
2753/***/ }),
2754/* 23 */
2755/***/ (function(module, exports, __webpack_require__) {
2756
2757"use strict";
2758
2759
2760Object.defineProperty(exports, "__esModule", {
2761 value: true
2762});
2763exports.default = transition;
2764
2765var _hyphenateProperty = __webpack_require__(24);
2766
2767var _hyphenateProperty2 = _interopRequireDefault(_hyphenateProperty);
2768
2769var _isPrefixedValue = __webpack_require__(0);
2770
2771var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);
2772
2773var _capitalizeString = __webpack_require__(3);
2774
2775var _capitalizeString2 = _interopRequireDefault(_capitalizeString);
2776
2777function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2778
2779var properties = {
2780 transition: true,
2781 transitionProperty: true,
2782 WebkitTransition: true,
2783 WebkitTransitionProperty: true,
2784 MozTransition: true,
2785 MozTransitionProperty: true
2786};
2787
2788
2789var prefixMapping = {
2790 Webkit: '-webkit-',
2791 Moz: '-moz-',
2792 ms: '-ms-'
2793};
2794
2795function prefixValue(value, propertyPrefixMap) {
2796 if ((0, _isPrefixedValue2.default)(value)) {
2797 return value;
2798 }
2799
2800 // only split multi values, not cubic beziers
2801 var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g);
2802
2803 for (var i = 0, len = multipleValues.length; i < len; ++i) {
2804 var singleValue = multipleValues[i];
2805 var values = [singleValue];
2806 for (var property in propertyPrefixMap) {
2807 var dashCaseProperty = (0, _hyphenateProperty2.default)(property);
2808
2809 if (singleValue.indexOf(dashCaseProperty) > -1 && dashCaseProperty !== 'order') {
2810 var prefixes = propertyPrefixMap[property];
2811 for (var j = 0, pLen = prefixes.length; j < pLen; ++j) {
2812 // join all prefixes and create a new value
2813 values.unshift(singleValue.replace(dashCaseProperty, prefixMapping[prefixes[j]] + dashCaseProperty));
2814 }
2815 }
2816 }
2817
2818 multipleValues[i] = values.join(',');
2819 }
2820
2821 return multipleValues.join(',');
2822}
2823
2824function transition(property, value, style, propertyPrefixMap) {
2825 // also check for already prefixed transitions
2826 if (typeof value === 'string' && properties.hasOwnProperty(property)) {
2827 var outputValue = prefixValue(value, propertyPrefixMap
2828 // if the property is already prefixed
2829 );var webkitOutput = outputValue.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function (val) {
2830 return !/-moz-|-ms-/.test(val);
2831 }).join(',');
2832
2833 if (property.indexOf('Webkit') > -1) {
2834 return webkitOutput;
2835 }
2836
2837 var mozOutput = outputValue.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function (val) {
2838 return !/-webkit-|-ms-/.test(val);
2839 }).join(',');
2840
2841 if (property.indexOf('Moz') > -1) {
2842 return mozOutput;
2843 }
2844
2845 style['Webkit' + (0, _capitalizeString2.default)(property)] = webkitOutput;
2846 style['Moz' + (0, _capitalizeString2.default)(property)] = mozOutput;
2847 return outputValue;
2848 }
2849}
2850module.exports = exports['default'];
2851
2852/***/ }),
2853/* 24 */
2854/***/ (function(module, exports, __webpack_require__) {
2855
2856"use strict";
2857
2858
2859Object.defineProperty(exports, "__esModule", {
2860 value: true
2861});
2862exports.default = hyphenateProperty;
2863
2864var _hyphenateStyleName = __webpack_require__(25);
2865
2866var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName);
2867
2868function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2869
2870function hyphenateProperty(property) {
2871 return (0, _hyphenateStyleName2.default)(property);
2872}
2873module.exports = exports['default'];
2874
2875/***/ }),
2876/* 25 */
2877/***/ (function(module, exports, __webpack_require__) {
2878
2879"use strict";
2880
2881
2882var uppercasePattern = /[A-Z]/g;
2883var msPattern = /^ms-/;
2884var cache = {};
2885
2886function hyphenateStyleName(string) {
2887 return string in cache
2888 ? cache[string]
2889 : cache[string] = string
2890 .replace(uppercasePattern, '-$&')
2891 .toLowerCase()
2892 .replace(msPattern, '-ms-');
2893}
2894
2895module.exports = hyphenateStyleName;
2896
2897
2898/***/ })
2899/******/ ]);
2900});
2901//# sourceMappingURL=index.js.map
\No newline at end of file