diff --git a/app/build/mojs-curve-editor.js b/app/build/mojs-curve-editor.js index 5f5073c..6d300e7 100644 --- a/app/build/mojs-curve-editor.js +++ b/app/build/mojs-curve-editor.js @@ -165,7 +165,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_vars', value: function _vars() { - this.revision = '1.7.0'; + this.revision = '1.7.1'; this.store = (0, _store2.default)(); this._easings = []; diff --git a/app/build/mojs-curve-editor.min.js b/app/build/mojs-curve-editor.min.js index 4c83d12..64f4051 100644 --- a/app/build/mojs-curve-editor.min.js +++ b/app/build/mojs-curve-editor.min.js @@ -1,4 +1,4 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("mojs-curve-editor",[],e):"object"==typeof exports?exports["mojs-curve-editor"]=e():t["mojs-curve-editor"]=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="build/",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=r(i),s=n(5),a=r(s),u=n(43),l=r(u),c=n(44),f=r(c),p=n(48),d=n(49),h=n(71),_=r(h),v=n(189),y=r(v),m=n(118),g=(r(m),n(132)),b=r(g),x=n(216),E=r(x),T=n(217),w=r(T),P=n(138),M=(r(P),n(218)),S=r(M),O=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,l.default)(this,t),this._o=e,this._decalareDefaults(),this._extendDefaults(),this._vars(),this._render(),this._tryToRestore(),this._listenUnload(),this._subscribe()}return(0,f.default)(t,[{key:"_decalareDefaults",value:function(){this._defaults={name:"mojs-curve-editor",isSaveState:!0,isHiddenOnMin:!1,startPath:"M0,100 L100,0",onChange:null}}},{key:"_extendDefaults",value:function(){this._props={};for(var t in this._defaults)this._props[t]=(0,E.default)(this._o[t],this._defaults[t])}},{key:"_vars",value:function(){this.revision="1.7.0",this.store=(0,y.default)(),this._easings=[],this._progressLines=[];var t=this._props.name;t+=t===this._defaults.name?"":"__"+this._defaults.name,this._localStorage=t+"__"+(0,b.default)(t),this.store.dispatch({type:"SET_EDITOR_NAME",data:this._localStorage})}},{key:"_render",value:function(){var t=this,e=document,n=e.readyState;return"complete"===n||"loaded"===n||"interactive"===n?this._renderApp():void e.addEventListener("DOMContentLoaded",function(){t._renderApp()})}},{key:"_renderApp",value:function(){var t=this;this._rootEl=(0,d.render)((0,d.h)(p.Provider,{store:this.store},(0,d.h)(_.default,{progressLines:this._progressLines,options:this._props,ref:function(e){t._el=e}})),document.body)}},{key:"_listenUnload",value:function(){var t=this,e="onpagehide"in window?"pagehide":"beforeunload";window.addEventListener(e,function(){if(t._props.isSaveState){var e=(0,a.default)({},t.store.getState());delete e.points.history,delete e.pointControls.history,e.progressLines.lines=[],localStorage.setItem(t._localStorage,(0,o.default)(e))}else localStorage.removeItem(t._localStorage)})}},{key:"_tryToRestore",value:function(){var t=localStorage.getItem(this._localStorage);t?this.store.dispatch({type:"SET_STATE",data:JSON.parse(t)}):this._drawStartPath()}},{key:"_subscribe",value:function(){this._compilePath(),this.store.subscribe(this._compilePath.bind(this))}},{key:"_compilePath",value:function(){var t=this,e=this.store.getState(),n=e.points.present,r=n.path;this._easing||(this._easing=mojs.easing.path(r)),clearTimeout(this._tm),this._tm=setTimeout(function(){t._prevPath!==r&&(t._prevPath=r,t._easing=mojs.easing.path(r),t._fireOnChange(r))},40)}},{key:"_fireOnChange",value:function(t){var e=this._props.onChange;"function"==typeof e&&e(t);for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=function(){var e=t._easings.length;return function(n){t._updateProgressLine(n,e,t._progressLines);var r=t._easings[e].options.transform;return r?r(t._easing(n)):t._easing(n)}}();return this.store.dispatch({type:"ADD_PROGRESS_LINE",data:{}}),this._easings.push({options:e,easing:n}),(0,w.default)(function(){t._fireOnChange(t._prevPath)}),n}},{key:"minimize",value:function(){this.store.dispatch({type:"SET_MINIMIZE",data:!0})}},{key:"maximize",value:function(){this.store.dispatch({type:"SET_MINIMIZE",data:!1})}},{key:"toggleSize",value:function(){var t=this.store.getState(),e=t.controls;return e.isMinimize?this.maximize():this.minimize(),e.isMinimize}},{key:"destroy",value:function(){var t=function(){return null};(0,d.render)((0,d.h)(t,null),document.body,this._rootEl)}},{key:"_getStartPathPoints",value:function(){var t=this._props.startPath,e=[];try{var n=document.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("d",t),e=(0,S.default)(n)}catch(t){console.error("Something went wrong while parsing `startPath`",t)}return e}},{key:"_drawStartPath",value:function(){var t=this,e=this._getStartPathPoints();e.length&&(this.store.dispatch({type:"POINTS_REMOVE"}),e.forEach(function(e,n){t.store.dispatch({type:"POINT_ADD",data:{point:e,index:n}})}))}}]),t}();e.default=O,window.MojsCurveEditor=O},function(t,e,n){t.exports={default:n(3),__esModule:!0}},function(t,e,n){var r=n(4),i=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return i.stringify.apply(i,arguments)}},function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(6),o=r(i);e.default=o.default||function(t){for(var e=1;ec;)for(var d,h=u(arguments[c++]),_=f?i(h).concat(f(h)):i(h),v=_.length,y=0;v>y;)d=_[y++],r&&!p.call(h,d)||(n[d]=h[d]);return n}:l},function(t,e,n){var r=n(26),i=n(39);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(23),i=n(27),o=n(31)(!1),s=n(35)("IE_PROTO");t.exports=function(t,e){var n,a=i(t),u=0,l=[];for(n in a)n!=s&&r(a,n)&&l.push(n);for(;e.length>u;)r(a,n=e[u++])&&(~o(l,n)||l.push(n));return l}},function(t,e,n){var r=n(28),i=n(30);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(29);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(27),i=n(32),o=n(34);t.exports=function(t){return function(e,n,s){var a,u=r(e),l=i(u.length),c=o(s,l);if(t&&n!=n){for(;l>c;)if(a=u[c++],a!=a)return!0}else for(;l>c;c++)if((t||c in u)&&u[c]===n)return t||c||0;return!t&&-1}}},function(t,e,n){var r=n(33),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(33),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(36)("keys"),i=n(38);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(4),i=n(10),o="__core-js_shared__",s=i[o]||(i[o]={});(t.exports=function(t,e){return s[t]||(s[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(37)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(30);t.exports=function(t){return Object(r(t))}},function(t,e){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(45),o=r(i);e.default=function(){function t(t,e){for(var n=0;n does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/reactjs/react-redux/releases/tag/v2.0.0 for the migration instructions."))}function o(t,e){if(t===e)return!0;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty,o=0;o, "+('or explicitly pass "store" as a prop to "'+s+'".'));var i=n.store.getState();return n.state={storeState:i},n.clearCache(),n}return E(a,r),a.prototype.shouldComponentUpdate=function(){return!y||this.haveOwnPropsChanged||this.hasStoreStateChanged},a.prototype.computeStateProps=function(t,e){if(!this.finalMapStateToProps)return this.configureFinalMapState(t,e);var r=t.getState(),i=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(r,e):this.finalMapStateToProps(r);return n(i,"mapStateToProps"),i},a.prototype.configureFinalMapState=function(t,e){var r=l(t.getState(),e),i="function"==typeof r;return this.finalMapStateToProps=i?r:l,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,i?this.computeStateProps(t,e):(n(r,"mapStateToProps"),r)},a.prototype.computeDispatchProps=function(t,e){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(t,e);var r=t.dispatch,i=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(r,e):this.finalMapDispatchToProps(r);return n(i,"mapDispatchToProps"),i},a.prototype.configureFinalMapDispatch=function(t,e){var r=f(t.dispatch,e),i="function"==typeof r;return this.finalMapDispatchToProps=i?r:f,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,i?this.computeDispatchProps(t,e):(n(r,"mapDispatchToProps"),r)},a.prototype.updateStatePropsIfNeeded=function(){var t=this.computeStateProps(this.store,this.props);return(!this.stateProps||!o(t,this.stateProps))&&(this.stateProps=t,!0)},a.prototype.updateDispatchPropsIfNeeded=function(){var t=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!o(t,this.dispatchProps))&&(this.dispatchProps=t,!0)},a.prototype.updateMergedPropsIfNeeded=function(){var t=i(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&P&&o(t,this.mergedProps))&&(this.mergedProps=t,!0)},a.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},a.prototype.trySubscribe=function(){u&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},a.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},a.prototype.componentDidMount=function(){this.trySubscribe()},a.prototype.componentWillReceiveProps=function(t){y&&o(t,this.props)||(this.haveOwnPropsChanged=!0)},a.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},a.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},a.prototype.handleChange=function(){if(this.unsubscribe){var t=this.store.getState(),e=this.state.storeState;if(!y||e!==t){if(y&&!this.doStatePropsDependOnOwnProps){var n=_(this.updateStatePropsIfNeeded,this);if(!n)return;n===F&&(this.statePropsPrecalculationError=F.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:t})}}},a.prototype.getWrappedInstance=function(){return d(w,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},a.prototype.render=function(){var n=this.haveOwnPropsChanged,r=this.hasStoreStateChanged,i=this.haveStatePropsBeenPrecalculated,o=this.statePropsPrecalculationError,s=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,o)throw o;var a=!0,u=!0;y&&s&&(a=r||n&&this.doStatePropsDependOnOwnProps,u=n&&this.doDispatchPropsDependOnOwnProps);var l=!1,c=!1;i?l=!0:a&&(l=this.updateStatePropsIfNeeded()),u&&(c=this.updateDispatchPropsIfNeeded());var f=!0;return f=!!(l||c||n)&&this.updateMergedPropsIfNeeded(),!f&&s?s:(w?this.renderedElement=t.h(e,x({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=t.h(e,this.mergedProps),this.renderedElement)},a}(t.Component);return a.displayName=s,a.WrappedComponent=e,a.contextTypes={store:g},a.prototype.componentWillUpdate=function(){this.version!==M&&(this.version=M,this.trySubscribe(),this.clearCache())},L(a,e)}}var y={only:function(t){return t&&t[0]||null}};n.isRequired=n;var m={element:n,func:n,shape:function(){return n}},g=m.shape({subscribe:m.func.isRequired,dispatch:m.func.isRequired,getState:m.func.isRequired}),b=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},x=Object.assign||function(t){for(var e=1;e2;)F.push(arguments[a]);for(n&&n.children&&(F.length||F.push(n.children),delete n.children);F.length;)if((o=F.pop())instanceof Array)for(a=o.length;a--;)F.push(o[a]);else null!=o&&o!==!0&&o!==!1&&("number"==typeof o&&(o=String(o)),s="string"==typeof o,s&&i?r[r.length-1]+=o:((r||(r=[])).push(o),i=s));var u=new e(t,n||void 0,r||U);return z.vnode&&z.vnode(u),u}function r(t,e){if(e)for(var n in e)t[n]=e[n];return t}function i(t){return r({},t)}function o(t,e){for(var n=e.split("."),r=0;r2?[].slice.call(arguments,2):t.children)}function c(t,e,n){var r=e.split(".");return function(e){for(var i=e&&e.target||this,s={},u=s,l=a(n)?o(e,n):i.nodeName?i.type.match(/^che|rad/)?i.checked:i.value:e,c=0;c=h?t.appendChild(u):u!==l[g]&&(u===l[g+1]&&m(l[g]),t.insertBefore(u,l[g]||null)))}if(p)for(var g in f)f[g]&&O(f[g]);for(;d<=v;)u=c[v--],u&&O(u)}function O(t,e){var n=t._component;if(n)L(n,!e);else{t[W]&&t[W].ref&&t[W].ref(null),e||E(t);for(var r;r=t.lastChild;)O(r,e)}}function C(t,e,n){var r;for(r in n)e&&r in e||null==n[r]||g(t,r,n[r],n[r]=void 0,$);if(e)for(r in e)"children"===r||"innerHTML"===r||r in n&&e[r]===("value"===r||"checked"===r?t[r]:n[r])||g(t,r,n[r],n[r]=e[r],$)}function j(t){var e=t.constructor.name,n=et[e];n?n.push(t):et[e]=[t]}function I(t,e,n){var r=new t(e,n),i=et[t.name];if(D.call(r,e,n),i)for(var o=i.length;o--;)if(i[o].constructor===t){r.nextBase=i[o].nextBase,i.splice(o,1);break}return r}function N(t,e,n,r,i){t._disable||(t._disable=!0,(t.__ref=e.ref)&&delete e.ref,(t.__key=e.key)&&delete e.key,!t.base||i?t.componentWillMount&&t.componentWillMount():t.componentWillReceiveProps&&t.componentWillReceiveProps(e,r),r&&r!==t.context&&(t.prevContext||(t.prevContext=t.context),t.context=r),t.prevProps||(t.prevProps=t.props),t.props=e,t._disable=!1,0!==n&&(1!==n&&z.syncComponentUpdates===!1&&t.base?f(t):k(t,1,i)),t.__ref&&t.__ref(t))}function k(t,e,n,o){if(!t._disable){var a,u,l,c,f=t.props,p=t.state,_=t.context,v=t.prevProps||f,m=t.prevState||p,g=t.prevContext||_,b=t.base,x=t.nextBase,E=b||x,T=t._component;if(b&&(t.props=v,t.state=m,t.context=g,2!==e&&t.shouldComponentUpdate&&t.shouldComponentUpdate(f,p,_)===!1?a=!0:t.componentWillUpdate&&t.componentWillUpdate(f,p,_),t.props=f,t.state=p,t.context=_),t.prevProps=t.prevState=t.prevContext=t.nextBase=null,t._dirty=!1,!a){for(t.render&&(u=t.render(f,p,_)),t.getChildContext&&(_=r(i(_),t.getChildContext()));d(u);)u=h(u,_);var M,S,C=u&&u.nodeName;if(s(C)){var j=y(u);l=T,l&&l.constructor===C&&j.key==l.__key?N(l,j,1,_):(M=l,l=I(C,j,_),l.nextBase=l.nextBase||x,l._parentComponent=t,t._component=l,N(l,j,0,_),k(l,1,n,!0)),S=l.base}else c=E,M=T,M&&(c=t._component=null),(E||1===e)&&(c&&(c._component=null),S=P(c,u,_,n||!b,E&&E.parentNode,!0));if(E&&S!==E&&l!==T){var A=E.parentNode;A&&S!==A&&(A.replaceChild(S,E),M||(E._component=null,O(E)))}if(M&&L(M,S!==E),t.base=S,S&&!o){for(var D=t,R=t;R=R._parentComponent;)(D=R).base=S;S._component=D,S._componentConstructor=D.constructor}}!b||n?K.unshift(t):a||(t.componentDidUpdate&&t.componentDidUpdate(v,m,g),z.afterUpdate&&z.afterUpdate(t));var F,U=t._renderCallbacks;if(U)for(;F=U.pop();)F.call(t);Q||o||w()}}function A(t,e,n,r){for(var i=t&&t._component,o=i,s=t,a=i&&t._componentConstructor===e.nodeName,u=a,l=y(e);i&&!u&&(i=i._parentComponent);)u=i.constructor===e.nodeName;return i&&u&&(!r||i._component)?(N(i,l,3,n,r),t=i.base):(o&&!a&&(L(o,!0),t=s=null),i=I(e.nodeName,l,n),t&&!i.nextBase&&(i.nextBase=t,s=null),N(i,l,1,n,r),t=i.base,s&&t!==s&&(s._component=null,O(s))),t}function L(t,e){z.beforeUnmount&&z.beforeUnmount(t);var n=t.base;t._disable=!0,t.componentWillUnmount&&t.componentWillUnmount(),t.base=null;var r=t._component;if(r)L(r,e);else if(n){n[W]&&n[W].ref&&n[W].ref(null),t.nextBase=n,e&&(m(n),j(t));for(var i;i=n.lastChild;)O(i,!e)}t.__ref&&t.__ref(null),t.componentDidUnmount&&t.componentDidUnmount()}function D(t,e){this._dirty=!0,this.context=e,this.props=t,this.state||(this.state={})}function R(t,e,n){return P(n,t,{},!1,e)}var z={},F=[],U=[],V={},Y=function(t){return V[t]||(V[t]=t.toLowerCase())},X="undefined"!=typeof Promise&&Promise.resolve(),H=X?function(t){X.then(t)}:setTimeout,q={},W="undefined"!=typeof Symbol?Symbol.for("preactattr"):"__preactattr_",Z={boxFlex:1,boxFlexGroup:1,columnCount:1,fillOpacity:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,fontWeight:1,lineClamp:1,lineHeight:1,opacity:1,order:1,orphans:1,strokeOpacity:1,widows:1,zIndex:1,zoom:1},G={blur:1,error:1,focus:1,load:1,resize:1,scroll:1},B=[],J={},K=[],Q=0,$=!1,tt=!1,et={};r(D.prototype,{linkState:function(t,e){var n=this._linkedStates||(this._linkedStates={});return n[t+e]||(n[t+e]=c(this,t,e))},setState:function(t,e){var n=this.state;this.prevState||(this.prevState=i(n)),r(n,s(t)?t(n,this.props):t),e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),f(this)},forceUpdate:function(){k(this,2)},render:function(){}}),t.h=n,t.cloneElement=l,t.Component=D,t.render=R,t.rerender=p,t.options=z})},function(t,e,n){(function(t){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(){}e.__esModule=!0,e.compose=e.applyMiddleware=e.bindActionCreators=e.combineReducers=e.createStore=void 0;var o=n(52),s=r(o),a=n(66),u=r(a),l=n(68),c=r(l),f=n(69),p=r(f),d=n(70),h=r(d),_=n(67),v=r(_);"production"!==t.env.NODE_ENV&&"string"==typeof i.name&&"isCrushed"!==i.name&&(0,v.default)("You are currently using minified code outside of NODE_ENV === 'production'. This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) to ensure you have the correct code for your production build."),e.createStore=s.default,e.combineReducers=u.default,e.bindActionCreators=c.default,e.applyMiddleware=p.default,e.compose=h.default}).call(e,n(51))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(c===setTimeout)return setTimeout(t,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function s(){_&&d&&(_=!1,d.length?h=d.concat(h):v=-1,h.length&&a())}function a(){if(!_){var t=i(s);_=!0;for(var e=h.length;e;){for(d=h,h=[];++v0&&void 0!==arguments[0]?arguments[0]:{};(0,l.default)(this,t),this._o=e,this._decalareDefaults(),this._extendDefaults(),this._vars(),this._render(),this._tryToRestore(),this._listenUnload(),this._subscribe()}return(0,f.default)(t,[{key:"_decalareDefaults",value:function(){this._defaults={name:"mojs-curve-editor",isSaveState:!0,isHiddenOnMin:!1,startPath:"M0,100 L100,0",onChange:null}}},{key:"_extendDefaults",value:function(){this._props={};for(var t in this._defaults)this._props[t]=(0,E.default)(this._o[t],this._defaults[t])}},{key:"_vars",value:function(){this.revision="1.7.1",this.store=(0,y.default)(),this._easings=[],this._progressLines=[];var t=this._props.name;t+=t===this._defaults.name?"":"__"+this._defaults.name,this._localStorage=t+"__"+(0,b.default)(t),this.store.dispatch({type:"SET_EDITOR_NAME",data:this._localStorage})}},{key:"_render",value:function(){var t=this,e=document,n=e.readyState;return"complete"===n||"loaded"===n||"interactive"===n?this._renderApp():void e.addEventListener("DOMContentLoaded",function(){t._renderApp()})}},{key:"_renderApp",value:function(){var t=this;this._rootEl=(0,d.render)((0,d.h)(p.Provider,{store:this.store},(0,d.h)(_.default,{progressLines:this._progressLines,options:this._props,ref:function(e){t._el=e}})),document.body)}},{key:"_listenUnload",value:function(){var t=this,e="onpagehide"in window?"pagehide":"beforeunload";window.addEventListener(e,function(){if(t._props.isSaveState){var e=(0,a.default)({},t.store.getState());delete e.points.history,delete e.pointControls.history,e.progressLines.lines=[],localStorage.setItem(t._localStorage,(0,o.default)(e))}else localStorage.removeItem(t._localStorage)})}},{key:"_tryToRestore",value:function(){var t=localStorage.getItem(this._localStorage);t?this.store.dispatch({type:"SET_STATE",data:JSON.parse(t)}):this._drawStartPath()}},{key:"_subscribe",value:function(){this._compilePath(),this.store.subscribe(this._compilePath.bind(this))}},{key:"_compilePath",value:function(){var t=this,e=this.store.getState(),n=e.points.present,r=n.path;this._easing||(this._easing=mojs.easing.path(r)),clearTimeout(this._tm),this._tm=setTimeout(function(){t._prevPath!==r&&(t._prevPath=r,t._easing=mojs.easing.path(r),t._fireOnChange(r))},40)}},{key:"_fireOnChange",value:function(t){var e=this._props.onChange;"function"==typeof e&&e(t);for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=function(){var e=t._easings.length;return function(n){t._updateProgressLine(n,e,t._progressLines);var r=t._easings[e].options.transform;return r?r(t._easing(n)):t._easing(n)}}();return this.store.dispatch({type:"ADD_PROGRESS_LINE",data:{}}),this._easings.push({options:e,easing:n}),(0,w.default)(function(){t._fireOnChange(t._prevPath)}),n}},{key:"minimize",value:function(){this.store.dispatch({type:"SET_MINIMIZE",data:!0})}},{key:"maximize",value:function(){this.store.dispatch({type:"SET_MINIMIZE",data:!1})}},{key:"toggleSize",value:function(){var t=this.store.getState(),e=t.controls;return e.isMinimize?this.maximize():this.minimize(),e.isMinimize}},{key:"destroy",value:function(){var t=function(){return null};(0,d.render)((0,d.h)(t,null),document.body,this._rootEl)}},{key:"_getStartPathPoints",value:function(){var t=this._props.startPath,e=[];try{var n=document.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("d",t),e=(0,S.default)(n)}catch(t){console.error("Something went wrong while parsing `startPath`",t)}return e}},{key:"_drawStartPath",value:function(){var t=this,e=this._getStartPathPoints();e.length&&(this.store.dispatch({type:"POINTS_REMOVE"}),e.forEach(function(e,n){t.store.dispatch({type:"POINT_ADD",data:{point:e,index:n}})}))}}]),t}();e.default=O,window.MojsCurveEditor=O},function(t,e,n){t.exports={default:n(3),__esModule:!0}},function(t,e,n){var r=n(4),i=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return i.stringify.apply(i,arguments)}},function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(6),o=r(i);e.default=o.default||function(t){for(var e=1;ec;)for(var d,h=u(arguments[c++]),_=f?i(h).concat(f(h)):i(h),v=_.length,y=0;v>y;)d=_[y++],r&&!p.call(h,d)||(n[d]=h[d]);return n}:l},function(t,e,n){var r=n(26),i=n(39);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(23),i=n(27),o=n(31)(!1),s=n(35)("IE_PROTO");t.exports=function(t,e){var n,a=i(t),u=0,l=[];for(n in a)n!=s&&r(a,n)&&l.push(n);for(;e.length>u;)r(a,n=e[u++])&&(~o(l,n)||l.push(n));return l}},function(t,e,n){var r=n(28),i=n(30);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(29);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(27),i=n(32),o=n(34);t.exports=function(t){return function(e,n,s){var a,u=r(e),l=i(u.length),c=o(s,l);if(t&&n!=n){for(;l>c;)if(a=u[c++],a!=a)return!0}else for(;l>c;c++)if((t||c in u)&&u[c]===n)return t||c||0;return!t&&-1}}},function(t,e,n){var r=n(33),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(33),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(36)("keys"),i=n(38);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(4),i=n(10),o="__core-js_shared__",s=i[o]||(i[o]={});(t.exports=function(t,e){return s[t]||(s[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(37)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!0},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(30);t.exports=function(t){return Object(r(t))}},function(t,e){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(45),o=r(i);e.default=function(){function t(t,e){for(var n=0;n does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/reactjs/react-redux/releases/tag/v2.0.0 for the migration instructions."))}function o(t,e){if(t===e)return!0;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty,o=0;o, "+('or explicitly pass "store" as a prop to "'+s+'".'));var i=n.store.getState();return n.state={storeState:i},n.clearCache(),n}return E(a,r),a.prototype.shouldComponentUpdate=function(){return!y||this.haveOwnPropsChanged||this.hasStoreStateChanged},a.prototype.computeStateProps=function(t,e){if(!this.finalMapStateToProps)return this.configureFinalMapState(t,e);var r=t.getState(),i=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(r,e):this.finalMapStateToProps(r);return n(i,"mapStateToProps"),i},a.prototype.configureFinalMapState=function(t,e){var r=l(t.getState(),e),i="function"==typeof r;return this.finalMapStateToProps=i?r:l,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,i?this.computeStateProps(t,e):(n(r,"mapStateToProps"),r)},a.prototype.computeDispatchProps=function(t,e){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(t,e);var r=t.dispatch,i=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(r,e):this.finalMapDispatchToProps(r);return n(i,"mapDispatchToProps"),i},a.prototype.configureFinalMapDispatch=function(t,e){var r=f(t.dispatch,e),i="function"==typeof r;return this.finalMapDispatchToProps=i?r:f,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,i?this.computeDispatchProps(t,e):(n(r,"mapDispatchToProps"),r)},a.prototype.updateStatePropsIfNeeded=function(){var t=this.computeStateProps(this.store,this.props);return(!this.stateProps||!o(t,this.stateProps))&&(this.stateProps=t,!0)},a.prototype.updateDispatchPropsIfNeeded=function(){var t=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!o(t,this.dispatchProps))&&(this.dispatchProps=t,!0)},a.prototype.updateMergedPropsIfNeeded=function(){var t=i(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&P&&o(t,this.mergedProps))&&(this.mergedProps=t,!0)},a.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},a.prototype.trySubscribe=function(){u&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},a.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},a.prototype.componentDidMount=function(){this.trySubscribe()},a.prototype.componentWillReceiveProps=function(t){y&&o(t,this.props)||(this.haveOwnPropsChanged=!0)},a.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},a.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},a.prototype.handleChange=function(){if(this.unsubscribe){var t=this.store.getState(),e=this.state.storeState;if(!y||e!==t){if(y&&!this.doStatePropsDependOnOwnProps){var n=_(this.updateStatePropsIfNeeded,this);if(!n)return;n===F&&(this.statePropsPrecalculationError=F.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:t})}}},a.prototype.getWrappedInstance=function(){return d(w,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},a.prototype.render=function(){var n=this.haveOwnPropsChanged,r=this.hasStoreStateChanged,i=this.haveStatePropsBeenPrecalculated,o=this.statePropsPrecalculationError,s=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,o)throw o;var a=!0,u=!0;y&&s&&(a=r||n&&this.doStatePropsDependOnOwnProps,u=n&&this.doDispatchPropsDependOnOwnProps);var l=!1,c=!1;i?l=!0:a&&(l=this.updateStatePropsIfNeeded()),u&&(c=this.updateDispatchPropsIfNeeded());var f=!0;return f=!!(l||c||n)&&this.updateMergedPropsIfNeeded(),!f&&s?s:(w?this.renderedElement=t.h(e,x({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=t.h(e,this.mergedProps),this.renderedElement)},a}(t.Component);return a.displayName=s,a.WrappedComponent=e,a.contextTypes={store:g},a.prototype.componentWillUpdate=function(){this.version!==M&&(this.version=M,this.trySubscribe(),this.clearCache())},L(a,e)}}var y={only:function(t){return t&&t[0]||null}};n.isRequired=n;var m={element:n,func:n,shape:function(){return n}},g=m.shape({subscribe:m.func.isRequired,dispatch:m.func.isRequired,getState:m.func.isRequired}),b=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},x=Object.assign||function(t){for(var e=1;e2;)F.push(arguments[a]);for(n&&n.children&&(F.length||F.push(n.children),delete n.children);F.length;)if((o=F.pop())instanceof Array)for(a=o.length;a--;)F.push(o[a]);else null!=o&&o!==!0&&o!==!1&&("number"==typeof o&&(o=String(o)),s="string"==typeof o,s&&i?r[r.length-1]+=o:((r||(r=[])).push(o),i=s));var u=new e(t,n||void 0,r||U);return z.vnode&&z.vnode(u),u}function r(t,e){if(e)for(var n in e)t[n]=e[n];return t}function i(t){return r({},t)}function o(t,e){for(var n=e.split("."),r=0;r2?[].slice.call(arguments,2):t.children)}function c(t,e,n){var r=e.split(".");return function(e){for(var i=e&&e.target||this,s={},u=s,l=a(n)?o(e,n):i.nodeName?i.type.match(/^che|rad/)?i.checked:i.value:e,c=0;c=h?t.appendChild(u):u!==l[g]&&(u===l[g+1]&&m(l[g]),t.insertBefore(u,l[g]||null)))}if(p)for(var g in f)f[g]&&O(f[g]);for(;d<=v;)u=c[v--],u&&O(u)}function O(t,e){var n=t._component;if(n)L(n,!e);else{t[W]&&t[W].ref&&t[W].ref(null),e||E(t);for(var r;r=t.lastChild;)O(r,e)}}function C(t,e,n){var r;for(r in n)e&&r in e||null==n[r]||g(t,r,n[r],n[r]=void 0,$);if(e)for(r in e)"children"===r||"innerHTML"===r||r in n&&e[r]===("value"===r||"checked"===r?t[r]:n[r])||g(t,r,n[r],n[r]=e[r],$)}function j(t){var e=t.constructor.name,n=et[e];n?n.push(t):et[e]=[t]}function I(t,e,n){var r=new t(e,n),i=et[t.name];if(D.call(r,e,n),i)for(var o=i.length;o--;)if(i[o].constructor===t){r.nextBase=i[o].nextBase,i.splice(o,1);break}return r}function N(t,e,n,r,i){t._disable||(t._disable=!0,(t.__ref=e.ref)&&delete e.ref,(t.__key=e.key)&&delete e.key,!t.base||i?t.componentWillMount&&t.componentWillMount():t.componentWillReceiveProps&&t.componentWillReceiveProps(e,r),r&&r!==t.context&&(t.prevContext||(t.prevContext=t.context),t.context=r),t.prevProps||(t.prevProps=t.props),t.props=e,t._disable=!1,0!==n&&(1!==n&&z.syncComponentUpdates===!1&&t.base?f(t):k(t,1,i)),t.__ref&&t.__ref(t))}function k(t,e,n,o){if(!t._disable){var a,u,l,c,f=t.props,p=t.state,_=t.context,v=t.prevProps||f,m=t.prevState||p,g=t.prevContext||_,b=t.base,x=t.nextBase,E=b||x,T=t._component;if(b&&(t.props=v,t.state=m,t.context=g,2!==e&&t.shouldComponentUpdate&&t.shouldComponentUpdate(f,p,_)===!1?a=!0:t.componentWillUpdate&&t.componentWillUpdate(f,p,_),t.props=f,t.state=p,t.context=_),t.prevProps=t.prevState=t.prevContext=t.nextBase=null,t._dirty=!1,!a){for(t.render&&(u=t.render(f,p,_)),t.getChildContext&&(_=r(i(_),t.getChildContext()));d(u);)u=h(u,_);var M,S,C=u&&u.nodeName;if(s(C)){var j=y(u);l=T,l&&l.constructor===C&&j.key==l.__key?N(l,j,1,_):(M=l,l=I(C,j,_),l.nextBase=l.nextBase||x,l._parentComponent=t,t._component=l,N(l,j,0,_),k(l,1,n,!0)),S=l.base}else c=E,M=T,M&&(c=t._component=null),(E||1===e)&&(c&&(c._component=null),S=P(c,u,_,n||!b,E&&E.parentNode,!0));if(E&&S!==E&&l!==T){var A=E.parentNode;A&&S!==A&&(A.replaceChild(S,E),M||(E._component=null,O(E)))}if(M&&L(M,S!==E),t.base=S,S&&!o){for(var D=t,R=t;R=R._parentComponent;)(D=R).base=S;S._component=D,S._componentConstructor=D.constructor}}!b||n?K.unshift(t):a||(t.componentDidUpdate&&t.componentDidUpdate(v,m,g),z.afterUpdate&&z.afterUpdate(t));var F,U=t._renderCallbacks;if(U)for(;F=U.pop();)F.call(t);Q||o||w()}}function A(t,e,n,r){for(var i=t&&t._component,o=i,s=t,a=i&&t._componentConstructor===e.nodeName,u=a,l=y(e);i&&!u&&(i=i._parentComponent);)u=i.constructor===e.nodeName;return i&&u&&(!r||i._component)?(N(i,l,3,n,r),t=i.base):(o&&!a&&(L(o,!0),t=s=null),i=I(e.nodeName,l,n),t&&!i.nextBase&&(i.nextBase=t,s=null),N(i,l,1,n,r),t=i.base,s&&t!==s&&(s._component=null,O(s))),t}function L(t,e){z.beforeUnmount&&z.beforeUnmount(t);var n=t.base;t._disable=!0,t.componentWillUnmount&&t.componentWillUnmount(),t.base=null;var r=t._component;if(r)L(r,e);else if(n){n[W]&&n[W].ref&&n[W].ref(null),t.nextBase=n,e&&(m(n),j(t));for(var i;i=n.lastChild;)O(i,!e)}t.__ref&&t.__ref(null),t.componentDidUnmount&&t.componentDidUnmount()}function D(t,e){this._dirty=!0,this.context=e,this.props=t,this.state||(this.state={})}function R(t,e,n){return P(n,t,{},!1,e)}var z={},F=[],U=[],V={},Y=function(t){return V[t]||(V[t]=t.toLowerCase())},X="undefined"!=typeof Promise&&Promise.resolve(),H=X?function(t){X.then(t)}:setTimeout,q={},W="undefined"!=typeof Symbol?Symbol.for("preactattr"):"__preactattr_",Z={boxFlex:1,boxFlexGroup:1,columnCount:1,fillOpacity:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,fontWeight:1,lineClamp:1,lineHeight:1,opacity:1,order:1,orphans:1,strokeOpacity:1,widows:1,zIndex:1,zoom:1},G={blur:1,error:1,focus:1,load:1,resize:1,scroll:1},B=[],J={},K=[],Q=0,$=!1,tt=!1,et={};r(D.prototype,{linkState:function(t,e){var n=this._linkedStates||(this._linkedStates={});return n[t+e]||(n[t+e]=c(this,t,e))},setState:function(t,e){var n=this.state;this.prevState||(this.prevState=i(n)),r(n,s(t)?t(n,this.props):t),e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),f(this)},forceUpdate:function(){k(this,2)},render:function(){}}),t.h=n,t.cloneElement=l,t.Component=D,t.render=R,t.rerender=p,t.options=z})},function(t,e,n){(function(t){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(){}e.__esModule=!0,e.compose=e.applyMiddleware=e.bindActionCreators=e.combineReducers=e.createStore=void 0;var o=n(52),s=r(o),a=n(66),u=r(a),l=n(68),c=r(l),f=n(69),p=r(f),d=n(70),h=r(d),_=n(67),v=r(_);"production"!==t.env.NODE_ENV&&"string"==typeof i.name&&"isCrushed"!==i.name&&(0,v.default)("You are currently using minified code outside of NODE_ENV === 'production'. This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) to ensure you have the correct code for your production build."),e.createStore=s.default,e.combineReducers=u.default,e.bindActionCreators=c.default,e.applyMiddleware=p.default,e.compose=h.default}).call(e,n(51))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(c===setTimeout)return setTimeout(t,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function s(){_&&d&&(_=!1,d.length?h=d.concat(h):v=-1,h.length&&a())}function a(){if(!_){var t=i(s);_=!0;for(var e=h.length;e;){for(d=h,h=[];++v1)for(var n=1;n0?"Unexpected "+(s.length>1?"keys":"key")+" "+('"'+s.join('", "')+'" found in '+o+". ")+"Expected to find one of the known reducer keys instead: "+('"'+i.join('", "')+'". Unexpected keys will be ignored.'):void 0}function s(t){Object.keys(t).forEach(function(e){var n=t[e],r=n(void 0,{type:u.ActionTypes.INIT});if("undefined"==typeof r)throw new Error('Reducer "'+e+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");var i="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof n(void 0,{type:i}))throw new Error('Reducer "'+e+'" returned undefined when probed with a random type. '+("Don't try to handle "+u.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.")})}function a(e){for(var n=Object.keys(e),r={},a=0;a0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1];if(f)throw f;if("production"!==t.env.NODE_ENV){var s=o(e,r,n,c);s&&(0,p.default)(s)}for(var a=!1,u={},d=0;d2&&(0,k.reset)(t),clearTimeout(this._tm),this._tm=setTimeout(function(){e._resetCounter=0},300)}},{key:"_subscribeFocus",value:function(){var t=this;this._createActivePool();var e=this.context.store;(0,N.default)(this.base,function(n){var r=mojs[v.default.ACTIVE_POOL_NAME];r&&r.resetActive(t),t._state.controls.isActive||e.dispatch({type:"SET_ACTIVE",data:!0})})}},{key:"_getPool",value:function(){return mojs[v.default.ACTIVE_POOL_NAME]||(mojs[v.default.ACTIVE_POOL_NAME]=new L.default),mojs[v.default.ACTIVE_POOL_NAME]}},{key:"_createActivePool",value:function(){var t=this._getPool();t.add(this._setInactive.bind(this)),mojs[v.default.ACTIVE_POOL_NAME]=t}},{key:"_setInactive",value:function(t){var e=this.context.store;t!==this&&e.dispatch({type:"SET_ACTIVE",data:!1})}}]),e}(h.Component);e.default=D},function(t,e,n){t.exports={default:n(73),__esModule:!0}},function(t,e,n){n(74),t.exports=n(4).Object.getPrototypeOf},function(t,e,n){var r=n(42),i=n(75);n(76)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(23),i=n(42),o=n(35)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var r=n(9),i=n(4),o=n(19);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],s={};s[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",s)}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(78),o=r(i);e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":(0,o.default)(e))&&"function"!=typeof e?t:e}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(79),o=r(i),s=n(97),a=r(s),u="function"==typeof a.default&&"symbol"==typeof o.default?function(t){return typeof t}:function(t){return t&&"function"==typeof a.default&&t.constructor===a.default&&t!==a.default.prototype?"symbol":typeof t};e.default="function"==typeof a.default&&"symbol"===u(o.default)?function(t){return"undefined"==typeof t?"undefined":u(t)}:function(t){return t&&"function"==typeof a.default&&t.constructor===a.default&&t!==a.default.prototype?"symbol":"undefined"==typeof t?"undefined":u(t)}},function(t,e,n){t.exports={default:n(80),__esModule:!0}},function(t,e,n){n(81),n(92),t.exports=n(96).f("iterator")},function(t,e,n){"use strict";var r=n(82)(!0);n(83)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var r=n(33),i=n(30);t.exports=function(t){return function(e,n){var o,s,a=String(i(e)),u=r(n),l=a.length;return u<0||u>=l?t?"":void 0:(o=a.charCodeAt(u),o<55296||o>56319||u+1===l||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):o:t?a.slice(u,u+2):(o-55296<<10)+(s-56320)+65536)}}},function(t,e,n){"use strict";var r=n(37),i=n(9),o=n(84),s=n(13),a=n(85),u=n(86),l=n(90),c=n(75),f=n(91)("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",h="keys",_="values",v=function(){return this};t.exports=function(t,e,n,y,m,g,b){u(n,e,y);var x,E,T,w=function(t){if(!p&&t in O)return O[t];switch(t){case h:return function(){return new n(this,t)};case _:return function(){return new n(this,t)}}return function(){return new n(this,t)}},P=e+" Iterator",M=m==_,S=!1,O=t.prototype,C=O[f]||O[d]||m&&O[m],j=C||w(m),I=m?M?w("entries"):j:void 0,N="Array"==e?O.entries||C:C;if(N&&(T=c(N.call(new t)),T!==Object.prototype&&T.next&&(l(T,P,!0),r||"function"==typeof T[f]||s(T,f,v))),M&&C&&C.name!==_&&(S=!0,j=function(){return C.call(this)}),r&&!b||!p&&!S&&O[f]||s(O,f,j),a[e]=j,a[P]=v,m)if(x={values:M?j:w(_),keys:g?j:w(h),entries:I},b)for(E in x)E in O||o(O,E,x[E]);else i(i.P+i.F*(p||S),e,x);return x}},function(t,e,n){t.exports=n(13)},function(t,e){t.exports={}},function(t,e,n){"use strict";var r=n(87),i=n(22),o=n(90),s={};n(13)(s,n(91)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(s,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(15),i=n(88),o=n(39),s=n(35)("IE_PROTO"),a=function(){},u="prototype",l=function(){var t,e=n(20)("iframe"),r=o.length,i="<",s=">";for(e.style.display="none",n(89).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+s+"document.F=Object"+i+"/script"+s),t.close(),l=t.F;r--;)delete l[u][o[r]];return l()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[u]=r(t),n=new a,a[u]=null,n[s]=t):n=l(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(14),i=n(15),o=n(25);t.exports=n(18)?Object.defineProperties:function(t,e){i(t);for(var n,s=o(e),a=s.length,u=0;a>u;)r.f(t,n=s[u++],e[n]);return t}},function(t,e,n){var r=n(10).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(14).f,i=n(23),o=n(91)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(36)("wks"),i=n(38),o=n(10).Symbol,s="function"==typeof o,a=t.exports=function(t){return r[t]||(r[t]=s&&o[t]||(s?o:i)("Symbol."+t))};a.store=r},function(t,e,n){n(93);for(var r=n(10),i=n(13),o=n(85),s=n(91)("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){e.f=n(91)},function(t,e,n){t.exports={default:n(98),__esModule:!0}},function(t,e,n){n(99),n(107),n(108),n(109),t.exports=n(4).Symbol},function(t,e,n){"use strict";var r=n(10),i=n(23),o=n(18),s=n(9),a=n(84),u=n(100).KEY,l=n(19),c=n(36),f=n(90),p=n(38),d=n(91),h=n(96),_=n(101),v=n(102),y=n(103),m=n(15),g=n(16),b=n(42),x=n(27),E=n(21),T=n(22),w=n(87),P=n(104),M=n(106),S=n(40),O=n(14),C=n(25),j=M.f,I=O.f,N=P.f,k=r.Symbol,A=r.JSON,L=A&&A.stringify,D="prototype",R=d("_hidden"),z=d("toPrimitive"),F={}.propertyIsEnumerable,U=c("symbol-registry"),V=c("symbols"),Y=c("op-symbols"),X=Object[D],H="function"==typeof k&&!!S.f,q=r.QObject,W=!q||!q[D]||!q[D].findChild,Z=o&&l(function(){return 7!=w(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=j(X,e);r&&delete X[e],I(t,e,n),r&&t!==X&&I(X,e,r)}:I,G=function(t){var e=V[t]=w(k[D]);return e._k=t,e},B=H&&"symbol"==typeof k.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof k},J=function(t,e,n){return t===X&&J(Y,e,n),m(t),e=E(e,!0),m(n),i(V,e)?(n.enumerable?(i(t,R)&&t[R][e]&&(t[R][e]=!1),n=w(n,{enumerable:T(0,!1)})):(i(t,R)||I(t,R,T(1,{})),t[R][e]=!0),Z(t,e,n)):I(t,e,n)},K=function(t,e){m(t);for(var n,r=v(e=x(e)),i=0,o=r.length;o>i;)J(t,n=r[i++],e[n]);return t},Q=function(t,e){return void 0===e?w(t):K(w(t),e)},$=function(t){var e=F.call(this,t=E(t,!0));return!(this===X&&i(V,t)&&!i(Y,t))&&(!(e||!i(this,t)||!i(V,t)||i(this,R)&&this[R][t])||e)},tt=function(t,e){if(t=x(t),e=E(e,!0),t!==X||!i(V,e)||i(Y,e)){var n=j(t,e);return!n||!i(V,e)||i(t,R)&&t[R][e]||(n.enumerable=!0),n}},et=function(t){for(var e,n=N(x(t)),r=[],o=0;n.length>o;)i(V,e=n[o++])||e==R||e==u||r.push(e);return r},nt=function(t){for(var e,n=t===X,r=N(n?Y:x(t)),o=[],s=0;r.length>s;)!i(V,e=r[s++])||n&&!i(X,e)||o.push(V[e]);return o};H||(k=function(){if(this instanceof k)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===X&&e.call(Y,n),i(this,R)&&i(this[R],t)&&(this[R][t]=!1),Z(this,t,T(1,n))};return o&&W&&Z(X,t,{configurable:!0,set:e}),G(t)},a(k[D],"toString",function(){return this._k}),M.f=tt,O.f=J,n(105).f=P.f=et,n(41).f=$,S.f=nt,o&&!n(37)&&a(X,"propertyIsEnumerable",$,!0),h.f=function(t){return G(d(t))}),s(s.G+s.W+s.F*!H,{Symbol:k});for(var rt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),it=0;rt.length>it;)d(rt[it++]);for(var ot=C(d.store),st=0;ot.length>st;)_(ot[st++]);s(s.S+s.F*!H,"Symbol",{for:function(t){return i(U,t+="")?U[t]:U[t]=k(t)},keyFor:function(t){if(!B(t))throw TypeError(t+" is not a symbol!");for(var e in U)if(U[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),s(s.S+s.F*!H,"Object",{create:Q,defineProperty:J,defineProperties:K,getOwnPropertyDescriptor:tt,getOwnPropertyNames:et,getOwnPropertySymbols:nt});var at=l(function(){S.f(1)});s(s.S+s.F*at,"Object",{getOwnPropertySymbols:function(t){return S.f(b(t))}}),A&&s(s.S+s.F*(!H||l(function(){var t=k();return"[null]"!=L([t])||"{}"!=L({a:t})||"{}"!=L(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(g(e)||void 0!==t)&&!B(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!B(e))return e}),r[1]=e,L.apply(A,r)}}),k[D][z]||n(13)(k[D],z,k[D].valueOf),f(k,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e,n){var r=n(38)("meta"),i=n(16),o=n(23),s=n(14).f,a=0,u=Object.isExtensible||function(){return!0},l=!n(19)(function(){return u(Object.preventExtensions({}))}),c=function(t){s(t,r,{value:{i:"O"+ ++a,w:{}}})},f=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";c(t)}return t[r].i},p=function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;c(t)}return t[r].w},d=function(t){return l&&h.NEED&&u(t)&&!o(t,r)&&c(t),t},h=t.exports={KEY:r,NEED:!1,fastKey:f,getWeak:p,onFreeze:d}},function(t,e,n){var r=n(10),i=n(4),o=n(37),s=n(96),a=n(14).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e,n){var r=n(25),i=n(40),o=n(41);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var s,a=n(t),u=o.f,l=0;a.length>l;)u.call(t,s=a[l++])&&e.push(s);return e}},function(t,e,n){var r=n(29);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(27),i=n(105).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return i(t)}catch(t){return s.slice()}};t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?a(t):i(r(t))}},function(t,e,n){var r=n(26),i=n(39).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(41),i=n(22),o=n(27),s=n(21),a=n(23),u=n(17),l=Object.getOwnPropertyDescriptor;e.f=n(18)?l:function(t,e){if(t=o(t),e=s(e,!0),u)try{return l(t,e)}catch(t){}if(a(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e){},function(t,e,n){n(101)("asyncIterator")},function(t,e,n){n(101)("observable")},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(111),o=r(i),s=n(115),a=r(s),u=n(78),l=r(u);e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":(0,l.default)(e)));t.prototype=(0,a.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(o.default?(0,o.default)(t,e):t.__proto__=e)}},function(t,e,n){t.exports={default:n(112),__esModule:!0}},function(t,e,n){n(113),t.exports=n(4).Object.setPrototypeOf},function(t,e,n){var r=n(9);r(r.S,"Object",{setPrototypeOf:n(114).set})},function(t,e,n){var r=n(16),i=n(15),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(11)(Function.call,n(106).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){t.exports={default:n(116),__esModule:!0}},function(t,e,n){n(117);var r=n(4).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){var r=n(9);r(r.S,"Object",{create:n(87)})},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=350;e.default={CURVE_SIZE:n,RESIZE_NEGATIVE_OFFSET:150,CURVE_PERCENT:n/100,CURVE_PADDING:10,ACTIVE_POOL_NAME:"_mojsCurveEditorPool"}},function(t,e,n){var r;/*! Hammer.JS - v2.0.7 - 2016-04-22 * http://hammerjs.github.io/ * diff --git a/app/js/app.babel.jsx b/app/js/app.babel.jsx index 04b02fd..1b17ed3 100644 --- a/app/js/app.babel.jsx +++ b/app/js/app.babel.jsx @@ -46,7 +46,7 @@ class API { } _vars () { - this.revision = '1.7.0'; + this.revision = '1.7.1'; this.store = initStore(); this._easings = []; diff --git a/package-lock.json b/package-lock.json index e2d85d8..ca4bb6e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@mojs/curve-editor", - "version": "1.7.0", + "version": "1.7.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f81bf5c..a2ef126 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mojs/curve-editor", - "version": "1.7.0", + "version": "1.7.1", "description": "GUI for live easing/property curves editing", "source": "app/js/app.babel.jsx", "main": "app/build/mojs-curve-editor.min.js",