configs/walls/vendors~Gifts~Poll~Reddit.465b9d2661dafd9d1341.js

2 lines
21 KiB
JavaScript
Raw Normal View History

2019-03-12 18:36:46 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([["vendors~Gifts~Poll~Reddit"],{"./node_modules/react-motion/lib/Motion.js":function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function a(e){return e&&e.__esModule?e:{default:e}}var l=a(n("./node_modules/react-motion/lib/mapToZero.js")),i=a(n("./node_modules/react-motion/lib/stripStyle.js")),s=a(n("./node_modules/react-motion/lib/stepper.js")),u=a(n("./node_modules/react-motion/node_modules/performance-now/lib/performance-now.js")),c=a(n("./node_modules/raf/index.js")),d=a(n("./node_modules/react-motion/lib/shouldStopAnimation.js")),f=a(n("./node_modules/react/index.js")),p=a(n("./node_modules/react-motion/node_modules/prop-types/index.js")),m=1e3/60,y=function(e){function t(n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e.call(this,n),this.wasAnimating=!1,this.animationID=null,this.prevTime=0,this.accumulatedTime=0,this.unreadPropStyle=null,this.clearUnreadPropStyle=function(e){var t=!1,n=o.state,a=n.currentStyle,l=n.currentVelocity,i=n.lastIdealStyle,s=n.lastIdealVelocity;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var c=e[u];"number"==typeof c&&(t||(t=!0,a=r({},a),l=r({},l),i=r({},i),s=r({},s)),a[u]=c,l[u]=0,i[u]=c,s[u]=0)}t&&o.setState({currentStyle:a,currentVelocity:l,lastIdealStyle:i,lastIdealVelocity:s})},this.startAnimationIfNecessary=function(){o.animationID=c.default(function(e){var t=o.props.style;if(d.default(o.state.currentStyle,t,o.state.currentVelocity))return o.wasAnimating&&o.props.onRest&&o.props.onRest(),o.animationID=null,o.wasAnimating=!1,void(o.accumulatedTime=0);o.wasAnimating=!0;var n=e||u.default(),r=n-o.prevTime;if(o.prevTime=n,o.accumulatedTime=o.accumulatedTime+r,o.accumulatedTime>10*m&&(o.accumulatedTime=0),0===o.accumulatedTime)return o.animationID=null,void o.startAnimationIfNecessary();var a=(o.accumulatedTime-Math.floor(o.accumulatedTime/m)*m)/m,l=Math.floor(o.accumulatedTime/m),i={},c={},f={},p={};for(var y in t)if(Object.prototype.hasOwnProperty.call(t,y)){var h=t[y];if("number"==typeof h)f[y]=h,p[y]=0,i[y]=h,c[y]=0;else{for(var v=o.state.lastIdealStyle[y],b=o.state.lastIdealVelocity[y],_=0;_<l;_++){var S=s.default(m/1e3,v,b,h.val,h.stiffness,h.damping,h.precision);v=S[0],b=S[1]}var j=s.default(m/1e3,v,b,h.val,h.stiffness,h.damping,h.precision),g=j[0],T=j[1];f[y]=v+(g-v)*a,p[y]=b+(T-b)*a,i[y]=v,c[y]=b}}o.animationID=null,o.accumulatedTime-=l*m,o.setState({currentStyle:f,currentVelocity:p,lastIdealStyle:i,lastIdealVelocity:c}),o.unreadPropStyle=null,o.startAnimationIfNecessary()})},this.state=this.defaultState()}return function(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)}(t,e),o(t,null,[{key:"propTypes",value:{defaultStyle:p.default.objectOf(p.default.number),style:p.default.objectOf(p.default.oneOfType([p.default.number,p.default.object])).isRequired,children:p.default.func.isRequired,onRest:p.default.func},enumerable:!0}]),t.prototype.defaultState=function(){var e=this.props,t=e.defaultStyle,n=e.style,r=t||i.default(n),o=l.default(r);return{currentStyle:r,currentVelocity:o,lastIdealStyle:r,lastIdealVelocity:o}},t.prototype.componentDidMount=function(){this.prevTime=u.default(),this.startAnimationIfNecessary()},t.prototype.componentWillReceiveProps=function(e){null!=this.unreadPropStyle&&this.clearUnreadPropStyle(this.unreadPropStyle),this.unreadPropStyle=e.style,null==this.animationID&&(this.prev
//# sourceMappingURL=vendors~Gifts~Poll~Reddit.465b9d2661dafd9d1341.js.map