color-theme-generator
Version:
Generates random color themes that are based in color theory.
40 lines (39 loc) • 2.8 kB
JavaScript
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var _ValidationObject_instances, _ValidationObject_max, _ValidationObject_min, _ValidationObject_recieved, _ValidationObject_setMax, _ValidationObject_setMin, _ValidationObject_setRecieved;
export class ValidationObject {
constructor(max, min, recieved) {
_ValidationObject_instances.add(this);
_ValidationObject_max.set(this, void 0);
_ValidationObject_min.set(this, void 0);
_ValidationObject_recieved.set(this, void 0);
__classPrivateFieldGet(this, _ValidationObject_instances, "m", _ValidationObject_setMax).call(this, max);
__classPrivateFieldGet(this, _ValidationObject_instances, "m", _ValidationObject_setMin).call(this, min);
__classPrivateFieldGet(this, _ValidationObject_instances, "m", _ValidationObject_setRecieved).call(this, recieved);
}
get max() {
return __classPrivateFieldGet(this, _ValidationObject_max, "f");
}
get min() {
return __classPrivateFieldGet(this, _ValidationObject_min, "f");
}
get recieved() {
return __classPrivateFieldGet(this, _ValidationObject_recieved, "f");
}
}
_ValidationObject_max = new WeakMap(), _ValidationObject_min = new WeakMap(), _ValidationObject_recieved = new WeakMap(), _ValidationObject_instances = new WeakSet(), _ValidationObject_setMax = function _ValidationObject_setMax(value) {
__classPrivateFieldSet(this, _ValidationObject_max, value, "f");
}, _ValidationObject_setMin = function _ValidationObject_setMin(value) {
__classPrivateFieldSet(this, _ValidationObject_min, value, "f");
}, _ValidationObject_setRecieved = function _ValidationObject_setRecieved(value) {
__classPrivateFieldSet(this, _ValidationObject_recieved, value, "f");
};