ivue-material
Version:
A high quality UI components Library with Vue.js
1,707 lines (1,388 loc) • 1.05 MB
JavaScript
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("vue"));
else if(typeof define === 'function' && define.amd)
define("ivue", ["vue"], factory);
else if(typeof exports === 'object')
exports["ivue"] = factory(require("vue"));
else
root["ivue"] = factory(root["Vue"]);
})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_38__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/dist/";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 284);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(293);
/***/ }),
/* 1 */
/***/ (function(module, exports) {
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
module.exports = _interopRequireDefault;
/***/ }),
/* 2 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = normalizeComponent;
/* globals __VUE_SSR_CONTEXT__ */
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.
function normalizeComponent (
scriptExports,
render,
staticRenderFns,
functionalTemplate,
injectStyles,
scopeId,
moduleIdentifier, /* server only */
shadowMode /* vue-cli only */
) {
scriptExports = scriptExports || {}
// ES6 modules interop
var type = typeof scriptExports.default
if (type === 'object' || type === 'function') {
scriptExports = scriptExports.default
}
// Vue.extend constructor export interop
var options = typeof scriptExports === 'function'
? scriptExports.options
: scriptExports
// render functions
if (render) {
options.render = render
options.staticRenderFns = staticRenderFns
options._compiled = true
}
// functional template
if (functionalTemplate) {
options.functional = true
}
// scopedId
if (scopeId) {
options._scopeId = scopeId
}
var hook
if (moduleIdentifier) { // server build
hook = function (context) {
// 2.3 injection
context =
context || // cached call
(this.$vnode && this.$vnode.ssrContext) || // stateful
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
// 2.2 with runInNewContext: true
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
context = __VUE_SSR_CONTEXT__
}
// inject component styles
if (injectStyles) {
injectStyles.call(this, context)
}
// register component module identifier for async chunk inferrence
if (context && context._registeredComponents) {
context._registeredComponents.add(moduleIdentifier)
}
}
// used by ssr in case component is cached and beforeCreate
// never gets called
options._ssrRegister = hook
} else if (injectStyles) {
hook = shadowMode
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
: injectStyles
}
if (hook) {
if (options.functional) {
// for template-only hot-reload because in that case the render fn doesn't
// go through the normalizer
options._injectStyles = hook
// register for functioal component in vue file
var originalRender = options.render
options.render = function renderWithStyleInjection (h, context) {
hook.call(context)
return originalRender(h, context)
}
} else {
// inject component registration as beforeCreate hook
var existing = options.beforeCreate
options.beforeCreate = existing
? [].concat(existing, hook)
: [hook]
}
}
return {
exports: scriptExports,
options: options
}
}
/***/ }),
/* 3 */
/***/ (function(module, exports) {
function _newArrowCheck(innerThis, boundThis) {
if (innerThis !== boundThis) {
throw new TypeError("Cannot instantiate an arrow function");
}
}
module.exports = _newArrowCheck;
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
var _Object$defineProperty = __webpack_require__(0);
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;
}
module.exports = _defineProperty;
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(39);
var global = __webpack_require__(21);
var isForced = __webpack_require__(109);
var redefine = __webpack_require__(49);
var has = __webpack_require__(40);
var classof = __webpack_require__(59);
var inheritIfRequired = __webpack_require__(175);
var toPrimitive = __webpack_require__(83);
var fails = __webpack_require__(19);
var create = __webpack_require__(124);
var getOwnPropertyNames = __webpack_require__(106).f;
var getOwnPropertyDescriptor = __webpack_require__(99).f;
var defineProperty = __webpack_require__(41).f;
var trim = __webpack_require__(177).trim;
var NUMBER = 'Number';
var NativeNumber = global[NUMBER];
var NumberPrototype = NativeNumber.prototype;
// Opera ~12 has broken Object#toString
var BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;
// `ToNumber` abstract operation
// https://tc39.github.io/ecma262/#sec-tonumber
var toNumber = function (argument) {
var it = toPrimitive(argument, false);
var first, third, radix, maxCode, digits, length, index, code;
if (typeof it == 'string' && it.length > 2) {
it = trim(it);
first = it.charCodeAt(0);
if (first === 43 || first === 45) {
third = it.charCodeAt(2);
if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
} else if (first === 48) {
switch (it.charCodeAt(1)) {
case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
default: return +it;
}
digits = it.slice(2);
length = digits.length;
for (index = 0; index < length; index++) {
code = digits.charCodeAt(index);
// parseInt parses a string to a first unavailable symbol
// but ToNumber should return NaN if a string contains unavailable symbols
if (code < 48 || code > maxCode) return NaN;
} return parseInt(digits, radix);
}
} return +it;
};
// `Number` constructor
// https://tc39.github.io/ecma262/#sec-number-constructor
if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
var NumberWrapper = function Number(value) {
var it = arguments.length < 1 ? 0 : value;
var dummy = this;
return dummy instanceof NumberWrapper
// check on 1..constructor(foo) case
&& (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)
? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);
};
for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (
// ES3:
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
// ES2015 (in case, if modules with ES2015 Number statics required before):
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
).split(','), j = 0, key; keys.length > j; j++) {
if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {
defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));
}
}
NumberWrapper.prototype = NumberPrototype;
NumberPrototype.constructor = NumberWrapper;
redefine(global, NUMBER, NumberWrapper);
}
/***/ }),
/* 6 */
/***/ (function(module, exports) {
var core = module.exports = { version: '2.6.9' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(21);
var DOMIterables = __webpack_require__(163);
var forEach = __webpack_require__(292);
var hide = __webpack_require__(35);
for (var COLLECTION_NAME in DOMIterables) {
var Collection = global[COLLECTION_NAME];
var CollectionPrototype = Collection && Collection.prototype;
// some Chrome versions have non-configurable methods on DOMTokenList
if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
hide(CollectionPrototype, 'forEach', forEach);
} catch (error) {
CollectionPrototype.forEach = forEach;
}
}
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(15);
var fails = __webpack_require__(19);
var isArray = __webpack_require__(87);
var isObject = __webpack_require__(34);
var toObject = __webpack_require__(51);
var toLength = __webpack_require__(25);
var createProperty = __webpack_require__(137);
var arraySpeciesCreate = __webpack_require__(86);
var arrayMethodHasSpeciesSupport = __webpack_require__(65);
var wellKnownSymbol = __webpack_require__(17);
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {
var array = [];
array[IS_CONCAT_SPREADABLE] = false;
return array.concat()[0] !== array;
});
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
var isConcatSpreadable = function (O) {
if (!isObject(O)) return false;
var spreadable = O[IS_CONCAT_SPREADABLE];
return spreadable !== undefined ? !!spreadable : isArray(O);
};
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
// `Array.prototype.concat` method
// https://tc39.github.io/ecma262/#sec-array.prototype.concat
// with adding support of @@isConcatSpreadable and @@species
$({ target: 'Array', proto: true, forced: FORCED }, {
concat: function concat(arg) { // eslint-disable-line no-unused-vars
var O = toObject(this);
var A = arraySpeciesCreate(O, 0);
var n = 0;
var i, k, length, len, E;
for (i = -1, length = arguments.length; i < length; i++) {
E = i === -1 ? O : arguments[i];
if (isConcatSpreadable(E)) {
len = toLength(E.length);
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
} else {
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
createProperty(A, n++, E);
}
}
A.length = n;
return A;
}
});
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(39);
var defineProperty = __webpack_require__(41).f;
var FunctionPrototype = Function.prototype;
var FunctionPrototypeToString = FunctionPrototype.toString;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';
// Function instances `.name` property
// https://tc39.github.io/ecma262/#sec-function-instances-name
if (DESCRIPTORS && !(NAME in FunctionPrototype)) {
defineProperty(FunctionPrototype, NAME, {
configurable: true,
get: function () {
try {
return FunctionPrototypeToString.call(this).match(nameRE)[1];
} catch (error) {
return '';
}
}
});
}
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(16);
var core = __webpack_require__(6);
var ctx = __webpack_require__(66);
var hide = __webpack_require__(52);
var has = __webpack_require__(54);
var PROTOTYPE = 'prototype';
var $export = function (type, name, source) {
var IS_FORCED = type & $export.F;
var IS_GLOBAL = type & $export.G;
var IS_STATIC = type & $export.S;
var IS_PROTO = type & $export.P;
var IS_BIND = type & $export.B;
var IS_WRAP = type & $export.W;
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
var expProto = exports[PROTOTYPE];
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
var key, own, out;
if (IS_GLOBAL) source = name;
for (key in source) {
// contains in native
own = !IS_FORCED && target && target[key] !== undefined;
if (own && has(exports, key)) continue;
// export native or passed
out = own ? target[key] : source[key];
// prevent global pollution for namespaces
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
// bind timers to global for call from export context
: IS_BIND && own ? ctx(out, global)
// wrap global constructors for prevent change them in library
: IS_WRAP && target[key] == out ? (function (C) {
var F = function (a, b, c) {
if (this instanceof C) {
switch (arguments.length) {
case 0: return new C();
case 1: return new C(a);
case 2: return new C(a, b);
} return new C(a, b, c);
} return C.apply(this, arguments);
};
F[PROTOTYPE] = C[PROTOTYPE];
return F;
// make static versions for prototype methods
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
// export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
if (IS_PROTO) {
(exports.virtual || (exports.virtual = {}))[key] = out;
// export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
}
}
};
// type bitmap
$export.F = 1; // forced
$export.G = 2; // global
$export.S = 4; // static
$export.P = 8; // proto
$export.B = 16; // bind
$export.W = 32; // wrap
$export.U = 64; // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;
/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
__webpack_require__(8);
__webpack_require__(13);
__webpack_require__(9);
__webpack_require__(30);
__webpack_require__(43);
__webpack_require__(94);
__webpack_require__(31);
var _Object$defineProperty = __webpack_require__(0);
_Object$defineProperty(exports, "__esModule", {
value: true
});
exports.oneOf = oneOf;
exports.getStyle = getStyle;
exports.hasClass = hasClass;
exports.addClass = addClass;
exports.removeClass = removeClass;
exports.findComponentsDownward = findComponentsDownward;
exports.findComponentUpward = findComponentUpward;
exports.getScrollBarSize = exports.deepCopy = exports.typeOf = void 0;
var _newArrowCheck2 = _interopRequireDefault(__webpack_require__(3));
var _vue = _interopRequireDefault(__webpack_require__(38));
var _this2 = void 0;
var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
var MOZ_HACK_REGEXP = /^moz([A-Z])/;
var isServer = _vue.default.prototype.$isServer;
function camelCase(name) {
return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
return offset ? letter.toUpperCase() : letter;
}).replace(MOZ_HACK_REGEXP, 'Moz$1');
}
function oneOf(value, validList) {
for (var i = 0; i < validList.length; i++) {
if (value === validList[i]) {
return true;
}
}
return false;
}
function getStyle(element, styleName) {
if (!element || !styleName) {
return null;
}
styleName = camelCase(styleName);
if (styleName === 'float') {
styleName = 'cssFloat';
}
try {
var computed = document.defaultView.getComputedStyle(element, '');
return element.style[styleName] || computed ? computed[styleName] : null;
} catch (e) {
return element.style[styleName];
}
}
function hasClass(el, cls) {
if (!el || !cls) return false;
if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
if (el.classList) {
return el.classList.contains(cls);
} else {
return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
}
}
function addClass(el, cls) {
if (!el) return;
var curClass = el.className;
var classes = (cls || '').split(' ');
for (var i = 0, j = classes.length; i < j; i++) {
var clsName = classes[i];
if (!clsName) continue;
if (el.classList) {
el.classList.add(clsName);
} else {
if (!hasClass(el, clsName)) {
curClass += ' ' + clsName;
}
}
}
if (!el.classList) {
el.className = curClass;
}
}
function removeClass(el, cls) {
if (!el || !cls) return;
var classes = cls.split(' ');
var curClass = ' ' + el.className + ' ';
for (var i = 0, j = classes.length; i < j; i++) {
var clsName = classes[i];
if (!clsName) continue;
if (el.classList) {
el.classList.remove(clsName);
} else {
if (hasClass(el, clsName)) {
curClass = curClass.replace(' ' + clsName + ' ', ' ');
}
}
}
if (!el.classList) {
el.className = trim(curClass);
}
}
function findComponentsDownward(context, componentName) {
var _this = this;
return context.$children.reduce(function (components, child) {
(0, _newArrowCheck2.default)(this, _this);
if (child.$options.name === componentName) {
components.push(child);
}
var foundChilds = findComponentsDownward(child, componentName);
return components.concat(foundChilds);
}.bind(this), []);
}
function findComponentUpward(context, componentName) {
var parent = context.$parent;
var parentName = parent.$options.name;
while (parent && (!parentName || componentName.indexOf(parentName) < 0)) {
parent = parent.$parent;
if (parent) {
parentName = parent.$options.name;
}
}
return parent;
}
var typeOf = function typeOf(obj) {
(0, _newArrowCheck2.default)(this, _this2);
var toString = Object.prototype.toString;
var map = {
'[object Boolean]': 'boolean',
'[object Number]': 'number',
'[object String]': 'string',
'[object Function]': 'function',
'[object Array]': 'array',
'[object Date]': 'date',
'[object RegExp]': 'regExp',
'[object Undefined]': 'undefined',
'[object Null]': 'null',
'[object Object]': 'object'
};
return map[toString.call(obj)];
}.bind(void 0);
exports.typeOf = typeOf;
var _deepCopy = function deepCopy(data) {
(0, _newArrowCheck2.default)(this, _this2);
var t = typeOf(data);
var o;
if (t === 'array') {
o = [];
} else if (t === 'object') {
o = {};
} else {
return data;
}
if (t === 'array') {
for (var i = 0; i < data.length; i++) {
o.push(_deepCopy(data[i]));
}
} else if (t === 'object') {
for (var _i in data) {
o[_i] = _deepCopy(data[_i]);
}
}
return o;
}.bind(void 0);
exports.deepCopy = _deepCopy;
var cached;
var getScrollBarSize = function getScrollBarSize(fresh) {
(0, _newArrowCheck2.default)(this, _this2);
if (isServer) {
return 0;
}
if (fresh || cached === undefined) {
var inner = document.createElement('div');
inner.style.width = '100%';
inner.style.height = '200px';
var outer = document.createElement('div');
var outerStyle = outer.style;
outerStyle.position = 'absolute';
outerStyle.top = 0;
outerStyle.left = 0;
outerStyle.pointerEvents = 'none';
outerStyle.visibility = 'hidden';
outerStyle.width = '200px';
outerStyle.height = '150px';
outerStyle.overflow = 'hidden';
outer.appendChild(inner);
document.body.appendChild(outer);
var widthContained = inner.offsetWidth;
outer.style.overflow = 'scroll';
var widthScroll = inner.offsetWidth;
if (widthContained === widthScroll) {
widthScroll = outer.clientWidth;
}
document.body.removeChild(outer);
cached = widthContained - widthScroll;
}
return cached;
}.bind(void 0);
exports.getScrollBarSize = getScrollBarSize;
/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
__webpack_require__(14);
__webpack_require__(30);
__webpack_require__(43);
__webpack_require__(61);
__webpack_require__(31);
__webpack_require__(73);
__webpack_require__(7);
var _Object$defineProperty2 = __webpack_require__(0);
_Object$defineProperty2(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _defineProperty2 = _interopRequireDefault(__webpack_require__(0));
var _defineProperties = _interopRequireDefault(__webpack_require__(26));
var _getOwnPropertyDescriptors = _interopRequireDefault(__webpack_require__(27));
var _getOwnPropertyDescriptor = _interopRequireDefault(__webpack_require__(28));
var _getOwnPropertySymbols = _interopRequireDefault(__webpack_require__(29));
var _keys = _interopRequireDefault(__webpack_require__(23));
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(55));
var _defineProperty3 = _interopRequireDefault(__webpack_require__(4));
function ownKeys(object, enumerableOnly) { var keys = (0, _keys.default)(object); if (_getOwnPropertySymbols.default) { var symbols = (0, _getOwnPropertySymbols.default)(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return (0, _getOwnPropertyDescriptor.default)(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { (0, _defineProperty3.default)(target, key, source[key]); }); } else if (_getOwnPropertyDescriptors.default) { (0, _defineProperties.default)(target, (0, _getOwnPropertyDescriptors.default)(source)); } else { ownKeys(source).forEach(function (key) { (0, _defineProperty2.default)(target, key, (0, _getOwnPropertyDescriptor.default)(source, key)); }); } } return target; }
function isCssColor(color) {
return !!color && !!color.match(/^(#|(rgb|hsl)a?\()/);
}
var _default = {
name: 'colorable',
props: {
color: {
type: String,
default: ''
}
},
methods: {
setBackgroundColor: function setBackgroundColor(color, data) {
if (isCssColor(color)) {
data.style = _objectSpread({}, data.style, {
'background-color': "".concat(color),
'border-color': "".concat(color)
});
} else if (color) {
data.class = _objectSpread({}, data.class, (0, _defineProperty3.default)({}, color, true));
}
return data;
},
setTextColor: function setTextColor(color, data) {
if (isCssColor(color)) {
data.style = _objectSpread({}, data.style, {
'color': "".concat(color)
});
} else if (color) {
var _color$toString$trim$ = color.toString().trim().split(' ', 2),
_color$toString$trim$2 = (0, _slicedToArray2.default)(_color$toString$trim$, 1),
colorName = _color$toString$trim$2[0];
data.class = _objectSpread({}, data.class, (0, _defineProperty3.default)({}, colorName + '--text', true));
}
return data;
}
}
};
exports.default = _default;
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(15);
var $indexOf = __webpack_require__(107).indexOf;
var sloppyArrayMethod = __webpack_require__(110);
var nativeIndexOf = [].indexOf;
var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
var SLOPPY_METHOD = sloppyArrayMethod('indexOf');
// `Array.prototype.indexOf` method
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || SLOPPY_METHOD }, {
indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
return NEGATIVE_ZERO
// convert -0 to +0
? nativeIndexOf.apply(this, arguments) || 0
: $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(15);
var $filter = __webpack_require__(64).filter;
var arrayMethodHasSpeciesSupport = __webpack_require__(65);
// `Array.prototype.filter` method
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('filter') }, {
filter: function filter(callbackfn /* , thisArg */) {
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(21);
var getOwnPropertyDescriptor = __webpack_require__(99).f;
var hide = __webpack_require__(35);
var redefine = __webpack_require__(49);
var setGlobal = __webpack_require__(101);
var copyConstructorProperties = __webpack_require__(287);
var isForced = __webpack_require__(109);
/*
options.target - name of the target object
options.global - target is the global object
options.stat - export as static methods of target
options.proto - export as prototype methods of target
options.real - real prototype method for the `pure` version
options.forced - export even if the native feature is available
options.bind - bind methods to the target, required for the `pure` version
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
options.unsafe - use the simple assignment of property instead of delete + defineProperty
options.sham - add a flag to not completely full polyfills
options.enumerable - export as enumerable property
options.noTargetGet - prevent calling a getter on target
*/
module.exports = function (options, source) {
var TARGET = options.target;
var GLOBAL = options.global;
var STATIC = options.stat;
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
if (GLOBAL) {
target = global;
} else if (STATIC) {
target = global[TARGET] || setGlobal(TARGET, {});
} else {
target = (global[TARGET] || {}).prototype;
}
if (target) for (key in source) {
sourceProperty = source[key];
if (options.noTargetGet) {
descriptor = getOwnPropertyDescriptor(target, key);
targetProperty = descriptor && descriptor.value;
} else targetProperty = target[key];
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
// contained in target
if (!FORCED && targetProperty !== undefined) {
if (typeof sourceProperty === typeof targetProperty) continue;
copyConstructorProperties(sourceProperty, targetProperty);
}
// add a flag to not completely full polyfills
if (options.sham || (targetProperty && targetProperty.sham)) {
hide(sourceProperty, 'sham', true);
}
// extend global
redefine(target, key, sourceProperty, options);
}
};
/***/ }),
/* 16 */
/***/ (function(module, exports) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
? window : typeof self != 'undefined' && self.Math == Math ? self
// eslint-disable-next-line no-new-func
: Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(21);
var shared = __webpack_require__(84);
var uid = __webpack_require__(159);
var NATIVE_SYMBOL = __webpack_require__(291);
var Symbol = global.Symbol;
var store = shared('wks');
module.exports = function (name) {
return store[name] || (store[name] = NATIVE_SYMBOL && Symbol[name]
|| (NATIVE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};
/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(391);
/***/ }),
/* 19 */
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return !!exec();
} catch (error) {
return true;
}
};
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(15);
var $map = __webpack_require__(64).map;
var arrayMethodHasSpeciesSupport = __webpack_require__(65);
// `Array.prototype.map` method
// https://tc39.github.io/ecma262/#sec-array.prototype.map
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('map') }, {
map: function map(callbackfn /* , thisArg */) {
return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {var O = 'object';
var check = function (it) {
return it && it.Math == Math && it;
};
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
// eslint-disable-next-line no-undef
check(typeof globalThis == O && globalThis) ||
check(typeof window == O && window) ||
check(typeof self == O && self) ||
check(typeof global == O && global) ||
// eslint-disable-next-line no-new-func
Function('return this')();
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(81)))
/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
var store = __webpack_require__(116)('wks');
var uid = __webpack_require__(90);
var Symbol = __webpack_require__(16).Symbol;
var USE_SYMBOL = typeof Symbol == 'function';
var $exports = module.exports = function (name) {
return store[name] || (store[name] =
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};
$exports.store = store;
/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(307);
/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(34);
module.exports = function (it) {
if (!isObject(it)) {
throw TypeError(String(it) + ' is not an object');
} return it;
};
/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(50);
var min = Math.min;
// `ToLength` abstract operation
// https://tc39.github.io/ecma262/#sec-tolength
module.exports = function (argument) {
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};
/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(295);
/***/ }),
/* 27 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(299);
/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(302);
/***/ }),
/* 29 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(304);
/***/ }),
/* 30 */
/***/ (function(module, exports, __webpack_require__) {
var redefine = __webpack_require__(49);
var toString = __webpack_require__(328);
var ObjectPrototype = Object.prototype;
// `Object.prototype.toString` method
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
if (toString !== ObjectPrototype.toString) {
redefine(ObjectPrototype, 'toString', toString, { unsafe: true });
}
/***/ }),
/* 31 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fixRegExpWellKnownSymbolLogic = __webpack_require__(128);
var isRegExp = __webpack_require__(133);
var anObject = __webpack_require__(24);
var requireObjectCoercible = __webpack_require__(33);
var speciesConstructor = __webpack_require__(330);
var advanceStringIndex = __webpack_require__(131);
var toLength = __webpack_require__(25);
var callRegExpExec = __webpack_require__(132);
var regexpExec = __webpack_require__(129);
var fails = __webpack_require__(19);
var arrayPush = [].push;
var min = Math.min;
var MAX_UINT32 = 0xFFFFFFFF;
// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
// @@split logic
fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
var internalSplit;
if (
'abbc'.split(/(b)*/)[1] == 'c' ||
'test'.split(/(?:)/, -1).length != 4 ||
'ab'.split(/(?:ab)*/).length != 2 ||
'.'.split(/(.?)(.?)/).length != 4 ||
'.'.split(/()()/).length > 1 ||
''.split(/.?/).length
) {
// based on es5-shim implementation, need to rework it
internalSplit = function (separator, limit) {
var string = String(requireObjectCoercible(this));
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
if (lim === 0) return [];
if (separator === undefined) return [string];
// If `separator` is not a regex, use native split
if (!isRegExp(separator)) {
return nativeSplit.call(string, separator, lim);
}
var output = [];
var flags = (separator.ignoreCase ? 'i' : '') +
(separator.multiline ? 'm' : '') +
(separator.unicode ? 'u' : '') +
(separator.sticky ? 'y' : '');
var lastLastIndex = 0;
// Make `global` and avoid `lastIndex` issues by working with a copy
var separatorCopy = new RegExp(separator.source, flags + 'g');
var match, lastIndex, lastLength;
while (match = regexpExec.call(separatorCopy, string)) {
lastIndex = separatorCopy.lastIndex;
if (lastIndex > lastLastIndex) {
output.push(string.slice(lastLastIndex, match.index));
if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
lastLength = match[0].length;
lastLastIndex = lastIndex;
if (output.length >= lim) break;
}
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
}
if (lastLastIndex === string.length) {
if (lastLength || !separatorCopy.test('')) output.push('');
} else output.push(string.slice(lastLastIndex));
return output.length > lim ? output.slice(0, lim) : output;
};
// Chakra, V8
} else if ('0'.split(undefined, 0).length) {
internalSplit = function (separator, limit) {
return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
};
} else internalSplit = nativeSplit;
return [
// `String.prototype.split` method
// https://tc39.github.io/ecma262/#sec-string.prototype.split
function split(separator, limit) {
var O = requireObjectCoercible(this);
var splitter = separator == undefined ? undefined : separator[SPLIT];
return splitter !== undefined
? splitter.call(separator, O, limit)
: internalSplit.call(String(O), separator, limit);
},
// `RegExp.prototype[@@split]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
//
// NOTE: This cannot be properly polyfilled in engines that don't support
// the 'y' flag.
function (regexp, limit) {
var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
if (res.done) return res.value;
var rx = anObject(regexp);
var S = String(this);
var C = speciesConstructor(rx, RegExp);
var unicodeMatching = rx.unicode;
var flags = (rx.ignoreCase ? 'i' : '') +
(rx.multiline ? 'm' : '') +
(rx.unicode ? 'u' : '') +
(SUPPORTS_Y ? 'y' : 'g');
// ^(? + rx + ) is needed, in combination with some S slicing, to
// simulate the 'y' flag.
var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
if (lim === 0) return [];
if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
var p = 0;
var q = 0;
var A = [];
while (q < S.length) {
splitter.lastIndex = SUPPORTS_Y ? q : 0;
var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
var e;
if (
z === null ||
(e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
) {
q = advanceStringIndex(S, q, unicodeMatching);
} else {
A.push(S.slice(p, q));
if (A.length === lim) return A;
for (var i = 1; i <= z.length - 1; i++) {
A.push(z[i]);
if (A.length === lim) return A;
}
q = p = e;
}
}
A.push(S.slice(p));
return A;
}
];
}, !SUPPORTS_Y);
/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(1);
__webpack_require__(8);
__webpack_require__(9);
__webpack_require__(5);
__webpack_require__(30);
__webpack_require__(43);
var _Object$defineProperty = __webpack_require__(0);
_Object$defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _newArrowCheck2 = _interopRequireDefault(__webpack_require__(3));
var _this2 = void 0;
function transform(el, value) {
el.style['transform'] = value;
el.style['webkitTransform'] = value;
}
function opacity(el, value) {
el.style['opacity'] = value.toString();
}
function isTouchEvent(e) {
return e.constructor.name === 'TouchEvent';
}
function isRippleEnabled(value) {
return typeof value === 'undefined' || !!value;
}
function rippleShow(e) {
var value = {};
var element = e.currentTarget;
if (!element || !element._ripple || element._ripple.touched) {
return;
}
if (isTouchEvent(e)) {
element._ripple.touched = true;
}
value.center = element._ripple.centered;
if (element._ripple.class) {
value.class = element._ripple.class;
}
ripple.show(e, element, value);
}
function rippleHide(e) {
var _this = this;
var element = e.currentTarget;
if (!element) {
return;
}
window.setTimeout(function () {
(0, _newArrowCheck2.default)(this, _this);
if (element._ripple) {
element._ripple.touched = false;
}
}.bind(this));
ripple.hide(element);
}
var calculate = function calculate(e, el, value) {
(0, _newArrowCheck2.default)(this, _this2);
var offset = el.getBoundingClientRect();
var target = isTouchEvent(e) ? e.touches[e.touches.length - 1] : e;
var localX = target.clientX - offset.left;
var localY = target.clientY - offset.top;
var radius = 0;
var scale = 0.3;
if (el._ripple && el._ripple.circle) {
scale = 0.15;
radius = el.clientWidth / 2;
radius = value.center ? radius : radius + Math.sqrt(Math.pow(localX - radius, 2) + Math.pow(localY - radius, 2)) / 4;
} else {
radius = Math.sqrt(Math.pow(el.clientWidth, 2) + Math.pow(el.clientHeight, 2)) / 2;
}
var centerX = "".concat((el.clientWidth - radius * 2) / 2, "px");
var centerY = "".concat((el.clientHeight - radius * 2) / 2, "px");
var x = value.center ? centerX : "".concat(localX - radius, "px");
var y = value.center ? centerY : "".concat(localY - radius, "px");
return {
radius: radius,
scale: scale,
x: x,
y: y,
centerX: centerX,
centerY: centerY
};
}.bind(void 0);
var ripple = {
show: function show(e, el, value) {
var _this3 = this;
if (!el._ripple || !el._ripple.enabled) {
return;
}
var container = document.createElement('span');
var animation = document.createElement('span');
container.appendChild(animation);
container.className = 'ivue-ripple';
if (value.class) {
container.className += " ".concat(value.class);
}
var _calculate = calculate(e, el, value),
radius = _calculate.radius,
scale = _calculate.scale,
x = _calculate.x,
y = _calculate.y,
centerX = _calculate.centerX,
centerY = _calculate.centerY;
var size = "".concat(radius * 2, "px");
animation.className = 'ivue-ripple-wave';
animation.style.width = size;
animation.style.height = size;
el.appendChild(container);
var computed = window.getComputedStyle(el);
if (computed && computed.position === 'static') {
el.style.position = 'relative';
el.dataset.previousPosition = 'static';
}
animation.classList.add('ivue-ripple-wave-enter');
animation.classList.add('ivue-ripple-wave-visible');
transform(animation, "translate(".concat(x, ", ").concat(y, ") scale3d(").concat(scale, ",").concat(scale, ",").concat(scale, ")"));
opacity(animation, 0);
animation.dataset.activated = String(performance.now());
setTimeout(function () {
(0, _newArrowCheck2.default)(this, _this3);
animation.classList.remove('ivue-ripple-wave--enter');
animation.classList.add('ivue-ripple-wave--in');
transform(animation, "translate(".concat(centerX, ", ").concat(centerY, ") scale3d(1,1,1)"));
opacity(animation, 0.25);
}.bind(this), 0);
},
hide: function hide(el) {
var _this4 = this;
if (!el || !el._ripple || !el._ripple.enabled) {
return;
}
var ripples = el.getElementsByClassName('ivue-ripple-wave');
if (ripples.length === 0) {
return;
}
var animation = ripples[ripples.length - 1];
if (animation.dataset.isHiding) {
return;
} else {
animation.dataset.isHiding = 'true';
}
var diff = performance.now() - Number(animation.dataset.activated);
var delay = Math.max(250 - diff, 0);
setTimeout(function () {
var _this5 = this;
(0, _newArrowCheck2.default)(this, _this4);
animation.classList.remove('ivue-ripple-wave--in');
animation.classList.add('ivue-ripple-wave--on');
opacity(animation, 0);
setTimeout(function () {
(0, _newArrowCheck2.default)(this, _this5);
var ripples = el.getElementsByClassName('ivue-ripple-wave');
if (ripples.length === 1 && el.dataset.previousPosition) {
el.style.position = el.dataset.previousPosition;
delete el.dataset.previousPosition;
}
animation.parentNode && el.removeChild(animation.parentNode);
}.bind(this), 300);
}.bind(this), delay);
}
};
function updateRipple(el, binding, wasEnabled) {
var enabled = isRippleEnabled(binding.value);
if (!enabled) {
ripple.hide(el);
}
el._ripple = el._ripple || {};
el._ripple.enabled = enabled;
var value = binding.value || {};
if (value.center) {
el._ripple.centered = true;
}
if (value.class) {
el._ripple.class = binding.value.class;
}
if (value.circle) {
el._ripple.circle = value.circle;
}
if (enabled && !wasEnabled) {
el.addEventListener('touchstart', rippleShow, {
passive: true
});
el.addEventListener('touchend', rippleHide, {
passive: true
});
el.addEventListener('touchcancel', rippleHide);
el.addEventListener('mousedown', rippleShow);
el.addEventListener('mouseup', rippleHide);
el.addEventListener('mouseleave', rippleHide);
el.addEventListener('dragstart', rippleHide, {
passive: true
});
} else if (!enabled && wasEnabled) {
removeListeners(el);
}
}
function removeListeners(el) {
el.removeEventListener('mousedown', rippleShow);
el.removeEventListener('touchstart', rippleHide);
el.removeEventListener('touchend', rippleHide);
el.removeEventListener('touchcancel', rippleHide);
el.removeEventListener('mouseup', rippleHide);
el.removeEventListener('mouseleave', rippleHide);
el.removeEventListener('dragstart', rippleHide);
}
function directive(el, binding, node) {
var _this6 = this;
updateRipple(el, binding, false);
node.context && node.context.$nextTick(function () {
(0, _newArrowCheck2.default)(this, _this6);
var computed = window.getComputedStyle(el);
if (computed & computed.display === 'inline') {
var _console;
var context = node.fnOptions ? [node.fnOptions, node.context] : [node.componentInstance];
(_console = console).warn.apply(_console, ['v-ripple can only be used on block-level elements'].concat(context));
}
}.bind(this));
}
function unbind(el) {
delete el._ripple;
removeListeners(el);
}
function update(el, binding) {
if (binding.value === binding.oldValue) {
return;
}
var wasEnabled = isRippleEnabled(binding.oldValue);
updateRipple(el, binding, wasEnabled);
}
var _default = {
bind: directive,
unbind: unbind,
update: update
};
exports.default = _default;
/***/ }),
/* 33 */
/***/ (function(module, exports) {
// `RequireObjectCoercible` abstract operation
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
if (it == undefined) throw TypeError("Can't call method on " + it);
return it;
};
/***/ }),
/* 34 */
/***/ (function(module, exports) {
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(39);
var definePropertyModule = __webpack_require__(41);
var createPropertyDescriptor = __webpack_require__(82);
module.exports = DESCRIPTORS ? function (object, key, value) {
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(46);
module.exports = function (it) {
if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
};
/***/ }),
/* 37 */
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(53)(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/* 38 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_38__;
/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(19);
// Thank's IE8 for his funny defineProperty
module.exports = !fails(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/* 40 */
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/* 41 */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(39);
var IE8_DOM_DEFINE = __webpack_require__(155);
var anObject = __webpack_require__(24);
var toPrimitive = __webpack_require__(83);
var nativeDefineProperty = Object.defineProperty;
// `Object.defineProperty` method
// https://tc39.github.io/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if (IE8_DOM_DEFINE) try {
return nativeDefineProperty(O, P, Attributes);
} catch (error) { /* empty */ }
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
if