runtime-shared
Advanced tools
Comparing version 0.3.8 to 0.4.0
@@ -37,5 +37,2 @@ module.exports = function() { | ||
/******/ | ||
/******/ // identity function for calling harmony imports with the correct context | ||
/******/ __webpack_require__.i = function(value) { return value; }; | ||
/******/ | ||
/******/ // define getter function for harmony exports | ||
@@ -68,3 +65,3 @@ /******/ __webpack_require__.d = function(exports, name, getter) { | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 10); | ||
/******/ return __webpack_require__(__webpack_require__.s = 2); | ||
/******/ }) | ||
@@ -402,13 +399,35 @@ /************************************************************************/ | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var FontFace = function FontFace(family, source) { | ||
_classCallCheck(this, FontFace); | ||
this.family = family; | ||
this.source = source; | ||
module.exports = { | ||
get Promise() { | ||
return __webpack_require__(3); | ||
}, | ||
get Symbol() { | ||
return __webpack_require__(0); | ||
}, | ||
get Map() { | ||
return __webpack_require__(4); | ||
}, | ||
get Set() { | ||
return __webpack_require__(5); | ||
}, | ||
get WeakMap() { | ||
return __webpack_require__(6); | ||
}, | ||
get WeakSet() { | ||
return __webpack_require__(7); | ||
}, | ||
get FontFace() { | ||
return __webpack_require__(8); | ||
}, | ||
get URL() { | ||
return __webpack_require__(9); | ||
}, | ||
get URLSearchParams() { | ||
return __webpack_require__(1); | ||
}, | ||
get matchMedia() { | ||
return __webpack_require__(10); | ||
} | ||
}; | ||
module.exports = FontFace; | ||
/***/ }), | ||
@@ -421,289 +440,2 @@ /* 3 */ | ||
var _symbol = __webpack_require__(0); | ||
var _symbol2 = _interopRequireDefault(_symbol); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
// Deleted map items mess with iterator pointers, so rather than removing them mark them as deleted. Can't use undefined or null since those both valid keys so use a private symbol. | ||
var undefMarker = (0, _symbol2.default)('undef'); | ||
// NaN cannot be found in an array using indexOf, so we encode NaNs using a private symbol. | ||
/* eslint no-extend-native: "off" */ | ||
var NaNMarker = (0, _symbol2.default)('NaN'); | ||
var ACCESSOR_SUPPORT = true; | ||
function encodeKey(key) { | ||
return Number.isNaN(key) ? NaNMarker : key; | ||
} | ||
function decodeKey(encodedKey) { | ||
return encodedKey === NaNMarker ? NaN : encodedKey; | ||
} | ||
function makeIterator(mapInst, getter) { | ||
var nextIdx = 0; | ||
var done = false; | ||
return { | ||
next: function next() { | ||
if (nextIdx === mapInst._keys.length) done = true; | ||
if (!done) { | ||
while (mapInst._keys[nextIdx] === undefMarker) { | ||
nextIdx++; | ||
}return { value: getter.call(mapInst, nextIdx++), done: false }; | ||
} else { | ||
return { value: void 0, done: true }; | ||
} | ||
} | ||
}; | ||
} | ||
function calcSize(mapInst) { | ||
var size = 0; | ||
for (var i = 0, s = mapInst._keys.length; i < s; i++) { | ||
if (mapInst._keys[i] !== undefMarker) size++; | ||
} | ||
return size; | ||
} | ||
function hasProtoMethod(instance, method) { | ||
return typeof instance[method] === 'function'; | ||
} | ||
var Map = function Map(data) { | ||
this._keys = []; | ||
this._values = []; | ||
// If `data` is iterable (indicated by presence of a forEach method), pre-populate the map | ||
if (data && hasProtoMethod(data, 'forEach')) { | ||
// Fastpath: If `data` is a Map, shortcircuit all following the checks | ||
if (data instanceof Map || | ||
// If `data` is not an instance of Map, it could be because you have a Map from an iframe or a worker or something. | ||
// Check if `data` has all the `Map` methods and if so, assume data is another Map | ||
hasProtoMethod(data, 'clear') && hasProtoMethod(data, 'delete') && hasProtoMethod(data, 'entries') && hasProtoMethod(data, 'forEach') && hasProtoMethod(data, 'get') && hasProtoMethod(data, 'has') && hasProtoMethod(data, 'keys') && hasProtoMethod(data, 'set') && hasProtoMethod(data, 'values')) { | ||
data.forEach(function (value, key) { | ||
this.set.apply(this, [key, value]); | ||
}, this); | ||
} else { | ||
data.forEach(function (item) { | ||
this.set.apply(this, item); | ||
}, this); | ||
} | ||
} | ||
if (!ACCESSOR_SUPPORT) this.size = calcSize(this); | ||
}; | ||
Map.prototype = {}; | ||
// Some old engines do not support ES5 getters/setters. Since Map only requires these for the size property, we can fall back to setting the size property statically each time the size of the map changes. | ||
try { | ||
Object.defineProperty(Map.prototype, 'size', { | ||
get: function get() { | ||
return calcSize(this); | ||
} | ||
}); | ||
} catch (e) { | ||
ACCESSOR_SUPPORT = false; | ||
} | ||
Map.prototype.get = function (key) { | ||
var idx = this._keys.indexOf(encodeKey(key)); | ||
return idx !== -1 ? this._values[idx] : undefined; | ||
}; | ||
Map.prototype.set = function (key, value) { | ||
var idx = this._keys.indexOf(encodeKey(key)); | ||
if (idx !== -1) { | ||
this._values[idx] = value; | ||
} else { | ||
this._keys.push(encodeKey(key)); | ||
this._values.push(value); | ||
if (!ACCESSOR_SUPPORT) this.size = calcSize(this); | ||
} | ||
return this; | ||
}; | ||
Map.prototype.has = function (key) { | ||
return this._keys.indexOf(encodeKey(key)) !== -1; | ||
}; | ||
Map.prototype.delete = function (key) { | ||
var idx = this._keys.indexOf(encodeKey(key)); | ||
if (idx === -1) return false; | ||
this._keys[idx] = undefMarker; | ||
this._values[idx] = undefMarker; | ||
if (!ACCESSOR_SUPPORT) this.size = calcSize(this); | ||
return true; | ||
}; | ||
Map.prototype.clear = function () { | ||
this._keys = this._values = []; | ||
if (!ACCESSOR_SUPPORT) this.size = 0; | ||
}; | ||
Map.prototype.values = function () { | ||
return makeIterator(this, function (i) { | ||
return this._values[i]; | ||
}); | ||
}; | ||
Map.prototype.keys = function () { | ||
return makeIterator(this, function (i) { | ||
return decodeKey(this._keys[i]); | ||
}); | ||
}; | ||
Map.prototype.entries = Map.prototype[_symbol2.default.iterator] = function () { | ||
return makeIterator(this, function (i) { | ||
return [decodeKey(this._keys[i]), this._values[i]]; | ||
}); | ||
}; | ||
Map.prototype.forEach = function (callbackFn, thisArg) { | ||
thisArg = thisArg || global; | ||
var iterator = this.entries(); | ||
var result = iterator.next(); | ||
while (result.done === false) { | ||
callbackFn.call(thisArg, result.value[1], result.value[0], this); | ||
result = iterator.next(); | ||
} | ||
}; | ||
Map.prototype[_symbol2.default.species] = Map; | ||
Object.defineProperty(Map, 'constructor', { | ||
value: Map | ||
}); | ||
try { | ||
Object.defineProperty(Map, 'length', { | ||
value: 0 | ||
}); | ||
} catch (e) {} | ||
module.exports = Map; | ||
/***/ }), | ||
/* 4 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
// https://github.com/ericf/css-mediaquery | ||
var RE_MEDIA_QUERY = /^(?:(only|not)?\s*([_a-z][_a-z0-9-]*)|(\([^\)]+\)))(?:\s*and\s*(.*))?$/i, | ||
RE_MQ_EXPRESSION = /^\(\s*([_a-z-][_a-z0-9-]*)\s*(?:\:\s*([^\)]+))?\s*\)$/, | ||
RE_MQ_FEATURE = /^(?:(min|max)-)?(.+)/; | ||
function _matches(media, values) { | ||
return _parseQuery(media).some(function (query) { | ||
var inverse = query.inverse; | ||
var typeMatch = query.type === 'all' || values.type === query.type; | ||
if (typeMatch && inverse || !(typeMatch || inverse)) { | ||
return false; | ||
} | ||
var expressionsMatch = query.expressions.every(function (expression) { | ||
var feature = expression.feature, | ||
modifier = expression.modifier, | ||
expValue = expression.value, | ||
value = values[feature]; | ||
if (!value) { | ||
return false; | ||
} | ||
switch (feature) { | ||
case 'width': | ||
case 'height': | ||
expValue = parseFloat(expValue); | ||
value = parseFloat(value); | ||
break; | ||
} | ||
switch (modifier) { | ||
case 'min': | ||
return value >= expValue; | ||
case 'max': | ||
return value <= expValue; | ||
default: | ||
return value === expValue; | ||
} | ||
}); | ||
return expressionsMatch && !inverse || !expressionsMatch && inverse; | ||
}); | ||
}; | ||
function _parseQuery(media) { | ||
return media.split(',').map(function (query) { | ||
query = query.trim(); | ||
var captures = query.match(RE_MEDIA_QUERY); | ||
if (!captures) { | ||
throw new SyntaxError('Invalid CSS media query: "' + query + '"'); | ||
} | ||
var modifier = captures[1], | ||
type = captures[2], | ||
expressions = ((captures[3] || '') + (captures[4] || '')).trim(), | ||
parsed = {}; | ||
parsed.inverse = !!modifier && modifier.toLowerCase() === 'not'; | ||
parsed.type = type ? type.toLowerCase() : 'all'; | ||
if (!expressions) { | ||
parsed.expressions = []; | ||
return parsed; | ||
} | ||
expressions = expressions.match(/\([^\)]+\)/g); | ||
if (!expressions) { | ||
throw new SyntaxError('Invalid CSS media query: "' + query + '"'); | ||
} | ||
parsed.expressions = expressions.map(function (expression) { | ||
var captures = expression.match(RE_MQ_EXPRESSION); | ||
if (!captures) { | ||
throw new SyntaxError('Invalid CSS media query: "' + query + '"'); | ||
} | ||
var feature = captures[1].toLowerCase().match(RE_MQ_FEATURE); | ||
return { | ||
modifier: feature[1], | ||
feature: feature[2], | ||
value: captures[2] | ||
}; | ||
}); | ||
return parsed; | ||
}); | ||
}; | ||
function matchMedia(media) { | ||
var mql = { | ||
matches: false, | ||
media: media | ||
}; | ||
if (media === '') { | ||
mql.matches = true; | ||
return mql; | ||
} | ||
mql.matches = _matches(media, { | ||
type: 'screen', | ||
width: window.screen.width, | ||
height: window.screen.height | ||
}); | ||
return mql; | ||
} | ||
module.exports = matchMedia; | ||
/***/ }), | ||
/* 5 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
var _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; }; | ||
@@ -934,3 +666,3 @@ | ||
/***/ }), | ||
/* 6 */ | ||
/* 4 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -949,3 +681,164 @@ | ||
var undefMarker = (0, _symbol2.default)('undef'); | ||
// NaN cannot be found in an array using indexOf, so we encode NaNs using a private symbol. | ||
/* eslint no-extend-native: "off" */ | ||
var NaNMarker = (0, _symbol2.default)('NaN'); | ||
var ACCESSOR_SUPPORT = true; | ||
function encodeKey(key) { | ||
return Number.isNaN(key) ? NaNMarker : key; | ||
} | ||
function decodeKey(encodedKey) { | ||
return encodedKey === NaNMarker ? NaN : encodedKey; | ||
} | ||
function makeIterator(mapInst, getter) { | ||
var nextIdx = 0; | ||
var done = false; | ||
return { | ||
next: function next() { | ||
if (nextIdx === mapInst._keys.length) done = true; | ||
if (!done) { | ||
while (mapInst._keys[nextIdx] === undefMarker) { | ||
nextIdx++; | ||
}return { value: getter.call(mapInst, nextIdx++), done: false }; | ||
} else { | ||
return { value: void 0, done: true }; | ||
} | ||
} | ||
}; | ||
} | ||
function calcSize(mapInst) { | ||
var size = 0; | ||
for (var i = 0, s = mapInst._keys.length; i < s; i++) { | ||
if (mapInst._keys[i] !== undefMarker) size++; | ||
} | ||
return size; | ||
} | ||
function hasProtoMethod(instance, method) { | ||
return typeof instance[method] === 'function'; | ||
} | ||
var Map = function Map(data) { | ||
this._keys = []; | ||
this._values = []; | ||
// If `data` is iterable (indicated by presence of a forEach method), pre-populate the map | ||
if (data && hasProtoMethod(data, 'forEach')) { | ||
// Fastpath: If `data` is a Map, shortcircuit all following the checks | ||
if (data instanceof Map || | ||
// If `data` is not an instance of Map, it could be because you have a Map from an iframe or a worker or something. | ||
// Check if `data` has all the `Map` methods and if so, assume data is another Map | ||
hasProtoMethod(data, 'clear') && hasProtoMethod(data, 'delete') && hasProtoMethod(data, 'entries') && hasProtoMethod(data, 'forEach') && hasProtoMethod(data, 'get') && hasProtoMethod(data, 'has') && hasProtoMethod(data, 'keys') && hasProtoMethod(data, 'set') && hasProtoMethod(data, 'values')) { | ||
data.forEach(function (value, key) { | ||
this.set.apply(this, [key, value]); | ||
}, this); | ||
} else { | ||
data.forEach(function (item) { | ||
this.set.apply(this, item); | ||
}, this); | ||
} | ||
} | ||
if (!ACCESSOR_SUPPORT) this.size = calcSize(this); | ||
}; | ||
Map.prototype = {}; | ||
// Some old engines do not support ES5 getters/setters. Since Map only requires these for the size property, we can fall back to setting the size property statically each time the size of the map changes. | ||
try { | ||
Object.defineProperty(Map.prototype, 'size', { | ||
get: function get() { | ||
return calcSize(this); | ||
} | ||
}); | ||
} catch (e) { | ||
ACCESSOR_SUPPORT = false; | ||
} | ||
Map.prototype.get = function (key) { | ||
var idx = this._keys.indexOf(encodeKey(key)); | ||
return idx !== -1 ? this._values[idx] : undefined; | ||
}; | ||
Map.prototype.set = function (key, value) { | ||
var idx = this._keys.indexOf(encodeKey(key)); | ||
if (idx !== -1) { | ||
this._values[idx] = value; | ||
} else { | ||
this._keys.push(encodeKey(key)); | ||
this._values.push(value); | ||
if (!ACCESSOR_SUPPORT) this.size = calcSize(this); | ||
} | ||
return this; | ||
}; | ||
Map.prototype.has = function (key) { | ||
return this._keys.indexOf(encodeKey(key)) !== -1; | ||
}; | ||
Map.prototype.delete = function (key) { | ||
var idx = this._keys.indexOf(encodeKey(key)); | ||
if (idx === -1) return false; | ||
this._keys[idx] = undefMarker; | ||
this._values[idx] = undefMarker; | ||
if (!ACCESSOR_SUPPORT) this.size = calcSize(this); | ||
return true; | ||
}; | ||
Map.prototype.clear = function () { | ||
this._keys = this._values = []; | ||
if (!ACCESSOR_SUPPORT) this.size = 0; | ||
}; | ||
Map.prototype.values = function () { | ||
return makeIterator(this, function (i) { | ||
return this._values[i]; | ||
}); | ||
}; | ||
Map.prototype.keys = function () { | ||
return makeIterator(this, function (i) { | ||
return decodeKey(this._keys[i]); | ||
}); | ||
}; | ||
Map.prototype.entries = Map.prototype[_symbol2.default.iterator] = function () { | ||
return makeIterator(this, function (i) { | ||
return [decodeKey(this._keys[i]), this._values[i]]; | ||
}); | ||
}; | ||
Map.prototype.forEach = function (callbackFn, thisArg) { | ||
thisArg = thisArg || global; | ||
var iterator = this.entries(); | ||
var result = iterator.next(); | ||
while (result.done === false) { | ||
callbackFn.call(thisArg, result.value[1], result.value[0], this); | ||
result = iterator.next(); | ||
} | ||
}; | ||
Map.prototype[_symbol2.default.species] = Map; | ||
Object.defineProperty(Map, 'constructor', { | ||
value: Map | ||
}); | ||
try { | ||
Object.defineProperty(Map, 'length', { | ||
value: 0 | ||
}); | ||
} catch (e) {} | ||
module.exports = Map; | ||
/***/ }), | ||
/* 5 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
var _symbol = __webpack_require__(0); | ||
var _symbol2 = _interopRequireDefault(_symbol); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
// Deleted map items mess with iterator pointers, so rather than removing them mark them as deleted. Can't use undefined or null since those both valid keys so use a private symbol. | ||
var undefMarker = (0, _symbol2.default)('undef'); | ||
// NaN cannot be found in an array using indexOf, so we encode NaNs using a private symbol. | ||
@@ -1067,2 +960,53 @@ /* eslint no-extend-native: "off" */ | ||
/***/ }), | ||
/* 6 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
var _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; }; | ||
/* eslint no-extend-native: "off" */ | ||
var defineProperty = Object.defineProperty; | ||
var counter = Date.now() % 1e9; | ||
var WeakMap = function WeakMap(data) { | ||
this.name = '__st' + (Math.random() * 1e9 >>> 0) + (counter++ + '__'); | ||
// If data is iterable (indicated by presence of a forEach method), pre-populate the map | ||
data && data.forEach && data.forEach(function (item) { | ||
this.set.apply(this, item); | ||
}, this); | ||
}; | ||
WeakMap.prototype.set = function (key, value) { | ||
if ((typeof key === 'undefined' ? 'undefined' : _typeof(key)) !== 'object' && typeof key !== 'function') throw new TypeError('Invalid value used as weak map key'); | ||
var entry = key[this.name]; | ||
if (entry && entry[0] === key) entry[1] = value;else defineProperty(key, this.name, { value: [key, value], writable: true }); | ||
return this; | ||
}; | ||
WeakMap.prototype.get = function (key) { | ||
var entry; | ||
return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined; | ||
}; | ||
WeakMap.prototype.delete = function (key) { | ||
var entry = key[this.name]; | ||
if (!entry || entry[0] !== key) return false; | ||
entry[0] = entry[1] = undefined; | ||
return true; | ||
}; | ||
WeakMap.prototype.has = function (key) { | ||
var entry = key[this.name]; | ||
if (!entry) return false; | ||
return entry[0] === key; | ||
}; | ||
module.exports = WeakMap; | ||
/***/ }), | ||
/* 7 */ | ||
@@ -1074,2 +1018,54 @@ /***/ (function(module, exports, __webpack_require__) { | ||
/* eslint no-extend-native: "off" */ | ||
var counter = Date.now() % 1e9; | ||
var WeakSet = function WeakSet(data) { | ||
this.name = '__st' + (Math.random() * 1e9 >>> 0) + (counter++ + '__'); | ||
data && data.forEach && data.forEach(this.add, this); | ||
}; | ||
WeakSet.prototype.add = function (obj) { | ||
var name = this.name; | ||
if (!obj[name]) Object.defineProperty(obj, name, { value: true, writable: true }); | ||
return this; | ||
}; | ||
WeakSet.prototype.delete = function (obj) { | ||
if (!obj[this.name]) return false; | ||
obj[this.name] = undefined; | ||
return true; | ||
}; | ||
WeakSet.prototype.has = function (obj) { | ||
return !!obj[this.name]; | ||
}; | ||
module.exports = WeakSet; | ||
/***/ }), | ||
/* 8 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var FontFace = function FontFace(family, source) { | ||
_classCallCheck(this, FontFace); | ||
this.family = family; | ||
this.source = source; | ||
}; | ||
module.exports = FontFace; | ||
/***/ }), | ||
/* 9 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
// https://github.com/Polymer/URL | ||
@@ -1638,3 +1634,3 @@ | ||
/***/ }), | ||
/* 8 */ | ||
/* 10 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1645,121 +1641,122 @@ | ||
var _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; }; | ||
// https://github.com/ericf/css-mediaquery | ||
/* eslint no-extend-native: "off" */ | ||
var RE_MEDIA_QUERY = /^(?:(only|not)?\s*([_a-z][_a-z0-9-]*)|(\([^\)]+\)))(?:\s*and\s*(.*))?$/i, | ||
RE_MQ_EXPRESSION = /^\(\s*([_a-z-][_a-z0-9-]*)\s*(?:\:\s*([^\)]+))?\s*\)$/, | ||
RE_MQ_FEATURE = /^(?:(min|max)-)?(.+)/; | ||
var defineProperty = Object.defineProperty; | ||
var counter = Date.now() % 1e9; | ||
function _matches(media, values) { | ||
return _parseQuery(media).some(function (query) { | ||
var inverse = query.inverse; | ||
var WeakMap = function WeakMap(data) { | ||
this.name = '__st' + (Math.random() * 1e9 >>> 0) + (counter++ + '__'); | ||
var typeMatch = query.type === 'all' || values.type === query.type; | ||
// If data is iterable (indicated by presence of a forEach method), pre-populate the map | ||
data && data.forEach && data.forEach(function (item) { | ||
this.set.apply(this, item); | ||
}, this); | ||
}; | ||
if (typeMatch && inverse || !(typeMatch || inverse)) { | ||
return false; | ||
} | ||
WeakMap.prototype.set = function (key, value) { | ||
if ((typeof key === 'undefined' ? 'undefined' : _typeof(key)) !== 'object' && typeof key !== 'function') throw new TypeError('Invalid value used as weak map key'); | ||
var expressionsMatch = query.expressions.every(function (expression) { | ||
var feature = expression.feature, | ||
modifier = expression.modifier, | ||
expValue = expression.value, | ||
value = values[feature]; | ||
var entry = key[this.name]; | ||
if (entry && entry[0] === key) entry[1] = value;else defineProperty(key, this.name, { value: [key, value], writable: true }); | ||
return this; | ||
}; | ||
if (!value) { | ||
return false; | ||
} | ||
WeakMap.prototype.get = function (key) { | ||
var entry; | ||
return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined; | ||
}; | ||
switch (feature) { | ||
case 'width': | ||
case 'height': | ||
expValue = parseFloat(expValue); | ||
value = parseFloat(value); | ||
break; | ||
} | ||
WeakMap.prototype.delete = function (key) { | ||
var entry = key[this.name]; | ||
if (!entry || entry[0] !== key) return false; | ||
entry[0] = entry[1] = undefined; | ||
return true; | ||
}; | ||
switch (modifier) { | ||
case 'min': | ||
return value >= expValue; | ||
case 'max': | ||
return value <= expValue; | ||
default: | ||
return value === expValue; | ||
} | ||
}); | ||
WeakMap.prototype.has = function (key) { | ||
var entry = key[this.name]; | ||
if (!entry) return false; | ||
return entry[0] === key; | ||
return expressionsMatch && !inverse || !expressionsMatch && inverse; | ||
}); | ||
}; | ||
module.exports = WeakMap; | ||
function _parseQuery(media) { | ||
return media.split(',').map(function (query) { | ||
query = query.trim(); | ||
/***/ }), | ||
/* 9 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var captures = query.match(RE_MEDIA_QUERY); | ||
"use strict"; | ||
if (!captures) { | ||
throw new SyntaxError('Invalid CSS media query: "' + query + '"'); | ||
} | ||
var modifier = captures[1], | ||
type = captures[2], | ||
expressions = ((captures[3] || '') + (captures[4] || '')).trim(), | ||
parsed = {}; | ||
/* eslint no-extend-native: "off" */ | ||
parsed.inverse = !!modifier && modifier.toLowerCase() === 'not'; | ||
parsed.type = type ? type.toLowerCase() : 'all'; | ||
var counter = Date.now() % 1e9; | ||
if (!expressions) { | ||
parsed.expressions = []; | ||
return parsed; | ||
} | ||
var WeakSet = function WeakSet(data) { | ||
this.name = '__st' + (Math.random() * 1e9 >>> 0) + (counter++ + '__'); | ||
data && data.forEach && data.forEach(this.add, this); | ||
}; | ||
expressions = expressions.match(/\([^\)]+\)/g); | ||
WeakSet.prototype.add = function (obj) { | ||
var name = this.name; | ||
if (!obj[name]) Object.defineProperty(obj, name, { value: true, writable: true }); | ||
return this; | ||
}; | ||
if (!expressions) { | ||
throw new SyntaxError('Invalid CSS media query: "' + query + '"'); | ||
} | ||
WeakSet.prototype.delete = function (obj) { | ||
if (!obj[this.name]) return false; | ||
obj[this.name] = undefined; | ||
return true; | ||
}; | ||
parsed.expressions = expressions.map(function (expression) { | ||
var captures = expression.match(RE_MQ_EXPRESSION); | ||
WeakSet.prototype.has = function (obj) { | ||
return !!obj[this.name]; | ||
}; | ||
if (!captures) { | ||
throw new SyntaxError('Invalid CSS media query: "' + query + '"'); | ||
} | ||
module.exports = WeakSet; | ||
var feature = captures[1].toLowerCase().match(RE_MQ_FEATURE); | ||
/***/ }), | ||
/* 10 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
return { | ||
modifier: feature[1], | ||
feature: feature[2], | ||
value: captures[2] | ||
}; | ||
}); | ||
"use strict"; | ||
return parsed; | ||
}); | ||
}; | ||
function matchMedia(media) { | ||
var mql = { | ||
matches: false, | ||
media: media | ||
}; | ||
module.exports = { | ||
get Promise() { | ||
return __webpack_require__(5); | ||
}, | ||
get Symbol() { | ||
return __webpack_require__(0); | ||
}, | ||
get Map() { | ||
return __webpack_require__(3); | ||
}, | ||
get Set() { | ||
return __webpack_require__(6); | ||
}, | ||
get WeakMap() { | ||
return __webpack_require__(8); | ||
}, | ||
get WeakSet() { | ||
return __webpack_require__(9); | ||
}, | ||
get FontFace() { | ||
return __webpack_require__(2); | ||
}, | ||
get URL() { | ||
return __webpack_require__(7); | ||
}, | ||
get URLSearchParams() { | ||
return __webpack_require__(1); | ||
}, | ||
get matchMedia() { | ||
return __webpack_require__(4); | ||
if (media === '') { | ||
mql.matches = true; | ||
return mql; | ||
} | ||
}; | ||
mql.matches = _matches(media, { | ||
type: 'screen', | ||
width: window.screen.width, | ||
height: window.screen.height | ||
}); | ||
return mql; | ||
} | ||
module.exports = matchMedia; | ||
/***/ }) | ||
/******/ ])};; |
{ | ||
"name": "runtime-shared", | ||
"version": "0.3.8", | ||
"version": "0.4.0", | ||
"description": "Shared Runtime.", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
230008
4355