From 47df59612c103f5c2b6166d7c68af2e01b27cf76 Mon Sep 17 00:00:00 2001 From: Christian Lusetti Date: Sat, 4 Mar 2017 18:25:13 -0500 Subject: [PATCH] expose Base component --- lib/build/validation.js | 5 +++++ lib/build/validation.min.js | 2 +- lib/src/validation.jsx | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/build/validation.js b/lib/build/validation.js index e320ae7..62bc99f 100644 --- a/lib/build/validation.js +++ b/lib/build/validation.js @@ -68,6 +68,10 @@ return /******/ (function(modules) { // webpackBootstrap var _Form2 = _interopRequireDefault(_Form); + var _Base = __webpack_require__(3); + + var _Base2 = _interopRequireDefault(_Base); + var _Input = __webpack_require__(11); var _Input2 = _interopRequireDefault(_Input); @@ -101,6 +105,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = { rules: _rules2.default, components: { + Base: _Base2.default, Form: _Form2.default, Input: _Input2.default, Select: _Select2.default, diff --git a/lib/build/validation.min.js b/lib/build/validation.min.js index 6615abf..04953c3 100644 --- a/lib/build/validation.min.js +++ b/lib/build/validation.min.js @@ -1 +1 @@ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"),require("classnames"));else if("function"==typeof define&&define.amd)define(["react","classnames"],t);else{var r="object"==typeof exports?t(require("react"),require("classnames")):t(e.react,e.classnames);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,function(e,t){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="/build/",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),a=n(o),s=r(10),i=n(s),u=r(11),c=n(u),p=r(12),l=n(p),f=r(13),y=n(f),h=r(9),d=n(h),b=r(6),v=n(b),m=r(7),O=n(m),g=r(8),P=n(g);t.default={rules:a.default,components:{Form:i.default,Input:c.default,Select:l.default,Textarea:y.default,Button:d.default},factories:{inputFactory:v.default,selectFactory:O.default,textareaFactory:P.default}}},function(t,r){t.exports=e},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){var t=function(t){function r(e,t){s(this,r);var n=i(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t)),o=!("checkbox"!==e.type&&"radio"!==e.type),a=e.checked?e.value:"";return n.state={value:o?a:e.value,isChanged:o?e.checked:!!e.value,isCheckbox:o,isUsed:o,isChecked:!o||!!e.checked},t.register(n),n}return u(r,t),l(r,[{key:"render",value:function(){var t,r,n=this.props,s=(n.validations,n.errorClassName),i=n.containerClassName,u=n.errorContainerClassName,c=n.className,l=(n.value,n.onChange,n.onBlur,a(n,["validations","errorClassName","containerClassName","errorContainerClassName","className","value","onChange","onBlur"])),y=this.state.isUsed&&this.state.isChanged&&!!this.context.errors[this.props.name],h=this.state.isCheckbox?this.props.value:this.state.value,d=y&&this.context.errors[this.props.name][0],v=null;y&&(v="function"==typeof d?d(h,this.context.components):m.default[d].hint(h,this.context.components));var O=p({containerClassName:(0,b.default)((t={},o(t,i,!!i),o(t,u,!!d&&u),t)),className:(0,b.default)((r={},o(r,c,!!c),o(r,s,!!d&&s),r)),checked:this.state.isChecked,onChange:this.onChange,onBlur:this.onBlur,type:this.props.type||"text",value:h,hint:v},l);return(0,f.createElement)(e,O)}}]),r}(g.default);return t.propTypes={validations:f.PropTypes.arrayOf(f.PropTypes.string).isRequired,errorClassName:f.PropTypes.string,containerClassName:f.PropTypes.string,errorContainerClassName:f.PropTypes.string},t.contextTypes={register:f.PropTypes.func.isRequired,unregister:f.PropTypes.func.isRequired,validateState:f.PropTypes.func.isRequired,components:f.PropTypes.objectOf(f.PropTypes.any),errors:f.PropTypes.objectOf(f.PropTypes.array)},t.WrappedComponent=e,(0,h.default)(t,e)}Object.defineProperty(t,"__esModule",{value:!0});var p=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){var t=function(t){function r(e,t){s(this,r);var n=i(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.state={value:e.value,isChanged:!!e.value,isUsed:!0,isChecked:!0},t.register(n),n}return u(r,t),l(r,[{key:"render",value:function(){var t,r,n=this.props,s=(n.validations,n.errorClassName),i=n.containerClassName,u=n.errorContainerClassName,c=n.className,l=(n.value,n.onChange,n.onBlur,a(n,["validations","errorClassName","containerClassName","errorContainerClassName","className","value","onChange","onBlur"])),y=this.state.isUsed&&this.state.isChanged&&!!this.context.errors[this.props.name],h=y&&this.context.errors[this.props.name][0],d=null;y&&(d="function"==typeof h?h(this.state.value,this.context.components):m.default[h].hint(this.state.value,this.context.components));var v=p({containerClassName:(0,b.default)((t={},o(t,i,!!i),o(t,u,!!h&&u),t)),className:(0,b.default)((r={},o(r,c,!!c),o(r,s,!!h&&s),r)),onChange:this.onChange,onBlur:this.onBlur,value:this.state.value,hint:d},l);return(0,f.createElement)(e,v)}}]),r}(g.default);return t.propTypes={validations:f.PropTypes.arrayOf(f.PropTypes.string).isRequired,errorClassName:f.PropTypes.string,containerClassName:f.PropTypes.string,errorContainerClassName:f.PropTypes.string},t.contextTypes={register:f.PropTypes.func.isRequired,unregister:f.PropTypes.func.isRequired,validateState:f.PropTypes.func.isRequired,components:f.PropTypes.objectOf(f.PropTypes.any),errors:f.PropTypes.objectOf(f.PropTypes.arrayOf(f.PropTypes.oneOfType([f.PropTypes.string,f.PropTypes.node])))},(0,h.default)(t,e)}Object.defineProperty(t,"__esModule",{value:!0});var p=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){var t=function(t){function r(e,t){s(this,r);var n=i(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.state={value:e.value,isChanged:!!e.value,isUsed:!1,isChecked:!0},t.register(n),n}return u(r,t),l(r,[{key:"render",value:function(){var t,r,n=this.props,s=(n.validations,n.errorClassName),i=n.containerClassName,u=n.errorContainerClassName,c=n.className,l=(n.value,n.onChange,n.onBlur,a(n,["validations","errorClassName","containerClassName","errorContainerClassName","className","value","onChange","onBlur"])),y=this.state.isUsed&&this.state.isChanged&&!!this.context.errors[this.props.name],h=y&&this.context.errors[this.props.name][0],d=null;y&&(d="function"==typeof h?h(this.state.value,this.context.components):m.default[h].hint(this.state.value,this.context.components));var v=p({containerClassName:(0,b.default)((t={},o(t,i,!!i),o(t,u,!!h&&u),t)),className:(0,b.default)((r={},o(r,c,!!c),o(r,s,!!h&&s),r)),onChange:this.onChange,onBlur:this.onBlur,value:this.state.value,hint:d},l);return(0,f.createElement)(e,v)}}]),r}(g.default);return t.propTypes={validations:f.PropTypes.arrayOf(f.PropTypes.string).isRequired,errorClassName:f.PropTypes.string,containerClassName:f.PropTypes.string,errorContainerClassName:f.PropTypes.string},t.contextTypes={register:f.PropTypes.func.isRequired,unregister:f.PropTypes.func.isRequired,validateState:f.PropTypes.func.isRequired,components:f.PropTypes.objectOf(f.PropTypes.any),errors:f.PropTypes.objectOf(f.PropTypes.array)},(0,h.default)(t,e)}Object.defineProperty(t,"__esModule",{value:!0});var p=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){var t=function(t){function r(e,t){s(this,r);var n=i(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t)),o=!("checkbox"!==e.type&&"radio"!==e.type),a=e.checked?e.value:"";return n.state={value:o?a:e.value,isChanged:o?e.checked:!!e.value,isCheckbox:o,isUsed:o,isChecked:!o||!!e.checked},t.register(n),n}return u(r,t),l(r,[{key:"render",value:function(){var t,r,n=this.props,s=(n.validations,n.errorClassName),i=n.containerClassName,u=n.errorContainerClassName,c=n.className,l=(n.value,n.onChange,n.onBlur,a(n,["validations","errorClassName","containerClassName","errorContainerClassName","className","value","onChange","onBlur"])),y=this.state.isUsed&&this.state.isChanged&&!!this.context.errors[this.props.name],h=this.state.isCheckbox?this.props.value:this.state.value,d=y&&this.context.errors[this.props.name][0],v=null;y&&(v="function"==typeof d?d(h,this.context.components):m.default[d].hint(h,this.context.components));var O=p({containerClassName:(0,b.default)((t={},o(t,i,!!i),o(t,u,!!d&&u),t)),className:(0,b.default)((r={},o(r,c,!!c),o(r,s,!!d&&s),r)),checked:this.state.isChecked,onChange:this.onChange,onBlur:this.onBlur,type:this.props.type||"text",value:h,hint:v},l);return(0,f.createElement)(e,O)}}]),r}(g.default);return t.propTypes={validations:f.PropTypes.arrayOf(f.PropTypes.string).isRequired,errorClassName:f.PropTypes.string,containerClassName:f.PropTypes.string,errorContainerClassName:f.PropTypes.string},t.contextTypes={register:f.PropTypes.func.isRequired,unregister:f.PropTypes.func.isRequired,validateState:f.PropTypes.func.isRequired,components:f.PropTypes.objectOf(f.PropTypes.any),errors:f.PropTypes.objectOf(f.PropTypes.array)},t.WrappedComponent=e,(0,h.default)(t,e)}Object.defineProperty(t,"__esModule",{value:!0});var p=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){var t=function(t){function r(e,t){s(this,r);var n=i(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.state={value:e.value,isChanged:!!e.value,isUsed:!0,isChecked:!0},t.register(n),n}return u(r,t),l(r,[{key:"render",value:function(){var t,r,n=this.props,s=(n.validations,n.errorClassName),i=n.containerClassName,u=n.errorContainerClassName,c=n.className,l=(n.value,n.onChange,n.onBlur,a(n,["validations","errorClassName","containerClassName","errorContainerClassName","className","value","onChange","onBlur"])),y=this.state.isUsed&&this.state.isChanged&&!!this.context.errors[this.props.name],h=y&&this.context.errors[this.props.name][0],d=null;y&&(d="function"==typeof h?h(this.state.value,this.context.components):m.default[h].hint(this.state.value,this.context.components));var v=p({containerClassName:(0,b.default)((t={},o(t,i,!!i),o(t,u,!!h&&u),t)),className:(0,b.default)((r={},o(r,c,!!c),o(r,s,!!h&&s),r)),onChange:this.onChange,onBlur:this.onBlur,value:this.state.value,hint:d},l);return(0,f.createElement)(e,v)}}]),r}(g.default);return t.propTypes={validations:f.PropTypes.arrayOf(f.PropTypes.string).isRequired,errorClassName:f.PropTypes.string,containerClassName:f.PropTypes.string,errorContainerClassName:f.PropTypes.string},t.contextTypes={register:f.PropTypes.func.isRequired,unregister:f.PropTypes.func.isRequired,validateState:f.PropTypes.func.isRequired,components:f.PropTypes.objectOf(f.PropTypes.any),errors:f.PropTypes.objectOf(f.PropTypes.arrayOf(f.PropTypes.oneOfType([f.PropTypes.string,f.PropTypes.node])))},(0,h.default)(t,e)}Object.defineProperty(t,"__esModule",{value:!0});var p=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){var t=function(t){function r(e,t){s(this,r);var n=i(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.state={value:e.value,isChanged:!!e.value,isUsed:!1,isChecked:!0},t.register(n),n}return u(r,t),l(r,[{key:"render",value:function(){var t,r,n=this.props,s=(n.validations,n.errorClassName),i=n.containerClassName,u=n.errorContainerClassName,c=n.className,l=(n.value,n.onChange,n.onBlur,a(n,["validations","errorClassName","containerClassName","errorContainerClassName","className","value","onChange","onBlur"])),y=this.state.isUsed&&this.state.isChanged&&!!this.context.errors[this.props.name],h=y&&this.context.errors[this.props.name][0],d=null;y&&(d="function"==typeof h?h(this.state.value,this.context.components):m.default[h].hint(this.state.value,this.context.components));var v=p({containerClassName:(0,b.default)((t={},o(t,i,!!i),o(t,u,!!h&&u),t)),className:(0,b.default)((r={},o(r,c,!!c),o(r,s,!!h&&s),r)),onChange:this.onChange,onBlur:this.onBlur,value:this.state.value,hint:d},l);return(0,f.createElement)(e,v)}}]),r}(g.default);return t.propTypes={validations:f.PropTypes.arrayOf(f.PropTypes.string).isRequired,errorClassName:f.PropTypes.string,containerClassName:f.PropTypes.string,errorContainerClassName:f.PropTypes.string},t.contextTypes={register:f.PropTypes.func.isRequired,unregister:f.PropTypes.func.isRequired,validateState:f.PropTypes.func.isRequired,components:f.PropTypes.objectOf(f.PropTypes.any),errors:f.PropTypes.objectOf(f.PropTypes.array)},(0,h.default)(t,e)}Object.defineProperty(t,"__esModule",{value:!0});var p=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t