You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.4 KiB

4 years ago
  1. "use strict";
  2. function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
  3. function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
  4. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  5. var Value = require('../value');
  6. var ImageSet =
  7. /*#__PURE__*/
  8. function (_Value) {
  9. _inheritsLoose(ImageSet, _Value);
  10. function ImageSet() {
  11. return _Value.apply(this, arguments) || this;
  12. }
  13. var _proto = ImageSet.prototype;
  14. /**
  15. * Use non-standard name for WebKit and Firefox
  16. */
  17. _proto.replace = function replace(string, prefix) {
  18. var fixed = _Value.prototype.replace.call(this, string, prefix);
  19. if (prefix === '-webkit-') {
  20. fixed = fixed.replace(/("[^"]+"|'[^']+')(\s+\d+\w)/gi, 'url($1)$2');
  21. }
  22. return fixed;
  23. };
  24. return ImageSet;
  25. }(Value);
  26. _defineProperty(ImageSet, "names", ['image-set']);
  27. module.exports = ImageSet;